@strapi/design-system 2.2.3 → 2.2.4
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/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("styled-components"),X=require("react"),xr=require("@radix-ui/react-use-callback-ref"),F=require("@internationalized/date"),r=require("react/jsx-runtime"),$r=require("@radix-ui/react-tooltip"),Zn=require("@radix-ui/react-dismissable-layer"),D=require("@strapi/ui-primitives"),Jn=require("@radix-ui/react-accordion"),O=require("@strapi/icons"),eo=require("@radix-ui/react-avatar"),to=require("@radix-ui/react-dropdown-menu"),ro=require("@radix-ui/react-checkbox"),no=require("@tanstack/react-virtual"),oo=require("@radix-ui/react-scroll-area"),ao=require("@radix-ui/react-alert-dialog"),Fe=require("@floating-ui/react-dom"),so=require("@radix-ui/react-focus-guards"),io=require("@radix-ui/react-focus-scope"),lo=require("react-remove-scroll"),co=require("react-dom"),Xt=require("@codemirror/lang-json"),uo=require("@uiw/react-codemirror"),Rt=require("@codemirror/state"),bt=require("@codemirror/view"),ho=require("@radix-ui/react-dialog"),Zt=require("@internationalized/number"),fo=require("@radix-ui/react-popover"),go=require("@radix-ui/react-progress"),po=require("@radix-ui/react-radio-group"),mo=require("@radix-ui/react-switch"),bo=require("@radix-ui/react-tabs"),Je=require("lodash");function ee(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=ee(X),xe=ee($r),xo=ee(Zn),Ue=ee(Jn),Tt=ee(eo),ce=ee(to),yr=ee(ro),ot=ee(oo),pe=ee(ao),Te=ee(ho),Le=ee(fo),wr=ee(go),It=ee(po),Cr=ee(mo),at=ee(bo),Oe=(e,t)=>{const n=l.createContext(t),o=i=>{const{children:c,...d}=i,u=l.useMemo(()=>d,Object.values(d));return r.jsx(n.Provider,{value:u,children:c})};function a(i){const c=l.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return o.displayName=`${e}Provider`,[o,a]};function $o(e,t){return typeof e=="string"?!1:t in e}function et(e){return e&&typeof e=="object"&&!Array.isArray(e)}function _e(e,t,n){return e&&t&&$o(e,t)?e[t]:n}const Jt={padding:["padding-block-start","padding-inline-end","padding-block-end","padding-inline-start"],paddingTop:"padding-block-start",paddingRight:"padding-inline-end",paddingBottom:"padding-block-end",paddingLeft:"padding-inline-start",margin:["margin-block-start","margin-inline-end","margin-block-end","margin-inline-start"],marginLeft:"margin-inline-start",marginRight:"margin-inline-end",marginTop:"margin-block-start",marginBottom:"margin-block-end",borderRadius:"border-radius",borderStyle:"border-style",borderWidth:"border-width",borderColor:"border-color",fontSize:"font-size",fontWeight:"font-weight",lineHeight:"line-height",zIndex:"z-index",boxShadow:"box-shadow",pointerEvents:"pointer-events",textAlign:"text-align",textTransform:"text-transform",textDecoration:"text-decoration",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexBasis:"flex-basis",minWidth:"min-width",maxWidth:"max-width",minHeight:"min-height",maxHeight:"max-height",order:"order",flexDirection:"flex-direction",flexWrap:"flex-wrap",justifyContent:"justify-content",alignItems:"align-items"},yo=e=>{const[t,n,o,a]=e,i=n??t;return[t,i,o??t,a??i]};function wo(e,t){switch(e){case"gap":case"padding":case"margin":case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":case"marginTop":case"marginLeft":case"marginRight":case"marginBottom":case"left":case"right":case"top":case"bottom":case"width":case"maxWidth":case"minWidth":case"height":case"maxHeight":case"minHeight":case"borderRadius":case"borderWidth":return t.spaces;case"color":case"background":case"borderColor":return t.colors;case"fontSize":return t.fontSizes;case"fontWeight":return t.fontWeights;case"lineHeight":return t.lineHeights;case"zIndex":return t.zIndices;case"boxShadow":return t.shadows;default:return null}}const ke=(e,t)=>{const n=Object.entries(e).reduce((o,a)=>{const[i,c]=a,d=wo(i,t),u=Object.prototype.hasOwnProperty.call(Jt,i)?Jt[i]:i;return u&&(c||c===0)&&(typeof c=="object"&&!Array.isArray(c)?Object.entries(c).forEach(([h,f])=>{o[h]={...o[h],...er(u,f,d)}}):o.initial={...o.initial,...er(u,c,d)}),o},{initial:{},small:{},medium:{},large:{}});return Object.entries(n).reduce((o,[a,i])=>{if(i&&Object.keys(i).length>0){const c=Object.entries(i).reduce((d,[u,h])=>(d.push(`${u}: ${h};`),d),[]).join(`
|
|
2
2
|
`);a==="initial"?o.push(c):o.push(`${t.breakpoints[a]}{ ${c} }`)}return o},[]).join(`
|
|
3
|
-
`)},er=(e,t,n)=>{if(Array.isArray(e)&&Array.isArray(t)){const o=yo(t);return e.reduce((a,i,c)=>(a[i]=_e(n,o[c],o[c]),a),{})}else return Array.isArray(e)&&!Array.isArray(t)?e.reduce((o,a)=>(o[a]=_e(n,t,t),o),{}):!Array.isArray(e)&&!Array.isArray(t)?{[e]:_e(n,t,t)}:(console.warn("You've passed an array of values to a property that does not support it. Please check the property and value you're passing."),{})},v=l.forwardRef(({animation:e,background:t,basis:n,borderColor:o,borderRadius:a,borderStyle:i,borderWidth:c,bottom:d,color:u,cursor:h,display:f,flex:g,fontSize:p,fontWeight:
|
|
3
|
+
`)},er=(e,t,n)=>{if(Array.isArray(e)&&Array.isArray(t)){const o=yo(t);return e.reduce((a,i,c)=>(a[i]=_e(n,o[c],o[c]),a),{})}else return Array.isArray(e)&&!Array.isArray(t)?e.reduce((o,a)=>(o[a]=_e(n,t,t),o),{}):!Array.isArray(e)&&!Array.isArray(t)?{[e]:_e(n,t,t)}:(console.warn("You've passed an array of values to a property that does not support it. Please check the property and value you're passing."),{})},v=l.forwardRef(({animation:e,background:t,basis:n,borderColor:o,borderRadius:a,borderStyle:i,borderWidth:c,bottom:d,color:u,cursor:h,display:f,flex:g,fontSize:p,fontWeight:C,grow:m,hasRadius:x,height:k,left:S,lineHeight:$,margin:w,marginBottom:j,marginLeft:T,marginRight:b,marginTop:R,maxHeight:z,maxWidth:E,minHeight:A,minWidth:U,order:B,overflow:N,padding:H,paddingBottom:P,paddingLeft:K,paddingRight:L,paddingTop:M,pointerEvents:Z,position:G,right:oe,shadow:Y,shrink:J,tag:_,textAlign:Q,textTransform:de,top:$e,transform:ye,transition:fe,width:Ie,zIndex:we,...Be},Ne)=>{const Ce=_||"div",V={$animation:e,$background:t,$basis:n,$borderColor:o,$borderRadius:a,$borderStyle:i,$borderWidth:c,$bottom:d,$color:u,$cursor:h,$display:f,$flex:g,$fontSize:p,$fontWeight:C,$grow:m,$hasRadius:x,$height:k,$left:S,$lineHeight:$,$margin:w,$marginBottom:j,$marginLeft:T,$marginRight:b,$marginTop:R,$maxHeight:z,$maxWidth:E,$minHeight:A,$minWidth:U,$order:B,$overflow:N,$padding:H,$paddingBottom:P,$paddingLeft:K,$paddingRight:L,$paddingTop:M,$pointerEvents:Z,$position:G,$right:oe,$shadow:Y,$shrink:J,$textAlign:Q,$textTransform:de,$top:$e,$transform:ye,$transition:fe,$width:Ie,$zIndex:we};return r.jsx(Co,{as:Ce,ref:Ne,...V,...Be})}),Co=s.styled.div`
|
|
4
4
|
${({theme:e,...t})=>ke({animation:t.$animation,background:t.$background,borderColor:t.$borderColor,borderRadius:t.$hasRadius?e.borderRadius:t.$borderRadius,borderStyle:t.$borderColor&&!t.$borderStyle?"solid":t.$borderStyle,borderWidth:t.$borderColor&&!t.$borderWidth?"1px":t.$borderWidth,bottom:t.$bottom,boxShadow:t.$shadow,color:t.$color,cursor:t.$cursor,display:t.$display,flex:t.$flex,flexBasis:t.$basis,flexGrow:t.$grow,flexShrink:t.$shrink,fontSize:t.$fontSize,fontWeight:t.$fontWeight,height:t.$height,left:t.$left,lineHeight:t.$lineHeight,margin:t.$margin,marginBottom:t.$marginBottom,marginLeft:t.$marginLeft,marginRight:t.$marginRight,marginTop:t.$marginTop,maxHeight:t.$maxHeight,maxWidth:t.$maxWidth,minHeight:t.$minHeight,minWidth:t.$minWidth,order:t.$order,overflow:t.$overflow,padding:t.$padding,paddingBottom:t.$paddingBottom,paddingLeft:t.$paddingLeft,paddingRight:t.$paddingRight,paddingTop:t.$paddingTop,pointerEvents:t.$pointerEvents,position:t.$position,right:t.$right,textAlign:t.$textAlign,textTransform:t.$textTransform,top:t.$top,transform:t.$transform,transition:t.$transition,width:t.$width,zIndex:t.$zIndex},e)};
|
|
5
|
-
`,ae=l.forwardRef,
|
|
5
|
+
`,ae=l.forwardRef,y=ae((e,t)=>{const{className:n,alignItems:o,direction:a,inline:i,gap:c,justifyContent:d,wrap:u,...h}=e,f={$alignItems:o,$direction:a,$gap:c,$justifyContent:d,$wrap:u,$inline:i};return r.jsx(jo,{className:n,ref:t,...f,...h})}),jo=s.styled(v)`
|
|
6
6
|
${({theme:e,$display:t="flex",$alignItems:n="center",$direction:o="row",...a})=>ke({gap:a.$gap,alignItems:n,justifyContent:a.$justifyContent,flexWrap:a.$wrap,flexDirection:o,display:a.$inline?"inline-flex":t},e)};
|
|
7
7
|
`,vo="alpha",ko="beta",So="delta",Ro="epsilon",tr="omega",To="pi",Io="sigma",jr=s.css`
|
|
8
8
|
display: block;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
font-size: ${t.fontSizes[2]};
|
|
189
189
|
}
|
|
190
190
|
`}
|
|
191
|
-
`}},
|
|
191
|
+
`}},I=ae((e,t)=>{const{ellipsis:n,textColor:o="currentcolor",textDecoration:a,textTransform:i,variant:c,lineHeight:d,fontWeight:u,fontSize:h,...f}=e,g={$ellipsis:n,$textColor:o,$textDecoration:a,$textTransform:i,$variant:c,$lineHeight:d,$fontWeight:u,$fontSize:h};return r.jsx(Eo,{ref:t,tag:"span",...g,...f})}),Eo=s.styled(v)`
|
|
192
192
|
${({$variant:e,$fontSize:t,$lineHeight:n,theme:o})=>Do({$variant:e,theme:o,$fontSize:t,$lineHeight:n})}
|
|
193
193
|
${({$ellipsis:e})=>e?jr:""}
|
|
194
194
|
|
|
@@ -243,14 +243,14 @@
|
|
|
243
243
|
transition: box-shadow ${e=>e.theme.motion.timings[120]}
|
|
244
244
|
${e=>e.theme.motion.easings.easeOutQuad};
|
|
245
245
|
}
|
|
246
|
-
`,Mo=l.forwardRef(({caretPosition:e="left",description:t,icon:n,iconProps:o,children:a,...i},c)=>{const{size:d}=Dt("Trigger");return r.jsxs(kr,{$caretPosition:e,$size:d,ref:c,...i,children:[e==="left"?r.jsx(tt,{$size:d,children:r.jsx(O.CaretDown,{width:d==="S"?"1.2rem":"1.6rem",height:d==="S"?"1.2rem":"1.6rem"})}):null,r.jsxs(
|
|
246
|
+
`,Mo=l.forwardRef(({caretPosition:e="left",description:t,icon:n,iconProps:o,children:a,...i},c)=>{const{size:d}=Dt("Trigger");return r.jsxs(kr,{$caretPosition:e,$size:d,ref:c,...i,children:[e==="left"?r.jsx(tt,{$size:d,children:r.jsx(O.CaretDown,{width:d==="S"?"1.2rem":"1.6rem",height:d==="S"?"1.2rem":"1.6rem"})}):null,r.jsxs(y,{tag:"span",gap:2,overflow:"hidden",children:[n&&d==="S"?r.jsx(vr,{children:r.jsx(n,{...o})}):null,r.jsxs(y,{alignItems:"flex-start",direction:"column",tag:"span",ref:c,overflow:"hidden",children:[r.jsx(I,{fontWeight:d==="S"?"bold":void 0,ellipsis:!0,variant:d==="M"?"delta":void 0,textAlign:"left",width:"100%",children:a}),t&&d==="M"?r.jsx(I,{textAlign:"left",children:t}):null]})]}),e==="right"?r.jsx(tt,{$size:d,children:r.jsx(O.CaretDown,{width:d==="S"?"1.2rem":"1.6rem",height:d==="S"?"1.2rem":"1.6rem"})}):null]})}),vr=s.styled(v)`
|
|
247
247
|
color: ${e=>e.theme.colors.neutral500};
|
|
248
248
|
display: flex;
|
|
249
249
|
|
|
250
250
|
@media (prefers-reduced-motion: no-preference) {
|
|
251
251
|
transition: ${e=>e.theme.transitions.color};
|
|
252
252
|
}
|
|
253
|
-
`,tt=s.styled(
|
|
253
|
+
`,tt=s.styled(y).attrs(e=>({...e,tag:"span"}))`
|
|
254
254
|
background-color: ${e=>e.theme.colors.neutral200};
|
|
255
255
|
width: ${e=>e.$size==="S"?"2.4rem":"3.2rem"};
|
|
256
256
|
height: ${e=>e.$size==="S"?"2.4rem":"3.2rem"};
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
@media (prefers-reduced-motion: no-preference) {
|
|
293
293
|
transition: ${e=>e.theme.transitions.color};
|
|
294
294
|
}
|
|
295
|
-
`,Bo=l.forwardRef((e,t)=>{const{size:n}=Dt("Trigger");return r.jsx(Sr,{$size:n,...e,ref:t})}),Sr=s.styled(
|
|
295
|
+
`,Bo=l.forwardRef((e,t)=>{const{size:n}=Dt("Trigger");return r.jsx(Sr,{$size:n,...e,ref:t})}),Sr=s.styled(y).attrs(e=>({...e,tag:"span"}))`
|
|
296
296
|
padding-inline: ${e=>e.$size==="S"?e.theme.spaces[2]:e.theme.spaces[6]};
|
|
297
297
|
padding-block: ${e=>e.$size==="S"?e.theme.spaces[2]:e.theme.spaces[6]};
|
|
298
298
|
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
width: 1px;
|
|
412
412
|
`,Se=({children:e,label:t})=>{const n=l.Children.only(e);return r.jsxs(r.Fragment,{children:[l.cloneElement(n,{"aria-hidden":"true",focusable:"false"}),r.jsx(me,{children:t})]})};Se.displayName="AccessibleIcon";const Rr=e=>{switch(e){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},Go=e=>Rr(e).replace("100","200"),xt=({theme:e,$variant:t})=>t==="danger"?e.colors.danger700:t==="success"?e.colors.success700:t==="warning"?e.colors.warning700:e.colors.primary700,Ko=s.styled(v)`
|
|
413
413
|
${st};
|
|
414
|
-
`,Yo=s.styled(
|
|
414
|
+
`,Yo=s.styled(y)`
|
|
415
415
|
svg {
|
|
416
416
|
height: 100%;
|
|
417
417
|
width: 100%;
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
svg path {
|
|
429
429
|
fill: ${xt};
|
|
430
430
|
}
|
|
431
|
-
`,Zo=({title:e,children:t,variant:n="default",onClose:o,closeLabel:a,titleAs:i="p",action:c,...d})=>r.jsxs(
|
|
431
|
+
`,Zo=({title:e,children:t,variant:n="default",onClose:o,closeLabel:a,titleAs:i="p",action:c,...d})=>r.jsxs(y,{alignItems:"flex-start",background:Rr(n),borderColor:Go(n),shadow:"filterShadow",gap:3,hasRadius:!0,padding:5,paddingRight:6,...d,children:[r.jsx(Yo,{height:"2rem",shrink:0,$variant:n,width:"2rem",children:r.jsx(Qo,{"aria-hidden":!0,variant:n})}),r.jsxs(y,{alignItems:"start",gap:c?2:1,wrap:"wrap",role:n==="danger"?"alert":"status",width:"100%",children:[e&&r.jsx(I,{fontWeight:"bold",textColor:"neutral800",tag:i,children:e}),r.jsx(I,{tag:"p",textColor:"neutral800",children:t}),c&&r.jsx(Xo,{$variant:n,children:c})]}),r.jsx(Ko,{tag:"button",background:"transparent",borderColor:void 0,height:"1.6rem",width:"1.6rem",marginTop:1,onClick:o,color:"neutral700",children:r.jsx(Se,{label:a,children:r.jsx(O.Cross,{})})})]});function le({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,a]=Et({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o,d=xr.useCallbackRef(n),u=l.useCallback(h=>{if(i){const g=typeof h=="function"?h(e):h;g!==e&&d(g)}else a(h)},[i,e,a,d]);return[c,u]}function Et({defaultProp:e,onChange:t}){const n=l.useState(e),[o]=n,a=l.useRef(o),i=xr.useCallbackRef(t);return l.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),n}const $t={easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",easeInOutFast:"cubic-bezier(1,0,0,1)",authenticMotion:"cubic-bezier(.4,0,.2,1)"},yt={320:"320ms",200:"200ms",120:"120ms"},Jo={color:`color ${yt[120]} ${$t.easeOutQuad}`,backgroundColor:`background-color ${yt[120]} ${$t.easeOutQuad}`},q={overlayFadeIn:s.keyframes`
|
|
432
432
|
from {
|
|
433
433
|
opacity: 0;
|
|
434
434
|
}
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
to {
|
|
522
522
|
opacity: 0;
|
|
523
523
|
}
|
|
524
|
-
`},qe=32,rr=2,ea=l.forwardRef(({onLoadingStatusChange:e,delayMs:t=600,src:n,alt:o,crossOrigin:a,fallback:i,preview:c=!1,...d},u)=>{const[h,f]=le({onChange:e}),[g,p]=l.useState(!1),
|
|
524
|
+
`},qe=32,rr=2,ea=l.forwardRef(({onLoadingStatusChange:e,delayMs:t=600,src:n,alt:o,crossOrigin:a,fallback:i,preview:c=!1,...d},u)=>{const[h,f]=le({onChange:e}),[g,p]=l.useState(!1),C=c&&h==="loaded",m=x=>{C&&p(x)};return r.jsxs(xe.Root,{onOpenChange:m,children:[r.jsx(xe.Trigger,{asChild:!0,children:r.jsxs(wt,{ref:u,...d,children:[C?r.jsx(ta,{width:"100%",height:"100%",position:"absolute",background:"neutral0",zIndex:"overlay",style:{opacity:g?.4:0}}):null,r.jsx(ra,{src:n,alt:o,crossOrigin:a,onLoadingStatusChange:f}),r.jsx(Tt.Fallback,{delayMs:t,children:r.jsx(I,{fontWeight:"bold",textTransform:"uppercase",children:i})})]})}),C?r.jsx(xe.Portal,{children:r.jsx(na,{side:"top",sideOffset:4,children:r.jsx(oa,{src:n,alt:o,crossOrigin:a})})}):null]})}),Tr=s.css`
|
|
525
525
|
display: inline-flex;
|
|
526
526
|
align-items: center;
|
|
527
527
|
justify-content: center;
|
|
@@ -562,11 +562,11 @@
|
|
|
562
562
|
}
|
|
563
563
|
`,oa=s.styled.img`
|
|
564
564
|
${Ir}
|
|
565
|
-
`,aa=l.forwardRef((e,t)=>r.jsx(sa,{...e,ref:t,tag:"div"})),sa=s.styled(
|
|
565
|
+
`,aa=l.forwardRef((e,t)=>r.jsx(sa,{...e,ref:t,tag:"div"})),sa=s.styled(y)`
|
|
566
566
|
& > ${wt} + ${wt} {
|
|
567
567
|
margin-left: -${qe/10/2}rem;
|
|
568
568
|
}
|
|
569
|
-
`,ia=Object.freeze(Object.defineProperty({__proto__:null,Group:aa,Item:ea},Symbol.toStringTag,{value:"Module"})),At=({active:e=!1,size:t="M",textColor:n="neutral600",backgroundColor:o="neutral150",variant:a,children:i,minWidth:c=5,...d})=>{const u=t==="S"?1:2,h=a?{backgroundColor:`${a}200`,textColor:`${a}700`}:{backgroundColor:o,textColor:n};return r.jsx(la,{inline:!0,alignItems:"center",justifyContent:"center",minWidth:c,paddingLeft:u,paddingRight:u,background:e?"primary200":h.backgroundColor,$size:t,...d,children:r.jsx(
|
|
569
|
+
`,ia=Object.freeze(Object.defineProperty({__proto__:null,Group:aa,Item:ea},Symbol.toStringTag,{value:"Module"})),At=({active:e=!1,size:t="M",textColor:n="neutral600",backgroundColor:o="neutral150",variant:a,children:i,minWidth:c=5,...d})=>{const u=t==="S"?1:2,h=a?{backgroundColor:`${a}200`,textColor:`${a}700`}:{backgroundColor:o,textColor:n};return r.jsx(la,{inline:!0,alignItems:"center",justifyContent:"center",minWidth:c,paddingLeft:u,paddingRight:u,background:e?"primary200":h.backgroundColor,$size:t,...d,children:r.jsx(I,{variant:"sigma",textColor:e?"primary600":h.textColor,lineHeight:"1rem",children:i})})},la=s.styled(y)`
|
|
570
570
|
border-radius: ${({theme:e,$size:t})=>t==="S"?"2px":e.borderRadius};
|
|
571
571
|
${({$size:e,theme:t})=>e==="S"?s.css`
|
|
572
572
|
padding-block: 0.3rem;
|
|
@@ -581,7 +581,7 @@
|
|
|
581
581
|
&:visited {
|
|
582
582
|
color: inherit;
|
|
583
583
|
}
|
|
584
|
-
`,Pe=ae(({href:e,disabled:t=!1,isExternal:n=!1,...o},a)=>r.jsx(ca,{tag:"a",ref:a,target:n?"_blank":void 0,rel:n?"noreferrer noopener":void 0,href:e,tabIndex:t?-1:void 0,"aria-disabled":t,pointerEvents:t?"none":void 0,cursor:t?void 0:"pointer",...o})),Dr=()=>r.jsx(v,{"aria-hidden":!0,paddingLeft:1,paddingRight:1,children:r.jsx(
|
|
584
|
+
`,Pe=ae(({href:e,disabled:t=!1,isExternal:n=!1,...o},a)=>r.jsx(ca,{tag:"a",ref:a,target:n?"_blank":void 0,rel:n?"noreferrer noopener":void 0,href:e,tabIndex:t?-1:void 0,"aria-disabled":t,pointerEvents:t?"none":void 0,cursor:t?void 0:"pointer",...o})),Dr=()=>r.jsx(v,{"aria-hidden":!0,paddingLeft:1,paddingRight:1,children:r.jsx(I,{variant:"pi",textColor:"neutral500",children:"/"})});Dr.displayName="Divider";const da=s.styled(y)`
|
|
585
585
|
// CrumbLinks do have padding-x, because they need to have a
|
|
586
586
|
// interaction effect, which mis-aligns the breadcrumbs on the left.
|
|
587
587
|
// This normalizes the behavior by moving the first item to left by
|
|
@@ -589,7 +589,7 @@
|
|
|
589
589
|
& > *:first-child {
|
|
590
590
|
margin-left: ${({theme:e})=>`calc(-1*${e.spaces[2]})`};
|
|
591
591
|
}
|
|
592
|
-
`,Er=l.forwardRef(({label:e,children:t,...n},o)=>{const a=l.Children.toArray(t);return r.jsx(v,{"aria-label":e,tag:"nav",...n,ref:o,children:r.jsx(da,{tag:"ol",children:l.Children.map(a,(i,c)=>{const d=a.length>1&&c+1<a.length;return r.jsxs(
|
|
592
|
+
`,Er=l.forwardRef(({label:e,children:t,...n},o)=>{const a=l.Children.toArray(t);return r.jsx(v,{"aria-label":e,tag:"nav",...n,ref:o,children:r.jsx(da,{tag:"ol",children:l.Children.map(a,(i,c)=>{const d=a.length>1&&c+1<a.length;return r.jsxs(y,{inline:!0,tag:"li",children:[i,d&&r.jsx(Dr,{})]})})})})});Er.displayName="Breadcrumbs";const Ar=l.forwardRef(({children:e,isCurrent:t=!1,...n},o)=>r.jsx(v,{paddingLeft:2,paddingRight:2,paddingTop:1,paddingBottom:1,ref:o,children:r.jsx(I,{variant:"pi",textColor:"neutral800",fontWeight:t?"bold":"regular","aria-current":t,...n,children:e})}));Ar.displayName="Crumb";const ua=s.styled(Pe)`
|
|
593
593
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
594
594
|
color: ${({theme:e})=>e.colors.neutral600};
|
|
595
595
|
font-size: ${({theme:e})=>e.fontSizes[1]};
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
border: 1px solid ${e.colors.buttonPrimary600};
|
|
653
653
|
background: ${e.colors.buttonPrimary600};
|
|
654
654
|
color: ${e.colors.buttonNeutral0};
|
|
655
|
-
`}},rt=ae(({variant:e=it,startIcon:t,endIcon:n,disabled:o=!1,children:a,onClick:i,size:c=ga[1],loading:d=!1,fullWidth:u=!1,type:h="button",...f},g)=>{const p=o||d,
|
|
655
|
+
`}},rt=ae(({variant:e=it,startIcon:t,endIcon:n,disabled:o=!1,children:a,onClick:i,size:c=ga[1],loading:d=!1,fullWidth:u=!1,type:h="button",...f},g)=>{const p=o||d,C=k=>{!p&&i&&i(k)},m=f.tag??"button",x=m==="button"||m==="input"?h:void 0;return r.jsxs(ba,{ref:g,"aria-disabled":p,disabled:p,$size:c,$variant:e,tag:"button",onClick:C,hasRadius:!0,gap:2,inline:!0,alignItems:"center",justifyContent:"center",width:u?"100%":void 0,paddingLeft:4,paddingRight:4,cursor:"pointer",type:x,...f,children:[(t||d)&&r.jsx(y,{tag:"span","aria-hidden":!0,children:d?r.jsx(ma,{}):t}),r.jsx(I,{variant:c==="S"?"pi":void 0,fontWeight:"bold",children:a}),n&&r.jsx(y,{tag:"span","aria-hidden":!0,children:n})]})}),pa=s.keyframes`
|
|
656
656
|
from {
|
|
657
657
|
transform: rotate(0deg);
|
|
658
658
|
}
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
`,ma=s.styled(O.Loader)`
|
|
663
663
|
animation: ${pa} 2s infinite linear;
|
|
664
664
|
will-change: transform;
|
|
665
|
-
`,ba=s.styled(
|
|
665
|
+
`,ba=s.styled(y)`
|
|
666
666
|
${({theme:e,$size:t})=>{const n=e.sizes.button[t];if(typeof n=="string")return`height: ${n};`;const o=[];return Object.entries(n).forEach(([a,i])=>{if(i){if(a==="initial")o.push(`height: ${i};`);else if(a in e.breakpoints){const c=e.breakpoints[a];o.push(`${c} { height: ${i}; }`)}}}),o.join(`
|
|
667
667
|
`)}}
|
|
668
668
|
text-decoration: none;
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
${e=>e.theme.transitions.color},
|
|
687
687
|
border-color ${e=>e.theme.motion.timings[200]} ${e=>e.theme.motion.easings.easeOutQuad};
|
|
688
688
|
}
|
|
689
|
-
`,ct=l.forwardRef(({children:e,description:t,label:n,defaultOpen:o,open:a,onOpenChange:i,delayDuration:c=500,disableHoverableContent:d,...u},h)=>!n&&!t?e:r.jsxs(xe.Root,{defaultOpen:o,open:a,onOpenChange:i,delayDuration:c,disableHoverableContent:d,children:[r.jsx(xe.Trigger,{asChild:!0,children:e}),r.jsx(xe.Portal,{children:r.jsx(xa,{ref:h,sideOffset:8,...u,children:r.jsx(
|
|
689
|
+
`,ct=l.forwardRef(({children:e,description:t,label:n,defaultOpen:o,open:a,onOpenChange:i,delayDuration:c=500,disableHoverableContent:d,...u},h)=>!n&&!t?e:r.jsxs(xe.Root,{defaultOpen:o,open:a,onOpenChange:i,delayDuration:c,disableHoverableContent:d,children:[r.jsx(xe.Trigger,{asChild:!0,children:e}),r.jsx(xe.Portal,{children:r.jsx(xa,{ref:h,sideOffset:8,...u,children:r.jsx(I,{variant:"pi",fontWeight:"bold",children:n||t})})})]})),xa=s.styled(xe.Content)`
|
|
690
690
|
background-color: ${e=>e.theme.colors.neutral900};
|
|
691
691
|
color: ${e=>e.theme.colors.neutral0};
|
|
692
692
|
padding-inline: ${e=>e.theme.spaces[2]};
|
|
@@ -700,7 +700,7 @@
|
|
|
700
700
|
animation: ${q.fadeIn} ${e=>e.theme.motion.timings[200]}
|
|
701
701
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
702
702
|
}
|
|
703
|
-
`,ge=ae(({label:e,background:t,children:n,disabled:o=!1,onClick:a,size:i="S",variant:c="tertiary",withTooltip:d=!0,type:u="button",...h},f)=>{const g=
|
|
703
|
+
`,ge=ae(({label:e,background:t,children:n,disabled:o=!1,onClick:a,size:i="S",variant:c="tertiary",withTooltip:d=!0,type:u="button",...h},f)=>{const g=C=>{!o&&a&&a(C)},p=r.jsx(He,{"aria-disabled":o,background:o?"neutral150":t,tag:"button",display:"inline-flex",justifyContent:"center",hasRadius:!0,cursor:"pointer",...h,ref:f,$size:i,onClick:g,$variant:c,type:u,children:r.jsx(Se,{label:e,children:n})});return d?r.jsx(ct,{label:e,children:p}):p}),He=s.styled(y)`
|
|
704
704
|
text-decoration: none;
|
|
705
705
|
|
|
706
706
|
${e=>{switch(e.$size){case"XS":return s.css`
|
|
@@ -762,7 +762,7 @@
|
|
|
762
762
|
${e=>e.theme.transitions.color},
|
|
763
763
|
border-color ${e=>e.theme.motion.timings[200]} ${e=>e.theme.motion.easings.easeOutQuad};
|
|
764
764
|
}
|
|
765
|
-
`,$a=s.styled(
|
|
765
|
+
`,$a=s.styled(y)`
|
|
766
766
|
& ${He}:first-child {
|
|
767
767
|
border-radius: ${({theme:e})=>`${e.borderRadius} 0 0 ${e.borderRadius}`};
|
|
768
768
|
}
|
|
@@ -778,7 +778,7 @@
|
|
|
778
778
|
border-left: none;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
`,Wr=ae(({children:e,href:t,disabled:n=!1,startIcon:o,endIcon:a,isExternal:i=!1,color:c="primary600",activeColor:d="primary700",...u},h)=>r.jsxs(ya,{ref:h,href:t,disabled:n,isExternal:i,$activeColor:d,$color:c,...u,children:[o,r.jsx(
|
|
781
|
+
`,Wr=ae(({children:e,href:t,disabled:n=!1,startIcon:o,endIcon:a,isExternal:i=!1,color:c="primary600",activeColor:d="primary700",...u},h)=>r.jsxs(ya,{ref:h,href:t,disabled:n,isExternal:i,$activeColor:d,$color:c,...u,children:[o,r.jsx(I,{textColor:n?"neutral600":c,children:e}),a,t&&!a&&i&&r.jsx(O.ExternalLink,{fill:c})]})),ya=s.styled(Pe)`
|
|
782
782
|
display: inline-flex;
|
|
783
783
|
align-items: center;
|
|
784
784
|
text-decoration: none;
|
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
${st};
|
|
811
|
-
`,wa=e=>{switch(e){case"danger":return"danger100";default:return"primary100"}},Ct=(e,t)=>{switch(e){case"danger":return t?"danger500":"danger700";default:return t?"neutral500":"neutral800"}},Ve=(e,t)=>{switch(e){case"danger":return t?"danger500":"danger700";default:return t?"neutral300":"neutral500"}},Ca=ce.Root,ja=l.forwardRef(({label:e,endIcon:t=r.jsx(O.CaretDown,{width:"1.2rem",height:"1.2rem","aria-hidden":!0}),tag:n=rt,icon:o,...a},i)=>{const c={...a,ref:i,type:"button"};return r.jsx(ce.Trigger,{asChild:!0,disabled:c.disabled,children:n===ge?r.jsx(ge,{label:e,variant:"tertiary",...c,children:o}):r.jsx(rt,{endIcon:t,variant:"ghost",...c})})}),va=l.forwardRef(({children:e,intersectionId:t,onCloseAutoFocus:n,popoverPlacement:o="bottom-start",...a},i)=>{const[c,d]=o.split("-");return r.jsx(ce.Portal,{children:r.jsx(ka,{align:d,side:c,loop:!0,onCloseAutoFocus:n,asChild:!0,children:r.jsxs(Fr,{ref:i,direction:"column",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,marginTop:1,marginBottom:1,alignItems:"flex-start",position:"relative",overflow:"auto",...a,children:[e,r.jsx(v,{id:t,width:"100%",height:"1px"})]})})})}),Fr=s.styled(
|
|
811
|
+
`,wa=e=>{switch(e){case"danger":return"danger100";default:return"primary100"}},Ct=(e,t)=>{switch(e){case"danger":return t?"danger500":"danger700";default:return t?"neutral500":"neutral800"}},Ve=(e,t)=>{switch(e){case"danger":return t?"danger500":"danger700";default:return t?"neutral300":"neutral500"}},Ca=ce.Root,ja=l.forwardRef(({label:e,endIcon:t=r.jsx(O.CaretDown,{width:"1.2rem",height:"1.2rem","aria-hidden":!0}),tag:n=rt,icon:o,...a},i)=>{const c={...a,ref:i,type:"button"};return r.jsx(ce.Trigger,{asChild:!0,disabled:c.disabled,children:n===ge?r.jsx(ge,{label:e,variant:"tertiary",...c,children:o}):r.jsx(rt,{endIcon:t,variant:"ghost",...c})})}),va=l.forwardRef(({children:e,intersectionId:t,onCloseAutoFocus:n,popoverPlacement:o="bottom-start",...a},i)=>{const[c,d]=o.split("-");return r.jsx(ce.Portal,{children:r.jsx(ka,{align:d,side:c,loop:!0,onCloseAutoFocus:n,asChild:!0,children:r.jsxs(Fr,{ref:i,direction:"column",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,marginTop:1,marginBottom:1,alignItems:"flex-start",position:"relative",overflow:"auto",...a,children:[e,r.jsx(v,{id:t,width:"100%",height:"1px"})]})})})}),Fr=s.styled(y)`
|
|
812
812
|
scrollbar-width: none;
|
|
813
813
|
-ms-overflow-style: none;
|
|
814
814
|
-webkit-overflow-scrolling: touch;
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
`,Sa=({onSelect:e,disabled:t=!1,isLink:n,startIcon:o,endIcon:a,isExternal:i,variant:c="default",...d})=>r.jsx(ce.Item,{asChild:!0,onSelect:e,disabled:t,children:n||i?r.jsx(Ra,{color:Ct(c,t),startIcon:o,endIcon:a,...d,isExternal:i??!1,$variant:c,children:d.children}):r.jsxs(_r,{cursor:"pointer",color:Ct(c,t),background:"transparent",borderStyle:"none",gap:2,$variant:c,...d,children:[o&&r.jsx(
|
|
836
|
+
`,Sa=({onSelect:e,disabled:t=!1,isLink:n,startIcon:o,endIcon:a,isExternal:i,variant:c="default",...d})=>r.jsx(ce.Item,{asChild:!0,onSelect:e,disabled:t,children:n||i?r.jsx(Ra,{color:Ct(c,t),startIcon:o,endIcon:a,...d,isExternal:i??!1,$variant:c,children:d.children}):r.jsxs(_r,{cursor:"pointer",color:Ct(c,t),background:"transparent",borderStyle:"none",gap:2,$variant:c,...d,children:[o&&r.jsx(y,{tag:"span",color:Ve(c,t),"aria-hidden":!0,children:o}),r.jsx(I,{grow:1,children:d.children}),a&&r.jsx(y,{tag:"span",color:Ve(c,t),"aria-hidden":!0,children:a})]})}),Hr=({theme:e,$variant:t})=>s.css`
|
|
837
837
|
text-align: left;
|
|
838
838
|
width: 100%;
|
|
839
839
|
border-radius: ${e.borderRadius};
|
|
@@ -856,7 +856,7 @@
|
|
|
856
856
|
}
|
|
857
857
|
|
|
858
858
|
color: ${e.colors[Ct(t,!1)]};
|
|
859
|
-
`,_r=s.styled(
|
|
859
|
+
`,_r=s.styled(y)`
|
|
860
860
|
${({theme:e,$variant:t})=>Hr({theme:e,$variant:t})}
|
|
861
861
|
`,Ra=s.styled(Wr)`
|
|
862
862
|
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
@@ -896,13 +896,13 @@
|
|
|
896
896
|
&:first-child {
|
|
897
897
|
display: none;
|
|
898
898
|
}
|
|
899
|
-
`,Ia=l.forwardRef((e,t)=>r.jsx(ce.Separator,{...e,asChild:!0,children:r.jsx(Ta,{height:"1px",shrink:0,background:"neutral150",ref:t})})),Da=l.forwardRef((e,t)=>r.jsx(ce.Label,{asChild:!0,children:r.jsx(Ea,{ref:t,variant:"sigma",textColor:"neutral600",...e})})),Ea=s.styled(
|
|
899
|
+
`,Ia=l.forwardRef((e,t)=>r.jsx(ce.Separator,{...e,asChild:!0,children:r.jsx(Ta,{height:"1px",shrink:0,background:"neutral150",ref:t})})),Da=l.forwardRef((e,t)=>r.jsx(ce.Label,{asChild:!0,children:r.jsx(Ea,{ref:t,variant:"sigma",textColor:"neutral600",...e})})),Ea=s.styled(I)`
|
|
900
900
|
padding: ${({theme:e})=>e.spaces[2]} ${({theme:e})=>e.spaces[4]};
|
|
901
|
-
`,Aa=ce.Sub,za=l.forwardRef(({disabled:e=!1,...t},n)=>r.jsx(ce.SubTrigger,{asChild:!0,disabled:e,children:r.jsxs(La,{ref:n,color:"neutral800",tag:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...t,children:[r.jsx(
|
|
901
|
+
`,Aa=ce.Sub,za=l.forwardRef(({disabled:e=!1,...t},n)=>r.jsx(ce.SubTrigger,{asChild:!0,disabled:e,children:r.jsxs(La,{ref:n,color:"neutral800",tag:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...t,children:[r.jsx(I,{children:t.children}),r.jsx(O.ChevronRight,{fill:"neutral500",height:"1.2rem",width:"1.2rem"})]})})),La=s.styled(_r)`
|
|
902
902
|
&[data-state='open'] {
|
|
903
903
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
904
904
|
}
|
|
905
|
-
`,Oa=l.forwardRef((e,t)=>r.jsx(ce.Portal,{children:r.jsx(ce.SubContent,{sideOffset:8,asChild:!0,children:r.jsx(Fr,{ref:t,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",overflow:"auto",...e})})})),Vr=Ca,qr=ja,Ur=va,Gr=Sa,Pa=Ia,Ma=Da,Ba=Aa,Na=za,Wa=Oa,Fa=Object.freeze(Object.defineProperty({__proto__:null,Content:Ur,Item:Gr,Label:Ma,Root:Vr,Separator:Pa,SubContent:Wa,SubRoot:Ba,SubTrigger:Na,Trigger:qr},Symbol.toStringTag,{value:"Module"})),Kr=l.forwardRef(({children:e,onOpen:t,onClose:n,popoverPlacement:o,onReachEnd:a,...i},c)=>{const d=l.useRef(null),u=te(c,d),h=l.useRef(null),[f,g]=l.useState(!1),p=k=>{a&&a(k)},
|
|
905
|
+
`,Oa=l.forwardRef((e,t)=>r.jsx(ce.Portal,{children:r.jsx(ce.SubContent,{sideOffset:8,asChild:!0,children:r.jsx(Fr,{ref:t,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",overflow:"auto",...e})})})),Vr=Ca,qr=ja,Ur=va,Gr=Sa,Pa=Ia,Ma=Da,Ba=Aa,Na=za,Wa=Oa,Fa=Object.freeze(Object.defineProperty({__proto__:null,Content:Ur,Item:Gr,Label:Ma,Root:Vr,Separator:Pa,SubContent:Wa,SubRoot:Ba,SubTrigger:Na,Trigger:qr},Symbol.toStringTag,{value:"Module"})),Kr=l.forwardRef(({children:e,onOpen:t,onClose:n,popoverPlacement:o,onReachEnd:a,...i},c)=>{const d=l.useRef(null),u=te(c,d),h=l.useRef(null),[f,g]=l.useState(!1),p=k=>{a&&a(k)},C=k=>{k&&typeof t=="function"?t():!k&&typeof n=="function"&&n(),g(k)},m=re(),x=`intersection-${ze(m)}`;return Ge(h,p,{selectorToWatch:`#${x}`,skipWhen:!f}),r.jsxs(Vr,{onOpenChange:C,children:[r.jsx(qr,{ref:u,...i,children:i.label}),r.jsx(Ur,{ref:h,intersectionId:x,popoverPlacement:o,children:e})]})}),Ha=Gr,_a=s.styled(Kr)`
|
|
906
906
|
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[2]}`};
|
|
907
907
|
height: unset;
|
|
908
908
|
|
|
@@ -910,7 +910,7 @@
|
|
|
910
910
|
:focus {
|
|
911
911
|
background-color: ${({theme:e})=>e.colors.neutral200};
|
|
912
912
|
}
|
|
913
|
-
`,Yr=l.forwardRef(({children:e,...t},n)=>r.jsx(_a,{ref:n,endIcon:null,size:"S",...t,children:e}));Yr.displayName="CrumbSimpleMenu";const Qr=l.createContext({id:""}),Xr=()=>l.useContext(Qr),Va=l.forwardRef(({id:e,...t},n)=>{const o=re(e),a=l.useMemo(()=>({id:o}),[o]);return r.jsx(Qr.Provider,{value:a,children:r.jsx(v,{ref:n,id:e,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",tag:"article","aria-labelledby":`${o}-title`,...t})})}),Zr=l.forwardRef(({position:e,...t},n)=>r.jsx(qa,{ref:n,$position:e,...t,direction:"row",gap:2})),qa=s.styled(
|
|
913
|
+
`,Yr=l.forwardRef(({children:e,...t},n)=>r.jsx(_a,{ref:n,endIcon:null,size:"S",...t,children:e}));Yr.displayName="CrumbSimpleMenu";const Qr=l.createContext({id:""}),Xr=()=>l.useContext(Qr),Va=l.forwardRef(({id:e,...t},n)=>{const o=re(e),a=l.useMemo(()=>({id:o}),[o]);return r.jsx(Qr.Provider,{value:a,children:r.jsx(v,{ref:n,id:e,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",tag:"article","aria-labelledby":`${o}-title`,...t})})}),Zr=l.forwardRef(({position:e,...t},n)=>r.jsx(qa,{ref:n,$position:e,...t,direction:"row",gap:2})),qa=s.styled(y)`
|
|
914
914
|
position: absolute;
|
|
915
915
|
top: ${({theme:e})=>e.spaces[3]};
|
|
916
916
|
right: ${({$position:e,theme:t})=>{if(e==="end")return t.spaces[3]}};
|
|
@@ -938,7 +938,7 @@
|
|
|
938
938
|
flex-shrink: 0;
|
|
939
939
|
`,Qa=s.styled(At)`
|
|
940
940
|
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
941
|
-
`,Xa=e=>r.jsx(Ya,{children:r.jsx(Qa,{...e})}),Za=e=>r.jsx(v,{paddingLeft:3,paddingRight:3,paddingTop:2,paddingBottom:2,children:r.jsx(
|
|
941
|
+
`,Xa=e=>r.jsx(Ya,{children:r.jsx(Qa,{...e})}),Za=e=>r.jsx(v,{paddingLeft:3,paddingRight:3,paddingTop:2,paddingBottom:2,children:r.jsx(y,{...e,alignItems:"flex-start"})}),Ja=({fill:e,...t})=>{const{colors:n}=s.useTheme();return r.jsx(v,{tag:"svg",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:e?n[e]:void 0,...t,children:r.jsx("path",{d:"M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z"})})},nr=l.forwardRef(({defaultChecked:e,checked:t,onCheckedChange:n,...o},a)=>{const i=l.useRef(null),[c,d]=le({defaultProp:e,prop:t,onChange:n}),u=te(i,a);return r.jsx(es,{ref:u,checked:c,onCheckedChange:d,...o,children:r.jsxs(ts,{forceMount:!0,children:[c===!0?r.jsx(Ja,{width:"1.6rem",fill:"neutral0"}):null,c==="indeterminate"?r.jsx(O.Minus,{fill:"neutral0"}):null]})})}),es=s.styled(yr.Root)`
|
|
942
942
|
background: ${e=>e.theme.colors.neutral0};
|
|
943
943
|
width: 2rem;
|
|
944
944
|
height: 2rem;
|
|
@@ -987,14 +987,14 @@
|
|
|
987
987
|
&[data-disabled] {
|
|
988
988
|
cursor: not-allowed;
|
|
989
989
|
}
|
|
990
|
-
`,dt=l.forwardRef(({children:e,...t},n)=>{const o=re(t.id);return e?r.jsxs(
|
|
990
|
+
`,dt=l.forwardRef(({children:e,...t},n)=>{const o=re(t.id);return e?r.jsxs(y,{gap:2,children:[r.jsx(nr,{id:o,...t}),r.jsx(I,{tag:"label",textColor:"neutral800",htmlFor:o,children:e})]}):r.jsx(nr,{ref:n,...t})}),rs=l.forwardRef((e,t)=>{const{id:n}=Xr();return r.jsx(Zr,{position:"start",children:r.jsx(dt,{"aria-labelledby":`${n}-title`,...e,ref:t})})}),ns=s.styled(v)`
|
|
991
991
|
word-break: break-all;
|
|
992
|
-
`,os=({children:e,...t})=>r.jsx(ns,{...t,children:e}),as=s.styled(
|
|
992
|
+
`,os=({children:e,...t})=>r.jsx(ns,{...t,children:e}),as=s.styled(y)`
|
|
993
993
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
994
|
-
`,ss=e=>r.jsx(as,{position:"relative",justifyContent:"center",...e}),is=({children:e,...t})=>r.jsx(v,{tag:"time",background:"neutral800",bottom:1,right:1,color:"neutral0",hasRadius:!0,position:"absolute",padding:1,...t,children:r.jsx(
|
|
994
|
+
`,ss=e=>r.jsx(as,{position:"relative",justifyContent:"center",...e}),is=({children:e,...t})=>r.jsx(v,{tag:"time",background:"neutral800",bottom:1,right:1,color:"neutral0",hasRadius:!0,position:"absolute",padding:1,...t,children:r.jsx(I,{variant:"pi",textColor:"neutral0",children:e})}),ls=e=>{const{id:t}=Xr();return r.jsx(I,{variant:"pi",id:`${t}-title`,textColor:"neutral800",fontWeight:"bold",tag:"div",...e})},cs=e=>r.jsx(I,{variant:"pi",...e,textColor:"neutral600",tag:"div"}),W={DOWN:"ArrowDown",UP:"ArrowUp",RIGHT:"ArrowRight",LEFT:"ArrowLeft",ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",END:"End",HOME:"Home",DELETE:"Delete",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",CLEAR:"Clear"},ds=s.styled(v)`
|
|
995
995
|
grid-template-columns: auto 1fr auto;
|
|
996
996
|
grid-template-areas: 'startAction slides endAction';
|
|
997
|
-
`,us=s.styled(
|
|
997
|
+
`,us=s.styled(y)`
|
|
998
998
|
grid-area: slides;
|
|
999
999
|
`,or=s.styled(v)`
|
|
1000
1000
|
grid-area: ${({$area:e})=>e};
|
|
@@ -1003,7 +1003,7 @@
|
|
|
1003
1003
|
&:hover svg path {
|
|
1004
1004
|
fill: ${({theme:e})=>e.colors.neutral900};
|
|
1005
1005
|
}
|
|
1006
|
-
`,Jr=l.forwardRef(({actions:e,children:t,label:n,nextLabel:o,onNext:a,onPrevious:i,previousLabel:c,secondaryLabel:d,selectedSlide:u,...h},f)=>{const g=l.useRef(null),p=l.useRef(null),
|
|
1006
|
+
`,Jr=l.forwardRef(({actions:e,children:t,label:n,nextLabel:o,onNext:a,onPrevious:i,previousLabel:c,secondaryLabel:d,selectedSlide:u,...h},f)=>{const g=l.useRef(null),p=l.useRef(null),C=l.Children.map(t,(x,k)=>l.cloneElement(x,{selected:k===u})),m=x=>{switch(x.key){case W.RIGHT:{x.preventDefault(),p!=null&&p.current&&p.current.focus(),a&&a();break}case W.LEFT:{x.preventDefault(),g!=null&&g.current&&g.current.focus(),i&&i();break}}};return r.jsx(v,{ref:f,...h,onKeyDown:m,children:r.jsxs(v,{padding:2,borderColor:"neutral200",hasRadius:!0,background:"neutral100",children:[r.jsxs(ds,{tag:"section","aria-roledescription":"carousel","aria-label":n,display:"grid",position:"relative",children:[C&&C.length>1&&r.jsxs(r.Fragment,{children:[r.jsx(or,{tag:"button",onClick:i,$area:"startAction",ref:g,type:"button",children:r.jsx(Se,{label:c,children:r.jsx(O.ChevronLeft,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})}),r.jsx(or,{tag:"button",onClick:a,$area:"endAction",ref:p,type:"button",children:r.jsx(Se,{label:o,children:r.jsx(O.ChevronRight,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})})]}),r.jsx(us,{"aria-live":"polite",paddingLeft:2,paddingRight:2,width:"100%",overflow:"hidden",children:C}),e]}),d&&r.jsx(v,{paddingTop:2,paddingLeft:4,paddingRight:4,children:r.jsx(ct,{label:d,children:r.jsx(y,{justifyContent:"center",children:r.jsx(I,{variant:"pi",textColor:"neutral600",ellipsis:!0,children:d})})})})]})})}),hs={accordions:{S:"4.8rem",M:"8.8rem"},button:{S:{initial:"4rem",medium:"3.2rem"},M:{initial:"4.4rem",medium:"3.6rem"},L:{initial:"4.8rem",medium:"4rem"}}},en={sizes:hs,zIndices:{navigation:100,overlay:300,modal:310,dialog:320,popover:500,notification:700,tooltip:1e3},spaces:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px","56px","64px"],borderRadius:"4px",breakpoints:{initial:"@media(min-width: 0px)",small:"@media(min-width: 520px)",medium:"@media(min-width: 768px)",large:"@media(min-width: 1080px)"},fontSizes:["1.1rem","1.2rem","1.4rem","1.6rem","1.8rem","2rem","2.8rem","3.2rem"],lineHeights:[1.14,1.22,1.25,1.33,1.43,1.45,1.5],fontWeights:{regular:400,semiBold:500,bold:600},transitions:Jo,motion:{easings:$t,timings:yt}},fs={color:{alternative100:"#f6ecfc",alternative200:"#e0c1f4",alternative500:"#ac73e6",alternative600:"#9736e8",alternative700:"#8312d1",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#fcecea",danger200:"#f5c0b8",danger500:"#ee5e52",danger600:"#d02b20",danger700:"#b72b1a",neutral0:"#ffffff",neutral100:"#f6f6f9",neutral1000:"#181826",neutral150:"#eaeaef",neutral200:"#dcdce4",neutral300:"#c0c0cf",neutral400:"#a5a5ba",neutral500:"#8e8ea9",neutral600:"#666687",neutral700:"#4a4a6a",neutral800:"#32324d",neutral900:"#212134",primary100:"#f0f0ff",primary200:"#d9d8ff",primary500:"#7b79ff",primary600:"#4945ff",primary700:"#271fe0",secondary100:"#eaf5ff",secondary200:"#b8e1ff",secondary500:"#66b7f1",secondary600:"#0c75af",secondary700:"#006096",success100:"#eafbe7",success200:"#c6f0c2",success500:"#5cb176",success600:"#328048",success700:"#2f6846",warning100:"#fdf4dc",warning200:"#fae7b9",warning500:"#f29d41",warning600:"#d9822f",warning700:"#be5d01"}},gs={shadow:{filterShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"0px 2px 15px rgba(33, 33, 52, 0.1)",tableShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)"}},Mt={colorScheme:"light",colors:fs.color,shadows:gs.shadow,...en},ps={color:{alternative100:"#181826",alternative200:"#4a4a6a",alternative500:"#ac73e6",alternative600:"#ac73e6",alternative700:"#e0c1f4",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#181826",danger200:"#4a4a6a",danger500:"#ee5e52",danger600:"#ee5e52",danger700:"#ee5e52",neutral0:"#212134",neutral100:"#181826",neutral1000:"#ffffff",neutral150:"#32324d",neutral200:"#4a4a6a",neutral300:"#666687",neutral400:"#a5a5ba",neutral500:"#c0c0cf",neutral600:"#a5a5ba",neutral700:"#eaeaef",neutral800:"#ffffff",neutral900:"#ffffff",primary100:"#181826",primary200:"#4a4a6a",primary500:"#4945ff",primary600:"#7b79ff",primary700:"#7b79ff",secondary100:"#181826",secondary200:"#4a4a6a",secondary500:"#66b7f1",secondary600:"#66b7f1",secondary700:"#b8e1ff",success100:"#181826",success200:"#4a4a6a",success500:"#5cb176",success600:"#5cb176",success700:"#c6f0c2",warning100:"#181826",warning200:"#4a4a6a",warning500:"#f29d41",warning600:"#f29d41",warning700:"#fae7b9"}},ms={shadow:{filterShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",tableShadow:"1px 1px 10px rgba(3, 3, 5, 0.2)"}},bs={colorScheme:"dark",colors:ps.color,shadows:ms.shadow,...en},ar=e=>`
|
|
1007
1007
|
${e}
|
|
1008
1008
|
|
|
1009
1009
|
The following is an example:
|
|
@@ -1025,12 +1025,12 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1025
1025
|
border: 1px solid ${n?t.colors.danger600:t.colors.primary600};
|
|
1026
1026
|
box-shadow: ${n?t.colors.danger600:t.colors.primary600} 0px 0px 0px 2px;
|
|
1027
1027
|
}
|
|
1028
|
-
`,[ys,ne]=Oe("Field",{}),Re=l.forwardRef(({children:e,name:t,error:n=!1,hint:o,id:a,required:i=!1,...c},d)=>{const u=re(a),[h,f]=l.useState();return r.jsx(ys,{name:t,id:u,error:n,hint:o,required:i,labelNode:h,setLabelNode:f,children:r.jsx(
|
|
1028
|
+
`,[ys,ne]=Oe("Field",{}),Re=l.forwardRef(({children:e,name:t,error:n=!1,hint:o,id:a,required:i=!1,...c},d)=>{const u=re(a),[h,f]=l.useState();return r.jsx(ys,{name:t,id:u,error:n,hint:o,required:i,labelNode:h,setLabelNode:f,children:r.jsx(y,{direction:"column",alignItems:"stretch",gap:1,ref:d,...c,children:e})})}),Bt=l.forwardRef(({children:e,action:t,...n},o)=>{const{id:a,required:i,setLabelNode:c}=ne("Label"),d=te(o,c);return e?r.jsxs(y,{alignItems:"center",children:[r.jsxs(ws,{ref:d,variant:"pi",textColor:"neutral800",fontWeight:"bold",...n,id:`${a}-label`,htmlFor:a,tag:"label",ellipsis:!0,children:[e,i&&r.jsx(I,{"aria-hidden":!0,lineHeight:"1em",textColor:"danger600",children:"*"})]}),t&&r.jsx(Cs,{marginLeft:1,children:t})]}):null}),ws=s.styled(I)`
|
|
1029
1029
|
display: block;
|
|
1030
|
-
`,Cs=s.styled(
|
|
1030
|
+
`,Cs=s.styled(y)`
|
|
1031
1031
|
line-height: 0;
|
|
1032
1032
|
color: ${({theme:e})=>e.colors.neutral500};
|
|
1033
|
-
`,ut=l.forwardRef(({endAction:e,startAction:t,disabled:n=!1,onChange:o,hasError:a,required:i,className:c,size:d="M",...u},h)=>{const{id:f,error:g,hint:p,name:
|
|
1033
|
+
`,ut=l.forwardRef(({endAction:e,startAction:t,disabled:n=!1,onChange:o,hasError:a,required:i,className:c,size:d="M",...u},h)=>{const{id:f,error:g,hint:p,name:C,required:m}=ne("Input");let x;g?x=`${f}-error`:p&&(x=`${f}-hint`);const k=!!g,S=l.useRef(null),$=l.useRef(null),w=te($,h),j=T=>{!n&&o&&o(T)};return l.useLayoutEffect(()=>{if(S.current&&$.current){const T=S.current.offsetWidth,b=$.current;if(b){const R=T+8+16;b.style.paddingRight=`${R}px`}}},[e]),r.jsxs(ks,{gap:2,justifyContent:"space-between",$hasError:k||a,$disabled:n,$size:d,$hasLeftAction:!!t,$hasRightAction:!!e,className:c,children:[t,r.jsx(js,{id:f,name:C,ref:w,$size:d,"aria-describedby":x,"aria-invalid":k||a,"aria-disabled":n,disabled:n,"data-disabled":n?"":void 0,onChange:j,"aria-required":m||i,$hasLeftAction:!!t,$hasRightAction:!!e,...u}),e&&r.jsx(vs,{ref:S,children:e})]})}),js=s.styled.input`
|
|
1034
1034
|
border: none;
|
|
1035
1035
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1036
1036
|
cursor: ${e=>e["aria-disabled"]?"not-allowed":void 0};
|
|
@@ -1080,12 +1080,12 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1080
1080
|
padding-block: ${e.theme.spaces[2]};
|
|
1081
1081
|
}
|
|
1082
1082
|
`}}}
|
|
1083
|
-
`,vs=s.styled(
|
|
1083
|
+
`,vs=s.styled(y)`
|
|
1084
1084
|
position: absolute;
|
|
1085
1085
|
right: ${({theme:e})=>e.spaces[4]};
|
|
1086
1086
|
top: 50%;
|
|
1087
1087
|
transform: translateY(-50%);
|
|
1088
|
-
`,ks=s.styled(
|
|
1088
|
+
`,ks=s.styled(y)`
|
|
1089
1089
|
border: 1px solid ${({theme:e,$hasError:t})=>t?e.colors.danger600:e.colors.neutral200};
|
|
1090
1090
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1091
1091
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
@@ -1097,12 +1097,12 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1097
1097
|
color: ${e.colors.neutral600};
|
|
1098
1098
|
background: ${e.colors.neutral150};
|
|
1099
1099
|
`:void 0};
|
|
1100
|
-
`,tn=()=>{const{id:e,hint:t,error:n}=ne("Hint");return!t||n?null:r.jsx(
|
|
1100
|
+
`,tn=()=>{const{id:e,hint:t,error:n}=ne("Hint");return!t||n?null:r.jsx(I,{variant:"pi",tag:"p",id:`${e}-hint`,textColor:"neutral600",children:t})},rn=()=>{const{id:e,error:t}=ne("Error");return!t||typeof t!="string"?null:r.jsx(I,{variant:"pi",tag:"p",id:`${e}-error`,textColor:"danger600","data-strapi-field-error":!0,children:t})},Ss=l.forwardRef(({label:e,children:t,...n},o)=>r.jsx(Rs,{justifyContent:"unset",background:"transparent",borderStyle:"none",...n,type:"button",tag:"button",ref:o,children:r.jsx(Se,{label:e,children:t})})),Rs=s.styled(y)`
|
|
1101
1101
|
font-size: 1.6rem;
|
|
1102
1102
|
padding: 0;
|
|
1103
|
-
`,Ts=Object.freeze(Object.defineProperty({__proto__:null,Action:Ss,Error:rn,Hint:tn,Input:ut,Label:Bt,Root:Re,useField:ne},Symbol.toStringTag,{value:"Module"})),Is=l.forwardRef(({actions:e,children:t,error:n,hint:o,label:a,labelAction:i,nextLabel:c,onNext:d,onPrevious:u,previousLabel:h,required:f,secondaryLabel:g,selectedSlide:p,id:
|
|
1103
|
+
`,Ts=Object.freeze(Object.defineProperty({__proto__:null,Action:Ss,Error:rn,Hint:tn,Input:ut,Label:Bt,Root:Re,useField:ne},Symbol.toStringTag,{value:"Module"})),Is=l.forwardRef(({actions:e,children:t,error:n,hint:o,label:a,labelAction:i,nextLabel:c,onNext:d,onPrevious:u,previousLabel:h,required:f,secondaryLabel:g,selectedSlide:p,id:C,...m},x)=>{const k=re(C);return r.jsx(Re,{hint:o,error:n,id:k,required:f,children:r.jsxs(y,{direction:"column",alignItems:"stretch",gap:1,children:[a&&r.jsx(Bt,{action:i,children:a}),r.jsx(Jr,{ref:x,actions:e,label:a,nextLabel:c,onNext:d,onPrevious:u,previousLabel:h,secondaryLabel:g,selectedSlide:p,id:k,...m,children:t}),r.jsx(tn,{}),r.jsx(rn,{})]})})}),Ds=({horizontal:e=!0,...t})=>r.jsx(y,{justifyContent:"center",direction:e?"row":"column",alignItems:e?"center":"stretch",position:"absolute",width:"100%",bottom:1,gap:1,...t}),sr=s.styled(v)`
|
|
1104
1104
|
${jr}
|
|
1105
|
-
`,Es=e=>{const[t,n]=l.useState(!1),o=()=>{n(!0)};return t?r.jsx(ct,{label:e.alt??"",children:r.jsx(sr,{tag:"img",height:"100%",maxWidth:"100%",...e})}):r.jsx(sr,{tag:"img",height:"100%",maxWidth:"100%",...e,onError:o})},As=s.styled(
|
|
1105
|
+
`,Es=e=>{const[t,n]=l.useState(!1),o=()=>{n(!0)};return t?r.jsx(ct,{label:e.alt??"",children:r.jsx(sr,{tag:"img",height:"100%",maxWidth:"100%",...e})}):r.jsx(sr,{tag:"img",height:"100%",maxWidth:"100%",...e,onError:o})},As=s.styled(y)`
|
|
1106
1106
|
display: ${({$selected:e})=>e?"flex":"none"};
|
|
1107
1107
|
`,zs=({label:e,children:t,selected:n=!1,...o})=>r.jsx(As,{$selected:n,alignItems:"center",role:"group","aria-roledescription":"slide","aria-label":e,justifyContent:"center",height:"124px",width:"100%",...o,children:t}),nn=s.css`
|
|
1108
1108
|
font-size: 1.6rem;
|
|
@@ -1187,7 +1187,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1187
1187
|
display: grid;
|
|
1188
1188
|
grid-template-columns: repeat(${({$gridCols:e})=>e}, 1fr);
|
|
1189
1189
|
${({theme:e,$gap:t})=>ke({gap:t},e)}
|
|
1190
|
-
`,Fs=ae(({col:e,s:t,xs:n,m:o,...a},i)=>r.jsx(Hs,{ref:i,$col:e,$s:t,$xs:n,$m:o,...a})),Hs=s.styled(
|
|
1190
|
+
`,Fs=ae(({col:e,s:t,xs:n,m:o,...a},i)=>r.jsx(Hs,{ref:i,$col:e,$s:t,$xs:n,$m:o,...a})),Hs=s.styled(y)`
|
|
1191
1191
|
grid-column: span ${({$xs:e,$col:t})=>e??t??12};
|
|
1192
1192
|
max-width: 100%;
|
|
1193
1193
|
|
|
@@ -1202,7 +1202,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1202
1202
|
${({theme:e})=>e.breakpoints.large} {
|
|
1203
1203
|
grid-column: span ${({$col:e,$m:t,$s:n,$xs:o})=>e??t??n??o??12};
|
|
1204
1204
|
}
|
|
1205
|
-
`,_s=Object.freeze(Object.defineProperty({__proto__:null,Item:Fs,Root:Ns},Symbol.toStringTag,{value:"Module"})),Vs=({children:e,estimatedItemSize:t=40,overscan:n=10,itemCount:o,renderItem:a})=>{const i=X.useRef(null),[c,d]=X.useState(!1),u=X.useRef(!0);X.useEffect(()=>(u.current=!0,typeof X.startTransition=="function"&&X.startTransition(()=>{u.current&&d(!0)}),()=>{u.current=!1}),[]);const h=X.useMemo(()=>a&&o!==void 0?[]:X.Children.toArray(e),[e,a,o]),f=o??h.length,g=no.useVirtualizer({count:f,getScrollElement:()=>i.current??null,estimateSize:X.useCallback(()=>t,[t]),overscan:n,scrollMargin:0,measureElement:void 0,lanes:1}),p=c&&u.current?g.getVirtualItems():[];return c?r.jsx(v,{ref:i,height:`${g.getTotalSize()>0?g.getTotalSize():0}px`,width:"100%",position:"relative","data-testid":"virtualized-list",style:{willChange:"transform"},children:p.map(
|
|
1205
|
+
`,_s=Object.freeze(Object.defineProperty({__proto__:null,Item:Fs,Root:Ns},Symbol.toStringTag,{value:"Module"})),Vs=({children:e,estimatedItemSize:t=40,overscan:n=10,itemCount:o,renderItem:a})=>{const i=X.useRef(null),[c,d]=X.useState(!1),u=X.useRef(!0);X.useEffect(()=>(u.current=!0,typeof X.startTransition=="function"&&X.startTransition(()=>{u.current&&d(!0)}),()=>{u.current=!1}),[]);const h=X.useMemo(()=>a&&o!==void 0?[]:X.Children.toArray(e),[e,a,o]),f=o??h.length,g=no.useVirtualizer({count:f,getScrollElement:()=>i.current??null,estimateSize:X.useCallback(()=>t,[t]),overscan:n,scrollMargin:0,measureElement:void 0,lanes:1}),p=c&&u.current?g.getVirtualItems():[];return c?r.jsx(v,{ref:i,height:`${g.getTotalSize()>0?g.getTotalSize():0}px`,width:"100%",position:"relative","data-testid":"virtualized-list",style:{willChange:"transform"},children:p.map(C=>{const m=a?a(C.index):h[C.index];return r.jsx(v,{"data-index":C.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translate3d(0, ${C.start}px, 0)`},children:m},C.key)})}):r.jsx(v,{ref:i,height:"40px",width:"100%",position:"relative"})},on=l.forwardRef(({allowCustomValue:e,autocomplete:t,children:n,className:o,clearLabel:a="Clear",creatable:i=!1,creatableDisabled:c=!1,creatableStartIcon:d,createMessage:u=J=>`Create "${J}"`,defaultFilterValue:h,defaultTextValue:f,defaultOpen:g=!1,open:p,onOpenChange:C,disabled:m=!1,hasError:x,id:k,filterValue:S,hasMoreItems:$=!1,isPrintableCharacter:w,loading:j=!1,loadingMessage:T="Loading content...",name:b,noOptionsMessage:R=()=>"No results found",onChange:z,onClear:E,onCreateOption:A,onFilterValueChange:U,onInputChange:B,onTextValueChange:N,onLoadMore:H,placeholder:P="Select or enter a value",required:K=!1,size:L="M",startIcon:M,textValue:Z,value:G,...oe},Y)=>{const[J,_]=le({prop:p,defaultProp:g,onChange:C}),[Q,de]=le({prop:Z,defaultProp:e&&!f?G:f,onChange:N}),[$e,ye]=le({prop:S,defaultProp:h,onChange:U}),fe=l.useRef(null),Ie=l.useRef(null),we=te(fe,Y),Be=l.useRef(null),Ne=se=>{E&&!m&&(de(""),ye(""),E(se),fe.current.focus())},Ce=se=>{_(se)},V=se=>{de(se)},De=se=>{ye(se)},We=se=>{B&&B(se)},qn=se=>{z&&z(se)},Un=se=>{H&&$&&!j&&H(se)},Kt=()=>{A&&Q&&i!=="visible"?A(Q):A&&i==="visible"&&(A(),_(!1))},Gn=re(),Yt=`intersection-${ze(Gn)}`;Ge(Ie,Un,{selectorToWatch:`#${Yt}`,skipWhen:!J});const{error:ht,...Ze}=ne("Combobox"),Kn=!!ht||x,ft=Ze.id??k,Yn=Ze.name??b,Qn=Ze.required||K,Qt=l.Children.toArray(n).filter(Boolean).length,Xn=!!!(Q&&Q!==""||$e&&$e!=="")&&Qt>100;let gt;return ht?gt=`${ft}-error`:Ze.hint&&(gt=`${ft}-hint`),r.jsxs(D.Combobox.Root,{autocomplete:t||(i===!0?"list":"both"),onOpenChange:Ce,open:J,onTextValueChange:V,textValue:Q,allowCustomValue:!!i||e,disabled:m,required:Qn,value:G,onValueChange:qn,filterValue:$e,onFilterValueChange:De,isPrintableCharacter:w,visible:i==="visible",children:[r.jsxs(qs,{$hasError:Kn,$size:L,$hasTextValue:!!Q,$hasClear:!!(Q&&E),className:o,children:[r.jsxs(y,{flex:"1",tag:"span",gap:3,children:[M?r.jsx(y,{flex:"0 0 1.6rem",tag:"span","aria-hidden":!0,children:M}):null,r.jsx(Us,{placeholder:P,id:ft,"aria-invalid":!!ht,onChange:We,ref:we,name:Yn,"aria-describedby":gt,...oe})]}),r.jsxs(y,{tag:"span",gap:3,children:[Q&&E?r.jsx(ge,{size:"XS",variant:"ghost",onClick:Ne,"aria-disabled":m,"aria-label":a,label:a,ref:Be,children:r.jsx(O.Cross,{})}):null,j?r.jsx(nt,{small:!0,children:"Loading"}):r.jsx(Gs,{children:r.jsx(O.CaretDown,{fill:"neutral500"})})]})]}),r.jsx(D.Combobox.Portal,{children:r.jsxs(Ks,{sideOffset:4,children:[r.jsx(Qe,{viewportRef:Ie,children:r.jsx(D.Combobox.Viewport,{children:r.jsxs(v,{padding:1,children:[Xn?r.jsx(Vs,{itemCount:Qt,children:n}):n,i!==!0&&!j?r.jsx(D.Combobox.NoValueFound,{asChild:!0,children:r.jsx(jt,{$hasHover:!1,children:r.jsx(I,{children:R(Q??"")})})}):null,j?r.jsx(y,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2,children:r.jsx(nt,{small:!0,children:T})}):null,r.jsx(v,{id:Yt,width:"100%",height:"1px"})]})})}),i?r.jsx(Ys,{onPointerUp:Kt,onClick:Kt,disabled:c,asChild:!0,children:r.jsx(jt,{children:r.jsxs(y,{gap:2,children:[d&&r.jsx(v,{tag:"span","aria-hidden":!0,display:"inline-flex",children:d}),r.jsx(I,{children:u(Q??"")})]})})}):null]})})]})}),qs=s.styled(D.Combobox.Trigger)`
|
|
1206
1206
|
position: relative;
|
|
1207
1207
|
border: 1px solid ${({theme:e,$hasError:t})=>t?e.colors.danger600:e.colors.neutral200};
|
|
1208
1208
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
@@ -1324,7 +1324,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1324
1324
|
&&[data-disabled] > div {
|
|
1325
1325
|
background-color: inherit;
|
|
1326
1326
|
}
|
|
1327
|
-
`,an=l.forwardRef(({children:e,value:t,disabled:n,textValue:o,...a},i)=>r.jsx(D.Combobox.ComboboxItem,{asChild:!0,value:t,disabled:n,textValue:o,children:r.jsx(jt,{ref:i,...a,children:r.jsx(D.Combobox.ItemText,{asChild:!0,children:r.jsx(
|
|
1327
|
+
`,an=l.forwardRef(({children:e,value:t,disabled:n,textValue:o,...a},i)=>r.jsx(D.Combobox.ComboboxItem,{asChild:!0,value:t,disabled:n,textValue:o,children:r.jsx(jt,{ref:i,...a,children:r.jsx(D.Combobox.ItemText,{asChild:!0,children:r.jsx(I,{children:e})})})})),jt=s.styled.div`
|
|
1328
1328
|
width: 100%;
|
|
1329
1329
|
border: none;
|
|
1330
1330
|
text-align: left;
|
|
@@ -1393,11 +1393,11 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1393
1393
|
animation-name: ${q.modalPopOut};
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
`,ti=l.forwardRef(({children:e,...t},n)=>r.jsx(pe.Title,{asChild:!0,children:r.jsx(ri,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...t,children:e})})),ri=s.styled(
|
|
1396
|
+
`,ti=l.forwardRef(({children:e,...t},n)=>r.jsx(pe.Title,{asChild:!0,children:r.jsx(ri,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...t,children:e})})),ri=s.styled(I)`
|
|
1397
1397
|
display: flex;
|
|
1398
1398
|
justify-content: center;
|
|
1399
1399
|
border-bottom: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1400
|
-
`,ni=l.forwardRef(({children:e,icon:t,...n},o)=>r.jsx(
|
|
1400
|
+
`,ni=l.forwardRef(({children:e,icon:t,...n},o)=>r.jsx(y,{ref:o,gap:2,direction:"column",paddingTop:8,paddingBottom:8,paddingLeft:6,paddingRight:6,...n,children:typeof e=="string"?r.jsxs(r.Fragment,{children:[t?l.cloneElement(t,{width:24,height:24}):null,r.jsx(sn,{children:e})]}):e})),sn=l.forwardRef((e,t)=>r.jsx(pe.Description,{asChild:!0,children:r.jsx(I,{ref:t,variant:"omega",...e,tag:"p"})})),oi=l.forwardRef((e,t)=>r.jsx(ai,{ref:t,gap:2,padding:4,justifyContent:"space-between",...e,tag:"footer"})),ai=s.styled(y)`
|
|
1401
1401
|
border-top: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1402
1402
|
flex: 1;
|
|
1403
1403
|
`,si=l.forwardRef((e,t)=>r.jsx(pe.Cancel,{...e,asChild:!0,ref:t})),ii=l.forwardRef((e,t)=>r.jsx(pe.Action,{...e,asChild:!0,ref:t})),li=Object.freeze(Object.defineProperty({__proto__:null,Action:ii,Body:ni,Cancel:si,Content:Zs,Description:sn,Footer:oi,Header:ti,Root:Qs,Trigger:Xs},Symbol.toStringTag,{value:"Module"}));function ue(e,t){const n=l.useRef(null);return t&&n.current&&ci(t,n.current)&&(t=n.current),n.current=t??null,l.useMemo(()=>new F.DateFormatter(e,t),[e,t])}function ci(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const a of n)if(t[a]!==e[a])return!1;return!0}const ln=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),he=ln()?X.useEffect:X.useLayoutEffect,Ae={Log:"live-region-log",Status:"live-region-status",Alert:"live-region-alert"},cr=e=>{const t=document.querySelector(`#${Ae.Log}`);t&&(t.innerText=e)},dr=e=>{const t=document.querySelector(`#${Ae.Status}`);t&&(t.innerText=e)},ur=e=>{const t=document.querySelector(`#${Ae.Alert}`);t&&(t.innerText=e)},di=()=>(l.useEffect(()=>()=>{cr(""),ur(""),dr("")},[]),{notifyLog:cr,notifyAlert:ur,notifyStatus:dr}),cn=()=>r.jsxs(me,{children:[r.jsx("p",{role:"log","aria-live":"polite",id:Ae.Log,"aria-relevant":"all"}),r.jsx("p",{role:"status","aria-live":"polite",id:Ae.Status,"aria-relevant":"all"}),r.jsx("p",{role:"alert","aria-live":"assertive",id:Ae.Alert,"aria-relevant":"all"})]}),ui=s.createGlobalStyle`
|
|
@@ -1508,7 +1508,7 @@ ${s.css`
|
|
|
1508
1508
|
transition: none !important;
|
|
1509
1509
|
animation: none !important;
|
|
1510
1510
|
}
|
|
1511
|
-
`)),document.head.appendChild(a),window.getComputedStyle(a).opacity,document.head.removeChild(a)},[n]),r.jsx(hi,{locale:t,children:r.jsxs(s.ThemeProvider,{theme:n,children:[r.jsx($r.Provider,{...o,children:e}),r.jsx(cn,{}),r.jsx(ui,{})]})})),un=xo.Root,Ft=l.forwardRef(({container:e=(o=>(o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body)(),...t},n)=>e?co.createPortal(r.jsx(v,{ref:n,...t}),e):null);Ft.displayName="Portal";const gi=l.forwardRef(({onClear:e,clearLabel:t="Clear",startIcon:n,disabled:o,hasError:a,loading:i,children:c,id:d,size:u="M",withTags:h,...f},g)=>{const p=l.useRef(null),
|
|
1511
|
+
`)),document.head.appendChild(a),window.getComputedStyle(a).opacity,document.head.removeChild(a)},[n]),r.jsx(hi,{locale:t,children:r.jsxs(s.ThemeProvider,{theme:n,children:[r.jsx($r.Provider,{...o,children:e}),r.jsx(cn,{}),r.jsx(ui,{})]})})),un=xo.Root,Ft=l.forwardRef(({container:e=(o=>(o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body)(),...t},n)=>e?co.createPortal(r.jsx(v,{ref:n,...t}),e):null);Ft.displayName="Portal";const gi=l.forwardRef(({onClear:e,clearLabel:t="Clear",startIcon:n,disabled:o,hasError:a,loading:i,children:c,id:d,size:u="M",withTags:h,...f},g)=>{const p=l.useRef(null),C=k=>{e&&!o&&(e(k),p.current.focus())},{labelNode:m}=ne("SelectTrigger"),x=te(p,g);return r.jsx(D.Select.Trigger,{asChild:!0,children:r.jsxs(pi,{"aria-disabled":o,$hasError:a,ref:x,alignItems:"center",justifyContent:"space-between",position:"relative",overflow:"hidden",hasRadius:!0,background:o?"neutral150":"neutral0",gap:4,cursor:"default","aria-labelledby":m?`${d}-label`:void 0,$size:u,$withTags:h,$hasClear:!!e,...f,children:[r.jsxs(y,{flex:"1",tag:"span",gap:3,overflow:"hidden",children:[n&&r.jsx(y,{tag:"span","aria-hidden":!0,children:n}),c]}),r.jsxs(y,{tag:"span",gap:3,children:[e?r.jsx(ge,{size:"XS",variant:"ghost",onClick:C,"aria-disabled":o,"aria-label":t,label:t,children:r.jsx(O.Cross,{})}):null,i?r.jsx(nt,{small:!0,children:"Loading"}):r.jsx(mi,{children:r.jsx(O.CaretDown,{})})]})]})})}),pi=s.styled(y)`
|
|
1512
1512
|
border: 1px solid ${({theme:e,$hasError:t})=>t?e.colors.danger600:e.colors.neutral200};
|
|
1513
1513
|
padding-inline-start: ${({theme:e})=>e.spaces[4]};
|
|
1514
1514
|
padding-inline-end: ${({theme:e})=>e.spaces[3]};
|
|
@@ -1539,7 +1539,7 @@ ${s.css`
|
|
|
1539
1539
|
& > svg {
|
|
1540
1540
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
1541
1541
|
}
|
|
1542
|
-
`,bi=l.forwardRef(({children:e,placeholder:t,withTags:n,...o},a)=>r.jsx(xi,{ref:a,ellipsis:!0,...o,children:r.jsx($i,{placeholder:t,$withTags:n,children:e})})),xi=s.styled(
|
|
1542
|
+
`,bi=l.forwardRef(({children:e,placeholder:t,withTags:n,...o},a)=>r.jsx(xi,{ref:a,ellipsis:!0,...o,children:r.jsx($i,{placeholder:t,$withTags:n,children:e})})),xi=s.styled(I)`
|
|
1543
1543
|
flex: 1;
|
|
1544
1544
|
min-height: 2.4rem;
|
|
1545
1545
|
|
|
@@ -1607,7 +1607,7 @@ ${s.css`
|
|
|
1607
1607
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
1608
1608
|
cursor: pointer;
|
|
1609
1609
|
}
|
|
1610
|
-
`,hn=D.Select.Root,fn=gi,gn=bi,pn=D.Select.Portal,mn=yi,bn=Ci,Ht=ji,xn=D.Select.ItemIndicator,$n=D.Select.ItemText,Si=D.Select.Group,vt=l.forwardRef(({children:e,clearLabel:t="Clear",customizeContent:n,disabled:o,hasError:a,id:i,loading:c,name:d,onChange:u,onClear:h,onCloseAutoFocus:f,onReachEnd:g,placeholder:p,required:
|
|
1610
|
+
`,hn=D.Select.Root,fn=gi,gn=bi,pn=D.Select.Portal,mn=yi,bn=Ci,Ht=ji,xn=D.Select.ItemIndicator,$n=D.Select.ItemText,Si=D.Select.Group,vt=l.forwardRef(({children:e,clearLabel:t="Clear",customizeContent:n,disabled:o,hasError:a,id:i,loading:c,name:d,onChange:u,onClear:h,onCloseAutoFocus:f,onReachEnd:g,placeholder:p,required:C,size:m,startIcon:x,value:k,...S},$)=>{const[w,j]=l.useState(),[T,b]=l.useState(!1),R=Y=>{b(Y)},z=Y=>{h&&h(Y),u||j("")},E=Y=>{u?u(typeof k=="number"?Number(Y):Y):j(Y)},A=l.useRef(null),U=re(),B=`intersection-${ze(U)}`;Ge(A,Y=>{g&&g(Y)},{selectorToWatch:`#${B}`,skipWhen:!T});const{error:H,required:P,...K}=ne("SingleSelect"),L=!!H||a,M=K.id??i,Z=K.name??d;let G;H?G=`${M}-error`:K.hint&&(G=`${M}-hint`);const oe=(typeof k<"u"&&k!==null?k.toString():w)??"";return r.jsxs(hn,{onOpenChange:R,disabled:o,required:P??C,onValueChange:E,value:oe,...S,children:[r.jsx(fn,{ref:$,id:M,name:Z,startIcon:x,hasError:L,disabled:o,clearLabel:t,loading:c,onClear:oe&&h?z:void 0,"aria-label":S["aria-label"],"aria-describedby":G??S["aria-describedby"],size:m,children:r.jsx(gn,{placeholder:p,textColor:oe?"neutral800":"neutral600",children:oe&&n?n(oe):void 0})}),r.jsx(pn,{children:r.jsx(mn,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:r.jsxs(bn,{ref:A,children:[e,r.jsx(v,{id:B,width:"100%",height:"1px"})]})})})]})}),kt=l.forwardRef(({value:e,startIcon:t,children:n,...o},a)=>r.jsxs(Ht,{ref:a,value:e.toString(),...o,children:[t&&r.jsx(y,{tag:"span","aria-hidden":!0,children:t}),r.jsx(I,{lineHeight:"20px",width:"100%",children:r.jsx($n,{children:n})})]})),Ri=200,fr=15,[Ti,Me]=Oe("DatePicker"),Ii=l.forwardRef(({calendarLabel:e,className:t,initialDate:n,locale:o,maxDate:a,minDate:i,monthSelectLabel:c="Month",onChange:d,value:u,yearSelectLabel:h="Year",hasError:f,id:g,name:p,disabled:C=!1,required:m=!1,onClear:x,clearLabel:k="Clear",size:S="M",...$},w)=>{const j=F.getLocalTimeZone(),T=Xe("DatePicker"),b=o??T.locale,R=ue(b,{day:"2-digit",month:"2-digit",year:"numeric"}),[z,E]=l.useState(!1),[A,U]=l.useState(null),[B,N]=l.useState(null),[H,P]=l.useState(null),[K,L]=l.useState(),[M,Z]=le({defaultProp:n?je(n):void 0,prop:u?je(u):void 0,onChange(V){d&&d(V==null?void 0:V.toDate(j))}}),[G,oe]=l.useMemo(()=>{const V=n?je(n):F.today("UTC"),De=i?je(i):V.set({day:1,month:1,year:V.year-Ri});let We=a?je(a):V.set({day:31,month:12,year:V.year+fr});return We.compare(De)<0&&(We=De.set({day:31,month:12,year:De.year+fr})),[De,We]},[i,a,n]),[Y,J]=l.useState(Di({currentValue:M,minDate:G,maxDate:oe})),_=re(),Q=l.useRef(null),de=V=>{x&&!C&&(L(""),Z(void 0),x(V),B==null||B.focus())},$e=l.useCallback(V=>{V&&M&&J(M),E(V)},[M]);he(()=>{if(u){const V=je(u);L(R.format(V.toDate(j))),J(V)}else L("")},[u,R,j]),he(()=>{if(n&&K===void 0){const V=je(n);L(R.format(V.toDate(j)))}},[n,K,R,j]);const{error:ye,...fe}=ne("Combobox"),Ie=!!ye||f,we=fe.id??g,Be=fe.name??p,Ne=fe.required||m;let Ce;return ye?Ce=`${we}-error`:fe.hint&&(Ce=`${we}-hint`),r.jsxs(Ti,{calendarDate:Y,content:H,contentId:_,disabled:C,locale:b,minDate:G,maxDate:oe,open:z,onCalendarDateChange:J,onContentChange:P,onOpenChange:$e,onTextInputChange:N,onTextValueChange:L,onTriggerChange:U,onValueChange:Z,onClear:x,required:Ne,textInput:B,textValue:K,timeZone:j,trigger:A,value:M,children:[r.jsxs(Ai,{className:t,hasError:Ie,size:S,children:[r.jsx(O.Calendar,{fill:"neutral500","aria-hidden":!0}),r.jsx(Oi,{ref:w,"aria-describedby":Ce,id:we,name:Be,...$}),K&&x?r.jsx(ge,{size:"XS",variant:"ghost",onClick:de,"aria-disabled":C,"aria-label":k,label:k,ref:Q,children:r.jsx(O.Cross,{})}):null]}),r.jsx(Ft,{children:r.jsx(Ni,{label:e,children:r.jsx(Ui,{monthSelectLabel:c,yearSelectLabel:h})})})]})}),gr=e=>!!e.match(/^[^a-zA-Z]*$/),Di=({currentValue:e,minDate:t,maxDate:n})=>{const o=F.today("UTC");return e||(F.minDate(t,o)===t&&F.maxDate(n,o)===n?o:F.minDate(t,o)===o?t:F.maxDate(n,o)===o?n:o)},Ei="DatePickerTrigger",Ai=l.forwardRef(({hasError:e,size:t,...n},o)=>{const a=Me(Ei),i=te(o,d=>a.onTriggerChange(d)),c=()=>{a.disabled||a.onOpenChange(!0)};return r.jsx(io.FocusScope,{asChild:!0,trapped:a.open,onMountAutoFocus:d=>{d.preventDefault()},onUnmountAutoFocus:d=>{var u;(u=document.getSelection())==null||u.empty(),d.preventDefault()},children:r.jsx(zi,{ref:i,$hasError:e,$hasTextValue:!!a.textValue,$size:t,$hasOnClear:!!a.onClear,...n,hasRadius:!0,gap:3,overflow:"hidden",background:a.disabled?"neutral150":"neutral0",onClick:D.composeEventHandlers(n.onClick,()=>{var d;(d=a.textInput)==null||d.focus()}),onPointerDown:D.composeEventHandlers(n.onPointerDown,d=>{var f;const u=d.target;u.hasPointerCapture(d.pointerId)&&u.releasePointerCapture(d.pointerId),(u.closest("button")??u.closest("div"))===d.currentTarget&&d.button===0&&d.ctrlKey===!1&&(c(),(f=a.textInput)==null||f.focus())})})})}),zi=s.styled(y)`
|
|
1611
1611
|
min-width: ${({$hasOnClear:e})=>e?"160px":"130px"};
|
|
1612
1612
|
border: 1px solid ${({theme:e,$hasError:t})=>t?e.colors.danger600:e.colors.neutral200};
|
|
1613
1613
|
padding-inline: ${({theme:e})=>e.spaces[3]};
|
|
@@ -1629,7 +1629,7 @@ ${s.css`
|
|
|
1629
1629
|
}
|
|
1630
1630
|
|
|
1631
1631
|
${({theme:e,$hasError:t})=>be()({theme:e,$hasError:t})};
|
|
1632
|
-
`,Li="DatePickerTextInput",Oi=l.forwardRef(({placeholder:e,...t},n)=>{const o=Me(Li),{onTextValueChange:a,textValue:i,onTextInputChange:c,onOpenChange:d,disabled:u,locale:h}=o,f=te(n,
|
|
1632
|
+
`,Li="DatePickerTextInput",Oi=l.forwardRef(({placeholder:e,...t},n)=>{const o=Me(Li),{onTextValueChange:a,textValue:i,onTextInputChange:c,onOpenChange:d,disabled:u,locale:h}=o,f=te(n,S=>c(S)),g=()=>{u||d(!0)},p=ue(h,{year:"numeric",month:"2-digit",day:"2-digit"}),[C,m,x]=l.useMemo(()=>{var T;const S=p.formatToParts(new Date),$=S.filter(b=>b.type==="year"||b.type==="month"||b.type==="day"),w=$.map(b=>{switch(b.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return""}}),j=((T=S.find(b=>b.type==="literal"))==null?void 0:T.value)??"";return[w,j,$]},[p]),k=C.map(S=>`\\d{${S.length}}`).join(`\\${m}`);return r.jsx(Mi,{role:"combobox",type:"text",inputMode:"numeric",ref:f,"aria-autocomplete":"none","aria-controls":o.contentId,"aria-disabled":o.disabled,"aria-expanded":o.open,"aria-required":o.required,"aria-haspopup":"dialog","data-state":o.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,pattern:k,placeholder:e??C.join(m),...t,value:i??"",onBlur:D.composeEventHandlers(t.onBlur,()=>{if(!o.textValue){o.onValueChange(void 0);return}o.onTextValueChange(p.format(o.calendarDate.toDate(o.timeZone))),o.onValueChange(o.calendarDate)}),onChange:D.composeEventHandlers(t.onChange,S=>{if(gr(S.target.value)){const $=S.target.value.split(m),[w,j,T]=x.map((N,H)=>{const P=$[H];return{...N,value:P}}).sort((N,H)=>N.type==="year"?1:H.type==="year"?-1:N.type==="month"?1:H.type==="month"?-1:0).map(N=>N.value),b=o.calendarDate.year;let R=o.calendarDate.year;if(T){const N=T.length===1?`0${T}`:T;R=T.length<3?Number(`${b}`.slice(0,4-N.length)+N):Number(N)}T&&T.length<3&&R>o.maxDate.year&&(R-=100);const z=o.calendarDate.set({year:R}),E=z.calendar.getMonthsInYear(z),A=z.set({month:j&&Number(j)<=E?Number(j):void 0}),U=A.calendar.getDaysInMonth(A),B=A.set({day:w&&Number(w)<=U?Number(w):void 0});o.onCalendarDateChange(Pi(B,o.minDate,o.maxDate)),o.onTextValueChange(S.target.value)}}),onKeyDown:D.composeEventHandlers(t.onKeyDown,S=>{if(!o.open&&(gr(S.key)||["ArrowDown","Backspace"].includes(S.key)))g();else if(["Tab"].includes(S.key)&&o.open)S.preventDefault();else if(["Escape"].includes(S.key))o.open?o.onOpenChange(!1):(o.onValueChange(void 0),o.onTextValueChange("")),S.preventDefault();else if(o.open&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(S.key))switch(S.preventDefault(),S.key){case"ArrowDown":{const $=o.calendarDate.add({weeks:1});if(o.maxDate&&$.compare(o.maxDate)>0)return;o.onCalendarDateChange($);return}case"ArrowRight":{const $=o.calendarDate.add({days:1});if(o.maxDate&&$.compare(o.maxDate)>0)return;o.onCalendarDateChange($);return}case"ArrowUp":{const $=o.calendarDate.subtract({weeks:1});if(o.minDate&&$.compare(o.minDate)<0)return;o.onCalendarDateChange($);return}case"ArrowLeft":{const $=o.calendarDate.subtract({days:1});if(o.minDate&&$.compare(o.minDate)<0)return;o.onCalendarDateChange($)}}else o.open&&["Enter"].includes(S.key)&&(S.preventDefault(),a(p.format(o.calendarDate.toDate(o.timeZone))),o.onValueChange(o.calendarDate),o.onOpenChange(!1))})})});function Pi(e,t,n){return t&&(e=F.maxDate(e,t)),n&&(e=F.minDate(e,n)),e}const Mi=s.styled.input`
|
|
1633
1633
|
width: 100%;
|
|
1634
1634
|
${nn}
|
|
1635
1635
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
@@ -1668,7 +1668,7 @@ ${s.css`
|
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
1671
|
-
`,_i="DatePickerCalendar",[Vi,qi]=Oe("DateFormatters"),Ui=l.forwardRef(({monthSelectLabel:e,yearSelectLabel:t,...n},o)=>{const{locale:a,timeZone:i,minDate:c,maxDate:d,calendarDate:u,onCalendarDateChange:h}=Me(_i),f=F.startOfMonth(u),g=l.useMemo(()=>{const b=c.year,
|
|
1671
|
+
`,_i="DatePickerCalendar",[Vi,qi]=Oe("DateFormatters"),Ui=l.forwardRef(({monthSelectLabel:e,yearSelectLabel:t,...n},o)=>{const{locale:a,timeZone:i,minDate:c,maxDate:d,calendarDate:u,onCalendarDateChange:h}=Me(_i),f=F.startOfMonth(u),g=l.useMemo(()=>{const b=c.year,R=d.year;return[...Array(R-b+1).keys()].map(z=>(b+z).toString())},[c,d]),p=ue(a,{month:"long"}),C=l.useMemo(()=>[...Array(u.calendar.getMonthsInYear(u)).keys()].map(b=>p.format(u.set({month:b+1}).toDate(i))),[u,p,i]),m=ue(a,{weekday:"short"}),x=l.useMemo(()=>{const b=F.startOfWeek(F.today(i),a);return[...new Array(7).keys()].map(R=>{const E=b.add({days:R}).toDate(i);return m.format(E)})},[i,a,m]),k=ue(a,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),S=ue(a,{day:"numeric",calendar:u.calendar.identifier}),$=ue(a,{day:"2-digit",month:"2-digit",year:"numeric"}),w=b=>{if(typeof b=="number")return;const R=u.set({month:C.indexOf(b)+1});h(R)},j=b=>{if(typeof b=="number")return;const R=u.set({year:parseInt(b,10)});h(R)},T=Gi(f,a);return r.jsx(Vi,{dateFormatter:k,cellDateFormatter:S,textValueFormatter:$,children:r.jsxs(y,{ref:o,direction:"column",alignItems:"stretch",padding:4,...n,children:[r.jsxs(Ki,{justifyContent:"flex-start",paddingBottom:4,paddingLeft:2,paddingRight:2,gap:2,children:[r.jsx(Re,{children:r.jsx(vt,{"aria-label":e,value:C[u.month-1],onChange:w,children:C.map(b=>r.jsx(kt,{value:b,children:b},b))})}),r.jsx(Re,{children:r.jsx(vt,{value:u.year.toString(),"aria-label":t,onChange:j,children:g.map(b=>r.jsx(kt,{value:b,children:b},b))})})]}),r.jsxs("table",{role:"grid",children:[r.jsx("thead",{"aria-hidden":!0,children:r.jsx("tr",{"aria-rowindex":0,children:x.map((b,R)=>r.jsx(Yi,{"aria-colindex":R,children:b},b))})}),r.jsx("tbody",{children:[...new Array(6).keys()].map(b=>r.jsx("tr",{"aria-rowindex":b+2,children:T(b).map((R,z)=>R?r.jsx(Zi,{"aria-colindex":z+1,date:R,startDate:f,disabled:c.compare(R)>0||R.compare(d)>0},R.toString()):r.jsx(yn,{"aria-colindex":z+1},z+1))},b))})]})]})})}),Gi=(e,t)=>n=>{let o=e.add({weeks:n});const a=[];o=F.startOfWeek(o,t);const i=F.getDayOfWeek(o,t);for(let c=0;c<i;c++)a.push(null);for(;a.length<7;){a.push(o);const c=o.add({days:1});if(F.isSameDay(o,c))break;o=c}for(;a.length<7;)a.push(null);return a},Ki=s.styled(y)`
|
|
1672
1672
|
div[role='combobox'] {
|
|
1673
1673
|
border: 1px solid transparent;
|
|
1674
1674
|
background: transparent;
|
|
@@ -1682,10 +1682,10 @@ ${s.css`
|
|
|
1682
1682
|
background-color: ${({theme:e})=>e.colors.neutral100};
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
`,Yi=l.forwardRef(({children:e,...t},n)=>r.jsx(Qi,{tag:"th",role:"gridcell",ref:n,...t,height:"2.4rem",width:"3.2rem",children:r.jsx(
|
|
1685
|
+
`,Yi=l.forwardRef(({children:e,...t},n)=>r.jsx(Qi,{tag:"th",role:"gridcell",ref:n,...t,height:"2.4rem",width:"3.2rem",children:r.jsx(I,{variant:"pi",fontWeight:"bold",color:"neutral800",children:e.slice(0,2)})})),Qi=s.styled(v)`
|
|
1686
1686
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1687
1687
|
text-transform: capitalize;
|
|
1688
|
-
`,Xi="DatePickerCalendarCell",Zi=l.forwardRef(({date:e,startDate:t,disabled:n,...o},a)=>{const{timeZone:i,calendarDate:c,onValueChange:d,onOpenChange:u,onTextValueChange:h,onCalendarDateChange:f}=Me(Xi),{dateFormatter:g,cellDateFormatter:p,textValueFormatter:
|
|
1688
|
+
`,Xi="DatePickerCalendarCell",Zi=l.forwardRef(({date:e,startDate:t,disabled:n,...o},a)=>{const{timeZone:i,calendarDate:c,onValueChange:d,onOpenChange:u,onTextValueChange:h,onCalendarDateChange:f}=Me(Xi),{dateFormatter:g,cellDateFormatter:p,textValueFormatter:C}=qi("DatePickerCalendarCell"),m=F.isSameDay(c,e),x=l.useMemo(()=>g.format(e.toDate(i)),[g,e,i]),k=l.useMemo(()=>p.formatToParts(e.toDate(i)).find(j=>j.type==="day").value,[p,e,i]),S=F.endOfMonth(t),$=e.compare(t)<0||e.compare(S)>0;let w="neutral900";return m?w="primary600":$&&(w="neutral600"),r.jsx(yn,{tag:"td",role:"gridcell",ref:a,"aria-selected":m,...o,hasRadius:!0,"aria-label":x,tabIndex:m?0:-1,background:m?"primary100":"neutral0",cursor:"pointer",onPointerDown:D.composeEventHandlers(o.onPointerDown,j=>{j.preventDefault(),f(e),d(e),h(C.format(e.toDate(i))),u(!1)}),"aria-disabled":n,children:r.jsx(I,{variant:"pi",textColor:w,children:k})})}),yn=s.styled(v)`
|
|
1689
1689
|
text-align: center;
|
|
1690
1690
|
padding: 0.7rem;
|
|
1691
1691
|
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
@@ -1703,7 +1703,7 @@ ${s.css`
|
|
|
1703
1703
|
}
|
|
1704
1704
|
`,je=e=>{const t=e.toISOString(),n=F.parseAbsolute(t,"UTC");return F.toCalendarDate(n)},wn=l.memo(Ii),pt=e=>!!e.match(/^[^a-zA-Z]*$/);function Ji(e=""){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const el=s.styled(on)`
|
|
1705
1705
|
min-width: ${({onClear:e})=>e?"160px":"130px"};
|
|
1706
|
-
`,Cn=l.forwardRef(({step:e=15,value:t,defaultValue:n,onChange:o,...a},i)=>{const c=Xe("TimePicker"),[d,u]=l.useState(""),[h,f]=le({prop:t,defaultProp:n,onChange:o}),g=ue(c.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),p=l.useMemo(()=>{const j=g.formatToParts(new Date),{value:
|
|
1706
|
+
`,Cn=l.forwardRef(({step:e=15,value:t,defaultValue:n,onChange:o,...a},i)=>{const c=Xe("TimePicker"),[d,u]=l.useState(""),[h,f]=le({prop:t,defaultProp:n,onChange:o}),g=ue(c.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),p=l.useMemo(()=>{const j=g.formatToParts(new Date),{value:T}=j.find(b=>b.type==="literal");return T},[g]),C=l.useMemo(()=>{const j=60/e;return[...Array(24).keys()].flatMap(T=>[...Array(j).keys()].map(b=>g.format(new Date(0,0,0,T,b*e))))},[e,g]),m=j=>{(!j||pt(j))&&u(j)},x=j=>{const[T,b]=j.split(p);if(!T&&!b)return;const R=Number(T??"0"),z=Number(b??"0");if(!(R>23||z>59))return g.format(new Date(0,0,0,R,z))},k=j=>{const T=x(j.target.value);T?(u(T),f(T)):u(h)},S=j=>{if(typeof j<"u"){const T=x(j);f(T)}else f(j)};l.useEffect(()=>{const j=typeof t>"u"?"":t;pt(j)&&u(j)},[t,u]);const w=`\\d{2}${Ji(p)}\\d{2}`;return r.jsx(el,{...a,ref:i,value:h,onChange:S,isPrintableCharacter:pt,allowCustomValue:!0,placeholder:`--${p}--`,autocomplete:"none",startIcon:r.jsx(O.Clock,{fill:"neutral500"}),inputMode:"numeric",pattern:w,textValue:d,onTextValueChange:m,onBlur:k,children:C.map(j=>r.jsx(an,{value:j,children:j},j))})}),tl=l.forwardRef(({clearLabel:e="clear",dateLabel:t="Choose date",timeLabel:n="Choose time",disabled:o=!1,hasError:a,onChange:i,onClear:c,required:d=!1,step:u,value:h,initialDate:f,size:g,...p},C)=>{const m=l.useRef(null),[x,k]=l.useState(!1),S=h?Ee(h,!1):void 0,[$,w]=le({defaultProp:f?Ee(f,!1):void 0,prop:x?void 0:S,onChange(L){i&&i(L==null?void 0:L.toDate(F.getLocalTimeZone()))}}),j=Xe("DateTimePicker"),T=ue(j.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),b=$?T.format($.toDate(F.getLocalTimeZone())):"",R=l.useRef(h);he(()=>{x&&$&&w(void 0)},[x,$,w]),he(()=>{const L=R.current;h==null&&L!=null&&$&&w(void 0),x&&h!==L&&k(!1),R.current=h},[h,$,x,w,k]),he(()=>{x&&$===void 0&&h==null&&k(!1)},[x,$,h,k]);const z=L=>{let M=L?Ee(L):void 0;if(b&&M){const[Z,G]=b.split(":");M=M.set({hour:parseInt(Z,10),minute:parseInt(G,10)})}w(M)},E=L=>{if(!L)return;const[M,Z]=L.split(":"),G=$?$.set({hour:parseInt(M,10),minute:parseInt(Z,10)}):Ee(new Date).set({hour:parseInt(M,10),minute:parseInt(Z,10)});w(G)},A=L=>{L.preventDefault(),k(!0),c&&c(L)},U=()=>{const L=$?$.set({hour:0,minute:0}):Ee(new Date);w(L)},B=te(m,C),{error:N,id:H,labelNode:P}=ne("DateTimePicker"),K=!!N||a;return r.jsxs(y,{"aria-labelledby":P?`${H}-label`:void 0,role:"group",flex:"1",gap:1,wrap:"wrap",children:[r.jsx(Re,{flex:"1",children:r.jsx(wn,{...p,hasError:K,size:g,value:$==null?void 0:$.toDate("UTC"),onChange:z,required:d,onClear:c?A:void 0,clearLabel:`${e} date`,disabled:o,ref:B,"aria-label":t})}),r.jsx(Re,{flex:"1",children:r.jsx(Cn,{size:g,hasError:K,value:b,onChange:E,onClear:c&&b!==void 0&&b!=="00:00"?U:void 0,clearLabel:`${e} time`,required:d,disabled:o,step:u,"aria-label":n})})]})}),Ee=(e,t=!0)=>{const n=e.toISOString();let o=F.parseAbsoluteToLocal(n);return t&&(o=o.set({hour:0,minute:0})),F.toCalendarDateTime(o)},_t=l.forwardRef((e,t)=>r.jsx(rl,{ref:t,background:"neutral150",...e,"data-orientation":"horizontal",role:"separator",tag:"div"})),rl=s.styled(v)`
|
|
1707
1707
|
height: 1px;
|
|
1708
1708
|
border: none;
|
|
1709
1709
|
/* If contained in a Flex parent we want to prevent the Divider to shink */
|
|
@@ -1712,7 +1712,7 @@ ${s.css`
|
|
|
1712
1712
|
svg {
|
|
1713
1713
|
height: 8.8rem;
|
|
1714
1714
|
}
|
|
1715
|
-
`,ol=l.forwardRef(({icon:e,content:t,action:n,hasRadius:o=!0,shadow:a="tableShadow"},i)=>r.jsxs(
|
|
1715
|
+
`,ol=l.forwardRef(({icon:e,content:t,action:n,hasRadius:o=!0,shadow:a="tableShadow"},i)=>r.jsxs(y,{ref:i,alignItems:"center",direction:"column",padding:11,background:"neutral0",hasRadius:o,shadow:a,children:[e?r.jsx(nl,{paddingBottom:6,"aria-hidden":!0,children:e}):null,r.jsx(v,{paddingBottom:4,children:r.jsx(I,{variant:"delta",tag:"p",textAlign:"center",textColor:"neutral600",children:t})}),n]})),jn=Rt.StateEffect.define(),vn=Rt.StateEffect.define(),al=bt.Decoration.mark({attributes:{style:"background-color: yellow; color: black"}}),sl=Rt.StateField.define({create(){return bt.Decoration.none},update(e,t){return e=e.map(t.changes),t.effects.forEach(n=>{n.is(jn)?e=e.update({add:n.value,sort:!0}):n.is(vn)&&(e=e.update({filter:n.value}))}),e},provide:e=>bt.EditorView.decorations.from(e)}),il=l.forwardRef(({hasError:e,required:t,id:n,value:o="",disabled:a=!1,onChange:i=()=>null,...c},d)=>{const u=l.useRef(),h=l.useRef(),f=l.useRef(),{error:g,...p}=ne("JsonInput"),C=!!g||e,m=p.id??n,x=p.required||t;let k;g?k=`${m}-error`:p.hint&&(k=`${m}-hint`);const S=E=>{var U,B;const A=(U=h.current)==null?void 0:U.doc;if(A){const{text:N,to:H}=A.line(E),P=H-N.trimStart().length;H>P&&((B=f.current)==null||B.dispatch({effects:jn.of([al.range(P,H)])}))}},$=()=>{var A,U;const E=(A=h.current)==null?void 0:A.doc;if(E){const B=E.length||0;(U=f.current)==null||U.dispatch({effects:vn.of((N,H)=>H<=0||N>=B)})}},w=({state:E,view:A})=>{f.current=A,h.current=E,$();const B=Xt.jsonParseLinter()(A);B.length&&S(E.doc.lineAt(B[0].from).number)},j=(E,A)=>{w(A),i(E)},T=(E,A)=>{f.current=E,h.current=A,w({view:E,state:A})},{setContainer:b,view:R}=uo.useCodeMirror({value:o,onCreateEditor:T,container:u.current,editable:!a,extensions:[Xt.json(),sl],onChange:j,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),z=te(u,b);return l.useImperativeHandle(d,()=>({...R==null?void 0:R.dom,focus(){R&&R.focus()},scrollIntoView(E){R&&R.dom.scrollIntoView(E)}}),[R]),r.jsx(ll,{ref:z,$disabled:a,$hasError:C,alignItems:"stretch",hasRadius:!0,"aria-required":x,id:m,"aria-describedby":k,...c})}),ll=s.styled(y)`
|
|
1716
1716
|
font-size: ${({theme:e})=>e.fontSizes[3]};
|
|
1717
1717
|
line-height: ${({theme:e})=>e.lineHeights[6]};
|
|
1718
1718
|
|
|
@@ -1814,9 +1814,9 @@ ${s.css`
|
|
|
1814
1814
|
animation-name: ${q.modalPopOut};
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
`,kn=l.forwardRef((e,t)=>r.jsx(Te.Close,{...e,asChild:!0,ref:t})),$l=l.forwardRef(({children:e,closeLabel:t="Close modal",...n},o)=>r.jsxs(yl,{ref:o,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[e,r.jsx(kn,{children:r.jsx(ge,{withTooltip:!1,label:t,children:r.jsx(O.Cross,{})})})]})),yl=s.styled(
|
|
1817
|
+
`,kn=l.forwardRef((e,t)=>r.jsx(Te.Close,{...e,asChild:!0,ref:t})),$l=l.forwardRef(({children:e,closeLabel:t="Close modal",...n},o)=>r.jsxs(yl,{ref:o,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[e,r.jsx(kn,{children:r.jsx(ge,{withTooltip:!1,label:t,children:r.jsx(O.Cross,{})})})]})),yl=s.styled(y)`
|
|
1818
1818
|
border-bottom: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1819
|
-
`,wl=l.forwardRef((e,t)=>r.jsx(Te.Title,{asChild:!0,children:r.jsx(
|
|
1819
|
+
`,wl=l.forwardRef((e,t)=>r.jsx(Te.Title,{asChild:!0,children:r.jsx(I,{tag:"h2",variant:"omega",fontWeight:"bold",ref:t,...e})})),Cl=l.forwardRef(({children:e,...t},n)=>r.jsx(jl,{ref:n,...t,children:e})),jl=s.styled(Qe)`
|
|
1820
1820
|
padding-inline: ${e=>e.theme.spaces[7]};
|
|
1821
1821
|
|
|
1822
1822
|
& > div {
|
|
@@ -1831,10 +1831,10 @@ ${s.css`
|
|
|
1831
1831
|
display: block !important;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
`,vl=l.forwardRef((e,t)=>r.jsx(kl,{ref:t,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...e,tag:"footer"})),kl=s.styled(
|
|
1834
|
+
`,vl=l.forwardRef((e,t)=>r.jsx(kl,{ref:t,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...e,tag:"footer"})),kl=s.styled(y)`
|
|
1835
1835
|
border-top: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1836
1836
|
flex: 1;
|
|
1837
|
-
`,Sl=Object.freeze(Object.defineProperty({__proto__:null,Body:Cl,Close:kn,Content:ml,Footer:vl,Header:$l,Root:gl,Title:wl,Trigger:pl},Symbol.toStringTag,{value:"Module"})),Rl="",Tl=l.forwardRef(({startAction:e,locale:t,onValueChange:n,value:o,step:a=1,disabled:i=!1,...c},d)=>{const u=Xe("NumberInput"),h=t||u.locale,f=l.useRef(new Zt.NumberParser(h,{style:"decimal"})),g=l.useRef(new Zt.NumberFormatter(h,{maximumFractionDigits:20})),[p,
|
|
1837
|
+
`,Sl=Object.freeze(Object.defineProperty({__proto__:null,Body:Cl,Close:kn,Content:ml,Footer:vl,Header:$l,Root:gl,Title:wl,Trigger:pl},Symbol.toStringTag,{value:"Module"})),Rl="",Tl=l.forwardRef(({startAction:e,locale:t,onValueChange:n,value:o,step:a=1,disabled:i=!1,...c},d)=>{const u=Xe("NumberInput"),h=t||u.locale,f=l.useRef(new Zt.NumberParser(h,{style:"decimal"})),g=l.useRef(new Zt.NumberFormatter(h,{maximumFractionDigits:20})),[p,C]=Il({prop(b){const R=String(o);return isNaN(Number(R))||R!==b&&b!==""?b:g.current.format(Number(o))},defaultProp:Rl,onChange(b){if(!n)return;const R=f.current.parse(b??"");n(isNaN(R)?void 0:R)}}),m=b=>{C(String(b))},x=({target:{value:b}})=>{f.current.isValidPartialNumber(b)&&m(b)},S=(b=>{const R=b.toString();return R.includes(".")?R.split(".")[1].length:0})(a),$=()=>{if(!p){m(a);return}const b=f.current.parse(p),R=isNaN(b)?a:b+a,z=parseFloat(R.toFixed(S));m(g.current.format(z))},w=()=>{if(!p){m(-a);return}const b=f.current.parse(p),R=isNaN(b)?-a:b-a,z=parseFloat(R.toFixed(S));m(g.current.format(z))},j=b=>{if(!i)switch(b.key){case W.DOWN:{b.preventDefault(),w();break}case W.UP:{b.preventDefault(),$();break}}},T=()=>{if(p){const b=f.current.parse(p),R=isNaN(b)?"":g.current.format(b);m(R)}};return r.jsx(ut,{ref:d,startAction:e,disabled:i,type:"text",inputMode:"decimal",onChange:x,onKeyDown:j,onBlur:T,value:p,endAction:r.jsxs(y,{direction:"column",children:[r.jsx(pr,{disabled:i,"aria-hidden":!0,$reverse:!0,onClick:$,tabIndex:-1,type:"button","data-testid":"ArrowUp",children:r.jsx(O.CaretDown,{fill:"neutral500"})}),r.jsx(pr,{disabled:i,"aria-hidden":!0,onClick:w,tabIndex:-1,type:"button","data-testid":"ArrowDown",children:r.jsx(O.CaretDown,{fill:"neutral500"})})]}),...c})}),pr=s.styled.button`
|
|
1838
1838
|
display: flex;
|
|
1839
1839
|
justify-content: center;
|
|
1840
1840
|
align-items: center;
|
|
@@ -1846,7 +1846,7 @@ ${s.css`
|
|
|
1846
1846
|
width: 1.2rem;
|
|
1847
1847
|
transform: ${({$reverse:e})=>e?"rotateX(180deg)":void 0};
|
|
1848
1848
|
}
|
|
1849
|
-
`;function Il({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,a]=Et({defaultProp:t,onChange:n}),i=e!==void 0,c=e instanceof Function?e(o):e,d=i?c:o,u=D.useCallbackRef(n),h=l.useCallback(f=>{if(i){const p=typeof f=="function"?f(c):f;p!==c&&(u(p),a(f))}else a(f)},[i,c,a,u]);return[d,h]}const Sn=l.createContext({activePage:1,pageCount:1}),Vt=()=>l.useContext(Sn),Dl=({children:e,label:t="Pagination",activePage:n,pageCount:o})=>{const a=l.useMemo(()=>({activePage:n,pageCount:o}),[n,o]);return r.jsx(Sn.Provider,{value:a,children:r.jsx(v,{"aria-label":t,tag:"nav",children:r.jsx(
|
|
1849
|
+
`;function Il({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,a]=Et({defaultProp:t,onChange:n}),i=e!==void 0,c=e instanceof Function?e(o):e,d=i?c:o,u=D.useCallbackRef(n),h=l.useCallback(f=>{if(i){const p=typeof f=="function"?f(c):f;p!==c&&(u(p),a(f))}else a(f)},[i,c,a,u]);return[d,h]}const Sn=l.createContext({activePage:1,pageCount:1}),Vt=()=>l.useContext(Sn),Dl=({children:e,label:t="Pagination",activePage:n,pageCount:o})=>{const a=l.useMemo(()=>({activePage:n,pageCount:o}),[n,o]);return r.jsx(Sn.Provider,{value:a,children:r.jsx(v,{"aria-label":t,tag:"nav",children:r.jsx(y,{tag:"ol",gap:1,children:l.Children.map(e,(i,c)=>r.jsx("li",{children:i},c))})})})},El=ae(({children:e,...t},n)=>{const{activePage:o}=Vt(),a=o===1;return r.jsxs(Tn,{ref:n,"aria-disabled":a,tabIndex:a?-1:void 0,...t,children:[r.jsx(me,{children:e}),r.jsx(O.ChevronLeft,{"aria-hidden":!0})]})}),Al=ae(({children:e,...t},n)=>{const{activePage:o,pageCount:a}=Vt(),i=o===a;return r.jsxs(Tn,{ref:n,"aria-disabled":i,tabIndex:i?-1:void 0,...t,children:[r.jsx(me,{children:e}),r.jsx(O.ChevronRight,{"aria-hidden":!0})]})}),Rn=s.styled(Pe)`
|
|
1850
1850
|
padding: ${({theme:e})=>e.spaces[3]};
|
|
1851
1851
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1852
1852
|
box-shadow: ${({$active:e,theme:t})=>e?t.shadows.filterShadow:void 0};
|
|
@@ -1871,14 +1871,14 @@ ${s.css`
|
|
|
1871
1871
|
${e=>e["aria-disabled"]?`
|
|
1872
1872
|
pointer-events: none;
|
|
1873
1873
|
`:void 0}
|
|
1874
|
-
`,zl=ae(({number:e,children:t,...n},o)=>{const{activePage:a}=Vt(),i=a===e;return r.jsxs(Ll,{ref:o,...n,"aria-current":i,$active:i,children:[r.jsx(me,{children:t}),r.jsx(
|
|
1874
|
+
`,zl=ae(({number:e,children:t,...n},o)=>{const{activePage:a}=Vt(),i=a===e;return r.jsxs(Ll,{ref:o,...n,"aria-current":i,$active:i,children:[r.jsx(me,{children:t}),r.jsx(I,{"aria-hidden":!0,fontWeight:i?"bold":void 0,lineHeight:"revert",variant:"pi",children:e})]})}),Ll=s.styled(Rn)`
|
|
1875
1875
|
color: ${({theme:e,$active:t})=>t?e.colors.primary700:e.colors.neutral800};
|
|
1876
1876
|
background: ${({theme:e,$active:t})=>t?e.colors.neutral0:void 0};
|
|
1877
1877
|
|
|
1878
1878
|
&:hover {
|
|
1879
1879
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
1880
1880
|
}
|
|
1881
|
-
`,Ol=({children:e,...t})=>r.jsxs(v,{...t,children:[r.jsx(me,{children:e}),r.jsx(
|
|
1881
|
+
`,Ol=({children:e,...t})=>r.jsxs(v,{...t,children:[r.jsx(me,{children:e}),r.jsx(I,{"aria-hidden":!0,lineHeight:"revert",textColor:"neutral800",variant:"pi",children:"…"})]}),Pl=Le.Root,Ml=Le.Anchor,Bl=Le.Arrow,Nl=l.forwardRef((e,t)=>r.jsx(Le.Trigger,{...e,asChild:!0,ref:t})),Wl=l.forwardRef((e,t)=>r.jsx(Le.Portal,{children:r.jsx(Fl,{sideOffset:4,side:"bottom",align:"start",...e,ref:t})})),Fl=s.styled(Le.Content)`
|
|
1882
1882
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
1883
1883
|
z-index: ${({theme:e})=>e.zIndices.popover};
|
|
1884
1884
|
background-color: ${e=>e.theme.colors.neutral0};
|
|
@@ -1939,7 +1939,7 @@ ${s.css`
|
|
|
1939
1939
|
display: flex;
|
|
1940
1940
|
flex-direction: column;
|
|
1941
1941
|
gap: ${e=>e.theme.spaces[3]};
|
|
1942
|
-
`,Ql=l.forwardRef(({children:e,id:t,...n},o)=>{const a=re(t);return r.jsxs(
|
|
1942
|
+
`,Ql=l.forwardRef(({children:e,id:t,...n},o)=>{const a=re(t);return r.jsxs(y,{gap:2,children:[r.jsx(Xl,{id:a,ref:o,...n,children:r.jsx(Zl,{})}),r.jsx(I,{tag:"label",htmlFor:a,children:e})]})}),Xl=s.styled(It.Item)`
|
|
1943
1943
|
background: ${e=>e.theme.colors.neutral0};
|
|
1944
1944
|
width: 2rem;
|
|
1945
1945
|
height: 2rem;
|
|
@@ -1998,7 +1998,7 @@ ${s.css`
|
|
|
1998
1998
|
border-radius: 50%;
|
|
1999
1999
|
background: ${e=>e.theme.colors.primary600};
|
|
2000
2000
|
}
|
|
2001
|
-
`,Jl=Object.freeze(Object.defineProperty({__proto__:null,Group:Kl,Item:Ql},Symbol.toStringTag,{value:"Module"})),ec=e=>{const t=e.querySelector('[tabindex="0"]');t&&t.focus()},In=l.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),tc=()=>l.useContext(In),Dn=l.forwardRef(({colCount:e,rowCount:t,jumpStep:n=3,initialCol:o=0,initialRow:a=0,...i},c)=>{const d=l.useRef(null),u=l.useRef(!1),h=te(d,c),[
|
|
2001
|
+
`,Jl=Object.freeze(Object.defineProperty({__proto__:null,Group:Kl,Item:Ql},Symbol.toStringTag,{value:"Module"})),ec=e=>{const t=e.querySelector('[tabindex="0"]');t&&t.focus()},In=l.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),tc=()=>l.useContext(In),Dn=l.forwardRef(({colCount:e,rowCount:t,jumpStep:n=3,initialCol:o=0,initialRow:a=0,...i},c)=>{const d=l.useRef(null),u=l.useRef(!1),h=l.useRef(!1),f=te(d,c),[g,p]=l.useState(a),[C,m]=l.useState(o),x=l.useCallback(({colIndex:$,rowIndex:w})=>{h.current=!0,m($),p(w)},[]);l.useEffect(()=>{u.current&&!h.current&&ec(d.current),h.current=!1,u.current||(u.current=!0)},[C,g]);const k=$=>{switch(h.current=!1,$.key){case W.RIGHT:{$.preventDefault(),m(w=>w<e-1?w+1:w);break}case W.LEFT:{$.preventDefault(),m(w=>w>0?w-1:w);break}case W.UP:{$.preventDefault(),p(w=>w>0?w-1:w);break}case W.DOWN:{$.preventDefault(),p(w=>w<t-1?w+1:w);break}case W.HOME:{$.preventDefault(),$.ctrlKey&&p(0),m(0);break}case W.END:{$.preventDefault(),$.ctrlKey&&p(t-1),m(e-1);break}case W.PAGE_DOWN:{$.preventDefault(),p(w=>w+n<t?w+n:t-1);break}case W.PAGE_UP:{$.preventDefault(),p(w=>w-n>0?w-n:0);break}}},S=l.useMemo(()=>({rowIndex:g,colIndex:C,setTableValues:x}),[C,g,x]);return r.jsx(In.Provider,{value:S,children:r.jsx("table",{role:"grid",ref:f,"aria-rowcount":t,"aria-colcount":e,onKeyDown:k,...i})})}),ve=(e,t)=>[...e.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(a=>a.hasAttribute("disabled")?!1:t?!0:a.getAttribute("tabindex")!=="-1"),mt=e=>e.filter(t=>t.tagName==="INPUT"?t.type!=="checkbox"&&t.type!=="radio":!1),qt=l.forwardRef(({coords:e={col:0,row:0},tag:t="td",...n},o)=>{const a=l.useRef(null),i=te(o,a),{rowIndex:c,colIndex:d,setTableValues:u}=tc(),[h,f]=l.useState(!1),g=m=>{var S;const x=ve(a.current,!0);if(x.length===0||x.length===1&&mt(x).length===0)return;if(x.length>1&&!x.find($=>$.tagName!=="BUTTON")){m.preventDefault();const $=x.findIndex(w=>w===document.activeElement);if(m.key===W.RIGHT){const w=x[$+1];w&&(m.stopPropagation(),w.focus())}else if(m.key===W.LEFT){const w=x[$-1];w&&(m.stopPropagation(),w.focus())}return}const k=m.key===W.ENTER;if(k&&!h)f(!0);else if((m.key===W.ESCAPE||k)&&h){if(k&&((S=document.activeElement)==null?void 0:S.tagName)==="A")return;f(!1),a.current.focus()}else h&&m.stopPropagation()},p=c===e.row-1&&d===e.col-1;he(()=>{const m=ve(a.current,!0);m.length===0||m.length===1&&mt(m).length!==0||m.length>1&&m.find(x=>x.tagName!=="BUTTON")?(a.current.setAttribute("tabIndex",!h&&p?"0":"-1"),m.forEach((x,k)=>{x.setAttribute("tabIndex",h?"0":"-1"),h&&k===0&&x.focus()})):m.forEach(x=>{x.setAttribute("tabIndex",p?"0":"-1")})},[h,p]);const C=l.useCallback(()=>{const m=ve(a.current,!0);m.length>=1&&(mt(m).length!==0||!m.find(x=>x.tagName!=="BUTTON"))&&f(!0),u({rowIndex:e.row-1,colIndex:e.col-1})},[e,u]);return he(()=>{const m=a.current;return ve(m,!0).forEach(k=>{k.addEventListener("focus",C)}),()=>{ve(m,!0).forEach(S=>{S.removeEventListener("focus",C)})}},[C]),r.jsx(v,{role:"gridcell",tag:t,ref:i,onKeyDown:g,...n})}),En=e=>r.jsx(qt,{...e,tag:"th"}),An=({children:e,...t})=>{const n=l.Children.toArray(e).map(o=>l.isValidElement(o)?l.cloneElement(o,{"aria-rowindex":1}):o);return r.jsx("thead",{...t,children:n})},zn=({children:e,...t})=>{const n=l.Children.toArray(e).map((o,a)=>l.isValidElement(o)?l.cloneElement(o,{"aria-rowindex":a+2}):o);return r.jsx("tbody",{...t,children:n})},Ln=({children:e,...t})=>{const n=l.Children.toArray(e).map((o,a)=>l.isValidElement(o)?l.cloneElement(o,{"aria-colindex":a+1,coords:{col:a+1,row:t["aria-rowindex"]}}):o);return r.jsx(v,{tag:"tr",...t,children:n})},rc=s.styled(O.Cross)`
|
|
2002
2002
|
font-size: 0.5rem;
|
|
2003
2003
|
path {
|
|
2004
2004
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
@@ -2064,11 +2064,11 @@ ${s.css`
|
|
|
2064
2064
|
&:hover {
|
|
2065
2065
|
cursor: ${({$iconAction:e})=>e?"pointer":"initial"};
|
|
2066
2066
|
}
|
|
2067
|
-
`,Bn=({children:e,icon:t,label:n,disabled:o=!1,onClick:a,...i})=>{const c=d=>{o||!a||a(d)};return r.jsxs(
|
|
2067
|
+
`,Bn=({children:e,icon:t,label:n,disabled:o=!1,onClick:a,...i})=>{const c=d=>{o||!a||a(d)};return r.jsxs(y,{inline:!0,background:o?"neutral200":"primary100",color:o?"neutral700":"primary600",paddingLeft:3,paddingRight:1,borderColor:o?"neutral300":"primary200",hasRadius:!0,height:"3.2rem",...i,children:[r.jsx(sc,{$disabled:o,variant:"pi",fontWeight:"bold",children:e}),r.jsx(ac,{tag:"button",disabled:o,"aria-disabled":o,"aria-label":n,padding:2,onClick:c,$iconAction:!!a,children:t})]})},sc=s.styled(I)`
|
|
2068
2068
|
color: inherit;
|
|
2069
2069
|
border-right: 1px solid ${({theme:e,$disabled:t})=>t?e.colors.neutral300:e.colors.primary200};
|
|
2070
2070
|
padding-right: ${({theme:e})=>e.spaces[2]};
|
|
2071
|
-
`,Nn=l.forwardRef(({children:e,clearLabel:t="Clear",customizeContent:n,disabled:o,hasError:a,id:i,loading:c,name:d,onChange:u,onClear:h,onCloseAutoFocus:f,onReachEnd:g,placeholder:p,required:
|
|
2071
|
+
`,Nn=l.forwardRef(({children:e,clearLabel:t="Clear",customizeContent:n,disabled:o,hasError:a,id:i,loading:c,name:d,onChange:u,onClear:h,onCloseAutoFocus:f,onReachEnd:g,placeholder:p,required:C,size:m,startIcon:x,value:k,withTags:S,...$},w)=>{const j=l.useRef(null),[T,b]=l.useState(),[R,z]=l.useState(!1),E=_=>{u?u(_):b(_)},A=_=>()=>{const Q=Array.isArray(k)?k.filter(de=>de!==_):(T??[]).filter(de=>de!==_);u?u(Q):b(Q)},U=_=>{z(_)},B=re(),N=`intersection-${ze(B)}`;Ge(j,_=>{g&&g(_)},{selectorToWatch:`#${N}`,skipWhen:!R});const P=typeof k<"u"&&k!==null?k:T,K=_=>_&&typeof _=="object"&&_.value?r.jsx(Bn,{tabIndex:-1,disabled:o,icon:r.jsx(O.Cross,{width:`${14/16}rem`,height:`${14/16}rem`}),onClick:A(_.value),children:_.textValue},_.value):null,{error:L,...M}=ne("MultiSelect"),Z=!!L||a,G=M.id??i,oe=M.name??d,Y=M.required??C;let J;return L?J=`${G}-error`:M.hint&&(J=`${G}-hint`),r.jsxs(hn,{onOpenChange:U,disabled:o,required:Y,onValueChange:E,value:P,...$,multi:!0,children:[r.jsx(fn,{ref:w,id:G,name:oe,"aria-label":$["aria-label"],"aria-describedby":J??$["aria-describedby"],startIcon:x,hasError:Z,disabled:o,clearLabel:t,loading:c,onClear:P!=null&&P.length?h:void 0,withTags:!!(S&&((P==null?void 0:P.length)??!1)),size:m,children:r.jsx(gn,{placeholder:p,textColor:P!=null&&P.length?"neutral800":"neutral600",withTags:S,children:P!=null&&P.length?S?K:n?n(P):void 0:void 0})}),r.jsx(pn,{children:r.jsx(mn,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:r.jsxs(bn,{ref:j,children:[e,r.jsx(v,{id:N,width:"100%",height:"1px"})]})})})]})}),Ut=l.forwardRef(({value:e,children:t,startIcon:n,...o},a)=>r.jsxs(Ht,{ref:a,value:e.toString(),...o,children:[n&&r.jsx(v,{tag:"span","aria-hidden":!0,children:n}),r.jsx(xn,{children:({isSelected:i,isIntermediate:c})=>r.jsx(dt,{checked:c?"indeterminate":i})}),r.jsx(I,{children:r.jsx($n,{children:t})})]})),Wn=l.forwardRef(({children:e,label:t,startIcon:n,values:o=[],...a},i)=>r.jsxs(Si,{ref:i,children:[r.jsxs(Ht,{value:o,...a,children:[n&&r.jsx(v,{tag:"span","aria-hidden":!0,children:n}),r.jsx(xn,{children:({isSelected:c,isIntermediate:d})=>r.jsx(dt,{checked:d?"indeterminate":c})}),r.jsx(I,{children:t})]}),e]})),ic=({options:e,...t})=>r.jsx(Nn,{...t,children:e.map(n=>"children"in n?r.jsx(Wn,{label:n.label,values:n.children.map(o=>o.value.toString()),children:n.children.map(o=>r.jsx(lc,{value:o.value,children:o.label},o.value))},n.label):r.jsx(Ut,{value:n.value,children:n.label},n.value))}),lc=s.styled(Ut)`
|
|
2072
2072
|
padding-left: ${({theme:e})=>e.spaces[7]};
|
|
2073
2073
|
`,cc=e=>e==="XS"?{paddingX:"0.6rem",paddingY:"0.2rem"}:e==="S"?{paddingX:2,paddingY:1}:{paddingX:5,paddingY:4},dc=({variant:e="primary",size:t="M",children:n,...o})=>{const a=`${e}100`,i=`${e}200`,c=`${e}600`,{paddingX:d,paddingY:u}=cc(t);return r.jsx(v,{borderColor:i,color:c,background:a,hasRadius:!0,paddingTop:u,paddingBottom:u,paddingLeft:d,paddingRight:d,...o,children:n})},uc="23.2rem",hc=l.forwardRef(({...e},t)=>r.jsx(fc,{ref:t,...e,tag:"nav"})),fc=s.styled(v)`
|
|
2074
2074
|
width: ${uc};
|
|
@@ -2082,7 +2082,7 @@ ${s.css`
|
|
|
2082
2082
|
`,mr=s.styled(_t)`
|
|
2083
2083
|
width: 2.4rem;
|
|
2084
2084
|
background-color: ${({theme:e})=>e.colors.neutral200};
|
|
2085
|
-
`,gc=({tag:e="h2",label:t,searchLabel:n="",searchable:o=!1,onChange:a=()=>{},value:i="",onClear:c=()=>{},onSubmit:d=()=>{},id:u,placeholder:h})=>{const[f,g]=l.useState(!1),p=D.usePrev(f),
|
|
2085
|
+
`,gc=({tag:e="h2",label:t,searchLabel:n="",searchable:o=!1,onChange:a=()=>{},value:i="",onClear:c=()=>{},onSubmit:d=()=>{},id:u,placeholder:h})=>{const[f,g]=l.useState(!1),p=D.usePrev(f),C=re(u),m=l.useRef(void 0),x=l.useRef(void 0);l.useEffect(()=>{f&&m.current&&m.current.focus(),p&&!f&&x.current&&x.current.focus()},[f,p]);const k=()=>{g(j=>!j)},S=j=>{c(j),m.current.focus()},$=j=>{var T;((T=j.relatedTarget)==null?void 0:T.id)!==C&&g(!1)},w=j=>{j.key===W.ESCAPE&&g(!1)};return f?r.jsxs(v,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[r.jsx(Mn,{children:r.jsx(Pn,{name:"searchbar",value:i,onChange:a,placeholder:h,onKeyDown:w,ref:m,onBlur:$,onClear:S,onSubmit:d,clearLabel:"Clear",children:n})}),r.jsx(v,{paddingLeft:2,paddingTop:4,children:r.jsx(mr,{})})]}):r.jsxs(y,{direction:"column",alignItems:"flex-start",paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[r.jsxs(y,{justifyContent:"space-between",alignItems:"flex-start",width:"100%",gap:2,children:[r.jsx(I,{variant:"beta",tag:e,children:t}),o&&r.jsx(ge,{ref:x,onClick:k,label:n,children:r.jsx(O.Search,{})})]}),r.jsx(v,{paddingTop:4,children:r.jsx(mr,{})})]})},pc=ae(({active:e,children:t,icon:n=null,withBullet:o=!1,isSubSectionChild:a=!1,...i},c)=>r.jsxs(mc,{background:"neutral100",paddingLeft:a?9:7,paddingBottom:2,paddingTop:2,ref:c,...i,children:[r.jsxs(y,{children:[n?r.jsx(bc,{children:n}):r.jsx(St,{$active:e}),r.jsx(I,{paddingLeft:2,children:t})]}),o&&r.jsx(y,{paddingRight:4,children:r.jsx(St,{$active:!0})})]})),St=s.styled.span`
|
|
2086
2086
|
width: 0.4rem;
|
|
2087
2087
|
height: 0.4rem;
|
|
2088
2088
|
background-color: ${({theme:e,$active:t})=>t?e.colors.primary600:e.colors.neutral600};
|
|
@@ -2124,12 +2124,12 @@ ${s.css`
|
|
|
2124
2124
|
background: transparent;
|
|
2125
2125
|
display: flex;
|
|
2126
2126
|
align-items: center;
|
|
2127
|
-
`,$c=({label:e,children:t,id:n})=>{const[o,a]=l.useState(!0),i=re(n),c=()=>{a(d=>!d)};return r.jsxs(v,{children:[r.jsx(v,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:r.jsx(
|
|
2127
|
+
`,$c=({label:e,children:t,id:n})=>{const[o,a]=l.useState(!0),i=re(n),c=()=>{a(d=>!d)};return r.jsxs(v,{children:[r.jsx(v,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:r.jsx(y,{justifyContent:"space-between",children:r.jsxs(xc,{onClick:c,"aria-expanded":o,"aria-controls":i,children:[r.jsx(O.CaretDown,{width:"1.2rem",height:"1.2rem","aria-hidden":!0,fill:"neutral700",style:{transform:`rotateX(${o?"0deg":"180deg"})`}}),r.jsx(v,{paddingLeft:2,children:r.jsx(I,{tag:"span",fontWeight:"semiBold",textColor:"neutral800",children:e})})]})})}),o&&r.jsx("ul",{id:i,children:l.Children.map(t,(d,u)=>r.jsx("li",{children:d},u))})]})},yc=({collapsable:e=!1,label:t,onClick:n=()=>{},ariaExpanded:o,ariaControls:a})=>e?r.jsxs(y,{tag:"button",onClick:n,"aria-expanded":o,"aria-controls":a,textAlign:"left",alignItems:"center",children:[r.jsx(v,{paddingRight:1,children:r.jsx(I,{variant:"sigma",textColor:"neutral600",children:t})}),e&&r.jsx(O.CaretDown,{width:"1.2rem","aria-hidden":!0,fill:"neutral500",style:{transform:o?"rotateX(0deg)":"rotateX(180deg)"}})]}):r.jsx(y,{children:r.jsx(v,{paddingRight:1,children:r.jsx(I,{variant:"sigma",textColor:"neutral600",children:t})})}),wc=s.styled(v)`
|
|
2128
2128
|
& > svg {
|
|
2129
2129
|
height: 0.4rem;
|
|
2130
2130
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
2131
2131
|
}
|
|
2132
|
-
`,Cc=({collapsable:e=!1,label:t,badgeLabel:n,children:o,id:a})=>{const[i,c]=l.useState(!0),d=re(a),u=()=>{c(h=>!h)};return r.jsxs(
|
|
2132
|
+
`,Cc=({collapsable:e=!1,label:t,badgeLabel:n,children:o,id:a})=>{const[i,c]=l.useState(!0),d=re(a),u=()=>{c(h=>!h)};return r.jsxs(y,{direction:"column",alignItems:"stretch",gap:1,children:[r.jsx(wc,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:r.jsxs(v,{position:"relative",paddingRight:n?6:0,children:[r.jsx(yc,{onClick:u,ariaExpanded:i,ariaControls:d,collapsable:e,label:t}),n&&r.jsx(At,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:n})]})}),(!e||i)&&r.jsx("ol",{id:d,children:l.Children.map(o,(h,f)=>r.jsx("li",{children:h},f))})]})},jc=({children:e,spacing:t=2,horizontal:n=!1,...o})=>r.jsx(v,{paddingTop:2,paddingBottom:4,children:r.jsx(y,{tag:"ol",gap:t,direction:n?"row":"column",alignItems:n?"center":"stretch",...o,children:l.Children.map(e,(a,i)=>r.jsx("li",{children:a},i))})}),vc=l.forwardRef(({visibleLabels:e,onLabel:t="On",offLabel:n="Off",onCheckedChange:o,checked:a,defaultChecked:i,disabled:c,...d},u)=>{const[h,f]=le({prop:a,defaultProp:i}),g=p=>{f(p)};return r.jsxs(y,{gap:3,children:[r.jsx(kc,{ref:u,onCheckedChange:D.composeEventHandlers(o,g),checked:h,disabled:c,...d,children:r.jsx(Sc,{})}),e?r.jsx(Rc,{"aria-hidden":!0,"data-disabled":c,"data-state":h?"checked":"unchecked",children:h?t:n}):null]})}),kc=s.styled(Cr.Root)`
|
|
2133
2133
|
width: 4rem;
|
|
2134
2134
|
height: 2.4rem;
|
|
2135
2135
|
border-radius: 1.2rem;
|
|
@@ -2162,7 +2162,7 @@ ${s.css`
|
|
|
2162
2162
|
transition: transform ${e=>e.theme.motion.timings[120]}
|
|
2163
2163
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
2164
2164
|
}
|
|
2165
|
-
`,Rc=s.styled(
|
|
2165
|
+
`,Rc=s.styled(I)`
|
|
2166
2166
|
color: ${e=>e.theme.colors.danger600};
|
|
2167
2167
|
|
|
2168
2168
|
&[data-state='checked'] {
|
|
@@ -2189,7 +2189,7 @@ ${s.css`
|
|
|
2189
2189
|
left: 0;
|
|
2190
2190
|
opacity: 0;
|
|
2191
2191
|
height: 0.2rem;
|
|
2192
|
-
`,Hn=s.styled(
|
|
2192
|
+
`,Hn=s.styled(I)``,Lc=s.styled(at.Trigger)`
|
|
2193
2193
|
position: relative;
|
|
2194
2194
|
color: ${e=>e.$hasError?e.theme.colors.danger600:e.theme.colors.neutral600};
|
|
2195
2195
|
cursor: pointer;
|
|
@@ -2315,7 +2315,7 @@ ${s.css`
|
|
|
2315
2315
|
input {
|
|
2316
2316
|
vertical-align: sub;
|
|
2317
2317
|
}
|
|
2318
|
-
`,Yc=l.forwardRef(({children:e,action:t,...n},o)=>r.jsx(_n,{color:"neutral600",as:En,ref:o,...n,children:r.jsxs(
|
|
2318
|
+
`,Yc=l.forwardRef(({children:e,action:t,...n},o)=>r.jsx(_n,{color:"neutral600",as:En,ref:o,...n,children:r.jsxs(y,{children:[e,t]})})),Qc=l.forwardRef(({children:e,...t},n)=>r.jsx(_n,{color:"neutral800",ref:n,...t,children:e})),Xc=s.styled(v)`
|
|
2319
2319
|
height: 2.4rem;
|
|
2320
2320
|
width: 2.4rem;
|
|
2321
2321
|
border-radius: 50%;
|
|
@@ -2336,7 +2336,7 @@ ${s.css`
|
|
|
2336
2336
|
display: block;
|
|
2337
2337
|
width: 100%;
|
|
2338
2338
|
border: none;
|
|
2339
|
-
`,Jc=({children:e,icon:t,...n})=>r.jsxs("div",{children:[r.jsx(_t,{}),r.jsx(Zc,{tag:"button",background:"primary100",padding:5,...n,children:r.jsxs(
|
|
2339
|
+
`,Jc=({children:e,icon:t,...n})=>r.jsxs("div",{children:[r.jsx(_t,{}),r.jsx(Zc,{tag:"button",background:"primary100",padding:5,...n,children:r.jsxs(y,{children:[r.jsx(Xc,{"aria-hidden":!0,background:"primary200",children:t}),r.jsx(v,{paddingLeft:3,children:r.jsx(I,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:e})})]})})]}),ed=ae(({children:e,startIcon:t,endIcon:n,disabled:o=!1,loading:a=!1,type:i="button",...c},d)=>{const u=o||a;return r.jsxs(nd,{ref:d,disabled:u,"aria-disabled":u,tag:"button",type:i,gap:2,...c,children:[a?r.jsx(rd,{"aria-hidden":!0,children:r.jsx(O.Loader,{})}):t,r.jsx(I,{variant:"pi",children:e}),n]})}),td=s.keyframes`
|
|
2340
2340
|
from {
|
|
2341
2341
|
transform: rotate(0deg);
|
|
2342
2342
|
}
|
|
@@ -2347,7 +2347,7 @@ ${s.css`
|
|
|
2347
2347
|
display: flex;
|
|
2348
2348
|
animation: ${td} 2s infinite linear;
|
|
2349
2349
|
will-change: transform;
|
|
2350
|
-
`,nd=s.styled(
|
|
2350
|
+
`,nd=s.styled(y)`
|
|
2351
2351
|
border: none;
|
|
2352
2352
|
background-color: transparent;
|
|
2353
2353
|
color: ${e=>e.theme.colors.primary600};
|
|
@@ -2359,7 +2359,7 @@ ${s.css`
|
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
2361
|
${st}
|
|
2362
|
-
`,Vn=l.forwardRef((e,t)=>r.jsx(ut,{ref:t,...e}));Vn.displayName="TextInput";const od=l.forwardRef(({disabled:e,hasError:t,id:n,name:o,required:a,resizable:i=!0,...c},d)=>{const{error:u,...h}=ne("Textarea"),f=!!u||t,g=h.id??n,p=h.name??o,
|
|
2362
|
+
`,Vn=l.forwardRef((e,t)=>r.jsx(ut,{ref:t,...e}));Vn.displayName="TextInput";const od=l.forwardRef(({disabled:e,hasError:t,id:n,name:o,required:a,resizable:i=!0,...c},d)=>{const{error:u,...h}=ne("Textarea"),f=!!u||t,g=h.id??n,p=h.name??o,C=h.required||a;let m;return u?m=`${g}-error`:h.hint&&(m=`${g}-hint`),r.jsx(ad,{borderColor:f?"danger600":"neutral200",$hasError:f,hasRadius:!0,children:r.jsx(sd,{"aria-invalid":f,"aria-required":C,tag:"textarea",background:e?"neutral150":"neutral0",color:e?"neutral600":"neutral800",disabled:e,hasRadius:!0,ref:d,lineHeight:4,padding:4,width:"100%",height:"100%",id:g,name:p,"aria-describedby":m,$resizable:i,...c})})}),ad=s.styled(v)`
|
|
2363
2363
|
${be()}
|
|
2364
2364
|
`,sd=s.styled(v)`
|
|
2365
2365
|
display: block;
|
|
@@ -2389,9 +2389,9 @@ ${s.css`
|
|
|
2389
2389
|
&:disabled {
|
|
2390
2390
|
cursor: not-allowed;
|
|
2391
2391
|
}
|
|
2392
|
-
`,id=l.forwardRef(({offLabel:e,onLabel:t,disabled:n,hasError:o,required:a,id:i,name:c,checked:d,onChange:u,...h},f)=>{const[g=!1,p]=le({prop:d}),
|
|
2392
|
+
`,id=l.forwardRef(({offLabel:e,onLabel:t,disabled:n,hasError:o,required:a,id:i,name:c,checked:d,onChange:u,...h},f)=>{const[g=!1,p]=le({prop:d}),C=g!==null&&!g,{error:m,...x}=ne("Toggle"),k=!!m||o,S=x.id??i,$=x.name??c,w=x.required||a;let j;return m?j=`${S}-error`:x.hint&&(j=`${S}-hint`),r.jsxs(ld,{position:"relative",hasRadius:!0,padding:1,background:n?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:k?"danger600":"neutral200",wrap:"wrap",cursor:n?"not-allowed":"pointer",$hasError:k,children:[r.jsx(br,{hasRadius:!0,flex:"1 1 50%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&C?"neutral200":C?"neutral0":"transparent",borderColor:n&&C?"neutral300":C?"neutral200":n?"neutral150":"neutral100",children:r.jsx(I,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":C?"danger700":"neutral600",children:e})}),r.jsx(br,{hasRadius:!0,flex:"1 1 50%",paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&g?"neutral200":g?"neutral0":"transparent",borderColor:n&&g?"neutral300":g?"neutral200":n?"neutral150":"neutral100",children:r.jsx(I,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":g?"primary600":"neutral600",children:t})}),r.jsx(cd,{...h,id:S,name:$,ref:f,onChange:T=>{p(T.currentTarget.checked),u==null||u(T)},type:"checkbox","aria-required":w,disabled:n,"aria-disabled":n,checked:!!g,"aria-describedby":j})]})}),ld=s.styled(y)`
|
|
2393
2393
|
${be()}
|
|
2394
|
-
`,br=s.styled(
|
|
2394
|
+
`,br=s.styled(y)`
|
|
2395
2395
|
padding-block: 0.6rem;
|
|
2396
2396
|
`,cd=s.styled.input`
|
|
2397
2397
|
height: 100%;
|
|
@@ -2401,4 +2401,4 @@ ${s.css`
|
|
|
2401
2401
|
top: 0;
|
|
2402
2402
|
z-index: 0;
|
|
2403
2403
|
width: 100%;
|
|
2404
|
-
`,dd={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function ud(){const[e,t]=X.useState(null),[n,o]=X.useState(dd),a=X.useMemo(()=>new ResizeObserver(i=>{if(i[0]){const{x:c,y:d,width:u,height:h,top:f,left:g,bottom:p,right:
|
|
2404
|
+
`,dd={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function ud(){const[e,t]=X.useState(null),[n,o]=X.useState(dd),a=X.useMemo(()=>new ResizeObserver(i=>{if(i[0]){const{x:c,y:d,width:u,height:h,top:f,left:g,bottom:p,right:C}=i[0].contentRect;o({x:c,y:d,width:u,height:h,top:f,left:g,bottom:p,right:C})}}),[]);return he(()=>{if(e)return a.observe(e),()=>{a.disconnect()}},[e,a]),[t,n]}const hd=({onEscape:e,restoreFocus:t=!0,skipAutoFocus:n=!1,...o})=>{const a=l.useRef(null);l.useEffect(()=>{let c=null;return t&&(c=document.activeElement),()=>{c&&c.focus()}},[t]),l.useEffect(()=>{if(!a.current||n)return;const c=ve(a.current);c.length>0?c[0].focus():console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.")},[n]);const i=c=>{if(c.key===W.ESCAPE&&e){e();return}if(c.key!==W.TAB)return;const d=ve(a.current);if(d.length>0){const u=d[0],h=d[d.length-1];c.shiftKey?u===document.activeElement&&(c.preventDefault(),h.focus()):h===document.activeElement&&(c.preventDefault(),u.focus())}};return r.jsx("div",{ref:a,onKeyDown:i,...o})},fd=({tagName:e,attributeName:t="",...n})=>{const o=()=>{const c=document.activeElement;return c?e?c.tagName.toLowerCase()===e:c.hasAttribute(t):!1},a=c=>e?c.querySelectorAll(e):c.querySelectorAll(`[${t}]`),i=c=>{switch(c.key){case W.RIGHT:case W.DOWN:{if(o()){c.preventDefault();const d=document.activeElement,u=[...a(c.currentTarget)],h=u.findIndex(g=>g===d),f=h+1<u.length?h+1:0;u[f].focus()}break}case W.LEFT:case W.UP:{if(o()){c.preventDefault();const d=document.activeElement,u=[...a(c.currentTarget)],h=u.findIndex(g=>g===d),f=h-1>-1?h-1:u.length-1;u[f].focus()}break}case W.HOME:{o()&&(c.preventDefault(),a(c.currentTarget).item(0).focus());break}case W.END:{if(o()){c.preventDefault();const d=a(c.currentTarget);d.item(d.length-1).focus()}break}}};return r.jsx(v,{onKeyDown:i,...n})};Object.defineProperty(exports,"composeEventHandlers",{enumerable:!0,get:()=>D.composeEventHandlers});Object.defineProperty(exports,"useCallbackRef",{enumerable:!0,get:()=>D.useCallbackRef});Object.defineProperty(exports,"useCollator",{enumerable:!0,get:()=>D.useCollator});Object.defineProperty(exports,"useFilter",{enumerable:!0,get:()=>D.useFilter});exports.AccessibleIcon=Se;exports.Accordion=qo;exports.Alert=Zo;exports.Avatar=ia;exports.Badge=At;exports.BaseLink=Pe;exports.Box=v;exports.Breadcrumbs=Er;exports.Button=rt;exports.Card=Va;exports.CardAction=Zr;exports.CardAsset=Ua;exports.CardBadge=Xa;exports.CardBody=Za;exports.CardCheckbox=rs;exports.CardContent=os;exports.CardHeader=ss;exports.CardSubtitle=cs;exports.CardTimer=is;exports.CardTitle=ls;exports.Carousel=Jr;exports.CarouselActions=Ds;exports.CarouselImage=Es;exports.CarouselInput=Is;exports.CarouselSlide=zs;exports.Checkbox=dt;exports.Combobox=on;exports.ComboboxOption=an;exports.Crumb=Ar;exports.CrumbLink=zr;exports.CrumbSimpleMenu=Yr;exports.DatePicker=wn;exports.DateTimePicker=tl;exports.DesignSystemProvider=fi;exports.Dialog=li;exports.DismissibleLayer=un;exports.Divider=_t;exports.Dots=Ol;exports.EmptyStateLayout=ol;exports.Field=Ts;exports.Flex=y;exports.FocusTrap=hd;exports.Grid=_s;exports.IconButton=ge;exports.IconButtonGroup=$a;exports.JSONInput=il;exports.KeyboardKeys=W;exports.KeyboardNavigable=fd;exports.Link=Wr;exports.LinkButton=cl;exports.LiveRegions=cn;exports.Loader=nt;exports.Main=ul;exports.Menu=Fa;exports.MenuItem=Ha;exports.Modal=Sl;exports.MultiSelect=Nn;exports.MultiSelectGroup=Wn;exports.MultiSelectNested=ic;exports.MultiSelectOption=Ut;exports.NextLink=Al;exports.NumberInput=Tl;exports.PageLink=zl;exports.Pagination=Dl;exports.Popover=Vl;exports.Portal=Ft;exports.PreviousLink=El;exports.ProgressBar=ql;exports.Radio=Jl;exports.RawTable=Dn;exports.RawTbody=zn;exports.RawTd=qt;exports.RawTh=En;exports.RawThead=An;exports.RawTr=Ln;exports.ScrollArea=Qe;exports.SearchForm=Mn;exports.Searchbar=Pn;exports.SimpleMenu=Kr;exports.SingleSelect=vt;exports.SingleSelectOption=kt;exports.SkipToContent=fl;exports.Status=dc;exports.SubNav=hc;exports.SubNavHeader=gc;exports.SubNavLink=pc;exports.SubNavLinkSection=$c;exports.SubNavSection=Cc;exports.SubNavSections=jc;exports.Switch=vc;exports.TFooter=Jc;exports.Table=Hc;exports.Tabs=Mc;exports.Tag=Bn;exports.Tbody=Vc;exports.Td=Qc;exports.TextButton=ed;exports.TextInput=Vn;exports.Textarea=od;exports.Th=Yc;exports.Thead=Uc;exports.TimePicker=Cn;exports.Toggle=id;exports.Tooltip=ct;exports.Tr=Kc;exports.Typography=I;exports.VisuallyHidden=me;exports._internaluseUncontrolledState=Et;exports.composeRefs=zt;exports.convertUTCDateToCalendarDateTime=Ee;exports.darkTheme=bs;exports.extendTheme=xs;exports.extractStyleFromTheme=_e;exports.getThemeSize=$s;exports.handleResponsiveValues=ke;exports.inputFocusStyle=be;exports.isSSR=ln;exports.lightTheme=Mt;exports.setOpacity=Wt;exports.useComposedRefs=te;exports.useControllableState=le;exports.useDateFormatter=ue;exports.useDesignSystem=Xe;exports.useField=ne;exports.useId=re;exports.useIsomorphicLayoutEffect=he;exports.useMeasure=ud;exports.useNotifyAT=di;
|