@solibo/solibo-ui 0.3.26 → 0.3.27

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.
@@ -1 +1 @@
1
- ._dialog_1b99l_1{background-color:var(--color-white);border-radius:var(--border-radius);border:none;box-shadow:var(--shadow-big);justify-self:center;text-align:center;max-width:75vw;min-width:25vw;opacity:0;transition:opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay);visibility:hidden}._dialog_1b99l_1[open]{opacity:1;visibility:visible}._dialog_1b99l_1 button{margin:var(--unit)}._wrapper_1b99l_26{align-items:center;-webkit-backdrop-filter:blur(var(--unit));backdrop-filter:blur(var(--unit));display:flex;height:100%;left:0;opacity:0;position:fixed;top:0;transition:opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay),-webkit-backdrop-filter var(--transition-duration) var(--transition-timing-function);transition:backdrop-filter var(--transition-duration) var(--transition-timing-function),opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay);transition:backdrop-filter var(--transition-duration) var(--transition-timing-function),opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay),-webkit-backdrop-filter var(--transition-duration) var(--transition-timing-function);visibility:hidden;width:100%;z-index:3}._wrapper_1b99l_26:has(dialog[open]){opacity:1;visibility:visible}
1
+ ._dialog_1gvg4_1{background-color:var(--color-white);border-radius:var(--border-radius);border:none;box-shadow:var(--shadow-big);justify-self:center;max-height:90vh;max-width:75vw;min-width:25vw;opacity:0;overflow-y:auto;text-align:center;transition:opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay);visibility:hidden}._dialog_1gvg4_1[open]{opacity:1;visibility:visible}._dialog_1gvg4_1 button{margin:var(--unit)}._wrapper_1gvg4_28{align-items:center;-webkit-backdrop-filter:blur(var(--unit));backdrop-filter:blur(var(--unit));display:flex;height:100%;left:0;opacity:0;position:fixed;top:0;transition:opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay),-webkit-backdrop-filter var(--transition-duration) var(--transition-timing-function);transition:backdrop-filter var(--transition-duration) var(--transition-timing-function),opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay);transition:backdrop-filter var(--transition-duration) var(--transition-timing-function),opacity var(--transition-duration) var(--transition-timing-function) var(--transition-delay),visibility var(--transition-duration) var(--transition-timing-function) var(--transition-delay),-webkit-backdrop-filter var(--transition-duration) var(--transition-timing-function);visibility:hidden;width:100%;z-index:3}._wrapper_1gvg4_28:has(dialog[open]){opacity:1;visibility:visible}@media (width <= 960px){._dialog_1gvg4_1{max-width:90vw}}
@@ -1 +1 @@
1
- ._checkbox_1j4ds_1{align-items:center;cursor:pointer;display:flex;gap:var(--unit-small)}._checkbox_1j4ds_1 input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:solid 1px var(--color-neutral);border-radius:calc(var(--border-radius) / 2);height:calc(var(--unit) * 1.25);width:calc(var(--unit) * 1.25)}._checkbox_1j4ds_1 input[type=checkbox]:checked{background-color:var(--color-primary)}._checkbox_1j4ds_1 input[type=checkbox]:checked:after{background-color:var(--color-white);content:"";display:block;height:100%;-webkit-mask-image:var(--icon-svg);mask-image:var(--icon-svg);width:100%}._checkbox_1j4ds_1 input[type=checkbox]:disabled{background-color:var(--color-neutral);cursor:not-allowed}._checkbox_1j4ds_1 input[type=checkbox]:disabled:after{background-color:var(--color-icon)}
1
+ ._checkbox_19svo_1{align-items:center;cursor:pointer;display:inline-flex;gap:var(--unit-small)}._checkbox_19svo_1 input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:solid 1px var(--color-neutral);border-radius:calc(var(--border-radius) / 2);height:calc(var(--unit) * 1.25);width:calc(var(--unit) * 1.25)}._checkbox_19svo_1 input[type=checkbox]:checked{background-color:var(--color-primary)}._checkbox_19svo_1 input[type=checkbox]:checked:after{background-color:var(--color-white);content:"";display:block;height:100%;-webkit-mask-image:var(--icon-svg);mask-image:var(--icon-svg);width:100%}._checkbox_19svo_1 input[type=checkbox]:disabled{background-color:var(--color-neutral);cursor:not-allowed}._checkbox_19svo_1 input[type=checkbox]:disabled:after{background-color:var(--color-icon)}
@@ -1 +1 @@
1
- ._collapsible_1wb1g_1 summary{color:var(--color-primary);cursor:pointer;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._collapsible_1wb1g_1 summary span{transition:transform var(--transition-duration) var(--transition-timing-function)}._collapsible_1wb1g_1[open]>summary span{transform:rotateX(180deg)}
1
+ ._collapsible_x7hng_1 summary{color:var(--color-primary);cursor:pointer;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._collapsible_x7hng_1 summary span{transition:transform var(--transition-duration) var(--transition-timing-function);vertical-align:inherit}._collapsible_x7hng_1[open]>summary span{transform:rotateX(180deg)}
@@ -1 +1 @@
1
- ._list_1t7jo_1{display:grid;gap:var(--unit);list-style-type:none;-webkit-margin-before:0;margin-block-start:0}._list_1t7jo_1 li{list-style:none;padding-left:0}._list_1t7jo_1 li>section{border-bottom:var(--border-width) solid var(--color-border-primary)}._list_1t7jo_1 li>section:first-child{border-top:var(--border-width) solid var(--color-border-primary)}._list_1t7jo_1 li>section:last-of-type{border-bottom:none}._columns_1t7jo_25{-moz-column-gap:var(--unit);column-gap:var(--unit);display:grid;grid-template-columns:repeat(var(--list-columns, 2),minmax(0,1fr))}._horizontal_1t7jo_31{display:block;max-width:100%}._horizontal_1t7jo_31 li{display:inline-block;margin:0 var(--unit) var(--unit) 0;max-width:100%}@media (width <= 960px){._columns_1t7jo_25{grid-template-columns:1fr}}
1
+ ._list_kllf6_1{display:grid;gap:var(--unit);list-style-type:none;-webkit-margin-before:0;margin-block-start:0}._list_kllf6_1 li{list-style:none;padding-left:0}._list_kllf6_1 li li{margin-left:var(--unit)}._list_kllf6_1 li>section{border-bottom:var(--border-width) solid var(--color-border-primary)}._list_kllf6_1 li>section:first-child{border-top:var(--border-width) solid var(--color-border-primary)}._list_kllf6_1 li>section:last-of-type{border-bottom:none}._columns_kllf6_29{-moz-column-gap:var(--unit);column-gap:var(--unit);display:grid;grid-template-columns:repeat(var(--list-columns, 2),minmax(0,1fr))}._horizontal_kllf6_35{display:block;max-width:100%}._horizontal_kllf6_35 li{display:inline-block;margin:0 var(--unit) var(--unit) 0;max-width:100%}@media (width <= 960px){._columns_kllf6_29{grid-template-columns:1fr}}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index22.css');const e=require("react/jsx-runtime"),n=require("../icon/index.cjs"),c="_collapsible_1wb1g_1",i={collapsible:c},t=({children:o,disabled:l,label:s})=>e.jsxs("details",{className:i.collapsible,open:l||void 0,"data-component":"collapsible",children:[e.jsxs("summary",{children:[s&&s,!l&&e.jsx(n.Icon,{gap:"left",name:"chevron",variant:"primary"})]}),o]});exports.Collapsible=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index22.css');const e=require("react/jsx-runtime"),n=require("../icon/index.cjs"),c="_collapsible_x7hng_1",i={collapsible:c},t=({children:o,disabled:l,label:s})=>e.jsxs("details",{className:i.collapsible,open:l||void 0,"data-component":"collapsible",children:[e.jsxs("summary",{children:[s&&s,!l&&e.jsx(n.Icon,{gap:"left",name:"chevron",variant:"primary"})]}),o]});exports.Collapsible=t;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,12 +1,12 @@
1
1
  import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
2
  import { Icon as c } from "../icon/index.js";
3
- import '../../assets/index22.css';const r = "_collapsible_1wb1g_1", i = {
4
- collapsible: r
3
+ import '../../assets/index22.css';const n = "_collapsible_x7hng_1", r = {
4
+ collapsible: n
5
5
  }, t = ({
6
6
  children: e,
7
7
  disabled: l,
8
8
  label: o
9
- }) => /* @__PURE__ */ s("details", { className: i.collapsible, open: l || void 0, "data-component": "collapsible", children: [
9
+ }) => /* @__PURE__ */ s("details", { className: r.collapsible, open: l || void 0, "data-component": "collapsible", children: [
10
10
  /* @__PURE__ */ s("summary", { children: [
11
11
  o && o,
12
12
  !l && /* @__PURE__ */ a(c, { gap: "left", name: "chevron", variant: "primary" })
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index24.css');const t=require("react/jsx-runtime"),z=require("../../classix-5H4IWnMA.cjs"),f=require("react"),b=require("../button/index.cjs"),y=require("../icon/index.cjs"),q="_dropzone_1737c_1",v="_dragging_1737c_18",R="_minimal_1737c_22",l={dropzone:q,dragging:v,minimal:R},S=({accepts:g,label:p="Select files",multiple:u=!1,onChange:n,variant:i="default",...m})=>{const c=f.useRef(null),[_,r]=f.useState(!1),s=e=>{e.preventDefault(),e.stopPropagation()},D=e=>{s(e),r(!1);const a=Array.from(e.dataTransfer.files??[]);if(a.length===0)return;const x=u?a:a.slice(0,1),o=c.current;if(!o)return;const d=new DataTransfer;for(const j of x)d.items.add(j);o.files=d.files,n==null||n({target:o,currentTarget:o})};return t.jsx("div",{className:z.t(l.dropzone,l[i],_&&l.dragging),onDragEnter:e=>{s(e),r(!0)},onDragOver:e=>{s(e),r(!0)},onDragLeave:e=>{s(e),r(!1)},onDrop:D,...m,"data-component":"dropzone",children:t.jsxs("label",{children:[t.jsx("input",{accept:g,hidden:!0,multiple:u,onChange:n,ref:c,type:"file"}),t.jsx(y.Icon,{name:"upload",size:i==="minimal"?"medium":"large"}),t.jsx("br",{}),i!=="minimal"&&t.jsx(b.Button,{onClick:()=>{var e;return(e=c.current)==null?void 0:e.click()},type:"button",children:p})]})})};exports.Dropzone=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index24.css');const i=require("react/jsx-runtime"),b=require("../../classix-5H4IWnMA.cjs"),z=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1737c_1",T="_dragging_1737c_18",S="_minimal_1737c_22",g={dropzone:R,dragging:T,minimal:S},k=({accepts:F,label:D="Select files",maxFileSize:m,multiple:d=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=z.useRef(null),[x,l]=z.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},_=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},v=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((u,o)=>(o.size===0?u.emptyFiles.push(o):m&&o.size>m?u.oversizedFiles.push(o):u.validFiles.push(o),u),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),l(!1);const t=Array.from(e.dataTransfer.files??[]),s=v(t);if(s.length===0)return;const r=d?s:s.slice(0,1);_(r)},h=e=>{const t=Array.from(e.target.files??[]),s=v(t);if(s.length===t.length){n==null||n(e);return}const r=d?s:s.slice(0,1);_(r)};return i.jsx("div",{className:b.t(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),l(!0)},onDragOver:e=>{c(e),l(!0)},onDragLeave:e=>{c(e),l(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:F,hidden:!0,multiple:d,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"upload",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:D})]})})};exports.Dropzone=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/_dropzone/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useRef, useState } from 'react';\n\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type DropzoneProps = {\n accepts?: string;\n label: string;\n multiple?: boolean;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n variant?: 'default' | 'minimal';\n};\n\nexport const Dropzone = ({\n accepts,\n label = 'Select files',\n multiple = false,\n onChange,\n variant = 'default',\n ...props\n}: DropzoneProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n\n const prevent = (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const handleDrop = (e: React.DragEvent<HTMLDivElement>) => {\n prevent(e);\n setIsDragging(false);\n\n const files = Array.from(e.dataTransfer.files ?? []);\n if (files.length === 0) return;\n\n const selected = multiple ? files : files.slice(0, 1);\n\n const input = inputRef.current;\n if (!input) return;\n\n const dt = new DataTransfer();\n for (const f of selected) dt.items.add(f);\n\n input.files = dt.files;\n\n onChange?.({ target: input, currentTarget: input } as React.ChangeEvent<HTMLInputElement>);\n };\n\n return (\n <div\n className={cx(styles.dropzone, styles[variant], isDragging && styles.dragging)}\n onDragEnter={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragOver={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragLeave={(e) => {\n prevent(e);\n setIsDragging(false);\n }}\n onDrop={handleDrop}\n {...props}\n >\n <label>\n <input\n accept={accepts}\n hidden\n multiple={multiple}\n onChange={onChange}\n ref={inputRef}\n type='file'\n />\n <Icon\n name='upload'\n size={variant === 'minimal' ? 'medium' : 'large'}\n />\n <br />\n {variant !== 'minimal' && (\n <Button\n onClick={() => inputRef.current?.click()}\n type={'button'}\n >\n {label}\n </Button>\n )}\n </label>\n </div>\n );\n};\n"],"names":["Dropzone","accepts","label","multiple","onChange","variant","props","inputRef","useRef","isDragging","setIsDragging","useState","prevent","e","preventDefault","stopPropagation","handleDrop","files","Array","from","dataTransfer","length","selected","slice","input","current","dt","DataTransfer","f","items","add","target","currentTarget","jsx","cx","styles","dropzone","dragging","Icon","Button","click"],"mappings":"uVAeaA,EAAWA,CAAC,CACvBC,QAAAA,EACAC,MAAAA,EAAQ,eACRC,SAAAA,EAAW,GACXC,SAAAA,EACAC,QAAAA,EAAU,UACV,GAAGC,CACU,IAAM,CACnB,MAAMC,EAAWC,EAAAA,OAAyB,IAAI,EACxC,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAK,EAE5CC,EAAWC,GAAuB,CACtCA,EAAEC,eAAAA,EACFD,EAAEE,gBAAAA,CACJ,EAEMC,EAAcH,GAAuC,CACzDD,EAAQC,CAAC,EACTH,EAAc,EAAK,EAEnB,MAAMO,EAAQC,MAAMC,KAAKN,EAAEO,aAAaH,OAAS,EAAE,EACnD,GAAIA,EAAMI,SAAW,EAAG,OAExB,MAAMC,EAAWnB,EAAWc,EAAQA,EAAMM,MAAM,EAAG,CAAC,EAE9CC,EAAQjB,EAASkB,QACvB,GAAI,CAACD,EAAO,OAEZ,MAAME,EAAK,IAAIC,aACf,UAAWC,KAAKN,EAAUI,EAAGG,MAAMC,IAAIF,CAAC,EAExCJ,EAAMP,MAAQS,EAAGT,MAEjBb,GAAAA,MAAAA,EAAW,CAAE2B,OAAQP,EAAOQ,cAAeR,CAAAA,EAC7C,EAEA,OACES,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,SAAUD,EAAO9B,CAAO,EAAGI,GAAc0B,EAAOE,QAAQ,EAC7E,YAAcxB,GAAM,CAClBD,EAAQC,CAAC,EACTH,EAAc,EAAI,CACpB,EACA,WAAaG,GAAM,CACjBD,EAAQC,CAAC,EACTH,EAAc,EAAI,CACpB,EACA,YAAcG,GAAM,CAClBD,EAAQC,CAAC,EACTH,EAAc,EAAK,CACrB,EACA,OAAQM,EACR,GAAIV,EAAM,iBAAA,WAEV,gBAAC,QAAA,CACC,SAAA,CAAA2B,EAAAA,IAAC,QAAA,CACC,OAAQhC,EACR,OAAM,GACN,SAAAE,EACA,SAAAC,EACA,IAAKG,EACL,KAAK,MAAA,CAAM,EAEb0B,MAACK,EAAAA,MACC,KAAK,SACL,KAAMjC,IAAY,UAAY,SAAW,QAAQ,QAElD,KAAA,EAAE,EACFA,IAAY,WACX4B,EAAAA,IAACM,EAAAA,OAAA,CACC,QAAS,IAAA,OAAMhC,OAAAA,EAAAA,EAASkB,UAATlB,YAAAA,EAAkBiC,SACjC,KAAM,SAELtC,SAAAA,CAAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,CAEJ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/_dropzone/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useRef, useState } from 'react';\n\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type DropzoneProps = {\n accepts?: string;\n label: string;\n maxFileSize?: number;\n multiple?: boolean;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n onValidation?: (empty: File[], oversized: File[]) => void;\n variant?: 'default' | 'minimal';\n};\n\nexport const Dropzone = ({\n accepts,\n label = 'Select files',\n maxFileSize,\n multiple = false,\n onChange,\n onValidation,\n variant = 'default',\n ...props\n}: DropzoneProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n\n const prevent = (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const updateInputFiles = (files: File[]) => {\n const input = inputRef.current;\n if (!input) return;\n\n const dt = new DataTransfer();\n for (const file of files) dt.items.add(file);\n\n input.files = dt.files;\n\n onChange?.({\n target: input,\n currentTarget: input,\n } as React.ChangeEvent<HTMLInputElement>);\n };\n\n const getValidFiles = (files: File[]) => {\n const { validFiles, emptyFiles, oversizedFiles } = files.reduce(\n (acc, file) => {\n if (file.size === 0) {\n acc.emptyFiles.push(file);\n } else if (maxFileSize && file.size > maxFileSize) {\n acc.oversizedFiles.push(file);\n } else {\n acc.validFiles.push(file);\n }\n\n return acc;\n },\n {\n validFiles: [] as File[],\n emptyFiles: [] as File[],\n oversizedFiles: [] as File[],\n }\n );\n\n if (emptyFiles.length > 0 || oversizedFiles.length > 0) {\n onValidation?.(emptyFiles, oversizedFiles);\n }\n\n return validFiles;\n };\n\n const handleDrop = (e: React.DragEvent<HTMLDivElement>) => {\n prevent(e);\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files ?? []);\n const validFiles = getValidFiles(files);\n\n if (validFiles.length === 0) return;\n\n const selected = multiple ? validFiles : validFiles.slice(0, 1);\n updateInputFiles(selected);\n };\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n const files = Array.from(e.target.files ?? []);\n const validFiles = getValidFiles(files);\n\n if (validFiles.length === files.length) {\n onChange?.(e);\n return;\n }\n\n const selected = multiple ? validFiles : validFiles.slice(0, 1);\n updateInputFiles(selected);\n };\n\n return (\n <div\n className={cx(styles.dropzone, styles[variant], isDragging && styles.dragging)}\n onDragEnter={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragOver={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragLeave={(e) => {\n prevent(e);\n setIsDragging(false);\n }}\n onDrop={handleDrop}\n {...props}\n >\n <label>\n <input\n accept={accepts}\n hidden\n multiple={multiple}\n onChange={handleInputChange}\n ref={inputRef}\n type='file'\n />\n <Icon\n name='upload'\n size={variant === 'minimal' ? 'medium' : 'large'}\n />\n <br />\n {variant !== 'minimal' && (\n <Button\n onClick={() => inputRef.current?.click()}\n type={'button'}\n >\n {label}\n </Button>\n )}\n </label>\n </div>\n );\n};\n"],"names":["Dropzone","accepts","label","maxFileSize","multiple","onChange","onValidation","variant","props","inputRef","useRef","isDragging","setIsDragging","useState","prevent","e","preventDefault","stopPropagation","updateInputFiles","files","input","current","dt","DataTransfer","file","items","add","target","currentTarget","getValidFiles","validFiles","emptyFiles","oversizedFiles","reduce","acc","size","push","length","handleDrop","Array","from","dataTransfer","selected","slice","handleInputChange","jsx","cx","styles","dropzone","dragging","Icon","Button","click"],"mappings":"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"}
@@ -1,52 +1,76 @@
1
- import { jsx as r, jsxs as y } from "react/jsx-runtime";
2
- import { t as b } from "../../classix-DG18itHa.js";
3
- import { useRef as v, useState as x } from "react";
4
- import { Button as T } from "../button/index.js";
5
- import { Icon as j } from "../icon/index.js";
6
- import '../../assets/index24.css';const k = "_dropzone_1737c_1", I = "_dragging_1737c_18", R = "_minimal_1737c_22", l = {
7
- dropzone: k,
8
- dragging: I,
9
- minimal: R
10
- }, E = ({
11
- accepts: d,
12
- label: p = "Select files",
13
- multiple: f = !1,
14
- onChange: t,
15
- variant: s = "default",
16
- ...g
1
+ import { jsx as l, jsxs as b } from "react/jsx-runtime";
2
+ import { t as T } from "../../classix-DG18itHa.js";
3
+ import { useRef as j, useState as k } from "react";
4
+ import { Button as x } from "../button/index.js";
5
+ import { Icon as A } from "../icon/index.js";
6
+ import '../../assets/index24.css';const R = "_dropzone_1737c_1", w = "_dragging_1737c_18", B = "_minimal_1737c_22", m = {
7
+ dropzone: R,
8
+ dragging: w,
9
+ minimal: B
10
+ }, S = ({
11
+ accepts: z,
12
+ label: D = "Select files",
13
+ maxFileSize: g,
14
+ multiple: p = !1,
15
+ onChange: i,
16
+ onValidation: a,
17
+ variant: f = "default",
18
+ ..._
17
19
  }) => {
18
- const a = v(null), [u, n] = x(!1), o = (e) => {
20
+ const u = j(null), [y, o] = k(!1), c = (e) => {
19
21
  e.preventDefault(), e.stopPropagation();
20
- }, D = (e) => {
21
- o(e), n(!1);
22
- const c = Array.from(e.dataTransfer.files ?? []);
23
- if (c.length === 0) return;
24
- const _ = f ? c : c.slice(0, 1), i = a.current;
25
- if (!i) return;
26
- const m = new DataTransfer();
27
- for (const z of _) m.items.add(z);
28
- i.files = m.files, t == null || t({
29
- target: i,
30
- currentTarget: i
22
+ }, F = (e) => {
23
+ const s = u.current;
24
+ if (!s) return;
25
+ const t = new DataTransfer();
26
+ for (const r of e) t.items.add(r);
27
+ s.files = t.files, i == null || i({
28
+ target: s,
29
+ currentTarget: s
31
30
  });
31
+ }, v = (e) => {
32
+ const {
33
+ validFiles: s,
34
+ emptyFiles: t,
35
+ oversizedFiles: r
36
+ } = e.reduce((d, n) => (n.size === 0 ? d.emptyFiles.push(n) : g && n.size > g ? d.oversizedFiles.push(n) : d.validFiles.push(n), d), {
37
+ validFiles: [],
38
+ emptyFiles: [],
39
+ oversizedFiles: []
40
+ });
41
+ return (t.length > 0 || r.length > 0) && (a == null || a(t, r)), s;
42
+ }, h = (e) => {
43
+ c(e), o(!1);
44
+ const s = Array.from(e.dataTransfer.files ?? []), t = v(s);
45
+ if (t.length === 0) return;
46
+ const r = p ? t : t.slice(0, 1);
47
+ F(r);
48
+ }, I = (e) => {
49
+ const s = Array.from(e.target.files ?? []), t = v(s);
50
+ if (t.length === s.length) {
51
+ i == null || i(e);
52
+ return;
53
+ }
54
+ const r = p ? t : t.slice(0, 1);
55
+ F(r);
32
56
  };
33
- return /* @__PURE__ */ r("div", { className: b(l.dropzone, l[s], u && l.dragging), onDragEnter: (e) => {
34
- o(e), n(!0);
57
+ return /* @__PURE__ */ l("div", { className: T(m.dropzone, m[f], y && m.dragging), onDragEnter: (e) => {
58
+ c(e), o(!0);
35
59
  }, onDragOver: (e) => {
36
- o(e), n(!0);
60
+ c(e), o(!0);
37
61
  }, onDragLeave: (e) => {
38
- o(e), n(!1);
39
- }, onDrop: D, ...g, "data-component": "dropzone", children: /* @__PURE__ */ y("label", { children: [
40
- /* @__PURE__ */ r("input", { accept: d, hidden: !0, multiple: f, onChange: t, ref: a, type: "file" }),
41
- /* @__PURE__ */ r(j, { name: "upload", size: s === "minimal" ? "medium" : "large" }),
42
- /* @__PURE__ */ r("br", {}),
43
- s !== "minimal" && /* @__PURE__ */ r(T, { onClick: () => {
62
+ c(e), o(!1);
63
+ }, onDrop: h, ..._, "data-component": "dropzone", children: /* @__PURE__ */ b("label", { children: [
64
+ /* @__PURE__ */ l("input", { accept: z, hidden: !0, multiple: p, onChange: I, ref: u, type: "file" }),
65
+ /* @__PURE__ */ l(A, { name: "upload", size: f === "minimal" ? "medium" : "large" }),
66
+ /* @__PURE__ */ l("br", {}),
67
+ f !== "minimal" && /* @__PURE__ */ l(x, { onClick: () => {
44
68
  var e;
45
- return (e = a.current) == null ? void 0 : e.click();
46
- }, type: "button", children: p })
69
+ return (e = u.current) == null ? void 0 : e.click();
70
+ }, type: "button", children: D })
47
71
  ] }) });
48
72
  };
49
73
  export {
50
- E as Dropzone
74
+ S as Dropzone
51
75
  };
52
76
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/_dropzone/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useRef, useState } from 'react';\n\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type DropzoneProps = {\n accepts?: string;\n label: string;\n multiple?: boolean;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n variant?: 'default' | 'minimal';\n};\n\nexport const Dropzone = ({\n accepts,\n label = 'Select files',\n multiple = false,\n onChange,\n variant = 'default',\n ...props\n}: DropzoneProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n\n const prevent = (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const handleDrop = (e: React.DragEvent<HTMLDivElement>) => {\n prevent(e);\n setIsDragging(false);\n\n const files = Array.from(e.dataTransfer.files ?? []);\n if (files.length === 0) return;\n\n const selected = multiple ? files : files.slice(0, 1);\n\n const input = inputRef.current;\n if (!input) return;\n\n const dt = new DataTransfer();\n for (const f of selected) dt.items.add(f);\n\n input.files = dt.files;\n\n onChange?.({ target: input, currentTarget: input } as React.ChangeEvent<HTMLInputElement>);\n };\n\n return (\n <div\n className={cx(styles.dropzone, styles[variant], isDragging && styles.dragging)}\n onDragEnter={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragOver={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragLeave={(e) => {\n prevent(e);\n setIsDragging(false);\n }}\n onDrop={handleDrop}\n {...props}\n >\n <label>\n <input\n accept={accepts}\n hidden\n multiple={multiple}\n onChange={onChange}\n ref={inputRef}\n type='file'\n />\n <Icon\n name='upload'\n size={variant === 'minimal' ? 'medium' : 'large'}\n />\n <br />\n {variant !== 'minimal' && (\n <Button\n onClick={() => inputRef.current?.click()}\n type={'button'}\n >\n {label}\n </Button>\n )}\n </label>\n </div>\n );\n};\n"],"names":["Dropzone","accepts","label","multiple","onChange","variant","props","inputRef","useRef","isDragging","setIsDragging","useState","prevent","e","preventDefault","stopPropagation","handleDrop","files","Array","from","dataTransfer","length","selected","slice","input","current","dt","DataTransfer","f","items","add","target","currentTarget","jsx","cx","styles","dropzone","dragging","Icon","Button","click"],"mappings":";;;;;;;;;GAeaA,IAAWA,CAAC;AAAA,EACvBC,SAAAA;AAAAA,EACAC,OAAAA,IAAQ;AAAA,EACRC,UAAAA,IAAW;AAAA,EACXC,UAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACU,MAAM;AACnB,QAAMC,IAAWC,EAAyB,IAAI,GACxC,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAK,GAE5CC,IAAUA,CAACC,MAAuB;AACtCA,MAAEC,eAAAA,GACFD,EAAEE,gBAAAA;AAAAA,EACJ,GAEMC,IAAaA,CAACH,MAAuC;AACzDD,IAAAA,EAAQC,CAAC,GACTH,EAAc,EAAK;AAEnB,UAAMO,IAAQC,MAAMC,KAAKN,EAAEO,aAAaH,SAAS,EAAE;AACnD,QAAIA,EAAMI,WAAW,EAAG;AAExB,UAAMC,IAAWnB,IAAWc,IAAQA,EAAMM,MAAM,GAAG,CAAC,GAE9CC,IAAQjB,EAASkB;AACvB,QAAI,CAACD,EAAO;AAEZ,UAAME,IAAK,IAAIC,aAAAA;AACf,eAAWC,KAAKN,EAAUI,CAAAA,EAAGG,MAAMC,IAAIF,CAAC;AAExCJ,IAAAA,EAAMP,QAAQS,EAAGT,OAEjBb,KAAAA,QAAAA,EAAW;AAAA,MAAE2B,QAAQP;AAAAA,MAAOQ,eAAeR;AAAAA,IAAAA;AAAAA,EAC7C;AAEA,SACE,gBAAAS,EAAC,OAAA,EACC,WAAWC,EAAGC,EAAOC,UAAUD,EAAO9B,CAAO,GAAGI,KAAc0B,EAAOE,QAAQ,GAC7E,aAAcxB,CAAAA,MAAM;AAClBD,IAAAA,EAAQC,CAAC,GACTH,EAAc,EAAI;AAAA,EACpB,GACA,YAAaG,CAAAA,MAAM;AACjBD,IAAAA,EAAQC,CAAC,GACTH,EAAc,EAAI;AAAA,EACpB,GACA,aAAcG,CAAAA,MAAM;AAClBD,IAAAA,EAAQC,CAAC,GACTH,EAAc,EAAK;AAAA,EACrB,GACA,QAAQM,GACR,GAAIV,GAAM,kBAAA,YAEV,4BAAC,SAAA,EACC,UAAA;AAAA,IAAA,gBAAA2B,EAAC,SAAA,EACC,QAAQhC,GACR,QAAM,IACN,UAAAE,GACA,UAAAC,GACA,KAAKG,GACL,MAAK,OAAA,CAAM;AAAA,IAEb,gBAAA0B,EAACK,KACC,MAAK,UACL,MAAMjC,MAAY,YAAY,WAAW,SAAQ;AAAA,sBAElD,MAAA,EAAE;AAAA,IACFA,MAAY,aACX,gBAAA4B,EAACM,GAAA,EACC,SAAS,MAAA;;AAAMhC,cAAAA,IAAAA,EAASkB,YAATlB,gBAAAA,EAAkBiC;AAAAA,OACjC,MAAM,UAELtC,UAAAA,EAAAA,CACH;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/_dropzone/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useRef, useState } from 'react';\n\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport styles from './styles.module.css';\n\nexport type DropzoneProps = {\n accepts?: string;\n label: string;\n maxFileSize?: number;\n multiple?: boolean;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n onValidation?: (empty: File[], oversized: File[]) => void;\n variant?: 'default' | 'minimal';\n};\n\nexport const Dropzone = ({\n accepts,\n label = 'Select files',\n maxFileSize,\n multiple = false,\n onChange,\n onValidation,\n variant = 'default',\n ...props\n}: DropzoneProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n\n const prevent = (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const updateInputFiles = (files: File[]) => {\n const input = inputRef.current;\n if (!input) return;\n\n const dt = new DataTransfer();\n for (const file of files) dt.items.add(file);\n\n input.files = dt.files;\n\n onChange?.({\n target: input,\n currentTarget: input,\n } as React.ChangeEvent<HTMLInputElement>);\n };\n\n const getValidFiles = (files: File[]) => {\n const { validFiles, emptyFiles, oversizedFiles } = files.reduce(\n (acc, file) => {\n if (file.size === 0) {\n acc.emptyFiles.push(file);\n } else if (maxFileSize && file.size > maxFileSize) {\n acc.oversizedFiles.push(file);\n } else {\n acc.validFiles.push(file);\n }\n\n return acc;\n },\n {\n validFiles: [] as File[],\n emptyFiles: [] as File[],\n oversizedFiles: [] as File[],\n }\n );\n\n if (emptyFiles.length > 0 || oversizedFiles.length > 0) {\n onValidation?.(emptyFiles, oversizedFiles);\n }\n\n return validFiles;\n };\n\n const handleDrop = (e: React.DragEvent<HTMLDivElement>) => {\n prevent(e);\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files ?? []);\n const validFiles = getValidFiles(files);\n\n if (validFiles.length === 0) return;\n\n const selected = multiple ? validFiles : validFiles.slice(0, 1);\n updateInputFiles(selected);\n };\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n const files = Array.from(e.target.files ?? []);\n const validFiles = getValidFiles(files);\n\n if (validFiles.length === files.length) {\n onChange?.(e);\n return;\n }\n\n const selected = multiple ? validFiles : validFiles.slice(0, 1);\n updateInputFiles(selected);\n };\n\n return (\n <div\n className={cx(styles.dropzone, styles[variant], isDragging && styles.dragging)}\n onDragEnter={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragOver={(e) => {\n prevent(e);\n setIsDragging(true);\n }}\n onDragLeave={(e) => {\n prevent(e);\n setIsDragging(false);\n }}\n onDrop={handleDrop}\n {...props}\n >\n <label>\n <input\n accept={accepts}\n hidden\n multiple={multiple}\n onChange={handleInputChange}\n ref={inputRef}\n type='file'\n />\n <Icon\n name='upload'\n size={variant === 'minimal' ? 'medium' : 'large'}\n />\n <br />\n {variant !== 'minimal' && (\n <Button\n onClick={() => inputRef.current?.click()}\n type={'button'}\n >\n {label}\n </Button>\n )}\n </label>\n </div>\n );\n};\n"],"names":["Dropzone","accepts","label","maxFileSize","multiple","onChange","onValidation","variant","props","inputRef","useRef","isDragging","setIsDragging","useState","prevent","e","preventDefault","stopPropagation","updateInputFiles","files","input","current","dt","DataTransfer","file","items","add","target","currentTarget","getValidFiles","validFiles","emptyFiles","oversizedFiles","reduce","acc","size","push","length","handleDrop","Array","from","dataTransfer","selected","slice","handleInputChange","jsx","cx","styles","dropzone","dragging","Icon","Button","click"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const e=require("react/jsx-runtime"),x=require("../../icons-Bo1YqbZg.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1j4ds_1",k={checkbox:h},u=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:k.checkbox,"data-component":"checkbox",children:[c&&e.jsx(b.Loading,{size:24,sticky:!0}),e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),o&&o]})};exports.Checkbox=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const e=require("react/jsx-runtime"),x=require("../../icons-CWtPtYZj.cjs"),b=require("../loading/index.cjs"),h="_checkbox_19svo_1",k={checkbox:h},u=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:k.checkbox,"data-component":"checkbox",children:[c&&e.jsx(b.Loading,{size:24,sticky:!0}),e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),o&&o]})};exports.Checkbox=u;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,9 +1,9 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import { i as x } from "../../icons-CqrxHwOe.js";
2
+ import { i as x } from "../../icons-DeUtqBx_.js";
3
3
  import { Loading as k } from "../loading/index.js";
4
- import '../../assets/index14.css';const b = "_checkbox_1j4ds_1", m = {
4
+ import '../../assets/index14.css';const b = "_checkbox_19svo_1", m = {
5
5
  checkbox: b
6
- }, l = ({
6
+ }, d = ({
7
7
  checked: s,
8
8
  disabled: t,
9
9
  isLoading: c,
@@ -21,6 +21,6 @@ import '../../assets/index14.css';const b = "_checkbox_1j4ds_1", m = {
21
21
  ] });
22
22
  };
23
23
  export {
24
- l as Checkbox
24
+ d as Checkbox
25
25
  };
26
26
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const a=require("react/jsx-runtime"),s="_dialog_1b99l_1",t="_wrapper_1b99l_26",l={dialog:s,wrapper:t},n=({children:e,setOpen:o,...i})=>a.jsx("div",{className:l.wrapper,onClick:()=>o?o(!1):{},"data-component":"dialog",children:a.jsx("dialog",{className:l.dialog,onClick:r=>r.stopPropagation(),...i,children:e})});exports.Dialog=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const a=require("react/jsx-runtime"),s="_dialog_1gvg4_1",t="_wrapper_1gvg4_28",e={dialog:s,wrapper:t},g=({children:i,setOpen:o,...l})=>a.jsx("div",{className:e.wrapper,onClick:()=>o?o(!1):{},"data-component":"dialog",children:a.jsx("dialog",{className:e.dialog,onClick:r=>r.stopPropagation(),...l,children:i})});exports.Dialog=g;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,13 +1,13 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import '../../assets/index12.css';const s = "_dialog_1b99l_1", t = "_wrapper_1b99l_26", l = {
3
- dialog: s,
4
- wrapper: t
5
- }, e = ({
6
- children: r,
2
+ import '../../assets/index12.css';const p = "_dialog_1gvg4_1", s = "_wrapper_1gvg4_28", r = {
3
+ dialog: p,
4
+ wrapper: s
5
+ }, c = ({
6
+ children: l,
7
7
  setOpen: o,
8
8
  ...i
9
- }) => /* @__PURE__ */ a("div", { className: l.wrapper, onClick: () => o ? o(!1) : {}, "data-component": "dialog", children: /* @__PURE__ */ a("dialog", { className: l.dialog, onClick: (p) => p.stopPropagation(), ...i, children: r }) });
9
+ }) => /* @__PURE__ */ a("div", { className: r.wrapper, onClick: () => o ? o(!1) : {}, "data-component": "dialog", children: /* @__PURE__ */ a("dialog", { className: r.dialog, onClick: (g) => g.stopPropagation(), ...i, children: l }) });
10
10
  export {
11
- e as Dialog
11
+ c as Dialog
12
12
  };
13
13
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const r=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),i=require("../../icons-Bo1YqbZg.cjs"),_="_icon_wciqx_1",m="_small_wciqx_9",u="_medium_wciqx_14",d="_large_wciqx_19",g="_danger_wciqx_24",w="_primary_wciqx_32",q="_white_wciqx_36",e={icon:_,small:m,medium:u,large:d,danger:g,default:"_default_wciqx_28",primary:w,white:q,"gap-right":"_gap-right_wciqx_40","gap-left":"_gap-left_wciqx_44"},x={large:e.large,medium:e.medium,small:e.small},p={danger:e.danger,default:e.default,primary:e.primary,white:e.white},y=({fill:n,gap:t="none",name:c,size:a="medium",variant:s="default"})=>{const o={maskImage:i.iconSVG(c,n??!1)};return r.jsx("span",{className:l.t(t!=="none"&&e[`gap-${t}`],x[a],e.icon,p[s]),style:o,"data-component":"icon"})},f=()=>Object.keys(i.iconPaths);exports.Icon=y;exports.Icons=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const r=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),i=require("../../icons-CWtPtYZj.cjs"),_="_icon_wciqx_1",m="_small_wciqx_9",u="_medium_wciqx_14",d="_large_wciqx_19",g="_danger_wciqx_24",w="_primary_wciqx_32",q="_white_wciqx_36",e={icon:_,small:m,medium:u,large:d,danger:g,default:"_default_wciqx_28",primary:w,white:q,"gap-right":"_gap-right_wciqx_40","gap-left":"_gap-left_wciqx_44"},x={large:e.large,medium:e.medium,small:e.small},p={danger:e.danger,default:e.default,primary:e.primary,white:e.white},y=({fill:n,gap:t="none",name:c,size:a="medium",variant:s="default"})=>{const o={maskImage:i.iconSVG(c,n??!1)};return r.jsx("span",{className:l.t(t!=="none"&&e[`gap-${t}`],x[a],e.icon,p[s]),style:o,"data-component":"icon"})},f=()=>Object.keys(i.iconPaths);exports.Icon=y;exports.Icons=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { t as r } from "../../classix-DG18itHa.js";
3
- import { i as m, a as _ } from "../../icons-CqrxHwOe.js";
3
+ import { i as m, a as _ } from "../../icons-DeUtqBx_.js";
4
4
  import '../../assets/index36.css';const l = "_icon_wciqx_1", d = "_small_wciqx_9", g = "_medium_wciqx_14", p = "_large_wciqx_19", w = "_danger_wciqx_24", u = "_primary_wciqx_32", x = "_white_wciqx_36", a = {
5
5
  icon: l,
6
6
  small: d,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const c=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),r=require("../../helpers-fOobx0tS.cjs"),d="_list_1t7jo_1",j="_columns_1t7jo_25",x="_horizontal_1t7jo_31",t={list:d,columns:j,horizontal:x};function y({children:s,className:a,columns:o=1,horizontal:u,ordered:m,style:h,...l}){const n=Number.isFinite(o)?Math.max(1,Math.floor(o)):1,e=_.t(a,t.list,n>1&&t.columns,u&&t.horizontal),i={...h,"--list-columns":n};return m?c.jsx("ol",{className:e,style:i,...l,"data-component":"list",children:r.wrapChildren(s)}):c.jsx("ul",{className:e,style:i,...l,"data-component":"list",children:r.wrapChildren(s)})}exports.List=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const c=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),r=require("../../helpers-fOobx0tS.cjs"),d="_list_kllf6_1",f="_columns_kllf6_29",x="_horizontal_kllf6_35",s={list:d,columns:f,horizontal:x};function y({children:t,className:a,columns:l=1,horizontal:u,ordered:m,style:h,...o}){const n=Number.isFinite(l)?Math.max(1,Math.floor(l)):1,e=_.t(a,s.list,n>1&&s.columns,u&&s.horizontal),i={...h,"--list-columns":n};return m?c.jsx("ol",{className:e,style:i,...o,"data-component":"list",children:r.wrapChildren(t)}):c.jsx("ul",{className:e,style:i,...o,"data-component":"list",children:r.wrapChildren(t)})}exports.List=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { t as u } from "../../classix-DG18itHa.js";
2
+ import { t as f } from "../../classix-DG18itHa.js";
3
3
  import { w as r } from "../../helpers-Dbey5Ztb.js";
4
- import '../../assets/index38.css';const f = "_list_1t7jo_1", p = "_columns_1t7jo_25", d = "_horizontal_1t7jo_31", t = {
5
- list: f,
4
+ import '../../assets/index38.css';const u = "_list_kllf6_1", p = "_columns_kllf6_29", d = "_horizontal_kllf6_35", t = {
5
+ list: u,
6
6
  columns: p,
7
7
  horizontal: d
8
8
  };
@@ -15,7 +15,7 @@ function x({
15
15
  style: _,
16
16
  ...l
17
17
  }) {
18
- const n = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, i = u(m, t.list, n > 1 && t.columns, e && t.horizontal), a = {
18
+ const n = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, i = f(m, t.list, n > 1 && t.columns, e && t.horizontal), a = {
19
19
  ..._,
20
20
  "--list-columns": n
21
21
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),d=require("../../utils-D_TJ8wDc.cjs"),a=require("../../styles.module--qoz6wR5.cjs"),m="_label_ec2gr_1",y="_textarea_ec2gr_5",l={label:m,textarea:y},_=({label:t,maxRows:n=12,minRows:c=3,required:o,value:s,...u})=>{const{touched:i,onBlur:x}=d.useTouched(s==="");return e.jsxs("label",{"data-component":"textarea",children:[t&&e.jsx("span",{className:r.t(l.label,o&&a.inputStyles.required),children:t}),e.jsx("textarea",{className:r.t(a.inputStyles.input,l.textarea,i&&"touched"),onBlur:x,...u,style:{"--min-rows":c,"--max-rows":n},value:s})]})};exports.Textarea=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),d=require("../../utils-D_TJ8wDc.cjs"),l=require("../../styles.module--qoz6wR5.cjs"),m="_label_ec2gr_1",y="_textarea_ec2gr_5",n={label:m,textarea:y},_=({label:t,maxRows:c=12,minRows:o=3,required:s,value:a,...u})=>{const{touched:i,onBlur:x}=d.useTouched(a==="");return e.jsxs("label",{"data-component":"textarea",children:[t&&e.jsx("span",{className:r.t(n.label,s&&l.inputStyles.required),children:t}),e.jsx("textarea",{className:r.t(l.inputStyles.input,n.textarea,i&&"touched"),onBlur:x,...u,required:s,style:{"--min-rows":o,"--max-rows":c},value:a})]})};exports.Textarea=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":"iTAaaA,EAAWA,CAAC,CACvBC,MAAAA,EACAC,QAAAA,EAAU,GACVC,QAAAA,EAAU,EACVC,SAAAA,EACAC,MAAAA,EACA,GAAGC,CACU,IAAM,CACnB,KAAM,CAAEC,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAEnD,OACEK,EAAAA,KAAC,QAAA,CAAK,iBAAA,WACHT,SAAAA,CAAAA,GAASU,EAAAA,IAAC,OAAA,CAAK,UAAWC,EAAAA,EAAGC,EAAOZ,MAAOG,GAAYU,EAAAA,YAAYV,QAAQ,EAAIH,SAAAA,CAAAA,CAAM,EACtFU,EAAAA,IAAC,WAAA,CACC,UAAWC,EAAAA,EAAGE,EAAAA,YAAYC,MAAOF,EAAOG,SAAUT,GAAW,SAAS,EACtE,OAAAC,KACIF,EACJ,MACE,CACE,aAAcH,EACd,aAAcD,CAAAA,EAGlB,MAAAG,CAAA,CACD,CAAA,EACH,CAEJ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":"iTAaaA,EAAWA,CAAC,CACvBC,MAAAA,EACAC,QAAAA,EAAU,GACVC,QAAAA,EAAU,EACVC,SAAAA,EACAC,MAAAA,EACA,GAAGC,CACU,IAAM,CACnB,KAAM,CAAEC,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAEnD,OACEK,EAAAA,KAAC,QAAA,CAAK,iBAAA,WACHT,SAAAA,CAAAA,GAASU,EAAAA,IAAC,OAAA,CAAK,UAAWC,EAAAA,EAAGC,EAAOZ,MAAOG,GAAYU,EAAAA,YAAYV,QAAQ,EAAIH,SAAAA,CAAAA,CAAM,EACtFU,EAAAA,IAAC,WAAA,CACC,UAAWC,EAAAA,EAAGE,EAAAA,YAAYC,MAAOF,EAAOG,SAAUT,GAAW,SAAS,EACtE,OAAAC,KACIF,EACJ,SAAAF,EACA,MACE,CACE,aAAcD,EACd,aAAcD,CAAAA,EAGlB,MAAAG,CAAA,CACD,CAAA,EACH,CAEJ"}
@@ -1,28 +1,28 @@
1
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
- import { t as r } from "../../classix-DG18itHa.js";
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import { t as o } from "../../classix-DG18itHa.js";
3
3
  import { u } from "../../utils-DXIJVVzz.js";
4
- import { i as o } from "../../styles.module-y5zmJBcz.js";
5
- import '../../assets/index41.css';const d = "_label_ec2gr_1", _ = "_textarea_ec2gr_5", s = {
4
+ import { i as s } from "../../styles.module-y5zmJBcz.js";
5
+ import '../../assets/index41.css';const d = "_label_ec2gr_1", _ = "_textarea_ec2gr_5", c = {
6
6
  label: d,
7
7
  textarea: _
8
8
  }, g = ({
9
- label: e,
10
- maxRows: c = 12,
11
- minRows: l = 3,
12
- required: n,
13
- value: t,
9
+ label: t,
10
+ maxRows: l = 12,
11
+ minRows: n = 3,
12
+ required: e,
13
+ value: a,
14
14
  ...m
15
15
  }) => {
16
16
  const {
17
- touched: i,
18
- onBlur: x
19
- } = u(t === "");
17
+ touched: x,
18
+ onBlur: i
19
+ } = u(a === "");
20
20
  return /* @__PURE__ */ p("label", { "data-component": "textarea", children: [
21
- e && /* @__PURE__ */ a("span", { className: r(s.label, n && o.required), children: e }),
22
- /* @__PURE__ */ a("textarea", { className: r(o.input, s.textarea, i && "touched"), onBlur: x, ...m, style: {
23
- "--min-rows": l,
24
- "--max-rows": c
25
- }, value: t })
21
+ t && /* @__PURE__ */ r("span", { className: o(c.label, e && s.required), children: t }),
22
+ /* @__PURE__ */ r("textarea", { className: o(s.input, c.textarea, x && "touched"), onBlur: i, ...m, required: e, style: {
23
+ "--min-rows": n,
24
+ "--max-rows": l
25
+ }, value: a })
26
26
  ] });
27
27
  };
28
28
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":";;;;;;;GAaaA,IAAWA,CAAC;AAAA,EACvBC,OAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVC,SAAAA,IAAU;AAAA,EACVC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACA,GAAGC;AACU,MAAM;AACnB,QAAM;AAAA,IAAEC,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE;AAEnD,SACE,gBAAAK,EAAC,SAAA,EAAK,kBAAA,YACHT,UAAAA;AAAAA,IAAAA,KAAS,gBAAAU,EAAC,QAAA,EAAK,WAAWC,EAAGC,EAAOZ,OAAOG,KAAYU,EAAYV,QAAQ,GAAIH,UAAAA,EAAAA,CAAM;AAAA,IACtF,gBAAAU,EAAC,YAAA,EACC,WAAWC,EAAGE,EAAYC,OAAOF,EAAOG,UAAUT,KAAW,SAAS,GACtE,QAAAC,MACIF,GACJ,OACE;AAAA,MACE,cAAcH;AAAAA,MACd,cAAcD;AAAAA,IAAAA,GAGlB,OAAAG,EAAA,CACD;AAAA,EAAA,GACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/textarea/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport inputStyles from '../input/styles.module.css';\nimport styles from './styles.module.css';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & {\n label?: string;\n maxRows?: number;\n minRows?: number;\n};\n\nexport const Textarea = ({\n label,\n maxRows = 12,\n minRows = 3,\n required,\n value,\n ...props\n}: TextareaProps) => {\n const { touched, onBlur } = useTouched(value === '');\n\n return (\n <label>\n {label && <span className={cx(styles.label, required && inputStyles.required)}>{label}</span>}\n <textarea\n className={cx(inputStyles.input, styles.textarea, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n required={required}\n style={\n {\n '--min-rows': minRows,\n '--max-rows': maxRows,\n } as React.CSSProperties\n }\n value={value}\n ></textarea>\n </label>\n );\n};\n"],"names":["Textarea","label","maxRows","minRows","required","value","props","touched","onBlur","useTouched","jsxs","jsx","cx","styles","inputStyles","input","textarea"],"mappings":";;;;;;;GAaaA,IAAWA,CAAC;AAAA,EACvBC,OAAAA;AAAAA,EACAC,SAAAA,IAAU;AAAA,EACVC,SAAAA,IAAU;AAAA,EACVC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACA,GAAGC;AACU,MAAM;AACnB,QAAM;AAAA,IAAEC,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE;AAEnD,SACE,gBAAAK,EAAC,SAAA,EAAK,kBAAA,YACHT,UAAAA;AAAAA,IAAAA,KAAS,gBAAAU,EAAC,QAAA,EAAK,WAAWC,EAAGC,EAAOZ,OAAOG,KAAYU,EAAYV,QAAQ,GAAIH,UAAAA,EAAAA,CAAM;AAAA,IACtF,gBAAAU,EAAC,YAAA,EACC,WAAWC,EAAGE,EAAYC,OAAOF,EAAOG,UAAUT,KAAW,SAAS,GACtE,QAAAC,MACIF,GACJ,UAAAF,GACA,OACE;AAAA,MACE,cAAcD;AAAAA,MACd,cAAcD;AAAAA,IAAAA,GAGlB,OAAAG,EAAA,CACD;AAAA,EAAA,GACH;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const M={bold:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",buildings:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z",card:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z",check:"m4.5 12.75 6 6 9-13.5",chevron:"m19.5 8.25-7.5 7.5-7.5-7.5",clipboard:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75",document:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z",error:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z",gear:"M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1",goTo:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",home:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25",image:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",info:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z",italic:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",link:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",list:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",menu:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5",mobile:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3",pencil:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",people:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",phone:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z",plane:{filled:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z",outline:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"},plus:"M12 4.5v15m7.5-7.5h-15",search:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",success:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",trash:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0",updown:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9",upload:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",user:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",x:"M6 18 18 6M6 6l12 12"};function l(a,h){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${h?"currentColor":"none"}' viewBox='0 0 24 24' stroke-width='2' stroke='${h?"none":"currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`}const o=(a,h=!1)=>{const m=M[a],c=typeof m=="string"?m:h?m.filled:m.outline,v=h&&typeof m=="object"&&!!m.filled;return l(c,v)};exports.iconPaths=M;exports.iconSVG=o;
2
- //# sourceMappingURL=icons-Bo1YqbZg.cjs.map
1
+ "use strict";const M={bold:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",buildings:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z",card:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z",check:"m4.5 12.75 6 6 9-13.5",chevron:"m19.5 8.25-7.5 7.5-7.5-7.5",clipboard:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75",document:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z",error:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z",gear:"M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1",goTo:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",home:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25",image:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",info:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z",italic:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",link:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",list:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",megaphone:{filled:"M16.881 4.345A23.112 23.112 0 0 1 8.25 6H7.5a5.25 5.25 0 0 0-.88 10.427 21.593 21.593 0 0 0 1.378 3.94c.464 1.004 1.674 1.32 2.582.796l.657-.379c.88-.508 1.165-1.593.772-2.468a17.116 17.116 0 0 1-.628-1.607c1.918.258 3.76.75 5.5 1.446A21.727 21.727 0 0 0 18 11.25c0-2.414-.393-4.735-1.119-6.905ZM18.26 3.74a23.22 23.22 0 0 1 1.24 7.51 23.22 23.22 0 0 1-1.41 7.992.75.75 0 1 0 1.409.516 24.555 24.555 0 0 0 1.415-6.43 2.992 2.992 0 0 0 .836-2.078c0-.807-.319-1.54-.836-2.078a24.65 24.65 0 0 0-1.415-6.43.75.75 0 1 0-1.409.516c.059.16.116.321.17.483Z",outline:""},menu:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5",mobile:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3",pencil:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",people:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",phone:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z",plane:{filled:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z",outline:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"},plus:"M12 4.5v15m7.5-7.5h-15",search:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",success:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",trash:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0",updown:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9",upload:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",user:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",x:"M6 18 18 6M6 6l12 12"};function l(a,h){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${h?"currentColor":"none"}' viewBox='0 0 24 24' stroke-width='2' stroke='${h?"none":"currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`}const e=(a,h=!1)=>{const m=M[a],c=typeof m=="string"?m:h?m.filled:m.outline,v=h&&typeof m=="object"&&!!m.filled;return l(c,v)};exports.iconPaths=M;exports.iconSVG=e;
2
+ //# sourceMappingURL=icons-CWtPtYZj.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-CWtPtYZj.cjs","sources":["../src/components/icon/icons.ts"],"sourcesContent":["export type IconName = keyof typeof iconPaths;\n\nexport const iconPaths = {\n bold: 'M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z',\n buildings:\n 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z',\n card: 'M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z',\n check: 'm4.5 12.75 6 6 9-13.5',\n chevron: 'm19.5 8.25-7.5 7.5-7.5-7.5',\n clipboard:\n 'M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75',\n document:\n 'M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z',\n error:\n 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z',\n gear: 'M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1',\n goTo: 'M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25',\n home: 'm2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25',\n image:\n 'm2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n info: 'm11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z',\n italic: 'M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803',\n link: 'M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244',\n list: 'M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n megaphone: {\n filled:\n 'M16.881 4.345A23.112 23.112 0 0 1 8.25 6H7.5a5.25 5.25 0 0 0-.88 10.427 21.593 21.593 0 0 0 1.378 3.94c.464 1.004 1.674 1.32 2.582.796l.657-.379c.88-.508 1.165-1.593.772-2.468a17.116 17.116 0 0 1-.628-1.607c1.918.258 3.76.75 5.5 1.446A21.727 21.727 0 0 0 18 11.25c0-2.414-.393-4.735-1.119-6.905ZM18.26 3.74a23.22 23.22 0 0 1 1.24 7.51 23.22 23.22 0 0 1-1.41 7.992.75.75 0 1 0 1.409.516 24.555 24.555 0 0 0 1.415-6.43 2.992 2.992 0 0 0 .836-2.078c0-.807-.319-1.54-.836-2.078a24.65 24.65 0 0 0-1.415-6.43.75.75 0 1 0-1.409.516c.059.16.116.321.17.483Z',\n outline: '',\n },\n menu: 'M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5',\n mobile:\n 'M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3',\n pencil:\n 'M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z',\n people:\n 'M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z',\n phone:\n 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',\n plane: {\n filled:\n 'M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z',\n outline:\n 'M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5',\n },\n plus: 'M12 4.5v15m7.5-7.5h-15',\n search: 'm21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z',\n success: 'M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z',\n trash:\n 'm14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0',\n updown: 'M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9',\n upload:\n 'M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5',\n user: 'M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z',\n x: 'M6 18 18 6M6 6l12 12',\n};\n\nexport function embedSVG(iconPath: string, fill?: boolean): string {\n return `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${fill ? 'currentColor' : 'none'}' viewBox='0 0 24 24' stroke-width='2' stroke='${fill ? 'none' : 'currentColor'}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${iconPath}' /%3E%3C/svg%3E%0A\")`;\n}\n\nexport const iconSVG = (name: IconName, fill = false) => {\n const icon = iconPaths[name];\n const path = typeof icon === 'string' ? icon : fill ? icon.filled : icon.outline;\n const hasFilled = fill && typeof icon === 'object' && !!icon.filled;\n\n return embedSVG(path, hasFilled);\n};\n"],"names":["iconPaths","bold","buildings","card","check","chevron","clipboard","document","error","gear","goTo","home","image","info","italic","link","list","megaphone","filled","outline","menu","mobile","pencil","people","phone","plane","plus","search","success","trash","updown","upload","user","x","embedSVG","iconPath","fill","iconSVG","name","icon","path","hasFilled"],"mappings":"aAEO,MAAMA,EAAY,CACvBC,KAAM,uUACNC,UACE,6SACFC,KAAM,+TACNC,MAAO,wBACPC,QAAS,6BACTC,UACE,iiBACFC,SACE,oQACFC,MACE,mLACFC,KAAM,2eACNC,KAAM,uIACNC,KAAM,6OACNC,MACE,0TACFC,KAAM,2JACNC,OAAQ,8EACRC,KAAM,4KACNC,KAAM,wRACNC,UAAW,CACTC,OACE,uiBACFC,QAAS,EAAA,EAEXC,KAAM,+CACNC,OACE,uKACFC,OACE,2PACFC,OACE,4XACFC,MACE,oWACFC,MAAO,CACLP,OACE,uMACFC,QACE,mGAAA,EAEJO,KAAM,yBACNC,OAAQ,gFACRC,QAAS,iEACTC,MACE,gaACFC,OAAQ,oDACRC,OACE,6GACFC,KAAM,0JACNC,EAAG,sBACL,EAEO,SAASC,EAASC,EAAkBC,EAAwB,CACjE,MAAO,2EAA2EA,EAAO,eAAiB,MAAM,kDAAkDA,EAAO,OAAS,cAAc,iEAAiED,CAAQ,uBAC3Q,CAEO,MAAME,EAAUA,CAACC,EAAgBF,EAAO,KAAU,CACvD,MAAMG,EAAOvC,EAAUsC,CAAI,EACrBE,EAAO,OAAOD,GAAS,SAAWA,EAAOH,EAAOG,EAAKrB,OAASqB,EAAKpB,QACnEsB,EAAYL,GAAQ,OAAOG,GAAS,UAAY,CAAC,CAACA,EAAKrB,OAE7D,OAAOgB,EAASM,EAAMC,CAAS,CACjC"}
@@ -15,6 +15,10 @@ const v = {
15
15
  italic: "M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",
16
16
  link: "M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",
17
17
  list: "M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",
18
+ megaphone: {
19
+ filled: "M16.881 4.345A23.112 23.112 0 0 1 8.25 6H7.5a5.25 5.25 0 0 0-.88 10.427 21.593 21.593 0 0 0 1.378 3.94c.464 1.004 1.674 1.32 2.582.796l.657-.379c.88-.508 1.165-1.593.772-2.468a17.116 17.116 0 0 1-.628-1.607c1.918.258 3.76.75 5.5 1.446A21.727 21.727 0 0 0 18 11.25c0-2.414-.393-4.735-1.119-6.905ZM18.26 3.74a23.22 23.22 0 0 1 1.24 7.51 23.22 23.22 0 0 1-1.41 7.992.75.75 0 1 0 1.409.516 24.555 24.555 0 0 0 1.415-6.43 2.992 2.992 0 0 0 .836-2.078c0-.807-.319-1.54-.836-2.078a24.65 24.65 0 0 0-1.415-6.43.75.75 0 1 0-1.409.516c.059.16.116.321.17.483Z",
20
+ outline: ""
21
+ },
18
22
  menu: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5",
19
23
  mobile: "M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3",
20
24
  pencil: "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",
@@ -33,15 +37,15 @@ const v = {
33
37
  user: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",
34
38
  x: "M6 18 18 6M6 6l12 12"
35
39
  };
36
- function l(a, h) {
37
- return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${h ? "currentColor" : "none"}' viewBox='0 0 24 24' stroke-width='2' stroke='${h ? "none" : "currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`;
40
+ function l(h, a) {
41
+ return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${a ? "currentColor" : "none"}' viewBox='0 0 24 24' stroke-width='2' stroke='${a ? "none" : "currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${h}' /%3E%3C/svg%3E%0A")`;
38
42
  }
39
- const e = (a, h = !1) => {
40
- const m = v[a], M = typeof m == "string" ? m : h ? m.filled : m.outline, c = h && typeof m == "object" && !!m.filled;
43
+ const e = (h, a = !1) => {
44
+ const m = v[h], M = typeof m == "string" ? m : a ? m.filled : m.outline, c = a && typeof m == "object" && !!m.filled;
41
45
  return l(M, c);
42
46
  };
43
47
  export {
44
48
  v as a,
45
49
  e as i
46
50
  };
47
- //# sourceMappingURL=icons-CqrxHwOe.js.map
51
+ //# sourceMappingURL=icons-DeUtqBx_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-DeUtqBx_.js","sources":["../src/components/icon/icons.ts"],"sourcesContent":["export type IconName = keyof typeof iconPaths;\n\nexport const iconPaths = {\n bold: 'M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z',\n buildings:\n 'M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z',\n card: 'M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z',\n check: 'm4.5 12.75 6 6 9-13.5',\n chevron: 'm19.5 8.25-7.5 7.5-7.5-7.5',\n clipboard:\n 'M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75',\n document:\n 'M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z',\n error:\n 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z',\n gear: 'M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1',\n goTo: 'M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25',\n home: 'm2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25',\n image:\n 'm2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n info: 'm11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z',\n italic: 'M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803',\n link: 'M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244',\n list: 'M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z',\n megaphone: {\n filled:\n 'M16.881 4.345A23.112 23.112 0 0 1 8.25 6H7.5a5.25 5.25 0 0 0-.88 10.427 21.593 21.593 0 0 0 1.378 3.94c.464 1.004 1.674 1.32 2.582.796l.657-.379c.88-.508 1.165-1.593.772-2.468a17.116 17.116 0 0 1-.628-1.607c1.918.258 3.76.75 5.5 1.446A21.727 21.727 0 0 0 18 11.25c0-2.414-.393-4.735-1.119-6.905ZM18.26 3.74a23.22 23.22 0 0 1 1.24 7.51 23.22 23.22 0 0 1-1.41 7.992.75.75 0 1 0 1.409.516 24.555 24.555 0 0 0 1.415-6.43 2.992 2.992 0 0 0 .836-2.078c0-.807-.319-1.54-.836-2.078a24.65 24.65 0 0 0-1.415-6.43.75.75 0 1 0-1.409.516c.059.16.116.321.17.483Z',\n outline: '',\n },\n menu: 'M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5',\n mobile:\n 'M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3',\n pencil:\n 'M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z',\n people:\n 'M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z',\n phone:\n 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',\n plane: {\n filled:\n 'M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z',\n outline:\n 'M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5',\n },\n plus: 'M12 4.5v15m7.5-7.5h-15',\n search: 'm21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z',\n success: 'M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z',\n trash:\n 'm14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0',\n updown: 'M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9',\n upload:\n 'M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5',\n user: 'M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z',\n x: 'M6 18 18 6M6 6l12 12',\n};\n\nexport function embedSVG(iconPath: string, fill?: boolean): string {\n return `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${fill ? 'currentColor' : 'none'}' viewBox='0 0 24 24' stroke-width='2' stroke='${fill ? 'none' : 'currentColor'}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${iconPath}' /%3E%3C/svg%3E%0A\")`;\n}\n\nexport const iconSVG = (name: IconName, fill = false) => {\n const icon = iconPaths[name];\n const path = typeof icon === 'string' ? icon : fill ? icon.filled : icon.outline;\n const hasFilled = fill && typeof icon === 'object' && !!icon.filled;\n\n return embedSVG(path, hasFilled);\n};\n"],"names":["iconPaths","bold","buildings","card","check","chevron","clipboard","document","error","gear","goTo","home","image","info","italic","link","list","megaphone","filled","outline","menu","mobile","pencil","people","phone","plane","plus","search","success","trash","updown","upload","user","x","embedSVG","iconPath","fill","iconSVG","name","icon","path","hasFilled"],"mappings":"AAEO,MAAMA,IAAY;AAAA,EACvBC,MAAM;AAAA,EACNC,WACE;AAAA,EACFC,MAAM;AAAA,EACNC,OAAO;AAAA,EACPC,SAAS;AAAA,EACTC,WACE;AAAA,EACFC,UACE;AAAA,EACFC,OACE;AAAA,EACFC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,OACE;AAAA,EACFC,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,MAAM;AAAA,EACNC,MAAM;AAAA,EACNC,WAAW;AAAA,IACTC,QACE;AAAA,IACFC,SAAS;AAAA,EAAA;AAAA,EAEXC,MAAM;AAAA,EACNC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,OACE;AAAA,EACFC,OAAO;AAAA,IACLP,QACE;AAAA,IACFC,SACE;AAAA,EAAA;AAAA,EAEJO,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,SAAS;AAAA,EACTC,OACE;AAAA,EACFC,QAAQ;AAAA,EACRC,QACE;AAAA,EACFC,MAAM;AAAA,EACNC,GAAG;AACL;AAEO,SAASC,EAASC,GAAkBC,GAAwB;AACjE,SAAO,2EAA2EA,IAAO,iBAAiB,MAAM,kDAAkDA,IAAO,SAAS,cAAc,iEAAiED,CAAQ;AAC3Q;AAEO,MAAME,IAAUA,CAACC,GAAgBF,IAAO,OAAU;AACvD,QAAMG,IAAOvC,EAAUsC,CAAI,GACrBE,IAAO,OAAOD,KAAS,WAAWA,IAAOH,IAAOG,EAAKrB,SAASqB,EAAKpB,SACnEsB,IAAYL,KAAQ,OAAOG,KAAS,YAAY,CAAC,CAACA,EAAKrB;AAE7D,SAAOgB,EAASM,GAAMC,CAAS;AACjC;"}