@moises.ai/design-system 3.4.4 → 3.4.6
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 +547 -545
- 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/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 +24 -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 +151 -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,280 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { MessageWithAction } from './MessageWithAction'
|
|
3
|
+
import { Flex, Text, Tooltip } from '@radix-ui/themes'
|
|
4
|
+
import { InfoIcon } from '../../icons'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/MessageWithAction',
|
|
8
|
+
component: MessageWithAction,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: `
|
|
14
|
+
## Basic Usage
|
|
15
|
+
|
|
16
|
+
### MessageWithAction
|
|
17
|
+
|
|
18
|
+
\`\`\`jsx
|
|
19
|
+
import { MessageWithAction } from '@moises.ai/design-system'
|
|
20
|
+
|
|
21
|
+
<MessageWithAction
|
|
22
|
+
type="error"
|
|
23
|
+
message="This is an error message"
|
|
24
|
+
ctaLabel="Add"
|
|
25
|
+
onClick={() => {}}
|
|
26
|
+
/>
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
## Component API
|
|
30
|
+
|
|
31
|
+
### MessageWithAction Props
|
|
32
|
+
|
|
33
|
+
\`\`\`tsx
|
|
34
|
+
{
|
|
35
|
+
type: 'info' | 'warn' | 'error'; // Type of message
|
|
36
|
+
message?: string; // Message to display
|
|
37
|
+
ctaLabel?: string; // Label of the CTA button (optional)
|
|
38
|
+
onClick?: () => void; // Function to handle the CTA click (optional)
|
|
39
|
+
className?: string; // Additional CSS classes (optional)
|
|
40
|
+
showBackground?: boolean; // Whether to show background (default: true)
|
|
41
|
+
showIcon?: boolean; // Whether to show icon (default: true)
|
|
42
|
+
children?: React.ReactNode; // Custom content (optional)
|
|
43
|
+
}
|
|
44
|
+
\`\`\`
|
|
45
|
+
|
|
46
|
+
## Variations
|
|
47
|
+
|
|
48
|
+
### Message Types
|
|
49
|
+
|
|
50
|
+
The component supports three types:
|
|
51
|
+
|
|
52
|
+
\`\`\`jsx
|
|
53
|
+
// Info message
|
|
54
|
+
<MessageWithAction type="info" message="This is an info message" />
|
|
55
|
+
|
|
56
|
+
// Warning message
|
|
57
|
+
<MessageWithAction type="warn" message="This is a warning message" />
|
|
58
|
+
|
|
59
|
+
// Error message
|
|
60
|
+
<MessageWithAction type="error" message="This is an error message" />
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
### With Call-to-Action
|
|
64
|
+
|
|
65
|
+
Add a button with custom action:
|
|
66
|
+
|
|
67
|
+
\`\`\`jsx
|
|
68
|
+
<MessageWithAction
|
|
69
|
+
type="error"
|
|
70
|
+
message="This is an error message"
|
|
71
|
+
ctaLabel="Add"
|
|
72
|
+
onClick={() => console.log('CTA clicked')}
|
|
73
|
+
/>
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
### With Custom Content
|
|
77
|
+
|
|
78
|
+
Use children prop for custom content:
|
|
79
|
+
|
|
80
|
+
\`\`\`jsx
|
|
81
|
+
<MessageWithAction type="info" showIcon={false}>
|
|
82
|
+
<Text>Custom content with formatting</Text>
|
|
83
|
+
</MessageWithAction>
|
|
84
|
+
\`\`\`
|
|
85
|
+
|
|
86
|
+
### Without Background
|
|
87
|
+
|
|
88
|
+
Remove the background styling:
|
|
89
|
+
|
|
90
|
+
\`\`\`jsx
|
|
91
|
+
<MessageWithAction
|
|
92
|
+
type="info"
|
|
93
|
+
message="Message without background"
|
|
94
|
+
showBackground={false}
|
|
95
|
+
/>
|
|
96
|
+
\`\`\`
|
|
97
|
+
|
|
98
|
+
### Without Icon
|
|
99
|
+
|
|
100
|
+
Hide the info icon:
|
|
101
|
+
|
|
102
|
+
\`\`\`jsx
|
|
103
|
+
<MessageWithAction
|
|
104
|
+
type="warn"
|
|
105
|
+
message="Warning without icon"
|
|
106
|
+
showIcon={false}
|
|
107
|
+
/>
|
|
108
|
+
\`\`\`
|
|
109
|
+
`,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
canvas: {
|
|
113
|
+
width: 400,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
tags: ['autodocs'],
|
|
117
|
+
argTypes: {
|
|
118
|
+
type: {
|
|
119
|
+
control: 'select',
|
|
120
|
+
options: ['info', 'warn', 'error'],
|
|
121
|
+
description: 'Type of message',
|
|
122
|
+
table: {
|
|
123
|
+
type: { summary: 'string' },
|
|
124
|
+
defaultValue: { summary: 'info' },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
message: {
|
|
128
|
+
control: 'text',
|
|
129
|
+
description: 'Message text to display',
|
|
130
|
+
table: {
|
|
131
|
+
type: { summary: 'string' },
|
|
132
|
+
defaultValue: { summary: 'undefined' },
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
ctaLabel: {
|
|
136
|
+
control: 'text',
|
|
137
|
+
description: 'Label for the call-to-action button',
|
|
138
|
+
table: {
|
|
139
|
+
type: { summary: 'string' },
|
|
140
|
+
defaultValue: { summary: 'undefined' },
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
onClick: {
|
|
144
|
+
control: false,
|
|
145
|
+
description: 'Click handler for the CTA button',
|
|
146
|
+
table: {
|
|
147
|
+
type: { summary: '() => void' },
|
|
148
|
+
defaultValue: { summary: 'undefined' },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
className: {
|
|
152
|
+
control: 'text',
|
|
153
|
+
description: 'Additional CSS classes',
|
|
154
|
+
table: {
|
|
155
|
+
type: { summary: 'string' },
|
|
156
|
+
defaultValue: { summary: 'undefined' },
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
showBackground: {
|
|
160
|
+
control: 'boolean',
|
|
161
|
+
description: 'Whether to show background styling',
|
|
162
|
+
table: {
|
|
163
|
+
type: { summary: 'boolean' },
|
|
164
|
+
defaultValue: { summary: 'true' },
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
showIcon: {
|
|
168
|
+
control: 'boolean',
|
|
169
|
+
description: 'Whether to show the info icon',
|
|
170
|
+
table: {
|
|
171
|
+
type: { summary: 'boolean' },
|
|
172
|
+
defaultValue: { summary: 'true' },
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
children: {
|
|
176
|
+
control: false,
|
|
177
|
+
description: 'Custom content to display',
|
|
178
|
+
table: {
|
|
179
|
+
type: { summary: 'React.ReactNode' },
|
|
180
|
+
defaultValue: { summary: 'undefined' },
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
decorators: [
|
|
185
|
+
(Story) => (
|
|
186
|
+
<div style={{ width: '400px' }}>
|
|
187
|
+
<Story />
|
|
188
|
+
</div>
|
|
189
|
+
),
|
|
190
|
+
],
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Basic Stories
|
|
194
|
+
export const Default = {
|
|
195
|
+
args: {
|
|
196
|
+
type: 'info',
|
|
197
|
+
message: 'This is a default info message',
|
|
198
|
+
},
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const Error = {
|
|
202
|
+
args: {
|
|
203
|
+
type: 'error',
|
|
204
|
+
message: 'This is an error message',
|
|
205
|
+
ctaLabel: 'Add',
|
|
206
|
+
onClick: () => alert('Error CTA clicked'),
|
|
207
|
+
},
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export const Warning = {
|
|
211
|
+
args: {
|
|
212
|
+
type: 'warn',
|
|
213
|
+
message: 'This is a warning message',
|
|
214
|
+
ctaLabel: 'Fix',
|
|
215
|
+
onClick: () => alert('Warning CTA clicked'),
|
|
216
|
+
},
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export const Info = {
|
|
220
|
+
args: {
|
|
221
|
+
type: 'info',
|
|
222
|
+
message: 'This is an info message',
|
|
223
|
+
ctaLabel: 'Learn More',
|
|
224
|
+
onClick: () => alert('Info CTA clicked'),
|
|
225
|
+
},
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Advanced Stories
|
|
229
|
+
export const WithoutBackground = {
|
|
230
|
+
args: {
|
|
231
|
+
type: 'info',
|
|
232
|
+
message: 'This message has no background styling',
|
|
233
|
+
showBackground: false,
|
|
234
|
+
},
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export const WithoutIcon = {
|
|
238
|
+
args: {
|
|
239
|
+
type: 'warn',
|
|
240
|
+
message: 'This message has no icon',
|
|
241
|
+
showIcon: false,
|
|
242
|
+
},
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const WithCustomContent = {
|
|
246
|
+
args: {
|
|
247
|
+
type: 'info',
|
|
248
|
+
showIcon: false,
|
|
249
|
+
children: (
|
|
250
|
+
<Text size="1">
|
|
251
|
+
This is custom content with <strong>formatting</strong>
|
|
252
|
+
</Text>
|
|
253
|
+
),
|
|
254
|
+
},
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export const ComplexContent = {
|
|
258
|
+
args: {
|
|
259
|
+
type: 'info',
|
|
260
|
+
showIcon: false,
|
|
261
|
+
showBackground: false,
|
|
262
|
+
children: (
|
|
263
|
+
<Flex align="center" gap="1">
|
|
264
|
+
<Text size="1">Using</Text>
|
|
265
|
+
<Flex align="center" gap="1">
|
|
266
|
+
<Text size="1" truncate style={{ maxWidth: '100px' }}>
|
|
267
|
+
My new song which contains a long name
|
|
268
|
+
</Text>
|
|
269
|
+
<Text size="1">(0:30 - 1:23)</Text>
|
|
270
|
+
</Flex>
|
|
271
|
+
<Text size="1">to generate</Text>
|
|
272
|
+
<Tooltip content="Additional information about this item">
|
|
273
|
+
<InfoIcon width={16} height={16} />
|
|
274
|
+
</Tooltip>
|
|
275
|
+
</Flex>
|
|
276
|
+
),
|
|
277
|
+
ctaLabel: 'Add',
|
|
278
|
+
onClick: () => alert('Complex CTA clicked'),
|
|
279
|
+
},
|
|
280
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Flex,
|
|
4
|
+
HorizontalVolume,
|
|
5
|
+
SegmentedControl,
|
|
6
|
+
Separator,
|
|
7
|
+
Text,
|
|
8
|
+
} from '../../index'
|
|
9
|
+
|
|
10
|
+
export const MetronomeForm = ({
|
|
11
|
+
i18n = { _: (text) => text },
|
|
12
|
+
subDivision = 1,
|
|
13
|
+
volume,
|
|
14
|
+
countIn,
|
|
15
|
+
onSubDivisionChange,
|
|
16
|
+
onVolumeChange,
|
|
17
|
+
onCountInChange,
|
|
18
|
+
onReset,
|
|
19
|
+
}) => {
|
|
20
|
+
return (
|
|
21
|
+
<Flex width="200px" direction="column">
|
|
22
|
+
<Flex gap="4" direction="column">
|
|
23
|
+
<Flex gap="2" direction="column">
|
|
24
|
+
<Text size="2" weight="medium">
|
|
25
|
+
{i18n._('Sub-division')}
|
|
26
|
+
</Text>
|
|
27
|
+
<SegmentedControl
|
|
28
|
+
items={[
|
|
29
|
+
{ value: '0', label: '0.5x' },
|
|
30
|
+
{ value: '1', label: '1x' },
|
|
31
|
+
{ value: '2', label: '2x' },
|
|
32
|
+
]}
|
|
33
|
+
selectedType={String(subDivision)}
|
|
34
|
+
handleTypeChange={onSubDivisionChange}
|
|
35
|
+
/>
|
|
36
|
+
</Flex>
|
|
37
|
+
|
|
38
|
+
<Flex gap="2" direction="column">
|
|
39
|
+
<Text size="2" weight="medium">
|
|
40
|
+
{i18n._('Metronome volume')}
|
|
41
|
+
</Text>
|
|
42
|
+
|
|
43
|
+
<HorizontalVolume onChangeValue={onVolumeChange} volume={volume} />
|
|
44
|
+
</Flex>
|
|
45
|
+
|
|
46
|
+
<Flex gap="1" direction="column">
|
|
47
|
+
<Text size="2" weight="medium">
|
|
48
|
+
Count-in
|
|
49
|
+
</Text>
|
|
50
|
+
<SegmentedControl
|
|
51
|
+
items={[
|
|
52
|
+
{ value: '0', label: i18n._('Off') },
|
|
53
|
+
{ value: '1', label: i18n._('1 Bar') },
|
|
54
|
+
{ value: '2', label: i18n._('2 Bars') },
|
|
55
|
+
]}
|
|
56
|
+
handleTypeChange={onCountInChange}
|
|
57
|
+
selectedType={countIn.count.toString()}
|
|
58
|
+
/>
|
|
59
|
+
</Flex>
|
|
60
|
+
</Flex>
|
|
61
|
+
|
|
62
|
+
<Separator mt="4" style={{ width: '100%' }} />
|
|
63
|
+
|
|
64
|
+
<Button
|
|
65
|
+
variant="ghost"
|
|
66
|
+
color="gray"
|
|
67
|
+
onClick={onReset}
|
|
68
|
+
style={{ width: '100%' }}
|
|
69
|
+
>
|
|
70
|
+
{i18n._('Reset')}
|
|
71
|
+
</Button>
|
|
72
|
+
</Flex>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { MetronomeForm } from './MetronomeForm'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Features/MetronomeForm',
|
|
6
|
+
component: MetronomeForm,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `
|
|
12
|
+
## Metronome Component
|
|
13
|
+
|
|
14
|
+
The Metronome component provides a visual metronome that can be used to control the tempo of a track. It includes a volume control and a count-in feature.
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- **Volume Control**: Adjust the volume of the metronome
|
|
19
|
+
- **Count-in**: Select the number of bars to count in before starting the metronome
|
|
20
|
+
- **Sub-division**: Select the sub-division of the metronome
|
|
21
|
+
|
|
22
|
+
### Usage
|
|
23
|
+
|
|
24
|
+
\`\`\`jsx
|
|
25
|
+
import { MetronomeForm } from '@moises.ai/design-system'
|
|
26
|
+
|
|
27
|
+
<MetronomeForm
|
|
28
|
+
i18n={i18n}
|
|
29
|
+
countIn={countIn}
|
|
30
|
+
onCountInChange={onCountInChange}
|
|
31
|
+
onSubDivisionChange={onSubDivisionChange}
|
|
32
|
+
onVolumeChange={onVolumeChange}
|
|
33
|
+
onReset={onReset}
|
|
34
|
+
/>
|
|
35
|
+
\`\`\`
|
|
36
|
+
`,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
tags: ['autodocs'],
|
|
41
|
+
argTypes: {
|
|
42
|
+
metronomeTrack: {
|
|
43
|
+
control: 'object',
|
|
44
|
+
description: 'The metronome track object',
|
|
45
|
+
},
|
|
46
|
+
subDivision: {
|
|
47
|
+
control: 'number',
|
|
48
|
+
description: 'The sub-division of the metronome',
|
|
49
|
+
},
|
|
50
|
+
volume: {
|
|
51
|
+
control: 'number',
|
|
52
|
+
description: 'The volume of the metronome',
|
|
53
|
+
},
|
|
54
|
+
countIn: {
|
|
55
|
+
control: 'object',
|
|
56
|
+
description: 'The count-in object',
|
|
57
|
+
},
|
|
58
|
+
onSubDivisionChange: {
|
|
59
|
+
control: 'function',
|
|
60
|
+
description: 'The function to handle sub-division change',
|
|
61
|
+
},
|
|
62
|
+
onVolumeChange: {
|
|
63
|
+
control: 'function',
|
|
64
|
+
description: 'The function to handle volume change',
|
|
65
|
+
},
|
|
66
|
+
onCountInChange: {
|
|
67
|
+
control: 'function',
|
|
68
|
+
description: 'The function to handle count-in change',
|
|
69
|
+
},
|
|
70
|
+
onReset: {
|
|
71
|
+
control: 'function',
|
|
72
|
+
description: 'The function to handle reset',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const Default = {
|
|
78
|
+
render: () => {
|
|
79
|
+
const [countIn, setCountInValue] = useState({
|
|
80
|
+
on: true,
|
|
81
|
+
count: '0',
|
|
82
|
+
})
|
|
83
|
+
const [subDivision, setSubDivision] = useState(1)
|
|
84
|
+
const [volume, setVolume] = useState(1)
|
|
85
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
86
|
+
const i18n = {
|
|
87
|
+
_: (text) => text,
|
|
88
|
+
}
|
|
89
|
+
const metronomeTrack = {
|
|
90
|
+
id: 'metronome-1764773011079',
|
|
91
|
+
group: 'default',
|
|
92
|
+
solo: false,
|
|
93
|
+
muted: false,
|
|
94
|
+
volume: 1,
|
|
95
|
+
duration: 1200,
|
|
96
|
+
peaks: [[]],
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const onCountInChange = (value) => {
|
|
100
|
+
setCountInValue((prev) => ({
|
|
101
|
+
...prev,
|
|
102
|
+
count: value,
|
|
103
|
+
}))
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const onTriggerClick = () => {
|
|
107
|
+
setIsOpen((prev) => !prev)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const onReset = () => {
|
|
111
|
+
onCountInChange('0')
|
|
112
|
+
setSubDivision(1)
|
|
113
|
+
setVolume(1)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const onSubDivisionChange = (value) => {
|
|
117
|
+
setSubDivision(value)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const onVolumeChange = (value) => {
|
|
121
|
+
setVolume(value)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<MetronomeForm
|
|
126
|
+
i18n={i18n}
|
|
127
|
+
subDivision={subDivision}
|
|
128
|
+
volume={volume}
|
|
129
|
+
countIn={countIn}
|
|
130
|
+
onCountInChange={onCountInChange}
|
|
131
|
+
onSubDivisionChange={onSubDivisionChange}
|
|
132
|
+
onVolumeChange={onVolumeChange}
|
|
133
|
+
onReset={onReset}
|
|
134
|
+
/>
|
|
135
|
+
)
|
|
136
|
+
},
|
|
137
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React, { useState, useCallback } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
Text,
|
|
6
|
+
Select as SelectRadix,
|
|
7
|
+
Tooltip,
|
|
8
|
+
} from '@radix-ui/themes'
|
|
9
|
+
import { Checkbox } from '../Checkbox/Checkbox'
|
|
10
|
+
import { InfoIcon } from '../../icons'
|
|
11
|
+
import styles from './MultiSelect.module.css'
|
|
12
|
+
import classNames from 'classnames'
|
|
13
|
+
|
|
14
|
+
export const MultiSelect = ({
|
|
15
|
+
className,
|
|
16
|
+
title,
|
|
17
|
+
onChange,
|
|
18
|
+
items,
|
|
19
|
+
info,
|
|
20
|
+
size = '2',
|
|
21
|
+
variant = 'soft',
|
|
22
|
+
disabled = false,
|
|
23
|
+
readOnly = false,
|
|
24
|
+
maxHeight = 'auto',
|
|
25
|
+
maxWidth = '100%',
|
|
26
|
+
placeholder = 'Select options...',
|
|
27
|
+
...props
|
|
28
|
+
}) => {
|
|
29
|
+
const handleItemClick = (value) => {
|
|
30
|
+
if (onChange) {
|
|
31
|
+
onChange(value)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Box width="100%">
|
|
37
|
+
{title && (
|
|
38
|
+
<Flex mb="2" align="center" gap="2">
|
|
39
|
+
<Text size="1" weight="bold">
|
|
40
|
+
{title}
|
|
41
|
+
</Text>
|
|
42
|
+
{info && (
|
|
43
|
+
<Tooltip content={info}>
|
|
44
|
+
<InfoIcon />
|
|
45
|
+
</Tooltip>
|
|
46
|
+
)}
|
|
47
|
+
</Flex>
|
|
48
|
+
)}
|
|
49
|
+
<Flex direction="column" maxWidth={maxWidth}>
|
|
50
|
+
<SelectRadix.Root
|
|
51
|
+
className={classNames(className)}
|
|
52
|
+
disabled={disabled || readOnly}
|
|
53
|
+
{...props}
|
|
54
|
+
>
|
|
55
|
+
<SelectRadix.Trigger
|
|
56
|
+
variant={variant}
|
|
57
|
+
color="gray"
|
|
58
|
+
size={size}
|
|
59
|
+
placeholder={placeholder}
|
|
60
|
+
className={classNames(styles.selectTrigger, {
|
|
61
|
+
[styles.ghost]: variant === 'ghost',
|
|
62
|
+
[styles.soft]: variant === 'soft',
|
|
63
|
+
})}
|
|
64
|
+
>
|
|
65
|
+
{placeholder}
|
|
66
|
+
</SelectRadix.Trigger>
|
|
67
|
+
<SelectRadix.Content position="popper" style={{ height: maxHeight }}>
|
|
68
|
+
<SelectRadix.Group>
|
|
69
|
+
{items.map((item) => (
|
|
70
|
+
<Flex
|
|
71
|
+
key={item.value}
|
|
72
|
+
align="center"
|
|
73
|
+
gap="2"
|
|
74
|
+
p="2"
|
|
75
|
+
className={classNames(styles.selectItem, {
|
|
76
|
+
[styles.hideIndicator]: true,
|
|
77
|
+
[styles.size1]: size === '1',
|
|
78
|
+
[styles.size2]: size === '2',
|
|
79
|
+
})}
|
|
80
|
+
onClick={() => handleItemClick(item.value)}
|
|
81
|
+
style={{
|
|
82
|
+
cursor: disabled || readOnly ? 'not-allowed' : 'pointer',
|
|
83
|
+
width: '100%',
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<Checkbox
|
|
87
|
+
disabled={disabled || readOnly}
|
|
88
|
+
checked={item.isActived || false}
|
|
89
|
+
size={size}
|
|
90
|
+
/>
|
|
91
|
+
<Flex align="center" gap="1" style={{ flex: 1 }}>
|
|
92
|
+
<Text size={size} style={{ color: 'var(--neutral-12)' }}>
|
|
93
|
+
{item.label}
|
|
94
|
+
</Text>
|
|
95
|
+
{item.aiDetected && (
|
|
96
|
+
<Text
|
|
97
|
+
size="1"
|
|
98
|
+
style={{
|
|
99
|
+
color: 'var(--aqua-dark-alpha-9)',
|
|
100
|
+
verticalAlign: 'top',
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
✦
|
|
104
|
+
</Text>
|
|
105
|
+
)}
|
|
106
|
+
{item.extra && (
|
|
107
|
+
<Text
|
|
108
|
+
size={size}
|
|
109
|
+
className={styles.extra}
|
|
110
|
+
style={{
|
|
111
|
+
color: 'var(--neutral-alpha-9)',
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
{' '}
|
|
115
|
+
{item.extra}
|
|
116
|
+
</Text>
|
|
117
|
+
)}
|
|
118
|
+
</Flex>
|
|
119
|
+
</Flex>
|
|
120
|
+
))}
|
|
121
|
+
</SelectRadix.Group>
|
|
122
|
+
</SelectRadix.Content>
|
|
123
|
+
</SelectRadix.Root>
|
|
124
|
+
</Flex>
|
|
125
|
+
</Box>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
MultiSelect.displayName = 'MultiSelect'
|