@moises.ai/design-system 3.4.5 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2490 -2339
- package/package.json +3 -2
- package/src/Introduction.mdx +56 -0
- package/src/colors/custom-styles.css +293 -0
- package/src/components/AdditionalItems/AdditionalItems.jsx +43 -0
- package/src/components/AdditionalItems/AdditionalItems.module.css +76 -0
- package/src/components/AdditionalItems/AdditionalItems.stories.jsx +32 -0
- package/src/components/BannerAnnouncement/BannerAnnouncement.jsx +77 -0
- package/src/components/BannerAnnouncement/BannerAnnouncement.module.css +58 -0
- package/src/components/BannerAnnouncement/BannerAnnouncement.stories.jsx +120 -0
- package/src/components/Button/Button.jsx +45 -0
- package/src/components/Button/Button.module.css +288 -0
- package/src/components/Button/Button.stories.jsx +269 -0
- package/src/components/Callout/Callout.jsx +47 -0
- package/src/components/Callout/Callout.module.css +56 -0
- package/src/components/Callout/Callout.stories.jsx +296 -0
- package/src/components/Card/Card.jsx +46 -0
- package/src/components/Card/Card.module.css +89 -0
- package/src/components/Card/Card.stories.jsx +116 -0
- package/src/components/Checkbox/Checkbox.jsx +36 -0
- package/src/components/Checkbox/Checkbox.module.css +136 -0
- package/src/components/Checkbox/Checkbox.stories.jsx +64 -0
- package/src/components/CigarBar/CigarBar.jsx +73 -0
- package/src/components/CigarBar/CigarBar.module.css +57 -0
- package/src/components/CigarBar/CigarBar.stories.jsx +66 -0
- package/src/components/ContextMenu/ContextMenu.jsx +56 -0
- package/src/components/ContextMenu/ContextMenu.stories.jsx +657 -0
- package/src/components/Countdown/Countdown.jsx +97 -0
- package/src/components/Countdown/Countdown.module.css +206 -0
- package/src/components/Countdown/Countdown.stories.jsx +108 -0
- package/src/components/DataTable/DataTable.jsx +300 -0
- package/src/components/DataTable/DataTable.module.css +372 -0
- package/src/components/DataTable/DataTable.stories.jsx +365 -0
- package/src/components/DropdownButton/DropdownButton.jsx +124 -0
- package/src/components/DropdownButton/DropdownButton.module.css +102 -0
- package/src/components/DropdownButton/DropdownButton.stories.jsx +267 -0
- package/src/components/DropdownMenu/DropdownMenu.jsx +102 -0
- package/src/components/DropdownMenu/DropdownMenu.stories.jsx +645 -0
- package/src/components/FloatingBanner/FloatingBanner.jsx +87 -0
- package/src/components/FloatingBanner/FloatingBanner.module.css +92 -0
- package/src/components/FloatingBanner/FloatingBanner.stories.jsx +115 -0
- package/src/components/FooterPanel/FooterPanel.jsx +56 -0
- package/src/components/FooterPanel/FooterPanel.stories.jsx +289 -0
- package/src/components/GenerationSourceCallout/GenerationSourceCallout.jsx +53 -0
- package/src/components/GenerationSourceCallout/GenerationSourceCallout.module.css +98 -0
- package/src/components/GroupButtons/GroupButtons.jsx +97 -0
- package/src/components/GroupButtons/GroupButtons.module.css +8 -0
- package/src/components/GroupButtons/GroupButtons.stories.jsx +301 -0
- package/src/components/HeaderPanel/HeaderPanel.jsx +115 -0
- package/src/components/HeaderPanel/HeaderPanel.stories.jsx +389 -0
- package/src/components/HorizontalVolume/HorizontalVolume.jsx +157 -0
- package/src/components/HorizontalVolume/HorizontalVolume.module.css +123 -0
- package/src/components/HorizontalVolume/HorizontalVolume.stories.jsx +109 -0
- package/src/components/IconButton/IconButton.jsx +47 -0
- package/src/components/IconButton/IconButton.module.css +302 -0
- package/src/components/IconButton/IconButton.stories.jsx +532 -0
- package/src/components/InstrumentSelector/InstrumentSelector.jsx +61 -0
- package/src/components/InstrumentSelector/InstrumentSelector.module.css +80 -0
- package/src/components/InstrumentSelector/InstrumentSelector.stories.jsx +33 -0
- package/src/components/Knob/Knob.jsx +173 -0
- package/src/components/Knob/Knob.module.css +70 -0
- package/src/components/Knob/Knob.stories.jsx +289 -0
- package/src/components/Knob/constants.js +38 -0
- package/src/components/Knob/useKnob.js +117 -0
- package/src/components/Knob/utils.js +117 -0
- package/src/components/ListCards/CardDetails.stories.jsx +484 -0
- package/src/components/ListCards/ListCards.jsx +297 -0
- package/src/components/ListCards/ListCards.module.css +234 -0
- package/src/components/ListCards/ListCards.stories.jsx +386 -0
- package/src/components/LokalisePoc/LokalisePoc.jsx +7 -0
- package/src/components/LokalisePoc/LokalisePoc.stories.jsx +63 -0
- package/src/components/MessageWithAction/MessageWithAction.jsx +54 -0
- package/src/components/MessageWithAction/MessageWithAction.module.css +16 -0
- package/src/components/MessageWithAction/MessageWithAction.stories.jsx +280 -0
- package/src/components/MetronomeForm/MetronomeForm.jsx +74 -0
- package/src/components/MetronomeForm/MetronomeForm.stories.jsx +137 -0
- package/src/components/MultiSelect/MultiSelect.jsx +129 -0
- package/src/components/MultiSelect/MultiSelect.module.css +105 -0
- package/src/components/MultiSelect/MultiSelect.stories.jsx +296 -0
- package/src/components/MultiSelectCards/MultiSelectCards.jsx +96 -0
- package/src/components/MultiSelectCards/MultiSelectCards.module.css +60 -0
- package/src/components/MultiSelectCards/MultiSelectCards.stories.jsx +439 -0
- package/src/components/PanControl/PanControl.jsx +227 -0
- package/src/components/PanControl/PanControl.module.css +71 -0
- package/src/components/PanControl/PanControl.stories.jsx +100 -0
- package/src/components/ProductsBrandPattern/Patterns/aiStudio.png +0 -0
- package/src/components/ProductsBrandPattern/Patterns/mastering.png +0 -0
- package/src/components/ProductsBrandPattern/Patterns/product.png +0 -0
- package/src/components/ProductsBrandPattern/Patterns/stemSeparation.png +0 -0
- package/src/components/ProductsBrandPattern/Patterns/voiceStudio.png +0 -0
- package/src/components/ProductsBrandPattern/ProductsBrandPattern.jsx +36 -0
- package/src/components/ProductsBrandPattern/ProductsBrandPattern.stories.jsx +47 -0
- package/src/components/ProductsList/ProductsList.jsx +54 -0
- package/src/components/ProductsList/ProductsList.module.css +81 -0
- package/src/components/ProductsList/ProductsList.stories.jsx +69 -0
- package/src/components/ProfileMenu/MenuTrigger.jsx +45 -0
- package/src/components/ProfileMenu/ProfileMenu.jsx +66 -0
- package/src/components/ProfileMenu/ProfileMenu.module.css +101 -0
- package/src/components/ProfileMenu/ProfileMenu.stories.jsx +44 -0
- package/src/components/ProjectsList/ProjectsList.jsx +132 -0
- package/src/components/ProjectsList/ProjectsList.module.css +71 -0
- package/src/components/ProjectsList/ProjectsList.stories.jsx +25 -0
- package/src/components/ProjectsList/utils-stories.js +186 -0
- package/src/components/ProjectsList/utils.jsx +70 -0
- package/src/components/RadioCardsGroup/RadioCardsGroup.jsx +35 -0
- package/src/components/RadioCardsGroup/RadioCardsGroup.module.css +66 -0
- package/src/components/RadioCardsGroup/RadioCardsGroup.stories.jsx +89 -0
- package/src/components/Rating/Rating.jsx +154 -0
- package/src/components/Rating/Rating.module.css +70 -0
- package/src/components/Rating/Rating.stories.jsx +215 -0
- package/src/components/RecordingForm/RecordingForm.jsx +142 -0
- package/src/components/RecordingForm/RecordingForm.module.css +49 -0
- package/src/components/RecordingForm/RecordingForm.stories.jsx +319 -0
- package/src/components/SectionExpander/SectionExpander.jsx +53 -0
- package/src/components/SectionExpander/SectionExpander.module.css +46 -0
- package/src/components/SectionExpander/SectionExpander.stories.jsx +48 -0
- package/src/components/SegmentedControl/SegmentedControl.jsx +48 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.jsx +133 -0
- package/src/components/SegmentedControl/SegmentedControl.styles.css +55 -0
- package/src/components/Select/Select.jsx +132 -0
- package/src/components/Select/Select.module.css +76 -0
- package/src/components/Select/Select.stories.jsx +294 -0
- package/src/components/SetlistList/SetlistList.jsx +338 -0
- package/src/components/SetlistList/SetlistList.module.css +246 -0
- package/src/components/SetlistList/SetlistList.stories.jsx +121 -0
- package/src/components/Shell/Shell.jsx +75 -0
- package/src/components/Shell/Shell.module.css +3 -0
- package/src/components/Shell/Shell.stories.jsx +354 -0
- package/src/components/Sidebar/Sidebar.jsx +173 -0
- package/src/components/Sidebar/Sidebar.module.css +267 -0
- package/src/components/Sidebar/Sidebar.stories.jsx +247 -0
- package/src/components/Sidebar/SidebarSection/SidebarSection.jsx +20 -0
- package/src/components/Sidebar/SidebarSection/SidebarSection.module.css +20 -0
- package/src/components/Slider/Slider.jsx +114 -0
- package/src/components/Slider/Slider.module.css +159 -0
- package/src/components/Slider/Slider.stories.jsx +199 -0
- package/src/components/StemGenerationForm/BesideFooter/BesideFooter.jsx +107 -0
- package/src/components/StemGenerationForm/BesideFooter/BesideFooter.module.css +4 -0
- package/src/components/StemGenerationForm/Concurrency/Concurrency.jsx +54 -0
- package/src/components/StemGenerationForm/Concurrency/Concurrency.module.css +26 -0
- package/src/components/StemGenerationForm/CreateFromPreset/CreateFromPreset.jsx +44 -0
- package/src/components/StemGenerationForm/CreateNew/CreateNew.jsx +107 -0
- package/src/components/StemGenerationForm/CreativeFreedomSection/CreativeFreedomSection.jsx +185 -0
- package/src/components/StemGenerationForm/CreativeFreedomSection/CreativeFreedomSection.module.css +8 -0
- package/src/components/StemGenerationForm/GenerationStatus/GenerationStatus.jsx +91 -0
- package/src/components/StemGenerationForm/StemGenerationForm.jsx +342 -0
- package/src/components/StemGenerationForm/StemGenerationForm.stories.jsx +703 -0
- package/src/components/StemGenerationForm/utils/constants.js +26 -0
- package/src/components/StemGenerationForm/utils/formatFileInfo.js +20 -0
- package/src/components/StemGenerationForm/utils/getInstrumentDescription.js +27 -0
- package/src/components/StemGenerationForm/utils/getLocalizedGenerationInstruments.js +31 -0
- package/src/components/StemGenerationForm/utils/index.js +13 -0
- package/src/components/StemGenerationForm/utils/secondsToTime.js +15 -0
- package/src/components/StemSeparationForm/GenerationStatus/GenerationStatus.jsx +70 -0
- package/src/components/StemSeparationForm/StemSeparationForm.jsx +354 -0
- package/src/components/StemSeparationForm/StemSeparationForm.module.css +0 -0
- package/src/components/StemSeparationForm/StemSeparationForm.stories.jsx +221 -0
- package/src/components/TempoControlsForm/AutoDetect/AutoDetect.jsx +114 -0
- package/src/components/TempoControlsForm/TempoControlsForm.jsx +59 -0
- package/src/components/TempoControlsForm/TempoControlsForm.stories.jsx +228 -0
- package/src/components/TempoControlsForm/TempoForm/TempoForm.jsx +94 -0
- package/src/components/TempoControlsForm/TempoFormInput/TempoFormInput.jsx +136 -0
- package/src/components/TempoControlsForm/TempoFormInput/TempoFormInput.module.css +19 -0
- package/src/components/TempoControlsForm/constants.js +77 -0
- package/src/components/TempoControlsForm/utils/formatDateTime.js +50 -0
- package/src/components/TempoControlsForm/utils/getTempoMarking.js +6 -0
- package/src/components/Text/Text.jsx +19 -0
- package/src/components/Text/Text.module.css +5 -0
- package/src/components/Text/Text.stories.jsx +117 -0
- package/src/components/TextArea/TextArea.jsx +53 -0
- package/src/components/TextArea/TextArea.module.css +35 -0
- package/src/components/TextArea/TextArea.stories.jsx +140 -0
- package/src/components/TextField/TextField.jsx +61 -0
- package/src/components/TextField/TextField.module.css +41 -0
- package/src/components/TextField/TextField.stories.jsx +243 -0
- package/src/components/ThumbnailPicker/ThumbColors/ThumbColors.js +101 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/ThumbGraphics.js +90 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles05.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/circles06.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines05.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/lines06.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/patterns01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/patterns02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/patterns03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/patterns04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes05.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes06.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes07.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes08.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/shapes09.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/synth01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/synth02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/synth03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/synth04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/synth05.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/waves01.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/waves02.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/waves03.png +0 -0
- package/src/components/ThumbnailPicker/ThumbGraphics/waves04.png +0 -0
- package/src/components/ThumbnailPicker/ThumbnailPicker.jsx +67 -0
- package/src/components/ThumbnailPicker/ThumbnailPicker.module.css +0 -0
- package/src/components/ThumbnailPicker/ThumbnailPicker.stories.jsx +406 -0
- package/src/components/ThumbnailPicker/getStyleFromID.js +31 -0
- package/src/components/TooltipWithInfoIcon/TooltipWithInfoIcon.jsx +18 -0
- package/src/components/TooltipWithInfoIcon/TooltipWithInfoIcon.module.css +6 -0
- package/src/components/TooltipWithInfoIcon/TooltipWithInfoIcon.stories.jsx +28 -0
- package/src/components/TrackControlButton/TrackControlButton.jsx +28 -0
- package/src/components/TrackControlButton/TrackControlButton.module.css +32 -0
- package/src/components/TrackControlButton/TrackControlButton.stories.jsx +47 -0
- package/src/components/TrackControlButton/index.js +1 -0
- package/src/components/TrackHeader/TrackHeader.jsx +143 -0
- package/src/components/TrackHeader/TrackHeader.module.css +194 -0
- package/src/components/TrackHeader/TrackHeader.stories.jsx +212 -0
- package/src/components/TrackHeader/TrackHeaderOptions/TrackHeaderOptions.jsx +18 -0
- package/src/components/TrackHeader/TrackHeaderOptions/TrackHeaderOptions.module.css +8 -0
- package/src/components/TrackHeader/TrackHeaderOptions/index.js +1 -0
- package/src/components/VoiceConversionForm/BesideFooter/BesideFooter.jsx +74 -0
- package/src/components/VoiceConversionForm/ClickableAvatar/ClickableAvatar.jsx +40 -0
- package/src/components/VoiceConversionForm/ClickableAvatar/ClickableAvatar.module.css +21 -0
- package/src/components/VoiceConversionForm/Concurrency/Concurrency.jsx +53 -0
- package/src/components/VoiceConversionForm/Concurrency/Concurrency.module.css +26 -0
- package/src/components/VoiceConversionForm/GenerationStatus/GenerationStatus.jsx +49 -0
- package/src/components/VoiceConversionForm/VoiceConversionForm.jsx +231 -0
- package/src/components/VoiceConversionForm/VoiceConversionForm.module.css +9 -0
- package/src/components/VoiceConversionForm/VoiceConversionForm.stories.jsx +582 -0
- package/src/components/VoiceConversionForm/VoiceDetails/VoiceDetails.jsx +93 -0
- package/src/components/VoiceConversionForm/VoiceDetails/VoiceDetails.module.css +44 -0
- package/src/components/VoiceConversionForm/VoiceList/VoiceList.jsx +84 -0
- package/src/components/VoiceConversionForm/VoiceList/VoiceList.module.css +11 -0
- package/src/components/VoiceConversionForm/Waveform/Waveform.jsx +262 -0
- package/src/components/VoiceConversionForm/Waveform/Waveform.module.css +36 -0
- package/src/components/theme/Theme.jsx +16 -0
- package/src/components/theme/Theme.stories.jsx +59 -0
- package/src/icons/AbbeyRoadIcon.jsx +117 -0
- package/src/icons/AccessibilityIcon.jsx +33 -0
- package/src/icons/AcousticGuitarIcon.jsx +16 -0
- package/src/icons/AddIcon.jsx +18 -0
- package/src/icons/AddLyricsIcon.jsx +25 -0
- package/src/icons/AddRoundIcon.jsx +26 -0
- package/src/icons/AirplayIcon.jsx +26 -0
- package/src/icons/AlertIcon.jsx +28 -0
- package/src/icons/AppIcon.jsx +18 -0
- package/src/icons/ArVrIcon.jsx +21 -0
- package/src/icons/ArrowDownIcon.jsx +26 -0
- package/src/icons/ArrowDownloadIcon.jsx +26 -0
- package/src/icons/ArrowLeftIcon.jsx +26 -0
- package/src/icons/ArrowRightIcon.jsx +26 -0
- package/src/icons/ArrowUpIcon.jsx +26 -0
- package/src/icons/ArrowsHorizontalIcon.jsx +26 -0
- package/src/icons/ArrowsVerticalIcon.jsx +26 -0
- package/src/icons/AtomIcon.jsx +32 -0
- package/src/icons/AttachmentIcon.jsx +26 -0
- package/src/icons/AudioAdjustmentsIcon.jsx +26 -0
- package/src/icons/AudioFileIcon.jsx +26 -0
- package/src/icons/AudioFilesIcon.jsx +26 -0
- package/src/icons/AutoplayIcon.jsx +26 -0
- package/src/icons/BackwardIcon.jsx +18 -0
- package/src/icons/BarsIcon.jsx +27 -0
- package/src/icons/BassIcon.jsx +39 -0
- package/src/icons/BoldIcon.jsx +21 -0
- package/src/icons/BookIcon.jsx +21 -0
- package/src/icons/BookmarkIcon.jsx +24 -0
- package/src/icons/BoxIcon.jsx +20 -0
- package/src/icons/BriefcaseIcon.jsx +26 -0
- package/src/icons/CalendarIcon.jsx +26 -0
- package/src/icons/CameraFlip2Icon.jsx +26 -0
- package/src/icons/CameraFlip3Icon.jsx +26 -0
- package/src/icons/CameraFlipIcon.jsx +26 -0
- package/src/icons/CameraIcon.jsx +33 -0
- package/src/icons/CameraRollIcon.jsx +31 -0
- package/src/icons/CarIcon.jsx +18 -0
- package/src/icons/CartIcon.jsx +28 -0
- package/src/icons/CassetteIcon.jsx +26 -0
- package/src/icons/CastIcon.jsx +20 -0
- package/src/icons/CdIcon.jsx +19 -0
- package/src/icons/CheckboxCicleIcon.jsx +26 -0
- package/src/icons/CheckboxFillIcon.jsx +25 -0
- package/src/icons/CheckboxOffIcon.jsx +25 -0
- package/src/icons/CheckboxOnIcon.jsx +25 -0
- package/src/icons/ChevronDownIcon.jsx +26 -0
- package/src/icons/ChevronLeftIcon.jsx +26 -0
- package/src/icons/ChevronRightIcon.jsx +26 -0
- package/src/icons/ChevronUpIcon.jsx +26 -0
- package/src/icons/ChordGrid2Icon.jsx +26 -0
- package/src/icons/ChordGridIcon.jsx +26 -0
- package/src/icons/ChordSequenceIcon.jsx +26 -0
- package/src/icons/Chords2Icon.jsx +25 -0
- package/src/icons/Chords3Icon.jsx +24 -0
- package/src/icons/ChordsDetection2Icon.jsx +31 -0
- package/src/icons/ChordsDetectionIcon.jsx +31 -0
- package/src/icons/ChordsIcon.jsx +25 -0
- package/src/icons/ClipIcon.jsx +27 -0
- package/src/icons/ClipboardIcon.jsx +23 -0
- package/src/icons/CloseIcon.jsx +27 -0
- package/src/icons/Cloud2Icon.jsx +24 -0
- package/src/icons/Cloud3Icon.jsx +24 -0
- package/src/icons/CloudDownload2Icon.jsx +26 -0
- package/src/icons/CloudDownloadErrorIcon.jsx +26 -0
- package/src/icons/CloudDownloadGradientIcon.jsx +44 -0
- package/src/icons/CloudDownloadIcon.jsx +26 -0
- package/src/icons/CloudIcon.jsx +20 -0
- package/src/icons/CloudUploadIcon.jsx +26 -0
- package/src/icons/CodeIcon.jsx +28 -0
- package/src/icons/CollectionsIcon.jsx +26 -0
- package/src/icons/CompressorIcon.jsx +25 -0
- package/src/icons/ComputerIcon.jsx +26 -0
- package/src/icons/CopilotIcon.jsx +26 -0
- package/src/icons/CountInIcon.jsx +23 -0
- package/src/icons/CountdownIcon.jsx +33 -0
- package/src/icons/CowbellIcon.jsx +25 -0
- package/src/icons/CropIcon.jsx +27 -0
- package/src/icons/CrownIcon.jsx +21 -0
- package/src/icons/CueBackIcon.jsx +25 -0
- package/src/icons/CueIcon.jsx +20 -0
- package/src/icons/CymbalsIcon.jsx +26 -0
- package/src/icons/DatabaseIcon.jsx +26 -0
- package/src/icons/DelayIcon.jsx +20 -0
- package/src/icons/DenoiserIcon.jsx +23 -0
- package/src/icons/DevicesIcon.jsx +26 -0
- package/src/icons/DialogueIcon.jsx +33 -0
- package/src/icons/DojoIcon.jsx +21 -0
- package/src/icons/DotsVertical2Icon.jsx +43 -0
- package/src/icons/DotsVerticalIcon.jsx +47 -0
- package/src/icons/DownloadApp2Icon.jsx +26 -0
- package/src/icons/DownloadAppIcon.jsx +23 -0
- package/src/icons/Drums2Icon.jsx +25 -0
- package/src/icons/DrumsIcon.jsx +18 -0
- package/src/icons/EditIcon.jsx +20 -0
- package/src/icons/EffectsIcon.jsx +25 -0
- package/src/icons/ElectricGuitarIcon.jsx +54 -0
- package/src/icons/EqIcon.jsx +20 -0
- package/src/icons/FeaturesIcon.jsx +24 -0
- package/src/icons/FileIcon.jsx +21 -0
- package/src/icons/FileNewIcon.jsx +26 -0
- package/src/icons/Filter2Icon.jsx +26 -0
- package/src/icons/FilterIcon.jsx +26 -0
- package/src/icons/FireIcon.jsx +21 -0
- package/src/icons/FlagIcon.jsx +21 -0
- package/src/icons/FlashGradientIcon.jsx +39 -0
- package/src/icons/FlashIcon.jsx +21 -0
- package/src/icons/FlatAndSharpIcon.jsx +25 -0
- package/src/icons/FlatIcon.jsx +20 -0
- package/src/icons/FolderIcon.jsx +32 -0
- package/src/icons/FolderPlusIcon.jsx +26 -0
- package/src/icons/ForwardIcon.jsx +18 -0
- package/src/icons/GiftIcon.jsx +21 -0
- package/src/icons/GlobeIcon.jsx +22 -0
- package/src/icons/GoalsIcon.jsx +25 -0
- package/src/icons/GraphIcon.jsx +21 -0
- package/src/icons/GuitarAmpIcon.jsx +41 -0
- package/src/icons/HamburgerMenu2Icon.jsx +26 -0
- package/src/icons/HamburgerMenu3Icon.jsx +26 -0
- package/src/icons/HandbagIcon.jsx +26 -0
- package/src/icons/HeadphonesIcon.jsx +26 -0
- package/src/icons/HeadphonesLeftIcon.jsx +30 -0
- package/src/icons/HeadphonesRightIcon.jsx +30 -0
- package/src/icons/HiFiGradientIcon.jsx +36 -0
- package/src/icons/HiFiIcon.jsx +112 -0
- package/src/icons/HiHatIcon.jsx +21 -0
- package/src/icons/HomeIcon.jsx +18 -0
- package/src/icons/Icons.stories.jsx +154 -0
- package/src/icons/ImageGalleryIcon.jsx +25 -0
- package/src/icons/ImageIcon.jsx +21 -0
- package/src/icons/Info2Icon.jsx +18 -0
- package/src/icons/InfoIcon.jsx +20 -0
- package/src/icons/InternetSignalIcon.jsx +26 -0
- package/src/icons/IpadIcon.jsx +20 -0
- package/src/icons/IsolateDrumsGradientIcon.jsx +41 -0
- package/src/icons/IsolateDrumsIcon.jsx +23 -0
- package/src/icons/KaraokeIcon.jsx +23 -0
- package/src/icons/KaraokeMicIcon.jsx +23 -0
- package/src/icons/KeyDetectionIcon.jsx +25 -0
- package/src/icons/KeyboardIcon.jsx +25 -0
- package/src/icons/KeysIcon.jsx +21 -0
- package/src/icons/KickdrumIcon.jsx +30 -0
- package/src/icons/Knob2Icon.jsx +27 -0
- package/src/icons/Knob3Icon.jsx +27 -0
- package/src/icons/KnobIcon.jsx +28 -0
- package/src/icons/LabIcon.jsx +21 -0
- package/src/icons/LaptopIcon.jsx +25 -0
- package/src/icons/LibraryIcon.jsx +31 -0
- package/src/icons/LinkIcon.jsx +21 -0
- package/src/icons/ListCheckIcon.jsx +26 -0
- package/src/icons/ListIcon.jsx +21 -0
- package/src/icons/LivePerformanceIcon.jsx +23 -0
- package/src/icons/LockIcon.jsx +28 -0
- package/src/icons/LogInIcon.jsx +21 -0
- package/src/icons/LogOutIcon.jsx +26 -0
- package/src/icons/LoopIcon.jsx +29 -0
- package/src/icons/LoopSection2Icon.jsx +26 -0
- package/src/icons/LoopSection3Icon.jsx +26 -0
- package/src/icons/LoopSectionIcon.jsx +26 -0
- package/src/icons/LyricsIcon.jsx +33 -0
- package/src/icons/MaracasIcon.jsx +24 -0
- package/src/icons/MasteringIcon.jsx +37 -0
- package/src/icons/Maximize2Icon.jsx +26 -0
- package/src/icons/MaximizeIcon.jsx +26 -0
- package/src/icons/MetronomeIcon.jsx +23 -0
- package/src/icons/Minimize2Icon.jsx +26 -0
- package/src/icons/MinimizeIcon.jsx +26 -0
- package/src/icons/Mixer2Icon.jsx +25 -0
- package/src/icons/MixerIcon.jsx +20 -0
- package/src/icons/MoisesIcon.jsx +47 -0
- package/src/icons/MoisesLogoIcon.jsx +43 -0
- package/src/icons/MoneyIcon.jsx +20 -0
- package/src/icons/MonoIcon.jsx +18 -0
- package/src/icons/MoonIcon.jsx +21 -0
- package/src/icons/More2Icon.jsx +44 -0
- package/src/icons/MoreIcon.jsx +51 -0
- package/src/icons/MultipleUsersIcon.jsx +26 -0
- package/src/icons/MusicAddIcon.jsx +26 -0
- package/src/icons/MusicControlIcon.jsx +23 -0
- package/src/icons/MusicDevice2Icon.jsx +23 -0
- package/src/icons/MusicDeviceIcon.jsx +25 -0
- package/src/icons/MusicIcon.jsx +26 -0
- package/src/icons/MusicListIcon.jsx +26 -0
- package/src/icons/MusicLoverIcon.jsx +23 -0
- package/src/icons/MusicNoteIcon.jsx +21 -0
- package/src/icons/MusicNotesIcon.jsx +26 -0
- package/src/icons/MusicRemoveIcon.jsx +26 -0
- package/src/icons/NewCollectionsIcon.jsx +25 -0
- package/src/icons/NextIcon.jsx +20 -0
- package/src/icons/NoAcousticGuitarIcon.jsx +23 -0
- package/src/icons/NoBassIcon.jsx +23 -0
- package/src/icons/NoChords2Icon.jsx +25 -0
- package/src/icons/NoChordsDetectionIcon.jsx +31 -0
- package/src/icons/NoCloud3Icon.jsx +23 -0
- package/src/icons/NoComputerIcon.jsx +26 -0
- package/src/icons/NoCymbalsIcon.jsx +26 -0
- package/src/icons/NoDialogueIcon.jsx +26 -0
- package/src/icons/NoDrums2Icon.jsx +23 -0
- package/src/icons/NoDrumsIcon.jsx +23 -0
- package/src/icons/NoElectricGuitarIcon.jsx +23 -0
- package/src/icons/NoFileIcon.jsx +26 -0
- package/src/icons/NoHeadphonesIcon.jsx +26 -0
- package/src/icons/NoHiHatIcon.jsx +26 -0
- package/src/icons/NoInternetSignalIcon.jsx +33 -0
- package/src/icons/NoKeysIcon.jsx +38 -0
- package/src/icons/NoKickdrumIcon.jsx +23 -0
- package/src/icons/NoLoopSection2Icon.jsx +23 -0
- package/src/icons/NoLoopSectionIcon.jsx +26 -0
- package/src/icons/NoLyricsIcon.jsx +25 -0
- package/src/icons/NoMaracasIcon.jsx +23 -0
- package/src/icons/NoMetronomeIcon.jsx +23 -0
- package/src/icons/NoMoneyIcon.jsx +26 -0
- package/src/icons/NoMusicIcon.jsx +32 -0
- package/src/icons/NoMusicNoteIcon.jsx +25 -0
- package/src/icons/NoPianoIcon.jsx +33 -0
- package/src/icons/NoSearchIcon.jsx +26 -0
- package/src/icons/NoSectionsIcon.jsx +25 -0
- package/src/icons/NoSnareIcon.jsx +26 -0
- package/src/icons/NoSoundEffectsIcon.jsx +23 -0
- package/src/icons/NoSoundIcon.jsx +23 -0
- package/src/icons/NoSoundtrackIcon.jsx +30 -0
- package/src/icons/NoSpliterIcon.jsx +23 -0
- package/src/icons/NoStringsIcon.jsx +23 -0
- package/src/icons/NoTomsIcon.jsx +23 -0
- package/src/icons/NoUkuleleIcon.jsx +26 -0
- package/src/icons/NoVideoIcon.jsx +26 -0
- package/src/icons/NoVocalsIcon.jsx +23 -0
- package/src/icons/NoVolume2Icon.jsx +26 -0
- package/src/icons/NoVolumeIcon.jsx +26 -0
- package/src/icons/NoWoodwindBrassIcon.jsx +23 -0
- package/src/icons/NotificationsIcon.jsx +26 -0
- package/src/icons/OffloadDeviceIcon.jsx +23 -0
- package/src/icons/PauseFilledIcon.jsx +27 -0
- package/src/icons/PauseIcon.jsx +22 -0
- package/src/icons/PianoIcon.jsx +25 -0
- package/src/icons/PinIcon.jsx +20 -0
- package/src/icons/Pip2Icon.jsx +18 -0
- package/src/icons/PipIcon.jsx +21 -0
- package/src/icons/PitchCorrectionIcon.jsx +25 -0
- package/src/icons/PitchIcon.jsx +21 -0
- package/src/icons/PlayAllIcon.jsx +25 -0
- package/src/icons/PlayBackSpeedIcon.jsx +37 -0
- package/src/icons/PlayCircleIcon.jsx +44 -0
- package/src/icons/PlayIcon.jsx +20 -0
- package/src/icons/PlayOnRepeatIcon.jsx +26 -0
- package/src/icons/PlusIcon.jsx +21 -0
- package/src/icons/PreferencesIcon.jsx +25 -0
- package/src/icons/PreviousIcon.jsx +25 -0
- package/src/icons/PriceTagIcon.jsx +26 -0
- package/src/icons/ProducerIcon.jsx +69 -0
- package/src/icons/PuzzlePiece2Icon.jsx +26 -0
- package/src/icons/PuzzlePieceIcon.jsx +26 -0
- package/src/icons/QuantizationIcon.jsx +25 -0
- package/src/icons/RadioIcon.jsx +36 -0
- package/src/icons/RadioOffIcon.jsx +26 -0
- package/src/icons/RecordIcon.jsx +15 -0
- package/src/icons/RecordingIcon.jsx +22 -0
- package/src/icons/RedoIcon.jsx +26 -0
- package/src/icons/RefreshBackIcon.jsx +32 -0
- package/src/icons/RefreshIcon.jsx +26 -0
- package/src/icons/RemoveFromDeviceIcon.jsx +23 -0
- package/src/icons/RemoveIcon.jsx +25 -0
- package/src/icons/ReorderIcon.jsx +26 -0
- package/src/icons/RepostIcon.jsx +26 -0
- package/src/icons/ReverbIcon.jsx +25 -0
- package/src/icons/RocketIcon.jsx +30 -0
- package/src/icons/SaveTimeIcon.jsx +26 -0
- package/src/icons/SearchIcon.jsx +32 -0
- package/src/icons/SectionsIcon.jsx +25 -0
- package/src/icons/Setlist2Icon.jsx +26 -0
- package/src/icons/SetlistIcon.jsx +26 -0
- package/src/icons/SettingsIcon.jsx +27 -0
- package/src/icons/SharpIcon.jsx +20 -0
- package/src/icons/ShiftIcon.jsx +20 -0
- package/src/icons/ShuffleIcon.jsx +26 -0
- package/src/icons/SidebarIslandIcon.jsx +26 -0
- package/src/icons/SidebarLeftIcon.jsx +25 -0
- package/src/icons/SidebarRightIcon.jsx +26 -0
- package/src/icons/SlidersIcon.jsx +26 -0
- package/src/icons/SnareIcon.jsx +18 -0
- package/src/icons/SongBarIcon.jsx +26 -0
- package/src/icons/SongDetailIcon.jsx +26 -0
- package/src/icons/Songkey2Icon.jsx +25 -0
- package/src/icons/SongwritingIcon.jsx +26 -0
- package/src/icons/SoundEffectsGradientIcon.jsx +39 -0
- package/src/icons/SoundEffectsIcon.jsx +26 -0
- package/src/icons/SoundbarIcon.jsx +26 -0
- package/src/icons/SoundtrackGradientIcon.jsx +44 -0
- package/src/icons/SoundtrackIcon.jsx +26 -0
- package/src/icons/SparkBarsIcon.jsx +25 -0
- package/src/icons/SparkleIcon.jsx +35 -0
- package/src/icons/SparklesGradientIcon.jsx +62 -0
- package/src/icons/SpatialAudioIcon.jsx +55 -0
- package/src/icons/SpeakerIcon.jsx +23 -0
- package/src/icons/SpeakerLoudIcon.jsx +34 -0
- package/src/icons/SpeedChangerIcon.jsx +30 -0
- package/src/icons/SpeedIcon.jsx +18 -0
- package/src/icons/SplitIcon.jsx +21 -0
- package/src/icons/SpliterGradientIcon.jsx +44 -0
- package/src/icons/SpliterIcon.jsx +26 -0
- package/src/icons/StarFilledIcon.jsx +23 -0
- package/src/icons/StarIcon.jsx +20 -0
- package/src/icons/Stop2Icon.jsx +15 -0
- package/src/icons/StringsIcon.jsx +36 -0
- package/src/icons/TargetIcon.jsx +33 -0
- package/src/icons/ThumbDownIcon.jsx +26 -0
- package/src/icons/ThumbUpIcon.jsx +26 -0
- package/src/icons/ThumbsIcon.jsx +26 -0
- package/src/icons/TomsIcon.jsx +21 -0
- package/src/icons/TransposeIcon.jsx +26 -0
- package/src/icons/TrashIcon.jsx +21 -0
- package/src/icons/TrimIcon.jsx +27 -0
- package/src/icons/Tuner2Icon.jsx +23 -0
- package/src/icons/TunerIcon.jsx +18 -0
- package/src/icons/TvIcon.jsx +20 -0
- package/src/icons/UkuleleIcon.jsx +49 -0
- package/src/icons/UndoIcon.jsx +26 -0
- package/src/icons/UploadIcon.jsx +29 -0
- package/src/icons/UserGroup3Icon.jsx +26 -0
- package/src/icons/UserGroupIcon.jsx +26 -0
- package/src/icons/UserIcon.jsx +27 -0
- package/src/icons/Video2Icon.jsx +31 -0
- package/src/icons/Video3Icon.jsx +24 -0
- package/src/icons/VideoFileIcon.jsx +30 -0
- package/src/icons/VideoFilesIcon.jsx +30 -0
- package/src/icons/VideoIcon.jsx +21 -0
- package/src/icons/VocalIcon.jsx +18 -0
- package/src/icons/VocalIsolationIcon.jsx +29 -0
- package/src/icons/VocalsBackgroundIcon.jsx +32 -0
- package/src/icons/VocalsIcon.jsx +26 -0
- package/src/icons/Volume0Icon.jsx +26 -0
- package/src/icons/Volume1Icon.jsx +26 -0
- package/src/icons/Volume2Icon.jsx +26 -0
- package/src/icons/VolumeBarIcon.jsx +25 -0
- package/src/icons/WaveIcon.jsx +21 -0
- package/src/icons/WaveformIcon.jsx +25 -0
- package/src/icons/WidgetIcon.jsx +35 -0
- package/src/icons/WindIcon.jsx +18 -0
- package/src/icons/WoodwindBrassIcon.jsx +23 -0
- package/src/icons/ZoomCloseIcon.jsx +38 -0
- package/src/icons/ZoomInIcon.jsx +32 -0
- package/src/icons.jsx +343 -0
- package/src/index.jsx +152 -0
- package/src/lib/menu/Menu.module.css +356 -0
- package/src/lib/menu/index.js +2 -0
- package/src/lib/menu/renderItem.jsx +190 -0
- package/src/primitives.jsx +71 -0
- package/src/styles.css +10 -0
- package/src/utils/avatarUtils.js +18 -0
- package/src/utils/constants.js +16 -0
- package/src/utils/use-isomorphic-layout-effect.js +6 -0
- package/src/utils/useEventListener.js +34 -0
- package/src/utils/useIsMobileViewport.js +32 -0
- package/src/utils/useMobileDrawer.js +41 -0
- package/src/utils/useSubmitWithFeedback.js +32 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { StemSeparationForm } from './StemSeparationForm'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Extensions/StemSeparationForm',
|
|
5
|
+
component: StemSeparationForm,
|
|
6
|
+
decorators: [
|
|
7
|
+
(Story) => (
|
|
8
|
+
<div style={{ width: '400px', height: '600px' }}>
|
|
9
|
+
<Story />
|
|
10
|
+
</div>
|
|
11
|
+
),
|
|
12
|
+
],
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
docs: {
|
|
17
|
+
description: {
|
|
18
|
+
component: `
|
|
19
|
+
|
|
20
|
+
A comprehensive form component for AI-powered stem separation with support for both free and premium stem types.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Basic Usage
|
|
25
|
+
|
|
26
|
+
\`\`\`jsx
|
|
27
|
+
import { StemSeparationForm } from '@moises.ai/design-system'
|
|
28
|
+
|
|
29
|
+
<StemSeparationForm
|
|
30
|
+
formState={formState}
|
|
31
|
+
onFormStateChange={setFormState}
|
|
32
|
+
paidStems={[
|
|
33
|
+
{ value: 'bass', isLocked: true },
|
|
34
|
+
{ value: 'drums', isLocked: true },
|
|
35
|
+
]}
|
|
36
|
+
freeStems={true}
|
|
37
|
+
i18n={i18n}
|
|
38
|
+
onSubmit={handleSubmit}
|
|
39
|
+
input={fileInputRef}
|
|
40
|
+
onSelectInput={handleFileSelect}
|
|
41
|
+
onRemoveInput={handleFileRemove}
|
|
42
|
+
isLoading={isLoading}
|
|
43
|
+
error={error}
|
|
44
|
+
showHiFiPaywall={handleShowHiFiPaywall}
|
|
45
|
+
onClearTrack={handleClearTrack}
|
|
46
|
+
showStemsPaywall={handleShowStemsPaywall}
|
|
47
|
+
showHiFiSwitch={true}
|
|
48
|
+
/>
|
|
49
|
+
\`\`\`
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Component API
|
|
55
|
+
|
|
56
|
+
### Props
|
|
57
|
+
|
|
58
|
+
| Prop | Description |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| \`formState\` | Current form state containing selected stems, track info, and other form data. |
|
|
61
|
+
| \`onFormStateChange\` | Callback to update form state. Can accept a new state object or updater function. |
|
|
62
|
+
| \`paidStems\` | Array of paid stem configurations with value and lock status. |
|
|
63
|
+
| \`freeStems\` | Whether to show free stem options (Basic Models section). |
|
|
64
|
+
| \`input\` | File input reference for track upload. |
|
|
65
|
+
| \`onSelectInput\` | Callback to handle file selection for stem separation. |
|
|
66
|
+
| \`onRemoveInput\` | Callback to handle removal of selected input file. |
|
|
67
|
+
| \`onSubmit\` | Callback fired when the "Separate Stems" button is clicked. |
|
|
68
|
+
| \`i18n\` | Internationalization object with _ method for translations. |
|
|
69
|
+
| \`isLoading\` | Whether the separation process is currently running. |
|
|
70
|
+
| \`error\` | Error message to display when separation fails. |
|
|
71
|
+
| \`showHiFiPaywall\` | Function to show paywall for Hi-Fi quality separation. |
|
|
72
|
+
| \`onClearTrack\` | Callback to clear the current track and reset form. |
|
|
73
|
+
| \`showStemsPaywall\` | Function to show paywall when accessing locked premium stems. |
|
|
74
|
+
| \`showHiFiSwitch\` | Whether to show the Hi-Fi switch. |
|
|
75
|
+
### Definitions
|
|
76
|
+
|
|
77
|
+
\`\`\`jsx
|
|
78
|
+
|
|
79
|
+
paidStem = {
|
|
80
|
+
value: string; // stem identifier (e.g., 'vocals', 'drums', 'bass')
|
|
81
|
+
isLocked: boolean; // whether this stem requires premium access
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
formState = {
|
|
85
|
+
selectedStems: string[] | string; // selected stem types for separation
|
|
86
|
+
trackId: string | null; // unique identifier for the track
|
|
87
|
+
trackName: string | null; // display name of the track
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Stem Types
|
|
95
|
+
|
|
96
|
+
### Free Stems (Basic Models)
|
|
97
|
+
- **Vocals & Instruments**: Basic separation into vocal and instrumental parts
|
|
98
|
+
- **Vocal, Bass, Drums & Others**: Four-stem separation for basic mixing
|
|
99
|
+
|
|
100
|
+
### Paid Stems (Music Stems)
|
|
101
|
+
- **Vocals**: Lead vocals, backing vocals, or general vocal separation
|
|
102
|
+
- **Instruments**: Bass, guitars (rhythm/solo/acoustic/electric), piano, keys, strings, wind
|
|
103
|
+
- **Drums**: Full drums or individual components (kick, snare, toms, hi-hat, cymbals)
|
|
104
|
+
- **Other**: Miscellaneous instruments not covered by other categories
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Notes
|
|
109
|
+
|
|
110
|
+
- The form automatically handles mutually exclusive stem selections (e.g., selecting "Vocals" deselects "Lead Vocals" and "Backing Vocals")
|
|
111
|
+
- Premium stems show lock icons and trigger paywall when accessed without subscription
|
|
112
|
+
- Hi-Fi toggle is available for enhanced separation quality (premium feature)
|
|
113
|
+
- Form includes file upload, progress tracking, and error handling
|
|
114
|
+
- Success and error messages are displayed in the footer area
|
|
115
|
+
`,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
argTypes: {
|
|
120
|
+
i18n: {
|
|
121
|
+
description: 'Internationalization object with _ method for translations',
|
|
122
|
+
control: false,
|
|
123
|
+
},
|
|
124
|
+
freeStems: {
|
|
125
|
+
description: 'Whether the free stems are enabled',
|
|
126
|
+
control: 'boolean',
|
|
127
|
+
},
|
|
128
|
+
paidStems: {
|
|
129
|
+
description: 'Array of paid stems with value and isLocked properties',
|
|
130
|
+
type: { name: 'array', value: 'object' },
|
|
131
|
+
control: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
value: { type: 'string' },
|
|
135
|
+
isLocked: { type: 'boolean' },
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
input: {
|
|
140
|
+
description: 'The file input of the form',
|
|
141
|
+
control: 'file',
|
|
142
|
+
},
|
|
143
|
+
onSelectInput: {
|
|
144
|
+
description: 'Function to handle the selection of the input',
|
|
145
|
+
control: 'function',
|
|
146
|
+
},
|
|
147
|
+
onRemoveInput: {
|
|
148
|
+
description: 'Function to handle the removal of the input',
|
|
149
|
+
control: 'function',
|
|
150
|
+
},
|
|
151
|
+
formState: {
|
|
152
|
+
description: 'The state of the form',
|
|
153
|
+
control: 'object',
|
|
154
|
+
},
|
|
155
|
+
onFormStateChange: {
|
|
156
|
+
description: 'Function to handle the change of the form state',
|
|
157
|
+
control: 'function',
|
|
158
|
+
},
|
|
159
|
+
isLoading: {
|
|
160
|
+
description: 'Whether the form is loading',
|
|
161
|
+
control: 'boolean',
|
|
162
|
+
},
|
|
163
|
+
error: {
|
|
164
|
+
description: 'The error of the form',
|
|
165
|
+
control: 'boolean',
|
|
166
|
+
},
|
|
167
|
+
showHiFiPaywall: {
|
|
168
|
+
description: 'Function to handle the show of the hi-fi paywall',
|
|
169
|
+
control: 'function',
|
|
170
|
+
},
|
|
171
|
+
onClearTrack: {
|
|
172
|
+
description: 'Function to handle the clear of the track',
|
|
173
|
+
control: 'function',
|
|
174
|
+
},
|
|
175
|
+
showStemsPaywall: {
|
|
176
|
+
description: 'Function to handle the show of the stems paywall',
|
|
177
|
+
control: 'function',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export const Default = {
|
|
183
|
+
args: {
|
|
184
|
+
i18n: { _: (text) => text },
|
|
185
|
+
freeStems: true,
|
|
186
|
+
paidStems: [
|
|
187
|
+
{
|
|
188
|
+
value: 'vocals',
|
|
189
|
+
isLocked: false,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: 'bass',
|
|
193
|
+
isLocked: false,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
value: 'drums',
|
|
197
|
+
isLocked: true,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
value: 'other',
|
|
201
|
+
isLocked: false,
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
input: null,
|
|
205
|
+
onSelectInput: () => {},
|
|
206
|
+
onRemoveInput: () => {},
|
|
207
|
+
formState: {
|
|
208
|
+
selectedStems: [],
|
|
209
|
+
trackId: null,
|
|
210
|
+
trackName: null,
|
|
211
|
+
},
|
|
212
|
+
onFormStateChange: () => {},
|
|
213
|
+
isLoading: false,
|
|
214
|
+
error: null,
|
|
215
|
+
showHiFiPaywall: () => {},
|
|
216
|
+
onClearTrack: () => {},
|
|
217
|
+
showStemsPaywall: () => {},
|
|
218
|
+
onSubmit: () => {},
|
|
219
|
+
},
|
|
220
|
+
render: (args) => <StemSeparationForm {...args} />,
|
|
221
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Flex } from '@radix-ui/themes'
|
|
2
|
+
import { Button } from '../../Button/Button'
|
|
3
|
+
import { Text } from '../../Text/Text'
|
|
4
|
+
import { SparkleIcon } from '../../../icons'
|
|
5
|
+
import { memo } from 'react'
|
|
6
|
+
|
|
7
|
+
import { formatDateTime } from '../utils/formatDateTime'
|
|
8
|
+
|
|
9
|
+
export const AutoDetect = memo(
|
|
10
|
+
({
|
|
11
|
+
handleAIDetect,
|
|
12
|
+
i18n = { _: (text) => text },
|
|
13
|
+
bpm,
|
|
14
|
+
lastTimeDetected,
|
|
15
|
+
loading,
|
|
16
|
+
timeSignatureTop,
|
|
17
|
+
timeSignatureBottom,
|
|
18
|
+
rootKey,
|
|
19
|
+
}) => {
|
|
20
|
+
if (loading) {
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<Flex
|
|
24
|
+
justify="center"
|
|
25
|
+
align="center"
|
|
26
|
+
height={lastTimeDetected ? '84px' : '116px'}
|
|
27
|
+
>
|
|
28
|
+
<Text
|
|
29
|
+
size="1"
|
|
30
|
+
weight="medium"
|
|
31
|
+
style={{ color: 'var(--neutral-alpha-9)' }}
|
|
32
|
+
>
|
|
33
|
+
{i18n._('Detecting...')}
|
|
34
|
+
</Text>
|
|
35
|
+
</Flex>
|
|
36
|
+
|
|
37
|
+
{lastTimeDetected && <Button loading variant="solid" color="cyan" />}
|
|
38
|
+
</>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Flex direction="column" gap="3" mt="3">
|
|
44
|
+
<Flex direction="column" gap="2">
|
|
45
|
+
<Flex width="100%" justify="between" align="center">
|
|
46
|
+
<Flex align="center" gap="2">
|
|
47
|
+
<Text
|
|
48
|
+
size="1"
|
|
49
|
+
weight="medium"
|
|
50
|
+
style={{ color: 'var(--neutral-alpha-11)' }}
|
|
51
|
+
>
|
|
52
|
+
{i18n._('Tempo')}
|
|
53
|
+
</Text>
|
|
54
|
+
</Flex>
|
|
55
|
+
<Text size="1" weight="regular">
|
|
56
|
+
{bpm} {i18n._('bpm')}
|
|
57
|
+
</Text>
|
|
58
|
+
</Flex>
|
|
59
|
+
<Flex width="100%" justify="between" align="center">
|
|
60
|
+
<Flex align="center" gap="2">
|
|
61
|
+
<Text
|
|
62
|
+
size="1"
|
|
63
|
+
weight="medium"
|
|
64
|
+
style={{ color: 'var(--neutral-alpha-11)' }}
|
|
65
|
+
>
|
|
66
|
+
{i18n._('Time Signature')}
|
|
67
|
+
</Text>
|
|
68
|
+
</Flex>
|
|
69
|
+
<Text size="1" weight="regular">
|
|
70
|
+
{timeSignatureTop} / {timeSignatureBottom}
|
|
71
|
+
</Text>
|
|
72
|
+
</Flex>
|
|
73
|
+
{rootKey && (
|
|
74
|
+
<Flex width="100%" justify="between" align="center">
|
|
75
|
+
<Flex align="center" gap="2">
|
|
76
|
+
<Text
|
|
77
|
+
size="1"
|
|
78
|
+
weight="medium"
|
|
79
|
+
style={{ color: 'var(--neutral-alpha-11)' }}
|
|
80
|
+
>
|
|
81
|
+
{i18n._('Root Key')}
|
|
82
|
+
</Text>
|
|
83
|
+
</Flex>
|
|
84
|
+
<Text size="1" weight="regular">
|
|
85
|
+
{rootKey}
|
|
86
|
+
</Text>
|
|
87
|
+
</Flex>
|
|
88
|
+
)}
|
|
89
|
+
</Flex>
|
|
90
|
+
|
|
91
|
+
<Flex width="80%" mx="auto" justify="center">
|
|
92
|
+
<Text
|
|
93
|
+
size="1"
|
|
94
|
+
weight="regular"
|
|
95
|
+
align="center"
|
|
96
|
+
style={{ color: 'var(--neutral-alpha-9)' }}
|
|
97
|
+
>
|
|
98
|
+
{i18n._('Last time detected:')} {formatDateTime(lastTimeDetected)}
|
|
99
|
+
</Text>
|
|
100
|
+
</Flex>
|
|
101
|
+
|
|
102
|
+
<Button
|
|
103
|
+
variant="solid"
|
|
104
|
+
color="cyan"
|
|
105
|
+
loading={loading}
|
|
106
|
+
onClick={handleAIDetect}
|
|
107
|
+
>
|
|
108
|
+
<SparkleIcon width={16} height={16} />
|
|
109
|
+
{i18n._('AI Re-detect')}
|
|
110
|
+
</Button>
|
|
111
|
+
</Flex>
|
|
112
|
+
)
|
|
113
|
+
},
|
|
114
|
+
)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Flex, Switch } from '@radix-ui/themes'
|
|
2
|
+
import { Text } from '../Text/Text'
|
|
3
|
+
import { AutoDetect } from './AutoDetect/AutoDetect'
|
|
4
|
+
import { TempoForm } from './TempoForm/TempoForm'
|
|
5
|
+
|
|
6
|
+
export const TempoControlsForm = ({
|
|
7
|
+
onAiAutoDetectToggle,
|
|
8
|
+
i18n = { _: (text) => text },
|
|
9
|
+
isAiAutoDetectActive,
|
|
10
|
+
bpm,
|
|
11
|
+
lastTimeDetected,
|
|
12
|
+
loading,
|
|
13
|
+
rootKey,
|
|
14
|
+
onAiAutoDetectClick,
|
|
15
|
+
onTempoChange,
|
|
16
|
+
onTimeSignatureChange,
|
|
17
|
+
onRootKeyChange,
|
|
18
|
+
timeSignatureTop,
|
|
19
|
+
timeSignatureBottom,
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<Flex width="200px" direction="column">
|
|
23
|
+
<Flex width="100%" justify="between">
|
|
24
|
+
<Text size="2"> {i18n._('AI Auto Detect')}</Text>
|
|
25
|
+
<Switch
|
|
26
|
+
size="2"
|
|
27
|
+
checked={isAiAutoDetectActive}
|
|
28
|
+
onCheckedChange={onAiAutoDetectToggle}
|
|
29
|
+
/>
|
|
30
|
+
</Flex>
|
|
31
|
+
|
|
32
|
+
{isAiAutoDetectActive ? (
|
|
33
|
+
<AutoDetect
|
|
34
|
+
handleAIDetect={onAiAutoDetectClick}
|
|
35
|
+
i18n={i18n}
|
|
36
|
+
bpm={bpm}
|
|
37
|
+
lastTimeDetected={lastTimeDetected}
|
|
38
|
+
loading={loading}
|
|
39
|
+
timeSignatureTop={timeSignatureTop}
|
|
40
|
+
timeSignatureBottom={timeSignatureBottom}
|
|
41
|
+
rootKey={rootKey}
|
|
42
|
+
/>
|
|
43
|
+
) : (
|
|
44
|
+
<TempoForm
|
|
45
|
+
onTempoChange={onTempoChange}
|
|
46
|
+
onTimeSignatureChange={onTimeSignatureChange}
|
|
47
|
+
bpm={bpm}
|
|
48
|
+
timeSignatureTop={timeSignatureTop}
|
|
49
|
+
timeSignatureBottom={timeSignatureBottom}
|
|
50
|
+
rootKey={rootKey}
|
|
51
|
+
onRootKeyChange={onRootKeyChange}
|
|
52
|
+
i18n={i18n}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
</Flex>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
TempoControlsForm.displayName = 'TempoControlsForm'
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { TempoControlsForm } from './TempoControlsForm'
|
|
2
|
+
import { fn } from '@storybook/test'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Features/TempoControlsForm',
|
|
6
|
+
component: TempoControlsForm,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `
|
|
12
|
+
## TempoControlsForm Component
|
|
13
|
+
|
|
14
|
+
The TempoControlsForm component provides a comprehensive interface for controlling tempo, time signature, and root key settings. It includes an AI Auto Detect feature that can automatically detect these values from audio.
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- **Manual Tempo Control**: Adjust BPM (30-200 range) with tempo marking display
|
|
19
|
+
- **Time Signature Control**: Select top and bottom values for time signature
|
|
20
|
+
- **Root Key Selection**: Choose from a list of musical keys (major and minor)
|
|
21
|
+
- **AI Auto Detect**: Toggle to enable AI-powered automatic detection of tempo, time signature, and root key
|
|
22
|
+
|
|
23
|
+
### Usage
|
|
24
|
+
|
|
25
|
+
\`\`\`jsx
|
|
26
|
+
import { TempoControlsForm } from '@moises.ai/design-system'
|
|
27
|
+
|
|
28
|
+
<TempoControlsForm
|
|
29
|
+
isAiAutoDetectActive={isAiAutoDetectActive}
|
|
30
|
+
onAiAutoDetectToggle={handleAiAutoDetectToggle}
|
|
31
|
+
bpm={bpm}
|
|
32
|
+
onTempoChange={handleTempoChange}
|
|
33
|
+
timeSignatureTop={timeSignatureTop}
|
|
34
|
+
timeSignatureBottom={timeSignatureBottom}
|
|
35
|
+
onTimeSignatureChange={handleTimeSignatureChange}
|
|
36
|
+
rootKey={rootKey}
|
|
37
|
+
onRootKeyChange={handleRootKeyChange}
|
|
38
|
+
onAiAutoDetectClick={handleAiAutoDetectClick}
|
|
39
|
+
loading={loading}
|
|
40
|
+
lastTimeDetected={lastTimeDetected}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
\`\`\`
|
|
44
|
+
`,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
tags: ['autodocs'],
|
|
49
|
+
argTypes: {
|
|
50
|
+
isAiAutoDetectActive: {
|
|
51
|
+
description: 'Whether AI Auto Detect mode is currently active',
|
|
52
|
+
control: { type: 'boolean' },
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: 'boolean' },
|
|
55
|
+
defaultValue: { summary: 'false' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
onAiAutoDetectToggle: {
|
|
59
|
+
description:
|
|
60
|
+
'Callback function called when the AI Auto Detect toggle is changed',
|
|
61
|
+
action: 'toggled',
|
|
62
|
+
table: {
|
|
63
|
+
type: { summary: '(checked: boolean) => void' },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
bpm: {
|
|
67
|
+
description: 'Beats per minute value (range: 30-200)',
|
|
68
|
+
control: { type: 'number', min: 30, max: 200 },
|
|
69
|
+
table: {
|
|
70
|
+
type: { summary: 'number' },
|
|
71
|
+
defaultValue: { summary: '120' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
onTempoChange: {
|
|
75
|
+
description: 'Callback function called when the BPM value changes',
|
|
76
|
+
action: 'tempo-changed',
|
|
77
|
+
table: {
|
|
78
|
+
type: { summary: '(bpm: number) => void' },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
timeSignatureTop: {
|
|
82
|
+
description: 'Top value of the time signature (numerator)',
|
|
83
|
+
control: { type: 'number' },
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: 'number' },
|
|
86
|
+
defaultValue: { summary: '4' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
timeSignatureBottom: {
|
|
90
|
+
description: 'Bottom value of the time signature (denominator)',
|
|
91
|
+
control: { type: 'select' },
|
|
92
|
+
options: [2, 4, 8, 16],
|
|
93
|
+
table: {
|
|
94
|
+
type: { summary: 'number' },
|
|
95
|
+
defaultValue: { summary: '4' },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
onTimeSignatureChange: {
|
|
99
|
+
description: 'Callback function called when the time signature changes',
|
|
100
|
+
action: 'time-signature-changed',
|
|
101
|
+
table: {
|
|
102
|
+
type: { summary: '({ top: number, bottom: number }) => void' },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
rootKey: {
|
|
106
|
+
description: 'The root key of the music (e.g., "C", "G", "Am", "Dm")',
|
|
107
|
+
control: { type: 'text' },
|
|
108
|
+
table: {
|
|
109
|
+
type: { summary: 'string' },
|
|
110
|
+
defaultValue: { summary: 'undefined' },
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
onRootKeyChange: {
|
|
114
|
+
description: 'Callback function called when the root key changes',
|
|
115
|
+
action: 'root-key-changed',
|
|
116
|
+
table: {
|
|
117
|
+
type: { summary: '(key: string) => void' },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
onAiAutoDetectClick: {
|
|
121
|
+
description:
|
|
122
|
+
'Callback function called when the AI Auto Detect button is clicked',
|
|
123
|
+
action: 'ai-detect-clicked',
|
|
124
|
+
table: {
|
|
125
|
+
type: { summary: '() => void' },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
loading: {
|
|
129
|
+
description: 'Whether the AI detection is currently in progress',
|
|
130
|
+
control: { type: 'boolean' },
|
|
131
|
+
table: {
|
|
132
|
+
type: { summary: 'boolean' },
|
|
133
|
+
defaultValue: { summary: 'false' },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
lastTimeDetected: {
|
|
137
|
+
description: 'Timestamp of the last successful AI detection',
|
|
138
|
+
control: false,
|
|
139
|
+
table: {
|
|
140
|
+
type: { summary: 'Date | null' },
|
|
141
|
+
defaultValue: { summary: 'null' },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
i18n: {
|
|
145
|
+
description: 'Internationalization object with translation function',
|
|
146
|
+
control: false,
|
|
147
|
+
table: {
|
|
148
|
+
type: { summary: '{ _: (text: string) => string }' },
|
|
149
|
+
defaultValue: { summary: '{ _: (text) => text }' },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const Default = {
|
|
156
|
+
args: {
|
|
157
|
+
isAiAutoDetectActive: false,
|
|
158
|
+
bpm: 120,
|
|
159
|
+
timeSignatureTop: 4,
|
|
160
|
+
timeSignatureBottom: 4,
|
|
161
|
+
rootKey: 'C',
|
|
162
|
+
loading: false,
|
|
163
|
+
lastTimeDetected: null,
|
|
164
|
+
onAiAutoDetectToggle: fn(),
|
|
165
|
+
onTempoChange: fn(),
|
|
166
|
+
onTimeSignatureChange: fn(),
|
|
167
|
+
onRootKeyChange: fn(),
|
|
168
|
+
onAiAutoDetectClick: fn(),
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export const WithAiAutoDetect = {
|
|
173
|
+
args: {
|
|
174
|
+
isAiAutoDetectActive: true,
|
|
175
|
+
bpm: 120,
|
|
176
|
+
timeSignatureTop: 4,
|
|
177
|
+
timeSignatureBottom: 4,
|
|
178
|
+
rootKey: 'G',
|
|
179
|
+
loading: false,
|
|
180
|
+
lastTimeDetected: new Date('2025-12-02T14:59:39.736Z'),
|
|
181
|
+
onAiAutoDetectToggle: fn(),
|
|
182
|
+
onTempoChange: fn(),
|
|
183
|
+
onTimeSignatureChange: fn(),
|
|
184
|
+
onRootKeyChange: fn(),
|
|
185
|
+
onAiAutoDetectClick: fn(),
|
|
186
|
+
},
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const LoadingState = {
|
|
190
|
+
args: {
|
|
191
|
+
isAiAutoDetectActive: true,
|
|
192
|
+
bpm: 120,
|
|
193
|
+
timeSignatureTop: 4,
|
|
194
|
+
timeSignatureBottom: 4,
|
|
195
|
+
rootKey: 'G',
|
|
196
|
+
loading: true,
|
|
197
|
+
lastTimeDetected: null,
|
|
198
|
+
onAiAutoDetectToggle: fn(),
|
|
199
|
+
onTempoChange: fn(),
|
|
200
|
+
onTimeSignatureChange: fn(),
|
|
201
|
+
onRootKeyChange: fn(),
|
|
202
|
+
onAiAutoDetectClick: fn(),
|
|
203
|
+
},
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const CustomTimeSignature = {
|
|
207
|
+
args: {
|
|
208
|
+
isAiAutoDetectActive: false,
|
|
209
|
+
bpm: 90,
|
|
210
|
+
timeSignatureTop: 14,
|
|
211
|
+
timeSignatureBottom: 16,
|
|
212
|
+
rootKey: 'G',
|
|
213
|
+
loading: false,
|
|
214
|
+
lastTimeDetected: null,
|
|
215
|
+
onAiAutoDetectToggle: fn(),
|
|
216
|
+
onTempoChange: fn(),
|
|
217
|
+
onTimeSignatureChange: fn(),
|
|
218
|
+
onRootKeyChange: fn(),
|
|
219
|
+
onAiAutoDetectClick: fn(),
|
|
220
|
+
},
|
|
221
|
+
parameters: {
|
|
222
|
+
docs: {
|
|
223
|
+
description: {
|
|
224
|
+
story: 'Example with a custom time signature (14/16) and root key G.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
}
|