@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.
- package/dist/assets/Degular.woff2 +0 -0
- package/dist/assets/Geist.woff2 +0 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -0
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index54.css +1 -1
- package/dist/assets/index55.css +1 -1
- package/dist/assets/index56.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/menu-popover.css +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/app-shell/index.cjs +1 -1
- package/dist/components/app-shell/index.js +3 -3
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +5 -5
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.js +30 -30
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +4 -4
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +2 -2
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +29 -29
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +54 -46
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +25 -25
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +34 -18
- package/dist/components/controls/index.cjs +2 -2
- package/dist/components/controls/index.js +11 -11
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +38 -38
- package/dist/components/divider/index.cjs +1 -1
- package/dist/components/divider/index.js +3 -3
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +89 -89
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +11 -11
- package/dist/components/editor/index.cjs +1 -55
- package/dist/components/editor/index.js +403 -16298
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +3 -3
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +14 -12
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +1 -1
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +12 -8
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +9 -9
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.js +12 -12
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +38 -11
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +49 -32
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +6 -6
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.js +71 -66
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +27 -14
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +62 -58
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +5 -5
- package/dist/components/menu/index.cjs +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +6 -6
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +31 -29
- package/dist/components/object/index.cjs +1 -1
- package/dist/components/object/index.js +1 -1
- package/dist/components/page-layout/index.cjs +1 -1
- package/dist/components/page-layout/index.js +33 -20
- package/dist/components/panel/index.cjs +2 -0
- package/dist/components/panel/index.js +25 -0
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +35 -35
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +22 -22
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +50 -50
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +49 -49
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +29 -27
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +10 -10
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +4 -4
- package/dist/components/tooltip/index.cjs +1 -1
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/widget/index.cjs +1 -1
- package/dist/components/widget/index.js +22 -13
- package/dist/{index-CMPTHneU.js → index-BlirPoN9.js} +8 -8
- package/dist/{index-BIpgkB-u.js → index-C3NJXvlq.js} +11 -11
- package/dist/index-CireNaZt.cjs +2 -0
- package/dist/index-O1kh8Vnq.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +379 -14
- package/dist/index.js +59 -56
- package/dist/menu-popover-Ceb_9V67.js +77 -0
- package/dist/menu-popover-bqblnK6P.cjs +2 -0
- package/dist/styles/fonts.css +11 -0
- package/dist/tokens.json +1 -1
- package/package.json +15 -8
- package/dist/classix-5H4IWnMA.cjs +0 -2
- package/dist/classix-5H4IWnMA.cjs.map +0 -1
- package/dist/classix-DG18itHa.js +0 -9
- package/dist/classix-DG18itHa.js.map +0 -1
- package/dist/components/app-link/index.cjs.map +0 -1
- package/dist/components/app-link/index.js.map +0 -1
- package/dist/components/app-shell/index.cjs.map +0 -1
- package/dist/components/app-shell/index.js.map +0 -1
- package/dist/components/aside/index.cjs.map +0 -1
- package/dist/components/aside/index.js.map +0 -1
- package/dist/components/avatar/index.cjs.map +0 -1
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/badge/index.cjs.map +0 -1
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/banner/index.cjs.map +0 -1
- package/dist/components/banner/index.js.map +0 -1
- package/dist/components/branding/index.cjs.map +0 -1
- package/dist/components/branding/index.js.map +0 -1
- package/dist/components/button/index.cjs.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/card/index.cjs.map +0 -1
- package/dist/components/card/index.js.map +0 -1
- package/dist/components/checkbox/index.cjs.map +0 -1
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/chip/index.cjs.map +0 -1
- package/dist/components/chip/index.js.map +0 -1
- package/dist/components/clipboard/index.cjs.map +0 -1
- package/dist/components/clipboard/index.js.map +0 -1
- package/dist/components/collapsible/index.cjs.map +0 -1
- package/dist/components/collapsible/index.js.map +0 -1
- package/dist/components/controls/index.cjs.map +0 -1
- package/dist/components/controls/index.js.map +0 -1
- package/dist/components/croppable/index.cjs.map +0 -1
- package/dist/components/croppable/index.js.map +0 -1
- package/dist/components/dialog/index.cjs.map +0 -1
- package/dist/components/dialog/index.js.map +0 -1
- package/dist/components/divider/index.cjs.map +0 -1
- package/dist/components/divider/index.js.map +0 -1
- package/dist/components/dropdown/index.cjs.map +0 -1
- package/dist/components/dropdown/index.js.map +0 -1
- package/dist/components/dropzone/index.cjs.map +0 -1
- package/dist/components/dropzone/index.js.map +0 -1
- package/dist/components/editor/index.cjs.map +0 -1
- package/dist/components/editor/index.js.map +0 -1
- package/dist/components/empty-state/index.cjs.map +0 -1
- package/dist/components/empty-state/index.js.map +0 -1
- package/dist/components/fieldset/index.cjs.map +0 -1
- package/dist/components/fieldset/index.js.map +0 -1
- package/dist/components/figure/index.cjs.map +0 -1
- package/dist/components/figure/index.js.map +0 -1
- package/dist/components/file/index.cjs.map +0 -1
- package/dist/components/file/index.js.map +0 -1
- package/dist/components/footer/index.cjs.map +0 -1
- package/dist/components/footer/index.js.map +0 -1
- package/dist/components/form/index.cjs.map +0 -1
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/graph/index.cjs.map +0 -1
- package/dist/components/graph/index.js.map +0 -1
- package/dist/components/group/index.cjs.map +0 -1
- package/dist/components/group/index.js.map +0 -1
- package/dist/components/header/index.cjs.map +0 -1
- package/dist/components/header/index.js.map +0 -1
- package/dist/components/icon/index.cjs.map +0 -1
- package/dist/components/icon/index.js.map +0 -1
- package/dist/components/iframe/index.cjs.map +0 -1
- package/dist/components/iframe/index.js.map +0 -1
- package/dist/components/image/index.cjs.map +0 -1
- package/dist/components/image/index.js.map +0 -1
- package/dist/components/input/index.cjs.map +0 -1
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/link/index.cjs.map +0 -1
- package/dist/components/link/index.js.map +0 -1
- package/dist/components/list/index.cjs.map +0 -1
- package/dist/components/list/index.js.map +0 -1
- package/dist/components/loading/index.cjs.map +0 -1
- package/dist/components/loading/index.js.map +0 -1
- package/dist/components/menu/index.cjs.map +0 -1
- package/dist/components/menu/index.js.map +0 -1
- package/dist/components/message/index.cjs.map +0 -1
- package/dist/components/message/index.js.map +0 -1
- package/dist/components/messages/index.cjs.map +0 -1
- package/dist/components/messages/index.js.map +0 -1
- package/dist/components/nav/index.cjs.map +0 -1
- package/dist/components/nav/index.js.map +0 -1
- package/dist/components/object/index.cjs.map +0 -1
- package/dist/components/object/index.js.map +0 -1
- package/dist/components/page-layout/index.cjs.map +0 -1
- package/dist/components/page-layout/index.js.map +0 -1
- package/dist/components/popover/index.cjs.map +0 -1
- package/dist/components/popover/index.js.map +0 -1
- package/dist/components/portal/index.cjs.map +0 -1
- package/dist/components/portal/index.js.map +0 -1
- package/dist/components/search/index.cjs.map +0 -1
- package/dist/components/search/index.js.map +0 -1
- package/dist/components/select/index.cjs.map +0 -1
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/sortable/index.cjs.map +0 -1
- package/dist/components/sortable/index.js.map +0 -1
- package/dist/components/table/index.cjs.map +0 -1
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/textarea/index.cjs.map +0 -1
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/toast/index.cjs.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toasts/index.cjs.map +0 -1
- package/dist/components/toasts/index.js.map +0 -1
- package/dist/components/toggle/index.cjs.map +0 -1
- package/dist/components/toggle/index.js.map +0 -1
- package/dist/components/toolbar/index.cjs.map +0 -1
- package/dist/components/toolbar/index.js.map +0 -1
- package/dist/components/tooltip/index.cjs.map +0 -1
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/widget/index.cjs.map +0 -1
- package/dist/components/widget/index.js.map +0 -1
- package/dist/icons-B3hIY9Bm.cjs.map +0 -1
- package/dist/icons-CTtWkF6z.js.map +0 -1
- package/dist/index-BIpgkB-u.js.map +0 -1
- package/dist/index-Bbauu1No.cjs +0 -2
- package/dist/index-Bbauu1No.cjs.map +0 -1
- package/dist/index-CMPTHneU.js.map +0 -1
- package/dist/index-DAjU2bTe.cjs +0 -2
- package/dist/index-DAjU2bTe.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/menu-popover-BV7nUXlb.js +0 -77
- package/dist/menu-popover-BV7nUXlb.js.map +0 -1
- package/dist/menu-popover-fGpFDJTo.cjs +0 -2
- package/dist/menu-popover-fGpFDJTo.cjs.map +0 -1
- package/dist/use-touched-B999bBr8.js.map +0 -1
- package/dist/use-touched-Bq5Gjbpz.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "classix";
|
|
3
3
|
import "../../icons-CTtWkF6z.js";
|
|
4
|
-
import { S as e } from "../../index-
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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 = "
|
|
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-
|
|
11
|
-
"target-below": "_target-
|
|
12
|
-
},
|
|
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(
|
|
14
|
+
return tt(V);
|
|
15
15
|
}
|
|
16
16
|
const h = (s) => Number.parseFloat(s) || 0, lt = (s) => {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
const y =
|
|
17
|
+
const w = s.firstElementChild, i = s.getBoundingClientRect();
|
|
18
|
+
if (w) {
|
|
19
|
+
const y = w.getBoundingClientRect();
|
|
20
20
|
return {
|
|
21
|
-
borderRadius: window.getComputedStyle(
|
|
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:
|
|
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 =
|
|
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
|
-
}), [
|
|
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(
|
|
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
|
-
|
|
61
|
+
v.current !== null && (clearTimeout(v.current), v.current = null);
|
|
62
62
|
}, B = () => {
|
|
63
|
-
|
|
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
|
-
},
|
|
75
|
-
T(), B(), window.removeEventListener("touchmove", M), E.current = null,
|
|
76
|
-
},
|
|
77
|
-
a.current = o,
|
|
78
|
-
}, G = (o) => o instanceof Element && !!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'),
|
|
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
|
-
},
|
|
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 =
|
|
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 (!
|
|
94
|
-
|
|
93
|
+
if (!g.current) {
|
|
94
|
+
p.current = null;
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
const r = E.current;
|
|
98
98
|
if (!r) {
|
|
99
|
-
|
|
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
|
-
}),
|
|
117
|
+
}), k(r.x, r.y)), p.current = requestAnimationFrame(n);
|
|
118
118
|
};
|
|
119
|
-
B(),
|
|
120
|
-
},
|
|
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__ */
|
|
126
|
-
const c =
|
|
127
|
-
return /* @__PURE__ */
|
|
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:
|
|
130
|
-
(
|
|
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(),
|
|
141
|
-
|
|
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
|
-
}, !
|
|
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
|
-
|
|
160
|
+
k(n.clientX, n.clientY);
|
|
161
161
|
}
|
|
162
162
|
}, onTouchEnd: (e) => {
|
|
163
|
-
if (T(), !
|
|
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),
|
|
170
|
-
}, onTouchCancel: () =>
|
|
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 =
|
|
172
|
+
const n = X(e.currentTarget, t, e.clientY);
|
|
173
173
|
n !== null && D(n);
|
|
174
174
|
}, onDragStart: (e) => {
|
|
175
|
-
if (
|
|
175
|
+
if (P) {
|
|
176
176
|
e.preventDefault();
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
|
|
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 =
|
|
183
|
-
n < 0 || r === null || n === r || (H(n, r),
|
|
184
|
-
}, "data-component": "sortable", children: /* @__PURE__ */
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { u as
|
|
4
|
-
import '../../assets/index6.css';const b = "
|
|
5
|
-
label:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
11
|
-
maxRows:
|
|
12
|
-
minRows:
|
|
13
|
-
onBlur:
|
|
14
|
-
required:
|
|
15
|
-
style:
|
|
16
|
-
value:
|
|
17
|
-
...
|
|
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:
|
|
21
|
-
onBlur:
|
|
22
|
-
} =
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
...
|
|
27
|
-
"--min-rows":
|
|
28
|
-
"--max-rows":
|
|
29
|
-
}, value:
|
|
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
|
-
|
|
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("
|
|
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
|
|
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="
|
|
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
|
|
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 = "
|
|
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:
|
|
6
|
-
track:
|
|
7
|
-
},
|
|
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:
|
|
12
|
+
onChange: r
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ t("input", { checked: s, disabled: c || a, onChange:
|
|
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
|
-
|
|
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/
|
|
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
|
|
3
|
-
import '../../assets/
|
|
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
|
-
},
|
|
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
|
-
|
|
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/
|
|
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
|
|
2
|
+
import l from "classix";
|
|
3
3
|
import { Icon as e } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
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
|
|
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
|
|
3
|
-
import { Card as
|
|
4
|
-
import '../../assets/index2.css';const
|
|
5
|
-
widget:
|
|
6
|
-
color1:
|
|
7
|
-
color2:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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__ */
|
|
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
|
-
|
|
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
|
|
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/
|
|
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:
|
|
27
|
+
icon: x,
|
|
28
28
|
invalid: h = !1,
|
|
29
29
|
label: p,
|
|
30
30
|
onBlur: y,
|
|
31
|
-
placeholder:
|
|
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 =
|
|
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:
|
|
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:
|
|
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-
|
|
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
|
|
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/
|
|
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*(.+))?\)$/,
|
|
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 ||
|
|
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
|
|
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
|
|
40
|
-
select:
|
|
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",
|
|
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
|
-
|
|
71
|
+
E as r,
|
|
72
72
|
_ as s
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=index-
|
|
74
|
+
//# sourceMappingURL=index-C3NJXvlq.js.map
|