@wellesley/emoji-picker 1.0.553 → 1.0.555
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -25,10 +25,10 @@ import*as g from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import d0,{crea
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the ISC license.
|
|
27
27
|
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/const Kn=Ve((({color:f="currentColor",size:e=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:d="",children:t,iconNode:r,...o},i)=>Qf("svg",{ref:i,...Gn,width:e,height:e,stroke:f,strokeWidth:n?24*Number(a)/Number(e):a,className:o0("lucide",d),...o},[...r.map((([f,e])=>Qf(f,e))),...Array.isArray(t)?t:[t]]))),B=(f,e)=>{const a=Ve((({className:a,...n},d)=>Qf(Kn,{ref:d,iconNode:e,className:o0(`lucide-${Hn(f)}`,a),...n})));return a.displayName=`${f}`,a},Wn=[["path",{d:"m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8",key:"1imjwt"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 14h.01",key:"7oqj8z"}],["rect",{width:"18",height:"8",x:"3",y:"10",rx:"2",key:"a7itu8"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]],Yn=B("CarFront",Wn),Jn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Zn=B("Clock4",Jn),Qn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M19.13 5.09C15.22 9.14 10 10.44 2.25 10.94",key:"hpej1"}],["path",{d:"M21.75 12.84c-6.62-1.41-12.14 1-16.38 6.32",key:"1tr44o"}],["path",{d:"M8.56 2.75c4.37 6 6 9.42 8 17.72",key:"kbh691"}]],Xn=B("Dribbble",Qn),ft=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],et=B("Flag",ft),at=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],nt=B("Leaf",at),tt=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ot=B("Lightbulb",tt),rt=[["path",{d:"m12 14-1 1",key:"11onhr"}],["path",{d:"m13.75 18.25-1.25 1.42",key:"1yisr3"}],["path",{d:"M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12",key:"1qtqk6"}],["path",{d:"M18.8 9.3a1 1 0 0 0 2.1 7.7",key:"fbbbr2"}],["path",{d:"M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z",key:"1hyfdd"}]],it=B("Pizza",rt),dt=[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]],ct=B("Shapes",dt),ut=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],st=B("Smile",ut),D=f=>({size:20,color:f?"var(--blue_100)":"var(--
|
|
28
|
+
*/const Kn=Ve((({color:f="currentColor",size:e=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:d="",children:t,iconNode:r,...o},i)=>Qf("svg",{ref:i,...Gn,width:e,height:e,stroke:f,strokeWidth:n?24*Number(a)/Number(e):a,className:o0("lucide",d),...o},[...r.map((([f,e])=>Qf(f,e))),...Array.isArray(t)?t:[t]]))),B=(f,e)=>{const a=Ve((({className:a,...n},d)=>Qf(Kn,{ref:d,iconNode:e,className:o0(`lucide-${Hn(f)}`,a),...n})));return a.displayName=`${f}`,a},Wn=[["path",{d:"m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8",key:"1imjwt"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 14h.01",key:"7oqj8z"}],["rect",{width:"18",height:"8",x:"3",y:"10",rx:"2",key:"a7itu8"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]],Yn=B("CarFront",Wn),Jn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Zn=B("Clock4",Jn),Qn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M19.13 5.09C15.22 9.14 10 10.44 2.25 10.94",key:"hpej1"}],["path",{d:"M21.75 12.84c-6.62-1.41-12.14 1-16.38 6.32",key:"1tr44o"}],["path",{d:"M8.56 2.75c4.37 6 6 9.42 8 17.72",key:"kbh691"}]],Xn=B("Dribbble",Qn),ft=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],et=B("Flag",ft),at=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],nt=B("Leaf",at),tt=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ot=B("Lightbulb",tt),rt=[["path",{d:"m12 14-1 1",key:"11onhr"}],["path",{d:"m13.75 18.25-1.25 1.42",key:"1yisr3"}],["path",{d:"M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12",key:"1qtqk6"}],["path",{d:"M18.8 9.3a1 1 0 0 0 2.1 7.7",key:"fbbbr2"}],["path",{d:"M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z",key:"1hyfdd"}]],it=B("Pizza",rt),dt=[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]],ct=B("Shapes",dt),ut=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],st=B("Smile",ut),D=f=>({size:20,color:f?"var(--blue_100)":"var(--gray-600)"}),lt=(f,e)=>({suggested:d.jsx(Zn,{...D(e)}),smileys_people:d.jsx(st,{...D(e)}),animals_nature:d.jsx(nt,{...D(e)}),food_drink:d.jsx(it,{...D(e)}),travel_places:d.jsx(Yn,{...D(e)}),activities:d.jsx(Xn,{...D(e)}),objects:d.jsx(ct,{...D(e)}),symbols:d.jsx(ot,{...D(e)}),flags:d.jsx(et,{...D(e)})}[f]);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.471.2 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/function gt({isActiveCategory:f,category:e,allowNavigation:a,categoryConfig:n,onClick:t}){return d.jsx("div",{className:p(pf.container,f&&pf.activeContainer),onClick:t,children:d.jsx(gf,{tabIndex:a?0:-1,className:p(pf.catBtn,X.categoryBtn,f&&pf.activeIcon,`epr-icn-${e}`,{[m.active]:f}),"aria-label":Ge(n),"aria-selected":f,role:"tab","aria-controls":"epr-category-nav-id",children:lt(e,f)})})}const pf=y.create({container:{borderRadius:"6px",padding:"3px 8px",display:"flex",alignItems:"center"},activeContainer:{background:"#F1F5F9"},activeIcon:{filter:"invert(43%) sepia(73%) saturate(2185%) hue-rotate(184deg) brightness(100%) contrast(103%)"},catBtn:{".":"epr-cat-btn",display:"inline-flex",transition:"opacity 0.2s ease-in-out",position:"relative",height:"var(--epr-category-navigation-button-size)",width:"var(--epr-category-navigation-button-size)",backgroundSize:"20px",outline:"none"}});function bt(){const[f,e]=L(""),a=$n();Vn(f,e);const n=Hf(),t=o1(),r=ke();return d.jsx("div",{className:p(ht.nav),role:"tablist","aria-label":"Category navigation",id:"epr-category-nav-id",ref:r,children:t.map((t=>{const r=ne(t),o=r===f;if(L0(t))return null;const i=!n&&!o;return d.jsx(gt,{category:r,isActiveCategory:o,allowNavigation:i,categoryConfig:t,onClick:()=>{e(r),a(r)}},r)}))})}const ht=y.create({nav:{".":"epr-category-nav",display:"flex",flexDirection:"row",justifyContent:"space-around",border:"1px solid #CBD5E1",padding:"4px",borderRadius:"6px",margin:"0 8px"},".epr-search-active":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}},".epr-main:has(input:not(:placeholder-shown))":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}}}),mt="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%205L5%2015'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%205L15%2015'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function pt(){var f;const e=f0(),a=N(),n=!(null==(f=null==a?void 0:a.current)||!f.value);return d.jsx(gf,{className:p(Be.btnClearSearch,n?"":"opacity-50"),onClick:e,"aria-label":"Clear",title:"Clear",children:d.jsx("div",{className:p(Be.icnClearSearch),children:d.jsx("img",{src:mt,alt:"clear"})})})}const wt={":hover":{"> .epr-icn-clear-search":{}}},Be=y.create({btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"-40px",height:"30px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%"},icnClearSearch:{".":"epr-icn-clear-search",height:"20px",width:"20px"},...Nf("btnClearSearch",wt)}),Zf=`${S(m.emojiPicker)} ${S(m.emojiList)}`,r0=["button",S(m.emoji)].join(""),vt=S(m.category);function kt({value:f}){if(!f)return null;const e=yt(f);return d.jsx("style",{children:`\n ${Zf} ${r0} {\n display: none;\n }\n\n\n ${Zf} ${e} {\n display: flex;\n }\n\n ${Zf} ${vt}:not(:has(${e})) {\n display: none;\n }\n `})}function yt(f){return[r0,'[data-full-name*="',ae(f),'"]'].join("")}const xt="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2014.25C11.5637%2014.25%2014.25%2011.5637%2014.25%208.25C14.25%204.93629%2011.5637%202.25%208.25%202.25C4.93629%202.25%202.25%204.93629%202.25%208.25C2.25%2011.5637%204.93629%2014.25%208.25%2014.25Z'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.7484%2015.7499L12.5234%2012.5249'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function jt(){return d.jsx("div",{className:p(St.icnSearch)})}const St=y.create({icnSearch:{".":"epr-icn-search",content:"",position:"absolute",top:"50%",right:"var(--epr-search-bar-inner-padding)",transform:"translateY(-50%)",width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"20px",backgroundImage:`url(${xt})`},...Nf("icnSearch",{backgroundPositionY:"-20px"})}),Et="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2026.3.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='20px'%20height='80px'%20viewBox='0%200%2020%2080'%20enable-background='new%200%200%2020%2080'%20xml:space='preserve'%3e%3cpath%20fill='%23868686'%20d='M6.98,13.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,8%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42L7.74,7.27c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,13.05,6.77,13.39,6.98,13.59L6.98,13.59z'/%3e%3cpath%20fill='%23868686'%20d='M10.15,18.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,14.84,5.74,18.43,10.15,18.43z%20M10.15,3.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,6.6,6.33,3.49,10.15,3.49%20L10.15,3.49z'/%3e%3cpath%20fill='%233371B7'%20d='M6.98,33.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,28%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,33.05,6.77,33.39,6.98,33.59L6.98,33.59z'/%3e%3cpath%20fill='%233371B7'%20d='M10.15,38.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,34.84,5.74,38.43,10.15,38.43z%20M10.15,23.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,26.6,6.33,23.49,10.15,23.49L10.15,23.49z'/%3e%3cpath%20fill='%23C0C0BF'%20d='M6.98,53.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,48%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,53.05,6.77,53.39,6.98,53.59L6.98,53.59z'/%3e%3cpath%20fill='%23C0C0BF'%20d='M10.15,58.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,54.84,5.74,58.43,10.15,58.43z%20M10.15,43.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,46.6,6.33,43.49,10.15,43.49L10.15,43.49z'/%3e%3cpath%20fill='%236AA9DD'%20d='M6.98,73.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,68%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,73.05,6.77,73.39,6.98,73.59L6.98,73.59z'/%3e%3cpath%20fill='%236AA9DD'%20d='M10.15,78.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,74.84,5.74,78.43,10.15,78.43z%20M10.15,63.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,66.6,6.33,63.49,10.15,63.49L10.15,63.49z'/%3e%3c/svg%3e";function Ct(){const f=i1(),e=xe();return f?null:d.jsxs(n0,{className:p(yf.overlay),children:[d.jsx(Rt,{}),e?d.jsx(t0,{}):null]})}function Rt(){const[f,e]=L(0),a=V(),n=N(),t=F0(),r=_0(),{statusSearchResults:o,searchTerm:i,onChange:c}=on(),u=null==n?void 0:n.current,l=null==u?void 0:u.value;return d.jsxs($f,{className:p(yf.searchContainer),children:[d.jsx(kt,{value:l}),d.jsx("input",{autoFocus:r,"aria-label":"Type to search for an emoji",onFocus:a,className:`${p(yf.search)} focus:ring-ring border-1 border--slate-300 focus:outline-none focus:ring-2 focus:ring-offset-2`,type:"text","aria-controls":"epr-search-id",placeholder:t,onChange:a=>{e(f+1),setTimeout((()=>{var f;c((null==(f=null==a?void 0:a.target)?void 0:f.value)??l)}))},ref:n}),i?d.jsx("div",{role:"status",className:p("epr-status-search-results",yf.visuallyHidden),"aria-live":"polite",id:"epr-search-id","aria-atomic":"true",children:o}):null,d.jsx(jt,{}),d.jsx(pt,{})]})}const yf=y.create({overlay:{padding:"8px",zIndex:"var(--epr-header-overlay-z-index)"},searchContainer:{".":"epr-search-container",flex:"1",display:"block",minWidth:"0",marginRight:"40px"},visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"},search:{outline:"none",fontSize:"14px",transition:"all 0.2s ease-in-out",color:"var(--slate-900)",borderRadius:"var(--epr-search-input-border-radius)",height:"var(--epr-search-input-height)",borderWidth:"1px",padding:"var(--epr-search-input-padding)",width:"100%","::placeholder":{color:"var(--epr-search-input-placeholder-color)"}},btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:`url(${Et})`}});function Tt(){return d.jsxs($f,{className:p("epr-header",X.hiddenOnReactions),children:[d.jsx(Ct,{}),d.jsx(bt,{})]})}function rf(){return document.activeElement}function Lt(){It(),Pt(),zt(),At(),Mt()}function It(){const f=lf(),e=f0(),a=en(),n=N(),d=$(),t=q1(),r=Za(),o=V(),i=Y((()=>function(f){const{key:n}=f;if("Escape"===(r(),n)){if(f.preventDefault(),t())return void o();e(),a(0),d()}}),[a,e,o,d,t,r]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i)}}),[f,n,a,i])}function Pt(){const f=an(),e=lf(),a=P(),n=N(),[,d]=sf(),t=i0(),r=xe(),o=Y((()=>function(e){const{key:n}=e;switch(n){case"ArrowRight":if(!r)return;e.preventDefault(),d(!0),f();break;case"ArrowDown":e.preventDefault(),t();break;case"Enter":e.preventDefault(),vn(a.current)}}),[f,t,d,a,r]);j((()=>{const f=n.current;if(f)return f.addEventListener("keydown",o),()=>{f.removeEventListener("keydown",o)}}),[e,n,o])}function zt(){const f=ve(),e=$(),a=N(),n=i0(),[d,t]=sf(),r=a0(),o=xe(),i=je(),c=Y((()=>function(f){const{key:a}=f;if(o)switch(a){case"ArrowLeft":if(f.preventDefault(),!d)return e();Fe(e);break;case"ArrowRight":if(f.preventDefault(),!d)return e();Ue();break;case"ArrowDown":f.preventDefault(),d&&t(!1),n();break;default:i(f)}if(r)switch(a){case"ArrowUp":if(f.preventDefault(),!d)return e();Fe(e);break;case"ArrowDown":if(f.preventDefault(),!d)return e();Ue();break;default:i(f)}}),[d,e,t,n,i,r,o]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[f,a,d,c])}function At(){const f=$(),e=ke(),a=P(),n=je(),d=Y((()=>function(e){const{key:d}=e;switch(d){case"ArrowUp":e.preventDefault(),f();break;case"ArrowRight":e.preventDefault(),$1(rf());break;case"ArrowLeft":e.preventDefault(),V1(rf());break;case"ArrowDown":e.preventDefault(),Vf(a.current);break;default:n(e)}}),[a,f,n]);j((()=>{const f=e.current;if(f)return f.addEventListener("keydown",d),()=>{f.removeEventListener("keydown",d)}}),[e,a,d])}function Mt(){const f=P(),e=Ot(),a=W1(),n=q1(),d=V(),t=je(),r=Y((()=>function(f){const{key:r}=f,o=A(rf());switch(r){case"ArrowRight":f.preventDefault(),yn(o);break;case"ArrowLeft":f.preventDefault(),xn(o);break;case"ArrowDown":if(f.preventDefault(),n()){d();break}Sn(o);break;case"ArrowUp":if(f.preventDefault(),n()){d();break}jn(o,e);break;case" ":f.preventDefault(),a(f.target);break;default:t(f)}}),[e,t,a,n,d]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[f,r])}function i0(){const f=X1(),e=Hf(),a=P();return _((function(){return e?Vf(a.current):f()}),[a,f,e])}function Ot(){const f=$(),e=X1(),a=Hf();return _((function(){return a?f():e()}),[f,a,e])}function Fe(f){const e=rf();e&&(Ta(e)||f(),$1(e))}function Ue(){const f=rf();f&&V1(f)}function je(){const f=tn(),e=$(),a=i1(),n=V();return function(d){const{key:t}=d;Dt(d)||a||t.match(/(^[a-zA-Z0-9]$){1}/)&&(d.preventDefault(),n(),e(),f(t))}}function Dt(f){const{metaKey:e,ctrlKey:a,altKey:n}=f;return e||a||n}function Nt(f,e,a){if(!e||a===R.NATIVE)return;const n=E(e);_e.has(n)||(uf(e).forEach((e=>{Bt(f(e,a))})),_e.add(n))}const _e=new Set;function Bt(f){(new Image).src=f}function Ft(){const f=P(),e=q(),a=Z();j((()=>{if(e===R.NATIVE)return;const n=f.current;return null==n||n.addEventListener("focusin",d),()=>{null==n||n.removeEventListener("focusin",d)};function d(f){const n=A(f.target);if(!n)return;const[d]=ge(n);d&&J(d)&&Nt(a,d,e)}}),[f,e,a])}function Ut({children:f}){return d.jsx(oa,{children:d.jsx(_t,{children:f})})}function _t({children:f}){const[e]=Af(),a=H0(),n=Hf(),t=lf(),r=W0(),o=Y0();Lt(),Ft();const{width:i,height:c,...u}=o;return d.jsx("aside",{className:p(nf.main,nf.baseVariables,a===xf.DARK&&nf.darkTheme,a===xf.AUTO&&nf.autoThemeDark,{[m.searchActive]:n},e&&nf.reactionsMenu,r),ref:t,style:{...u,...!e&&{height:c,width:i}},children:f})}const qe={"--epr-emoji-variation-picker-bg-color":"var(--epr-dark-emoji-variation-picker-bg-color)","--epr-hover-bg-color-reduced-opacity":"var(--epr-dark-hover-bg-color-reduced-opacity)","--epr-highlight-color":"var(--epr-dark-highlight-color)","--epr-text-color":"var(--epr-dark-text-color)","--epr-hover-bg-color":"var(--epr-dark-hover-bg-color)","--epr-focus-bg-color":"var(--epr-dark-focus-bg-color)","--epr-search-input-bg-color":"var(--epr-dark-search-input-bg-color)","--epr-category-label-bg-color":"var(--epr-dark-category-label-bg-color)","--epr-picker-border-color":"var(--epr-dark-picker-border-color)","--epr-bg-color":"var(--epr-dark-bg-color)","--epr-reactions-bg-color":"var(--epr-dark-reactions-bg-color)","--epr-search-input-bg-color-active":"var(--epr-dark-search-input-bg-color-active)","--epr-emoji-variation-indicator-color":"var(--epr-dark-emoji-variation-indicator-color)","--epr-category-icon-active-color":"var(--epr-dark-category-icon-active-color)","--epr-skin-tone-picker-menu-color":"var(--epr-dark-skin-tone-picker-menu-color)"},nf=y.create({main:{".":["epr-main",m.emojiPicker],position:"relative",display:"flex",flexDirection:"column",borderWidth:"1px",borderStyle:"solid",borderRadius:"8px",borderColor:"var(--epr-picker-border-color)",backgroundColor:"var(--epr-bg-color)",overflow:"hidden",transition:"all 0.3s ease-in-out, background-color 0.1s ease-in-out","*":{boxSizing:"border-box",fontFamily:"sans-serif"}},baseVariables:{"--":{"--epr-highlight-color":"#007aeb","--epr-hover-bg-color":"#f1f8ff","--epr-hover-bg-color-reduced-opacity":"#f1f8ff80","--epr-focus-bg-color":"#e0f0ff","--epr-text-color":"#94A3B8","--epr-search-input-bg-color":"#f6f6f6","--epr-picker-border-color":"#e7e7e7","--epr-bg-color":"#fff","--epr-reactions-bg-color":"#ffffff90","--epr-category-icon-active-color":"#6aa8de","--epr-skin-tone-picker-menu-color":"#ffffff95","--epr-horizontal-padding":"8px","--epr-picker-border-radius":"6px","--epr-search-border-color":"var(--epr-highlight-color)","--epr-header-padding":"8px var(--epr-horizontal-padding)","--epr-active-skin-tone-indicator-border-color":"var(--epr-highlight-color)","--epr-active-skin-hover-color":"var(--epr-hover-bg-color)","--epr-search-input-bg-color-active":"var(--epr-search-input-bg-color)","--epr-search-input-padding":"0 33px 0 8px","--epr-search-input-border-radius":"5px","--epr-search-input-height":"36px","--epr-search-input-text-color":"var(--epr-text-color)","--epr-search-input-placeholder-color":"var(--epr-text-color)","--epr-search-bar-inner-padding":"var(--epr-horizontal-padding)","--epr-category-navigation-button-size":"20px","--epr-emoji-variation-picker-height":"45px","--epr-emoji-variation-picker-bg-color":"var(--epr-bg-color)","--epr-preview-height":"70px","--epr-preview-text-size":"14px","--epr-preview-text-padding":"0 var(--epr-horizontal-padding)","--epr-preview-border-color":"var(--epr-picker-border-color)","--epr-preview-text-color":"var(--epr-text-color)","--epr-category-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-bg-color":"#ffffffe6","--epr-category-label-text-color":"var(--epr-text-color)","--epr-category-label-padding":"8px var(--epr-horizontal-padding)","--epr-category-label-height":"32px","--epr-emoji-size":"24px","--epr-emoji-padding":"5px","--epr-emoji-fullsize":"calc(var(--epr-emoji-size) + var(--epr-emoji-padding) * 2)","--epr-emoji-hover-color":"#F8FAFC","--epr-emoji-variation-indicator-color":"var(--epr-picker-border-color)","--epr-emoji-variation-indicator-color-hover":"var(--epr-text-color)","--epr-header-overlay-z-index":"3","--epr-emoji-variations-indictator-z-index":"1","--epr-category-label-z-index":"2","--epr-skin-variation-picker-z-index":"5","--epr-preview-z-index":"6","--epr-dark":"#000","--epr-dark-emoji-variation-picker-bg-color":"var(--epr-dark)","--epr-dark-highlight-color":"#c0c0c0","--epr-dark-text-color":"var(--epr-highlight-color)","--epr-dark-hover-bg-color":"#363636f6","--epr-dark-hover-bg-color-reduced-opacity":"#36363680","--epr-dark-focus-bg-color":"#474747","--epr-dark-search-input-bg-color":"#333333","--epr-dark-category-label-bg-color":"#222222e6","--epr-dark-picker-border-color":"#151617","--epr-dark-bg-color":"#222222","--epr-dark-reactions-bg-color":"#22222290","--epr-dark-search-input-bg-color-active":"var(--epr-dark)","--epr-dark-emoji-variation-indicator-color":"#444","--epr-dark-category-icon-active-color":"#3271b7","--epr-dark-skin-tone-picker-menu-color":"#22222295"}},autoThemeDark:{".":m.autoTheme,"@media (prefers-color-scheme: dark)":{"--":qe}},darkTheme:{".":m.darkTheme,"--":qe},reactionsMenu:{".":"epr-reactions",height:"50px",display:"inline-flex",backgroundColor:"var(--epr-reactions-bg-color)",backdropFilter:"blur(8px)","--":{"--epr-picker-border-radius":"50px"}}});function qt(f){return d.jsxs(Ua,{children:[d.jsx(wa,{}),d.jsx(D0,{...f,children:d.jsx(Vt,{})})]})}function Vt(){const[f]=Af(),e=n1(),[a,n]=L(!f),t=q0();return j((()=>{f&&!e||a||n(!0)}),[a,e,f]),t?d.jsxs(Ut,{children:[d.jsx(Ja,{}),d.jsx($t,{renderAll:a})]}):null}function $t({renderAll:f}){return f?d.jsxs(d.Fragment,{children:[d.jsx(Tt,{}),d.jsx(Pn,{}),d.jsx(Un,{})]}):null}const Ht=s0(qt,Ze),Wt=f=>{const e=B0({onEmojiClick:f.onEmojiClick,onReactionClick:f.onReactionClick,onSkinToneChange:f.onSkinToneChange});return d.jsx(xa,{children:d.jsx(e1.Provider,{value:e,children:d.jsx(Ht,{...f})})})};export{h as Categories,Kt as Emoji,Wt as EmojiPicker,R as EmojiStyle,df as SkinTonePickerLocation,M as SkinTones,Pf as SuggestionMode,xf as Theme};
|
|
34
|
+
*/function gt({isActiveCategory:f,category:e,allowNavigation:a,categoryConfig:n,onClick:t}){return d.jsx("div",{className:p(pf.container,f&&pf.activeContainer),onClick:t,children:d.jsx(gf,{tabIndex:a?0:-1,className:p(pf.catBtn,X.categoryBtn,f&&pf.activeIcon,`epr-icn-${e}`,{[m.active]:f}),"aria-label":Ge(n),"aria-selected":f,role:"tab","aria-controls":"epr-category-nav-id",children:lt(e,f)})})}const pf=y.create({container:{borderRadius:"6px",padding:"3px 8px",display:"flex",alignItems:"center"},activeContainer:{background:"#F1F5F9"},activeIcon:{filter:"invert(43%) sepia(73%) saturate(2185%) hue-rotate(184deg) brightness(100%) contrast(103%)"},catBtn:{".":"epr-cat-btn",display:"inline-flex",transition:"opacity 0.2s ease-in-out",position:"relative",height:"var(--epr-category-navigation-button-size)",width:"var(--epr-category-navigation-button-size)",backgroundSize:"20px",outline:"none"}});function bt(){const[f,e]=L(""),a=$n();Vn(f,e);const n=Hf(),t=o1(),r=ke();return d.jsx("div",{className:p(ht.nav),role:"tablist","aria-label":"Category navigation",id:"epr-category-nav-id",ref:r,children:t.map((t=>{const r=ne(t),o=r===f;if(L0(t))return null;const i=!n&&!o;return d.jsx(gt,{category:r,isActiveCategory:o,allowNavigation:i,categoryConfig:t,onClick:()=>{e(r),a(r)}},r)}))})}const ht=y.create({nav:{".":"epr-category-nav",display:"flex",flexDirection:"row",justifyContent:"space-around",border:"1px solid #CBD5E1",padding:"4px",borderRadius:"6px",margin:"0 8px"},".epr-search-active":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}},".epr-main:has(input:not(:placeholder-shown))":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}}}),mt="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%205L5%2015'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%205L15%2015'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function pt(){var f;const e=f0(),a=N(),n=!(null==(f=null==a?void 0:a.current)||!f.value);return d.jsx(gf,{className:p(Be.btnClearSearch,n?"":"opacity-50"),onClick:e,"aria-label":"Clear",title:"Clear",children:d.jsx("div",{className:p(Be.icnClearSearch),children:d.jsx("img",{src:mt,alt:"clear"})})})}const wt={":hover":{"> .epr-icn-clear-search":{}}},Be=y.create({btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"-40px",height:"30px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%"},icnClearSearch:{".":"epr-icn-clear-search",height:"20px",width:"20px"},...Nf("btnClearSearch",wt)}),Zf=`${S(m.emojiPicker)} ${S(m.emojiList)}`,r0=["button",S(m.emoji)].join(""),vt=S(m.category);function kt({value:f}){if(!f)return null;const e=yt(f);return d.jsx("style",{children:`\n ${Zf} ${r0} {\n display: none;\n }\n\n\n ${Zf} ${e} {\n display: flex;\n }\n\n ${Zf} ${vt}:not(:has(${e})) {\n display: none;\n }\n `})}function yt(f){return[r0,'[data-full-name*="',ae(f),'"]'].join("")}const xt="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.25%2014.25C11.5637%2014.25%2014.25%2011.5637%2014.25%208.25C14.25%204.93629%2011.5637%202.25%208.25%202.25C4.93629%202.25%202.25%204.93629%202.25%208.25C2.25%2011.5637%204.93629%2014.25%208.25%2014.25Z'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.7484%2015.7499L12.5234%2012.5249'%20stroke='%2394A3B8'%20stroke-width='1.67'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function jt(){return d.jsx("div",{className:p(St.icnSearch)})}const St=y.create({icnSearch:{".":"epr-icn-search",content:"",position:"absolute",top:"50%",right:"var(--epr-search-bar-inner-padding)",transform:"translateY(-50%)",width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"20px",backgroundImage:`url(${xt})`},...Nf("icnSearch",{backgroundPositionY:"-20px"})}),Et="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2026.3.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='20px'%20height='80px'%20viewBox='0%200%2020%2080'%20enable-background='new%200%200%2020%2080'%20xml:space='preserve'%3e%3cpath%20fill='%23868686'%20d='M6.98,13.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,8%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42L7.74,7.27c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,13.05,6.77,13.39,6.98,13.59L6.98,13.59z'/%3e%3cpath%20fill='%23868686'%20d='M10.15,18.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,14.84,5.74,18.43,10.15,18.43z%20M10.15,3.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94C3.21,6.6,6.33,3.49,10.15,3.49%20L10.15,3.49z'/%3e%3cpath%20fill='%233371B7'%20d='M6.98,33.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,28%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,33.05,6.77,33.39,6.98,33.59L6.98,33.59z'/%3e%3cpath%20fill='%233371B7'%20d='M10.15,38.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,34.84,5.74,38.43,10.15,38.43z%20M10.15,23.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,26.6,6.33,23.49,10.15,23.49L10.15,23.49z'/%3e%3cpath%20fill='%23C0C0BF'%20d='M6.98,53.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,48%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,53.05,6.77,53.39,6.98,53.59L6.98,53.59z'/%3e%3cpath%20fill='%23C0C0BF'%20d='M10.15,58.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,54.84,5.74,58.43,10.15,58.43z%20M10.15,43.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,46.6,6.33,43.49,10.15,43.49L10.15,43.49z'/%3e%3cpath%20fill='%236AA9DD'%20d='M6.98,73.59c0.1,0.1,0.24,0.15,0.37,0.15s0.27-0.05,0.37-0.15l2.42-2.42l2.43,2.43%20c0.1,0.1,0.24,0.15,0.37,0.15c0.14,0,0.27-0.05,0.37-0.15c0.21-0.21,0.21-0.54,0-0.75l-2.43-2.43L13.32,68%20c0.21-0.21,0.21-0.54,0-0.75c-0.21-0.21-0.54-0.21-0.75,0l-2.42,2.42l-2.41-2.41c-0.21-0.21-0.54-0.21-0.75,0%20c-0.21,0.21-0.21,0.54,0,0.75l2.41,2.41l-2.42,2.42C6.77,73.05,6.77,73.39,6.98,73.59L6.98,73.59z'/%3e%3cpath%20fill='%236AA9DD'%20d='M10.15,78.43c4.41,0,8-3.59,8-8c0-4.41-3.59-8-8-8c-4.41,0-8,3.59-8,8C2.15,74.84,5.74,78.43,10.15,78.43z%20M10.15,63.49c3.83,0,6.94,3.11,6.94,6.94c0,3.83-3.11,6.94-6.94,6.94c-3.83,0-6.94-3.11-6.94-6.94%20C3.21,66.6,6.33,63.49,10.15,63.49L10.15,63.49z'/%3e%3c/svg%3e";function Ct(){const f=i1(),e=xe();return f?null:d.jsxs(n0,{className:p(yf.overlay),children:[d.jsx(Rt,{}),e?d.jsx(t0,{}):null]})}function Rt(){const[f,e]=L(0),a=V(),n=N(),t=F0(),r=_0(),{statusSearchResults:o,searchTerm:i,onChange:c}=on(),u=null==n?void 0:n.current,l=null==u?void 0:u.value;return d.jsxs($f,{className:p(yf.searchContainer),children:[d.jsx(kt,{value:l}),d.jsx("input",{autoFocus:r,"aria-label":"Type to search for an emoji",onFocus:a,className:`${p(yf.search)} focus:ring-ring border-1 border--gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2`,type:"text","aria-controls":"epr-search-id",placeholder:t,onChange:a=>{e(f+1),setTimeout((()=>{var f;c((null==(f=null==a?void 0:a.target)?void 0:f.value)??l)}))},ref:n}),i?d.jsx("div",{role:"status",className:p("epr-status-search-results",yf.visuallyHidden),"aria-live":"polite",id:"epr-search-id","aria-atomic":"true",children:o}):null,d.jsx(jt,{}),d.jsx(pt,{})]})}const yf=y.create({overlay:{padding:"8px",zIndex:"var(--epr-header-overlay-z-index)"},searchContainer:{".":"epr-search-container",flex:"1",display:"block",minWidth:"0",marginRight:"40px"},visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"},search:{outline:"none",fontSize:"14px",transition:"all 0.2s ease-in-out",color:"var(--gray-900)",borderRadius:"var(--epr-search-input-border-radius)",height:"var(--epr-search-input-height)",borderWidth:"1px",padding:"var(--epr-search-input-padding)",width:"100%","::placeholder":{color:"var(--epr-search-input-placeholder-color)"}},btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:`url(${Et})`}});function Tt(){return d.jsxs($f,{className:p("epr-header",X.hiddenOnReactions),children:[d.jsx(Ct,{}),d.jsx(bt,{})]})}function rf(){return document.activeElement}function Lt(){It(),Pt(),zt(),At(),Mt()}function It(){const f=lf(),e=f0(),a=en(),n=N(),d=$(),t=q1(),r=Za(),o=V(),i=Y((()=>function(f){const{key:n}=f;if("Escape"===(r(),n)){if(f.preventDefault(),t())return void o();e(),a(0),d()}}),[a,e,o,d,t,r]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",i),()=>{e.removeEventListener("keydown",i)}}),[f,n,a,i])}function Pt(){const f=an(),e=lf(),a=P(),n=N(),[,d]=sf(),t=i0(),r=xe(),o=Y((()=>function(e){const{key:n}=e;switch(n){case"ArrowRight":if(!r)return;e.preventDefault(),d(!0),f();break;case"ArrowDown":e.preventDefault(),t();break;case"Enter":e.preventDefault(),vn(a.current)}}),[f,t,d,a,r]);j((()=>{const f=n.current;if(f)return f.addEventListener("keydown",o),()=>{f.removeEventListener("keydown",o)}}),[e,n,o])}function zt(){const f=ve(),e=$(),a=N(),n=i0(),[d,t]=sf(),r=a0(),o=xe(),i=je(),c=Y((()=>function(f){const{key:a}=f;if(o)switch(a){case"ArrowLeft":if(f.preventDefault(),!d)return e();Fe(e);break;case"ArrowRight":if(f.preventDefault(),!d)return e();Ue();break;case"ArrowDown":f.preventDefault(),d&&t(!1),n();break;default:i(f)}if(r)switch(a){case"ArrowUp":if(f.preventDefault(),!d)return e();Fe(e);break;case"ArrowDown":if(f.preventDefault(),!d)return e();Ue();break;default:i(f)}}),[d,e,t,n,i,r,o]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[f,a,d,c])}function At(){const f=$(),e=ke(),a=P(),n=je(),d=Y((()=>function(e){const{key:d}=e;switch(d){case"ArrowUp":e.preventDefault(),f();break;case"ArrowRight":e.preventDefault(),$1(rf());break;case"ArrowLeft":e.preventDefault(),V1(rf());break;case"ArrowDown":e.preventDefault(),Vf(a.current);break;default:n(e)}}),[a,f,n]);j((()=>{const f=e.current;if(f)return f.addEventListener("keydown",d),()=>{f.removeEventListener("keydown",d)}}),[e,a,d])}function Mt(){const f=P(),e=Ot(),a=W1(),n=q1(),d=V(),t=je(),r=Y((()=>function(f){const{key:r}=f,o=A(rf());switch(r){case"ArrowRight":f.preventDefault(),yn(o);break;case"ArrowLeft":f.preventDefault(),xn(o);break;case"ArrowDown":if(f.preventDefault(),n()){d();break}Sn(o);break;case"ArrowUp":if(f.preventDefault(),n()){d();break}jn(o,e);break;case" ":f.preventDefault(),a(f.target);break;default:t(f)}}),[e,t,a,n,d]);j((()=>{const e=f.current;if(e)return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[f,r])}function i0(){const f=X1(),e=Hf(),a=P();return _((function(){return e?Vf(a.current):f()}),[a,f,e])}function Ot(){const f=$(),e=X1(),a=Hf();return _((function(){return a?f():e()}),[f,a,e])}function Fe(f){const e=rf();e&&(Ta(e)||f(),$1(e))}function Ue(){const f=rf();f&&V1(f)}function je(){const f=tn(),e=$(),a=i1(),n=V();return function(d){const{key:t}=d;Dt(d)||a||t.match(/(^[a-zA-Z0-9]$){1}/)&&(d.preventDefault(),n(),e(),f(t))}}function Dt(f){const{metaKey:e,ctrlKey:a,altKey:n}=f;return e||a||n}function Nt(f,e,a){if(!e||a===R.NATIVE)return;const n=E(e);_e.has(n)||(uf(e).forEach((e=>{Bt(f(e,a))})),_e.add(n))}const _e=new Set;function Bt(f){(new Image).src=f}function Ft(){const f=P(),e=q(),a=Z();j((()=>{if(e===R.NATIVE)return;const n=f.current;return null==n||n.addEventListener("focusin",d),()=>{null==n||n.removeEventListener("focusin",d)};function d(f){const n=A(f.target);if(!n)return;const[d]=ge(n);d&&J(d)&&Nt(a,d,e)}}),[f,e,a])}function Ut({children:f}){return d.jsx(oa,{children:d.jsx(_t,{children:f})})}function _t({children:f}){const[e]=Af(),a=H0(),n=Hf(),t=lf(),r=W0(),o=Y0();Lt(),Ft();const{width:i,height:c,...u}=o;return d.jsx("aside",{className:p(nf.main,nf.baseVariables,a===xf.DARK&&nf.darkTheme,a===xf.AUTO&&nf.autoThemeDark,{[m.searchActive]:n},e&&nf.reactionsMenu,r),ref:t,style:{...u,...!e&&{height:c,width:i}},children:f})}const qe={"--epr-emoji-variation-picker-bg-color":"var(--epr-dark-emoji-variation-picker-bg-color)","--epr-hover-bg-color-reduced-opacity":"var(--epr-dark-hover-bg-color-reduced-opacity)","--epr-highlight-color":"var(--epr-dark-highlight-color)","--epr-text-color":"var(--epr-dark-text-color)","--epr-hover-bg-color":"var(--epr-dark-hover-bg-color)","--epr-focus-bg-color":"var(--epr-dark-focus-bg-color)","--epr-search-input-bg-color":"var(--epr-dark-search-input-bg-color)","--epr-category-label-bg-color":"var(--epr-dark-category-label-bg-color)","--epr-picker-border-color":"var(--epr-dark-picker-border-color)","--epr-bg-color":"var(--epr-dark-bg-color)","--epr-reactions-bg-color":"var(--epr-dark-reactions-bg-color)","--epr-search-input-bg-color-active":"var(--epr-dark-search-input-bg-color-active)","--epr-emoji-variation-indicator-color":"var(--epr-dark-emoji-variation-indicator-color)","--epr-category-icon-active-color":"var(--epr-dark-category-icon-active-color)","--epr-skin-tone-picker-menu-color":"var(--epr-dark-skin-tone-picker-menu-color)"},nf=y.create({main:{".":["epr-main",m.emojiPicker],position:"relative",display:"flex",flexDirection:"column",borderWidth:"1px",borderStyle:"solid",borderRadius:"8px",borderColor:"var(--epr-picker-border-color)",backgroundColor:"var(--epr-bg-color)",overflow:"hidden",transition:"all 0.3s ease-in-out, background-color 0.1s ease-in-out","*":{boxSizing:"border-box",fontFamily:"sans-serif"}},baseVariables:{"--":{"--epr-highlight-color":"#007aeb","--epr-hover-bg-color":"#f1f8ff","--epr-hover-bg-color-reduced-opacity":"#f1f8ff80","--epr-focus-bg-color":"#e0f0ff","--epr-text-color":"#94A3B8","--epr-search-input-bg-color":"#f6f6f6","--epr-picker-border-color":"#e7e7e7","--epr-bg-color":"#fff","--epr-reactions-bg-color":"#ffffff90","--epr-category-icon-active-color":"#6aa8de","--epr-skin-tone-picker-menu-color":"#ffffff95","--epr-horizontal-padding":"8px","--epr-picker-border-radius":"6px","--epr-search-border-color":"var(--epr-highlight-color)","--epr-header-padding":"8px var(--epr-horizontal-padding)","--epr-active-skin-tone-indicator-border-color":"var(--epr-highlight-color)","--epr-active-skin-hover-color":"var(--epr-hover-bg-color)","--epr-search-input-bg-color-active":"var(--epr-search-input-bg-color)","--epr-search-input-padding":"0 33px 0 8px","--epr-search-input-border-radius":"5px","--epr-search-input-height":"36px","--epr-search-input-text-color":"var(--epr-text-color)","--epr-search-input-placeholder-color":"var(--epr-text-color)","--epr-search-bar-inner-padding":"var(--epr-horizontal-padding)","--epr-category-navigation-button-size":"20px","--epr-emoji-variation-picker-height":"45px","--epr-emoji-variation-picker-bg-color":"var(--epr-bg-color)","--epr-preview-height":"70px","--epr-preview-text-size":"14px","--epr-preview-text-padding":"0 var(--epr-horizontal-padding)","--epr-preview-border-color":"var(--epr-picker-border-color)","--epr-preview-text-color":"var(--epr-text-color)","--epr-category-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-bg-color":"#ffffffe6","--epr-category-label-text-color":"var(--epr-text-color)","--epr-category-label-padding":"8px var(--epr-horizontal-padding)","--epr-category-label-height":"32px","--epr-emoji-size":"24px","--epr-emoji-padding":"5px","--epr-emoji-fullsize":"calc(var(--epr-emoji-size) + var(--epr-emoji-padding) * 2)","--epr-emoji-hover-color":"#F8FAFC","--epr-emoji-variation-indicator-color":"var(--epr-picker-border-color)","--epr-emoji-variation-indicator-color-hover":"var(--epr-text-color)","--epr-header-overlay-z-index":"3","--epr-emoji-variations-indictator-z-index":"1","--epr-category-label-z-index":"2","--epr-skin-variation-picker-z-index":"5","--epr-preview-z-index":"6","--epr-dark":"#000","--epr-dark-emoji-variation-picker-bg-color":"var(--epr-dark)","--epr-dark-highlight-color":"#c0c0c0","--epr-dark-text-color":"var(--epr-highlight-color)","--epr-dark-hover-bg-color":"#363636f6","--epr-dark-hover-bg-color-reduced-opacity":"#36363680","--epr-dark-focus-bg-color":"#474747","--epr-dark-search-input-bg-color":"#333333","--epr-dark-category-label-bg-color":"#222222e6","--epr-dark-picker-border-color":"#151617","--epr-dark-bg-color":"#222222","--epr-dark-reactions-bg-color":"#22222290","--epr-dark-search-input-bg-color-active":"var(--epr-dark)","--epr-dark-emoji-variation-indicator-color":"#444","--epr-dark-category-icon-active-color":"#3271b7","--epr-dark-skin-tone-picker-menu-color":"#22222295"}},autoThemeDark:{".":m.autoTheme,"@media (prefers-color-scheme: dark)":{"--":qe}},darkTheme:{".":m.darkTheme,"--":qe},reactionsMenu:{".":"epr-reactions",height:"50px",display:"inline-flex",backgroundColor:"var(--epr-reactions-bg-color)",backdropFilter:"blur(8px)","--":{"--epr-picker-border-radius":"50px"}}});function qt(f){return d.jsxs(Ua,{children:[d.jsx(wa,{}),d.jsx(D0,{...f,children:d.jsx(Vt,{})})]})}function Vt(){const[f]=Af(),e=n1(),[a,n]=L(!f),t=q0();return j((()=>{f&&!e||a||n(!0)}),[a,e,f]),t?d.jsxs(Ut,{children:[d.jsx(Ja,{}),d.jsx($t,{renderAll:a})]}):null}function $t({renderAll:f}){return f?d.jsxs(d.Fragment,{children:[d.jsx(Tt,{}),d.jsx(Pn,{}),d.jsx(Un,{})]}):null}const Ht=s0(qt,Ze),Wt=f=>{const e=B0({onEmojiClick:f.onEmojiClick,onReactionClick:f.onReactionClick,onSkinToneChange:f.onSkinToneChange});return d.jsx(xa,{children:d.jsx(e1.Provider,{value:e,children:d.jsx(Ht,{...f})})})};export{h as Categories,Kt as Emoji,Wt as EmojiPicker,R as EmojiStyle,df as SkinTonePickerLocation,M as SkinTones,Pf as SuggestionMode,xf as Theme};
|