| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["VueColor"] = factory();
- else
- root["VueColor"] = factory();
- })(typeof self !== 'undefined' ? self : this, function() {
- return /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId]) {
- /******/ return installedModules[moduleId].exports;
- /******/ }
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ i: moduleId,
- /******/ l: false,
- /******/ exports: {}
- /******/ };
- /******/
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/
- /******/ // Flag the module as loaded
- /******/ module.l = true;
- /******/
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/
- /******/
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, {
- /******/ configurable: false,
- /******/ enumerable: true,
- /******/ get: getter
- /******/ });
- /******/ }
- /******/ };
- /******/
- /******/ // getDefaultExport function for compatibility with non-harmony modules
- /******/ __webpack_require__.n = function(module) {
- /******/ var getter = module && module.__esModule ?
- /******/ function getDefault() { return module['default']; } :
- /******/ function getModuleExports() { return module; };
- /******/ __webpack_require__.d(getter, 'a', getter);
- /******/ return getter;
- /******/ };
- /******/
- /******/ // Object.prototype.hasOwnProperty.call
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- /******/
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 22);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function(useSourceMap) {
- var list = [];
- // return the list of modules as css string
- list.toString = function toString() {
- return this.map(function (item) {
- var content = cssWithMappingToString(item, useSourceMap);
- if(item[2]) {
- return "@media " + item[2] + "{" + content + "}";
- } else {
- return content;
- }
- }).join("");
- };
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- function cssWithMappingToString(item, useSourceMap) {
- var content = item[1] || '';
- var cssMapping = item[3];
- if (!cssMapping) {
- return content;
- }
- if (useSourceMap && typeof btoa === 'function') {
- var sourceMapping = toComment(cssMapping);
- var sourceURLs = cssMapping.sources.map(function (source) {
- return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
- });
- return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
- }
- return [content].join('\n');
- }
- // Adapted from convert-source-map (MIT)
- function toComment(sourceMap) {
- // eslint-disable-next-line no-undef
- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
- return '/*# ' + data + ' */';
- }
- /***/ }),
- /* 1 */
- /***/ (function(module, exports, __webpack_require__) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- Modified by Evan You @yyx990803
- */
- var hasDocument = typeof document !== 'undefined'
- if (typeof DEBUG !== 'undefined' && DEBUG) {
- if (!hasDocument) {
- throw new Error(
- 'vue-style-loader cannot be used in a non-browser environment. ' +
- "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
- ) }
- }
- var listToStyles = __webpack_require__(26)
- /*
- type StyleObject = {
- id: number;
- parts: Array<StyleObjectPart>
- }
- type StyleObjectPart = {
- css: string;
- media: string;
- sourceMap: ?string
- }
- */
- var stylesInDom = {/*
- [id: number]: {
- id: number,
- refs: number,
- parts: Array<(obj?: StyleObjectPart) => void>
- }
- */}
- var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
- var singletonElement = null
- var singletonCounter = 0
- var isProduction = false
- var noop = function () {}
- var options = null
- var ssrIdKey = 'data-vue-ssr-id'
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
- module.exports = function (parentId, list, _isProduction, _options) {
- isProduction = _isProduction
- options = _options || {}
- var styles = listToStyles(parentId, list)
- addStylesToDom(styles)
- return function update (newList) {
- var mayRemove = []
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i]
- var domStyle = stylesInDom[item.id]
- domStyle.refs--
- mayRemove.push(domStyle)
- }
- if (newList) {
- styles = listToStyles(parentId, newList)
- addStylesToDom(styles)
- } else {
- styles = []
- }
- for (var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i]
- if (domStyle.refs === 0) {
- for (var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j]()
- }
- delete stylesInDom[domStyle.id]
- }
- }
- }
- }
- function addStylesToDom (styles /* Array<StyleObject> */) {
- for (var i = 0; i < styles.length; i++) {
- var item = styles[i]
- var domStyle = stylesInDom[item.id]
- if (domStyle) {
- domStyle.refs++
- for (var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j])
- }
- for (; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j]))
- }
- if (domStyle.parts.length > item.parts.length) {
- domStyle.parts.length = item.parts.length
- }
- } else {
- var parts = []
- for (var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j]))
- }
- stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
- }
- }
- }
- function createStyleElement () {
- var styleElement = document.createElement('style')
- styleElement.type = 'text/css'
- head.appendChild(styleElement)
- return styleElement
- }
- function addStyle (obj /* StyleObjectPart */) {
- var update, remove
- var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
- if (styleElement) {
- if (isProduction) {
- // has SSR styles and in production mode.
- // simply do nothing.
- return noop
- } else {
- // has SSR styles but in dev mode.
- // for some reason Chrome can't handle source map in server-rendered
- // style tags - source maps in <style> only works if the style tag is
- // created and inserted dynamically. So we remove the server rendered
- // styles and inject new ones.
- styleElement.parentNode.removeChild(styleElement)
- }
- }
- if (isOldIE) {
- // use singleton mode for IE9.
- var styleIndex = singletonCounter++
- styleElement = singletonElement || (singletonElement = createStyleElement())
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
- } else {
- // use multi-style-tag mode in all other cases
- styleElement = createStyleElement()
- update = applyToTag.bind(null, styleElement)
- remove = function () {
- styleElement.parentNode.removeChild(styleElement)
- }
- }
- update(obj)
- return function updateStyle (newObj /* StyleObjectPart */) {
- if (newObj) {
- if (newObj.css === obj.css &&
- newObj.media === obj.media &&
- newObj.sourceMap === obj.sourceMap) {
- return
- }
- update(obj = newObj)
- } else {
- remove()
- }
- }
- }
- var replaceText = (function () {
- var textStore = []
- return function (index, replacement) {
- textStore[index] = replacement
- return textStore.filter(Boolean).join('\n')
- }
- })()
- function applyToSingletonTag (styleElement, index, remove, obj) {
- var css = remove ? '' : obj.css
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = replaceText(index, css)
- } else {
- var cssNode = document.createTextNode(css)
- var childNodes = styleElement.childNodes
- if (childNodes[index]) styleElement.removeChild(childNodes[index])
- if (childNodes.length) {
- styleElement.insertBefore(cssNode, childNodes[index])
- } else {
- styleElement.appendChild(cssNode)
- }
- }
- }
- function applyToTag (styleElement, obj) {
- var css = obj.css
- var media = obj.media
- var sourceMap = obj.sourceMap
- if (media) {
- styleElement.setAttribute('media', media)
- }
- if (options.ssrId) {
- styleElement.setAttribute(ssrIdKey, obj.id)
- }
- if (sourceMap) {
- // https://developer.chrome.com/devtools/docs/javascript-debugging
- // this makes source maps inside style tags work properly in Chrome
- css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
- // http://stackoverflow.com/a/26603875
- css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
- }
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = css
- } else {
- while (styleElement.firstChild) {
- styleElement.removeChild(styleElement.firstChild)
- }
- styleElement.appendChild(document.createTextNode(css))
- }
- }
- /***/ }),
- /* 2 */
- /***/ (function(module, exports) {
- /* globals __VUE_SSR_CONTEXT__ */
- // IMPORTANT: Do NOT use ES2015 features in this file.
- // This module is a runtime utility for cleaner component module output and will
- // be included in the final webpack user bundle.
- module.exports = function normalizeComponent (
- rawScriptExports,
- compiledTemplate,
- functionalTemplate,
- injectStyles,
- scopeId,
- moduleIdentifier /* server only */
- ) {
- var esModule
- var scriptExports = rawScriptExports = rawScriptExports || {}
- // ES6 modules interop
- var type = typeof rawScriptExports.default
- if (type === 'object' || type === 'function') {
- esModule = rawScriptExports
- scriptExports = rawScriptExports.default
- }
- // Vue.extend constructor export interop
- var options = typeof scriptExports === 'function'
- ? scriptExports.options
- : scriptExports
- // render functions
- if (compiledTemplate) {
- options.render = compiledTemplate.render
- options.staticRenderFns = compiledTemplate.staticRenderFns
- options._compiled = true
- }
- // functional template
- if (functionalTemplate) {
- options.functional = true
- }
- // scopedId
- if (scopeId) {
- options._scopeId = scopeId
- }
- var hook
- if (moduleIdentifier) { // server build
- hook = function (context) {
- // 2.3 injection
- context =
- context || // cached call
- (this.$vnode && this.$vnode.ssrContext) || // stateful
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
- // 2.2 with runInNewContext: true
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
- context = __VUE_SSR_CONTEXT__
- }
- // inject component styles
- if (injectStyles) {
- injectStyles.call(this, context)
- }
- // register component module identifier for async chunk inferrence
- if (context && context._registeredComponents) {
- context._registeredComponents.add(moduleIdentifier)
- }
- }
- // used by ssr in case component is cached and beforeCreate
- // never gets called
- options._ssrRegister = hook
- } else if (injectStyles) {
- hook = injectStyles
- }
- if (hook) {
- var functional = options.functional
- var existing = functional
- ? options.render
- : options.beforeCreate
- if (!functional) {
- // inject component registration as beforeCreate hook
- options.beforeCreate = existing
- ? [].concat(existing, hook)
- : [hook]
- } else {
- // for template-only hot-reload because in that case the render fn doesn't
- // go through the normalizer
- options._injectStyles = hook
- // register for functioal component in vue file
- options.render = function renderWithStyleInjection (h, context) {
- hook.call(context)
- return existing(h, context)
- }
- }
- }
- return {
- esModule: esModule,
- exports: scriptExports,
- options: options
- }
- }
- /***/ }),
- /* 3 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _tinycolor = __webpack_require__(27);
- var _tinycolor2 = _interopRequireDefault(_tinycolor);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function _colorChange(data, oldHue) {
- var alpha = data && data.a;
- var color;
- if (data && data.hsl) {
- color = (0, _tinycolor2.default)(data.hsl);
- } else if (data && data.hex && data.hex.length > 0) {
- color = (0, _tinycolor2.default)(data.hex);
- } else {
- color = (0, _tinycolor2.default)(data);
- }
- if (color && (color._a === undefined || color._a === null)) {
- color.setAlpha(alpha || 1);
- }
- var hsl = color.toHsl();
- var hsv = color.toHsv();
- if (hsl.s === 0) {
- hsv.h = hsl.h = data.h || data.hsl && data.hsl.h || oldHue || 0;
- }
- return {
- hsl: hsl,
- hex: color.toHexString().toUpperCase(),
- hex8: color.toHex8String().toUpperCase(),
- hexT: Number(color.toHexTString()),
- rgba: color.toRgb(),
- hsv: hsv,
- oldHue: data.h || oldHue || hsl.h,
- source: data.source,
- a: data.a || color.getAlpha()
- };
- }
- exports.default = {
- props: ['value'],
- data: function data() {
- return {
- val: _colorChange(this.value)
- };
- },
- computed: {
- colors: {
- get: function get() {
- return this.val;
- },
- set: function set(newVal) {
- this.val = newVal;
- this.$emit('input', newVal);
- }
- }
- },
- watch: {
- value: function value(newVal) {
- this.val = _colorChange(newVal);
- }
- },
- methods: {
- colorChange: function colorChange(data, oldHue) {
- this.oldHue = this.colors.hsl.h;
- this.colors = _colorChange(data, oldHue || this.oldHue);
- },
- isValidHex: function isValidHex(hex) {
- return (0, _tinycolor2.default)(hex).isValid();
- },
- simpleCheckForValidColor: function simpleCheckForValidColor(data) {
- var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];
- var checked = 0;
- var passed = 0;
- for (var i = 0; i < keysToCheck.length; i++) {
- var letter = keysToCheck[i];
- if (data[letter]) {
- checked++;
- if (!isNaN(data[letter])) {
- passed++;
- }
- }
- }
- if (checked === passed) {
- return data;
- }
- },
- paletteUpperCase: function paletteUpperCase(palette) {
- return palette.map(function (c) {
- return c.toUpperCase();
- });
- },
- isTransparent: function isTransparent(color) {
- return (0, _tinycolor2.default)(color).getAlpha() === 0;
- }
- }
- };
- /***/ }),
- /* 4 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__ = __webpack_require__(10);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_441174dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__ = __webpack_require__(30);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(28)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_EditableInput_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_441174dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/common/EditableInput.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-441174dc", Component.options)
- } else {
- hotAPI.reload("data-v-441174dc", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 5 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7b9aea78_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Hue_vue__ = __webpack_require__(45);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(43)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Hue_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7b9aea78_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Hue_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/common/Hue.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-7b9aea78", Component.options)
- } else {
- hotAPI.reload("data-v-7b9aea78", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 6 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ba139894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Saturation_vue__ = __webpack_require__(60);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(55)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Saturation_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ba139894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Saturation_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/common/Saturation.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-ba139894", Component.options)
- } else {
- hotAPI.reload("data-v-ba139894", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 7 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__ = __webpack_require__(18);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1af1f1ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Alpha_vue__ = __webpack_require__(66);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(61)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Alpha_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_1af1f1ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Alpha_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/common/Alpha.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-1af1f1ac", Component.options)
- } else {
- hotAPI.reload("data-v-1af1f1ac", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 8 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__ = __webpack_require__(19);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5b6dc0c2_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__ = __webpack_require__(65);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(63)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Checkboard_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5b6dc0c2_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/common/Checkboard.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-5b6dc0c2", Component.options)
- } else {
- hotAPI.reload("data-v-5b6dc0c2", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 9 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var defaultColors = ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#CCCCCC', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'];
- exports.default = {
- name: 'Compact',
- mixins: [_color2.default],
- props: {
- palette: {
- type: Array,
- default: function _default() {
- return defaultColors;
- }
- }
- },
- components: {
- 'ed-in': _EditableInput2.default
- },
- computed: {
- pick: function pick() {
- return this.colors.hex.toUpperCase();
- }
- },
- methods: {
- handlerClick: function handlerClick(c) {
- this.colorChange({
- hex: c,
- source: 'hex'
- });
- }
- }
- };
- /***/ }),
- /* 10 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = {
- name: 'editableInput',
- props: {
- label: String,
- labelText: String,
- desc: String,
- value: [String, Number],
- max: Number,
- min: Number,
- arrowOffset: {
- type: Number,
- default: 1
- }
- },
- computed: {
- val: {
- get: function get() {
- return this.value;
- },
- set: function set(v) {
- if (!(this.max === undefined) && +v > this.max) {
- this.$refs.input.value = this.max;
- } else {
- return v;
- }
- }
- },
- labelId: function labelId() {
- return 'input__label__' + this.label + '__' + Math.random().toString().slice(2, 5);
- },
- labelSpanText: function labelSpanText() {
- return this.labelText || this.label;
- }
- },
- methods: {
- update: function update(e) {
- this.handleChange(e.target.value);
- },
- handleChange: function handleChange(newVal) {
- var data = {};
- data[this.label] = newVal;
- if (data.hex === undefined && data['#'] === undefined) {
- this.$emit('change', data);
- } else if (newVal.length > 5) {
- this.$emit('change', data);
- }
- },
- handleKeyDown: function handleKeyDown(e) {
- var val = this.val;
- var number = Number(val);
- if (number) {
- var amount = this.arrowOffset || 1;
- if (e.keyCode === 38) {
- val = number + amount;
- this.handleChange(val);
- e.preventDefault();
- }
- if (e.keyCode === 40) {
- val = number - amount;
- this.handleChange(val);
- e.preventDefault();
- }
- }
- }
- }
- };
- /***/ }),
- /* 11 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var defaultColors = ['#FFFFFF', '#F2F2F2', '#E6E6E6', '#D9D9D9', '#CCCCCC', '#BFBFBF', '#B3B3B3', '#A6A6A6', '#999999', '#8C8C8C', '#808080', '#737373', '#666666', '#595959', '#4D4D4D', '#404040', '#333333', '#262626', '#0D0D0D', '#000000'];
- exports.default = {
- name: 'Grayscale',
- mixins: [_color2.default],
- props: {
- palette: {
- type: Array,
- default: function _default() {
- return defaultColors;
- }
- }
- },
- components: {},
- computed: {
- pick: function pick() {
- return this.colors.hex.toUpperCase();
- }
- },
- methods: {
- handlerClick: function handlerClick(c) {
- this.colorChange({
- hex: c,
- source: 'hex'
- });
- }
- }
- };
- /***/ }),
- /* 12 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Material',
- mixins: [_color2.default],
- components: {
- 'ed-in': _EditableInput2.default
- },
- methods: {
- onChange: function onChange(data) {
- if (!data) {
- return;
- }
- if (data.hex) {
- this.isValidHex(data.hex) && this.colorChange({
- hex: data.hex,
- source: 'hex'
- });
- } else if (data.r || data.g || data.b) {
- this.colorChange({
- r: data.r || this.colors.rgba.r,
- g: data.g || this.colors.rgba.g,
- b: data.b || this.colors.rgba.b,
- a: data.a || this.colors.rgba.a,
- source: 'rgba'
- });
- }
- }
- }
- };
- /***/ }),
- /* 13 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- var _Hue = __webpack_require__(5);
- var _Hue2 = _interopRequireDefault(_Hue);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Slider',
- mixins: [_color2.default],
- props: {
- swatches: {
- type: Array,
- default: function _default() {
- return ['.80', '.65', '.50', '.35', '.20'];
- }
- }
- },
- components: {
- hue: _Hue2.default
- },
- computed: {
- activeOffset: function activeOffset() {
- var hasBlack = this.swatches.includes('0');
- var hasWhite = this.swatches.includes('1');
- var hsl = this.colors.hsl;
- if (Math.round(hsl.s * 100) / 100 === 0.50) {
- return Math.round(hsl.l * 100) / 100;
- } else if (hasBlack && hsl.l === 0) {
- return 0;
- } else if (hasWhite && hsl.l === 1) {
- return 1;
- }
- return -1;
- }
- },
- methods: {
- hueChange: function hueChange(data) {
- this.colorChange(data);
- },
- handleSwClick: function handleSwClick(index, offset) {
- this.colorChange({
- h: this.colors.hsl.h,
- s: 0.5,
- l: offset,
- source: 'hsl'
- });
- }
- }
- };
- /***/ }),
- /* 14 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = {
- name: 'Hue',
- props: {
- value: Object,
- direction: {
- type: String,
- default: 'horizontal'
- }
- },
- data: function data() {
- return {
- oldHue: 0,
- pullDirection: ''
- };
- },
- computed: {
- colors: function colors() {
- var h = this.value.hsl.h;
- if (h !== 0 && h - this.oldHue > 0) this.pullDirection = 'right';
- if (h !== 0 && h - this.oldHue < 0) this.pullDirection = 'left';
- this.oldHue = h;
- return this.value;
- },
- directionClass: function directionClass() {
- return {
- 'vc-hue--horizontal': this.direction === 'horizontal',
- 'vc-hue--vertical': this.direction === 'vertical'
- };
- },
- pointerTop: function pointerTop() {
- if (this.direction === 'vertical') {
- if (this.colors.hsl.h === 0 && this.pullDirection === 'right') return 0;
- return -(this.colors.hsl.h * 100 / 360) + 100 + '%';
- } else {
- return 0;
- }
- },
- pointerLeft: function pointerLeft() {
- if (this.direction === 'vertical') {
- return 0;
- } else {
- if (this.colors.hsl.h === 0 && this.pullDirection === 'right') return '100%';
- return this.colors.hsl.h * 100 / 360 + '%';
- }
- }
- },
- methods: {
- handleChange: function handleChange(e, skip) {
- !skip && e.preventDefault();
- var container = this.$refs.container;
- var containerWidth = container.clientWidth;
- var containerHeight = container.clientHeight;
- var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
- var yOffset = container.getBoundingClientRect().top + window.pageYOffset;
- var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
- var pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);
- var left = pageX - xOffset;
- var top = pageY - yOffset;
- var h;
- var percent;
- if (this.direction === 'vertical') {
- if (top < 0) {
- h = 360;
- } else if (top > containerHeight) {
- h = 0;
- } else {
- percent = -(top * 100 / containerHeight) + 100;
- h = 360 * percent / 100;
- }
- if (this.colors.hsl.h !== h) {
- this.$emit('change', {
- h: h,
- s: this.colors.hsl.s,
- l: this.colors.hsl.l,
- a: this.colors.hsl.a,
- source: 'hsl'
- });
- }
- } else {
- if (left < 0) {
- h = 0;
- } else if (left > containerWidth) {
- h = 360;
- } else {
- percent = left * 100 / containerWidth;
- h = 360 * percent / 100;
- }
- if (this.colors.hsl.h !== h) {
- this.$emit('change', {
- h: h,
- s: this.colors.hsl.s,
- l: this.colors.hsl.l,
- a: this.colors.hsl.a,
- source: 'hsl'
- });
- }
- }
- },
- handleMouseDown: function handleMouseDown(e) {
- this.handleChange(e, true);
- window.addEventListener('mousemove', this.handleChange);
- window.addEventListener('mouseup', this.handleMouseUp);
- },
- handleMouseUp: function handleMouseUp(e) {
- this.unbindEventListeners();
- },
- unbindEventListeners: function unbindEventListeners() {
- window.removeEventListener('mousemove', this.handleChange);
- window.removeEventListener('mouseup', this.handleMouseUp);
- }
- }
- };
- /***/ }),
- /* 15 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _materialColors = __webpack_require__(50);
- var _materialColors2 = _interopRequireDefault(_materialColors);
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var colorMap = ['red', 'pink', 'purple', 'deepPurple', 'indigo', 'blue', 'lightBlue', 'cyan', 'teal', 'green', 'lightGreen', 'lime', 'yellow', 'amber', 'orange', 'deepOrange', 'brown', 'blueGrey', 'black'];
- var colorLevel = ['900', '700', '500', '300', '100'];
- var defaultColors = function () {
- var colors = [];
- colorMap.forEach(function (type) {
- var typeColor = [];
- if (type.toLowerCase() === 'black' || type.toLowerCase() === 'white') {
- typeColor = typeColor.concat(['#000000', '#FFFFFF']);
- } else {
- colorLevel.forEach(function (level) {
- var color = _materialColors2.default[type][level];
- typeColor.push(color.toUpperCase());
- });
- }
- colors.push(typeColor);
- });
- return colors;
- }();
- exports.default = {
- name: 'Swatches',
- mixins: [_color2.default],
- props: {
- palette: {
- type: Array,
- default: function _default() {
- return defaultColors;
- }
- }
- },
- computed: {
- pick: function pick() {
- return this.colors.hex;
- }
- },
- methods: {
- equal: function equal(color) {
- return color.toLowerCase() === this.colors.hex.toLowerCase();
- },
- handlerClick: function handlerClick(c) {
- this.colorChange({
- hex: c,
- source: 'hex'
- });
- }
- }
- };
- /***/ }),
- /* 16 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- var _Saturation = __webpack_require__(6);
- var _Saturation2 = _interopRequireDefault(_Saturation);
- var _Hue = __webpack_require__(5);
- var _Hue2 = _interopRequireDefault(_Hue);
- var _Alpha = __webpack_require__(7);
- var _Alpha2 = _interopRequireDefault(_Alpha);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Photoshop',
- mixins: [_color2.default],
- props: {
- head: {
- type: String,
- default: 'Color Picker'
- },
- disableFields: {
- type: Boolean,
- default: false
- },
- hasResetButton: {
- type: Boolean,
- default: false
- },
- acceptLabel: {
- type: String,
- default: 'OK'
- },
- cancelLabel: {
- type: String,
- default: 'Cancel'
- },
- resetLabel: {
- type: String,
- default: 'Reset'
- },
- newLabel: {
- type: String,
- default: 'new'
- },
- currentLabel: {
- type: String,
- default: 'current'
- }
- },
- components: {
- saturation: _Saturation2.default,
- hue: _Hue2.default,
- alpha: _Alpha2.default,
- 'ed-in': _EditableInput2.default
- },
- data: function data() {
- return {
- currentColor: '#FFF'
- };
- },
- computed: {
- hsv: function hsv() {
- var hsv = this.colors.hsv;
- return {
- h: hsv.h.toFixed(),
- s: (hsv.s * 100).toFixed(),
- v: (hsv.v * 100).toFixed()
- };
- },
- hex: function hex() {
- var hex = this.colors.hex;
- return hex && hex.replace('#', '');
- }
- },
- created: function created() {
- this.currentColor = this.colors.hex;
- },
- methods: {
- childChange: function childChange(data) {
- this.colorChange(data);
- },
- inputChange: function inputChange(data) {
- if (!data) {
- return;
- }
- if (data['#']) {
- this.isValidHex(data['#']) && this.colorChange({
- hex: data['#'],
- source: 'hex'
- });
- } else if (data.r || data.g || data.b || data.a) {
- this.colorChange({
- r: data.r || this.colors.rgba.r,
- g: data.g || this.colors.rgba.g,
- b: data.b || this.colors.rgba.b,
- a: data.a || this.colors.rgba.a,
- source: 'rgba'
- });
- } else if (data.h || data.s || data.v) {
- this.colorChange({
- h: data.h || this.colors.hsv.h,
- s: data.s / 100 || this.colors.hsv.s,
- v: data.v / 100 || this.colors.hsv.v,
- source: 'hsv'
- });
- }
- },
- clickCurrentColor: function clickCurrentColor() {
- this.colorChange({
- hex: this.currentColor,
- source: 'hex'
- });
- },
- handleAccept: function handleAccept() {
- this.$emit('ok');
- },
- handleCancel: function handleCancel() {
- this.$emit('cancel');
- },
- handleReset: function handleReset() {
- this.$emit('reset');
- }
- }
- };
- /***/ }),
- /* 17 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _clamp = __webpack_require__(57);
- var _clamp2 = _interopRequireDefault(_clamp);
- var _lodash = __webpack_require__(58);
- var _lodash2 = _interopRequireDefault(_lodash);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Saturation',
- props: {
- value: Object
- },
- computed: {
- colors: function colors() {
- return this.value;
- },
- bgColor: function bgColor() {
- return 'hsl(' + this.colors.hsv.h + ', 100%, 50%)';
- },
- pointerTop: function pointerTop() {
- return -(this.colors.hsv.v * 100) + 1 + 100 + '%';
- },
- pointerLeft: function pointerLeft() {
- return this.colors.hsv.s * 100 + '%';
- }
- },
- methods: {
- throttle: (0, _lodash2.default)(function (fn, data) {
- fn(data);
- }, 20, {
- 'leading': true,
- 'trailing': false
- }),
- handleChange: function handleChange(e, skip) {
- !skip && e.preventDefault();
- var container = this.$refs.container;
- var containerWidth = container.clientWidth;
- var containerHeight = container.clientHeight;
- var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
- var yOffset = container.getBoundingClientRect().top + window.pageYOffset;
- var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
- var pageY = e.pageY || (e.touches ? e.touches[0].pageY : 0);
- var left = (0, _clamp2.default)(pageX - xOffset, 0, containerWidth);
- var top = (0, _clamp2.default)(pageY - yOffset, 0, containerHeight);
- var saturation = left / containerWidth;
- var bright = (0, _clamp2.default)(-(top / containerHeight) + 1, 0.05, 1);
- this.throttle(this.onChange, {
- h: this.colors.hsv.h,
- s: saturation,
- v: bright,
- a: this.colors.hsv.a,
- source: 'hsva'
- });
- },
- onChange: function onChange(param) {
- this.$emit('change', param);
- },
- handleMouseDown: function handleMouseDown(e) {
- window.addEventListener('mousemove', this.handleChange);
- window.addEventListener('mouseup', this.handleChange);
- window.addEventListener('mouseup', this.handleMouseUp);
- },
- handleMouseUp: function handleMouseUp(e) {
- this.unbindEventListeners();
- },
- unbindEventListeners: function unbindEventListeners() {
- window.removeEventListener('mousemove', this.handleChange);
- window.removeEventListener('mouseup', this.handleChange);
- window.removeEventListener('mouseup', this.handleMouseUp);
- }
- }
- };
- /***/ }),
- /* 18 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _Checkboard = __webpack_require__(8);
- var _Checkboard2 = _interopRequireDefault(_Checkboard);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Alpha',
- props: {
- value: Object,
- onChange: Function
- },
- components: {
- checkboard: _Checkboard2.default
- },
- computed: {
- colors: function colors() {
- return this.value;
- },
- gradientColor: function gradientColor() {
- var rgba = this.colors.rgba;
- var rgbStr = [rgba.r, rgba.g, rgba.b].join(',');
- return '-webkit-linear-gradient(right, rgba(' + rgbStr + ', 0) 0%, rgba(' + rgbStr + ', 1) 100%)';
- }
- },
- methods: {
- handleChange: function handleChange(e, skip) {
- !skip && e.preventDefault();
- var container = this.$refs.container;
- var containerWidth = container.clientWidth;
- var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
- var pageX = e.pageX || (e.touches ? e.touches[0].pageX : 0);
- var left = pageX - xOffset;
- var a;
- if (left < 0) {
- a = 0.01;
- } else if (left > containerWidth) {
- a = 1;
- } else {
- a = Math.round(left * 100 / containerWidth) / 100;
- }
- if (this.colors.a !== a) {
- this.$emit('change', {
- h: this.colors.hsl.h,
- s: this.colors.hsl.s,
- l: this.colors.hsl.l,
- a: a,
- source: 'rgba'
- });
- }
- },
- handleMouseDown: function handleMouseDown(e) {
- this.handleChange(e, true);
- window.addEventListener('mousemove', this.handleChange);
- window.addEventListener('mouseup', this.handleMouseUp);
- },
- handleMouseUp: function handleMouseUp() {
- this.unbindEventListeners();
- },
- unbindEventListeners: function unbindEventListeners() {
- window.removeEventListener('mousemove', this.handleChange);
- window.removeEventListener('mouseup', this.handleMouseUp);
- }
- }
- };
- /***/ }),
- /* 19 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _checkboardCache = {};
- exports.default = {
- name: 'Checkboard',
- props: {
- size: {
- type: [Number, String],
- default: 8
- },
- white: {
- type: String,
- default: '#fff'
- },
- grey: {
- type: String,
- default: '#e6e6e6'
- }
- },
- computed: {
- bgStyle: function bgStyle() {
- return {
- 'background-image': 'url(' + getCheckboard(this.white, this.grey, this.size) + ')'
- };
- }
- }
- };
- function renderCheckboard(c1, c2, size) {
- if (typeof document === 'undefined') {
- return null;
- }
- var canvas = document.createElement('canvas');
- canvas.width = canvas.height = size * 2;
- var ctx = canvas.getContext('2d');
- if (!ctx) {
- return null;
- }
- ctx.fillStyle = c1;
- ctx.fillRect(0, 0, canvas.width, canvas.height);
- ctx.fillStyle = c2;
- ctx.fillRect(0, 0, size, size);
- ctx.translate(size, size);
- ctx.fillRect(0, 0, size, size);
- return canvas.toDataURL();
- }
- function getCheckboard(c1, c2, size) {
- var key = c1 + ',' + c2 + ',' + size;
- if (_checkboardCache[key]) {
- return _checkboardCache[key];
- } else {
- var checkboard = renderCheckboard(c1, c2, size);
- _checkboardCache[key] = checkboard;
- return checkboard;
- }
- }
- /***/ }),
- /* 20 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- var _Saturation = __webpack_require__(6);
- var _Saturation2 = _interopRequireDefault(_Saturation);
- var _Hue = __webpack_require__(5);
- var _Hue2 = _interopRequireDefault(_Hue);
- var _Alpha = __webpack_require__(7);
- var _Alpha2 = _interopRequireDefault(_Alpha);
- var _Checkboard = __webpack_require__(8);
- var _Checkboard2 = _interopRequireDefault(_Checkboard);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF', 'rgba(0,0,0,0)'];
- exports.default = {
- name: 'Sketch',
- mixins: [_color2.default],
- components: {
- saturation: _Saturation2.default,
- hue: _Hue2.default,
- alpha: _Alpha2.default,
- 'ed-in': _EditableInput2.default,
- checkboard: _Checkboard2.default
- },
- props: {
- presetColors: {
- type: Array,
- default: function _default() {
- return presetColors;
- }
- },
- disableAlpha: {
- type: Boolean,
- default: false
- },
- disableFields: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- hex: function hex() {
- var hex = void 0;
- if (this.colors.a < 1) {
- hex = this.colors.hex8;
- } else {
- hex = this.colors.hex;
- }
- return hex.replace('#', '');
- },
- activeColor: function activeColor() {
- var rgba = this.colors.rgba;
- return 'rgba(' + [rgba.r, rgba.g, rgba.b, rgba.a].join(',') + ')';
- }
- },
- methods: {
- handlePreset: function handlePreset(c) {
- this.colorChange({
- hex: c,
- source: 'hex'
- });
- },
- childChange: function childChange(data) {
- this.colorChange(data);
- },
- inputChange: function inputChange(data) {
- if (!data) {
- return;
- }
- if (data.hex) {
- this.isValidHex(data.hex) && this.colorChange({
- hex: data.hex,
- source: 'hex'
- });
- } else if (data.r || data.g || data.b || data.a) {
- this.colorChange({
- r: data.r || this.colors.rgba.r,
- g: data.g || this.colors.rgba.g,
- b: data.b || this.colors.rgba.b,
- a: data.a || this.colors.rgba.a,
- source: 'rgba'
- });
- }
- }
- }
- };
- /***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- var _Saturation = __webpack_require__(6);
- var _Saturation2 = _interopRequireDefault(_Saturation);
- var _Hue = __webpack_require__(5);
- var _Hue2 = _interopRequireDefault(_Hue);
- var _Alpha = __webpack_require__(7);
- var _Alpha2 = _interopRequireDefault(_Alpha);
- var _Checkboard = __webpack_require__(8);
- var _Checkboard2 = _interopRequireDefault(_Checkboard);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- exports.default = {
- name: 'Chrome',
- mixins: [_color2.default],
- props: {
- disableAlpha: {
- type: Boolean,
- default: false
- },
- disableFields: {
- type: Boolean,
- default: false
- }
- },
- components: {
- saturation: _Saturation2.default,
- hue: _Hue2.default,
- alpha: _Alpha2.default,
- 'ed-in': _EditableInput2.default,
- checkboard: _Checkboard2.default
- },
- data: function data() {
- return {
- fieldsIndex: 0,
- highlight: false
- };
- },
- computed: {
- hsl: function hsl() {
- var _colors$hsl = this.colors.hsl,
- h = _colors$hsl.h,
- s = _colors$hsl.s,
- l = _colors$hsl.l;
- return {
- h: h.toFixed(),
- s: (s * 100).toFixed() + '%',
- l: (l * 100).toFixed() + '%'
- };
- },
- activeColor: function activeColor() {
- var rgba = this.colors.rgba;
- return 'rgba(' + [rgba.r, rgba.g, rgba.b, rgba.a].join(',') + ')';
- },
- hasAlpha: function hasAlpha() {
- return this.colors.a < 1;
- }
- },
- methods: {
- childChange: function childChange(data) {
- this.colorChange(data);
- },
- inputChange: function inputChange(data) {
- if (!data) {
- return;
- }
- if (data.hex) {
- this.isValidHex(data.hex) && this.colorChange({
- hex: data.hex,
- source: 'hex'
- });
- } else if (data.r || data.g || data.b || data.a) {
- this.colorChange({
- r: data.r || this.colors.rgba.r,
- g: data.g || this.colors.rgba.g,
- b: data.b || this.colors.rgba.b,
- a: data.a || this.colors.rgba.a,
- source: 'rgba'
- });
- } else if (data.h || data.s || data.l) {
- var s = data.s ? data.s.replace('%', '') / 100 : this.colors.hsl.s;
- var l = data.l ? data.l.replace('%', '') / 100 : this.colors.hsl.l;
- this.colorChange({
- h: data.h || this.colors.hsl.h,
- s: s,
- l: l,
- source: 'hsl'
- });
- }
- },
- toggleViews: function toggleViews() {
- if (this.fieldsIndex >= 2) {
- this.fieldsIndex = 0;
- return;
- }
- this.fieldsIndex++;
- },
- showHighlight: function showHighlight() {
- this.highlight = true;
- },
- hideHighlight: function hideHighlight() {
- this.highlight = false;
- }
- }
- };
- /***/ }),
- /* 22 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- var _Compact = __webpack_require__(23);
- var _Compact2 = _interopRequireDefault(_Compact);
- var _Grayscale = __webpack_require__(32);
- var _Grayscale2 = _interopRequireDefault(_Grayscale);
- var _Material = __webpack_require__(36);
- var _Material2 = _interopRequireDefault(_Material);
- var _Slider = __webpack_require__(40);
- var _Slider2 = _interopRequireDefault(_Slider);
- var _Swatches = __webpack_require__(47);
- var _Swatches2 = _interopRequireDefault(_Swatches);
- var _Photoshop = __webpack_require__(52);
- var _Photoshop2 = _interopRequireDefault(_Photoshop);
- var _Sketch = __webpack_require__(68);
- var _Sketch2 = _interopRequireDefault(_Sketch);
- var _Chrome = __webpack_require__(72);
- var _Chrome2 = _interopRequireDefault(_Chrome);
- var _Alpha = __webpack_require__(7);
- var _Alpha2 = _interopRequireDefault(_Alpha);
- var _Checkboard = __webpack_require__(8);
- var _Checkboard2 = _interopRequireDefault(_Checkboard);
- var _EditableInput = __webpack_require__(4);
- var _EditableInput2 = _interopRequireDefault(_EditableInput);
- var _Hue = __webpack_require__(5);
- var _Hue2 = _interopRequireDefault(_Hue);
- var _Saturation = __webpack_require__(6);
- var _Saturation2 = _interopRequireDefault(_Saturation);
- var _color = __webpack_require__(3);
- var _color2 = _interopRequireDefault(_color);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var VueColor = {
- version: '2.7.0',
- Compact: _Compact2.default,
- Grayscale: _Grayscale2.default,
- Material: _Material2.default,
- Slider: _Slider2.default,
- Swatches: _Swatches2.default,
- Photoshop: _Photoshop2.default,
- Sketch: _Sketch2.default,
- Chrome: _Chrome2.default,
- Alpha: _Alpha2.default,
- Checkboard: _Checkboard2.default,
- EditableInput: _EditableInput2.default,
- Hue: _Hue2.default,
- Saturation: _Saturation2.default,
- ColorMixin: _color2.default
- };
- module.exports = VueColor;
- /***/ }),
- /* 23 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_648423a3_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Compact_vue__ = __webpack_require__(31);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(24)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Compact_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_648423a3_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Compact_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Compact.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-648423a3", Component.options)
- } else {
- hotAPI.reload("data-v-648423a3", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 24 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(25);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("6ce8a5a8", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-648423a3\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Compact.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-648423a3\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Compact.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 25 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-compact {\n padding-top: 5px;\n padding-left: 5px;\n width: 240px;\n border-radius: 2px;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-compact-colors {\n overflow: hidden;\n padding: 0;\n margin: 0;\n}\n.vc-compact-color-item {\n list-style: none;\n width: 15px;\n height: 15px;\n float: left;\n margin-right: 5px;\n margin-bottom: 5px;\n position: relative;\n cursor: pointer;\n}\n.vc-compact-color-item--white {\n box-shadow: inset 0 0 0 1px #ddd;\n}\n.vc-compact-color-item--white .vc-compact-dot {\n background: #000;\n}\n.vc-compact-dot {\n position: absolute;\n top: 5px;\n right: 5px;\n bottom: 5px;\n left: 5px;\n border-radius: 50%;\n opacity: 1;\n background: #fff;\n}\n", ""]);
- // exports
- /***/ }),
- /* 26 */
- /***/ (function(module, exports) {
- /**
- * Translates the list format produced by css-loader into something
- * easier to manipulate.
- */
- module.exports = function listToStyles (parentId, list) {
- var styles = []
- var newStyles = {}
- for (var i = 0; i < list.length; i++) {
- var item = list[i]
- var id = item[0]
- var css = item[1]
- var media = item[2]
- var sourceMap = item[3]
- var part = {
- id: parentId + ':' + i,
- css: css,
- media: media,
- sourceMap: sourceMap
- }
- if (!newStyles[id]) {
- styles.push(newStyles[id] = { id: id, parts: [part] })
- } else {
- newStyles[id].parts.push(part)
- }
- }
- return styles
- }
- /***/ }),
- /* 27 */
- /***/ (function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
- // https://github.com/bgrins/TinyColor
- // Brian Grinstead, MIT License
- (function(Math) {
- var trimLeft = /^\s+/,
- trimRight = /\s+$/,
- tinyCounter = 0,
- mathRound = Math.round,
- mathMin = Math.min,
- mathMax = Math.max,
- mathRandom = Math.random;
- function tinycolor (color, opts) {
- color = (color) ? color : '';
- opts = opts || { };
- // If input is already a tinycolor, return itself
- if (color instanceof tinycolor) {
- return color;
- }
- // If we are called as a function, call using new instead
- if (!(this instanceof tinycolor)) {
- return new tinycolor(color, opts);
- }
- var rgb = inputToRGB(color);
- this._originalInput = color,
- this._r = rgb.r,
- this._g = rgb.g,
- this._b = rgb.b,
- this._a = rgb.a,
- this._roundA = mathRound(100*this._a) / 100,
- this._format = opts.format || rgb.format;
- this._gradientType = opts.gradientType;
- // Don't let the range of [0,255] come back in [0,1].
- // Potentially lose a little bit of precision here, but will fix issues where
- // .5 gets interpreted as half of the total, instead of half of 1
- // If it was supposed to be 128, this was already taken care of by `inputToRgb`
- if (this._r < 1) { this._r = mathRound(this._r); }
- if (this._g < 1) { this._g = mathRound(this._g); }
- if (this._b < 1) { this._b = mathRound(this._b); }
- this._ok = rgb.ok;
- this._tc_id = tinyCounter++;
- }
- tinycolor.prototype = {
- isDark: function() {
- return this.getBrightness() < 128;
- },
- isLight: function() {
- return !this.isDark();
- },
- isValid: function() {
- return this._ok;
- },
- getOriginalInput: function() {
- return this._originalInput;
- },
- getFormat: function() {
- return this._format;
- },
- getAlpha: function() {
- return this._a;
- },
- getBrightness: function() {
- //http://www.w3.org/TR/AERT#color-contrast
- var rgb = this.toRgb();
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
- },
- getLuminance: function() {
- //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
- var rgb = this.toRgb();
- var RsRGB, GsRGB, BsRGB, R, G, B;
- RsRGB = rgb.r/255;
- GsRGB = rgb.g/255;
- BsRGB = rgb.b/255;
- if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
- if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
- if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
- return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
- },
- setAlpha: function(value) {
- this._a = boundAlpha(value);
- this._roundA = mathRound(100*this._a) / 100;
- return this;
- },
- toHsv: function() {
- var hsv = rgbToHsv(this._r, this._g, this._b);
- return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
- },
- toHsvString: function() {
- var hsv = rgbToHsv(this._r, this._g, this._b);
- var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
- return (this._a == 1) ?
- "hsv(" + h + ", " + s + "%, " + v + "%)" :
- "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
- },
- toHsl: function() {
- var hsl = rgbToHsl(this._r, this._g, this._b);
- return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
- },
- toHslString: function() {
- var hsl = rgbToHsl(this._r, this._g, this._b);
- var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
- return (this._a == 1) ?
- "hsl(" + h + ", " + s + "%, " + l + "%)" :
- "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
- },
- toHex: function(allow3Char) {
- return rgbToHex(this._r, this._g, this._b, allow3Char);
- },
- toHexString: function(allow3Char) {
- return '#' + this.toHex(allow3Char);
- },
- toHex8: function(allow4Char) {
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
- },
- toHex8String: function(allow4Char) {
- return '#' + this.toHex8(allow4Char);
- },
- toHexT: function() {
- return rgbaToArgbHex(this._r, this._g, this._b, this._a);
- },
- toHexTString: function() {
- return '0x' + this.toHexT();
- },
- toRgb: function() {
- return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
- },
- toRgbString: function() {
- return (this._a == 1) ?
- "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
- "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
- },
- toPercentageRgb: function() {
- return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
- },
- toPercentageRgbString: function() {
- return (this._a == 1) ?
- "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
- "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
- },
- toName: function() {
- if (this._a === 0) {
- return "transparent";
- }
- if (this._a < 1) {
- return false;
- }
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
- },
- toFilter: function(secondColor) {
- var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
- var secondHex8String = hex8String;
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
- if (secondColor) {
- var s = tinycolor(secondColor);
- secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
- }
- return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
- },
- toString: function(format) {
- var formatSet = !!format;
- format = format || this._format;
- var formattedString = false;
- var hasAlpha = this._a < 1 && this._a >= 0;
- var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
- if (needsAlphaFormat) {
- // Special case for "transparent", all other non-alpha formats
- // will return rgba when there is transparency.
- if (format === "name" && this._a === 0) {
- return this.toName();
- }
- return this.toRgbString();
- }
- if (format === "rgb") {
- formattedString = this.toRgbString();
- }
- if (format === "prgb") {
- formattedString = this.toPercentageRgbString();
- }
- if (format === "hex" || format === "hex6") {
- formattedString = this.toHexString();
- }
- if (format === "hex3") {
- formattedString = this.toHexString(true);
- }
- if (format === "hex4") {
- formattedString = this.toHex8String(true);
- }
- if (format === "hex8") {
- formattedString = this.toHex8String();
- }
- if (format === "name") {
- formattedString = this.toName();
- }
- if (format === "hsl") {
- formattedString = this.toHslString();
- }
- if (format === "hsv") {
- formattedString = this.toHsvString();
- }
- return formattedString || this.toHexString();
- },
- clone: function() {
- return tinycolor(this.toString());
- },
- _applyModification: function(fn, args) {
- var color = fn.apply(null, [this].concat([].slice.call(args)));
- this._r = color._r;
- this._g = color._g;
- this._b = color._b;
- this.setAlpha(color._a);
- return this;
- },
- lighten: function() {
- return this._applyModification(lighten, arguments);
- },
- brighten: function() {
- return this._applyModification(brighten, arguments);
- },
- darken: function() {
- return this._applyModification(darken, arguments);
- },
- desaturate: function() {
- return this._applyModification(desaturate, arguments);
- },
- saturate: function() {
- return this._applyModification(saturate, arguments);
- },
- greyscale: function() {
- return this._applyModification(greyscale, arguments);
- },
- spin: function() {
- return this._applyModification(spin, arguments);
- },
- _applyCombination: function(fn, args) {
- return fn.apply(null, [this].concat([].slice.call(args)));
- },
- analogous: function() {
- return this._applyCombination(analogous, arguments);
- },
- complement: function() {
- return this._applyCombination(complement, arguments);
- },
- monochromatic: function() {
- return this._applyCombination(monochromatic, arguments);
- },
- splitcomplement: function() {
- return this._applyCombination(splitcomplement, arguments);
- },
- triad: function() {
- return this._applyCombination(triad, arguments);
- },
- tetrad: function() {
- return this._applyCombination(tetrad, arguments);
- }
- };
- // If input is an object, force 1 into "1.0" to handle ratios properly
- // String input requires "1.0" as input, so 1 will be treated as 1
- tinycolor.fromRatio = function(color, opts) {
- if (typeof color == "object") {
- var newColor = {};
- for (var i in color) {
- if (color.hasOwnProperty(i)) {
- if (i === "a") {
- newColor[i] = color[i];
- }
- else {
- newColor[i] = convertToPercentage(color[i]);
- }
- }
- }
- color = newColor;
- }
- return tinycolor(color, opts);
- };
- // Given a string or object, convert that input to RGB
- // Possible string inputs:
- //
- // "red"
- // "#f00" or "f00"
- // "#ff0000" or "ff0000"
- // "#ff000000" or "ff000000"
- // "rgb 255 0 0" or "rgb (255, 0, 0)"
- // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
- // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
- // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
- // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
- // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
- // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
- //
- function inputToRGB(color) {
- var rgb = { r: 0, g: 0, b: 0 };
- var a = 1;
- var s = null;
- var v = null;
- var l = null;
- var ok = false;
- var format = false;
- if (typeof color == "string") {
- color = stringInputToObject(color);
- }
- if (typeof color == "object") {
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
- rgb = rgbToRgb(color.r, color.g, color.b);
- ok = true;
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
- }
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
- s = convertToPercentage(color.s);
- v = convertToPercentage(color.v);
- rgb = hsvToRgb(color.h, s, v);
- ok = true;
- format = "hsv";
- }
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
- s = convertToPercentage(color.s);
- l = convertToPercentage(color.l);
- rgb = hslToRgb(color.h, s, l);
- ok = true;
- format = "hsl";
- }
- if (color.hasOwnProperty("a")) {
- a = color.a;
- }
- }
- a = boundAlpha(a);
- return {
- ok: ok,
- format: color.format || format,
- r: mathMin(255, mathMax(rgb.r, 0)),
- g: mathMin(255, mathMax(rgb.g, 0)),
- b: mathMin(255, mathMax(rgb.b, 0)),
- a: a
- };
- }
- // Conversion Functions
- // --------------------
- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
- // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
- // `rgbToRgb`
- // Handle bounds / percentage checking to conform to CSS color spec
- // <http://www.w3.org/TR/css3-color/>
- // *Assumes:* r, g, b in [0, 255] or [0, 1]
- // *Returns:* { r, g, b } in [0, 255]
- function rgbToRgb(r, g, b){
- return {
- r: bound01(r, 255) * 255,
- g: bound01(g, 255) * 255,
- b: bound01(b, 255) * 255
- };
- }
- // `rgbToHsl`
- // Converts an RGB color value to HSL.
- // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
- // *Returns:* { h, s, l } in [0,1]
- function rgbToHsl(r, g, b) {
- r = bound01(r, 255);
- g = bound01(g, 255);
- b = bound01(b, 255);
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
- var h, s, l = (max + min) / 2;
- if(max == min) {
- h = s = 0; // achromatic
- }
- else {
- var d = max - min;
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
- switch(max) {
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
- case g: h = (b - r) / d + 2; break;
- case b: h = (r - g) / d + 4; break;
- }
- h /= 6;
- }
- return { h: h, s: s, l: l };
- }
- // `hslToRgb`
- // Converts an HSL color value to RGB.
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
- // *Returns:* { r, g, b } in the set [0, 255]
- function hslToRgb(h, s, l) {
- var r, g, b;
- h = bound01(h, 360);
- s = bound01(s, 100);
- l = bound01(l, 100);
- function hue2rgb(p, q, t) {
- if(t < 0) t += 1;
- if(t > 1) t -= 1;
- if(t < 1/6) return p + (q - p) * 6 * t;
- if(t < 1/2) return q;
- if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
- return p;
- }
- if(s === 0) {
- r = g = b = l; // achromatic
- }
- else {
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
- var p = 2 * l - q;
- r = hue2rgb(p, q, h + 1/3);
- g = hue2rgb(p, q, h);
- b = hue2rgb(p, q, h - 1/3);
- }
- return { r: r * 255, g: g * 255, b: b * 255 };
- }
- // `rgbToHsv`
- // Converts an RGB color value to HSV
- // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
- // *Returns:* { h, s, v } in [0,1]
- function rgbToHsv(r, g, b) {
- r = bound01(r, 255);
- g = bound01(g, 255);
- b = bound01(b, 255);
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
- var h, s, v = max;
- var d = max - min;
- s = max === 0 ? 0 : d / max;
- if(max == min) {
- h = 0; // achromatic
- }
- else {
- switch(max) {
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
- case g: h = (b - r) / d + 2; break;
- case b: h = (r - g) / d + 4; break;
- }
- h /= 6;
- }
- return { h: h, s: s, v: v };
- }
- // `hsvToRgb`
- // Converts an HSV color value to RGB.
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
- // *Returns:* { r, g, b } in the set [0, 255]
- function hsvToRgb(h, s, v) {
- h = bound01(h, 360) * 6;
- s = bound01(s, 100);
- v = bound01(v, 100);
- var i = Math.floor(h),
- f = h - i,
- p = v * (1 - s),
- q = v * (1 - f * s),
- t = v * (1 - (1 - f) * s),
- mod = i % 6,
- r = [v, q, p, p, t, v][mod],
- g = [t, v, v, q, p, p][mod],
- b = [p, p, t, v, v, q][mod];
- return { r: r * 255, g: g * 255, b: b * 255 };
- }
- // `rgbToHex`
- // Converts an RGB color to hex
- // Assumes r, g, and b are contained in the set [0, 255]
- // Returns a 3 or 6 character hex
- function rgbToHex(r, g, b, allow3Char) {
- var hex = [
- pad2(mathRound(r).toString(16)),
- pad2(mathRound(g).toString(16)),
- pad2(mathRound(b).toString(16))
- ];
- // Return a 3 character hex if possible
- if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
- }
- return hex.join("");
- }
- // `rgbaToHex`
- // Converts an RGBA color plus alpha transparency to hex
- // Assumes r, g, b are contained in the set [0, 255] and
- // a in [0, 1]. Returns a 4 or 8 character rgba hex
- function rgbaToHex(r, g, b, a, allow4Char) {
- var hex = [
- pad2(mathRound(r).toString(16)),
- pad2(mathRound(g).toString(16)),
- pad2(mathRound(b).toString(16)),
- pad2(convertDecimalToHex(a))
- ];
- // Return a 4 character hex if possible
- if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
- }
- return hex.join("");
- }
- // `rgbaToArgbHex`
- // Converts an RGBA color to an ARGB Hex8 string
- // Rarely used, but required for "toFilter()"
- function rgbaToArgbHex(r, g, b, a) {
- var hex = [
- pad2(convertDecimalToHex(a)),
- pad2(mathRound(r).toString(16)),
- pad2(mathRound(g).toString(16)),
- pad2(mathRound(b).toString(16))
- ];
- return hex.join("");
- }
- // `equals`
- // Can be called with any tinycolor input
- tinycolor.equals = function (color1, color2) {
- if (!color1 || !color2) { return false; }
- return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
- };
- tinycolor.random = function() {
- return tinycolor.fromRatio({
- r: mathRandom(),
- g: mathRandom(),
- b: mathRandom()
- });
- };
- // Modification Functions
- // ----------------------
- // Thanks to less.js for some of the basics here
- // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
- function desaturate(color, amount) {
- amount = (amount === 0) ? 0 : (amount || 10);
- var hsl = tinycolor(color).toHsl();
- hsl.s -= amount / 100;
- hsl.s = clamp01(hsl.s);
- return tinycolor(hsl);
- }
- function saturate(color, amount) {
- amount = (amount === 0) ? 0 : (amount || 10);
- var hsl = tinycolor(color).toHsl();
- hsl.s += amount / 100;
- hsl.s = clamp01(hsl.s);
- return tinycolor(hsl);
- }
- function greyscale(color) {
- return tinycolor(color).desaturate(100);
- }
- function lighten (color, amount) {
- amount = (amount === 0) ? 0 : (amount || 10);
- var hsl = tinycolor(color).toHsl();
- hsl.l += amount / 100;
- hsl.l = clamp01(hsl.l);
- return tinycolor(hsl);
- }
- function brighten(color, amount) {
- amount = (amount === 0) ? 0 : (amount || 10);
- var rgb = tinycolor(color).toRgb();
- rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
- rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
- rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
- return tinycolor(rgb);
- }
- function darken (color, amount) {
- amount = (amount === 0) ? 0 : (amount || 10);
- var hsl = tinycolor(color).toHsl();
- hsl.l -= amount / 100;
- hsl.l = clamp01(hsl.l);
- return tinycolor(hsl);
- }
- // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
- // Values outside of this range will be wrapped into this range.
- function spin(color, amount) {
- var hsl = tinycolor(color).toHsl();
- var hue = (hsl.h + amount) % 360;
- hsl.h = hue < 0 ? 360 + hue : hue;
- return tinycolor(hsl);
- }
- // Combination Functions
- // ---------------------
- // Thanks to jQuery xColor for some of the ideas behind these
- // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
- function complement(color) {
- var hsl = tinycolor(color).toHsl();
- hsl.h = (hsl.h + 180) % 360;
- return tinycolor(hsl);
- }
- function triad(color) {
- var hsl = tinycolor(color).toHsl();
- var h = hsl.h;
- return [
- tinycolor(color),
- tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
- tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
- ];
- }
- function tetrad(color) {
- var hsl = tinycolor(color).toHsl();
- var h = hsl.h;
- return [
- tinycolor(color),
- tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
- tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
- tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
- ];
- }
- function splitcomplement(color) {
- var hsl = tinycolor(color).toHsl();
- var h = hsl.h;
- return [
- tinycolor(color),
- tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
- tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
- ];
- }
- function analogous(color, results, slices) {
- results = results || 6;
- slices = slices || 30;
- var hsl = tinycolor(color).toHsl();
- var part = 360 / slices;
- var ret = [tinycolor(color)];
- for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
- hsl.h = (hsl.h + part) % 360;
- ret.push(tinycolor(hsl));
- }
- return ret;
- }
- function monochromatic(color, results) {
- results = results || 6;
- var hsv = tinycolor(color).toHsv();
- var h = hsv.h, s = hsv.s, v = hsv.v;
- var ret = [];
- var modification = 1 / results;
- while (results--) {
- ret.push(tinycolor({ h: h, s: s, v: v}));
- v = (v + modification) % 1;
- }
- return ret;
- }
- // Utility Functions
- // ---------------------
- tinycolor.mix = function(color1, color2, amount) {
- amount = (amount === 0) ? 0 : (amount || 50);
- var rgb1 = tinycolor(color1).toRgb();
- var rgb2 = tinycolor(color2).toRgb();
- var p = amount / 100;
- var rgba = {
- r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
- g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
- b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
- a: ((rgb2.a - rgb1.a) * p) + rgb1.a
- };
- return tinycolor(rgba);
- };
- // Readability Functions
- // ---------------------
- // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
- // `contrast`
- // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
- tinycolor.readability = function(color1, color2) {
- var c1 = tinycolor(color1);
- var c2 = tinycolor(color2);
- return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
- };
- // `isReadable`
- // Ensure that foreground and background color combinations meet WCAG2 guidelines.
- // The third argument is an optional Object.
- // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
- // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
- // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
- // *Example*
- // tinycolor.isReadable("#000", "#111") => false
- // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
- tinycolor.isReadable = function(color1, color2, wcag2) {
- var readability = tinycolor.readability(color1, color2);
- var wcag2Parms, out;
- out = false;
- wcag2Parms = validateWCAG2Parms(wcag2);
- switch (wcag2Parms.level + wcag2Parms.size) {
- case "AAsmall":
- case "AAAlarge":
- out = readability >= 4.5;
- break;
- case "AAlarge":
- out = readability >= 3;
- break;
- case "AAAsmall":
- out = readability >= 7;
- break;
- }
- return out;
- };
- // `mostReadable`
- // Given a base color and a list of possible foreground or background
- // colors for that base, returns the most readable color.
- // Optionally returns Black or White if the most readable color is unreadable.
- // *Example*
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
- tinycolor.mostReadable = function(baseColor, colorList, args) {
- var bestColor = null;
- var bestScore = 0;
- var readability;
- var includeFallbackColors, level, size ;
- args = args || {};
- includeFallbackColors = args.includeFallbackColors ;
- level = args.level;
- size = args.size;
- for (var i= 0; i < colorList.length ; i++) {
- readability = tinycolor.readability(baseColor, colorList[i]);
- if (readability > bestScore) {
- bestScore = readability;
- bestColor = tinycolor(colorList[i]);
- }
- }
- if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
- return bestColor;
- }
- else {
- args.includeFallbackColors=false;
- return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
- }
- };
- // Big List of Colors
- // ------------------
- // <http://www.w3.org/TR/css3-color/#svg-color>
- var names = tinycolor.names = {
- aliceblue: "f0f8ff",
- antiquewhite: "faebd7",
- aqua: "0ff",
- aquamarine: "7fffd4",
- azure: "f0ffff",
- beige: "f5f5dc",
- bisque: "ffe4c4",
- black: "000",
- blanchedalmond: "ffebcd",
- blue: "00f",
- blueviolet: "8a2be2",
- brown: "a52a2a",
- burlywood: "deb887",
- burntsienna: "ea7e5d",
- cadetblue: "5f9ea0",
- chartreuse: "7fff00",
- chocolate: "d2691e",
- coral: "ff7f50",
- cornflowerblue: "6495ed",
- cornsilk: "fff8dc",
- crimson: "dc143c",
- cyan: "0ff",
- darkblue: "00008b",
- darkcyan: "008b8b",
- darkgoldenrod: "b8860b",
- darkgray: "a9a9a9",
- darkgreen: "006400",
- darkgrey: "a9a9a9",
- darkkhaki: "bdb76b",
- darkmagenta: "8b008b",
- darkolivegreen: "556b2f",
- darkorange: "ff8c00",
- darkorchid: "9932cc",
- darkred: "8b0000",
- darksalmon: "e9967a",
- darkseagreen: "8fbc8f",
- darkslateblue: "483d8b",
- darkslategray: "2f4f4f",
- darkslategrey: "2f4f4f",
- darkturquoise: "00ced1",
- darkviolet: "9400d3",
- deeppink: "ff1493",
- deepskyblue: "00bfff",
- dimgray: "696969",
- dimgrey: "696969",
- dodgerblue: "1e90ff",
- firebrick: "b22222",
- floralwhite: "fffaf0",
- forestgreen: "228b22",
- fuchsia: "f0f",
- gainsboro: "dcdcdc",
- ghostwhite: "f8f8ff",
- gold: "ffd700",
- goldenrod: "daa520",
- gray: "808080",
- green: "008000",
- greenyellow: "adff2f",
- grey: "808080",
- honeydew: "f0fff0",
- hotpink: "ff69b4",
- indianred: "cd5c5c",
- indigo: "4b0082",
- ivory: "fffff0",
- khaki: "f0e68c",
- lavender: "e6e6fa",
- lavenderblush: "fff0f5",
- lawngreen: "7cfc00",
- lemonchiffon: "fffacd",
- lightblue: "add8e6",
- lightcoral: "f08080",
- lightcyan: "e0ffff",
- lightgoldenrodyellow: "fafad2",
- lightgray: "d3d3d3",
- lightgreen: "90ee90",
- lightgrey: "d3d3d3",
- lightpink: "ffb6c1",
- lightsalmon: "ffa07a",
- lightseagreen: "20b2aa",
- lightskyblue: "87cefa",
- lightslategray: "789",
- lightslategrey: "789",
- lightsteelblue: "b0c4de",
- lightyellow: "ffffe0",
- lime: "0f0",
- limegreen: "32cd32",
- linen: "faf0e6",
- magenta: "f0f",
- maroon: "800000",
- mediumaquamarine: "66cdaa",
- mediumblue: "0000cd",
- mediumorchid: "ba55d3",
- mediumpurple: "9370db",
- mediumseagreen: "3cb371",
- mediumslateblue: "7b68ee",
- mediumspringgreen: "00fa9a",
- mediumturquoise: "48d1cc",
- mediumvioletred: "c71585",
- midnightblue: "191970",
- mintcream: "f5fffa",
- mistyrose: "ffe4e1",
- moccasin: "ffe4b5",
- navajowhite: "ffdead",
- navy: "000080",
- oldlace: "fdf5e6",
- olive: "808000",
- olivedrab: "6b8e23",
- orange: "ffa500",
- orangered: "ff4500",
- orchid: "da70d6",
- palegoldenrod: "eee8aa",
- palegreen: "98fb98",
- paleturquoise: "afeeee",
- palevioletred: "db7093",
- papayawhip: "ffefd5",
- peachpuff: "ffdab9",
- peru: "cd853f",
- pink: "ffc0cb",
- plum: "dda0dd",
- powderblue: "b0e0e6",
- purple: "800080",
- rebeccapurple: "663399",
- red: "f00",
- rosybrown: "bc8f8f",
- royalblue: "4169e1",
- saddlebrown: "8b4513",
- salmon: "fa8072",
- sandybrown: "f4a460",
- seagreen: "2e8b57",
- seashell: "fff5ee",
- sienna: "a0522d",
- silver: "c0c0c0",
- skyblue: "87ceeb",
- slateblue: "6a5acd",
- slategray: "708090",
- slategrey: "708090",
- snow: "fffafa",
- springgreen: "00ff7f",
- steelblue: "4682b4",
- tan: "d2b48c",
- teal: "008080",
- thistle: "d8bfd8",
- tomato: "ff6347",
- turquoise: "40e0d0",
- violet: "ee82ee",
- wheat: "f5deb3",
- white: "fff",
- whitesmoke: "f5f5f5",
- yellow: "ff0",
- yellowgreen: "9acd32"
- };
- // Make it easy to access colors via `hexNames[hex]`
- var hexNames = tinycolor.hexNames = flip(names);
- // Utilities
- // ---------
- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
- function flip(o) {
- var flipped = { };
- for (var i in o) {
- if (o.hasOwnProperty(i)) {
- flipped[o[i]] = i;
- }
- }
- return flipped;
- }
- // Return a valid alpha value [0,1] with all invalid values being set to 1
- function boundAlpha(a) {
- a = parseFloat(a);
- if (isNaN(a) || a < 0 || a > 1) {
- a = 1;
- }
- return a;
- }
- // Take input from [0, n] and return it as [0, 1]
- function bound01(n, max) {
- if (isOnePointZero(n)) { n = "100%"; }
- var processPercent = isPercentage(n);
- n = mathMin(max, mathMax(0, parseFloat(n)));
- // Automatically convert percentage into number
- if (processPercent) {
- n = parseInt(n * max, 10) / 100;
- }
- // Handle floating point rounding errors
- if ((Math.abs(n - max) < 0.000001)) {
- return 1;
- }
- // Convert into [0, 1] range if it isn't already
- return (n % max) / parseFloat(max);
- }
- // Force a number between 0 and 1
- function clamp01(val) {
- return mathMin(1, mathMax(0, val));
- }
- // Parse a base-16 hex value into a base-10 integer
- function parseIntFromHex(val) {
- return parseInt(val, 16);
- }
- // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
- // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
- function isOnePointZero(n) {
- return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
- }
- // Check to see if string passed in is a percentage
- function isPercentage(n) {
- return typeof n === "string" && n.indexOf('%') != -1;
- }
- // Force a hex value to have 2 characters
- function pad2(c) {
- return c.length == 1 ? '0' + c : '' + c;
- }
- // Replace a decimal with it's percentage value
- function convertToPercentage(n) {
- if (n <= 1) {
- n = (n * 100) + "%";
- }
- return n;
- }
- // Converts a decimal to a hex value
- function convertDecimalToHex(d) {
- return Math.round(parseFloat(d) * 255).toString(16);
- }
- // Converts a hex value to a decimal
- function convertHexToDecimal(h) {
- return (parseIntFromHex(h) / 255);
- }
- var matchers = (function() {
- // <http://www.w3.org/TR/css3-values/#integers>
- var CSS_INTEGER = "[-\\+]?\\d+%?";
- // <http://www.w3.org/TR/css3-values/#number-value>
- var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
- // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
- // Actual matching.
- // Parentheses and commas are optional, but not required.
- // Whitespace can take the place of commas or opening paren
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
- return {
- CSS_UNIT: new RegExp(CSS_UNIT),
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
- };
- })();
- // `isValidCSSUnit`
- // Take in a single string / number and check to see if it looks like a CSS unit
- // (see `matchers` above for definition).
- function isValidCSSUnit(color) {
- return !!matchers.CSS_UNIT.exec(color);
- }
- // `stringInputToObject`
- // Permissive string parsing. Take in a number of formats, and output an object
- // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
- function stringInputToObject(color) {
- color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
- var named = false;
- if (names[color]) {
- color = names[color];
- named = true;
- }
- else if (color == 'transparent') {
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
- }
- // Try to match string input using regular expressions.
- // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
- // Just return an object and let the conversion functions handle that.
- // This way the result will be the same whether the tinycolor is initialized with string or object.
- var match;
- if ((match = matchers.rgb.exec(color))) {
- return { r: match[1], g: match[2], b: match[3] };
- }
- if ((match = matchers.rgba.exec(color))) {
- return { r: match[1], g: match[2], b: match[3], a: match[4] };
- }
- if ((match = matchers.hsl.exec(color))) {
- return { h: match[1], s: match[2], l: match[3] };
- }
- if ((match = matchers.hsla.exec(color))) {
- return { h: match[1], s: match[2], l: match[3], a: match[4] };
- }
- if ((match = matchers.hsv.exec(color))) {
- return { h: match[1], s: match[2], v: match[3] };
- }
- if ((match = matchers.hsva.exec(color))) {
- return { h: match[1], s: match[2], v: match[3], a: match[4] };
- }
- if ((match = matchers.hex8.exec(color))) {
- return {
- r: parseIntFromHex(match[1]),
- g: parseIntFromHex(match[2]),
- b: parseIntFromHex(match[3]),
- a: convertHexToDecimal(match[4]),
- format: named ? "name" : "hex8"
- };
- }
- if ((match = matchers.hex6.exec(color))) {
- return {
- r: parseIntFromHex(match[1]),
- g: parseIntFromHex(match[2]),
- b: parseIntFromHex(match[3]),
- format: named ? "name" : "hex"
- };
- }
- if ((match = matchers.hex4.exec(color))) {
- return {
- r: parseIntFromHex(match[1] + '' + match[1]),
- g: parseIntFromHex(match[2] + '' + match[2]),
- b: parseIntFromHex(match[3] + '' + match[3]),
- a: convertHexToDecimal(match[4] + '' + match[4]),
- format: named ? "name" : "hex8"
- };
- }
- if ((match = matchers.hex3.exec(color))) {
- return {
- r: parseIntFromHex(match[1] + '' + match[1]),
- g: parseIntFromHex(match[2] + '' + match[2]),
- b: parseIntFromHex(match[3] + '' + match[3]),
- format: named ? "name" : "hex"
- };
- }
- return false;
- }
- function validateWCAG2Parms(parms) {
- // return valid WCAG2 parms for isReadable.
- // If input parms are invalid, return {"level":"AA", "size":"small"}
- var level, size;
- parms = parms || {"level":"AA", "size":"small"};
- level = (parms.level || "AA").toUpperCase();
- size = (parms.size || "small").toLowerCase();
- if (level !== "AA" && level !== "AAA") {
- level = "AA";
- }
- if (size !== "small" && size !== "large") {
- size = "small";
- }
- return {"level":level, "size":size};
- }
- // Node: Export function
- if (typeof module !== "undefined" && module.exports) {
- module.exports = tinycolor;
- }
- // AMD/requirejs: Define the module
- else if (true) {
- !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- }
- // Browser: Expose to window
- else {
- window.tinycolor = tinycolor;
- }
- })(Math);
- /***/ }),
- /* 28 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(29);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("0f73e73c", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-441174dc\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./EditableInput.vue", function() {
- var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-441174dc\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./EditableInput.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 29 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-editable-input {\n position: relative;\n}\n.vc-input__input {\n padding: 0;\n border: 0;\n outline: none;\n}\n.vc-input__label {\n text-transform: capitalize;\n}\n", ""]);
- // exports
- /***/ }),
- /* 30 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("div", { staticClass: "vc-editable-input" }, [
- _c("input", {
- directives: [
- { name: "model", rawName: "v-model", value: _vm.val, expression: "val" }
- ],
- ref: "input",
- staticClass: "vc-input__input",
- attrs: { "aria-labelledby": _vm.labelId },
- domProps: { value: _vm.val },
- on: {
- keydown: _vm.handleKeyDown,
- input: [
- function($event) {
- if ($event.target.composing) {
- return
- }
- _vm.val = $event.target.value
- },
- _vm.update
- ]
- }
- }),
- _vm._v(" "),
- _c(
- "span",
- {
- staticClass: "vc-input__label",
- attrs: { for: _vm.label, id: _vm.labelId }
- },
- [_vm._v(_vm._s(_vm.labelSpanText))]
- ),
- _vm._v(" "),
- _c("span", { staticClass: "vc-input__desc" }, [_vm._v(_vm._s(_vm.desc))])
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-441174dc", esExports)
- }
- }
- /***/ }),
- /* 31 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- staticClass: "vc-compact",
- attrs: { role: "application", "aria-label": "Compact color picker" }
- },
- [
- _c(
- "ul",
- { staticClass: "vc-compact-colors", attrs: { role: "listbox" } },
- _vm._l(_vm.paletteUpperCase(_vm.palette), function(c) {
- return _c(
- "li",
- {
- key: c,
- staticClass: "vc-compact-color-item",
- class: { "vc-compact-color-item--white": c === "#FFFFFF" },
- style: { background: c },
- attrs: {
- role: "option",
- "aria-label": "color:" + c,
- "aria-selected": c === _vm.pick
- },
- on: {
- click: function($event) {
- _vm.handlerClick(c)
- }
- }
- },
- [
- _c("div", {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: c === _vm.pick,
- expression: "c === pick"
- }
- ],
- staticClass: "vc-compact-dot"
- })
- ]
- )
- })
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-648423a3", esExports)
- }
- }
- /***/ }),
- /* 32 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__ = __webpack_require__(11);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ad047d72_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Grayscale_vue__ = __webpack_require__(35);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(33)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Grayscale_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ad047d72_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Grayscale_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Grayscale.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-ad047d72", Component.options)
- } else {
- hotAPI.reload("data-v-ad047d72", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 33 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(34);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("21ddbb74", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ad047d72\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Grayscale.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ad047d72\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Grayscale.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 34 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-grayscale {\n width: 125px;\n border-radius: 2px;\n box-shadow: 0 2px 15px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-grayscale-colors {\n border-radius: 2px;\n overflow: hidden;\n padding: 0;\n margin: 0;\n}\n.vc-grayscale-color-item {\n list-style: none;\n width: 25px;\n height: 25px;\n float: left;\n position: relative;\n cursor: pointer;\n}\n.vc-grayscale-color-item--white .vc-grayscale-dot {\n background: #000;\n}\n.vc-grayscale-dot {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 6px;\n height: 6px;\n margin: -3px 0 0 -2px;\n border-radius: 50%;\n opacity: 1;\n background: #fff;\n}\n", ""]);
- // exports
- /***/ }),
- /* 35 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- staticClass: "vc-grayscale",
- attrs: { role: "application", "aria-label": "Grayscale color picker" }
- },
- [
- _c(
- "ul",
- { staticClass: "vc-grayscale-colors", attrs: { role: "listbox" } },
- _vm._l(_vm.paletteUpperCase(_vm.palette), function(c) {
- return _c(
- "li",
- {
- key: c,
- staticClass: "vc-grayscale-color-item",
- class: { "vc-grayscale-color-item--white": c == "#FFFFFF" },
- style: { background: c },
- attrs: {
- role: "option",
- "aria-label": "Color:" + c,
- "aria-selected": c === _vm.pick
- },
- on: {
- click: function($event) {
- _vm.handlerClick(c)
- }
- }
- },
- [
- _c("div", {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: c === _vm.pick,
- expression: "c === pick"
- }
- ],
- staticClass: "vc-grayscale-dot"
- })
- ]
- )
- })
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ad047d72", esExports)
- }
- }
- /***/ }),
- /* 36 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__ = __webpack_require__(12);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ac92cc52_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Material_vue__ = __webpack_require__(39);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(37)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Material_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ac92cc52_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Material_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Material.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-ac92cc52", Component.options)
- } else {
- hotAPI.reload("data-v-ac92cc52", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 37 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(38);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("1ff3af73", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ac92cc52\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Material.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ac92cc52\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Material.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 38 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-material {\n width: 98px;\n height: 98px;\n padding: 16px;\n font-family: \"Roboto\";\n position: relative;\n border-radius: 2px;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n background-color: #fff;\n}\n.vc-material .vc-input__input {\n width: 100%;\n margin-top: 12px;\n font-size: 15px;\n color: #333;\n height: 30px;\n}\n.vc-material .vc-input__label {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 11px;\n color: #999;\n text-transform: capitalize;\n}\n.vc-material-hex {\n border-bottom-width: 2px;\n border-bottom-style: solid;\n}\n.vc-material-split {\n display: flex;\n margin-right: -10px;\n padding-top: 11px;\n}\n.vc-material-third {\n flex: 1;\n padding-right: 10px;\n}\n", ""]);
- // exports
- /***/ }),
- /* 39 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- staticClass: "vc-material",
- attrs: { role: "application", "aria-label": "Material color picker" }
- },
- [
- _c("ed-in", {
- staticClass: "vc-material-hex",
- style: { borderColor: _vm.colors.hex },
- attrs: { label: "hex" },
- on: { change: _vm.onChange },
- model: {
- value: _vm.colors.hex,
- callback: function($$v) {
- _vm.$set(_vm.colors, "hex", $$v)
- },
- expression: "colors.hex"
- }
- }),
- _vm._v(" "),
- _c("div", { staticClass: "vc-material-split" }, [
- _c(
- "div",
- { staticClass: "vc-material-third" },
- [
- _c("ed-in", {
- attrs: { label: "r" },
- on: { change: _vm.onChange },
- model: {
- value: _vm.colors.rgba.r,
- callback: function($$v) {
- _vm.$set(_vm.colors.rgba, "r", $$v)
- },
- expression: "colors.rgba.r"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-material-third" },
- [
- _c("ed-in", {
- attrs: { label: "g" },
- on: { change: _vm.onChange },
- model: {
- value: _vm.colors.rgba.g,
- callback: function($$v) {
- _vm.$set(_vm.colors.rgba, "g", $$v)
- },
- expression: "colors.rgba.g"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-material-third" },
- [
- _c("ed-in", {
- attrs: { label: "b" },
- on: { change: _vm.onChange },
- model: {
- value: _vm.colors.rgba.b,
- callback: function($$v) {
- _vm.$set(_vm.colors.rgba, "b", $$v)
- },
- expression: "colors.rgba.b"
- }
- })
- ],
- 1
- )
- ])
- ],
- 1
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ac92cc52", esExports)
- }
- }
- /***/ }),
- /* 40 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__ = __webpack_require__(13);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2dedc691_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__ = __webpack_require__(46);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(41)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2dedc691_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Slider.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-2dedc691", Component.options)
- } else {
- hotAPI.reload("data-v-2dedc691", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 41 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(42);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("7982aa43", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2dedc691\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Slider.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2dedc691\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Slider.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-slider {\n position: relative;\n width: 410px;\n}\n.vc-slider-hue-warp {\n height: 12px;\n position: relative;\n}\n.vc-slider-hue-warp .vc-hue-picker {\n width: 14px;\n height: 14px;\n border-radius: 6px;\n transform: translate(-7px, -2px);\n background-color: rgb(248, 248, 248);\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);\n}\n.vc-slider-swatches {\n display: flex;\n margin-top: 20px;\n}\n.vc-slider-swatch {\n margin-right: 1px;\n flex: 1;\n width: 20%;\n}\n.vc-slider-swatch:first-child {\n margin-right: 1px;\n}\n.vc-slider-swatch:first-child .vc-slider-swatch-picker {\n border-radius: 2px 0px 0px 2px;\n}\n.vc-slider-swatch:last-child {\n margin-right: 0;\n}\n.vc-slider-swatch:last-child .vc-slider-swatch-picker {\n border-radius: 0px 2px 2px 0px;\n}\n.vc-slider-swatch-picker {\n cursor: pointer;\n height: 12px;\n}\n.vc-slider-swatch-picker--active {\n transform: scaleY(1.8);\n border-radius: 3.6px/2px;\n}\n.vc-slider-swatch-picker--white {\n box-shadow: inset 0 0 0 1px #ddd;\n}\n.vc-slider-swatch-picker--active.vc-slider-swatch-picker--white {\n box-shadow: inset 0 0 0 0.6px #ddd;\n}\n", ""]);
- // exports
- /***/ }),
- /* 43 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(44);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("7c5f1a1c", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-7b9aea78\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Hue.vue", function() {
- var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-7b9aea78\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Hue.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 44 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-hue {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n border-radius: 2px;\n}\n.vc-hue--horizontal {\n background: -webkit-linear-gradient(0deg, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n}\n.vc-hue--vertical {\n background: -webkit-linear-gradient(top, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n}\n.vc-hue-container {\n cursor: pointer;\n margin: 0 2px;\n position: relative;\n height: 100%;\n}\n.vc-hue-pointer {\n z-index: 2;\n position: absolute;\n}\n.vc-hue-picker {\n cursor: pointer;\n margin-top: 1px;\n width: 4px;\n border-radius: 1px;\n height: 8px;\n box-shadow: 0 0 2px rgba(0, 0, 0, .6);\n background: #fff;\n transform: translateX(-2px) ;\n}\n", ""]);
- // exports
- /***/ }),
- /* 45 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("div", { class: ["vc-hue", _vm.directionClass] }, [
- _c(
- "div",
- {
- ref: "container",
- staticClass: "vc-hue-container",
- attrs: {
- role: "slider",
- "aria-valuenow": _vm.colors.hsl.h,
- "aria-valuemin": "0",
- "aria-valuemax": "360"
- },
- on: {
- mousedown: _vm.handleMouseDown,
- touchmove: _vm.handleChange,
- touchstart: _vm.handleChange
- }
- },
- [
- _c(
- "div",
- {
- staticClass: "vc-hue-pointer",
- style: { top: _vm.pointerTop, left: _vm.pointerLeft },
- attrs: { role: "presentation" }
- },
- [_c("div", { staticClass: "vc-hue-picker" })]
- )
- ]
- )
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-7b9aea78", esExports)
- }
- }
- /***/ }),
- /* 46 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- staticClass: "vc-slider",
- attrs: { role: "application", "aria-label": "Slider color picker" }
- },
- [
- _c(
- "div",
- { staticClass: "vc-slider-hue-warp" },
- [
- _c("hue", {
- on: { change: _vm.hueChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-slider-swatches", attrs: { role: "group" } },
- _vm._l(_vm.swatches, function(offset, index) {
- return _c(
- "div",
- {
- key: index,
- staticClass: "vc-slider-swatch",
- attrs: {
- "data-index": index,
- "aria-label": "color:" + _vm.colors.hex,
- role: "button"
- },
- on: {
- click: function($event) {
- _vm.handleSwClick(index, offset)
- }
- }
- },
- [
- _c("div", {
- staticClass: "vc-slider-swatch-picker",
- class: {
- "vc-slider-swatch-picker--active": offset == _vm.activeOffset,
- "vc-slider-swatch-picker--white": offset === "1"
- },
- style: {
- background:
- "hsl(" + _vm.colors.hsl.h + ", 50%, " + offset * 100 + "%)"
- }
- })
- ]
- )
- })
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-2dedc691", esExports)
- }
- }
- /***/ }),
- /* 47 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__ = __webpack_require__(15);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2395c5cc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Swatches_vue__ = __webpack_require__(51);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(48)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Swatches_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2395c5cc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Swatches_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Swatches.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-2395c5cc", Component.options)
- } else {
- hotAPI.reload("data-v-2395c5cc", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 48 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(49);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("10f839a2", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2395c5cc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Swatches.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2395c5cc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Swatches.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 49 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-swatches {\n width: 320px;\n height: 240px;\n overflow-y: scroll;\n background-color: #fff;\n box-shadow: 0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16);\n}\n.vc-swatches-box {\n padding: 16px 0 6px 16px;\n overflow: hidden;\n}\n.vc-swatches-color-group {\n padding-bottom: 10px;\n width: 40px;\n float: left;\n margin-right: 10px;\n}\n.vc-swatches-color-it {\n box-sizing: border-box;\n width: 40px;\n height: 24px;\n cursor: pointer;\n background: #880e4f;\n margin-bottom: 1px;\n overflow: hidden;\n -ms-border-radius: 2px 2px 0 0;\n -moz-border-radius: 2px 2px 0 0;\n -o-border-radius: 2px 2px 0 0;\n -webkit-border-radius: 2px 2px 0 0;\n border-radius: 2px 2px 0 0;\n}\n.vc-swatches-color--white {\n border: 1px solid #DDD;\n}\n.vc-swatches-pick {\n fill: rgb(255, 255, 255);\n margin-left: 8px;\n display: block;\n}\n.vc-swatches-color--white .vc-swatches-pick {\n fill: rgb(51, 51, 51);\n}\n", ""]);
- // exports
- /***/ }),
- /* 50 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "red", function() { return red; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pink", function() { return pink; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "purple", function() { return purple; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepPurple", function() { return deepPurple; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indigo", function() { return indigo; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blue", function() { return blue; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightBlue", function() { return lightBlue; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cyan", function() { return cyan; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "teal", function() { return teal; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "green", function() { return green; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightGreen", function() { return lightGreen; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lime", function() { return lime; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yellow", function() { return yellow; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amber", function() { return amber; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orange", function() { return orange; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepOrange", function() { return deepOrange; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brown", function() { return brown; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "grey", function() { return grey; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blueGrey", function() { return blueGrey; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkText", function() { return darkText; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightText", function() { return lightText; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darkIcons", function() { return darkIcons; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lightIcons", function() { return lightIcons; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "white", function() { return white; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "black", function() { return black; });
- var red = {"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c","a100":"#ff8a80","a200":"#ff5252","a400":"#ff1744","a700":"#d50000"};
- var pink = {"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f","a100":"#ff80ab","a200":"#ff4081","a400":"#f50057","a700":"#c51162"};
- var purple = {"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c","a100":"#ea80fc","a200":"#e040fb","a400":"#d500f9","a700":"#aa00ff"};
- var deepPurple = {"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92","a100":"#b388ff","a200":"#7c4dff","a400":"#651fff","a700":"#6200ea"};
- var indigo = {"50":"#e8eaf6","100":"#c5cae9","200":"#9fa8da","300":"#7986cb","400":"#5c6bc0","500":"#3f51b5","600":"#3949ab","700":"#303f9f","800":"#283593","900":"#1a237e","a100":"#8c9eff","a200":"#536dfe","a400":"#3d5afe","a700":"#304ffe"};
- var blue = {"50":"#e3f2fd","100":"#bbdefb","200":"#90caf9","300":"#64b5f6","400":"#42a5f5","500":"#2196f3","600":"#1e88e5","700":"#1976d2","800":"#1565c0","900":"#0d47a1","a100":"#82b1ff","a200":"#448aff","a400":"#2979ff","a700":"#2962ff"};
- var lightBlue = {"50":"#e1f5fe","100":"#b3e5fc","200":"#81d4fa","300":"#4fc3f7","400":"#29b6f6","500":"#03a9f4","600":"#039be5","700":"#0288d1","800":"#0277bd","900":"#01579b","a100":"#80d8ff","a200":"#40c4ff","a400":"#00b0ff","a700":"#0091ea"};
- var cyan = {"50":"#e0f7fa","100":"#b2ebf2","200":"#80deea","300":"#4dd0e1","400":"#26c6da","500":"#00bcd4","600":"#00acc1","700":"#0097a7","800":"#00838f","900":"#006064","a100":"#84ffff","a200":"#18ffff","a400":"#00e5ff","a700":"#00b8d4"};
- var teal = {"50":"#e0f2f1","100":"#b2dfdb","200":"#80cbc4","300":"#4db6ac","400":"#26a69a","500":"#009688","600":"#00897b","700":"#00796b","800":"#00695c","900":"#004d40","a100":"#a7ffeb","a200":"#64ffda","a400":"#1de9b6","a700":"#00bfa5"};
- var green = {"50":"#e8f5e9","100":"#c8e6c9","200":"#a5d6a7","300":"#81c784","400":"#66bb6a","500":"#4caf50","600":"#43a047","700":"#388e3c","800":"#2e7d32","900":"#1b5e20","a100":"#b9f6ca","a200":"#69f0ae","a400":"#00e676","a700":"#00c853"};
- var lightGreen = {"50":"#f1f8e9","100":"#dcedc8","200":"#c5e1a5","300":"#aed581","400":"#9ccc65","500":"#8bc34a","600":"#7cb342","700":"#689f38","800":"#558b2f","900":"#33691e","a100":"#ccff90","a200":"#b2ff59","a400":"#76ff03","a700":"#64dd17"};
- var lime = {"50":"#f9fbe7","100":"#f0f4c3","200":"#e6ee9c","300":"#dce775","400":"#d4e157","500":"#cddc39","600":"#c0ca33","700":"#afb42b","800":"#9e9d24","900":"#827717","a100":"#f4ff81","a200":"#eeff41","a400":"#c6ff00","a700":"#aeea00"};
- var yellow = {"50":"#fffde7","100":"#fff9c4","200":"#fff59d","300":"#fff176","400":"#ffee58","500":"#ffeb3b","600":"#fdd835","700":"#fbc02d","800":"#f9a825","900":"#f57f17","a100":"#ffff8d","a200":"#ffff00","a400":"#ffea00","a700":"#ffd600"};
- var amber = {"50":"#fff8e1","100":"#ffecb3","200":"#ffe082","300":"#ffd54f","400":"#ffca28","500":"#ffc107","600":"#ffb300","700":"#ffa000","800":"#ff8f00","900":"#ff6f00","a100":"#ffe57f","a200":"#ffd740","a400":"#ffc400","a700":"#ffab00"};
- var orange = {"50":"#fff3e0","100":"#ffe0b2","200":"#ffcc80","300":"#ffb74d","400":"#ffa726","500":"#ff9800","600":"#fb8c00","700":"#f57c00","800":"#ef6c00","900":"#e65100","a100":"#ffd180","a200":"#ffab40","a400":"#ff9100","a700":"#ff6d00"};
- var deepOrange = {"50":"#fbe9e7","100":"#ffccbc","200":"#ffab91","300":"#ff8a65","400":"#ff7043","500":"#ff5722","600":"#f4511e","700":"#e64a19","800":"#d84315","900":"#bf360c","a100":"#ff9e80","a200":"#ff6e40","a400":"#ff3d00","a700":"#dd2c00"};
- var brown = {"50":"#efebe9","100":"#d7ccc8","200":"#bcaaa4","300":"#a1887f","400":"#8d6e63","500":"#795548","600":"#6d4c41","700":"#5d4037","800":"#4e342e","900":"#3e2723"};
- var grey = {"50":"#fafafa","100":"#f5f5f5","200":"#eeeeee","300":"#e0e0e0","400":"#bdbdbd","500":"#9e9e9e","600":"#757575","700":"#616161","800":"#424242","900":"#212121"};
- var blueGrey = {"50":"#eceff1","100":"#cfd8dc","200":"#b0bec5","300":"#90a4ae","400":"#78909c","500":"#607d8b","600":"#546e7a","700":"#455a64","800":"#37474f","900":"#263238"};
- var darkText = {"primary":"rgba(0, 0, 0, 0.87)","secondary":"rgba(0, 0, 0, 0.54)","disabled":"rgba(0, 0, 0, 0.38)","dividers":"rgba(0, 0, 0, 0.12)"};
- var lightText = {"primary":"rgba(255, 255, 255, 1)","secondary":"rgba(255, 255, 255, 0.7)","disabled":"rgba(255, 255, 255, 0.5)","dividers":"rgba(255, 255, 255, 0.12)"};
- var darkIcons = {"active":"rgba(0, 0, 0, 0.54)","inactive":"rgba(0, 0, 0, 0.38)"};
- var lightIcons = {"active":"rgba(255, 255, 255, 1)","inactive":"rgba(255, 255, 255, 0.5)"};
- var white = "#ffffff";
- var black = "#000000";
- /* harmony default export */ __webpack_exports__["default"] = ({
- red: red,
- pink: pink,
- purple: purple,
- deepPurple: deepPurple,
- indigo: indigo,
- blue: blue,
- lightBlue: lightBlue,
- cyan: cyan,
- teal: teal,
- green: green,
- lightGreen: lightGreen,
- lime: lime,
- yellow: yellow,
- amber: amber,
- orange: orange,
- deepOrange: deepOrange,
- brown: brown,
- grey: grey,
- blueGrey: blueGrey,
- darkText: darkText,
- lightText: lightText,
- darkIcons: darkIcons,
- lightIcons: lightIcons,
- white: white,
- black: black
- });
- /***/ }),
- /* 51 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- staticClass: "vc-swatches",
- attrs: {
- role: "application",
- "aria-label": "Swatches color picker",
- "data-pick": _vm.pick
- }
- },
- [
- _c(
- "div",
- { staticClass: "vc-swatches-box", attrs: { role: "listbox" } },
- _vm._l(_vm.palette, function(group, $idx) {
- return _c(
- "div",
- { key: $idx, staticClass: "vc-swatches-color-group" },
- _vm._l(group, function(c) {
- return _c(
- "div",
- {
- key: c,
- class: [
- "vc-swatches-color-it",
- { "vc-swatches-color--white": c === "#FFFFFF" }
- ],
- style: { background: c },
- attrs: {
- role: "option",
- "aria-label": "Color:" + c,
- "aria-selected": _vm.equal(c),
- "data-color": c
- },
- on: {
- click: function($event) {
- _vm.handlerClick(c)
- }
- }
- },
- [
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.equal(c),
- expression: "equal(c)"
- }
- ],
- staticClass: "vc-swatches-pick"
- },
- [
- _c(
- "svg",
- {
- staticStyle: { width: "24px", height: "24px" },
- attrs: { viewBox: "0 0 24 24" }
- },
- [
- _c("path", {
- attrs: {
- d:
- "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
- }
- })
- ]
- )
- ]
- )
- ]
- )
- })
- )
- })
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-2395c5cc", esExports)
- }
- }
- /***/ }),
- /* 52 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__ = __webpack_require__(16);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_797d57b0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Photoshop_vue__ = __webpack_require__(67);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(53)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Photoshop_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_797d57b0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Photoshop_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Photoshop.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-797d57b0", Component.options)
- } else {
- hotAPI.reload("data-v-797d57b0", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 53 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(54);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("080365d4", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-797d57b0\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Photoshop.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-797d57b0\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Photoshop.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 54 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-photoshop {\n background: #DCDCDC;\n border-radius: 4px;\n box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15);\n box-sizing: initial;\n width: 513px;\n font-family: Roboto;\n}\n.vc-photoshop__disable-fields {\n width: 390px;\n}\n.vc-ps-head {\n background-image: -webkit-linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%);\n border-bottom: 1px solid #B1B1B1;\n box-shadow: inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02);\n height: 23px;\n line-height: 24px;\n border-radius: 4px 4px 0 0;\n font-size: 13px;\n color: #4D4D4D;\n text-align: center;\n}\n.vc-ps-body {\n padding: 15px;\n display: flex;\n}\n.vc-ps-saturation-wrap {\n width: 256px;\n height: 256px;\n position: relative;\n border: 2px solid #B3B3B3;\n border-bottom: 2px solid #F0F0F0;\n overflow: hidden;\n}\n.vc-ps-saturation-wrap .vc-saturation-circle {\n width: 12px;\n height: 12px;\n}\n.vc-ps-hue-wrap {\n position: relative;\n height: 256px;\n width: 19px;\n margin-left: 10px;\n border: 2px solid #B3B3B3;\n border-bottom: 2px solid #F0F0F0;\n}\n.vc-ps-hue-pointer {\n position: relative;\n}\n.vc-ps-hue-pointer--left,\n.vc-ps-hue-pointer--right {\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 0 5px 8px;\n border-color: transparent transparent transparent #555;\n}\n.vc-ps-hue-pointer--left:after,\n.vc-ps-hue-pointer--right:after {\n content: \"\";\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 4px 0 4px 6px;\n border-color: transparent transparent transparent #fff;\n position: absolute;\n top: 1px;\n left: 1px;\n transform: translate(-8px, -5px);\n}\n.vc-ps-hue-pointer--left {\n transform: translate(-13px, -4px);\n}\n.vc-ps-hue-pointer--right {\n transform: translate(20px, -4px) rotate(180deg);\n}\n.vc-ps-controls {\n width: 180px;\n margin-left: 10px;\n display: flex;\n}\n.vc-ps-controls__disable-fields {\n width: auto;\n}\n.vc-ps-actions {\n margin-left: 20px;\n flex: 1;\n}\n.vc-ps-ac-btn {\n cursor: pointer;\n background-image: -webkit-linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%);\n border: 1px solid #878787;\n border-radius: 2px;\n height: 20px;\n box-shadow: 0 1px 0 0 #EAEAEA;\n font-size: 14px;\n color: #000;\n line-height: 20px;\n text-align: center;\n margin-bottom: 10px;\n}\n.vc-ps-previews {\n width: 60px;\n}\n.vc-ps-previews__swatches {\n border: 1px solid #B3B3B3;\n border-bottom: 1px solid #F0F0F0;\n margin-bottom: 2px;\n margin-top: 1px;\n}\n.vc-ps-previews__pr-color {\n height: 34px;\n box-shadow: inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000;\n}\n.vc-ps-previews__label {\n font-size: 14px;\n color: #000;\n text-align: center;\n}\n.vc-ps-fields {\n padding-top: 5px;\n padding-bottom: 9px;\n width: 80px;\n position: relative;\n}\n.vc-ps-fields .vc-input__input {\n margin-left: 40%;\n width: 40%;\n height: 18px;\n border: 1px solid #888888;\n box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC;\n margin-bottom: 5px;\n font-size: 13px;\n padding-left: 3px;\n margin-right: 10px;\n}\n.vc-ps-fields .vc-input__label, .vc-ps-fields .vc-input__desc {\n top: 0;\n text-transform: uppercase;\n font-size: 13px;\n height: 18px;\n line-height: 22px;\n position: absolute;\n}\n.vc-ps-fields .vc-input__label {\n left: 0;\n width: 34px;\n}\n.vc-ps-fields .vc-input__desc {\n right: 0;\n width: 0;\n}\n.vc-ps-fields__divider {\n height: 5px;\n}\n.vc-ps-fields__hex .vc-input__input {\n margin-left: 20%;\n width: 80%;\n height: 18px;\n border: 1px solid #888888;\n box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC;\n margin-bottom: 6px;\n font-size: 13px;\n padding-left: 3px;\n}\n.vc-ps-fields__hex .vc-input__label {\n position: absolute;\n top: 0;\n left: 0;\n width: 14px;\n text-transform: uppercase;\n font-size: 13px;\n height: 18px;\n line-height: 22px;\n}\n", ""]);
- // exports
- /***/ }),
- /* 55 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(56);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("b5380e52", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ba139894\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Saturation.vue", function() {
- var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-ba139894\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Saturation.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 56 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-saturation,\n.vc-saturation--white,\n.vc-saturation--black {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.vc-saturation--white {\n background: -webkit-linear-gradient(left, #fff, rgba(255,255,255,0));\n}\n.vc-saturation--black {\n background: -webkit-linear-gradient(bottom, #000, rgba(0,0,0,0));\n}\n.vc-saturation-pointer {\n cursor: pointer;\n position: absolute;\n}\n.vc-saturation-circle {\n cursor: head;\n width: 4px;\n height: 4px;\n box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3), 0 0 1px 2px rgba(0,0,0,.4);\n border-radius: 50%;\n transform: translate(-2px, -2px);\n}\n", ""]);
- // exports
- /***/ }),
- /* 57 */
- /***/ (function(module, exports) {
- module.exports = clamp
- function clamp(value, min, max) {
- return min < max
- ? (value < min ? min : value > max ? max : value)
- : (value < max ? max : value > min ? min : value)
- }
- /***/ }),
- /* 58 */
- /***/ (function(module, exports, __webpack_require__) {
- /* WEBPACK VAR INJECTION */(function(global) {/**
- * lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
- /** Used as references for various `Number` constants. */
- var NAN = 0 / 0;
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g;
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
- /** Built-in method references without a dependency on `root`. */
- var freeParseInt = parseInt;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
- /** Used for built-in method references. */
- var objectProto = Object.prototype;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeMax = Math.max,
- nativeMin = Math.min;
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
- var now = function() {
- return root.Date.now();
- };
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- result = wait - timeSinceLastCall;
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
- }
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
- function trailingEdge(time) {
- timerId = undefined;
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
- function flush() {
- return timerId === undefined ? result : trailingEdge(now());
- }
- function debounced() {
- var time = now(),
- isInvoking = shouldInvoke(time);
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
- }
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
- module.exports = throttle;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(59)))
- /***/ }),
- /* 59 */
- /***/ (function(module, exports) {
- var g;
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
- try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
- } catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
- }
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
- module.exports = g;
- /***/ }),
- /* 60 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- ref: "container",
- staticClass: "vc-saturation",
- style: { background: _vm.bgColor },
- on: {
- mousedown: _vm.handleMouseDown,
- touchmove: _vm.handleChange,
- touchstart: _vm.handleChange
- }
- },
- [
- _c("div", { staticClass: "vc-saturation--white" }),
- _vm._v(" "),
- _c("div", { staticClass: "vc-saturation--black" }),
- _vm._v(" "),
- _c(
- "div",
- {
- staticClass: "vc-saturation-pointer",
- style: { top: _vm.pointerTop, left: _vm.pointerLeft }
- },
- [_c("div", { staticClass: "vc-saturation-circle" })]
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-ba139894", esExports)
- }
- }
- /***/ }),
- /* 61 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(62);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("4dc1b086", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1af1f1ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alpha.vue", function() {
- var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1af1f1ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alpha.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 62 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-alpha {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.vc-alpha-checkboard-wrap {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n overflow: hidden;\n}\n.vc-alpha-gradient {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.vc-alpha-container {\n cursor: pointer;\n position: relative;\n z-index: 2;\n height: 100%;\n margin: 0 3px;\n}\n.vc-alpha-pointer {\n z-index: 2;\n position: absolute;\n}\n.vc-alpha-picker {\n cursor: pointer;\n width: 4px;\n border-radius: 1px;\n height: 8px;\n box-shadow: 0 0 2px rgba(0, 0, 0, .6);\n background: #fff;\n margin-top: 1px;\n transform: translateX(-2px);\n}\n", ""]);
- // exports
- /***/ }),
- /* 63 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(64);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("7e15c05b", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5b6dc0c2\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkboard.vue", function() {
- var newContent = require("!!../../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5b6dc0c2\",\"scoped\":false,\"hasInlineConfig\":false}!../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkboard.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 64 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-checkerboard {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n background-size: contain;\n}\n", ""]);
- // exports
- /***/ }),
- /* 65 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("div", { staticClass: "vc-checkerboard", style: _vm.bgStyle })
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-5b6dc0c2", esExports)
- }
- }
- /***/ }),
- /* 66 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c("div", { staticClass: "vc-alpha" }, [
- _c(
- "div",
- { staticClass: "vc-alpha-checkboard-wrap" },
- [_c("checkboard")],
- 1
- ),
- _vm._v(" "),
- _c("div", {
- staticClass: "vc-alpha-gradient",
- style: { background: _vm.gradientColor }
- }),
- _vm._v(" "),
- _c(
- "div",
- {
- ref: "container",
- staticClass: "vc-alpha-container",
- on: {
- mousedown: _vm.handleMouseDown,
- touchmove: _vm.handleChange,
- touchstart: _vm.handleChange
- }
- },
- [
- _c(
- "div",
- {
- staticClass: "vc-alpha-pointer",
- style: { left: _vm.colors.a * 100 + "%" }
- },
- [_c("div", { staticClass: "vc-alpha-picker" })]
- )
- ]
- )
- ])
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-1af1f1ac", esExports)
- }
- }
- /***/ }),
- /* 67 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- class: [
- "vc-photoshop",
- _vm.disableFields ? "vc-photoshop__disable-fields" : ""
- ],
- attrs: { role: "application", "aria-label": "PhotoShop color picker" }
- },
- [
- _c("div", { staticClass: "vc-ps-head", attrs: { role: "heading" } }, [
- _vm._v(_vm._s(_vm.head))
- ]),
- _vm._v(" "),
- _c("div", { staticClass: "vc-ps-body" }, [
- _c(
- "div",
- { staticClass: "vc-ps-saturation-wrap" },
- [
- _c("saturation", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-ps-hue-wrap" },
- [
- _c(
- "hue",
- {
- attrs: { direction: "vertical" },
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- },
- [
- _c("div", { staticClass: "vc-ps-hue-pointer" }, [
- _c("i", { staticClass: "vc-ps-hue-pointer--left" }),
- _c("i", { staticClass: "vc-ps-hue-pointer--right" })
- ])
- ]
- )
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- {
- class: [
- "vc-ps-controls",
- _vm.disableFields ? "vc-ps-controls__disable-fields" : ""
- ]
- },
- [
- _c("div", { staticClass: "vc-ps-previews" }, [
- _c("div", { staticClass: "vc-ps-previews__label" }, [
- _vm._v(_vm._s(_vm.newLabel))
- ]),
- _vm._v(" "),
- _c("div", { staticClass: "vc-ps-previews__swatches" }, [
- _c("div", {
- staticClass: "vc-ps-previews__pr-color",
- style: { background: _vm.colors.hex },
- attrs: { "aria-label": "New color is " + _vm.colors.hex }
- }),
- _vm._v(" "),
- _c("div", {
- staticClass: "vc-ps-previews__pr-color",
- style: { background: _vm.currentColor },
- attrs: {
- "aria-label": "Current color is " + _vm.currentColor
- },
- on: { click: _vm.clickCurrentColor }
- })
- ]),
- _vm._v(" "),
- _c("div", { staticClass: "vc-ps-previews__label" }, [
- _vm._v(_vm._s(_vm.currentLabel))
- ])
- ]),
- _vm._v(" "),
- !_vm.disableFields
- ? _c("div", { staticClass: "vc-ps-actions" }, [
- _c(
- "div",
- {
- staticClass: "vc-ps-ac-btn",
- attrs: { role: "button", "aria-label": _vm.acceptLabel },
- on: { click: _vm.handleAccept }
- },
- [_vm._v(_vm._s(_vm.acceptLabel))]
- ),
- _vm._v(" "),
- _c(
- "div",
- {
- staticClass: "vc-ps-ac-btn",
- attrs: { role: "button", "aria-label": _vm.cancelLabel },
- on: { click: _vm.handleCancel }
- },
- [_vm._v(_vm._s(_vm.cancelLabel))]
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-ps-fields" },
- [
- _c("ed-in", {
- attrs: { label: "h", desc: "°", value: _vm.hsv.h },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("ed-in", {
- attrs: {
- label: "s",
- desc: "%",
- value: _vm.hsv.s,
- max: 100
- },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("ed-in", {
- attrs: {
- label: "v",
- desc: "%",
- value: _vm.hsv.v,
- max: 100
- },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("div", { staticClass: "vc-ps-fields__divider" }),
- _vm._v(" "),
- _c("ed-in", {
- attrs: { label: "r", value: _vm.colors.rgba.r },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("ed-in", {
- attrs: { label: "g", value: _vm.colors.rgba.g },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("ed-in", {
- attrs: { label: "b", value: _vm.colors.rgba.b },
- on: { change: _vm.inputChange }
- }),
- _vm._v(" "),
- _c("div", { staticClass: "vc-ps-fields__divider" }),
- _vm._v(" "),
- _c("ed-in", {
- staticClass: "vc-ps-fields__hex",
- attrs: { label: "#", value: _vm.hex },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _vm.hasResetButton
- ? _c(
- "div",
- {
- staticClass: "vc-ps-ac-btn",
- attrs: { "aria-label": "reset" },
- on: { click: _vm.handleReset }
- },
- [_vm._v(_vm._s(_vm.resetLabel))]
- )
- : _vm._e()
- ])
- : _vm._e()
- ]
- )
- ])
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-797d57b0", esExports)
- }
- }
- /***/ }),
- /* 68 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__ = __webpack_require__(20);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4491bbdc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Sketch_vue__ = __webpack_require__(71);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(69)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Sketch_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4491bbdc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Sketch_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Sketch.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-4491bbdc", Component.options)
- } else {
- hotAPI.reload("data-v-4491bbdc", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 69 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(70);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("612c6604", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-4491bbdc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Sketch.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-4491bbdc\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Sketch.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 70 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-sketch {\n position: relative;\n width: 200px;\n padding: 10px 10px 0;\n box-sizing: initial;\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 8px 16px rgba(0, 0, 0, .15);\n}\n.vc-sketch-saturation-wrap {\n width: 100%;\n padding-bottom: 75%;\n position: relative;\n overflow: hidden;\n}\n.vc-sketch-controls {\n display: flex;\n}\n.vc-sketch-sliders {\n padding: 4px 0;\n flex: 1;\n}\n.vc-sketch-sliders .vc-hue,\n.vc-sketch-sliders .vc-alpha-gradient {\n border-radius: 2px;\n}\n.vc-sketch-hue-wrap {\n position: relative;\n height: 10px;\n}\n.vc-sketch-alpha-wrap {\n position: relative;\n height: 10px;\n margin-top: 4px;\n overflow: hidden;\n}\n.vc-sketch-color-wrap {\n width: 24px;\n height: 24px;\n position: relative;\n margin-top: 4px;\n margin-left: 4px;\n border-radius: 3px;\n}\n.vc-sketch-active-color {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 2px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);\n z-index: 2;\n}\n.vc-sketch-color-wrap .vc-checkerboard {\n background-size: auto;\n}\n.vc-sketch-field {\n display: flex;\n padding-top: 4px;\n}\n.vc-sketch-field .vc-input__input {\n width: 90%;\n padding: 4px 0 3px 10%;\n border: none;\n box-shadow: inset 0 0 0 1px #ccc;\n font-size: 10px;\n}\n.vc-sketch-field .vc-input__label {\n display: block;\n text-align: center;\n font-size: 11px;\n color: #222;\n padding-top: 3px;\n padding-bottom: 4px;\n text-transform: capitalize;\n}\n.vc-sketch-field--single {\n flex: 1;\n padding-left: 6px;\n}\n.vc-sketch-field--double {\n flex: 2;\n}\n.vc-sketch-presets {\n margin-right: -10px;\n margin-left: -10px;\n padding-left: 10px;\n padding-top: 10px;\n border-top: 1px solid #eee;\n}\n.vc-sketch-presets-color {\n border-radius: 3px;\n overflow: hidden;\n position: relative;\n display: inline-block;\n margin: 0 10px 10px 0;\n vertical-align: top;\n cursor: pointer;\n width: 16px;\n height: 16px;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);\n}\n.vc-sketch-presets-color .vc-checkerboard {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);\n border-radius: 3px;\n}\n.vc-sketch__disable-alpha .vc-sketch-color-wrap {\n height: 10px;\n}\n", ""]);
- // exports
- /***/ }),
- /* 71 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- class: ["vc-sketch", _vm.disableAlpha ? "vc-sketch__disable-alpha" : ""],
- attrs: { role: "application", "aria-label": "Sketch color picker" }
- },
- [
- _c(
- "div",
- { staticClass: "vc-sketch-saturation-wrap" },
- [
- _c("saturation", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c("div", { staticClass: "vc-sketch-controls" }, [
- _c("div", { staticClass: "vc-sketch-sliders" }, [
- _c(
- "div",
- { staticClass: "vc-sketch-hue-wrap" },
- [
- _c("hue", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- !_vm.disableAlpha
- ? _c(
- "div",
- { staticClass: "vc-sketch-alpha-wrap" },
- [
- _c("alpha", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- )
- : _vm._e()
- ]),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-sketch-color-wrap" },
- [
- _c("div", {
- staticClass: "vc-sketch-active-color",
- style: { background: _vm.activeColor },
- attrs: { "aria-label": "Current color is " + _vm.activeColor }
- }),
- _vm._v(" "),
- _c("checkboard")
- ],
- 1
- )
- ]),
- _vm._v(" "),
- !_vm.disableFields
- ? _c("div", { staticClass: "vc-sketch-field" }, [
- _c(
- "div",
- { staticClass: "vc-sketch-field--double" },
- [
- _c("ed-in", {
- attrs: { label: "hex", value: _vm.hex },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-sketch-field--single" },
- [
- _c("ed-in", {
- attrs: { label: "r", value: _vm.colors.rgba.r },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-sketch-field--single" },
- [
- _c("ed-in", {
- attrs: { label: "g", value: _vm.colors.rgba.g },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-sketch-field--single" },
- [
- _c("ed-in", {
- attrs: { label: "b", value: _vm.colors.rgba.b },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- !_vm.disableAlpha
- ? _c(
- "div",
- { staticClass: "vc-sketch-field--single" },
- [
- _c("ed-in", {
- attrs: {
- label: "a",
- value: _vm.colors.a,
- "arrow-offset": 0.01,
- max: 1
- },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- )
- : _vm._e()
- ])
- : _vm._e(),
- _vm._v(" "),
- _c(
- "div",
- {
- staticClass: "vc-sketch-presets",
- attrs: {
- role: "group",
- "aria-label": "A color preset, pick one to set as current color"
- }
- },
- [
- _vm._l(_vm.presetColors, function(c) {
- return [
- !_vm.isTransparent(c)
- ? _c("div", {
- key: c,
- staticClass: "vc-sketch-presets-color",
- style: { background: c },
- attrs: { "aria-label": "Color:" + c },
- on: {
- click: function($event) {
- _vm.handlePreset(c)
- }
- }
- })
- : _c(
- "div",
- {
- key: c,
- staticClass: "vc-sketch-presets-color",
- attrs: { "aria-label": "Color:" + c },
- on: {
- click: function($event) {
- _vm.handlePreset(c)
- }
- }
- },
- [_c("checkboard")],
- 1
- )
- ]
- })
- ],
- 2
- )
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-4491bbdc", esExports)
- }
- }
- /***/ }),
- /* 72 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__ = __webpack_require__(21);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__);
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dbf8a8ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Chrome_vue__ = __webpack_require__(75);
- var disposed = false
- function injectStyle (ssrContext) {
- if (disposed) return
- __webpack_require__(73)
- }
- var normalizeComponent = __webpack_require__(2)
- /* script */
- /* template */
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = null
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Chrome_vue___default.a,
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dbf8a8ac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Chrome_vue__["a" /* default */],
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
- Component.options.__file = "src/components/Chrome.vue"
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-dbf8a8ac", Component.options)
- } else {
- hotAPI.reload("data-v-dbf8a8ac", Component.options)
- }
- module.hot.dispose(function (data) {
- disposed = true
- })
- })()}
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
- /***/ }),
- /* 73 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(74);
- if(typeof content === 'string') content = [[module.i, content, '']];
- if(content.locals) module.exports = content.locals;
- // add the styles to the DOM
- var update = __webpack_require__(1)("1cd16048", content, false, {});
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-dbf8a8ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Chrome.vue", function() {
- var newContent = require("!!../../node_modules/css-loader/index.js?{\"minimize\":false,\"sourceMap\":false}!../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-dbf8a8ac\",\"scoped\":false,\"hasInlineConfig\":false}!../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Chrome.vue");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 74 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(0)(false);
- // imports
- // module
- exports.push([module.i, "\n.vc-chrome {\n background: #fff;\n border-radius: 2px;\n box-shadow: 0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3);\n box-sizing: initial;\n width: 225px;\n font-family: Menlo;\n background-color: #fff;\n}\n.vc-chrome-controls {\n display: flex;\n}\n.vc-chrome-color-wrap {\n position: relative;\n width: 36px;\n}\n.vc-chrome-active-color {\n position: relative;\n width: 30px;\n height: 30px;\n border-radius: 15px;\n overflow: hidden;\n z-index: 1;\n}\n.vc-chrome-color-wrap .vc-checkerboard {\n width: 30px;\n height: 30px;\n border-radius: 15px;\n background-size: auto;\n}\n.vc-chrome-sliders {\n flex: 1;\n}\n.vc-chrome-fields-wrap {\n display: flex;\n padding-top: 16px;\n}\n.vc-chrome-fields {\n display: flex;\n margin-left: -6px;\n flex: 1;\n}\n.vc-chrome-field {\n padding-left: 6px;\n width: 100%;\n}\n.vc-chrome-toggle-btn {\n width: 32px;\n text-align: right;\n position: relative;\n}\n.vc-chrome-toggle-icon {\n margin-right: -4px;\n margin-top: 12px;\n cursor: pointer;\n position: relative;\n z-index: 2;\n}\n.vc-chrome-toggle-icon-highlight {\n position: absolute;\n width: 24px;\n height: 28px;\n background: #eee;\n border-radius: 4px;\n top: 10px;\n left: 12px;\n}\n.vc-chrome-hue-wrap {\n position: relative;\n height: 10px;\n margin-bottom: 8px;\n}\n.vc-chrome-alpha-wrap {\n position: relative;\n height: 10px;\n}\n.vc-chrome-hue-wrap .vc-hue {\n border-radius: 2px;\n}\n.vc-chrome-alpha-wrap .vc-alpha-gradient {\n border-radius: 2px;\n}\n.vc-chrome-hue-wrap .vc-hue-picker, .vc-chrome-alpha-wrap .vc-alpha-picker {\n width: 12px;\n height: 12px;\n border-radius: 6px;\n transform: translate(-6px, -2px);\n background-color: rgb(248, 248, 248);\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.37);\n}\n.vc-chrome-body {\n padding: 16px 16px 12px;\n background-color: #fff;\n}\n.vc-chrome-saturation-wrap {\n width: 100%;\n padding-bottom: 55%;\n position: relative;\n border-radius: 2px 2px 0 0;\n overflow: hidden;\n}\n.vc-chrome-saturation-wrap .vc-saturation-circle {\n width: 12px;\n height: 12px;\n}\n.vc-chrome-fields .vc-input__input {\n font-size: 11px;\n color: #333;\n width: 100%;\n border-radius: 2px;\n border: none;\n box-shadow: inset 0 0 0 1px #dadada;\n height: 21px;\n text-align: center;\n}\n.vc-chrome-fields .vc-input__label {\n text-transform: uppercase;\n font-size: 11px;\n line-height: 11px;\n color: #969696;\n text-align: center;\n display: block;\n margin-top: 12px;\n}\n.vc-chrome__disable-alpha .vc-chrome-active-color {\n width: 18px;\n height: 18px;\n}\n.vc-chrome__disable-alpha .vc-chrome-color-wrap {\n width: 30px;\n}\n.vc-chrome__disable-alpha .vc-chrome-hue-wrap {\n margin-top: 4px;\n margin-bottom: 4px;\n}\n", ""]);
- // exports
- /***/ }),
- /* 75 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- return _c(
- "div",
- {
- class: ["vc-chrome", _vm.disableAlpha ? "vc-chrome__disable-alpha" : ""],
- attrs: { role: "application", "aria-label": "Chrome color picker" }
- },
- [
- _c(
- "div",
- { staticClass: "vc-chrome-saturation-wrap" },
- [
- _c("saturation", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c("div", { staticClass: "vc-chrome-body" }, [
- _c("div", { staticClass: "vc-chrome-controls" }, [
- _c(
- "div",
- { staticClass: "vc-chrome-color-wrap" },
- [
- _vm._v(" "),
- !_vm.disableAlpha ? _c("checkboard") : _vm._e()
- ],
- 1
- ),
- _vm._v(" "),
- _c("div", { staticClass: "vc-chrome-sliders" }, [
- _c(
- "div",
- { staticClass: "vc-chrome-hue-wrap" },
- [
- _c("hue", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- ),
- _vm._v(" "),
- !_vm.disableAlpha
- ? _c(
- "div",
- { staticClass: "vc-chrome-alpha-wrap" },
- [
- _c("alpha", {
- on: { change: _vm.childChange },
- model: {
- value: _vm.colors,
- callback: function($$v) {
- _vm.colors = $$v
- },
- expression: "colors"
- }
- })
- ],
- 1
- )
- : _vm._e()
- ])
- ]),
- _vm._v(" "),
- !_vm.disableFields
- ? _c("div", { staticClass: "vc-chrome-fields-wrap" }, [
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.fieldsIndex === 0,
- expression: "fieldsIndex === 0"
- }
- ],
- staticClass: "vc-chrome-fields"
- },
- [
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- !_vm.hasAlpha
- ? _c("ed-in", {
- attrs: { label: "hex", value: _vm.colors.hex },
- on: { change: _vm.inputChange }
- })
- : _vm._e(),
- _vm._v(" "),
- _vm.hasAlpha
- ? _c("ed-in", {
- attrs: { label: "hex", value: _vm.colors.hex8 },
- on: { change: _vm.inputChange }
- })
- : _vm._e()
- ],
- 1
- )
- ]
- ),
- _vm._v(" "),
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.fieldsIndex === 1,
- expression: "fieldsIndex === 1"
- }
- ],
- staticClass: "vc-chrome-fields"
- },
- [
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "r", value: _vm.colors.rgba.r },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "g", value: _vm.colors.rgba.g },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "b", value: _vm.colors.rgba.b },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- !_vm.disableAlpha
- ? _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: {
- label: "a",
- value: _vm.colors.a,
- "arrow-offset": 0.01,
- max: 1
- },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- )
- : _vm._e()
- ]
- ),
- _vm._v(" "),
- _c(
- "div",
- {
- directives: [
- {
- name: "show",
- rawName: "v-show",
- value: _vm.fieldsIndex === 2,
- expression: "fieldsIndex === 2"
- }
- ],
- staticClass: "vc-chrome-fields"
- },
- [
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "h", value: _vm.hsl.h },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "s", value: _vm.hsl.s },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: { label: "l", value: _vm.hsl.l },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- ),
- _vm._v(" "),
- !_vm.disableAlpha
- ? _c(
- "div",
- { staticClass: "vc-chrome-field" },
- [
- _c("ed-in", {
- attrs: {
- label: "a",
- value: _vm.colors.a,
- "arrow-offset": 0.01,
- max: 1
- },
- on: { change: _vm.inputChange }
- })
- ],
- 1
- )
- : _vm._e()
- ]
- ),
- _vm._v(" "),
- _c(
- "div",
- {
- staticClass: "vc-chrome-toggle-btn",
- attrs: {
- role: "button",
- "aria-label": "Change another color definition"
- }
- }
- )
- ])
- : _vm._e()
- ])
- ]
- )
- }
- var staticRenderFns = []
- render._withStripped = true
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-dbf8a8ac", esExports)
- }
- }
- /***/ })
- /******/ ]);
- });
|