@solibo/solibo-ui 0.3.37 → 0.3.39

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.
Files changed (115) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index10.css +1 -1
  3. package/dist/assets/index11.css +1 -1
  4. package/dist/assets/index12.css +1 -1
  5. package/dist/assets/index13.css +1 -1
  6. package/dist/assets/index14.css +1 -1
  7. package/dist/assets/index15.css +1 -1
  8. package/dist/assets/index16.css +1 -1
  9. package/dist/assets/index17.css +1 -1
  10. package/dist/assets/index18.css +1 -1
  11. package/dist/assets/index19.css +1 -1
  12. package/dist/assets/index20.css +1 -1
  13. package/dist/assets/index21.css +1 -1
  14. package/dist/assets/index22.css +1 -1
  15. package/dist/assets/index33.css +1 -1
  16. package/dist/assets/index4.css +1 -1
  17. package/dist/assets/index41.css +1 -1
  18. package/dist/assets/index42.css +1 -1
  19. package/dist/assets/index43.css +1 -1
  20. package/dist/assets/index44.css +1 -0
  21. package/dist/assets/index5.css +1 -1
  22. package/dist/assets/index6.css +1 -1
  23. package/dist/assets/index7.css +0 -1
  24. package/dist/assets/index8.css +1 -0
  25. package/dist/assets/index9.css +1 -1
  26. package/dist/assets/styles.css +1 -1
  27. package/dist/components/_avatar/index.cjs +1 -1
  28. package/dist/components/_avatar/index.js +1 -1
  29. package/dist/components/_card/index.cjs +1 -1
  30. package/dist/components/_card/index.js +1 -1
  31. package/dist/components/_collapsible/index.cjs +1 -1
  32. package/dist/components/_collapsible/index.js +1 -1
  33. package/dist/components/_croppable/index.cjs +1 -1
  34. package/dist/components/_croppable/index.js +1 -1
  35. package/dist/components/_dropdown/index.cjs +2 -0
  36. package/dist/components/_dropdown/index.cjs.map +1 -0
  37. package/dist/components/_dropdown/index.js +175 -0
  38. package/dist/components/_dropdown/index.js.map +1 -0
  39. package/dist/components/app-link/index.cjs +1 -1
  40. package/dist/components/app-link/index.js +1 -1
  41. package/dist/components/badge/index.cjs +1 -1
  42. package/dist/components/badge/index.js +1 -1
  43. package/dist/components/banner/index.cjs +1 -1
  44. package/dist/components/banner/index.js +1 -1
  45. package/dist/components/button/index.cjs +1 -1
  46. package/dist/components/button/index.cjs.map +1 -1
  47. package/dist/components/button/index.js +18 -17
  48. package/dist/components/button/index.js.map +1 -1
  49. package/dist/components/checkbox/index.cjs +1 -1
  50. package/dist/components/checkbox/index.js +7 -7
  51. package/dist/components/controls/index.cjs +1 -1
  52. package/dist/components/controls/index.js +1 -1
  53. package/dist/components/dialog/index.cjs +1 -1
  54. package/dist/components/dialog/index.js +1 -1
  55. package/dist/components/file/index.cjs +1 -1
  56. package/dist/components/file/index.js +1 -1
  57. package/dist/components/footer/index.cjs +1 -1
  58. package/dist/components/footer/index.js +1 -1
  59. package/dist/components/graph/index.cjs +1 -1
  60. package/dist/components/graph/index.js +1 -1
  61. package/dist/components/group/index.cjs +1 -1
  62. package/dist/components/group/index.js +1 -1
  63. package/dist/components/header/index.cjs +1 -1
  64. package/dist/components/header/index.js +7 -7
  65. package/dist/components/icon/index.cjs +1 -1
  66. package/dist/components/icon/index.js +1 -1
  67. package/dist/components/image/index.cjs +1 -1
  68. package/dist/components/image/index.js +1 -1
  69. package/dist/components/input/index.cjs +1 -1
  70. package/dist/components/input/index.cjs.map +1 -1
  71. package/dist/components/input/index.js +39 -35
  72. package/dist/components/input/index.js.map +1 -1
  73. package/dist/components/layout/index.cjs +1 -1
  74. package/dist/components/layout/index.cjs.map +1 -1
  75. package/dist/components/layout/index.js +5 -5
  76. package/dist/components/layout/index.js.map +1 -1
  77. package/dist/components/loading/index.cjs +1 -1
  78. package/dist/components/loading/index.js +1 -1
  79. package/dist/components/nav/index.cjs +1 -1
  80. package/dist/components/nav/index.cjs.map +1 -1
  81. package/dist/components/nav/index.js +18 -20
  82. package/dist/components/nav/index.js.map +1 -1
  83. package/dist/components/select/index.cjs +1 -1
  84. package/dist/components/select/index.cjs.map +1 -1
  85. package/dist/components/select/index.js +5 -26
  86. package/dist/components/select/index.js.map +1 -1
  87. package/dist/components/textarea/index.cjs +1 -1
  88. package/dist/components/textarea/index.js +2 -2
  89. package/dist/components/toast/index.cjs +1 -1
  90. package/dist/components/toast/index.js +1 -1
  91. package/dist/components/toolbar/index.cjs +1 -1
  92. package/dist/components/toolbar/index.js +1 -1
  93. package/dist/{icons-DeUtqBx_.js → icons-BqQRUUWn.js} +12 -9
  94. package/dist/icons-BqQRUUWn.js.map +1 -0
  95. package/dist/icons-CMoejLkL.cjs +2 -0
  96. package/dist/{icons-DeUtqBx_.js.map → icons-CMoejLkL.cjs.map} +1 -1
  97. package/dist/index-HNd9cEc6.cjs +2 -0
  98. package/dist/index-HNd9cEc6.cjs.map +1 -0
  99. package/dist/index-xRmXVWAN.js +34 -0
  100. package/dist/index-xRmXVWAN.js.map +1 -0
  101. package/dist/index.cjs +1 -1
  102. package/dist/index.d.ts +36 -12
  103. package/dist/index.js +76 -74
  104. package/dist/index.js.map +1 -1
  105. package/dist/styles.module-C_Z8FrR5.js +9 -0
  106. package/dist/styles.module-C_Z8FrR5.js.map +1 -0
  107. package/dist/styles.module-CwroCNAt.cjs +2 -0
  108. package/dist/styles.module-CwroCNAt.cjs.map +1 -0
  109. package/package.json +1 -1
  110. package/dist/icons-CWtPtYZj.cjs +0 -2
  111. package/dist/icons-CWtPtYZj.cjs.map +0 -1
  112. package/dist/styles.module-BuPl_9yN.cjs +0 -2
  113. package/dist/styles.module-BuPl_9yN.cjs.map +0 -1
  114. package/dist/styles.module-ZrsD4xw8.js +0 -10
  115. package/dist/styles.module-ZrsD4xw8.js.map +0 -1
@@ -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-DeUtqBx_.js";
3
+ import { i as m, a as _ } from "../../icons-BqQRUUWn.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/index6.css');const d=require("react/jsx-runtime"),c=require("react"),o="_image_nnuov_1",y={image:o};function S({fadeDurationMs:n=250,showOnError:r=!0,onLoad:a,onError:u,style:l,...t}){const i=c.useRef(null),[m,s]=c.useState(!1);c.useEffect(()=>{s(!1)},[t.src,t.srcSet]),c.useEffect(()=>{const e=i.current;e&&e.complete&&e.naturalWidth>0&&s(!0)},[t.src,t.srcSet]);const f=e=>{s(!0),a==null||a(e)},g=e=>{r&&s(!0),u==null||u(e)};return d.jsx("img",{...t,className:y.image,onLoad:f,onError:g,ref:i,style:{...l,opacity:m?1:0,"--duration-override":`${n}ms`},"data-component":"image"})}exports.Image=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const d=require("react/jsx-runtime"),c=require("react"),o="_image_nnuov_1",y={image:o};function S({fadeDurationMs:n=250,showOnError:r=!0,onLoad:a,onError:u,style:l,...t}){const i=c.useRef(null),[m,s]=c.useState(!1);c.useEffect(()=>{s(!1)},[t.src,t.srcSet]),c.useEffect(()=>{const e=i.current;e&&e.complete&&e.naturalWidth>0&&s(!0)},[t.src,t.srcSet]);const f=e=>{s(!0),a==null||a(e)},g=e=>{r&&s(!0),u==null||u(e)};return d.jsx("img",{...t,className:y.image,onLoad:f,onError:g,ref:i,style:{...l,opacity:m?1:0,"--duration-override":`${n}ms`},"data-component":"image"})}exports.Image=S;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as o, useState as h, useEffect as m } from "react";
3
- import '../../assets/index6.css';const y = "_image_nnuov_1", S = {
3
+ import '../../assets/index5.css';const y = "_image_nnuov_1", S = {
4
4
  image: y
5
5
  };
6
6
  function x({
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),a=require("react"),N=require("../../utils-D_TJ8wDc.cjs"),s=require("../../styles.module-BuPl_9yN.cjs"),C=a.forwardRef(({className:S,defaultCountryCode:r="+47",disabled:i=!1,label:h,placeholder:m,type:n="text",...e},g)=>{const[c,x]=a.useState(""),[l,d]=a.useState(""),{onChange:p,value:v,...y}=e,{touched:j,onBlur:f}=N.useTouched(v==="");a.useEffect(()=>{if(typeof e.onChange=="function"&&n==="tel"){const u={name:e.name,value:l?(c||r).split(" ").join("")+l.split(" ").join(""):void 0};e.onChange({target:u,currentTarget:u})}},[c,l]),a.useEffect(()=>{n==="tel"&&!e.value&&(d(""),x(""))},[e.value,n]);const q=t.jsxs(t.Fragment,{children:[t.jsx("input",{disabled:i,hidden:!0,onChange:p,pattern:void 0,placeholder:m,ref:g,type:n,value:v}),t.jsx("input",{type:"text",className:s.inputStyles.input,disabled:i,maxLength:5,onChange:u=>x(u.target.value),placeholder:r,value:c}),t.jsx("input",{type:"tel",className:o.t(s.inputStyles.input,j&&"touched"),disabled:i,maxLength:14,name:void 0,onChange:u=>d(u.target.value),onBlur:f,pattern:e.pattern,value:l,...y})]});return t.jsxs("label",{className:s.inputStyles.container,children:[h&&t.jsx("span",{className:o.t(s.inputStyles.label,e.required&&s.inputStyles.required),children:h}),n==="tel"?q:t.jsx("input",{ref:g,className:o.t(s.inputStyles.input,S,j&&"touched"),disabled:i,onBlur:f,placeholder:m,type:n,...e})]})});exports.Input=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),s=require("react"),I=require("../../icons-CMoejLkL.cjs"),P=require("../../utils-D_TJ8wDc.cjs"),a=require("../../styles.module-CwroCNAt.cjs"),R=s.forwardRef(({className:y,defaultCountryCode:d="+47",disabled:i=!1,icon:o,label:h,placeholder:m,type:t="text",...e},v)=>{const[l,g]=s.useState(""),[r,x]=s.useState(""),{onChange:N,value:j,...C}=e,{touched:f,onBlur:S}=P.useTouched(j===""),q=o&&t!=="radio"&&t!=="datetime-local"?{"--icon-svg":I.iconSVG(o,!0)}:void 0;s.useEffect(()=>{if(typeof e.onChange=="function"&&t==="tel"){const u={name:e.name,value:r?(l||d).split(" ").join("")+r.split(" ").join(""):void 0};e.onChange({target:u,currentTarget:u})}},[l,r]),s.useEffect(()=>{t==="tel"&&!e.value&&(x(""),g(""))},[e.value,t]);const p=n.jsxs(n.Fragment,{children:[n.jsx("input",{disabled:i,hidden:!0,onChange:N,pattern:void 0,placeholder:m,ref:v,type:t,value:j}),n.jsx("input",{type:"text",className:a.inputStyles.input,disabled:i,maxLength:5,onChange:u=>g(u.target.value),placeholder:d,value:l}),n.jsx("input",{type:"tel",className:c.t(a.inputStyles.input,f&&"touched"),"data-icon":o?"true":void 0,disabled:i,maxLength:14,name:void 0,onChange:u=>x(u.target.value),onBlur:S,pattern:e.pattern,style:q,value:r,...C})]});return n.jsxs("label",{className:a.inputStyles.label,children:[h&&n.jsx("span",{className:c.t(e.required&&a.inputStyles.required),children:h}),t==="tel"?p:n.jsx("input",{ref:v,className:c.t(a.inputStyles.input,y,f&&"touched"),"data-icon":o?"true":void 0,disabled:i,onBlur:S,placeholder:m,style:q,type:t,...e})]})});exports.Input=R;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { forwardRef, useEffect, useState } from 'react';\n\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n label?: string;\n placeholder?: string;\n type?: 'datetime-local' | 'email' | 'number' | 'password' | 'radio' | 'search' | 'tel' | 'text';\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n defaultCountryCode = '+47',\n disabled = false,\n label,\n placeholder,\n type = 'text',\n ...props\n },\n ref\n ) => {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.container}>\n {label && (\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n )}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n }\n);\n"],"names":["Input","forwardRef","className","defaultCountryCode","disabled","label","placeholder","type","props","ref","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","useEffect","target","name","split","join","undefined","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","container","required"],"mappings":"oQAeaA,EAAQC,EAAAA,WACnB,CACE,CACEC,UAAAA,EACAC,mBAAAA,EAAqB,MACrBC,SAAAA,EAAW,GACXC,MAAAA,EACAC,YAAAA,EACAC,KAAAA,EAAO,OACP,GAAGC,CACL,EACAC,IACG,CACH,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAAA,SAAS,EAAE,EAC3C,CAACC,EAAaC,CAAc,EAAIF,EAAAA,SAAS,EAAE,EAC3C,CAAEG,SAAAA,EAAUC,MAAAA,EAAO,GAAGC,CAAAA,EAAcT,EACpC,CAAEU,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAEnDK,EAAAA,UAAU,IAAM,CACd,GAAI,OAAOb,EAAMO,UAAa,YAAcR,IAAS,MAAO,CAC1D,MAAMe,EAAS,CACbC,KAAMf,EAAMe,KACZP,MAAOH,GACFH,GAAeP,GAAoBqB,MAAM,GAAG,EAAEC,KAAK,EAAE,EACtDZ,EAAYW,MAAM,GAAG,EAAEC,KAAK,EAAE,EAC9BC,MAAAA,EAGLlB,EAAMO,SAAiB,CAAEO,OAAAA,EAAQK,cAAeL,CAAAA,CAAQ,CAC3D,CAEF,EAAG,CAACZ,EAAaG,CAAW,CAAC,EAE7BQ,EAAAA,UAAU,IAAM,CACVd,IAAS,OAAS,CAACC,EAAMQ,QAC3BF,EAAe,EAAE,EACjBH,EAAe,EAAE,EAErB,EAAG,CAACH,EAAMQ,MAAOT,CAAI,CAAC,EAEtB,MAAMqB,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAC,EAAAA,IAAC,QAAA,CACC,SAAA3B,EACA,OAAM,GACN,SAAAW,EACA,QAASW,OACT,YAAApB,EACA,IAAAG,EACA,KAAAF,EACA,MAAAS,CAAA,CAAa,EAEfe,MAAC,SACC,KAAK,OACL,UAAWC,EAAAA,YAAOC,MAClB,SAAA7B,EACA,UAAW,EACX,SAAW8B,GAAMvB,EAAeuB,EAAEZ,OAAON,KAAK,EAC9C,YAAab,EACb,MAAOO,EAAY,EAErBqB,EAAAA,IAAC,QAAA,CACC,KAAK,MACL,UAAWI,EAAAA,EAAGH,EAAAA,YAAOC,MAAOf,GAAW,SAAS,EAChD,SAAAd,EACA,UAAW,GACX,KAAMsB,OACN,SAAWQ,GAAMpB,EAAeoB,EAAEZ,OAAON,KAAK,EAC9C,OAAAG,EACA,QAASX,EAAM4B,QACf,MAAOvB,EACP,GAAII,CAAAA,CAAU,CAAA,EAElB,EAGF,OACEY,EAAAA,KAAC,QAAA,CAAM,UAAWG,EAAAA,YAAOK,UACtBhC,SAAAA,CAAAA,GACC0B,EAAAA,IAAC,OAAA,CAAK,UAAWI,EAAAA,EAAGH,EAAAA,YAAO3B,MAAOG,EAAM8B,UAAYN,EAAAA,YAAOM,QAAQ,EAAIjC,SAAAA,CAAAA,CAAM,EAE9EE,IAAS,MACRqB,QAEC,QAAA,CACC,IAAAnB,EACA,UAAW0B,EAAAA,EAAGH,EAAAA,YAAOC,MAAO/B,EAAWgB,GAAW,SAAS,EAC3D,SAAAd,EACA,OAAAe,EACA,YAAAb,EACA,KAAAC,EACA,GAAIC,CAAAA,CAAM,CAAA,EAGhB,CAEJ,CACF"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { forwardRef, useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type?: 'datetime-local' | 'email' | 'number' | 'password' | 'radio' | 'search' | 'tel' | 'text';\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n defaultCountryCode = '+47',\n disabled = false,\n icon,\n label,\n placeholder,\n type = 'text',\n ...props\n },\n ref\n ) => {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars =\n icon && type !== 'radio' && type !== 'datetime-local'\n ? {\n '--icon-svg': iconSVG(icon, true),\n }\n : undefined;\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n style={withVars}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.label}>\n {label && <span className={cx(props.required && styles.required)}>{label}</span>}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n style={withVars}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n }\n);\n"],"names":["Input","forwardRef","className","defaultCountryCode","disabled","icon","label","placeholder","type","props","ref","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","withVars","iconSVG","undefined","useEffect","target","name","split","join","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","required"],"mappings":"0SAkBaA,EAAQC,EAAAA,WACnB,CACE,CACEC,UAAAA,EACAC,mBAAAA,EAAqB,MACrBC,SAAAA,EAAW,GACXC,KAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,KAAAA,EAAO,OACP,GAAGC,CACL,EACAC,IACG,CACH,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAAA,SAAS,EAAE,EAC3C,CAACC,EAAaC,CAAc,EAAIF,EAAAA,SAAS,EAAE,EAC3C,CAAEG,SAAAA,EAAUC,MAAAA,EAAO,GAAGC,CAAAA,EAAcT,EACpC,CAAEU,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,EAAAA,WAAWJ,IAAU,EAAE,EAQ7CK,EACJjB,GAAQG,IAAS,SAAWA,IAAS,iBACjC,CACE,aAAce,EAAAA,QAAQlB,EAAM,EAAI,CAAA,EAElCmB,OAENC,EAAAA,UAAU,IAAM,CACd,GAAI,OAAOhB,EAAMO,UAAa,YAAcR,IAAS,MAAO,CAC1D,MAAMkB,EAAS,CACbC,KAAMlB,EAAMkB,KACZV,MAAOH,GACFH,GAAeR,GAAoByB,MAAM,GAAG,EAAEC,KAAK,EAAE,EACtDf,EAAYc,MAAM,GAAG,EAAEC,KAAK,EAAE,EAC9BL,MAAAA,EAGLf,EAAMO,SAAiB,CAAEU,OAAAA,EAAQI,cAAeJ,CAAAA,CAAQ,CAC3D,CAEF,EAAG,CAACf,EAAaG,CAAW,CAAC,EAE7BW,EAAAA,UAAU,IAAM,CACVjB,IAAS,OAAS,CAACC,EAAMQ,QAC3BF,EAAe,EAAE,EACjBH,EAAe,EAAE,EAErB,EAAG,CAACH,EAAMQ,MAAOT,CAAI,CAAC,EAEtB,MAAMuB,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAC,EAAAA,IAAC,QAAA,CACC,SAAA9B,EACA,OAAM,GACN,SAAAY,EACA,QAASQ,OACT,YAAAjB,EACA,IAAAG,EACA,KAAAF,EACA,MAAAS,CAAA,CAAa,EAEfiB,MAAC,SACC,KAAK,OACL,UAAWC,EAAAA,YAAOC,MAClB,SAAAhC,EACA,UAAW,EACX,SAAWiC,GAAMzB,EAAeyB,EAAEX,OAAOT,KAAK,EAC9C,YAAad,EACb,MAAOQ,EAAY,QAEpB,QAAA,CACC,KAAK,MACL,UAAW2B,EAAAA,EAAGH,EAAAA,YAAOC,MAAOjB,GAAW,SAAS,EAChD,YAAWd,EAAO,OAASmB,OAC3B,SAAApB,EACA,UAAW,GACX,KAAMoB,OACN,SAAWa,GAAMtB,EAAesB,EAAEX,OAAOT,KAAK,EAC9C,OAAAG,EACA,QAASX,EAAM8B,QACf,MAAOjB,EACP,MAAOR,EACP,GAAII,CAAAA,CAAU,CAAA,EAElB,EAGF,OACEc,EAAAA,KAAC,QAAA,CAAM,UAAWG,EAAAA,YAAO7B,MACtBA,SAAAA,CAAAA,GAAS4B,EAAAA,IAAC,QAAK,UAAWI,EAAAA,EAAG7B,EAAM+B,UAAYL,EAAAA,YAAOK,QAAQ,EAAIlC,SAAAA,CAAAA,CAAM,EACxEE,IAAS,MACRuB,EAEAG,EAAAA,IAAC,QAAA,CACC,IAAAxB,EACA,UAAW4B,EAAAA,EAAGH,EAAAA,YAAOC,MAAOlC,EAAWiB,GAAW,SAAS,EAC3D,YAAWd,EAAO,OAASmB,OAC3B,SAAApB,EACA,OAAAgB,EACA,YAAAb,EACA,MAAOe,EACP,KAAAd,EACA,GAAIC,CAAAA,CAAM,CAAA,EAGhB,CAEJ,CACF"}
@@ -1,50 +1,54 @@
1
- import { jsxs as x, Fragment as P, jsx as o } from "react/jsx-runtime";
2
- import { t as c } from "../../classix-DG18itHa.js";
3
- import { forwardRef as S, useState as N, useEffect as C } from "react";
4
- import { u as T } from "../../utils-DXIJVVzz.js";
5
- import { i as a } from "../../styles.module-ZrsD4xw8.js";
6
- const b = S(({
7
- className: j,
8
- defaultCountryCode: l = "+47",
1
+ import { jsxs as C, Fragment as P, jsx as a } from "react/jsx-runtime";
2
+ import { t as l } from "../../classix-DG18itHa.js";
3
+ import { forwardRef as T, useState as j, useEffect as S } from "react";
4
+ import { i as V } from "../../icons-BqQRUUWn.js";
5
+ import { u as B } from "../../utils-DXIJVVzz.js";
6
+ import { i as o } from "../../styles.module-C_Z8FrR5.js";
7
+ const y = T(({
8
+ className: q,
9
+ defaultCountryCode: c = "+47",
9
10
  disabled: u = !1,
11
+ icon: r,
10
12
  label: m,
11
- placeholder: s,
12
- type: t = "text",
13
- ...e
14
- }, h) => {
15
- const [i, f] = N(""), [r, g] = N(""), {
16
- onChange: q,
17
- value: v,
13
+ placeholder: h,
14
+ type: e = "text",
15
+ ...t
16
+ }, d) => {
17
+ const [s, v] = j(""), [i, f] = j(""), {
18
+ onChange: w,
19
+ value: g,
18
20
  ...I
19
- } = e, {
20
- touched: d,
21
- onBlur: p
22
- } = T(v === "");
23
- C(() => {
24
- if (typeof e.onChange == "function" && t === "tel") {
21
+ } = t, {
22
+ touched: x,
23
+ onBlur: N
24
+ } = B(g === ""), p = r && e !== "radio" && e !== "datetime-local" ? {
25
+ "--icon-svg": V(r, !0)
26
+ } : void 0;
27
+ S(() => {
28
+ if (typeof t.onChange == "function" && e === "tel") {
25
29
  const n = {
26
- name: e.name,
27
- value: r ? (i || l).split(" ").join("") + r.split(" ").join("") : void 0
30
+ name: t.name,
31
+ value: i ? (s || c).split(" ").join("") + i.split(" ").join("") : void 0
28
32
  };
29
- e.onChange({
33
+ t.onChange({
30
34
  target: n,
31
35
  currentTarget: n
32
36
  });
33
37
  }
34
- }, [i, r]), C(() => {
35
- t === "tel" && !e.value && (g(""), f(""));
36
- }, [e.value, t]);
37
- const L = /* @__PURE__ */ x(P, { children: [
38
- /* @__PURE__ */ o("input", { disabled: u, hidden: !0, onChange: q, pattern: void 0, placeholder: s, ref: h, type: t, value: v }),
39
- /* @__PURE__ */ o("input", { type: "text", className: a.input, disabled: u, maxLength: 5, onChange: (n) => f(n.target.value), placeholder: l, value: i }),
40
- /* @__PURE__ */ o("input", { type: "tel", className: c(a.input, d && "touched"), disabled: u, maxLength: 14, name: void 0, onChange: (n) => g(n.target.value), onBlur: p, pattern: e.pattern, value: r, ...I })
38
+ }, [s, i]), S(() => {
39
+ e === "tel" && !t.value && (f(""), v(""));
40
+ }, [t.value, e]);
41
+ const L = /* @__PURE__ */ C(P, { children: [
42
+ /* @__PURE__ */ a("input", { disabled: u, hidden: !0, onChange: w, pattern: void 0, placeholder: h, ref: d, type: e, value: g }),
43
+ /* @__PURE__ */ a("input", { type: "text", className: o.input, disabled: u, maxLength: 5, onChange: (n) => v(n.target.value), placeholder: c, value: s }),
44
+ /* @__PURE__ */ a("input", { type: "tel", className: l(o.input, x && "touched"), "data-icon": r ? "true" : void 0, disabled: u, maxLength: 14, name: void 0, onChange: (n) => f(n.target.value), onBlur: N, pattern: t.pattern, style: p, value: i, ...I })
41
45
  ] });
42
- return /* @__PURE__ */ x("label", { className: a.container, children: [
43
- m && /* @__PURE__ */ o("span", { className: c(a.label, e.required && a.required), children: m }),
44
- t === "tel" ? L : /* @__PURE__ */ o("input", { ref: h, className: c(a.input, j, d && "touched"), disabled: u, onBlur: p, placeholder: s, type: t, ...e })
46
+ return /* @__PURE__ */ C("label", { className: o.label, children: [
47
+ m && /* @__PURE__ */ a("span", { className: l(t.required && o.required), children: m }),
48
+ e === "tel" ? L : /* @__PURE__ */ a("input", { ref: d, className: l(o.input, q, x && "touched"), "data-icon": r ? "true" : void 0, disabled: u, onBlur: N, placeholder: h, style: p, type: e, ...t })
45
49
  ] });
46
50
  });
47
51
  export {
48
- b as Input
52
+ y as Input
49
53
  };
50
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { forwardRef, useEffect, useState } from 'react';\n\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n label?: string;\n placeholder?: string;\n type?: 'datetime-local' | 'email' | 'number' | 'password' | 'radio' | 'search' | 'tel' | 'text';\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n defaultCountryCode = '+47',\n disabled = false,\n label,\n placeholder,\n type = 'text',\n ...props\n },\n ref\n ) => {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.container}>\n {label && (\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n )}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n }\n);\n"],"names":["Input","forwardRef","className","defaultCountryCode","disabled","label","placeholder","type","props","ref","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","useEffect","target","name","split","join","undefined","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","container","required"],"mappings":";;;;;AAeO,MAAMA,IAAQC,EACnB,CACE;AAAA,EACEC,WAAAA;AAAAA,EACAC,oBAAAA,IAAqB;AAAA,EACrBC,UAAAA,IAAW;AAAA,EACXC,OAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACP,GAAGC;AACL,GACAC,MACG;AACH,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAE,GAC3C,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C;AAAA,IAAEG,UAAAA;AAAAA,IAAUC,OAAAA;AAAAA,IAAO,GAAGC;AAAAA,EAAAA,IAAcT,GACpC;AAAA,IAAEU,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE;AAEnDK,EAAAA,EAAU,MAAM;AACd,QAAI,OAAOb,EAAMO,YAAa,cAAcR,MAAS,OAAO;AAC1D,YAAMe,IAAS;AAAA,QACbC,MAAMf,EAAMe;AAAAA,QACZP,OAAOH,KACFH,KAAeP,GAAoBqB,MAAM,GAAG,EAAEC,KAAK,EAAE,IACtDZ,EAAYW,MAAM,GAAG,EAAEC,KAAK,EAAE,IAC9BC;AAAAA,MAAAA;AAGLlB,MAAAA,EAAMO,SAAiB;AAAA,QAAEO,QAAAA;AAAAA,QAAQK,eAAeL;AAAAA,MAAAA,CAAQ;AAAA,IAC3D;AAAA,EAEF,GAAG,CAACZ,GAAaG,CAAW,CAAC,GAE7BQ,EAAU,MAAM;AACd,IAAId,MAAS,SAAS,CAACC,EAAMQ,UAC3BF,EAAe,EAAE,GACjBH,EAAe,EAAE;AAAA,EAErB,GAAG,CAACH,EAAMQ,OAAOT,CAAI,CAAC;AAEtB,QAAMqB,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAA,EACC,UAAA3B,GACA,QAAM,IACN,UAAAW,GACA,SAASW,QACT,aAAApB,GACA,KAAAG,GACA,MAAAF,GACA,OAAAS,EAAA,CAAa;AAAA,IAEf,gBAAAe,EAAC,WACC,MAAK,QACL,WAAWC,EAAOC,OAClB,UAAA7B,GACA,WAAW,GACX,UAAW8B,CAAAA,MAAMvB,EAAeuB,EAAEZ,OAAON,KAAK,GAC9C,aAAab,GACb,OAAOO,GAAY;AAAA,IAErB,gBAAAqB,EAAC,SAAA,EACC,MAAK,OACL,WAAWI,EAAGH,EAAOC,OAAOf,KAAW,SAAS,GAChD,UAAAd,GACA,WAAW,IACX,MAAMsB,QACN,UAAWQ,CAAAA,MAAMpB,EAAeoB,EAAEZ,OAAON,KAAK,GAC9C,QAAAG,GACA,SAASX,EAAM4B,SACf,OAAOvB,GACP,GAAII,EAAAA,CAAU;AAAA,EAAA,GAElB;AAGF,SACE,gBAAAY,EAAC,SAAA,EAAM,WAAWG,EAAOK,WACtBhC,UAAAA;AAAAA,IAAAA,KACC,gBAAA0B,EAAC,QAAA,EAAK,WAAWI,EAAGH,EAAO3B,OAAOG,EAAM8B,YAAYN,EAAOM,QAAQ,GAAIjC,UAAAA,EAAAA,CAAM;AAAA,IAE9EE,MAAS,QACRqB,sBAEC,SAAA,EACC,KAAAnB,GACA,WAAW0B,EAAGH,EAAOC,OAAO/B,GAAWgB,KAAW,SAAS,GAC3D,UAAAd,GACA,QAAAe,GACA,aAAAb,GACA,MAAAC,GACA,GAAIC,EAAAA,CAAM;AAAA,EAAA,GAGhB;AAEJ,CACF;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { forwardRef, useEffect, useState } from 'react';\n\nimport { IconName, iconSVG } from '@/components/icon/icons.ts';\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> & {\n defaultCountryCode?: string;\n disabled?: boolean;\n icon?: IconName;\n label?: string;\n onClick?: React.MouseEventHandler<HTMLInputElement>;\n placeholder?: string;\n type?: 'datetime-local' | 'email' | 'number' | 'password' | 'radio' | 'search' | 'tel' | 'text';\n};\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n defaultCountryCode = '+47',\n disabled = false,\n icon,\n label,\n placeholder,\n type = 'text',\n ...props\n },\n ref\n ) => {\n const [countryCode, setCountryCode] = useState('');\n const [phoneNumber, setPhoneNumber] = useState('');\n const { onChange, value, ...restProps } = props;\n const { touched, onBlur } = useTouched(value === '');\n\n type withVars =\n | (React.CSSProperties & {\n '--icon-svg'?: string;\n })\n | undefined;\n\n const withVars: withVars =\n icon && type !== 'radio' && type !== 'datetime-local'\n ? {\n '--icon-svg': iconSVG(icon, true),\n }\n : undefined;\n\n useEffect(() => {\n if (typeof props.onChange === 'function' && type === 'tel') {\n const target = {\n name: props.name,\n value: phoneNumber\n ? (countryCode || defaultCountryCode).split(' ').join('') +\n phoneNumber.split(' ').join('')\n : undefined,\n } as unknown as HTMLInputElement;\n // eslint-disable-next-line\n (props.onChange as any)({ target, currentTarget: target });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [countryCode, phoneNumber]);\n\n useEffect(() => {\n if (type === 'tel' && !props.value) {\n setPhoneNumber('');\n setCountryCode('');\n }\n }, [props.value, type]);\n\n const telephoneInput = (\n <>\n <input\n disabled={disabled}\n hidden\n onChange={onChange}\n pattern={undefined}\n placeholder={placeholder}\n ref={ref}\n type={type}\n value={value}\n />\n <input\n type='text'\n className={styles.input}\n disabled={disabled}\n maxLength={5}\n onChange={(e) => setCountryCode(e.target.value)}\n placeholder={defaultCountryCode}\n value={countryCode}\n />\n <input\n type='tel'\n className={cx(styles.input, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n maxLength={14}\n name={undefined}\n onChange={(e) => setPhoneNumber(e.target.value)}\n onBlur={onBlur}\n pattern={props.pattern}\n style={withVars}\n value={phoneNumber}\n {...restProps}\n />\n </>\n );\n\n return (\n <label className={styles.label}>\n {label && <span className={cx(props.required && styles.required)}>{label}</span>}\n {type === 'tel' ? (\n telephoneInput\n ) : (\n <input\n ref={ref}\n className={cx(styles.input, className, touched && 'touched')}\n data-icon={icon ? 'true' : undefined}\n disabled={disabled}\n onBlur={onBlur}\n placeholder={placeholder}\n style={withVars}\n type={type}\n {...props}\n />\n )}\n </label>\n );\n }\n);\n"],"names":["Input","forwardRef","className","defaultCountryCode","disabled","icon","label","placeholder","type","props","ref","countryCode","setCountryCode","useState","phoneNumber","setPhoneNumber","onChange","value","restProps","touched","onBlur","useTouched","withVars","iconSVG","undefined","useEffect","target","name","split","join","currentTarget","telephoneInput","jsxs","Fragment","jsx","styles","input","e","cx","pattern","required"],"mappings":";;;;;;AAkBO,MAAMA,IAAQC,EACnB,CACE;AAAA,EACEC,WAAAA;AAAAA,EACAC,oBAAAA,IAAqB;AAAA,EACrBC,UAAAA,IAAW;AAAA,EACXC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACP,GAAGC;AACL,GACAC,MACG;AACH,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAE,GAC3C,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C;AAAA,IAAEG,UAAAA;AAAAA,IAAUC,OAAAA;AAAAA,IAAO,GAAGC;AAAAA,EAAAA,IAAcT,GACpC;AAAA,IAAEU,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWJ,MAAU,EAAE,GAQ7CK,IACJjB,KAAQG,MAAS,WAAWA,MAAS,mBACjC;AAAA,IACE,cAAce,EAAQlB,GAAM,EAAI;AAAA,EAAA,IAElCmB;AAENC,EAAAA,EAAU,MAAM;AACd,QAAI,OAAOhB,EAAMO,YAAa,cAAcR,MAAS,OAAO;AAC1D,YAAMkB,IAAS;AAAA,QACbC,MAAMlB,EAAMkB;AAAAA,QACZV,OAAOH,KACFH,KAAeR,GAAoByB,MAAM,GAAG,EAAEC,KAAK,EAAE,IACtDf,EAAYc,MAAM,GAAG,EAAEC,KAAK,EAAE,IAC9BL;AAAAA,MAAAA;AAGLf,MAAAA,EAAMO,SAAiB;AAAA,QAAEU,QAAAA;AAAAA,QAAQI,eAAeJ;AAAAA,MAAAA,CAAQ;AAAA,IAC3D;AAAA,EAEF,GAAG,CAACf,GAAaG,CAAW,CAAC,GAE7BW,EAAU,MAAM;AACd,IAAIjB,MAAS,SAAS,CAACC,EAAMQ,UAC3BF,EAAe,EAAE,GACjBH,EAAe,EAAE;AAAA,EAErB,GAAG,CAACH,EAAMQ,OAAOT,CAAI,CAAC;AAEtB,QAAMuB,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAA,EACC,UAAA9B,GACA,QAAM,IACN,UAAAY,GACA,SAASQ,QACT,aAAAjB,GACA,KAAAG,GACA,MAAAF,GACA,OAAAS,EAAA,CAAa;AAAA,IAEf,gBAAAiB,EAAC,WACC,MAAK,QACL,WAAWC,EAAOC,OAClB,UAAAhC,GACA,WAAW,GACX,UAAWiC,CAAAA,MAAMzB,EAAeyB,EAAEX,OAAOT,KAAK,GAC9C,aAAad,GACb,OAAOQ,GAAY;AAAA,sBAEpB,SAAA,EACC,MAAK,OACL,WAAW2B,EAAGH,EAAOC,OAAOjB,KAAW,SAAS,GAChD,aAAWd,IAAO,SAASmB,QAC3B,UAAApB,GACA,WAAW,IACX,MAAMoB,QACN,UAAWa,CAAAA,MAAMtB,EAAesB,EAAEX,OAAOT,KAAK,GAC9C,QAAAG,GACA,SAASX,EAAM8B,SACf,OAAOjB,GACP,OAAOR,GACP,GAAII,EAAAA,CAAU;AAAA,EAAA,GAElB;AAGF,SACE,gBAAAc,EAAC,SAAA,EAAM,WAAWG,EAAO7B,OACtBA,UAAAA;AAAAA,IAAAA,KAAS,gBAAA4B,EAAC,UAAK,WAAWI,EAAG7B,EAAM+B,YAAYL,EAAOK,QAAQ,GAAIlC,UAAAA,EAAAA,CAAM;AAAA,IACxEE,MAAS,QACRuB,IAEA,gBAAAG,EAAC,SAAA,EACC,KAAAxB,GACA,WAAW4B,EAAGH,EAAOC,OAAOlC,GAAWiB,KAAW,SAAS,GAC3D,aAAWd,IAAO,SAASmB,QAC3B,UAAApB,GACA,QAAAgB,GACA,aAAAb,GACA,OAAOe,GACP,MAAAd,GACA,GAAIC,EAAAA,CAAM;AAAA,EAAA,GAGhB;AAEJ,CACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const n=require("react/jsx-runtime"),u=require("../../classix-5H4IWnMA.cjs"),l="_layout_pbwv9_16",r="_dashboard_pbwv9_30",c="_home_pbwv9_34",o={layout:l,dashboard:r,home:c},d=({children:t,isLoading:a=!1,feature:s,...e})=>n.jsx("main",{className:u.t(o.layout,o[s],a&&"is-loading"),...e,"data-component":"layout",children:t});exports.Layout=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const n=require("react/jsx-runtime"),u=require("../../classix-5H4IWnMA.cjs"),l="_layout_3jh9m_16",r="_dashboard_3jh9m_30",c="_home_3jh9m_34",o={layout:l,dashboard:r,home:c},m=({children:t,isLoading:a=!1,feature:s,...e})=>n.jsx("main",{className:u.t(o.layout,o[s],a&&"is-loading"),...e,"data-component":"layout",children:t});exports.Layout=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: 'dashboard' | 'home';\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":"6PAUaA,EAASA,CAAC,CAAEC,SAAAA,EAAUC,UAAAA,EAAY,GAAOC,QAAAA,EAAS,GAAGC,CAAmB,UAEhF,OAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQD,EAAOH,CAAO,EAAGD,GAAa,YAAY,EACvE,GAAIE,EAAM,iBAAA,SAETH,SAAAA,EACH"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":"6PAUaA,EAASA,CAAC,CAAEC,SAAAA,EAAUC,UAAAA,EAAY,GAAOC,QAAAA,EAAS,GAAGC,CAAmB,UAEhF,OAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQD,EAAOH,CAAO,EAAGD,GAAa,YAAY,EACvE,GAAIE,EAAM,iBAAA,SAETH,SAAAA,EACH"}
@@ -1,16 +1,16 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { t as r } from "../../classix-DG18itHa.js";
3
- import '../../assets/index5.css';const e = "_layout_pbwv9_16", l = "_dashboard_pbwv9_30", _ = "_home_pbwv9_34", o = {
3
+ import '../../assets/index4.css';const e = "_layout_3jh9m_16", h = "_dashboard_3jh9m_30", l = "_home_3jh9m_34", o = {
4
4
  layout: e,
5
- dashboard: l,
6
- home: _
7
- }, p = ({
5
+ dashboard: h,
6
+ home: l
7
+ }, c = ({
8
8
  children: a,
9
9
  isLoading: t = !1,
10
10
  feature: s,
11
11
  ...m
12
12
  }) => /* @__PURE__ */ n("main", { className: r(o.layout, o[s], t && "is-loading"), ...m, "data-component": "layout", children: a });
13
13
  export {
14
- p as Layout
14
+ c as Layout
15
15
  };
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: 'dashboard' | 'home';\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":";;;;;;GAUaA,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,WAAAA,IAAY;AAAA,EAAOC,SAAAA;AAAAA,EAAS,GAAGC;AAAmB,wBAEhF,QAAA,EACC,WAAWC,EAAGC,EAAOC,QAAQD,EAAOH,CAAO,GAAGD,KAAa,YAAY,GACvE,GAAIE,GAAM,kBAAA,UAETH,UAAAA,GACH;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type LayoutProps = {\n children: React.ReactNode;\n feature: string;\n isLoading?: boolean;\n};\n\nexport const Layout = ({ children, isLoading = false, feature, ...props }: LayoutProps) => {\n return (\n <main\n className={cx(styles.layout, styles[feature], isLoading && 'is-loading')}\n {...props}\n >\n {children}\n </main>\n );\n};\n"],"names":["Layout","children","isLoading","feature","props","cx","styles","layout"],"mappings":";;;;;;GAUaA,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,WAAAA,IAAY;AAAA,EAAOC,SAAAA;AAAAA,EAAS,GAAGC;AAAmB,wBAEhF,QAAA,EACC,WAAWC,EAAGC,EAAOC,QAAQD,EAAOH,CAAO,GAAGD,KAAa,YAAY,GACvE,GAAIE,GAAM,kBAAA,UAETH,UAAAA,GACH;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index15.css');const n=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c="_loading_1ytlq_23",d="_spin_1ytlq_1",_="_ping_1ytlq_39",r="_sticky_1ytlq_65",s={loading:c,default:"_default_1ytlq_28",spin:d,ping:_,sticky:r},g=({variant:o="default",size:t,sticky:l=!1,...a})=>{const e={"--border-size":t?t/8+"px":void 0,"--size":t?t+"px":void 0};return n.jsx("div",{className:i.t(s.loading,l&&s.sticky),"data-component":"loading",children:n.jsx("span",{className:i.t(s.loading,s[o]),style:e,...a})})};exports.Loading=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const n=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c="_loading_1ytlq_23",d="_spin_1ytlq_1",_="_ping_1ytlq_39",r="_sticky_1ytlq_65",s={loading:c,default:"_default_1ytlq_28",spin:d,ping:_,sticky:r},g=({variant:o="default",size:t,sticky:l=!1,...a})=>{const e={"--border-size":t?t/8+"px":void 0,"--size":t?t+"px":void 0};return n.jsx("div",{className:i.t(s.loading,l&&s.sticky),"data-component":"loading",children:n.jsx("span",{className:i.t(s.loading,s[o]),style:e,...a})})};exports.Loading=g;
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 s } from "../../classix-DG18itHa.js";
3
- import '../../assets/index15.css';const c = "_loading_1ytlq_23", _ = "_spin_1ytlq_1", p = "_ping_1ytlq_39", e = "_sticky_1ytlq_65", n = {
3
+ import '../../assets/index14.css';const c = "_loading_1ytlq_23", _ = "_spin_1ytlq_1", p = "_ping_1ytlq_39", e = "_sticky_1ytlq_65", n = {
4
4
  loading: c,
5
5
  default: "_default_1ytlq_28",
6
6
  spin: _,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const p=require("react/jsx-runtime"),f=require("../../classix-5H4IWnMA.cjs"),_=require("react"),v=require("../../icons-CWtPtYZj.cjs"),h="_nav_roa57_1",b="_horizontal_roa57_7",w="_tabs_roa57_17",g="_pills_roa57_38",t={nav:h,horizontal:b,tabs:w,pills:g},m={default:t.default,pills:t.pills,tabs:t.tabs},q=({animation:o,children:i,className:r,horizontal:s=!1,variant:n="default",...l})=>{const[c,a]=_.useState(!1),u={"--icon-svg":v.iconSVG("chevron")};return p.jsx("nav",{className:f.t(r,s&&t.horizontal,t.nav,m[n]),"data-animation":o,"data-open":c?"true":"false","data-orientation":s?"horizontal":"vertical",onBlurCapture:e=>{if(n!=="pills"||window.innerWidth>960)return;const d=e.relatedTarget;e.currentTarget.contains(d)||a(!1)},onClick:()=>{n!=="pills"||window.innerWidth>960||a(e=>!e)},onFocusCapture:()=>{n!=="pills"||window.innerWidth>960||a(!0)},style:u,...l,"data-component":"nav",children:i})};exports.Nav=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const p=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),f=require("react"),v=require("../../icons-CMoejLkL.cjs"),h="_nav_roa57_1",b="_horizontal_roa57_7",g="_tabs_roa57_17",m="_pills_roa57_38",t={nav:h,horizontal:b,tabs:g,pills:m},w={default:t.default,pills:t.pills,tabs:t.tabs},q=({animation:o,children:i,className:r,horizontal:e=!1,variant:a="default",...l})=>{const[c,s]=f.useState(!1),u={"--icon-svg":v.iconSVG("chevron")};return p.jsx("nav",{className:_.t(r,e&&t.horizontal,t.nav,w[a]),"data-animation":o,"data-open":c?"true":"false","data-orientation":e?"horizontal":"vertical",onBlurCapture:n=>{if(a!=="pills"||window.innerWidth>960)return;const d=n.relatedTarget;n.currentTarget.contains(d)||s(!1)},onClick:()=>{a!=="pills"||window.innerWidth>960||s(n=>!n)},style:u,...l,"data-component":"nav",children:i})};exports.Nav=q;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('chevron'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen((v) => !v);\n }}\n onFocusCapture={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen(true);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":"4UAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,KAAMF,EAAOE,IACf,EAUaC,EAAMA,CAAC,CAClBC,UAAAA,EACAC,SAAAA,EACAC,UAAAA,EACAC,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGC,CACK,IAAM,CACd,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,SAAS,CAAA,EAGjC,OACEC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGV,EAAWC,GAAcP,EAAOO,WAAYP,EAAOiB,IAAKnB,EAASU,CAAO,CAAC,EACvF,iBAAgBJ,EAChB,YAAWM,EAAO,OAAS,QAC3B,mBAAkBH,EAAa,aAAe,WAC9C,cAAgBW,GAAM,CACpB,GAAIV,IAAY,SAAWW,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCV,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTH,IAAY,SAAWW,OAAOC,WAAa,KAC/CT,EAASc,GAAM,CAACA,CAAC,CACnB,EACA,eAAgB,IAAM,CAChBjB,IAAY,SAAWW,OAAOC,WAAa,KAC/CT,EAAQ,EAAI,CACd,EACA,MAAOE,EACP,GAAIJ,EAAM,iBAAA,MAETJ,SAAAA,EACH,CAEJ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('chevron'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":"4UAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,KAAMF,EAAOE,IACf,EAUaC,EAAMA,CAAC,CAClBC,UAAAA,EACAC,SAAAA,EACAC,UAAAA,EACAC,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGC,CACK,IAAM,CACd,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,SAAS,CAAA,EAGjC,OACEC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGV,EAAWC,GAAcP,EAAOO,WAAYP,EAAOiB,IAAKnB,EAASU,CAAO,CAAC,EACvF,iBAAgBJ,EAChB,YAAWM,EAAO,OAAS,QAC3B,mBAAkBH,EAAa,aAAe,WAC9C,cAAgBW,GAAM,CACpB,GAAIV,IAAY,SAAWW,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCV,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTH,IAAY,SAAWW,OAAOC,WAAa,KAE/CT,EAASc,GAAM,CAACA,CAAC,CACnB,EACA,MAAOZ,EACP,GAAIJ,EAAM,iBAAA,MAETJ,SAAAA,EACH,CAEJ"}
@@ -1,38 +1,36 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { t as d } from "../../classix-DG18itHa.js";
3
- import { useState as _ } from "react";
4
- import { i as m } from "../../icons-DeUtqBx_.js";
5
- import '../../assets/index40.css';const h = "_nav_roa57_1", v = "_horizontal_roa57_7", w = "_tabs_roa57_17", b = "_pills_roa57_38", t = {
6
- nav: h,
7
- horizontal: v,
8
- tabs: w,
9
- pills: b
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { t as _ } from "../../classix-DG18itHa.js";
3
+ import { useState as m } from "react";
4
+ import { i as u } from "../../icons-BqQRUUWn.js";
5
+ import '../../assets/index40.css';const v = "_nav_roa57_1", h = "_horizontal_roa57_7", b = "_tabs_roa57_17", w = "_pills_roa57_38", t = {
6
+ nav: v,
7
+ horizontal: h,
8
+ tabs: b,
9
+ pills: w
10
10
  }, z = {
11
11
  default: t.default,
12
12
  pills: t.pills,
13
13
  tabs: t.tabs
14
- }, y = ({
14
+ }, N = ({
15
15
  animation: r,
16
16
  children: i,
17
17
  className: e,
18
- horizontal: s = !1,
18
+ horizontal: o = !1,
19
19
  variant: n = "default",
20
20
  ...l
21
21
  }) => {
22
- const [c, a] = _(!1), p = {
23
- "--icon-svg": m("chevron")
22
+ const [c, s] = m(!1), p = {
23
+ "--icon-svg": u("chevron")
24
24
  };
25
- return /* @__PURE__ */ u("nav", { className: d(e, s && t.horizontal, t.nav, z[n]), "data-animation": r, "data-open": c ? "true" : "false", "data-orientation": s ? "horizontal" : "vertical", onBlurCapture: (o) => {
25
+ return /* @__PURE__ */ d("nav", { className: _(e, o && t.horizontal, t.nav, z[n]), "data-animation": r, "data-open": c ? "true" : "false", "data-orientation": o ? "horizontal" : "vertical", onBlurCapture: (a) => {
26
26
  if (n !== "pills" || window.innerWidth > 960) return;
27
- const f = o.relatedTarget;
28
- o.currentTarget.contains(f) || a(!1);
27
+ const f = a.relatedTarget;
28
+ a.currentTarget.contains(f) || s(!1);
29
29
  }, onClick: () => {
30
- n !== "pills" || window.innerWidth > 960 || a((o) => !o);
31
- }, onFocusCapture: () => {
32
- n !== "pills" || window.innerWidth > 960 || a(!0);
30
+ n !== "pills" || window.innerWidth > 960 || s((a) => !a);
33
31
  }, style: p, ...l, "data-component": "nav", children: i });
34
32
  };
35
33
  export {
36
- y as Nav
34
+ N as Nav
37
35
  };
38
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('chevron'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen((v) => !v);\n }}\n onFocusCapture={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen(true);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":";;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,MAAMF,EAAOE;AACf,GAUaC,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACK,MAAM;AACd,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,SAAS;AAAA,EAAA;AAGjC,SACE,gBAAAC,EAAC,OAAA,EACC,WAAWC,EAAGV,GAAWC,KAAcP,EAAOO,YAAYP,EAAOiB,KAAKnB,EAASU,CAAO,CAAC,GACvF,kBAAgBJ,GAChB,aAAWM,IAAO,SAAS,SAC3B,oBAAkBH,IAAa,eAAe,YAC9C,eAAgBW,CAAAA,MAAM;AACpB,QAAIV,MAAY,WAAWW,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCV,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIH,MAAY,WAAWW,OAAOC,aAAa,OAC/CT,EAASc,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,gBAAgB,MAAM;AACpB,IAAIjB,MAAY,WAAWW,OAAOC,aAAa,OAC/CT,EAAQ,EAAI;AAAA,EACd,GACA,OAAOE,GACP,GAAIJ,GAAM,kBAAA,OAETJ,UAAAA,GACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('chevron'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":";;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,MAAMF,EAAOE;AACf,GAUaC,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACK,MAAM;AACd,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,SAAS;AAAA,EAAA;AAGjC,SACE,gBAAAC,EAAC,OAAA,EACC,WAAWC,EAAGV,GAAWC,KAAcP,EAAOO,YAAYP,EAAOiB,KAAKnB,EAASU,CAAO,CAAC,GACvF,kBAAgBJ,GAChB,aAAWM,IAAO,SAAS,SAC3B,oBAAkBH,IAAa,eAAe,YAC9C,eAAgBW,CAAAA,MAAM;AACpB,QAAIV,MAAY,WAAWW,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCV,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIH,MAAY,WAAWW,OAAOC,aAAa,OAE/CT,EAASc,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,OAAOZ,GACP,GAAIJ,GAAM,kBAAA,OAETJ,UAAAA,GACH;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const e=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),d=require("../../utils-D_TJ8wDc.cjs"),a="_select_kvjzq_1",q="_label_kvjzq_21",j="_required_kvjzq_25",s={select:a,label:q,required:j},_=({children:u,label:c,placeholder:l,...t})=>{const{touched:i,onBlur:o}=d.useTouched(t.value===""),r=e.jsxs("select",{className:n.t(s.select,i&&"touched"),onBlur:o,...t,children:[l&&e.jsx("option",{value:"",hidden:!0,children:l}),u]});return c?e.jsxs("label",{"data-component":"select",children:[e.jsx("span",{className:n.t(s.label,t.required&&s.required),children:c}),r]}):r};exports.Select=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../utils-D_TJ8wDc.cjs");const e=require("../../index-HNd9cEc6.cjs");exports.Select=e.Select;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/select/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n\n const selectElement = (\n <select\n className={cx(styles.select, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n >\n {placeholder && (\n <option\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n {selectElement}\n </label>\n );\n};\n"],"names":["Select","children","label","placeholder","props","touched","onBlur","useTouched","value","selectElement","jsxs","cx","styles","select","jsx","required"],"mappings":"kSAYaA,EAASA,CAAC,CAAEC,SAAAA,EAAUC,MAAAA,EAAOC,YAAAA,EAAa,GAAGC,CAAmB,IAAM,CACjF,KAAM,CAAEC,QAAAA,EAASC,OAAAA,CAAAA,EAAWC,aAAWH,EAAMI,QAAU,EAAE,EAEnDC,EACJC,EAAAA,KAAC,SAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,OAAQR,GAAW,SAAS,EACjD,OAAAC,EACA,GAAIF,EAEHD,SAAAA,CAAAA,SACE,SAAA,CACC,MAAO,GACP,OAAM,GAELA,SAAAA,EACH,EAEDF,CAAAA,EACH,EAGF,OAAKC,EAKHQ,EAAAA,KAAC,QAAA,CAAK,iBAAA,SACJ,SAAA,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAWH,EAAAA,EAAGC,EAAOV,MAAOE,EAAMW,UAAYH,EAAOG,QAAQ,EAAIb,SAAAA,CAAAA,CAAM,EAC5EO,CAAAA,EACH,EAPOA,CASX"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,29 +1,8 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
2
- import { t as o } from "../../classix-DG18itHa.js";
3
- import { u as a } from "../../utils-DXIJVVzz.js";
4
- import '../../assets/index4.css';const m = "_select_kvjzq_1", _ = "_label_kvjzq_21", q = "_required_kvjzq_25", t = {
5
- select: m,
6
- label: _,
7
- required: q
8
- }, b = ({
9
- children: u,
10
- label: l,
11
- placeholder: c,
12
- ...e
13
- }) => {
14
- const {
15
- touched: i,
16
- onBlur: d
17
- } = a(e.value === ""), r = /* @__PURE__ */ s("select", { className: o(t.select, i && "touched"), onBlur: d, ...e, children: [
18
- c && /* @__PURE__ */ n("option", { value: "", hidden: !0, children: c }),
19
- u
20
- ] });
21
- return l ? /* @__PURE__ */ s("label", { "data-component": "select", children: [
22
- /* @__PURE__ */ n("span", { className: o(t.label, e.required && t.required), children: l }),
23
- r
24
- ] }) : r;
25
- };
1
+ import "react/jsx-runtime";
2
+ import "../../classix-DG18itHa.js";
3
+ import "../../utils-DXIJVVzz.js";
4
+ import { S as e } from "../../index-xRmXVWAN.js";
26
5
  export {
27
- b as Select
6
+ e as Select
28
7
  };
29
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/select/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { useTouched } from '@/utils.ts';\n\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n\n const selectElement = (\n <select\n className={cx(styles.select, touched && 'touched')}\n onBlur={onBlur}\n {...props}\n >\n {placeholder && (\n <option\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span className={cx(styles.label, props.required && styles.required)}>{label}</span>\n {selectElement}\n </label>\n );\n};\n"],"names":["Select","children","label","placeholder","props","touched","onBlur","useTouched","value","selectElement","jsxs","cx","styles","select","jsx","required"],"mappings":";;;;;;;GAYaA,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,OAAAA;AAAAA,EAAOC,aAAAA;AAAAA,EAAa,GAAGC;AAAmB,MAAM;AACjF,QAAM;AAAA,IAAEC,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAWH,EAAMI,UAAU,EAAE,GAEnDC,IACJ,gBAAAC,EAAC,UAAA,EACC,WAAWC,EAAGC,EAAOC,QAAQR,KAAW,SAAS,GACjD,QAAAC,GACA,GAAIF,GAEHD,UAAAA;AAAAA,IAAAA,uBACE,UAAA,EACC,OAAO,IACP,QAAM,IAELA,UAAAA,GACH;AAAA,IAEDF;AAAAA,EAAAA,GACH;AAGF,SAAKC,IAKH,gBAAAQ,EAAC,SAAA,EAAK,kBAAA,UACJ,UAAA;AAAA,IAAA,gBAAAI,EAAC,QAAA,EAAK,WAAWH,EAAGC,EAAOV,OAAOE,EAAMW,YAAYH,EAAOG,QAAQ,GAAIb,UAAAA,EAAAA,CAAM;AAAA,IAC5EO;AAAAA,EAAAA,GACH,IAPOA;AASX;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -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"),y=require("../../utils-D_TJ8wDc.cjs"),l=require("../../styles.module-BuPl_9yN.cjs"),d="_label_b5yys_1",b="_textarea_b5yys_5",n={label:d,textarea:b},m=({label:t,maxRows:o=12,minRows:c=3,required:s,value:a,...u})=>{const{touched:i,onBlur:x}=y.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":c,"--max-rows":o},value:a})]})};exports.Textarea=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),y=require("../../utils-D_TJ8wDc.cjs"),l=require("../../styles.module-CwroCNAt.cjs"),d="_label_b5yys_1",b="_textarea_b5yys_5",n={label:d,textarea:b},m=({label:t,maxRows:o=12,minRows:c=3,required:s,value:a,...u})=>{const{touched:i,onBlur:x}=y.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":c,"--max-rows":o},value:a})]})};exports.Textarea=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
2
  import { t as r } from "../../classix-DG18itHa.js";
3
3
  import { u } from "../../utils-DXIJVVzz.js";
4
- import { i as o } from "../../styles.module-ZrsD4xw8.js";
5
- import '../../assets/index41.css';const y = "_label_b5yys_1", b = "_textarea_b5yys_5", l = {
4
+ import { i as o } from "../../styles.module-C_Z8FrR5.js";
5
+ import '../../assets/index42.css';const y = "_label_b5yys_1", b = "_textarea_b5yys_5", l = {
6
6
  label: y,
7
7
  textarea: b
8
8
  }, j = ({
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const o=require("react/jsx-runtime"),v=require("../../classix-5H4IWnMA.cjs"),n=require("react"),f=require("../icon/index.cjs"),l="_toast_tav58_1",d="_active_tav58_18",m="_error_tav58_24",q="_info_tav58_28",T="_success_tav58_33",a={toast:l,active:d,error:m,info:q,success:T},g=({label:i,type:s="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,c]=n.useState(!1);return n.useEffect(()=>{if(!r)return c(!1);const t=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(t)},[r]),o.jsxs("div",{"aria-live":s==="error"?"assertive":"polite",className:v.t(a.toast,a[s],_&&a.active),onClick:u,onTransitionEnd:t=>{r||t.propertyName!=="opacity"||t.currentTarget!==t.target||e==null||e()},"data-component":"toast",children:[o.jsx(f.Icon,{name:s}),i]})};exports.Toast=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const o=require("react/jsx-runtime"),v=require("../../classix-5H4IWnMA.cjs"),n=require("react"),f=require("../icon/index.cjs"),l="_toast_tav58_1",d="_active_tav58_18",m="_error_tav58_24",q="_info_tav58_28",T="_success_tav58_33",a={toast:l,active:d,error:m,info:q,success:T},g=({label:i,type:s="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,c]=n.useState(!1);return n.useEffect(()=>{if(!r)return c(!1);const t=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(t)},[r]),o.jsxs("div",{"aria-live":s==="error"?"assertive":"polite",className:v.t(a.toast,a[s],_&&a.active),onClick:u,onTransitionEnd:t=>{r||t.propertyName!=="opacity"||t.currentTarget!==t.target||e==null||e()},"data-component":"toast",children:[o.jsx(f.Icon,{name:s}),i]})};exports.Toast=g;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -2,7 +2,7 @@ import { jsxs as _, jsx as u } from "react/jsx-runtime";
2
2
  import { t as f } from "../../classix-DG18itHa.js";
3
3
  import { useState as m, useEffect as v } from "react";
4
4
  import { Icon as d } from "../icon/index.js";
5
- import '../../assets/index42.css';const l = "_toast_tav58_1", h = "_active_tav58_18", T = "_error_tav58_24", g = "_info_tav58_28", j = "_success_tav58_33", o = {
5
+ import '../../assets/index43.css';const l = "_toast_tav58_1", h = "_active_tav58_18", T = "_error_tav58_24", g = "_info_tav58_28", j = "_success_tav58_33", o = {
6
6
  toast: l,
7
7
  active: h,
8
8
  error: T,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_104fz_1",n="_editor_104fz_33",o={toolbar:s,default:"_default_104fz_26",editor:n},i=({children:t,variant:e="default"})=>a.jsx("div",{className:l.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index44.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_104fz_1",n="_editor_104fz_33",o={toolbar:s,default:"_default_104fz_26",editor:n},i=({children:t,variant:e="default"})=>a.jsx("div",{className:l.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=i;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { t as e } from "../../classix-DG18itHa.js";
3
- import '../../assets/index43.css';const s = "_toolbar_104fz_1", n = "_editor_104fz_33", o = {
3
+ import '../../assets/index44.css';const s = "_toolbar_104fz_1", n = "_editor_104fz_33", o = {
4
4
  toolbar: s,
5
5
  default: "_default_104fz_26",
6
6
  editor: n
@@ -1,10 +1,13 @@
1
- const v = {
1
+ const l = {
2
2
  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",
3
3
  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",
4
4
  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",
5
5
  check: "m4.5 12.75 6 6 9-13.5",
6
6
  chevron: "m19.5 8.25-7.5 7.5-7.5-7.5",
7
- 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",
7
+ clipboard: {
8
+ filled: "M10.5 3A1.501 1.501 0 0 0 9 4.5h6A1.5 1.5 0 0 0 13.5 3h-3Zm-2.693.178A3 3 0 0 1 10.5 1.5h3a3 3 0 0 1 2.694 1.678c.497.042.992.092 1.486.15 1.497.173 2.57 1.46 2.57 2.929V19.5a3 3 0 0 1-3 3H6.75a3 3 0 0 1-3-3V6.257c0-1.47 1.073-2.756 2.57-2.93.493-.057.989-.107 1.487-.15Z",
9
+ outline: "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"
10
+ },
8
11
  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",
9
12
  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",
10
13
  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",
@@ -37,15 +40,15 @@ const v = {
37
40
  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",
38
41
  x: "M6 18 18 6M6 6l12 12"
39
42
  };
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")`;
43
+ function v(h, m) {
44
+ return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='${m ? "currentColor" : "none"}' viewBox='0 0 24 24' stroke-width='2' stroke='${m ? "none" : "currentColor"}'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${h}' /%3E%3C/svg%3E%0A")`;
42
45
  }
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;
45
- return l(M, c);
46
+ const e = (h, m = !1) => {
47
+ const a = l[h], M = typeof a == "string" ? a : m ? a.filled : a.outline, c = m && typeof a == "object" && !!a.filled;
48
+ return v(M, c);
46
49
  };
47
50
  export {
48
- v as a,
51
+ l as a,
49
52
  e as i
50
53
  };
51
- //# sourceMappingURL=icons-DeUtqBx_.js.map
54
+ //# sourceMappingURL=icons-BqQRUUWn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-BqQRUUWn.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 filled:\n 'M10.5 3A1.501 1.501 0 0 0 9 4.5h6A1.5 1.5 0 0 0 13.5 3h-3Zm-2.693.178A3 3 0 0 1 10.5 1.5h3a3 3 0 0 1 2.694 1.678c.497.042.992.092 1.486.15 1.497.173 2.57 1.46 2.57 2.929V19.5a3 3 0 0 1-3 3H6.75a3 3 0 0 1-3-3V6.257c0-1.47 1.073-2.756 2.57-2.93.493-.057.989-.107 1.487-.15Z',\n outline:\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 },\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","filled","outline","document","error","gear","goTo","home","image","info","italic","link","list","megaphone","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,WAAW;AAAA,IACTC,QACE;AAAA,IACFC,SACE;AAAA,EAAA;AAAA,EAEJC,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,IACTZ,QACE;AAAA,IACFC,SAAS;AAAA,EAAA;AAAA,EAEXY,MAAM;AAAA,EACNC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,QACE;AAAA,EACFC,OACE;AAAA,EACFC,OAAO;AAAA,IACLlB,QACE;AAAA,IACFC,SACE;AAAA,EAAA;AAAA,EAEJkB,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,EAAKhC,SAASgC,EAAK/B,SACnEiC,IAAYL,KAAQ,OAAOG,KAAS,YAAY,CAAC,CAACA,EAAKhC;AAE7D,SAAO2B,EAASM,GAAMC,CAAS;AACjC;"}