Scripts/New-UDillustration.ps1

<#
.SYNOPSIS
    Sample control for UniversalDashboard.
.DESCRIPTION
    Sample control function for UniversalDashboard. This function must have an ID and return a hash table.
.PARAMETER Id
    An id for the component default value will be generated by new-guid.
.EXAMPLE
    PS C:\> New-UDillustration -Name "LovingStory" -HairColor "#2B303A" -PrimaryColor "#D64933" -AccentColor "#0C7C59" -SkinColor "#58A4B0"
    Shows the LovingStory illustration in the chosen colours
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    General notes
#>

function New-UDillustration {
    param(
        [Parameter()]
        [string]$Id = (New-Guid).ToString(),
        [Parameter()]

        [ValidateSet(
            'ABetterWorld',
            'AbsorbedIn',
            'Abstract',
            'AcceptTasks',
            'AccessAccount',
            'AccessDenied',
            'ActiveOptions',
            'ActivityTracker',
            'ADayOff',
            'AddColor',
            'AddContent',
            'AddDocument',
            'AddFile',
            'AddFriends',
            'AddPost',
            'AddTasks',
            'Adjustments',
            'AdvancedCustomization',
            'Adventure',
            'AfterTheRain',
            'Agree',
            'AllTheData',
            'AMomentToRelax',
            'AmongNature',
            'Analyze',
            'Animating',
            'Annotation',
            'AnonymousFeedback',
            'AppData',
            'Apps',
            'AppWireframe',
            'Arrived',
            'ArtMuseum',
            'ArtThinking',
            'AskMeAnything',
            'AssetSelection',
            'AtHome',
            'AttachedFile',
            'AtThePark',
            'AudioConversation',
            'AudioPlayer',
            'AugmentedReality',
            'BackHome',
            'Barbecue',
            'BearMarket',
            'BestPlace',
            'Biking',
            'BlackLivesMatter',
            'Blooming',
            'BodyText',
            'Booked',
            'BookReading',
            'Books',
            'Bookshelves',
            'BothSides',
            'Breakfast',
            'BreakingBarriers',
            'Browsing',
            'BrowsingOnline',
            'BuildWireframe',
            'BuildYourHome',
            'BusinessAnalytics',
            'BusinessChat',
            'BusinessShop',
            'ButtonStyle',
            'BuyHouse',
            'ByTheRoad',
            'Cabin',
            'Camera',
            'CardPostal',
            'CareerDevelopment',
            'Celebrating',
            'Certificate',
            'Certification',
            'CharacterDrawing',
            'ChasingLove',
            'ChatBot',
            'CheckBoxes',
            'ChoosingHouse',
            'ChoreList',
            'Circuit',
            'CircuitBoard',
            'CleanUp',
            'ClickHere',
            'CloseTab',
            'CloudDocs',
            'CloudFiles',
            'CodeInspection',
            'CodeReview',
            'CodeThinking',
            'CohortAnalysis',
            'Collab',
            'Collaborating',
            'Collaborators',
            'ColorPalette',
            'ComingHome',
            'CompleteDesign',
            'CompletedSteps',
            'CompleteTask',
            'Completing',
            'Composition',
            'ConceptualIdea',
            'ConferenceCall',
            'Confirm',
            'Connection',
            'ContentStructure',
            'ContentTeam',
            'Contract',
            'CookieLove',
            'Cooking',
            'Coolness',
            'CountingStars',
            'Creation',
            'CreativeExperiment',
            'CreativeProcess',
            'CryptoPortfolio',
            'CupOfTea',
            'CurrentLocation',
            'DarkMode',
            'DataExtraction',
            'DataProcessing',
            'DataReports',
            'DateNight',
            'DatePicker',
            'Decide',
            'Deconstructed',
            'DecorativeFriends',
            'DeliveryAddress',
            'DesignComponents',
            'DesignData',
            'DesignerMindset',
            'DesignFeedback',
            'DesignInspiration',
            'DesignNotes',
            'DesignObjectives',
            'DesignSprint',
            'DesignStats',
            'DesignTeam',
            'Destinations',
            'DetailedAnalysis',
            'DetailedExamination',
            'DetailedInformation',
            'DevelopApp',
            'DevFocus',
            'DevProductivity',
            'Diary',
            'Diet',
            'DifferentLove',
            'DigitalCurrency',
            'DoneChecking',
            'DonutLove',
            'DownloadFiles',
            'Drag',
            'DreamWorld',
            'DroneSurveillance',
            'DropdownMenu',
            'Duplicate',
            'EcoConscious',
            'Editable',
            'EditPhoto',
            'Educator',
            'EiffelTower',
            'EmptyCart',
            'EmptyStreet',
            'Energizer',
            'Enter',
            'EnvironmentalStudy',
            'Escaping',
            'EverydayLife',
            'EverywhereTogether',
            'ExcitingNews',
            'ExperienceDesign',
            'Explore',
            'Factory',
            'Fall',
            'Faq',
            'FarmGirl',
            'Feedback',
            'FeelingHappy',
            'FeelingOfJoy',
            'FeelingProud',
            'FemaleAvatar',
            'FileAnalysis',
            'FileManager',
            'FileSync',
            'FileSynchronization',
            'FillForms',
            'FillIn',
            'FitnessStats',
            'FittingPiece',
            'FittingPieces',
            'Flowers',
            'FolderFiles',
            'Font',
            'FormingIdeas',
            'Forms',
            'FreshNotification',
            'Friends',
            'FriendsOnline',
            'Functions',
            'FuturisticInterface',
            'GameWorld',
            'GatsbyJs',
            'GiftBox',
            'Goals',
            'GoingOffline',
            'Golf',
            'GoneShopping',
            'GoodTeam',
            'GoogleAnalytics',
            'GoogleDocs',
            'Gravitas',
            'GreekFreak',
            'GridDesign',
            'GroupHangout',
            'GroupVideo',
            'GrowthCurve',
            'HackerMind',
            'HackerMindset',
            'HappyAnnouncement',
            'HappyFeeling',
            'HappyMusic',
            'HappyNews',
            'HealthyLifestyle',
            'HealthyOptions',
            'Heatmap',
            'HeavyBox',
            'HelpfulSign',
            'HeyByBasecamp',
            'Hologram',
            'HomeCinema',
            'HomeScreen',
            'HomeSettings',
            'Hooked',
            'HotBeverage',
            'IceCream',
            'IconDesign',
            'Ideas',
            'IdeasFlow',
            'Ideation',
            'ImageFocus',
            'ImageViewer',
            'Imagination',
            'index',
            'IndoorBike',
            'InformationTab',
            'InNoTime',
            'Innovative',
            'InRealLife',
            'Insert',
            'InsertBlock',
            'Inspection',
            'Inspiration',
            'InstantAnalysis',
            'InstantInformation',
            'InstatAnalysis',
            'IntenseFeeling',
            'InteriorDesign',
            'Invest',
            'Investment',
            'InvestmentData',
            'Jewelry',
            'JobOffers',
            'JuniorSoccer',
            'JustBrowsing',
            'JustSaying',
            'KeyPoints',
            'LandingPage',
            'LandscapeMode',
            'LaunchDay',
            'Letter',
            'LightbulbMoment',
            'LightTheFire',
            'LikeDislike',
            'LinkShortener',
            'Listening',
            'LivePhoto',
            'LoadMore',
            'LocationReview',
            'LocationSearch',
            'LocationTracking',
            'Logic',
            'LogoDesign',
            'LostOnline',
            'LovingIt',
            'LovingStory',
            'MaleAvatar',
            'ManageChats',
            'MasterPlan',
            'Mathematics',
            'MedicalCare',
            'MedicalResearch',
            'MeetTheTeam',
            'Mello',
            'Mention',
            'MessagingApp',
            'MicDrop',
            'MobileApp',
            'MobileApplication',
            'MobileDevelopment',
            'MobileDevices',
            'MobileEncryption',
            'MobileFeed',
            'MobileImages',
            'MobileInbox',
            'MobileInterface',
            'MobileLogin',
            'MobileMessages',
            'MobilePay',
            'MobilePosts',
            'MobilePrototyping',
            'MobileUser',
            'MobileUx',
            'MobileWeb',
            'MobileWireframe',
            'ModernArt',
            'ModernDesign',
            'ModernProfessional',
            'Moments',
            'MonsterArtist',
            'Moonlight',
            'Mornings',
            'Moving',
            'MyApp',
            'MyCodeSnippets',
            'MyCurrentLocation',
            'MyDocuments',
            'MyFeed',
            'MyLocation',
            'MyNotifications',
            'MyPersonalFiles',
            'MyUniverse',
            'Nakamoto',
            'Nature',
            'NatureBenefits',
            'NatureFun',
            'NatureOnScreen',
            'Navigator',
            'Neighbors',
            'Netflix',
            'NewDecade',
            'NewEntries',
            'NewIdeas',
            'NewNotifications',
            'Newspaper',
            'NextJs',
            'NextOption',
            'NextTasks',
            'Noted',
            'Observations',
            'Omega',
            'OnlineAd',
            'OnlineArt',
            'OnlineArticle',
            'OnlineArticles',
            'OnlineBanking',
            'OnlineCalendar',
            'OnlineChat',
            'OnlineCollaboration',
            'OnlineConnection',
            'OnlineCv',
            'OnlineDating',
            'OnlineDiscussion',
            'OnlineEverywhere',
            'OnlineGallery',
            'OnlineGroceries',
            'OnlineInformation',
            'OnlineLearning',
            'OnlineMedia',
            'OnlineMessage',
            'OnlineMessaging',
            'OnlineOrganizer',
            'OnlineParty',
            'OnlinePayments',
            'OnlinePopularity',
            'OnlinePosts',
            'OnlineResume',
            'OnlineTest',
            'OnlineTransactions',
            'OnlineVideo',
            'OpenedTabs',
            'Opinion',
            'OptimizeImage',
            'Options',
            'OrderACar',
            'OrderDelivered',
            'OrderRide',
            'OrganizedContent',
            'OsUpgrade',
            'OurSolution',
            'OutdoorAdventure',
            'OutdoorParty',
            'Outdoors',
            'Party',
            'Partying',
            'PayOnline',
            'People',
            'Percentages',
            'PerformanceOverview',
            'PersonalDocuments',
            'PersonalEmail',
            'PersonalFile',
            'PersonalFinance',
            'PersonalGoals',
            'PersonalInfo',
            'PersonalInformation',
            'PersonalNotebook',
            'PersonalOpinions',
            'PersonalText',
            'PersonalTraining',
            'PersonalWebsite',
            'PetAdoption',
            'PhoneCall',
            'PhotoAlbum',
            'Photograph',
            'PhotoSession',
            'Picture',
            'PieGraph',
            'Pitching',
            'Placeholders',
            'Plans',
            'PlayingCards',
            'Playlist',
            'PlayTime',
            'PleasantSurprise',
            'Polaroid',
            'Popular',
            'PortfolioFeedback',
            'PortfolioUpdate',
            'PortfolioWebsite',
            'PositiveAttitude',
            'PredictiveAnalytics',
            'PreferencesPopup',
            'Preparation',
            'Pride',
            'Prioritise',
            'PrivacyProtection',
            'PrivateData',
            'Process',
            'ProductIteration',
            'ProductPhotography',
            'Professor',
            'ProfileDetails',
            'ProfileImage',
            'ProgressData',
            'ProgressIndicator',
            'ProgressiveApp',
            'ProgressOverview',
            'ProgressTracking',
            'ProjectCompleted',
            'ProjectFeedback',
            'ProudCoder',
            'ProudSelf',
            'PublicDiscussion',
            'PublishArticle',
            'PublishPost',
            'PullRequest',
            'PureLove',
            'PushNotifications',
            'QualityTime',
            'QuietTown',
            'Quiz',
            'Raining',
            'RandomThoughts',
            'Reading',
            'ReadingBook',
            'ReadingTime',
            'RealTimeCollaboration',
            'Receipt',
            'RedesignFeedback',
            'Referral',
            'RefreshingBeverage',
            'RegainFocus',
            'RelaunchDay',
            'Reminder',
            'Reminders',
            'RemoteDesignTeam',
            'Remotely',
            'RemoteMeeting',
            'RemoteTeam',
            'Researching',
            'Responsiveness',
            'Result',
            'Review',
            'ReviewedDocs',
            'RideTillICanNoMore',
            'RightPlaces',
            'RoadSign',
            'RunnerStart',
            'SantaVisit',
            'SaveToBookmarks',
            'ScreenTime',
            'Searching',
            'SeasonChange',
            'SecureLogin',
            'SegmentAnalysis',
            'SelectedOptions',
            'SelectHouse',
            'Selecting',
            'SelectingTeam',
            'Selection',
            'SelectOption',
            'SelectPlayer',
            'SendGift',
            'SentimentAnalysis',
            'ServerCluster',
            'ServerPush',
            'Services',
            'SetPreferences',
            'Settings',
            'Share',
            'SharedGoals',
            'SharedWorkspace',
            'ShareLink',
            'ShareOnline',
            'ShareOpinion',
            'SharingArticles',
            'ShoppingApp',
            'ShortBio',
            'SignalSearching',
            'SignIn',
            'SiteContent',
            'Skateboard',
            'Slider',
            'SmallTown',
            'SmartResize',
            'Smartwatch',
            'SnapTheMoment',
            'SnowGames',
            'SocialBio',
            'SocialDistancing',
            'SocialExpert',
            'SocialFriends',
            'SocialGirl',
            'SocialInfluencer',
            'SocialInteraction',
            'SocialNotifications',
            'SocialSharing',
            'SocialThinking',
            'SocialUser',
            'SolutionMindset',
            'SortingThoughts',
            'SourceCode',
            'SpecialEvent',
            'SpeedTest',
            'SpookySelf',
            'SpreadLove',
            'Spreadsheet',
            'StandOut',
            'StarryWindow',
            'StartBuilding',
            'StaticWebsite',
            'StatisticChart',
            'Steps',
            'StockPrices',
            'StrandedTraveler',
            'Subscriptions',
            'Suburbs',
            'SuccessFactors',
            'Summer',
            'Sunlight',
            'Surveillance',
            'Swipe',
            'SwipeOptions',
            'Switches',
            'SyncFiles',
            'TailwindCss',
            'TakeOutBoxes',
            'TakingSelfie',
            'Tasks',
            'TeamChat',
            'TeamCollaboration',
            'TeamGoals',
            'Terms',
            'TextFiles',
            'TheWorldIsMine',
            'ThingsToSay',
            'ThoughtProcess',
            'ThroughThePark',
            'ThroughTheWindow',
            'ThrowAway',
            'ToTheMoon',
            'Towing',
            'Town',
            'TransferMoney',
            'TravelMode',
            'TravelPlans',
            'TreeSwing',
            'Trends',
            'TrendyInterface',
            'TrueLove',
            'TutorialVideo',
            'TwoFactorAuthentication',
            'UnDraw1000',
            'UnexpectedFriends',
            'Unicorn',
            'Unlock',
            'Updated',
            'UpdatedResume',
            'Updates',
            'UpToDate',
            'UrbanDesign',
            'Verified',
            'VideoFiles',
            'VideoGameNight',
            'VideoInfluencer',
            'VideoStreaming',
            'VideoUpload',
            'ViralTweet',
            'VirtualAssistant',
            'VisionaryTechnology',
            'Visualization',
            'VoiceAssistant',
            'VoiceInterface',
            'Void',
            'Voting',
            'WaitingForYou',
            'WalkDreaming',
            'WalkingAround',
            'WalkingOutside',
            'WanderingMind',
            'WashHands',
            'WatchApplication',
            'WeatherNotification',
            'WebBrowsing',
            'WebDeveloper',
            'WebDevelopment',
            'WebSearch',
            'WebShopping',
            'WebsiteBuilder',
            'WelcomeCats',
            'Welcoming',
            'Wilderness',
            'WindyDay',
            'WineTasting',
            'WinterActivities',
            'WinterMagic',
            'WinterRoad',
            'WinterWalk',
            'WithLove',
            'WorkFromAnywhere',
            'WorkingOut',
            'WorkInProgress',
            'WorkTogether',
            'XmasSnowman',
            'Yoga',
            'ZoomIn'
        )]
        [string[]]$Name,
        [Parameter()]
        [string]$PrimaryColor,
        [Parameter()]
        [string]$AccentColor,
        [Parameter()]
        [string]$SkinColor,
        [Parameter()]
        [string]$HairColor
    )

    End {

        @{
            # The AssetID of the main JS File
            assetId      = $AssetId
            # Tell UD this is a plugin
            isPlugin     = $true
            # This ID must be the same as the one used in the JavaScript to register the control with UD
            type         = "UD-illustration"
            # An ID is mandatory
            id           = $Id

            # This is where you can put any other properties. They are passed to the React control's props
            # The keys are case-sensitive in JS.
            tag          = $Name
            primarycolor = $PrimaryColor
            accentcolor  = $AccentColor
            haircolor    = $HairColor
            skincolor    = $SkinColor
        }

    }
}