@solibo/solibo-ui 2.1.1 → 2.2.0

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 (288) hide show
  1. package/dist/assets/Degular.woff2 +0 -0
  2. package/dist/assets/Geist.woff2 +0 -0
  3. package/dist/assets/index.css +1 -1
  4. package/dist/assets/index10.css +1 -1
  5. package/dist/assets/index11.css +1 -1
  6. package/dist/assets/index12.css +1 -1
  7. package/dist/assets/index13.css +1 -1
  8. package/dist/assets/index14.css +1 -1
  9. package/dist/assets/index15.css +1 -1
  10. package/dist/assets/index16.css +1 -1
  11. package/dist/assets/index17.css +1 -1
  12. package/dist/assets/index18.css +1 -1
  13. package/dist/assets/index19.css +1 -1
  14. package/dist/assets/index2.css +1 -1
  15. package/dist/assets/index20.css +1 -0
  16. package/dist/assets/index21.css +1 -1
  17. package/dist/assets/index22.css +1 -1
  18. package/dist/assets/index23.css +1 -1
  19. package/dist/assets/index26.css +1 -1
  20. package/dist/assets/index27.css +1 -1
  21. package/dist/assets/index3.css +1 -1
  22. package/dist/assets/index31.css +1 -1
  23. package/dist/assets/index32.css +1 -1
  24. package/dist/assets/index33.css +1 -1
  25. package/dist/assets/index34.css +1 -1
  26. package/dist/assets/index39.css +1 -1
  27. package/dist/assets/index41.css +1 -1
  28. package/dist/assets/index43.css +1 -1
  29. package/dist/assets/index46.css +1 -1
  30. package/dist/assets/index48.css +1 -1
  31. package/dist/assets/index49.css +1 -1
  32. package/dist/assets/index50.css +1 -1
  33. package/dist/assets/index51.css +1 -1
  34. package/dist/assets/index52.css +1 -1
  35. package/dist/assets/index53.css +1 -1
  36. package/dist/assets/index54.css +1 -1
  37. package/dist/assets/index55.css +1 -1
  38. package/dist/assets/index56.css +1 -0
  39. package/dist/assets/index6.css +1 -1
  40. package/dist/assets/index8.css +1 -1
  41. package/dist/assets/index9.css +1 -1
  42. package/dist/assets/menu-popover.css +1 -1
  43. package/dist/components/app-link/index.cjs +1 -1
  44. package/dist/components/app-link/index.js +1 -1
  45. package/dist/components/app-shell/index.cjs +1 -1
  46. package/dist/components/app-shell/index.js +3 -3
  47. package/dist/components/aside/index.cjs +1 -1
  48. package/dist/components/aside/index.js +5 -5
  49. package/dist/components/avatar/index.cjs +1 -1
  50. package/dist/components/avatar/index.js +30 -30
  51. package/dist/components/badge/index.cjs +1 -1
  52. package/dist/components/badge/index.js +1 -1
  53. package/dist/components/banner/index.cjs +1 -1
  54. package/dist/components/banner/index.js +4 -4
  55. package/dist/components/branding/index.cjs +1 -1
  56. package/dist/components/branding/index.js +2 -2
  57. package/dist/components/button/index.cjs +1 -1
  58. package/dist/components/button/index.js +29 -29
  59. package/dist/components/card/index.cjs +1 -1
  60. package/dist/components/card/index.js +54 -46
  61. package/dist/components/checkbox/index.cjs +1 -1
  62. package/dist/components/checkbox/index.js +4 -4
  63. package/dist/components/chip/index.cjs +1 -1
  64. package/dist/components/chip/index.js +25 -25
  65. package/dist/components/collapsible/index.cjs +1 -1
  66. package/dist/components/collapsible/index.js +34 -18
  67. package/dist/components/controls/index.cjs +2 -2
  68. package/dist/components/controls/index.js +11 -11
  69. package/dist/components/croppable/index.cjs +1 -1
  70. package/dist/components/croppable/index.js +1 -1
  71. package/dist/components/dialog/index.cjs +1 -1
  72. package/dist/components/dialog/index.js +38 -38
  73. package/dist/components/divider/index.cjs +1 -1
  74. package/dist/components/divider/index.js +3 -3
  75. package/dist/components/dropdown/index.cjs +1 -1
  76. package/dist/components/dropdown/index.js +89 -89
  77. package/dist/components/dropzone/index.cjs +1 -1
  78. package/dist/components/dropzone/index.js +11 -11
  79. package/dist/components/editor/index.cjs +1 -55
  80. package/dist/components/editor/index.js +403 -16298
  81. package/dist/components/fieldset/index.cjs +1 -1
  82. package/dist/components/fieldset/index.js +3 -3
  83. package/dist/components/figure/index.cjs +1 -1
  84. package/dist/components/figure/index.js +14 -12
  85. package/dist/components/file/index.cjs +1 -1
  86. package/dist/components/file/index.js +1 -1
  87. package/dist/components/footer/index.cjs +1 -1
  88. package/dist/components/footer/index.js +12 -8
  89. package/dist/components/form/index.cjs +1 -1
  90. package/dist/components/form/index.js +9 -9
  91. package/dist/components/graph/index.cjs +1 -1
  92. package/dist/components/graph/index.js +12 -12
  93. package/dist/components/group/index.cjs +1 -1
  94. package/dist/components/group/index.js +38 -11
  95. package/dist/components/header/index.cjs +1 -1
  96. package/dist/components/header/index.js +49 -32
  97. package/dist/components/icon/index.cjs +1 -1
  98. package/dist/components/icon/index.js +6 -6
  99. package/dist/components/iframe/index.cjs +1 -1
  100. package/dist/components/iframe/index.js +71 -66
  101. package/dist/components/image/index.cjs +1 -1
  102. package/dist/components/image/index.js +1 -1
  103. package/dist/components/input/index.cjs +1 -1
  104. package/dist/components/input/index.js +2 -2
  105. package/dist/components/link/index.cjs +1 -1
  106. package/dist/components/link/index.js +27 -14
  107. package/dist/components/list/index.cjs +1 -1
  108. package/dist/components/list/index.js +62 -58
  109. package/dist/components/loading/index.cjs +1 -1
  110. package/dist/components/loading/index.js +5 -5
  111. package/dist/components/menu/index.cjs +1 -1
  112. package/dist/components/menu/index.js +1 -1
  113. package/dist/components/message/index.cjs +1 -1
  114. package/dist/components/message/index.js +2 -2
  115. package/dist/components/messages/index.cjs +1 -1
  116. package/dist/components/messages/index.js +6 -6
  117. package/dist/components/nav/index.cjs +1 -1
  118. package/dist/components/nav/index.js +31 -29
  119. package/dist/components/object/index.cjs +1 -1
  120. package/dist/components/object/index.js +1 -1
  121. package/dist/components/page-layout/index.cjs +1 -1
  122. package/dist/components/page-layout/index.js +33 -20
  123. package/dist/components/panel/index.cjs +2 -0
  124. package/dist/components/panel/index.js +25 -0
  125. package/dist/components/popover/index.cjs +1 -1
  126. package/dist/components/popover/index.js +35 -35
  127. package/dist/components/portal/index.cjs +1 -1
  128. package/dist/components/portal/index.js +22 -22
  129. package/dist/components/search/index.cjs +1 -1
  130. package/dist/components/search/index.js +50 -50
  131. package/dist/components/select/index.cjs +1 -1
  132. package/dist/components/select/index.js +2 -2
  133. package/dist/components/sortable/index.cjs +1 -1
  134. package/dist/components/sortable/index.js +49 -49
  135. package/dist/components/textarea/index.cjs +1 -1
  136. package/dist/components/textarea/index.js +29 -27
  137. package/dist/components/toast/index.cjs +1 -1
  138. package/dist/components/toast/index.js +1 -1
  139. package/dist/components/toggle/index.cjs +1 -1
  140. package/dist/components/toggle/index.js +10 -10
  141. package/dist/components/toolbar/index.cjs +1 -1
  142. package/dist/components/toolbar/index.js +4 -4
  143. package/dist/components/tooltip/index.cjs +1 -1
  144. package/dist/components/tooltip/index.js +2 -2
  145. package/dist/components/widget/index.cjs +1 -1
  146. package/dist/components/widget/index.js +22 -13
  147. package/dist/{index-CMPTHneU.js → index-BlirPoN9.js} +8 -8
  148. package/dist/{index-BIpgkB-u.js → index-C3NJXvlq.js} +11 -11
  149. package/dist/index-CireNaZt.cjs +2 -0
  150. package/dist/index-O1kh8Vnq.cjs +2 -0
  151. package/dist/index.cjs +1 -1
  152. package/dist/index.d.ts +379 -14
  153. package/dist/index.js +59 -56
  154. package/dist/menu-popover-Ceb_9V67.js +77 -0
  155. package/dist/menu-popover-bqblnK6P.cjs +2 -0
  156. package/dist/styles/fonts.css +11 -0
  157. package/dist/tokens.json +1 -1
  158. package/package.json +15 -8
  159. package/dist/classix-5H4IWnMA.cjs +0 -2
  160. package/dist/classix-5H4IWnMA.cjs.map +0 -1
  161. package/dist/classix-DG18itHa.js +0 -9
  162. package/dist/classix-DG18itHa.js.map +0 -1
  163. package/dist/components/app-link/index.cjs.map +0 -1
  164. package/dist/components/app-link/index.js.map +0 -1
  165. package/dist/components/app-shell/index.cjs.map +0 -1
  166. package/dist/components/app-shell/index.js.map +0 -1
  167. package/dist/components/aside/index.cjs.map +0 -1
  168. package/dist/components/aside/index.js.map +0 -1
  169. package/dist/components/avatar/index.cjs.map +0 -1
  170. package/dist/components/avatar/index.js.map +0 -1
  171. package/dist/components/badge/index.cjs.map +0 -1
  172. package/dist/components/badge/index.js.map +0 -1
  173. package/dist/components/banner/index.cjs.map +0 -1
  174. package/dist/components/banner/index.js.map +0 -1
  175. package/dist/components/branding/index.cjs.map +0 -1
  176. package/dist/components/branding/index.js.map +0 -1
  177. package/dist/components/button/index.cjs.map +0 -1
  178. package/dist/components/button/index.js.map +0 -1
  179. package/dist/components/card/index.cjs.map +0 -1
  180. package/dist/components/card/index.js.map +0 -1
  181. package/dist/components/checkbox/index.cjs.map +0 -1
  182. package/dist/components/checkbox/index.js.map +0 -1
  183. package/dist/components/chip/index.cjs.map +0 -1
  184. package/dist/components/chip/index.js.map +0 -1
  185. package/dist/components/clipboard/index.cjs.map +0 -1
  186. package/dist/components/clipboard/index.js.map +0 -1
  187. package/dist/components/collapsible/index.cjs.map +0 -1
  188. package/dist/components/collapsible/index.js.map +0 -1
  189. package/dist/components/controls/index.cjs.map +0 -1
  190. package/dist/components/controls/index.js.map +0 -1
  191. package/dist/components/croppable/index.cjs.map +0 -1
  192. package/dist/components/croppable/index.js.map +0 -1
  193. package/dist/components/dialog/index.cjs.map +0 -1
  194. package/dist/components/dialog/index.js.map +0 -1
  195. package/dist/components/divider/index.cjs.map +0 -1
  196. package/dist/components/divider/index.js.map +0 -1
  197. package/dist/components/dropdown/index.cjs.map +0 -1
  198. package/dist/components/dropdown/index.js.map +0 -1
  199. package/dist/components/dropzone/index.cjs.map +0 -1
  200. package/dist/components/dropzone/index.js.map +0 -1
  201. package/dist/components/editor/index.cjs.map +0 -1
  202. package/dist/components/editor/index.js.map +0 -1
  203. package/dist/components/empty-state/index.cjs.map +0 -1
  204. package/dist/components/empty-state/index.js.map +0 -1
  205. package/dist/components/fieldset/index.cjs.map +0 -1
  206. package/dist/components/fieldset/index.js.map +0 -1
  207. package/dist/components/figure/index.cjs.map +0 -1
  208. package/dist/components/figure/index.js.map +0 -1
  209. package/dist/components/file/index.cjs.map +0 -1
  210. package/dist/components/file/index.js.map +0 -1
  211. package/dist/components/footer/index.cjs.map +0 -1
  212. package/dist/components/footer/index.js.map +0 -1
  213. package/dist/components/form/index.cjs.map +0 -1
  214. package/dist/components/form/index.js.map +0 -1
  215. package/dist/components/graph/index.cjs.map +0 -1
  216. package/dist/components/graph/index.js.map +0 -1
  217. package/dist/components/group/index.cjs.map +0 -1
  218. package/dist/components/group/index.js.map +0 -1
  219. package/dist/components/header/index.cjs.map +0 -1
  220. package/dist/components/header/index.js.map +0 -1
  221. package/dist/components/icon/index.cjs.map +0 -1
  222. package/dist/components/icon/index.js.map +0 -1
  223. package/dist/components/iframe/index.cjs.map +0 -1
  224. package/dist/components/iframe/index.js.map +0 -1
  225. package/dist/components/image/index.cjs.map +0 -1
  226. package/dist/components/image/index.js.map +0 -1
  227. package/dist/components/input/index.cjs.map +0 -1
  228. package/dist/components/input/index.js.map +0 -1
  229. package/dist/components/link/index.cjs.map +0 -1
  230. package/dist/components/link/index.js.map +0 -1
  231. package/dist/components/list/index.cjs.map +0 -1
  232. package/dist/components/list/index.js.map +0 -1
  233. package/dist/components/loading/index.cjs.map +0 -1
  234. package/dist/components/loading/index.js.map +0 -1
  235. package/dist/components/menu/index.cjs.map +0 -1
  236. package/dist/components/menu/index.js.map +0 -1
  237. package/dist/components/message/index.cjs.map +0 -1
  238. package/dist/components/message/index.js.map +0 -1
  239. package/dist/components/messages/index.cjs.map +0 -1
  240. package/dist/components/messages/index.js.map +0 -1
  241. package/dist/components/nav/index.cjs.map +0 -1
  242. package/dist/components/nav/index.js.map +0 -1
  243. package/dist/components/object/index.cjs.map +0 -1
  244. package/dist/components/object/index.js.map +0 -1
  245. package/dist/components/page-layout/index.cjs.map +0 -1
  246. package/dist/components/page-layout/index.js.map +0 -1
  247. package/dist/components/popover/index.cjs.map +0 -1
  248. package/dist/components/popover/index.js.map +0 -1
  249. package/dist/components/portal/index.cjs.map +0 -1
  250. package/dist/components/portal/index.js.map +0 -1
  251. package/dist/components/search/index.cjs.map +0 -1
  252. package/dist/components/search/index.js.map +0 -1
  253. package/dist/components/select/index.cjs.map +0 -1
  254. package/dist/components/select/index.js.map +0 -1
  255. package/dist/components/sortable/index.cjs.map +0 -1
  256. package/dist/components/sortable/index.js.map +0 -1
  257. package/dist/components/table/index.cjs.map +0 -1
  258. package/dist/components/table/index.js.map +0 -1
  259. package/dist/components/textarea/index.cjs.map +0 -1
  260. package/dist/components/textarea/index.js.map +0 -1
  261. package/dist/components/toast/index.cjs.map +0 -1
  262. package/dist/components/toast/index.js.map +0 -1
  263. package/dist/components/toasts/index.cjs.map +0 -1
  264. package/dist/components/toasts/index.js.map +0 -1
  265. package/dist/components/toggle/index.cjs.map +0 -1
  266. package/dist/components/toggle/index.js.map +0 -1
  267. package/dist/components/toolbar/index.cjs.map +0 -1
  268. package/dist/components/toolbar/index.js.map +0 -1
  269. package/dist/components/tooltip/index.cjs.map +0 -1
  270. package/dist/components/tooltip/index.js.map +0 -1
  271. package/dist/components/widget/index.cjs.map +0 -1
  272. package/dist/components/widget/index.js.map +0 -1
  273. package/dist/icons-B3hIY9Bm.cjs.map +0 -1
  274. package/dist/icons-CTtWkF6z.js.map +0 -1
  275. package/dist/index-BIpgkB-u.js.map +0 -1
  276. package/dist/index-Bbauu1No.cjs +0 -2
  277. package/dist/index-Bbauu1No.cjs.map +0 -1
  278. package/dist/index-CMPTHneU.js.map +0 -1
  279. package/dist/index-DAjU2bTe.cjs +0 -2
  280. package/dist/index-DAjU2bTe.cjs.map +0 -1
  281. package/dist/index.cjs.map +0 -1
  282. package/dist/index.js.map +0 -1
  283. package/dist/menu-popover-BV7nUXlb.js +0 -77
  284. package/dist/menu-popover-BV7nUXlb.js.map +0 -1
  285. package/dist/menu-popover-fGpFDJTo.cjs +0 -2
  286. package/dist/menu-popover-fGpFDJTo.cjs.map +0 -1
  287. package/dist/use-touched-B999bBr8.js.map +0 -1
  288. package/dist/use-touched-Bq5Gjbpz.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
- import "../../classix-DG18itHa.js";
2
+ import "classix";
3
3
  import "../../icons-CTtWkF6z.js";
4
- import { S as e } from "../../index-BIpgkB-u.js";
4
+ import { S as e } from "../../index-C3NJXvlq.js";
5
5
  import "../../use-touched-B999bBr8.js";
6
6
  export {
7
7
  e as Select
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index8.css');const F=require("react/jsx-runtime"),X=require("../../classix-5H4IWnMA.cjs"),s=require("react"),Z=require("../list/index.cjs"),G="_sortable_5vbjc_1",J="_dragging_5vbjc_13",K="_columns_5vbjc_38",Q="_pseudo_5vbjc_47",b={sortable:G,dragging:J,columns:K,pseudo:Q,"target-above":"_target-above_5vbjc_62","target-below":"_target-below_5vbjc_63"},k=s.createContext(null);function tt(){return s.useContext(k)}const h=a=>Number.parseFloat(a)||0,et=a=>{const v=a.firstElementChild,i=a.getBoundingClientRect();if(v){const y=v.getBoundingClientRect();return{borderRadius:window.getComputedStyle(v).borderRadius,height:y.height,width:y.width,wrapperHeight:i.height}}const u=window.getComputedStyle(a),j=h(u.borderLeftWidth)+h(u.borderRightWidth)+h(u.paddingLeft)+h(u.paddingRight),T=h(u.borderBottomWidth)+h(u.borderTopWidth)+h(u.paddingBottom)+h(u.paddingTop);return{borderRadius:u.borderRadius,height:Math.max(0,i.height-T),width:Math.max(0,i.width-j),wrapperHeight:i.height}};function nt({children:a,className:v,columns:i=1,isRearranging:u=!1,onChangeOrder:j,...T}){const y=Number.isFinite(i)?Math.max(1,Math.floor(i)):1,R=s.useMemo(()=>s.Children.toArray(a),[a]),l=s.useRef(-1),q=s.useMemo(()=>typeof window<"u"&&(navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches),[]),p=s.useRef(!1),_=s.useRef(null),w=s.useRef(null),x=s.useRef(null),I=s.useRef(0),C=s.useRef(null),g=s.useRef(null),E=s.useRef(o=>o.preventDefault()).current,[M,O]=s.useState({borderRadius:"0px",height:0,width:0,wrapperHeight:0}),[m,S]=s.useState(null),W={...T.style,"--sortable-placeholder-height":`${M.height}px`,"--sortable-placeholder-radius":M.borderRadius,"--sortable-placeholder-width":`${M.width}px`},H=(o,t)=>{if(t<0||t>=R.length||o===t)return;const c=R.slice(),[e]=c.splice(o,1);c.splice(t,0,e),j(c.map((n,r)=>({id:String(s.isValidElement(n)?n.props["data-id"]??`idx-${r}`:`idx-${r}`),weight:c.length-1-r})))},D=()=>{w.current!==null&&(clearTimeout(w.current),w.current=null)},A=()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null)},$=o=>{let t=(o==null?void 0:o.parentElement)??null;for(;t;){const{overflowY:c}=window.getComputedStyle(t);if(/(auto|scroll|overlay)/.test(c)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:null},L=(o=!1)=>{D(),A(),window.removeEventListener("touchmove",E),C.current=null,p.current=!1,_.current=null,x.current=null,I.current=o?Date.now()+500:0,l.current=-1,S(null)},P=(o,t)=>{l.current=o,O(et(t)),S(o)},U=o=>o instanceof Element&&!!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'),N=(o,t,c)=>{const e=l.current;if(!Number.isInteger(t)||e<0||t===e)return null;const n=o.getBoundingClientRect(),r=t===e+1?M.wrapperHeight:n.height,d=c>n.top+r/2?t+1:t;return d>e?d-1:d},Y=(o,t)=>{var n;const c=(n=document.elementFromPoint(o,t))==null?void 0:n.closest("[data-sortable-index]");if(!c)return;const e=N(c,Number(c.dataset.sortableIndex),t);e!==null&&(_.current=e,S(e))},V=o=>{const t=$(o);if(!t)return;const c=72,e=18,n=()=>{if(!p.current){g.current=null;return}const r=C.current;if(!r){g.current=requestAnimationFrame(n);return}const f=t===document.scrollingElement?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect();let d=0;if(r.y<f.top+c){const B=Math.max(0,r.y-f.top);d=-e*(1-B/c)}else if(r.y>f.bottom-c){const B=Math.max(0,f.bottom-r.y);d=e*(1-B/c)}d!==0&&(t.scrollBy({top:d,behavior:"auto"}),Y(r.x,r.y)),g.current=requestAnimationFrame(n)};A(),g.current=requestAnimationFrame(n)},z=()=>{l.current=-1,S(null)};return s.useEffect(()=>()=>{D(),A(),window.removeEventListener("touchmove",E)},[E]),F.jsx(Z.List,{className:X.t(v,b.sortable,y>1&&b.columns),columns:i,ordered:!0,style:W,...T,"data-component":"sortable",children:R.map((o,t)=>{const c=s.isValidElement(o)?o.key:null;return F.jsx("li",{"data-sortable-index":t,onClickCapture:e=>{I.current<=Date.now()||(e.preventDefault(),e.stopPropagation(),I.current=0)},className:X.t(m!==null&&m>t-10&&m<t+10&&b.pseudo,m===t&&l.current<t&&b["target-below"],m===t&&l.current>t&&b["target-above"],l.current===t&&b.dragging),onContextMenu:e=>{(p.current||w.current!==null)&&e.preventDefault()},onTouchStart:e=>{if(u||U(e.target))return;I.current=0;const n=e.touches[0];if(!n)return;const r=e.currentTarget;x.current={x:n.clientX,y:n.clientY},D(),w.current=setTimeout(()=>{P(t,r),p.current=!0,_.current=t,C.current={x:n.clientX,y:n.clientY},window.addEventListener("touchmove",E,{passive:!1}),V(r)},350)},onTouchMove:e=>{const n=e.touches[0];if(n){if(C.current={x:n.clientX,y:n.clientY},!p.current){const r=x.current;if(!r)return;Math.hypot(n.clientX-r.x,n.clientY-r.y)>8&&(D(),x.current=null);return}Y(n.clientX,n.clientY)}},onTouchEnd:e=>{if(D(),!p.current){x.current=null;return}e.preventDefault();const n=l.current,r=_.current;n>=0&&r!==null&&n!==r&&H(n,r),L(!0)},onTouchCancel:()=>L(),draggable:!u&&!q,onDragEnd:()=>z(),onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move";const n=N(e.currentTarget,t,e.clientY);n!==null&&S(n)},onDragStart:e=>{if(q){e.preventDefault();return}P(t,e.currentTarget),e.dataTransfer.setData("text/plain",""),e.dataTransfer.effectAllowed="move"},onDrop:e=>{e.preventDefault();const n=l.current,r=m;n<0||r===null||n===r||(H(n,r),z())},"data-component":"sortable",children:F.jsx(k.Provider,{value:{canMoveDown:t<R.length-1,canMoveUp:t>0,index:t,moveDown:()=>H(t,t+1),moveUp:()=>H(t,t-1)},children:o})},c??t)})})}exports.Sortable=nt;exports.useOptionalSortableItem=tt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index8.css');const q=require("react/jsx-runtime"),X=require("classix"),s=require("react"),Z=require("../list/index.cjs"),G="_sortable_1h6pg_1",J="_dragging_1h6pg_13",K="_columns_1h6pg_36",Q="_pseudo_1h6pg_45",b={sortable:G,dragging:J,columns:K,pseudo:Q,"target-above":"_target-above_1h6pg_60","target-below":"_target-below_1h6pg_61"},k=s.createContext(null);function tt(){return s.useContext(k)}const h=a=>Number.parseFloat(a)||0,et=a=>{const w=a.firstElementChild,i=a.getBoundingClientRect();if(w){const y=w.getBoundingClientRect();return{borderRadius:window.getComputedStyle(w).borderRadius,height:y.height,width:y.width,wrapperHeight:i.height}}const u=window.getComputedStyle(a),A=h(u.borderLeftWidth)+h(u.borderRightWidth)+h(u.paddingLeft)+h(u.paddingRight),T=h(u.borderBottomWidth)+h(u.borderTopWidth)+h(u.paddingBottom)+h(u.paddingTop);return{borderRadius:u.borderRadius,height:Math.max(0,i.height-T),width:Math.max(0,i.width-A),wrapperHeight:i.height}};function nt({children:a,className:w,columns:i=1,isRearranging:u=!1,onChangeOrder:A,...T}){const y=Number.isFinite(i)?Math.max(1,Math.floor(i)):1,R=s.useMemo(()=>s.Children.toArray(a),[a]),l=s.useRef(-1),L=s.useMemo(()=>typeof window<"u"&&(navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches),[]),p=s.useRef(!1),_=s.useRef(null),v=s.useRef(null),x=s.useRef(null),I=s.useRef(0),C=s.useRef(null),g=s.useRef(null),E=s.useRef(o=>o.preventDefault()).current,[M,O]=s.useState({borderRadius:"0px",height:0,width:0,wrapperHeight:0}),[m,S]=s.useState(null),W={...T.style,"--sortable-placeholder-height":`${M.height}px`,"--sortable-placeholder-radius":M.borderRadius,"--sortable-placeholder-width":`${M.width}px`},H=(o,t)=>{if(t<0||t>=R.length||o===t)return;const c=R.slice(),[e]=c.splice(o,1);c.splice(t,0,e),A(c.map((n,r)=>({id:String(s.isValidElement(n)?n.props["data-id"]??`idx-${r}`:`idx-${r}`),weight:c.length-1-r})))},D=()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},B=()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null)},$=o=>{let t=(o==null?void 0:o.parentElement)??null;for(;t;){const{overflowY:c}=window.getComputedStyle(t);if(/(auto|scroll|overlay)/.test(c)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:null},P=(o=!1)=>{D(),B(),window.removeEventListener("touchmove",E),C.current=null,p.current=!1,_.current=null,x.current=null,I.current=o?Date.now()+500:0,l.current=-1,S(null)},N=(o,t)=>{l.current=o,O(et(t)),S(o)},U=o=>o instanceof Element&&!!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'),Y=(o,t,c)=>{const e=l.current;if(!Number.isInteger(t)||e<0||t===e)return null;const n=o.getBoundingClientRect(),r=t===e+1?M.wrapperHeight:n.height,d=c>n.top+r/2?t+1:t;return d>e?d-1:d},j=(o,t)=>{var n;const c=(n=document.elementFromPoint(o,t))==null?void 0:n.closest("[data-sortable-index]");if(!c)return;const e=Y(c,Number(c.dataset.sortableIndex),t);e!==null&&(_.current=e,S(e))},V=o=>{const t=$(o);if(!t)return;const c=72,e=18,n=()=>{if(!p.current){g.current=null;return}const r=C.current;if(!r){g.current=requestAnimationFrame(n);return}const f=t===document.scrollingElement?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect();let d=0;if(r.y<f.top+c){const F=Math.max(0,r.y-f.top);d=-e*(1-F/c)}else if(r.y>f.bottom-c){const F=Math.max(0,f.bottom-r.y);d=e*(1-F/c)}d!==0&&(t.scrollBy({top:d,behavior:"auto"}),j(r.x,r.y)),g.current=requestAnimationFrame(n)};B(),g.current=requestAnimationFrame(n)},z=()=>{l.current=-1,S(null)};return s.useEffect(()=>()=>{D(),B(),window.removeEventListener("touchmove",E)},[E]),q.jsx(Z.List,{className:X(w,b.sortable,y>1&&b.columns),columns:i,ordered:!0,style:W,...T,"data-component":"sortable",children:R.map((o,t)=>{const c=s.isValidElement(o)?o.key:null;return q.jsx("li",{"data-sortable-index":t,onClickCapture:e=>{I.current<=Date.now()||(e.preventDefault(),e.stopPropagation(),I.current=0)},className:X(m!==null&&m>t-10&&m<t+10&&b.pseudo,m===t&&l.current<t&&b["target-below"],m===t&&l.current>t&&b["target-above"],l.current===t&&b.dragging),onContextMenu:e=>{(p.current||v.current!==null)&&e.preventDefault()},onTouchStart:e=>{if(u||U(e.target))return;I.current=0;const n=e.touches[0];if(!n)return;const r=e.currentTarget;x.current={x:n.clientX,y:n.clientY},D(),v.current=setTimeout(()=>{N(t,r),p.current=!0,_.current=t,C.current={x:n.clientX,y:n.clientY},window.addEventListener("touchmove",E,{passive:!1}),V(r)},350)},onTouchMove:e=>{const n=e.touches[0];if(n){if(C.current={x:n.clientX,y:n.clientY},!p.current){const r=x.current;if(!r)return;Math.hypot(n.clientX-r.x,n.clientY-r.y)>8&&(D(),x.current=null);return}j(n.clientX,n.clientY)}},onTouchEnd:e=>{if(D(),!p.current){x.current=null;return}e.preventDefault();const n=l.current,r=_.current;n>=0&&r!==null&&n!==r&&H(n,r),P(!0)},onTouchCancel:()=>P(),draggable:!u&&!L,onDragEnd:()=>z(),onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move";const n=Y(e.currentTarget,t,e.clientY);n!==null&&S(n)},onDragStart:e=>{if(L){e.preventDefault();return}N(t,e.currentTarget),e.dataTransfer.setData("text/plain",""),e.dataTransfer.effectAllowed="move"},onDrop:e=>{e.preventDefault();const n=l.current,r=m;n<0||r===null||n===r||(H(n,r),z())},"data-component":"sortable",children:q.jsx(k.Provider,{value:{canMoveDown:t<R.length-1,canMoveUp:t>0,index:t,moveDown:()=>H(t,t+1),moveUp:()=>H(t,t-1)},children:o})},c??t)})})}exports.Sortable=nt;exports.useOptionalSortableItem=tt;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,24 +1,24 @@
1
- import { jsx as j } from "react/jsx-runtime";
2
- import { t as W } from "../../classix-DG18itHa.js";
3
- import L, { createContext as K, useMemo as $, useRef as u, useState as q, useEffect as Q, useContext as tt } from "react";
1
+ import { jsx as L } from "react/jsx-runtime";
2
+ import $ from "classix";
3
+ import N, { createContext as K, useMemo as q, useRef as u, useState as U, useEffect as Q, useContext as tt } from "react";
4
4
  import { List as et } from "../list/index.js";
5
- import '../../assets/index8.css';const nt = "_sortable_5vbjc_1", rt = "_dragging_5vbjc_13", ot = "_columns_5vbjc_38", ct = "_pseudo_5vbjc_47", b = {
5
+ import '../../assets/index8.css';const nt = "_sortable_1h6pg_1", rt = "_dragging_1h6pg_13", ot = "_columns_1h6pg_36", ct = "_pseudo_1h6pg_45", b = {
6
6
  sortable: nt,
7
7
  dragging: rt,
8
8
  columns: ot,
9
9
  pseudo: ct,
10
- "target-above": "_target-above_5vbjc_62",
11
- "target-below": "_target-below_5vbjc_63"
12
- }, U = K(null);
10
+ "target-above": "_target-above_1h6pg_60",
11
+ "target-below": "_target-below_1h6pg_61"
12
+ }, V = K(null);
13
13
  function dt() {
14
- return tt(U);
14
+ return tt(V);
15
15
  }
16
16
  const h = (s) => Number.parseFloat(s) || 0, lt = (s) => {
17
- const v = s.firstElementChild, i = s.getBoundingClientRect();
18
- if (v) {
19
- const y = v.getBoundingClientRect();
17
+ const w = s.firstElementChild, i = s.getBoundingClientRect();
18
+ if (w) {
19
+ const y = w.getBoundingClientRect();
20
20
  return {
21
- borderRadius: window.getComputedStyle(v).borderRadius,
21
+ borderRadius: window.getComputedStyle(w).borderRadius,
22
22
  height: y.height,
23
23
  width: y.width,
24
24
  wrapperHeight: i.height
@@ -34,18 +34,18 @@ const h = (s) => Number.parseFloat(s) || 0, lt = (s) => {
34
34
  };
35
35
  function ht({
36
36
  children: s,
37
- className: v,
37
+ className: w,
38
38
  columns: i = 1,
39
39
  isRearranging: l = !1,
40
40
  onChangeOrder: A,
41
41
  ...S
42
42
  }) {
43
- const y = Number.isFinite(i) ? Math.max(1, Math.floor(i)) : 1, C = $(() => L.Children.toArray(s), [s]), a = u(-1), N = $(() => typeof window < "u" && (navigator.maxTouchPoints > 0 || window.matchMedia("(pointer: coarse)").matches), []), p = u(!1), I = u(null), w = u(null), x = u(null), _ = u(0), E = u(null), m = u(null), M = u((o) => o.preventDefault()).current, [R, V] = q({
43
+ const y = Number.isFinite(i) ? Math.max(1, Math.floor(i)) : 1, C = q(() => N.Children.toArray(s), [s]), a = u(-1), P = q(() => typeof window < "u" && (navigator.maxTouchPoints > 0 || window.matchMedia("(pointer: coarse)").matches), []), g = u(!1), I = u(null), v = u(null), x = u(null), _ = u(0), E = u(null), p = u(null), M = u((o) => o.preventDefault()).current, [R, O] = U({
44
44
  borderRadius: "0px",
45
45
  height: 0,
46
46
  width: 0,
47
47
  wrapperHeight: 0
48
- }), [g, D] = q(null), O = {
48
+ }), [m, D] = U(null), j = {
49
49
  ...S.style,
50
50
  "--sortable-placeholder-height": `${R.height}px`,
51
51
  "--sortable-placeholder-radius": R.borderRadius,
@@ -54,13 +54,13 @@ function ht({
54
54
  if (t < 0 || t >= C.length || o === t) return;
55
55
  const c = C.slice(), [e] = c.splice(o, 1);
56
56
  c.splice(t, 0, e), A(c.map((n, r) => ({
57
- id: String(L.isValidElement(n) ? n.props["data-id"] ?? `idx-${r}` : `idx-${r}`),
57
+ id: String(N.isValidElement(n) ? n.props["data-id"] ?? `idx-${r}` : `idx-${r}`),
58
58
  weight: c.length - 1 - r
59
59
  })));
60
60
  }, T = () => {
61
- w.current !== null && (clearTimeout(w.current), w.current = null);
61
+ v.current !== null && (clearTimeout(v.current), v.current = null);
62
62
  }, B = () => {
63
- m.current !== null && (cancelAnimationFrame(m.current), m.current = null);
63
+ p.current !== null && (cancelAnimationFrame(p.current), p.current = null);
64
64
  }, Z = (o) => {
65
65
  let t = (o == null ? void 0 : o.parentElement) ?? null;
66
66
  for (; t; ) {
@@ -71,32 +71,32 @@ function ht({
71
71
  t = t.parentElement;
72
72
  }
73
73
  return document.scrollingElement instanceof HTMLElement ? document.scrollingElement : null;
74
- }, P = (o = !1) => {
75
- T(), B(), window.removeEventListener("touchmove", M), E.current = null, p.current = !1, I.current = null, x.current = null, _.current = o ? Date.now() + 500 : 0, a.current = -1, D(null);
76
- }, Y = (o, t) => {
77
- a.current = o, V(lt(t)), D(o);
78
- }, G = (o) => o instanceof Element && !!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'), z = (o, t, c) => {
74
+ }, Y = (o = !1) => {
75
+ T(), B(), window.removeEventListener("touchmove", M), E.current = null, g.current = !1, I.current = null, x.current = null, _.current = o ? Date.now() + 500 : 0, a.current = -1, D(null);
76
+ }, z = (o, t) => {
77
+ a.current = o, O(lt(t)), D(o);
78
+ }, G = (o) => o instanceof Element && !!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'), X = (o, t, c) => {
79
79
  const e = a.current;
80
80
  if (!Number.isInteger(t) || e < 0 || t === e) return null;
81
81
  const n = o.getBoundingClientRect(), r = t === e + 1 ? R.wrapperHeight : n.height, d = c > n.top + r / 2 ? t + 1 : t;
82
82
  return d > e ? d - 1 : d;
83
- }, X = (o, t) => {
83
+ }, k = (o, t) => {
84
84
  var n;
85
85
  const c = (n = document.elementFromPoint(o, t)) == null ? void 0 : n.closest("[data-sortable-index]");
86
86
  if (!c) return;
87
- const e = z(c, Number(c.dataset.sortableIndex), t);
87
+ const e = X(c, Number(c.dataset.sortableIndex), t);
88
88
  e !== null && (I.current = e, D(e));
89
89
  }, J = (o) => {
90
90
  const t = Z(o);
91
91
  if (!t) return;
92
92
  const c = 72, e = 18, n = () => {
93
- if (!p.current) {
94
- m.current = null;
93
+ if (!g.current) {
94
+ p.current = null;
95
95
  return;
96
96
  }
97
97
  const r = E.current;
98
98
  if (!r) {
99
- m.current = requestAnimationFrame(n);
99
+ p.current = requestAnimationFrame(n);
100
100
  return;
101
101
  }
102
102
  const f = t === document.scrollingElement ? {
@@ -114,20 +114,20 @@ function ht({
114
114
  d !== 0 && (t.scrollBy({
115
115
  top: d,
116
116
  behavior: "auto"
117
- }), X(r.x, r.y)), m.current = requestAnimationFrame(n);
117
+ }), k(r.x, r.y)), p.current = requestAnimationFrame(n);
118
118
  };
119
- B(), m.current = requestAnimationFrame(n);
120
- }, k = () => {
119
+ B(), p.current = requestAnimationFrame(n);
120
+ }, W = () => {
121
121
  a.current = -1, D(null);
122
122
  };
123
123
  return Q(() => () => {
124
124
  T(), B(), window.removeEventListener("touchmove", M);
125
- }, [M]), /* @__PURE__ */ j(et, { className: W(v, b.sortable, y > 1 && b.columns), columns: i, ordered: !0, style: O, ...S, "data-component": "sortable", children: C.map((o, t) => {
126
- const c = L.isValidElement(o) ? o.key : null;
127
- return /* @__PURE__ */ j("li", { "data-sortable-index": t, onClickCapture: (e) => {
125
+ }, [M]), /* @__PURE__ */ L(et, { className: $(w, b.sortable, y > 1 && b.columns), columns: i, ordered: !0, style: j, ...S, "data-component": "sortable", children: C.map((o, t) => {
126
+ const c = N.isValidElement(o) ? o.key : null;
127
+ return /* @__PURE__ */ L("li", { "data-sortable-index": t, onClickCapture: (e) => {
128
128
  _.current <= Date.now() || (e.preventDefault(), e.stopPropagation(), _.current = 0);
129
- }, className: W(g !== null && g > t - 10 && g < t + 10 && b.pseudo, g === t && a.current < t && b["target-below"], g === t && a.current > t && b["target-above"], a.current === t && b.dragging), onContextMenu: (e) => {
130
- (p.current || w.current !== null) && e.preventDefault();
129
+ }, className: $(m !== null && m > t - 10 && m < t + 10 && b.pseudo, m === t && a.current < t && b["target-below"], m === t && a.current > t && b["target-above"], a.current === t && b.dragging), onContextMenu: (e) => {
130
+ (g.current || v.current !== null) && e.preventDefault();
131
131
  }, onTouchStart: (e) => {
132
132
  if (l || G(e.target)) return;
133
133
  _.current = 0;
@@ -137,8 +137,8 @@ function ht({
137
137
  x.current = {
138
138
  x: n.clientX,
139
139
  y: n.clientY
140
- }, T(), w.current = setTimeout(() => {
141
- Y(t, r), p.current = !0, I.current = t, E.current = {
140
+ }, T(), v.current = setTimeout(() => {
141
+ z(t, r), g.current = !0, I.current = t, E.current = {
142
142
  x: n.clientX,
143
143
  y: n.clientY
144
144
  }, window.addEventListener("touchmove", M, {
@@ -151,37 +151,37 @@ function ht({
151
151
  if (E.current = {
152
152
  x: n.clientX,
153
153
  y: n.clientY
154
- }, !p.current) {
154
+ }, !g.current) {
155
155
  const r = x.current;
156
156
  if (!r) return;
157
157
  Math.hypot(n.clientX - r.x, n.clientY - r.y) > 8 && (T(), x.current = null);
158
158
  return;
159
159
  }
160
- X(n.clientX, n.clientY);
160
+ k(n.clientX, n.clientY);
161
161
  }
162
162
  }, onTouchEnd: (e) => {
163
- if (T(), !p.current) {
163
+ if (T(), !g.current) {
164
164
  x.current = null;
165
165
  return;
166
166
  }
167
167
  e.preventDefault();
168
168
  const n = a.current, r = I.current;
169
- n >= 0 && r !== null && n !== r && H(n, r), P(!0);
170
- }, onTouchCancel: () => P(), draggable: !l && !N, onDragEnd: () => k(), onDragOver: (e) => {
169
+ n >= 0 && r !== null && n !== r && H(n, r), Y(!0);
170
+ }, onTouchCancel: () => Y(), draggable: !l && !P, onDragEnd: () => W(), onDragOver: (e) => {
171
171
  e.preventDefault(), e.dataTransfer.dropEffect = "move";
172
- const n = z(e.currentTarget, t, e.clientY);
172
+ const n = X(e.currentTarget, t, e.clientY);
173
173
  n !== null && D(n);
174
174
  }, onDragStart: (e) => {
175
- if (N) {
175
+ if (P) {
176
176
  e.preventDefault();
177
177
  return;
178
178
  }
179
- Y(t, e.currentTarget), e.dataTransfer.setData("text/plain", ""), e.dataTransfer.effectAllowed = "move";
179
+ z(t, e.currentTarget), e.dataTransfer.setData("text/plain", ""), e.dataTransfer.effectAllowed = "move";
180
180
  }, onDrop: (e) => {
181
181
  e.preventDefault();
182
- const n = a.current, r = g;
183
- n < 0 || r === null || n === r || (H(n, r), k());
184
- }, "data-component": "sortable", children: /* @__PURE__ */ j(U.Provider, { value: {
182
+ const n = a.current, r = m;
183
+ n < 0 || r === null || n === r || (H(n, r), W());
184
+ }, "data-component": "sortable", children: /* @__PURE__ */ L(V.Provider, { value: {
185
185
  canMoveDown: t < C.length - 1,
186
186
  canMoveUp: t > 0,
187
187
  index: t,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const e=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),r=require("../../use-touched-Bq5Gjbpz.cjs"),m="_label_1e0ld_3",b="_textarea_1e0ld_12",j="_touched_1e0ld_31",t={label:m,textarea:b,touched:j},T=({className:c,label:a,maxRows:l=12,minRows:n=3,onBlur:u,required:s,style:d,value:o,...x})=>{const{touched:i,onBlur:h}=r.useTouched(o==="");return e.jsxs("label",{className:t.label,"data-component":"textarea",children:[a&&e.jsx("span",{"data-required":s||void 0,children:a}),e.jsx("textarea",{...x,className:_.t(t.textarea,c,i&&t.touched),onBlur:r.composeEventHandlers(h,u),required:s,style:{...d,"--min-rows":n,"--max-rows":l},value:o})]})};exports.Textarea=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const t=require("react/jsx-runtime"),x=require("classix"),s=require("../../use-touched-Bq5Gjbpz.cjs"),_="_label_mghuw_3",p="_caption_mghuw_7",g="_control_mghuw_12",w="_textarea_mghuw_22",b="_touched_mghuw_46",e={label:_,caption:p,control:g,textarea:w,touched:b},j=({className:n,label:o,maxRows:r=12,minRows:l=3,onBlur:u,required:a,style:d,value:c,...i})=>{const{touched:h,onBlur:m}=s.useTouched(c==="");return t.jsxs("label",{className:e.label,"data-component":"textarea",children:[o&&t.jsx("span",{className:e.caption,"data-required":a||void 0,children:o}),t.jsx("span",{className:e.control,children:t.jsx("textarea",{...i,className:x(e.textarea,n,h&&e.touched),onBlur:s.composeEventHandlers(m,u),required:a,style:{...d,"--min-rows":l,"--max-rows":r},value:c})})]})};exports.Textarea=j;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,35 +1,37 @@
1
- import { jsxs as _, jsx as r } from "react/jsx-runtime";
2
- import { t as h } from "../../classix-DG18itHa.js";
3
- import { u as i, c as p } from "../../use-touched-B999bBr8.js";
4
- import '../../assets/index6.css';const b = "_label_1e0ld_3", f = "_textarea_1e0ld_12", B = "_touched_1e0ld_31", e = {
5
- label: b,
6
- textarea: f,
7
- touched: B
8
- }, N = ({
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import i from "classix";
3
+ import { u as p, c as x } from "../../use-touched-B999bBr8.js";
4
+ import '../../assets/index6.css';const w = "_label_mghuw_3", g = "_caption_mghuw_7", b = "_control_mghuw_12", N = "_textarea_mghuw_22", f = "_touched_mghuw_46", t = {
5
+ label: w,
6
+ caption: g,
7
+ control: b,
8
+ textarea: N,
9
+ touched: f
10
+ }, T = ({
9
11
  className: s,
10
- label: t,
11
- maxRows: l = 12,
12
- minRows: c = 3,
13
- onBlur: n,
14
- required: a,
15
- style: d,
16
- value: o,
17
- ...m
12
+ label: a,
13
+ maxRows: n = 12,
14
+ minRows: r = 3,
15
+ onBlur: l,
16
+ required: e,
17
+ style: m,
18
+ value: c,
19
+ ...u
18
20
  }) => {
19
21
  const {
20
- touched: u,
21
- onBlur: x
22
- } = i(o === "");
23
- return /* @__PURE__ */ _("label", { className: e.label, "data-component": "textarea", children: [
24
- t && /* @__PURE__ */ r("span", { "data-required": a || void 0, children: t }),
25
- /* @__PURE__ */ r("textarea", { ...m, className: h(e.textarea, s, u && e.touched), onBlur: p(x, n), required: a, style: {
26
- ...d,
27
- "--min-rows": c,
28
- "--max-rows": l
29
- }, value: o })
22
+ touched: _,
23
+ onBlur: h
24
+ } = p(c === "");
25
+ return /* @__PURE__ */ d("label", { className: t.label, "data-component": "textarea", children: [
26
+ a && /* @__PURE__ */ o("span", { className: t.caption, "data-required": e || void 0, children: a }),
27
+ /* @__PURE__ */ o("span", { className: t.control, children: /* @__PURE__ */ o("textarea", { ...u, className: i(t.textarea, s, _ && t.touched), onBlur: x(h, l), required: e, style: {
28
+ ...m,
29
+ "--min-rows": r,
30
+ "--max-rows": n
31
+ }, value: c }) })
30
32
  ] });
31
33
  };
32
34
  export {
33
- N as Textarea
35
+ T as Textarea
34
36
  };
35
37
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const n=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),o=require("react"),q=require("../icon/index.cjs"),d="_toast_12yql_1",f="_active_12yql_21",m="_error_12yql_27",y="_success_12yql_36",c={toast:d,active:f,error:m,success:y},v=({label:i,type:r="success",onClick:u,onExitComplete:e,open:t=!0})=>{const[_,a]=o.useState(!1);return o.useEffect(()=>{if(!t)return a(!1);const s=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(s)},[t]),n.jsxs("div",{"aria-live":r==="error"?"assertive":"polite",className:l.t(c.toast,c[r],_&&c.active),onClick:u,onTransitionEnd:s=>{t||s.propertyName!=="opacity"||s.currentTarget!==s.target||e==null||e()},"data-component":"toast",children:[n.jsx(q.Icon,{name:r==="error"?"Warning":"CheckCircle"}),i]})};exports.Toast=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const n=require("react/jsx-runtime"),l=require("classix"),o=require("react"),q=require("../icon/index.cjs"),d="_toast_12yql_1",f="_active_12yql_21",m="_error_12yql_27",y="_success_12yql_36",c={toast:d,active:f,error:m,success:y},v=({label:i,type:e="success",onClick:u,onExitComplete:s,open:t=!0})=>{const[_,a]=o.useState(!1);return o.useEffect(()=>{if(!t)return a(!1);const r=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(r)},[t]),n.jsxs("div",{"aria-live":e==="error"?"assertive":"polite",className:l(c.toast,c[e],_&&c.active),onClick:u,onTransitionEnd:r=>{t||r.propertyName!=="opacity"||r.currentTarget!==r.target||s==null||s()},"data-component":"toast",children:[n.jsx(q.Icon,{name:e==="error"?"Warning":"CheckCircle"}),i]})};exports.Toast=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as u, jsx as m } from "react/jsx-runtime";
2
- import { t as _ } from "../../classix-DG18itHa.js";
2
+ import _ from "classix";
3
3
  import { useState as f, useEffect as l } from "react";
4
4
  import { Icon as q } from "../icon/index.js";
5
5
  import '../../assets/index5.css';const v = "_toast_12yql_1", y = "_active_12yql_21", d = "_error_12yql_27", h = "_success_12yql_36", a = {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const t=require("react/jsx-runtime"),g=require("../loading/index.cjs"),i="_toggle_ypbpl_1",p="_thumb_ypbpl_10",d="_track_ypbpl_21",e={toggle:i,thumb:p,track:d},u=({checked:s,disabled:a,isLoading:o,label:n,onChange:l})=>{const c=s!==void 0&&l===void 0;return t.jsxs("label",{className:e.toggle,onClick:r=>r.stopPropagation(),"data-component":"toggle",children:[t.jsx("input",{checked:s,disabled:a||o,onChange:l,readOnly:c,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:o?t.jsx(g.Loading,{}):t.jsx("span",{className:e.thumb})}),n&&t.jsx("span",{className:"toggle",children:n})]})};exports.Toggle=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const t=require("react/jsx-runtime"),g=require("../loading/index.cjs"),i="_toggle_1frmq_3",d="_thumb_1frmq_12",m="_track_1frmq_23",e={toggle:i,thumb:d,track:m},u=({checked:s,disabled:c,isLoading:o,label:n,onChange:a})=>{const l=s!==void 0&&a===void 0;return t.jsxs("label",{className:e.toggle,onClick:r=>r.stopPropagation(),"data-component":"toggle",children:[t.jsx("input",{checked:s,disabled:c||o,onChange:a,readOnly:l,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:o?t.jsx(g.Loading,{}):t.jsx("span",{className:e.thumb})}),n&&t.jsx("span",{className:"toggle",children:n})]})};exports.Toggle=u;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,24 +1,24 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
2
  import { Loading as g } from "../loading/index.js";
3
- import '../../assets/index3.css';const i = "_toggle_ypbpl_1", m = "_thumb_ypbpl_10", d = "_track_ypbpl_21", o = {
3
+ import '../../assets/index3.css';const i = "_toggle_1frmq_3", d = "_thumb_1frmq_12", p = "_track_1frmq_23", o = {
4
4
  toggle: i,
5
- thumb: m,
6
- track: d
7
- }, h = ({
5
+ thumb: d,
6
+ track: p
7
+ }, u = ({
8
8
  checked: s,
9
9
  disabled: c,
10
10
  isLoading: a,
11
11
  label: e,
12
- onChange: l
12
+ onChange: r
13
13
  }) => {
14
- const n = s !== void 0 && l === void 0;
15
- return /* @__PURE__ */ p("label", { className: o.toggle, onClick: (r) => r.stopPropagation(), "data-component": "toggle", children: [
16
- /* @__PURE__ */ t("input", { checked: s, disabled: c || a, onChange: l, readOnly: n, type: "checkbox" }),
14
+ const l = s !== void 0 && r === void 0;
15
+ return /* @__PURE__ */ m("label", { className: o.toggle, onClick: (n) => n.stopPropagation(), "data-component": "toggle", children: [
16
+ /* @__PURE__ */ t("input", { checked: s, disabled: c || a, onChange: r, readOnly: l, type: "checkbox" }),
17
17
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: o.track, children: a ? /* @__PURE__ */ t(g, {}) : /* @__PURE__ */ t("span", { className: o.thumb }) }),
18
18
  e && /* @__PURE__ */ t("span", { className: "toggle", children: e })
19
19
  ] });
20
20
  };
21
21
  export {
22
- h as Toggle
22
+ u as Toggle
23
23
  };
24
24
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index55.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_vp38k_1",n="_editor_vp38k_34",o={toolbar:s,default:"_default_vp38k_28",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/index56.css');const a=require("react/jsx-runtime"),l=require("classix"),s="_toolbar_vp38k_1",n="_editor_vp38k_34",o={toolbar:s,default:"_default_vp38k_28",editor:n},c=({children:t,variant:e="default"})=>a.jsx("div",{className:l(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,14 +1,14 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { t as e } from "../../classix-DG18itHa.js";
3
- import '../../assets/index55.css';const s = "_toolbar_vp38k_1", n = "_editor_vp38k_34", o = {
2
+ import e from "classix";
3
+ import '../../assets/index56.css';const s = "_toolbar_vp38k_1", n = "_editor_vp38k_34", o = {
4
4
  toolbar: s,
5
5
  default: "_default_vp38k_28",
6
6
  editor: n
7
- }, d = ({
7
+ }, c = ({
8
8
  children: t,
9
9
  variant: r = "default"
10
10
  }) => /* @__PURE__ */ l("div", { className: e(o.toolbar, o[r]), onClick: (a) => a.stopPropagation(), "data-component": "toolbar", children: t });
11
11
  export {
12
- d as Toolbar
12
+ c as Toolbar
13
13
  };
14
14
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index15.css');const s=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_r8l1k_1"},r={default:t.default,static:t.static},l=({variant:o="default",children:i,iconName:e,...n})=>s.jsxs("div",{className:c.t(t.tooltip,r[o]),...n,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{gap:"right",name:e}),i]});exports.Tooltip=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index16.css');const o=require("react/jsx-runtime"),c=require("classix"),a=require("../icon/index.cjs"),t={static:"_static_r8l1k_1"},r={default:t.default,static:t.static},l=({variant:s="default",children:i,iconName:e,...n})=>o.jsxs("div",{className:c(t.tooltip,r[s]),...n,"data-component":"tooltip",children:[e&&o.jsx(a.Icon,{gap:"right",name:e}),i]});exports.Tooltip=l;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
- import { t as l } from "../../classix-DG18itHa.js";
2
+ import l from "classix";
3
3
  import { Icon as e } from "../icon/index.js";
4
- import '../../assets/index15.css';const t = {
4
+ import '../../assets/index16.css';const t = {
5
5
  static: "_static_r8l1k_1"
6
6
  }, n = {
7
7
  default: t.default,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const o=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),n=require("../card/index.cjs"),l="_widget_1yaql_1",d="_color1_1yaql_21",a="_color2_1yaql_25",t={widget:l,color1:d,color2:a},_=({children:c,className:r,color:e,...s})=>o.jsx("div",{className:i.t(t.widget,r,e&&t[`color${e}`]),...s,"data-component":"widget",children:o.jsx(n.Card,{children:c})});exports.Widget=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const c=require("react/jsx-runtime"),i=require("classix"),l=require("../card/index.cjs"),a="_widget_4ck4n_1",d="_color1_4ck4n_26",_="_color2_4ck4n_30",u="_metric_4ck4n_55",g="_value_4ck4n_70",s={widget:a,color1:d,color2:_,metric:u,value:g},m=({children:o,className:t,color:n,metric:e,...r})=>c.jsx("div",{className:i(s.widget,t,n&&s[`color${n}`]),...r,"data-component":"widget",children:c.jsxs(l.Card,{children:[o,e&&c.jsxs("div",{className:s.metric,"aria-busy":e.busy,children:[c.jsx("span",{className:s.value,children:e.value}),e.children]})]})});exports.Widget=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,17 +1,26 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { t as i } from "../../classix-DG18itHa.js";
3
- import { Card as d } from "../card/index.js";
4
- import '../../assets/index2.css';const s = "_widget_1yaql_1", n = "_color1_1yaql_21", _ = "_color2_1yaql_25", r = {
5
- widget: s,
6
- color1: n,
7
- color2: _
8
- }, p = ({
9
- children: c,
10
- className: e,
11
- color: o,
1
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
+ import i from "classix";
3
+ import { Card as a } from "../card/index.js";
4
+ import '../../assets/index2.css';const d = "_widget_4ck4n_1", _ = "_color1_4ck4n_26", m = "_color2_4ck4n_30", u = "_metric_4ck4n_55", v = "_value_4ck4n_70", o = {
5
+ widget: d,
6
+ color1: _,
7
+ color2: m,
8
+ metric: u,
9
+ value: v
10
+ }, k = ({
11
+ children: n,
12
+ className: s,
13
+ color: e,
14
+ metric: c,
12
15
  ...l
13
- }) => /* @__PURE__ */ t("div", { className: i(r.widget, e, o && r[`color${o}`]), ...l, "data-component": "widget", children: /* @__PURE__ */ t(d, { children: c }) });
16
+ }) => /* @__PURE__ */ r("div", { className: i(o.widget, s, e && o[`color${e}`]), ...l, "data-component": "widget", children: /* @__PURE__ */ t(a, { children: [
17
+ n,
18
+ c && /* @__PURE__ */ t("div", { className: o.metric, "aria-busy": c.busy, children: [
19
+ /* @__PURE__ */ r("span", { className: o.value, children: c.value }),
20
+ c.children
21
+ ] })
22
+ ] }) });
14
23
  export {
15
- p as Widget
24
+ k as Widget
16
25
  };
17
26
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  import { jsxs as g, Fragment as k, jsx as r } from "react/jsx-runtime";
2
- import { t as m } from "./classix-DG18itHa.js";
2
+ import m from "classix";
3
3
  import { useId as A, useState as T, useEffect as V } from "react";
4
4
  import { i as D } from "./icons-CTtWkF6z.js";
5
5
  import { u as J, c as K } from "./use-touched-B999bBr8.js";
6
- import './assets/index49.css';function O(n) {
6
+ import './assets/index50.css';function O(n) {
7
7
  return n && `${n[0].toLocaleUpperCase()}${n.slice(1)}`;
8
8
  }
9
9
  function Q(n) {
@@ -24,11 +24,11 @@ function ae({
24
24
  defaultCountryCode: o = "+47",
25
25
  disabled: c = !1,
26
26
  errorMessage: w,
27
- icon: I,
27
+ icon: x,
28
28
  invalid: h = !1,
29
29
  label: p,
30
30
  onBlur: y,
31
- placeholder: x,
31
+ placeholder: I,
32
32
  ref: B,
33
33
  required: _,
34
34
  style: N,
@@ -45,7 +45,7 @@ function ae({
45
45
  } = a, {
46
46
  touched: E,
47
47
  onBlur: U
48
- } = J(d === ""), u = I && t !== "radio" && t !== "datetime-local" ? I : void 0, $ = p && f === "inline" ? Q(p) : p, b = h && w ? z : void 0, F = [a["aria-describedby"], b].filter(Boolean).join(" ") || void 0, P = u ? {
48
+ } = J(d === ""), u = x && t !== "radio" && t !== "datetime-local" ? x : void 0, $ = p && f === "inline" ? Q(p) : p, b = h && w ? z : void 0, F = [a["aria-describedby"], b].filter(Boolean).join(" ") || void 0, P = u ? {
49
49
  ...N,
50
50
  "--icon-svg": D(u)
51
51
  } : N, S = K(U, y);
@@ -64,14 +64,14 @@ function ae({
64
64
  t === "tel" && !d && (j(""), L(""));
65
65
  }, [t, d]);
66
66
  const W = /* @__PURE__ */ g(k, { children: [
67
- /* @__PURE__ */ r("input", { disabled: c, hidden: !0, onChange: s, pattern: void 0, placeholder: x, ref: B, type: t, value: d }),
67
+ /* @__PURE__ */ r("input", { disabled: c, hidden: !0, onChange: s, pattern: void 0, placeholder: I, ref: B, type: t, value: d }),
68
68
  /* @__PURE__ */ r("input", { type: "text", className: m(e.code, e.input), disabled: c, maxLength: 5, onChange: (i) => L(i.target.value), placeholder: o, value: v }),
69
69
  /* @__PURE__ */ r("input", { ...H, "aria-describedby": F, "aria-invalid": h ? !0 : a["aria-invalid"], type: "tel", className: m(e.input, n, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, maxLength: 14, name: void 0, onChange: (i) => j(i.target.value), onBlur: S, pattern: G, required: _, style: P, value: l })
70
70
  ] });
71
71
  return /* @__PURE__ */ g("div", { className: e.field, "data-component": "input", children: [
72
72
  /* @__PURE__ */ g("label", { className: m(e.label, f === "inline" && e.inline), children: [
73
73
  $ && /* @__PURE__ */ r("span", { "data-required": _ && f !== "inline" ? !0 : void 0, children: $ }),
74
- t === "tel" ? W : /* @__PURE__ */ r("input", { ...a, "aria-describedby": F, "aria-invalid": h ? !0 : a["aria-invalid"], ref: B, className: m(e.input, n, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, onBlur: S, placeholder: x, required: _, style: P, type: t })
74
+ t === "tel" ? W : /* @__PURE__ */ r("input", { ...a, "aria-describedby": F, "aria-invalid": h ? !0 : a["aria-invalid"], ref: B, className: m(e.input, n, E && e.touched), "data-icon": u ? "true" : void 0, disabled: c, onBlur: S, placeholder: I, required: _, style: P, type: t })
75
75
  ] }),
76
76
  b && /* @__PURE__ */ r("span", { className: e.error, id: b, role: "alert", children: w })
77
77
  ] });
@@ -80,4 +80,4 @@ export {
80
80
  ae as I,
81
81
  Q as f
82
82
  };
83
- //# sourceMappingURL=index-CMPTHneU.js.map
83
+ //# sourceMappingURL=index-BlirPoN9.js.map
@@ -1,15 +1,15 @@
1
1
  import { jsxs as m, jsx as p } from "react/jsx-runtime";
2
- import { t as v } from "./classix-DG18itHa.js";
2
+ import v from "classix";
3
3
  import { i as w } from "./icons-CTtWkF6z.js";
4
4
  import { u as C, c as S } from "./use-touched-B999bBr8.js";
5
- import './assets/index54.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
5
+ import './assets/index55.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
6
6
  function _(n) {
7
7
  return Object.fromEntries(Object.entries(n).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || P.has(e)));
8
8
  }
9
- const V = /^--[\w-]+$/, g = /^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/, E = /* @__PURE__ */ new Set(["currentcolor", "inherit", "initial", "revert", "revert-layer", "unset"]), l = typeof document < "u" ? document.createElement("span") : null;
9
+ const V = /^--[\w-]+$/, g = /^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/, x = /* @__PURE__ */ new Set(["currentcolor", "inherit", "initial", "revert", "revert-layer", "unset"]), l = typeof document < "u" ? document.createElement("span") : null;
10
10
  function b(n) {
11
11
  const e = n.trim();
12
- if (!e || !l || E.has(e.toLowerCase()))
12
+ if (!e || !l || x.has(e.toLowerCase()))
13
13
  return e;
14
14
  const a = document.body ?? document.documentElement;
15
15
  if (!a || (l.style.color = e, !l.style.color))
@@ -18,7 +18,7 @@ function b(n) {
18
18
  const o = getComputedStyle(l).color.trim();
19
19
  return l.remove(), o || e;
20
20
  }
21
- function N(n, e = "currentColor") {
21
+ function E(n, e = "currentColor") {
22
22
  var i;
23
23
  if (typeof document > "u")
24
24
  return e;
@@ -36,8 +36,8 @@ function N(n, e = "currentColor") {
36
36
  }
37
37
  return b(e);
38
38
  }
39
- const x = "_select_1bm47_3", B = "_touched_1bm47_24", j = "_label_1bm47_29", u = {
40
- select: x,
39
+ const N = "_select_1bm47_3", B = "_touched_1bm47_24", j = "_label_1bm47_29", u = {
40
+ select: N,
41
41
  touched: B,
42
42
  label: j
43
43
  }, F = ({
@@ -56,8 +56,8 @@ const x = "_select_1bm47_3", B = "_touched_1bm47_24", j = "_label_1bm47_29", u =
56
56
  ...h
57
57
  } = r, y = {
58
58
  ...f,
59
- "--icon-svg": w("CaretDown", N("--colors-semantic-content-secondary"))
60
- }, d = /* @__PURE__ */ m("select", { className: v(u.select, s, t && u.touched), onBlur: S(i, c), style: y, ...h, children: [
59
+ "--icon-svg": w("CaretDown", E("--colors-semantic-content-secondary"))
60
+ }, d = /* @__PURE__ */ m("select", { className: v(u.select, s, t && u.touched), onBlur: S(i, c), style: y, ...h, "data-component": "select", children: [
61
61
  a && /* @__PURE__ */ p("option", { value: "", hidden: !0, children: a }, "placeholder"),
62
62
  n
63
63
  ] });
@@ -68,7 +68,7 @@ const x = "_select_1bm47_3", B = "_touched_1bm47_24", j = "_label_1bm47_29", u =
68
68
  };
69
69
  export {
70
70
  F as S,
71
- N as r,
71
+ E as r,
72
72
  _ as s
73
73
  };
74
- //# sourceMappingURL=index-BIpgkB-u.js.map
74
+ //# sourceMappingURL=index-C3NJXvlq.js.map