@solibo/solibo-ui 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index56.css +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +40 -38
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +41 -41
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +269 -233
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +3 -3
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +11 -11
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +4 -4
- package/dist/icons-BIdcCH-v.cjs +2 -0
- package/dist/{icons-CTtWkF6z.js → icons-DVeBguFb.js} +6 -3
- package/dist/{index-O1kh8Vnq.cjs → index-7blZaPiA.cjs} +2 -2
- package/dist/{index-BlirPoN9.js → index-Dd20d_9U.js} +2 -2
- package/dist/{index-C3NJXvlq.js → index-Dx-KtGBg.js} +2 -2
- package/dist/{index-CireNaZt.cjs → index-VLDsM9it.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.js +2 -2
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/icons-B3hIY9Bm.cjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),v=require("classix"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),v=require("classix"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-BIdcCH-v.cjs"),X=require("../../index-7blZaPiA.cjs"),pe=require("../list/index.cjs"),V=require("../../index-VLDsM9it.cjs");function L(n){return typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(L).join(" "):a.isValidElement(n)?L(n.props.children):""}function fe(n){return a.isValidElement(n)&&n.type==="option"}function me(n){return a.isValidElement(n)&&n.type==="optgroup"}function _e(n){return a.isValidElement(n)&&n.type===a.Fragment}function he(n){return a.isValidElement(n)&&n.type===V.Select}function M(n,i,r=!1){const s=[];return a.Children.forEach(n,t=>{if(_e(t))s.push(...M(t.props.children,i,r));else if(fe(t)){const c=L(t.props.children).trim(),f=t.props.value!=null?String(t.props.value):c;s.push({disabled:r||!!t.props.disabled,groupLabel:i,hidden:!!t.props.hidden,isPlaceholder:!!(t.props.hidden&&f===""),label:t.props.children,selected:!!t.props.selected,text:c,value:f})}else me(t)&&s.push(...M(t.props.children,t.props.label,r||!!t.props.disabled))}),s}function ge(n){const i=n.trim();if(!i)return null;const s=[.../[*?]/.test(i)?i:`*${i}*`].map(t=>t==="*"?".*":t==="?"?".":t.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${s}$`,"i")}function xe(n,i){const r=ge(i),s=n.filter(t=>!t.hidden&&!t.isPlaceholder);return r?s.filter(t=>r.test([t.groupLabel,t.text,t.value].filter(Boolean).join(" "))):s}function be(n,i){return n.find(r=>r.value===i)??n.find(r=>r.isPlaceholder)??n[0]}function ve(n,i,r){var s,t;return i!=null?String(i):r!=null?String(r):((s=n.find(c=>c.selected))==null?void 0:s.value)??((t=n[0])==null?void 0:t.value)??""}function ye(n){if(he(n)){const{children:i,placeholder:r,...s}=n.props;return{children:l.jsxs(l.Fragment,{children:[r&&l.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:s}}return{children:n.props.children,props:n.props}}const we="_combobox_5r227_3",je="_dropdown_5r227_20",Se="_empty_5r227_25",Ne="_group_5r227_26",Ce="_placeholder_5r227_27",Ee="_filter_5r227_35",Ve="_native_5r227_45",Le="_option_5r227_55",Re="_options_5r227_76",$e="_panel_5r227_83",Be="_selected_5r227_108",Ie="_text_5r227_112",qe="_trigger_5r227_120",De="_minimal_5r227_157",Pe="_inline_5r227_217",ke="_label_5r227_249",o={combobox:we,"combobox-input":"_combobox-input_5r227_12",dropdown:je,empty:Se,group:Ne,placeholder:Ce,filter:Ee,native:Ve,option:Le,options:Re,panel:$e,selected:Be,text:Ie,trigger:qe,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_5r227_255"};function Y(n,i){return{"--icon-svg":de.iconSVG(n,i)}}const Fe=({children:n,className:i,combobox:r=!1,createOption:s,emptyLabel:t="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:g="default",...ee})=>{const $=ye(n),{defaultValue:ne,onChange:B,value:I,...te}=$.props,y=V.sanitizeSelectProps(te),{className:re,...se}=y,W=a.useRef(null),G=a.useRef(null),w=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M($.children),b=I!=null,q=ve(x,I,ne),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[j,S]=a.useState(""),N=b?String(I):D,z={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,C=be(x,N),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,j),_=j.trim(),E=!!(r&&s&&_&&s.isValid(_)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===N,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){S("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=G.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),r||(e=W.current)==null||e.focus()},K=()=>{var e;S(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!s||!E||(s.onCreate(_),K())},ce=e=>{var U;b||P(e);const d=Q.current;if(!d){k();return}const h=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;h==null||h.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),r?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=l.jsxs("div",{className:v(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,"data-component":"dropdown",children:[l.jsx("select",{...se,"aria-hidden":"true",className:v(o.native,re),onChange:ae,ref:Q,tabIndex:-1,value:N,children:$.children}),r?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":y["aria-label"]??c??R,className:o["combobox-input"],disabled:y.disabled,onChange:e=>{S(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:j})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${w} ${w}-value`:void 0,className:v(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:y.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${w}-value`,children:A(C)})}),u&&l.jsxs("div",{className:o.panel,children:[!r&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>S(e.target.value),placeholder:R,ref:m,style:oe,type:"search",value:j}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===N;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:v(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&s&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":L(s.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:s.render(_)})})}),T.length===0&&!E&&l.jsx("li",{className:o.empty,children:t})]})]})]});return c?l.jsxs("div",{className:v(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:w,children:ie}),J]}):J};exports.Dropdown=Fe;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,10 +2,10 @@ import { jsxs as p, Fragment as fe, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import y from "classix";
|
|
3
3
|
import he, { Children as _e, isValidElement as x, useRef as L, useId as ge, useState as W, useEffect as G } from "react";
|
|
4
4
|
import { Button as Q } from "../button/index.js";
|
|
5
|
-
import { i as be } from "../../icons-
|
|
6
|
-
import { f as ve, I as ye } from "../../index-
|
|
5
|
+
import { i as be } from "../../icons-DVeBguFb.js";
|
|
6
|
+
import { f as ve, I as ye } from "../../index-Dd20d_9U.js";
|
|
7
7
|
import { List as xe } from "../list/index.js";
|
|
8
|
-
import { S as we, s as Ne, r as ee } from "../../index-
|
|
8
|
+
import { S as we, s as Ne, r as ee } from "../../index-Dx-KtGBg.js";
|
|
9
9
|
import '../../assets/index41.css';function $(t) {
|
|
10
10
|
return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map($).join(" ") : x(t) ? $(t.props.children) : "";
|
|
11
11
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('../../assets/index43.css');var Ct=Object.defineProperty;var Nt=(u,n,i)=>n in u?Ct(u,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[n]=i;var W=(u,n,i)=>Nt(u,typeof n!="symbol"?n+"":n,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),vt=require("@lexical/html"),w=require("@lexical/link"),$=require("@lexical/list"),St=require("@lexical/react/LexicalAutoFocusPlugin"),jt=require("@lexical/react/LexicalAutoLinkPlugin"),ft=require("@lexical/react/LexicalComposerContext"),At=require("@lexical/react/LexicalContentEditable"),Et=require("@lexical/react/LexicalErrorBoundary"),Mt=require("@lexical/react/LexicalExtensionComposer"),wt=require("@lexical/react/LexicalHistoryPlugin"),$t=require("@lexical/react/LexicalLinkPlugin"),Tt=require("@lexical/react/LexicalListPlugin"),Ot=require("@lexical/react/LexicalOnChangePlugin"),Rt=require("@lexical/react/LexicalRichTextPlugin"),st=require("classix"),l=require("lexical"),r=require("react"),_t=require("sanitize-html"),Pt=require("../file/index.cjs"),yt=require("@lexical/utils"),I=require("../button/index.cjs"),M=require("../icon/index.cjs"),pt=require("../../index-O1kh8Vnq.cjs"),qt=require("../toolbar/index.cjs"),Lt=l.createCommand();class nt extends l.DecoratorNode{constructor(i,a,h,g,o,f,x){super(o);W(this,"__src");W(this,"__alt");W(this,"__width");W(this,"__height");W(this,"__soliboDocumentId");W(this,"__soliboDocumentSlot");this.__src=i,this.__alt=a,this.__width=h,this.__height=g,this.__soliboDocumentId=f,this.__soliboDocumentSlot=x}static getType(){return"image"}static clone(i){return new nt(i.__src,i.__alt,i.__width,i.__height,i.__key,i.__soliboDocumentId,i.__soliboDocumentSlot)}static importJSON(i){return at({alt:i.alt,height:i.height,soliboDocumentId:i.soliboDocumentId,soliboDocumentSlot:i.soliboDocumentSlot,src:i.src,width:i.width})}exportJSON(){return{alt:this.__alt,height:this.__height,...this.__soliboDocumentId?{soliboDocumentId:this.__soliboDocumentId}:void 0,...this.__soliboDocumentSlot?{soliboDocumentSlot:this.__soliboDocumentSlot}:void 0,src:this.__src,type:"image",version:1,width:this.__width}}static importDOM(){return{img:i=>({conversion:a=>{if(!(a instanceof HTMLImageElement))return null;const h=a.getAttribute("src")??"";if(!h)return null;const g=a.getAttribute("width"),o=a.getAttribute("height");return{node:at({alt:a.getAttribute("alt")??"",height:o?Number(o):void 0,soliboDocumentId:a.getAttribute("data-solibo-document-id")??void 0,soliboDocumentSlot:a.getAttribute("data-solibo-document-slot")??void 0,src:h,width:g?Number(g):void 0})}},priority:0})}}exportDOM(){const i=document.createElement("img");return this.__soliboDocumentSlot||i.setAttribute("src",this.__src),this.__soliboDocumentId&&i.setAttribute("data-solibo-document-id",this.__soliboDocumentId),this.__soliboDocumentSlot&&i.setAttribute("data-solibo-document-slot",this.__soliboDocumentSlot),this.__alt&&i.setAttribute("alt",this.__alt),this.__width&&i.setAttribute("width",String(this.__width)),this.__height&&i.setAttribute("height",String(this.__height)),{element:i}}createDOM(){return document.createElement("span")}updateDOM(){return!1}isInline(){return!0}getSrc(){return this.__src}setSrc(i){const a=this.getWritable();return a.__src=i,a}setWidth(i){const a=this.getWritable();return a.__width=i,a.__height=void 0,a}decorate(i){return e.jsx("img",{alt:this.__alt,height:this.__height,"data-solibo-document-id":this.__soliboDocumentId,"data-solibo-document-slot":this.__soliboDocumentSlot,onClick:a=>{a.preventDefault(),i.dispatchCommand(Lt,{key:this.getKey(),soliboDocumentSlot:this.__soliboDocumentSlot,src:this.__src,width:this.__width})},src:this.__src,width:this.__width})}}function at({alt:u="",height:n,soliboDocumentId:i,soliboDocumentSlot:a,src:h,width:g}){return l.$applyNodeReplacement(new nt(h,u,g,n,void 0,i,a))}function ht(u){return u instanceof nt}const Bt=({createImages:u})=>{const[n]=ft.useLexicalComposerContext();return r.useEffect(()=>n.registerCommand(l.PASTE_COMMAND,i=>{var o;if(!("clipboardData"in i))return!1;const a=i,h=Array.from(((o=a.clipboardData)==null?void 0:o.items)??[]).flatMap(f=>{if(f.kind!=="file"||!f.type.startsWith("image/"))return[];const x=f.getAsFile();return x?[x]:[]});if(h.length===0)return!1;a.preventDefault();const g=u(h);return n.update(()=>{l.$insertNodes(g.map(f=>at(f)))}),!0},l.COMMAND_PRIORITY_HIGH),[u,n]),null},Ut=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Ft=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Kt=[u=>{const n=Ut.exec(u);return n!=null&&n.length?{index:n.index,length:n[0].length,text:n[0],url:`mailto:${n[0]}`}:null},u=>{const n=Ft.exec(u);return n!=null&&n.length?{index:n.index,length:n[0].length,text:n[0],url:n[0].startsWith("http")?n[0]:`https://${n[0]}`}:null}];function gt(u){try{const n=new URL(u);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}const Wt="_field_csex1_3",Ht="_editor_csex1_8",Gt="_invalid_csex1_42",zt="_error_csex1_46",Zt="_dragging_csex1_52",Vt="_content_csex1_56",Xt="_files_csex1_71",Yt="_placeholder_csex1_79",Jt="_fill_csex1_87",Qt="_meta_csex1_115",te="_active_csex1_124",ee="_submit_csex1_143",ie="_bold_csex1_147",se="_italic_csex1_151",ne="_underline_csex1_155",re="_link_csex1_159",oe="_list_csex1_165",le="_paragraph_csex1_166",_={field:Wt,editor:Ht,invalid:Gt,error:zt,dragging:Zt,content:Vt,"has-files":"_has-files_csex1_67",files:Xt,placeholder:Yt,fill:Jt,"fill-editor":"_fill-editor_csex1_95",meta:Qt,active:te,"image-sizes":"_image-sizes_csex1_136",submit:ee,bold:ie,italic:se,underline:ne,link:re,list:oe,paragraph:le},ae=[{label:"Small",width:320},{label:"Medium",width:640},{label:"Large",width:960},{label:"Original",width:void 0}],ce=({disabled:u=!1,isSubmitting:n=!1,onFilesSelected:i,onInlineImageRemove:a,onSubmit:h,submitLabel:g="Submit"})=>{const[o]=ft.useLexicalComposerContext(),[f,x]=r.useState(!1),[y,rt]=r.useState(!1),[ot,H]=r.useState(!1),[lt,k]=r.useState(!1),[S,b]=r.useState(!1),[O,q]=r.useState(!1),[Y,J]=r.useState(""),[p,Q]=r.useState(null),[G,R]=r.useState(null),[ct,tt]=r.useState(void 0),[B,j]=r.useState(""),A=gt(B.trim()),v=r.useRef(null),T=r.useRef(null),U=r.useRef(null),L=r.useRef(null),z=r.useRef(!1),et=t=>t.preventDefault(),Z=r.useCallback(t=>{L.current=l.$isRangeSelection(t)?t.clone():null},[]),V=r.useCallback(t=>{o.update(()=>{L.current&&l.$setSelection(L.current),t()}),L.current=null},[o]),F=t=>{z.current=!0,t.preventDefault()},s=()=>{if(z.current){z.current=!1;return}dt()},c=r.useCallback(()=>{rt(!1),J(""),Q(null),R(null),tt(void 0)},[]),d=r.useCallback(()=>{b(!1),j("")},[]),C=r.useCallback(t=>{rt(!0),J((t==null?void 0:t.src)??""),Q((t==null?void 0:t.key)??null),R((t==null?void 0:t.soliboDocumentSlot)??null),tt(t==null?void 0:t.width),d(),t!=null&&t.soliboDocumentSlot||setTimeout(()=>{var m;return(m=T.current)==null?void 0:m.focus()},0)},[d]),it=r.useCallback(t=>{o.getEditorState().read(()=>{Z(l.$getSelection())}),b(!0),j(t),c(),setTimeout(()=>{var m;return(m=U.current)==null?void 0:m.focus()},0)},[c,o,Z]),ut=r.useCallback(()=>{const t=B.trim();gt(t)&&(V(()=>{o.dispatchCommand(w.TOGGLE_LINK_COMMAND,{url:t,target:"_blank"});const m=l.$getSelection();if(!l.$isRangeSelection(m))return;const E=m.getNodes().at(-1)??null,K=(E==null?void 0:E.getParent())??null,D=w.$isLinkNode(E)?E:w.$isLinkNode(K)?K:null;if(D){const P=D.getLastChild();if(l.$isTextNode(P)){const xt=P.getTextContent(),bt=xt.replace(/\s+$/,"");bt!==xt&&P.setTextContent(bt)}const X=D.getNextSibling();if(l.$isTextNode(X)&&/^\s/.test(X.getTextContent())){X.select(1,1);return}const N=l.$createTextNode(" ");D.insertAfter(N),N.selectEnd()}}),d())},[d,o,B,V]),dt=r.useCallback(()=>{const t=Y.trim();if(!t){c();return}o.update(()=>{if(p){const m=l.$getNodeByKey(p);ht(m)&&m.setSrc(t);return}l.$insertNodes([at({src:t})])}),c()},[c,o,p,Y]),Dt=r.useCallback(()=>{if(!p){c();return}o.update(()=>{const t=l.$getNodeByKey(p);if(ht(t)){const m=t.getParent();l.$isParagraphNode(m)&&m.getChildrenSize()===1?m.remove():t.remove(),G&&(a==null||a(G))}}),c()},[c,o,p,G,a]),It=r.useCallback(t=>{p&&(o.update(()=>{const m=l.$getNodeByKey(p);ht(m)&&m.setWidth(t)}),tt(t))},[o,p]),kt=r.useCallback(()=>{V(()=>{o.dispatchCommand(w.TOGGLE_LINK_COMMAND,null)}),d()},[d,o,V]),mt=r.useCallback(()=>{const t=l.$getSelection();if(!l.$isRangeSelection(t)){if(l.$isNodeSelection(t)){const K=t.getNodes(),D=K[0]??null,P=(D==null?void 0:D.getParent())??null;x(K.some(N=>l.$isTextNode(N)&&N.hasFormat("bold"))),H(K.some(N=>l.$isTextNode(N)&&N.hasFormat("italic"))),k(K.some(N=>l.$isTextNode(N)&&N.hasFormat("underline"))),q($.$isListNode(P)||$.$isListItemNode(P)||$.$isListNode(D)||$.$isListItemNode(D));const X=w.$isLinkNode(D)?D:w.$isLinkNode(P)?P:null;if(X){b(!0),j(X.getURL());return}b(!1),j(""),L.current=null;return}x(!1),H(!1),k(!1),q(!1),b(!1),j(""),L.current=null;return}const[m]=t.getNodes(),E=(m==null?void 0:m.getParent())??null;if(x(t.hasFormat("bold")),H(t.hasFormat("italic")),k(t.hasFormat("underline")),q($.$isListNode(E)||$.$isListItemNode(E)),w.$isLinkNode(E)){b(!0),j(E.getURL()),Z(t);return}b(!1),j(""),L.current=null},[Z]);return r.useEffect(()=>yt.mergeRegister(o.registerUpdateListener(({editorState:t})=>{t.read(()=>{mt()})}),o.registerCommand(Lt,t=>(C(t),!0),l.COMMAND_PRIORITY_LOW),o.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(o.getEditorState().read(()=>{mt()}),!1),l.COMMAND_PRIORITY_LOW)),[o,C,mt]),e.jsxs(qt.Toolbar,{variant:"editor","data-component":"editortoolbar",children:[e.jsx(I.Button,{"aria-label":"Bold","data-active":f,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"bold")},title:"Bold",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextB"})}),e.jsx(I.Button,{"aria-label":"Italic","data-active":ot,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"italic")},title:"Italic",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextItalic"})}),e.jsx(I.Button,{"aria-label":"Underline","data-active":lt,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"underline")},title:"Underline",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextUnderline"})}),e.jsx(I.Button,{"aria-label":"List","data-active":O,onClick:()=>{O?o.dispatchCommand($.REMOVE_LIST_COMMAND,void 0):o.dispatchCommand($.INSERT_UNORDERED_LIST_COMMAND,void 0)},title:"List",variant:"tertiary",children:e.jsx(M.Icon,{name:"ListBullets"})}),e.jsx(I.Button,{"aria-label":"Link","data-active":S,onClick:()=>{S?it(B):(o.dispatchCommand(w.TOGGLE_LINK_COMMAND,{url:"https://"}),it("https://"))},title:"Link",variant:"tertiary",children:e.jsx(M.Icon,{name:"Link"})}),i&&e.jsxs(e.Fragment,{children:[e.jsx("input",{hidden:!0,multiple:!0,onChange:t=>{t.target.files&&i(t.target.files),t.target.value=""},ref:v,type:"file"}),e.jsx(I.Button,{"aria-label":"Upload files",onClick:()=>{var t;return(t=v.current)==null?void 0:t.click()},title:"Upload files",variant:"tertiary",children:e.jsx(M.Icon,{name:"Paperclip"})})]}),h&&e.jsx(I.Button,{"aria-label":g,className:_.submit,"data-cy":"toolbar-submit-button",disabled:u,icon:"PaperPlaneTilt",isLoading:n,onClick:()=>h(),variant:"primary",children:e.jsx("span",{children:g})}),e.jsxs("div",{className:st(_.meta,S||y?_.active:""),children:[S&&e.jsxs(e.Fragment,{children:[e.jsx(pt.Input,{"aria-invalid":!A,onBlur:()=>ut(),onChange:t=>j(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),ut())},ref:U,value:B}),e.jsx(I.Button,{"aria-label":"Apply link",disabled:!A,onClick:()=>{ut()},onMouseDown:et,variant:"tertiary",children:e.jsx(M.Icon,{name:"Check"})}),e.jsx(I.Button,{"aria-label":"Remove link",onClick:()=>kt(),onMouseDown:et,variant:"tertiary",children:e.jsx(M.Icon,{name:"Trash",variant:"danger"})})]}),y&&e.jsxs(e.Fragment,{children:[!G&&e.jsxs(e.Fragment,{children:[e.jsx(pt.Input,{className:st(_.active),onBlur:s,onChange:t=>J(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),z.current=!0,dt())},ref:T,value:Y}),e.jsx(I.Button,{"aria-label":"Apply image",onClick:()=>dt(),onMouseDown:F,variant:"tertiary",children:e.jsx(M.Icon,{name:"Check"})})]}),e.jsx("div",{className:_["image-sizes"],children:ae.map(({label:t,width:m})=>e.jsx(I.Button,{"aria-label":`${t} image`,"data-active":ct===m,onClick:()=>It(m),onMouseDown:et,variant:"tertiary",children:t},t))}),e.jsx(I.Button,{"aria-label":"Remove image",onClick:()=>Dt(),onMouseDown:F,variant:"tertiary",children:e.jsx(M.Icon,{name:"Trash",variant:"danger"})})]})]})]})},ue=l.defineExtension({name:"solibo-editor",namespace:"Editor",nodes:[w.AutoLinkNode,w.LinkNode,$.ListNode,$.ListItemNode,nt],onError(u){throw u},theme:{link:_.link,list:{ol:_.list,ul:_.list},paragraph:_.paragraph,text:{bold:_.bold,italic:_.italic,underline:_.underline}}});function de({autofocus:u,content:n="",lastEmittedContentRef:i}){const[a]=ft.useLexicalComposerContext();return r.useEffect(()=>{i.current!==n&&a.update(()=>{const g=new DOMParser().parseFromString(n,"text/html"),o=vt.$generateNodesFromDOM(a,g),f=l.$getRoot();f.clear().select(),l.$insertNodes(o),u?f.selectEnd():l.$setSelection(null)})},[u,n,a,i]),null}const me=({autofocus:u=!1,autolink:n=!1,content:i,disabled:a=!1,errorMessage:h,fill:g=!1,files:o,inline:f=!1,inlineImages:x,invalid:y=!1,isSubmitting:rt=!1,maxRows:ot=12,minRows:H=1,onChange:lt,onFilesChange:k,onInlineImagesChange:S,onSubmit:b,onUpload:O,placeholder:q,required:Y=!1,submitLabel:J})=>{const p=r.useId(),Q=r.useRef(void 0),[G,R]=r.useState(!1),[ct,tt]=r.useState([]),[B,j]=r.useState([]),A=r.useRef(new Map),v=o??ct,T=x??B,U=s=>{o===void 0&&tt(s),k==null||k(s)},L=r.useCallback(s=>{x===void 0&&j(s),S==null||S(s)},[x,S]),z=r.useCallback(s=>{const c=s.map(d=>{const C=`pasted-${crypto.randomUUID()}`,it=URL.createObjectURL(d);return A.current.set(C,it),{image:{alt:d.name,soliboDocumentSlot:C,src:it},pending:{file:d,slot:C}}});return L([...T,...c.map(({pending:d})=>d)]),c.map(({image:d})=>d)},[T,L]),et=r.useCallback(s=>{L(T.filter(d=>d.slot!==s));const c=A.current.get(s);c&&URL.revokeObjectURL(c),A.current.delete(s)},[T,L]);r.useEffect(()=>()=>{A.current.forEach(s=>URL.revokeObjectURL(s)),A.current.clear()},[]),r.useEffect(()=>{const s=new Set(T.map(c=>c.slot));A.current.forEach((c,d)=>{s.has(d)||(URL.revokeObjectURL(c),A.current.delete(d))})},[T]);const Z=s=>{if(typeof DataTransfer<"u"){const c=new DataTransfer;return s.forEach(d=>c.items.add(d)),c.files}return Object.assign([...s],{item:c=>s[c]??null})},V=async()=>{try{v.length>0&&await(O==null?void 0:O(Z(v))),await(b==null?void 0:b()),v.length>0&&U([])}catch{return}},F=s=>{s.preventDefault(),s.stopPropagation()};return e.jsxs("div",{className:st(_.field,g&&_.fill),"data-max-rows":ot,"data-min-rows":H,onDragEnter:s=>{F(s),R(!!k)},onDragOver:s=>{F(s),R(!!k)},onDragLeave:s=>{F(s),R(!1)},onDropCapture:s=>{var d;const c=(d=s.dataTransfer)==null?void 0:d.files;c!=null&&c.length&&(F(s),(k||O)&&U([...v,...Array.from(c)]),R(!1))},onDrop:s=>{s.preventDefault(),R(!1)},"data-component":"editor",children:[e.jsx("div",{className:st(_.editor,g&&_["fill-editor"],y&&_.invalid,v.length>0&&_["has-files"]),style:{"--editor-max-height":`calc(${ot*1.25}em + (2 * var(--scale-8)))`,"--editor-min-height":`calc(${H*1.25}em + (2 * var(--scale-8)))`},children:e.jsxs(Mt.LexicalExtensionComposer,{contentEditable:null,extension:ue,children:[!f&&e.jsx(ce,{disabled:a,isSubmitting:rt,onInlineImageRemove:et,onFilesSelected:O||k?s=>{U([...v,...Array.from(s)])}:void 0,onSubmit:b?()=>void V():void 0,submitLabel:J}),e.jsx("div",{className:st(_.content,G&&_.dragging),children:e.jsx(Rt.RichTextPlugin,{contentEditable:e.jsx(At.ContentEditable,{"aria-placeholder":q??"",ariaErrorMessage:y&&h?p:void 0,ariaInvalid:y||void 0,ariaRequired:Y||void 0,placeholder:()=>q?e.jsx("div",{className:_.placeholder,children:q}):null}),ErrorBoundary:Et.LexicalErrorBoundary})}),v.length>0&&e.jsx("div",{"aria-label":"Files to upload",className:_.files,role:"region",children:v.map((s,c)=>e.jsx(Pt.File,{deleteAccessibleLabel:`Remove ${s.name} from upload queue`,name:s.name,onDelete:()=>U(v.filter((d,C)=>C!==c))},`${s.name}-${s.size}-${s.lastModified}-${c}`))}),u&&e.jsx(St.AutoFocusPlugin,{}),n&&e.jsx(jt.AutoLinkPlugin,{matchers:Kt}),e.jsx(wt.HistoryPlugin,{}),S&&e.jsx(Bt,{createImages:z}),i!==void 0&&e.jsx(de,{autofocus:u,content:i,lastEmittedContentRef:Q}),e.jsx($t.LinkPlugin,{validateUrl:gt}),e.jsx(Tt.ListPlugin,{}),lt&&e.jsx(Ot.OnChangePlugin,{onChange:(s,c)=>{s.read(()=>{const d=vt.$generateHtmlFromNodes(c,null),C=_t(d,{allowedAttributes:{..._t.defaults.allowedAttributes,img:[..._t.defaults.allowedAttributes.img??[],"data-solibo-document-id","data-solibo-document-slot"]},allowedTags:["a","b","br","i","img","li","ol","p","u","ul"]});Q.current=C,lt(C)})}})]})}),y&&h&&e.jsx("div",{className:_.error,id:p,children:h})]})};exports.Editor=me;
|
|
1
|
+
"use strict";require('../../assets/index43.css');var Ct=Object.defineProperty;var Nt=(u,n,i)=>n in u?Ct(u,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[n]=i;var W=(u,n,i)=>Nt(u,typeof n!="symbol"?n+"":n,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),vt=require("@lexical/html"),w=require("@lexical/link"),$=require("@lexical/list"),St=require("@lexical/react/LexicalAutoFocusPlugin"),jt=require("@lexical/react/LexicalAutoLinkPlugin"),ft=require("@lexical/react/LexicalComposerContext"),At=require("@lexical/react/LexicalContentEditable"),Et=require("@lexical/react/LexicalErrorBoundary"),Mt=require("@lexical/react/LexicalExtensionComposer"),wt=require("@lexical/react/LexicalHistoryPlugin"),$t=require("@lexical/react/LexicalLinkPlugin"),Tt=require("@lexical/react/LexicalListPlugin"),Ot=require("@lexical/react/LexicalOnChangePlugin"),Rt=require("@lexical/react/LexicalRichTextPlugin"),st=require("classix"),l=require("lexical"),r=require("react"),_t=require("sanitize-html"),Pt=require("../file/index.cjs"),yt=require("@lexical/utils"),I=require("../button/index.cjs"),M=require("../icon/index.cjs"),pt=require("../../index-7blZaPiA.cjs"),qt=require("../toolbar/index.cjs"),Lt=l.createCommand();class nt extends l.DecoratorNode{constructor(i,a,h,g,o,f,x){super(o);W(this,"__src");W(this,"__alt");W(this,"__width");W(this,"__height");W(this,"__soliboDocumentId");W(this,"__soliboDocumentSlot");this.__src=i,this.__alt=a,this.__width=h,this.__height=g,this.__soliboDocumentId=f,this.__soliboDocumentSlot=x}static getType(){return"image"}static clone(i){return new nt(i.__src,i.__alt,i.__width,i.__height,i.__key,i.__soliboDocumentId,i.__soliboDocumentSlot)}static importJSON(i){return at({alt:i.alt,height:i.height,soliboDocumentId:i.soliboDocumentId,soliboDocumentSlot:i.soliboDocumentSlot,src:i.src,width:i.width})}exportJSON(){return{alt:this.__alt,height:this.__height,...this.__soliboDocumentId?{soliboDocumentId:this.__soliboDocumentId}:void 0,...this.__soliboDocumentSlot?{soliboDocumentSlot:this.__soliboDocumentSlot}:void 0,src:this.__src,type:"image",version:1,width:this.__width}}static importDOM(){return{img:i=>({conversion:a=>{if(!(a instanceof HTMLImageElement))return null;const h=a.getAttribute("src")??"";if(!h)return null;const g=a.getAttribute("width"),o=a.getAttribute("height");return{node:at({alt:a.getAttribute("alt")??"",height:o?Number(o):void 0,soliboDocumentId:a.getAttribute("data-solibo-document-id")??void 0,soliboDocumentSlot:a.getAttribute("data-solibo-document-slot")??void 0,src:h,width:g?Number(g):void 0})}},priority:0})}}exportDOM(){const i=document.createElement("img");return this.__soliboDocumentSlot||i.setAttribute("src",this.__src),this.__soliboDocumentId&&i.setAttribute("data-solibo-document-id",this.__soliboDocumentId),this.__soliboDocumentSlot&&i.setAttribute("data-solibo-document-slot",this.__soliboDocumentSlot),this.__alt&&i.setAttribute("alt",this.__alt),this.__width&&i.setAttribute("width",String(this.__width)),this.__height&&i.setAttribute("height",String(this.__height)),{element:i}}createDOM(){return document.createElement("span")}updateDOM(){return!1}isInline(){return!0}getSrc(){return this.__src}setSrc(i){const a=this.getWritable();return a.__src=i,a}setWidth(i){const a=this.getWritable();return a.__width=i,a.__height=void 0,a}decorate(i){return e.jsx("img",{alt:this.__alt,height:this.__height,"data-solibo-document-id":this.__soliboDocumentId,"data-solibo-document-slot":this.__soliboDocumentSlot,onClick:a=>{a.preventDefault(),i.dispatchCommand(Lt,{key:this.getKey(),soliboDocumentSlot:this.__soliboDocumentSlot,src:this.__src,width:this.__width})},src:this.__src,width:this.__width})}}function at({alt:u="",height:n,soliboDocumentId:i,soliboDocumentSlot:a,src:h,width:g}){return l.$applyNodeReplacement(new nt(h,u,g,n,void 0,i,a))}function ht(u){return u instanceof nt}const Bt=({createImages:u})=>{const[n]=ft.useLexicalComposerContext();return r.useEffect(()=>n.registerCommand(l.PASTE_COMMAND,i=>{var o;if(!("clipboardData"in i))return!1;const a=i,h=Array.from(((o=a.clipboardData)==null?void 0:o.items)??[]).flatMap(f=>{if(f.kind!=="file"||!f.type.startsWith("image/"))return[];const x=f.getAsFile();return x?[x]:[]});if(h.length===0)return!1;a.preventDefault();const g=u(h);return n.update(()=>{l.$insertNodes(g.map(f=>at(f)))}),!0},l.COMMAND_PRIORITY_HIGH),[u,n]),null},Ut=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Ft=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Kt=[u=>{const n=Ut.exec(u);return n!=null&&n.length?{index:n.index,length:n[0].length,text:n[0],url:`mailto:${n[0]}`}:null},u=>{const n=Ft.exec(u);return n!=null&&n.length?{index:n.index,length:n[0].length,text:n[0],url:n[0].startsWith("http")?n[0]:`https://${n[0]}`}:null}];function gt(u){try{const n=new URL(u);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}const Wt="_field_csex1_3",Ht="_editor_csex1_8",Gt="_invalid_csex1_42",zt="_error_csex1_46",Zt="_dragging_csex1_52",Vt="_content_csex1_56",Xt="_files_csex1_71",Yt="_placeholder_csex1_79",Jt="_fill_csex1_87",Qt="_meta_csex1_115",te="_active_csex1_124",ee="_submit_csex1_143",ie="_bold_csex1_147",se="_italic_csex1_151",ne="_underline_csex1_155",re="_link_csex1_159",oe="_list_csex1_165",le="_paragraph_csex1_166",_={field:Wt,editor:Ht,invalid:Gt,error:zt,dragging:Zt,content:Vt,"has-files":"_has-files_csex1_67",files:Xt,placeholder:Yt,fill:Jt,"fill-editor":"_fill-editor_csex1_95",meta:Qt,active:te,"image-sizes":"_image-sizes_csex1_136",submit:ee,bold:ie,italic:se,underline:ne,link:re,list:oe,paragraph:le},ae=[{label:"Small",width:320},{label:"Medium",width:640},{label:"Large",width:960},{label:"Original",width:void 0}],ce=({disabled:u=!1,isSubmitting:n=!1,onFilesSelected:i,onInlineImageRemove:a,onSubmit:h,submitLabel:g="Submit"})=>{const[o]=ft.useLexicalComposerContext(),[f,x]=r.useState(!1),[y,rt]=r.useState(!1),[ot,H]=r.useState(!1),[lt,k]=r.useState(!1),[S,b]=r.useState(!1),[O,q]=r.useState(!1),[Y,J]=r.useState(""),[p,Q]=r.useState(null),[G,R]=r.useState(null),[ct,tt]=r.useState(void 0),[B,j]=r.useState(""),A=gt(B.trim()),v=r.useRef(null),T=r.useRef(null),U=r.useRef(null),L=r.useRef(null),z=r.useRef(!1),et=t=>t.preventDefault(),Z=r.useCallback(t=>{L.current=l.$isRangeSelection(t)?t.clone():null},[]),V=r.useCallback(t=>{o.update(()=>{L.current&&l.$setSelection(L.current),t()}),L.current=null},[o]),F=t=>{z.current=!0,t.preventDefault()},s=()=>{if(z.current){z.current=!1;return}dt()},c=r.useCallback(()=>{rt(!1),J(""),Q(null),R(null),tt(void 0)},[]),d=r.useCallback(()=>{b(!1),j("")},[]),C=r.useCallback(t=>{rt(!0),J((t==null?void 0:t.src)??""),Q((t==null?void 0:t.key)??null),R((t==null?void 0:t.soliboDocumentSlot)??null),tt(t==null?void 0:t.width),d(),t!=null&&t.soliboDocumentSlot||setTimeout(()=>{var m;return(m=T.current)==null?void 0:m.focus()},0)},[d]),it=r.useCallback(t=>{o.getEditorState().read(()=>{Z(l.$getSelection())}),b(!0),j(t),c(),setTimeout(()=>{var m;return(m=U.current)==null?void 0:m.focus()},0)},[c,o,Z]),ut=r.useCallback(()=>{const t=B.trim();gt(t)&&(V(()=>{o.dispatchCommand(w.TOGGLE_LINK_COMMAND,{url:t,target:"_blank"});const m=l.$getSelection();if(!l.$isRangeSelection(m))return;const E=m.getNodes().at(-1)??null,K=(E==null?void 0:E.getParent())??null,D=w.$isLinkNode(E)?E:w.$isLinkNode(K)?K:null;if(D){const P=D.getLastChild();if(l.$isTextNode(P)){const xt=P.getTextContent(),bt=xt.replace(/\s+$/,"");bt!==xt&&P.setTextContent(bt)}const X=D.getNextSibling();if(l.$isTextNode(X)&&/^\s/.test(X.getTextContent())){X.select(1,1);return}const N=l.$createTextNode(" ");D.insertAfter(N),N.selectEnd()}}),d())},[d,o,B,V]),dt=r.useCallback(()=>{const t=Y.trim();if(!t){c();return}o.update(()=>{if(p){const m=l.$getNodeByKey(p);ht(m)&&m.setSrc(t);return}l.$insertNodes([at({src:t})])}),c()},[c,o,p,Y]),Dt=r.useCallback(()=>{if(!p){c();return}o.update(()=>{const t=l.$getNodeByKey(p);if(ht(t)){const m=t.getParent();l.$isParagraphNode(m)&&m.getChildrenSize()===1?m.remove():t.remove(),G&&(a==null||a(G))}}),c()},[c,o,p,G,a]),It=r.useCallback(t=>{p&&(o.update(()=>{const m=l.$getNodeByKey(p);ht(m)&&m.setWidth(t)}),tt(t))},[o,p]),kt=r.useCallback(()=>{V(()=>{o.dispatchCommand(w.TOGGLE_LINK_COMMAND,null)}),d()},[d,o,V]),mt=r.useCallback(()=>{const t=l.$getSelection();if(!l.$isRangeSelection(t)){if(l.$isNodeSelection(t)){const K=t.getNodes(),D=K[0]??null,P=(D==null?void 0:D.getParent())??null;x(K.some(N=>l.$isTextNode(N)&&N.hasFormat("bold"))),H(K.some(N=>l.$isTextNode(N)&&N.hasFormat("italic"))),k(K.some(N=>l.$isTextNode(N)&&N.hasFormat("underline"))),q($.$isListNode(P)||$.$isListItemNode(P)||$.$isListNode(D)||$.$isListItemNode(D));const X=w.$isLinkNode(D)?D:w.$isLinkNode(P)?P:null;if(X){b(!0),j(X.getURL());return}b(!1),j(""),L.current=null;return}x(!1),H(!1),k(!1),q(!1),b(!1),j(""),L.current=null;return}const[m]=t.getNodes(),E=(m==null?void 0:m.getParent())??null;if(x(t.hasFormat("bold")),H(t.hasFormat("italic")),k(t.hasFormat("underline")),q($.$isListNode(E)||$.$isListItemNode(E)),w.$isLinkNode(E)){b(!0),j(E.getURL()),Z(t);return}b(!1),j(""),L.current=null},[Z]);return r.useEffect(()=>yt.mergeRegister(o.registerUpdateListener(({editorState:t})=>{t.read(()=>{mt()})}),o.registerCommand(Lt,t=>(C(t),!0),l.COMMAND_PRIORITY_LOW),o.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(o.getEditorState().read(()=>{mt()}),!1),l.COMMAND_PRIORITY_LOW)),[o,C,mt]),e.jsxs(qt.Toolbar,{variant:"editor","data-component":"editortoolbar",children:[e.jsx(I.Button,{"aria-label":"Bold","data-active":f,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"bold")},title:"Bold",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextB"})}),e.jsx(I.Button,{"aria-label":"Italic","data-active":ot,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"italic")},title:"Italic",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextItalic"})}),e.jsx(I.Button,{"aria-label":"Underline","data-active":lt,onClick:()=>{o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"underline")},title:"Underline",variant:"tertiary",children:e.jsx(M.Icon,{name:"TextUnderline"})}),e.jsx(I.Button,{"aria-label":"List","data-active":O,onClick:()=>{O?o.dispatchCommand($.REMOVE_LIST_COMMAND,void 0):o.dispatchCommand($.INSERT_UNORDERED_LIST_COMMAND,void 0)},title:"List",variant:"tertiary",children:e.jsx(M.Icon,{name:"ListBullets"})}),e.jsx(I.Button,{"aria-label":"Link","data-active":S,onClick:()=>{S?it(B):(o.dispatchCommand(w.TOGGLE_LINK_COMMAND,{url:"https://"}),it("https://"))},title:"Link",variant:"tertiary",children:e.jsx(M.Icon,{name:"Link"})}),i&&e.jsxs(e.Fragment,{children:[e.jsx("input",{hidden:!0,multiple:!0,onChange:t=>{t.target.files&&i(t.target.files),t.target.value=""},ref:v,type:"file"}),e.jsx(I.Button,{"aria-label":"Upload files",onClick:()=>{var t;return(t=v.current)==null?void 0:t.click()},title:"Upload files",variant:"tertiary",children:e.jsx(M.Icon,{name:"Paperclip"})})]}),h&&e.jsx(I.Button,{"aria-label":g,className:_.submit,"data-cy":"toolbar-submit-button",disabled:u,icon:"PaperPlaneTilt",isLoading:n,onClick:()=>h(),variant:"primary",children:e.jsx("span",{children:g})}),e.jsxs("div",{className:st(_.meta,S||y?_.active:""),children:[S&&e.jsxs(e.Fragment,{children:[e.jsx(pt.Input,{"aria-invalid":!A,onBlur:()=>ut(),onChange:t=>j(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),ut())},ref:U,value:B}),e.jsx(I.Button,{"aria-label":"Apply link",disabled:!A,onClick:()=>{ut()},onMouseDown:et,variant:"tertiary",children:e.jsx(M.Icon,{name:"Check"})}),e.jsx(I.Button,{"aria-label":"Remove link",onClick:()=>kt(),onMouseDown:et,variant:"tertiary",children:e.jsx(M.Icon,{name:"Trash",variant:"danger"})})]}),y&&e.jsxs(e.Fragment,{children:[!G&&e.jsxs(e.Fragment,{children:[e.jsx(pt.Input,{className:st(_.active),onBlur:s,onChange:t=>J(t.target.value),onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),z.current=!0,dt())},ref:T,value:Y}),e.jsx(I.Button,{"aria-label":"Apply image",onClick:()=>dt(),onMouseDown:F,variant:"tertiary",children:e.jsx(M.Icon,{name:"Check"})})]}),e.jsx("div",{className:_["image-sizes"],children:ae.map(({label:t,width:m})=>e.jsx(I.Button,{"aria-label":`${t} image`,"data-active":ct===m,onClick:()=>It(m),onMouseDown:et,variant:"tertiary",children:t},t))}),e.jsx(I.Button,{"aria-label":"Remove image",onClick:()=>Dt(),onMouseDown:F,variant:"tertiary",children:e.jsx(M.Icon,{name:"Trash",variant:"danger"})})]})]})]})},ue=l.defineExtension({name:"solibo-editor",namespace:"Editor",nodes:[w.AutoLinkNode,w.LinkNode,$.ListNode,$.ListItemNode,nt],onError(u){throw u},theme:{link:_.link,list:{ol:_.list,ul:_.list},paragraph:_.paragraph,text:{bold:_.bold,italic:_.italic,underline:_.underline}}});function de({autofocus:u,content:n="",lastEmittedContentRef:i}){const[a]=ft.useLexicalComposerContext();return r.useEffect(()=>{i.current!==n&&a.update(()=>{const g=new DOMParser().parseFromString(n,"text/html"),o=vt.$generateNodesFromDOM(a,g),f=l.$getRoot();f.clear().select(),l.$insertNodes(o),u?f.selectEnd():l.$setSelection(null)})},[u,n,a,i]),null}const me=({autofocus:u=!1,autolink:n=!1,content:i,disabled:a=!1,errorMessage:h,fill:g=!1,files:o,inline:f=!1,inlineImages:x,invalid:y=!1,isSubmitting:rt=!1,maxRows:ot=12,minRows:H=1,onChange:lt,onFilesChange:k,onInlineImagesChange:S,onSubmit:b,onUpload:O,placeholder:q,required:Y=!1,submitLabel:J})=>{const p=r.useId(),Q=r.useRef(void 0),[G,R]=r.useState(!1),[ct,tt]=r.useState([]),[B,j]=r.useState([]),A=r.useRef(new Map),v=o??ct,T=x??B,U=s=>{o===void 0&&tt(s),k==null||k(s)},L=r.useCallback(s=>{x===void 0&&j(s),S==null||S(s)},[x,S]),z=r.useCallback(s=>{const c=s.map(d=>{const C=`pasted-${crypto.randomUUID()}`,it=URL.createObjectURL(d);return A.current.set(C,it),{image:{alt:d.name,soliboDocumentSlot:C,src:it},pending:{file:d,slot:C}}});return L([...T,...c.map(({pending:d})=>d)]),c.map(({image:d})=>d)},[T,L]),et=r.useCallback(s=>{L(T.filter(d=>d.slot!==s));const c=A.current.get(s);c&&URL.revokeObjectURL(c),A.current.delete(s)},[T,L]);r.useEffect(()=>()=>{A.current.forEach(s=>URL.revokeObjectURL(s)),A.current.clear()},[]),r.useEffect(()=>{const s=new Set(T.map(c=>c.slot));A.current.forEach((c,d)=>{s.has(d)||(URL.revokeObjectURL(c),A.current.delete(d))})},[T]);const Z=s=>{if(typeof DataTransfer<"u"){const c=new DataTransfer;return s.forEach(d=>c.items.add(d)),c.files}return Object.assign([...s],{item:c=>s[c]??null})},V=async()=>{try{v.length>0&&await(O==null?void 0:O(Z(v))),await(b==null?void 0:b()),v.length>0&&U([])}catch{return}},F=s=>{s.preventDefault(),s.stopPropagation()};return e.jsxs("div",{className:st(_.field,g&&_.fill),"data-max-rows":ot,"data-min-rows":H,onDragEnter:s=>{F(s),R(!!k)},onDragOver:s=>{F(s),R(!!k)},onDragLeave:s=>{F(s),R(!1)},onDropCapture:s=>{var d;const c=(d=s.dataTransfer)==null?void 0:d.files;c!=null&&c.length&&(F(s),(k||O)&&U([...v,...Array.from(c)]),R(!1))},onDrop:s=>{s.preventDefault(),R(!1)},"data-component":"editor",children:[e.jsx("div",{className:st(_.editor,g&&_["fill-editor"],y&&_.invalid,v.length>0&&_["has-files"]),style:{"--editor-max-height":`calc(${ot*1.25}em + (2 * var(--scale-8)))`,"--editor-min-height":`calc(${H*1.25}em + (2 * var(--scale-8)))`},children:e.jsxs(Mt.LexicalExtensionComposer,{contentEditable:null,extension:ue,children:[!f&&e.jsx(ce,{disabled:a,isSubmitting:rt,onInlineImageRemove:et,onFilesSelected:O||k?s=>{U([...v,...Array.from(s)])}:void 0,onSubmit:b?()=>void V():void 0,submitLabel:J}),e.jsx("div",{className:st(_.content,G&&_.dragging),children:e.jsx(Rt.RichTextPlugin,{contentEditable:e.jsx(At.ContentEditable,{"aria-placeholder":q??"",ariaErrorMessage:y&&h?p:void 0,ariaInvalid:y||void 0,ariaRequired:Y||void 0,placeholder:()=>q?e.jsx("div",{className:_.placeholder,children:q}):null}),ErrorBoundary:Et.LexicalErrorBoundary})}),v.length>0&&e.jsx("div",{"aria-label":"Files to upload",className:_.files,role:"region",children:v.map((s,c)=>e.jsx(Pt.File,{deleteAccessibleLabel:`Remove ${s.name} from upload queue`,name:s.name,onDelete:()=>U(v.filter((d,C)=>C!==c))},`${s.name}-${s.size}-${s.lastModified}-${c}`))}),u&&e.jsx(St.AutoFocusPlugin,{}),n&&e.jsx(jt.AutoLinkPlugin,{matchers:Kt}),e.jsx(wt.HistoryPlugin,{}),S&&e.jsx(Bt,{createImages:z}),i!==void 0&&e.jsx(de,{autofocus:u,content:i,lastEmittedContentRef:Q}),e.jsx($t.LinkPlugin,{validateUrl:gt}),e.jsx(Tt.ListPlugin,{}),lt&&e.jsx(Ot.OnChangePlugin,{onChange:(s,c)=>{s.read(()=>{const d=vt.$generateHtmlFromNodes(c,null),C=_t(d,{allowedAttributes:{..._t.defaults.allowedAttributes,img:[..._t.defaults.allowedAttributes.img??[],"data-solibo-document-id","data-solibo-document-slot"]},allowedTags:["a","b","br","i","img","li","ol","p","u","ul"]});Q.current=C,lt(C)})}})]})}),y&&h&&e.jsx("div",{className:_.error,id:p,children:h})]})};exports.Editor=me;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -24,7 +24,7 @@ import { File as ge } from "../file/index.js";
|
|
|
24
24
|
import { mergeRegister as pe } from "@lexical/utils";
|
|
25
25
|
import { Button as L } from "../button/index.js";
|
|
26
26
|
import { Icon as M } from "../icon/index.js";
|
|
27
|
-
import { I as Tt } from "../../index-
|
|
27
|
+
import { I as Tt } from "../../index-Dd20d_9U.js";
|
|
28
28
|
import { Toolbar as be } from "../toolbar/index.js";
|
|
29
29
|
const $t = se();
|
|
30
30
|
class lt extends ne {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index49.css');const c=require("react/jsx-runtime"),r=require("classix"),l=require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index49.css');const c=require("react/jsx-runtime"),r=require("classix"),l=require("../../icons-BIdcCH-v.cjs"),_="_icon_23h6o_1",m="_large_23h6o_10",g="_medium_23h6o_15",d="_small_23h6o_20",u="_tiny_23h6o_25",h="_danger_23h6o_30",n={icon:_,large:m,medium:g,small:d,tiny:u,danger:h,"gap-right":"_gap-right_23h6o_34","gap-left":"_gap-left_23h6o_38"},y={large:n.large,medium:n.medium,small:n.small,tiny:n.tiny},p={danger:n.danger},S=({gap:e="none",name:t,size:s="medium",variant:o,weight:i})=>{const a={maskImage:l.iconSVG(t,void 0,i)};return c.jsx("span",{"aria-hidden":"true",className:r(e!=="none"&&n[`gap-${e}`],y[s],n.icon,o&&p[o]),style:a,"data-component":"icon"})};exports.Icon=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import _ from "classix";
|
|
3
|
-
import { i as r } from "../../icons-
|
|
3
|
+
import { i as r } from "../../icons-DVeBguFb.js";
|
|
4
4
|
import '../../assets/index49.css';const c = "_icon_23h6o_1", l = "_large_23h6o_10", g = "_medium_23h6o_15", d = "_small_23h6o_20", h = "_tiny_23h6o_25", p = "_danger_23h6o_30", o = {
|
|
5
5
|
icon: c,
|
|
6
6
|
large: l,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("react");require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("react");require("../../icons-BIdcCH-v.cjs");require("../../use-touched-Bq5Gjbpz.cjs");const e=require("../../index-7blZaPiA.cjs");exports.Input=e.Input;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "classix";
|
|
3
3
|
import "react";
|
|
4
|
-
import "../../icons-
|
|
4
|
+
import "../../icons-DVeBguFb.js";
|
|
5
5
|
import "../../use-touched-B999bBr8.js";
|
|
6
|
-
import { I as a } from "../../index-
|
|
6
|
+
import { I as a } from "../../index-Dd20d_9U.js";
|
|
7
7
|
export {
|
|
8
8
|
a as Input
|
|
9
9
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index52.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index52.css');const u=require("react/jsx-runtime"),H=require("classix"),r=require("react");function T(e){return r.isValidElement(e)&&e.type===r.Fragment}function O(e,n=[]){return r.Children.forEach(e,i=>{T(i)?O(i.props.children,n):n.push(i)}),n}function F(e,{wrapper:n="li"}={}){return O(e).filter(s=>s!==null).map((s,c)=>{if(r.isValidElement(s)&&s.type===n)return s;const m=r.isValidElement(s)&&s.key!=null?s.key:c;return r.createElement(n,{key:m,"data-component":"wrapchildren"},s)})}const V="_controls_uue68_1",A="_horizontal_uue68_9",I="_list_uue68_20",D="_columns_uue68_61",P="_masonry_uue68_71",$="_scrollable_uue68_81",G="_overflowing_uue68_88",J="_sized_uue68_111",K="_compact_uue68_123",l={controls:V,horizontal:A,list:I,columns:D,masonry:P,scrollable:$,overflowing:G,sized:J,compact:K},M=(e,n)=>{typeof e=="function"?e(n):e&&(e.current=n)};function Q({children:e,className:n,columns:i=1,columnWidth:b,compact:s=!1,controls:c,horizontal:m,layout:h="grid",maxVisibleItems:f,ordered:B,ref:p,style:S,...d}){const v=Number.isFinite(i)?Math.max(1,Math.floor(i)):1,y=r.useRef(null),[a,k]=r.useState(),o=h==="grid"&&v===1&&!m&&f!=null&&Number.isFinite(f)&&f>=1?Math.floor(f):void 0,w=!!o&&a!=null;r.useLayoutEffect(()=>{const t=y.current;if(!t||!o)return;const R=()=>{const g=Array.from(t.children).filter(j=>j instanceof HTMLElement&&getComputedStyle(j).display!=="none"),N=g[o-1],q=g.length>o&&N?N.getBoundingClientRect().bottom-t.getBoundingClientRect().top+t.scrollTop+(parseFloat(getComputedStyle(t).paddingBottom)||0):void 0;k(q)},_=new ResizeObserver(R),C=()=>{_.disconnect(),_.observe(t),Array.from(t.children).forEach(g=>_.observe(g)),R()},L=new MutationObserver(C);return L.observe(t,{childList:!0,subtree:!0,characterData:!0}),C(),()=>{_.disconnect(),L.disconnect()}},[e,o,w]);const x=H(n,l.list,h==="masonry"?l.masonry:v>1&&l.columns,!!o&&l.scrollable,w&&l.overflowing,m&&l.horizontal,s&&l.compact,b&&l.sized),z={...S,"--list-columns":v,"--list-column-width":b,"--list-max-height":o&&a!=null?`${a}px`:void 0},E=B?u.jsx("ol",{className:x,ref:t=>{y.current=t,M(p,t)},style:z,...d,tabIndex:d.tabIndex??(o&&a!=null?0:void 0),"data-component":"list",children:F(e)}):u.jsx("ul",{className:x,ref:t=>{y.current=t,M(p,t)},style:z,...d,tabIndex:d.tabIndex??(o&&a!=null?0:void 0),"data-component":"list",children:F(e)});return c==null?E:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:l.controls,"data-component":"list",children:c}),E]})}exports.List=Q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -15,14 +15,14 @@ function B(t, {
|
|
|
15
15
|
return O(t).filter((o) => o !== null).map((o, c) => {
|
|
16
16
|
if (i.isValidElement(o) && o.type === n)
|
|
17
17
|
return o;
|
|
18
|
-
const
|
|
18
|
+
const u = i.isValidElement(o) && o.key != null ? o.key : c;
|
|
19
19
|
return i.createElement(n, {
|
|
20
|
-
key:
|
|
20
|
+
key: u,
|
|
21
21
|
"data-component": "wrapchildren"
|
|
22
22
|
}, o);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
const G = "
|
|
25
|
+
const G = "_controls_uue68_1", J = "_horizontal_uue68_9", K = "_list_uue68_20", P = "_columns_uue68_61", Q = "_masonry_uue68_71", U = "_scrollable_uue68_81", X = "_overflowing_uue68_88", Y = "_sized_uue68_111", Z = "_compact_uue68_123", l = {
|
|
26
26
|
controls: G,
|
|
27
27
|
horizontal: J,
|
|
28
28
|
list: K,
|
|
@@ -39,26 +39,26 @@ function nt({
|
|
|
39
39
|
children: t,
|
|
40
40
|
className: n,
|
|
41
41
|
columns: r = 1,
|
|
42
|
-
columnWidth:
|
|
42
|
+
columnWidth: g,
|
|
43
43
|
compact: o = !1,
|
|
44
44
|
controls: c,
|
|
45
|
-
horizontal:
|
|
45
|
+
horizontal: u,
|
|
46
46
|
layout: h = "grid",
|
|
47
|
-
maxVisibleItems:
|
|
47
|
+
maxVisibleItems: m,
|
|
48
48
|
ordered: k,
|
|
49
49
|
ref: y,
|
|
50
50
|
style: H,
|
|
51
51
|
...f
|
|
52
52
|
}) {
|
|
53
|
-
const p = Number.isFinite(r) ? Math.max(1, Math.floor(r)) : 1, v = T(null), [a, S] = D(), s = h === "grid" && p === 1 && !
|
|
53
|
+
const p = Number.isFinite(r) ? Math.max(1, Math.floor(r)) : 1, v = T(null), [a, S] = D(), s = h === "grid" && p === 1 && !u && m != null && Number.isFinite(m) && m >= 1 ? Math.floor(m) : void 0, w = !!s && a != null;
|
|
54
54
|
$(() => {
|
|
55
55
|
const e = v.current;
|
|
56
56
|
if (!e || !s) return;
|
|
57
57
|
const C = () => {
|
|
58
|
-
const
|
|
58
|
+
const _ = Array.from(e.children).filter((L) => L instanceof HTMLElement && getComputedStyle(L).display !== "none"), F = _[s - 1], V = _.length > s && F ? F.getBoundingClientRect().bottom - e.getBoundingClientRect().top + e.scrollTop + (parseFloat(getComputedStyle(e).paddingBottom) || 0) : void 0;
|
|
59
59
|
S(V);
|
|
60
60
|
}, d = new ResizeObserver(C), N = () => {
|
|
61
|
-
d.disconnect(), d.observe(e), Array.from(e.children).forEach((
|
|
61
|
+
d.disconnect(), d.observe(e), Array.from(e.children).forEach((_) => d.observe(_)), C();
|
|
62
62
|
}, R = new MutationObserver(N);
|
|
63
63
|
return R.observe(e, {
|
|
64
64
|
childList: !0,
|
|
@@ -68,10 +68,10 @@ function nt({
|
|
|
68
68
|
d.disconnect(), R.disconnect();
|
|
69
69
|
};
|
|
70
70
|
}, [t, s, w]);
|
|
71
|
-
const z = I(n, l.list, h === "masonry" ? l.masonry : p > 1 && l.columns, !!s && l.scrollable, w && l.overflowing,
|
|
71
|
+
const z = I(n, l.list, h === "masonry" ? l.masonry : p > 1 && l.columns, !!s && l.scrollable, w && l.overflowing, u && l.horizontal, o && l.compact, g && l.sized), E = {
|
|
72
72
|
...H,
|
|
73
73
|
"--list-columns": p,
|
|
74
|
-
"--list-column-width":
|
|
74
|
+
"--list-column-width": g,
|
|
75
75
|
"--list-max-height": s && a != null ? `${a}px` : void 0
|
|
76
76
|
}, x = k ? /* @__PURE__ */ b("ol", { className: z, ref: (e) => {
|
|
77
77
|
v.current = e, M(y, e);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const i=require("react/jsx-runtime"),r=require("classix"),b=require("react"),m=require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const i=require("react/jsx-runtime"),r=require("classix"),b=require("react"),m=require("../../icons-BIdcCH-v.cjs"),v="_nav_1jlcq_3",p="_label_1jlcq_9",j="_item_1jlcq_17",q="_actions_1jlcq_36",g="_highlighted_1jlcq_60",f="_horizontal_1jlcq_64",N="_sidebar_1jlcq_74",w="_stacked_1jlcq_124",x="_tabs_1jlcq_141",k="_pills_1jlcq_161",t={nav:v,label:p,item:j,actions:q,highlighted:g,horizontal:f,sidebar:N,stacked:w,tabs:x,pills:k},y={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},z=({className:a,...e})=>i.jsx("span",{className:r(a,t.label),...e,"data-component":"navlabel"}),S=({actions:a,children:e,className:c,highlighted:n=!1,layout:s="row",...o})=>i.jsxs("div",{className:r(t.item,n&&t.highlighted,s==="stack"&&t.stacked,c),"data-nav-item":!0,...o,"data-component":"navitem",children:[e,a&&i.jsx("span",{className:t.actions,children:a})]}),C=({animation:a,children:e,className:c,horizontal:n=!1,variant:s="default",...o})=>{const[_,d]=b.useState(!1),h={"--icon-svg":m.iconSVG("CaretDown")};return i.jsx("nav",{className:r(c,n&&t.horizontal,t.nav,y[s]),"data-animation":a,"data-open":_?"true":"false","data-orientation":n?"horizontal":"vertical",onBlurCapture:l=>{if(s!=="pills"||window.innerWidth>960)return;const u=l.relatedTarget;l.currentTarget.contains(u)||d(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||d(l=>!l)},style:h,...o,"data-component":"nav",children:e})};exports.Nav=C;exports.NavItem=S;exports.NavLabel=z;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import r from "classix";
|
|
3
3
|
import { useState as b } from "react";
|
|
4
|
-
import { i as f } from "../../icons-
|
|
4
|
+
import { i as f } from "../../icons-DVeBguFb.js";
|
|
5
5
|
import '../../assets/index14.css';const v = "_nav_1jlcq_3", j = "_label_1jlcq_9", u = "_item_1jlcq_17", g = "_actions_1jlcq_36", q = "_highlighted_1jlcq_60", w = "_horizontal_1jlcq_64", N = "_sidebar_1jlcq_74", k = "_stacked_1jlcq_124", x = "_tabs_1jlcq_141", z = "_pills_1jlcq_161", t = {
|
|
6
6
|
nav: v,
|
|
7
7
|
label: j,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),m=require("react"),b=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),m=require("react"),b=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-7blZaPiA.cjs"),J="_search_wsuwb_3",K="_controls_wsuwb_15",Q="_chips_wsuwb_35",S="_radio_wsuwb_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_wsuwb_42","filter-groups":"_filter-groups_wsuwb_47","filter-group":"_filter-group_wsuwb_47","filter-option":"_filter-option_wsuwb_83","option-copy":"_option-copy_wsuwb_89",radio:S,"collapsible-options":"_collapsible-options_wsuwb_124"},U=({filterButtonLabel:x="Filters",filterDialogColumns:f=1,filterDialogTitle:k="Filters",filterGroups:d=[],onChange:q,onSelectedFiltersChange:i,removeFilterLabel:M=c=>`Remove ${c.label} filter`,resetLabel:u="Reset",searchLabel:$="Search",searchPlaceholder:O="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=m.useId(),[j,r]=m.useState(!1),R=m.useMemo(()=>new Map(d.flatMap(s=>{var n;return[...s.options,...((n=s.collapsible)==null?void 0:n.options)??[]]}).map(s=>[s.value,s])),[d]),h=t.flatMap(s=>{const n=R.get(s);return n?[n]:[]}),p=(s,n,e)=>{var N;if(!i)return;const _=new Set([...(e==null?void 0:e.options.map(o=>o.value))??[],...((N=e==null?void 0:e.collapsible)==null?void 0:N.options.map(o=>o.value))??[]]),y=t.filter(o=>!_.has(o));if(n&&(e==null?void 0:e.defaultValue)===s){i(y);return}i(n?(e==null?void 0:e.control)==="radio"||(e==null?void 0:e.selectionMode)==="single"?[...y,s]:[...new Set([...t,s])]:t.filter(o=>o!==s))},v=(s,n)=>{var e;return t.includes(s)||n.defaultValue===s&&![...n.options,...((e=n.collapsible)==null?void 0:e.options)??[]].some(_=>t.includes(_.value))},w=(s,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:v(s.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:e=>p(s.value,e.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]})]}):a.jsx(I.Checkbox,{checked:v(s.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]}),onChange:e=>p(s.value,e.target.checked,n)})},s.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":$,icon:"MagnifyingGlass",onChange:s=>q(s.target.value),placeholder:O,type:"search",value:D}),d.length>0&&a.jsx(b.Button,{"aria-expanded":j,"aria-haspopup":"dialog",badge:h.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),h.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[h.map(s=>a.jsx(T.Chip,{accessibleLabel:M(s),label:s.label,onDelete:()=>p(s.value,!1)},s.value)),a.jsx(b.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:u})]}),j&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(b.Button,{onClick:()=>{i==null||i([]),r(!1)},children:u}),a.jsx(b.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:k})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":f,children:d.map((s,n)=>a.jsxs("section",{"aria-labelledby":s.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":s.columnSpan??1,role:s.control==="radio"?"radiogroup":"group",children:[s.label&&a.jsx("h3",{id:`${c}-${n}`,children:s.label}),s.options.map(e=>w(e,s)),s.collapsible&&a.jsx(H.Collapsible,{summary:s.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:s.collapsible.options.map(e=>w(e,s))})})]},s.label??n))})})]})};exports.Search=U;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -7,7 +7,7 @@ import { Collapsible as E } from "../collapsible/index.js";
|
|
|
7
7
|
import { Controls as J } from "../controls/index.js";
|
|
8
8
|
import { Dialog as K } from "../dialog/index.js";
|
|
9
9
|
import { Header as P } from "../header/index.js";
|
|
10
|
-
import { I as Q } from "../../index-
|
|
10
|
+
import { I as Q } from "../../index-Dd20d_9U.js";
|
|
11
11
|
import '../../assets/index9.css';const U = "_search_wsuwb_3", V = "_controls_wsuwb_15", W = "_chips_wsuwb_35", X = "_radio_wsuwb_101", o = {
|
|
12
12
|
search: U,
|
|
13
13
|
controls: V,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("../../icons-BIdcCH-v.cjs");const e=require("../../index-VLDsM9it.cjs");require("../../use-touched-Bq5Gjbpz.cjs");exports.Select=e.Select;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "classix";
|
|
3
|
-
import "../../icons-
|
|
4
|
-
import { S as e } from "../../index-
|
|
3
|
+
import "../../icons-DVeBguFb.js";
|
|
4
|
+
import { S as e } from "../../index-Dx-KtGBg.js";
|
|
5
5
|
import "../../use-touched-B999bBr8.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Select
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const a=require("react/jsx-runtime"),l=require("classix"),s="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const a=require("react/jsx-runtime"),l=require("classix"),s="_toolbar_11xk1_1",n="_editor_11xk1_34",o={toolbar:s,default:"_default_11xk1_28",editor:n},c=({children:t,variant:e="default"})=>a.jsx("div",{className:l(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import e from "classix";
|
|
3
|
-
import '../../assets/index56.css';const s = "
|
|
3
|
+
import '../../assets/index56.css';const s = "_toolbar_11xk1_1", n = "_editor_11xk1_34", o = {
|
|
4
4
|
toolbar: s,
|
|
5
|
-
default: "
|
|
5
|
+
default: "_default_11xk1_28",
|
|
6
6
|
editor: n
|
|
7
|
-
},
|
|
7
|
+
}, d = ({
|
|
8
8
|
children: t,
|
|
9
9
|
variant: r = "default"
|
|
10
10
|
}) => /* @__PURE__ */ l("div", { className: e(o.toolbar, o[r]), onClick: (a) => a.stopPropagation(), "data-component": "toolbar", children: t });
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
d as Toolbar
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const h={ArrowBendUpLeft:{regular:'<path d="M232,200a8,8,0,0,1-16,0,88.1,88.1,0,0,0-88-88H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,85.66,61.66L51.31,96H128A104.11,104.11,0,0,1,232,200Z"/>'},ArrowDown:{regular:'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"/>'},ArrowRight:{regular:'<path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"/>'},ArrowsClockwise:{regular:'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'},ArrowsDownUp:{regular:'<path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'},ArrowSquareOut:{regular:'<path d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"/>'},ArrowUp:{regular:'<path d="M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"/>'},Bell:{regular:'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>',fill:'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"/>'},BuildingApartment:{fill:'<path d="M240,208h-8V72a8,8,0,0,0-8-8H184V40a8,8,0,0,0-8-8H80a8,8,0,0,0-8,8V96H32a8,8,0,0,0-8,8V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM80,176H64a8,8,0,0,1,0-16H80a8,8,0,0,1,0,16Zm0-32H64a8,8,0,0,1,0-16H80a8,8,0,0,1,0,16Zm64,64H112V168h32Zm-8-64H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm56,96H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Z"/>',regular:'<path d="M240,208h-8V72a8,8,0,0,0-8-8H184V40a8,8,0,0,0-8-8H80a8,8,0,0,0-8,8V96H32a8,8,0,0,0-8,8V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,112H80a8,8,0,0,0,8-8V48h80V72a8,8,0,0,0,8,8h40V208H152V168a8,8,0,0,0-8-8H112a8,8,0,0,0-8,8v40H40Zm96,96H120V176h16ZM112,72a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,72Zm0,32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,104Zm56,0a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,104ZM88,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H80A8,8,0,0,1,88,136Zm0,32a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H80A8,8,0,0,1,88,168Zm24-32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,136Zm56,0a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,168Z"/>'},CaretDown:{regular:'<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"/>'},CaretLeft:{regular:'<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"/>'},CaretRight:{regular:'<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>'},CaretUp:{regular:'<path d="M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"/>'},CaretUpDown:{regular:'<path d="M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"/>'},ChatsCircle:{fill:'<path d="M232.07,186.76a80,80,0,0,0-62.5-114.17A80,80,0,1,0,23.93,138.76l-7.27,24.71a16,16,0,0,0,19.87,19.87l24.71-7.27a80.39,80.39,0,0,0,25.18,7.35,80,80,0,0,0,108.34,40.65l24.71,7.27a16,16,0,0,0,19.87-19.86Zm-16.25,1.47L224,216l-27.76-8.17a8,8,0,0,0-6,.63,64.05,64.05,0,0,1-85.87-24.88A79.93,79.93,0,0,0,174.7,89.71a64,64,0,0,1,41.75,92.48A8,8,0,0,0,215.82,188.23Z"/>'},Check:{regular:'<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"/>'},CheckCircle:{fill:'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/>'},ClipboardText:{fill:'<path d="M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"/>',regular:'<path d="M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"/>'},Clock:{fill:'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"/>'},Confetti:{fill:'<path d="M111.49,52.63a15.8,15.8,0,0,0-26,5.77L33,202.78A15.83,15.83,0,0,0,47.76,224a16,16,0,0,0,5.46-1l144.37-52.5a15.8,15.8,0,0,0,5.78-26ZM65.14,161.13l19.2-52.79,63.32,63.32-52.8,19.2ZM160,72a37.8,37.8,0,0,1,3.84-15.58C169.14,45.83,179.14,40,192,40c6.7,0,11-2.29,13.65-7.21A22,22,0,0,0,208,23.94,8,8,0,0,1,224,24c0,12.86-8.52,32-32,32-6.7,0-11,2.29-13.65,7.21A22,22,0,0,0,176,72.06,8,8,0,0,1,160,72ZM136,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm101.66,82.34a8,8,0,1,1-11.32,11.31l-16-16a8,8,0,0,1,11.32-11.32Zm4.87-42.75-24,8a8,8,0,0,1-5.06-15.18l24-8a8,8,0,0,1,5.06,15.18Z"/>'},Copy:{fill:'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"/>',regular:'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'},DotsThreeVertical:{regular:'<path d="M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"/>'},DownloadSimple:{regular:'<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"/>'},Envelope:{fill:'<path d="M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM98.71,128,40,181.81V74.19Zm11.84,10.85,12,11.05a8,8,0,0,0,10.82,0l12-11.05,58,53.15H52.57ZM157.29,128,216,74.18V181.82Z"/>'},FileDoc:{fill:'<path d="M44,120H212.07a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152.05,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120Zm108-76,44,44h-44ZM52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H51.33C71,216,87.55,200.52,88,180.87A36,36,0,0,0,52,144Zm-.49,56H44V160h8a20,20,0,0,1,20,20.77C71.59,191.59,62.35,200,51.52,200Zm170.67-4.28a8.26,8.26,0,0,1-.73,11.09,30,30,0,0,1-21.4,9.19c-17.65,0-32-16.15-32-36s14.36-36,32-36a30,30,0,0,1,21.4,9.19,8.26,8.26,0,0,1,.73,11.09,8,8,0,0,1-11.9.38A14.21,14.21,0,0,0,200.06,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.25,14.25,0,0,0,10.23-4.66A8,8,0,0,1,222.19,195.72ZM128,144c-17.65,0-32,16.15-32,36s14.37,36,32,36,32-16.15,32-36S145.69,144,128,144Zm0,56c-8.83,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.86,200,128,200Z"/>'},FilePdf:{fill:'<path d="M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z"/>'},FilePlus:{fill:'<path d="M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,160H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Zm0-72V43.31L196.69,88Z"/>'},FilePpt:{fill:'<path d="M224,152.53a8.17,8.17,0,0,1-8.25,7.47H204v47.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V160H176.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h40A8,8,0,0,1,224,152.53ZM92,172.85C91.54,188.08,78.64,200,63.4,200H56v7.73A8.17,8.17,0,0,1,48.53,216,8,8,0,0,1,40,208V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172.85Zm-16-2A12.25,12.25,0,0,0,63.65,160H56v24h8A12,12,0,0,0,76,170.84Zm84,2C159.54,188.08,146.64,200,131.4,200H124v7.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172.85Zm-16-2A12.25,12.25,0,0,0,131.65,160H124v24h8A12,12,0,0,0,144,170.84ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"/>'},FileText:{fill:'<path d="M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"/>'},FileXls:{fill:'<path d="M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm4,164.53a8.18,8.18,0,0,1-8.25,7.47H120a8,8,0,0,1-8-8V152.27a8.18,8.18,0,0,1,7.47-8.25,8,8,0,0,1,8.53,8v48h20A8,8,0,0,1,156,208.53ZM94.51,156.65,77.83,180l16.68,23.35a8,8,0,0,1-13,9.3L68,193.76,54.51,212.65a8,8,0,1,1-13-9.3L58.17,180,41.49,156.65a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L68,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm121.28,39.66a20.81,20.81,0,0,1-9.18,15.23C201.42,215,194.94,216,189.12,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,14.94,2.71,19.54-.35.89-.6,1.84-1.52,2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,8.95-14.94c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C201.48,174.17,218,179,215.79,196.31Z"/>'},Flag:{fill:'<path d="M232,56V176a8,8,0,0,1-2.76,6c-15.28,13.23-29.89,18-43.82,18-18.91,0-36.57-8.74-53-16.85C105.87,170,82.79,158.61,56,179.77V224a8,8,0,0,1-16,0V56a8,8,0,0,1,2.77-6h0c36-31.18,68.31-15.21,96.79-1.12C167,62.46,190.79,74.2,218.76,50A8,8,0,0,1,232,56Z"/>'},FloppyDisk:{regular:'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'},Folder:{fill:'<path d="M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z"/>'},FolderOpen:{fill:'<path d="M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z"/>'},Funnel:{fill:'<path d="M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z"/>'},Gear:{fill:'<path d="M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"/>',regular:'<path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'},HandCoins:{fill:'<path d="M128.09,57.38a36,36,0,0,1,55.17-27.82,4,4,0,0,1-.56,7A52.06,52.06,0,0,0,152,84c0,1.17,0,2.34.12,3.49a4,4,0,0,1-6,3.76A36,36,0,0,1,128.09,57.38ZM240,160.61a24.47,24.47,0,0,1-13.6,22l-.44.2-38.83,16.54a6.94,6.94,0,0,1-1.19.4l-64,16A7.93,7.93,0,0,1,120,216H16A16,16,0,0,1,0,200V160a16,16,0,0,1,16-16H44.69l22.62-22.63A31.82,31.82,0,0,1,89.94,112H140a28,28,0,0,1,27.25,34.45l41.84-9.62A24.61,24.61,0,0,1,240,160.61Zm-16,0a8.61,8.61,0,0,0-10.87-8.3l-.31.08-67,15.41a8.32,8.32,0,0,1-1.79.2H112a8,8,0,0,1,0-16h28a12,12,0,0,0,0-24H89.94a15.86,15.86,0,0,0-11.31,4.69L56,155.31V200h63l62.43-15.61,38-16.18A8.56,8.56,0,0,0,224,160.61ZM168,84a36,36,0,1,0,36-36A36,36,0,0,0,168,84Z"/>'},House:{fill:'<path d="M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"/>',regular:'<path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'},Image:{fill:'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"/>'},Info:{fill:'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"/>'},Link:{regular:'<path d="M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"/>'},LinkBreak:{regular:'<path d="M198.63,57.37a32,32,0,0,0-45.19-.06L141.79,69.52a8,8,0,0,1-11.58-11l11.72-12.29a1.59,1.59,0,0,1,.13-.13,48,48,0,0,1,67.88,67.88,1.59,1.59,0,0,1-.13.13l-12.29,11.72a8,8,0,0,1-11-11.58l12.21-11.65A32,32,0,0,0,198.63,57.37ZM114.21,186.48l-11.65,12.21a32,32,0,0,1-45.25-45.25l12.21-11.65a8,8,0,0,0-11-11.58L46.19,141.93a1.59,1.59,0,0,0-.13.13,48,48,0,0,0,67.88,67.88,1.59,1.59,0,0,0,.13-.13l11.72-12.29a8,8,0,1,0-11.58-11ZM216,152H192a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16ZM40,104H64a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm120,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V192A8,8,0,0,0,160,184ZM96,72a8,8,0,0,0,8-8V40a8,8,0,0,0-16,0V64A8,8,0,0,0,96,72Z"/>'},List:{regular:'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'},ListBullets:{regular:'<path d="M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z"/>'},LockKey:{fill:'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-72,78.63V184a8,8,0,0,1-16,0V158.63a24,24,0,1,1,16,0ZM160,80H96V56a32,32,0,0,1,64,0Z"/>'},MagnifyingGlass:{regular:'<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'},MapPin:{fill:'<path d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"/>'},Megaphone:{fill:'<path d="M200,72H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48,48,0,0,0,200,72ZM179,207.89l0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z"/>',regular:'<path d="M248,120a48.05,48.05,0,0,0-48-48H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48.07,48.07,0,0,0,248,120ZM48,199.93V40h0c42.81,35.91,86.63,45,104,47.24v65.48C134.65,155,90.84,164.07,48,199.93Zm131,8,0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z"/>'},NotePencil:{fill:'<path d="M224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Zm5.66-58.34-96,96A8,8,0,0,1,128,168H96a8,8,0,0,1-8-8V128a8,8,0,0,1,2.34-5.66l96-96a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,229.66,69.66Zm-17-5.66L192,43.31,179.31,56,200,76.69Z"/>'},Paperclip:{regular:'<path d="M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"/>'},PaperPlaneTilt:{fill:'<path d="M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"/>'},Pencil:{fill:'<path d="M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM51.31,160l90.35-90.35,16.68,16.69L68,176.68ZM48,179.31,76.69,208H48Zm48,25.38L79.31,188l90.35-90.35h0l16.68,16.69Z"/>'},PenNib:{fill:'<path d="M243.31,81.36,174.63,12.68a16,16,0,0,0-22.63,0L123.56,41.12l-58,21.76A16,16,0,0,0,55.36,75.23L34.59,199.83a4,4,0,0,0,6.77,3.49l57-57a23.85,23.85,0,0,1-2.29-12.08,24,24,0,1,1,13.6,23.4l-57,57a4,4,0,0,0,3.49,6.77l124.61-20.77a16,16,0,0,0,12.35-10.16l21.77-58.07L243.31,104a16,16,0,0,0,0-22.63ZM208,116.68,139.32,48l24-24L232,92.68Z"/>'},Phone:{fill:'<path d="M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z"/>',regular:'<path d="M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"/>'},Plus:{regular:'<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'},PushPin:{fill:'<path d="M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"/>'},PushPinSimpleSlash:{fill:'<path d="M79.25,38.69a4,4,0,0,1,3-6.69H192a8,8,0,0,1,8,8.53A8.17,8.17,0,0,1,191.73,48h-6.19L206.7,167.91a4,4,0,0,1-6.9,3.39ZM213.92,210.62l-160-176A8,8,0,1,0,42.08,45.38L66.24,72,49.29,168H40a8,8,0,0,0,0,16h80v56a8,8,0,0,0,16,0V184h32.1l34,37.38a8,8,0,1,0,11.84-10.76Z"/>'},SidebarSimple:{fill:'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"/>',regular:'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'},Signature:{regular:'<path d="M232,168H63.86c2.66-5.24,5.33-10.63,8-16.11,15,1.65,32.58-8.78,52.66-31.14,5,13.46,14.45,30.93,30.58,31.25,9.06.18,18.11-5.2,27.42-16.37C189.31,143.75,203.3,152,232,152a8,8,0,0,0,0-16c-30.43,0-39.43-10.45-40-16.11a7.67,7.67,0,0,0-5.46-7.75,8.14,8.14,0,0,0-9.25,3.49c-12.07,18.54-19.38,20.43-21.92,20.37-8.26-.16-16.66-19.52-19.54-33.42a8,8,0,0,0-14.09-3.37C101.54,124.55,88,133.08,79.57,135.29,88.06,116.42,94.4,99.85,98.46,85.9c6.82-23.44,7.32-39.83,1.51-50.1-3-5.38-9.34-11.8-22.06-11.8C61.85,24,49.18,39.18,43.14,65.65c-3.59,15.71-4.18,33.21-1.62,48s7.87,25.55,15.59,31.94c-3.73,7.72-7.53,15.26-11.23,22.41H24a8,8,0,0,0,0,16H37.41c-11.32,21-20.12,35.64-20.26,35.88a8,8,0,1,0,13.71,8.24c.15-.26,11.27-18.79,24.7-44.12H232a8,8,0,0,0,0-16ZM58.74,69.21C62.72,51.74,70.43,40,77.91,40c5.33,0,7.1,1.86,8.13,3.67,3,5.33,6.52,24.19-21.66,86.39C56.12,118.78,53.31,93,58.74,69.21Z"/>'},SlidersHorizontal:{fill:'<path d="M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z"/>'},Tag:{fill:'<path d="M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"/>'},TextB:{regular:'<path d="M178.48,115.7A44,44,0,0,0,148,40H80a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8h80a48,48,0,0,0,18.48-92.3ZM88,56h60a28,28,0,0,1,0,56H88Zm72,136H88V128h72a32,32,0,0,1,0,64Z"/>'},TextItalic:{regular:'<path d="M200,56a8,8,0,0,1-8,8H157.77L115.1,192H144a8,8,0,0,1,0,16H64a8,8,0,0,1,0-16H98.23L140.9,64H112a8,8,0,0,1,0-16h80A8,8,0,0,1,200,56Z"/>'},TextUnderline:{regular:'<path d="M200,224a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,224Zm-72-24a64.07,64.07,0,0,0,64-64V56a8,8,0,0,0-16,0v80a48,48,0,0,1-96,0V56a8,8,0,0,0-16,0v80A64.07,64.07,0,0,0,128,200Z"/>'},ThumbsUp:{regular:'<path d="M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"/>',fill:'<path d="M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"/>'},Trash:{fill:'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"/>'},UploadSimple:{regular:'<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"/>'},User:{fill:'<path d="M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"/>',regular:'<path d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"/>'},UserMinus:{fill:'<path d="M198.13,194.85A8,8,0,0,1,192,208H24a8,8,0,0,1-6.12-13.15c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM248,128H200a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z"/>'},UserPlus:{fill:'<path d="M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z"/>'},Users:{fill:'<path d="M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"/>',regular:'<path d="M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"/>'},Warning:{fill:'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"/>'},X:{regular:'<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'}};Object.freeze(Object.keys(h));function r(a){return a.replace(/&/gu,"&").replace(/"/gu,""").replace(/'/gu,"'").replace(/</gu,"<").replace(/>/gu,">")}function A(a,l="currentColor"){const H=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="${r(l)}">${a}</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(H)}")`}function t(a,l,H){const Z=h[a];if(!Z)return A(String(Z),l);const V=Object.values(Z)[0],M=H&&Z[H]||V;return A(M,l)}exports.iconSVG=t;
|
|
2
|
+
//# sourceMappingURL=icons-BIdcCH-v.cjs.map
|
|
@@ -96,6 +96,9 @@ const h = {
|
|
|
96
96
|
Flag: {
|
|
97
97
|
fill: '<path d="M232,56V176a8,8,0,0,1-2.76,6c-15.28,13.23-29.89,18-43.82,18-18.91,0-36.57-8.74-53-16.85C105.87,170,82.79,158.61,56,179.77V224a8,8,0,0,1-16,0V56a8,8,0,0,1,2.77-6h0c36-31.18,68.31-15.21,96.79-1.12C167,62.46,190.79,74.2,218.76,50A8,8,0,0,1,232,56Z"/>'
|
|
98
98
|
},
|
|
99
|
+
FloppyDisk: {
|
|
100
|
+
regular: '<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'
|
|
101
|
+
},
|
|
99
102
|
Folder: {
|
|
100
103
|
fill: '<path d="M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z"/>'
|
|
101
104
|
},
|
|
@@ -240,10 +243,10 @@ function t(a, l, H) {
|
|
|
240
243
|
const Z = h[a];
|
|
241
244
|
if (!Z)
|
|
242
245
|
return A(String(Z), l);
|
|
243
|
-
const
|
|
244
|
-
return A(
|
|
246
|
+
const V = Object.values(Z)[0], M = H && Z[H] || V;
|
|
247
|
+
return A(M, l);
|
|
245
248
|
}
|
|
246
249
|
export {
|
|
247
250
|
t as i
|
|
248
251
|
};
|
|
249
|
-
//# sourceMappingURL=icons-
|
|
252
|
+
//# sourceMappingURL=icons-DVeBguFb.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./assets/index50.css');const e=require("react/jsx-runtime"),m=require("classix"),r=require("react"),U=require("./icons-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
"use strict";require('./assets/index50.css');const e=require("react/jsx-runtime"),m=require("classix"),r=require("react"),U=require("./icons-BIdcCH-v.cjs"),F=require("./use-touched-Bq5Gjbpz.cjs");function W(t){return t&&`${t[0].toLocaleUpperCase()}${t.slice(1)}`}function P(t){const o=W(t);return o&&!o.endsWith(":")?`${o}:`:o}const k="_field_w1cmd_3",A="_input_w1cmd_8",D="_touched_w1cmd_48",J="_label_w1cmd_57",K="_inline_w1cmd_78",O="_error_w1cmd_99",Q="_code_w1cmd_106",n={field:k,input:A,touched:D,label:J,inline:K,error:O,code:Q};function X({className:t,defaultCountryCode:o="+47",disabled:a=!1,errorMessage:j,icon:g,invalid:_=!1,label:f,onBlur:R,placeholder:I,ref:w,required:p,style:B,type:i="text",variant:v="default",...s}){const V=r.useId(),[x,L]=r.useState(""),[l,N]=r.useState(""),{name:q,onChange:u,pattern:y,value:d,...z}=s,{touched:E,onBlur:G}=F.useTouched(d===""),h=g&&i!=="radio"&&i!=="datetime-local"?g:void 0,C=f&&v==="inline"?P(f):f,b=_&&j?V:void 0,S=[s["aria-describedby"],b].filter(Boolean).join(" ")||void 0,T=h?{...B,"--icon-svg":U.iconSVG(h)}:B,$=F.composeEventHandlers(G,R);r.useEffect(()=>{if(u&&i==="tel"){const c={name:q,value:l?(x||o).split(" ").join("")+l.split(" ").join(""):void 0};u({target:c,currentTarget:c})}},[x,o,q,u,l,i]),r.useEffect(()=>{i==="tel"&&!d&&(N(""),L(""))},[i,d]);const H=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:a,hidden:!0,onChange:u,pattern:void 0,placeholder:I,ref:w,type:i,value:d}),e.jsx("input",{type:"text",className:m(n.code,n.input),disabled:a,maxLength:5,onChange:c=>L(c.target.value),placeholder:o,value:x}),e.jsx("input",{...z,"aria-describedby":S,"aria-invalid":_?!0:s["aria-invalid"],type:"tel",className:m(n.input,t,E&&n.touched),"data-icon":h?"true":void 0,disabled:a,maxLength:14,name:void 0,onChange:c=>N(c.target.value),onBlur:$,pattern:y,required:p,style:T,value:l})]});return e.jsxs("div",{className:n.field,"data-component":"input",children:[e.jsxs("label",{className:m(n.label,v==="inline"&&n.inline),children:[C&&e.jsx("span",{"data-required":p&&v!=="inline"?!0:void 0,children:C}),i==="tel"?H:e.jsx("input",{...s,"aria-describedby":S,"aria-invalid":_?!0:s["aria-invalid"],ref:w,className:m(n.input,t,E&&n.touched),"data-icon":h?"true":void 0,disabled:a,onBlur:$,placeholder:I,required:p,style:T,type:i})]}),b&&e.jsx("span",{className:n.error,id:b,role:"alert",children:j})]})}exports.Input=X;exports.formatInlineLabel=P;
|
|
2
|
+
//# sourceMappingURL=index-7blZaPiA.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as k, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import m from "classix";
|
|
3
3
|
import { useId as A, useState as T, useEffect as V } from "react";
|
|
4
|
-
import { i as D } from "./icons-
|
|
4
|
+
import { i as D } from "./icons-DVeBguFb.js";
|
|
5
5
|
import { u as J, c as K } from "./use-touched-B999bBr8.js";
|
|
6
6
|
import './assets/index50.css';function O(n) {
|
|
7
7
|
return n && `${n[0].toLocaleUpperCase()}${n.slice(1)}`;
|
|
@@ -80,4 +80,4 @@ export {
|
|
|
80
80
|
ae as I,
|
|
81
81
|
Q as f
|
|
82
82
|
};
|
|
83
|
-
//# sourceMappingURL=index-
|
|
83
|
+
//# sourceMappingURL=index-Dd20d_9U.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import v from "classix";
|
|
3
|
-
import { i as w } from "./icons-
|
|
3
|
+
import { i as w } from "./icons-DVeBguFb.js";
|
|
4
4
|
import { u as C, c as S } from "./use-touched-B999bBr8.js";
|
|
5
5
|
import './assets/index55.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
|
|
6
6
|
function _(n) {
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
E as r,
|
|
72
72
|
_ as s
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=index-
|
|
74
|
+
//# sourceMappingURL=index-Dx-KtGBg.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./assets/index55.css');const u=require("react/jsx-runtime"),C=require("classix"),S=require("./icons-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
"use strict";require('./assets/index55.css');const u=require("react/jsx-runtime"),C=require("classix"),S=require("./icons-BIdcCH-v.cjs"),p=require("./use-touched-Bq5Gjbpz.cjs"),P=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function h(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||P.has(e)))}const _=/^--[\w-]+$/,q=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,x=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),l=typeof document<"u"?document.createElement("span"):null;function b(r){const e=r.trim();if(!e||!l||x.has(e.toLowerCase()))return e;const s=document.body??document.documentElement;if(!s||(l.style.color=e,!l.style.color))return e;s.appendChild(l);const n=getComputedStyle(l).color.trim();return l.remove(),n||e}function y(r,e="currentColor"){var c;if(typeof document>"u")return e;const s=getComputedStyle(document.documentElement),n=new Set;let t=r.trim();for(;t;){const o=t.match(q),a=(o==null?void 0:o[1])??(_.test(t)?t:null),i=(c=o==null?void 0:o[2])==null?void 0:c.trim();if(!a)return b(t);if(n.has(a)){t=i??"";continue}n.add(a),t=s.getPropertyValue(a).trim()||i||""}return b(e)}const j="_select_1bm47_3",V="_touched_1bm47_24",g="_label_1bm47_29",d={select:j,touched:V,label:g},E=({children:r,label:e,placeholder:s,...n})=>{const{touched:t,onBlur:c}=p.useTouched(n.value===""),o=h(n),{className:a,onBlur:i,style:v,...f}=o,w={...v,"--icon-svg":S.iconSVG("CaretDown",y("--colors-semantic-content-secondary"))},m=u.jsxs("select",{className:C(d.select,a,t&&d.touched),onBlur:p.composeEventHandlers(c,i),style:w,...f,"data-component":"select",children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),r]});return e?u.jsxs("label",{"data-component":"select",children:[u.jsx("span",{className:d.label,"data-required":n.required||void 0,children:e}),m]}):m};exports.Select=E;exports.resolveColor=y;exports.sanitizeSelectProps=h;
|
|
2
|
+
//# sourceMappingURL=index-VLDsM9it.cjs.map
|