@strapi/design-system 2.2.3 → 2.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/components/RawTable/RawTable.d.ts.map +1 -1
- package/dist/components/RawTable/RawTable.test.d.ts +2 -0
- package/dist/components/RawTable/RawTable.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/useColorScheme.test.d.ts +2 -0
- package/dist/hooks/__tests__/useColorScheme.test.d.ts.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +7 -0
- package/dist/hooks/useColorScheme.d.ts.map +1 -0
- package/dist/index.js +192 -192
- package/dist/index.mjs +832 -830
- package/dist/next/components/ui/button.d.ts +12 -0
- package/dist/next/components/ui/button.d.ts.map +1 -0
- package/dist/next/components/ui/index.d.ts +2 -0
- package/dist/next/components/ui/index.d.ts.map +1 -0
- package/dist/next/index.d.ts +4 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +1 -0
- package/dist/next/index.mjs +55 -0
- package/dist/next/lib/utils.d.ts +3 -0
- package/dist/next/lib/utils.d.ts.map +1 -0
- package/dist/next/styles.css +1 -0
- package/dist/useColorScheme-CkO08j1W.js +11 -0
- package/dist/useColorScheme-_G9Tqp-s.cjs +1 -0
- package/dist/utilities/DesignSystemProvider.d.ts.map +1 -1
- package/dist/utilities/DesignSystemProvider.test.d.ts +2 -0
- package/dist/utilities/DesignSystemProvider.test.d.ts.map +1 -0
- package/package.json +51 -8
- package/src/next/source.css +14 -0
- package/src/next/theme.css +108 -0
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("styled-components"),oe=require("react"),xr=require("@radix-ui/react-use-callback-ref"),F=require("@internationalized/date"),ie=require("./useColorScheme-_G9Tqp-s.cjs"),r=require("react/jsx-runtime"),$r=require("@radix-ui/react-tooltip"),Xn=require("@radix-ui/react-dismissable-layer"),D=require("@strapi/ui-primitives"),Zn=require("@radix-ui/react-accordion"),O=require("@strapi/icons"),Jn=require("@radix-ui/react-avatar"),eo=require("@radix-ui/react-dropdown-menu"),to=require("@radix-ui/react-checkbox"),ro=require("@tanstack/react-virtual"),no=require("@radix-ui/react-scroll-area"),oo=require("@radix-ui/react-alert-dialog"),Fe=require("@floating-ui/react-dom"),ao=require("@radix-ui/react-focus-guards"),so=require("@radix-ui/react-focus-scope"),io=require("react-remove-scroll"),lo=require("react-dom"),Xt=require("@codemirror/lang-json"),co=require("@uiw/react-codemirror"),Rt=require("@codemirror/state"),bt=require("@codemirror/view"),uo=require("@radix-ui/react-dialog"),Zt=require("@internationalized/number"),ho=require("@radix-ui/react-popover"),fo=require("@radix-ui/react-progress"),go=require("@radix-ui/react-radio-group"),po=require("@radix-ui/react-switch"),mo=require("@radix-ui/react-tabs"),Je=require("lodash");function J(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=J(oe),xe=J($r),bo=J(Xn),Ue=J(Zn),Tt=J(Jn),de=J(eo),yr=J(to),ot=J(no),pe=J(oo),Te=J(uo),Le=J(ho),wr=J(fo),It=J(go),Cr=J(po),at=J(mo),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 xo(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&&xo(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"},$o=e=>{const[t,n,o,a]=e,i=n??t;return[t,i,o??t,a??i]};function yo(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=yo(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
|
|
3
|
+
`)},er=(e,t,n)=>{if(Array.isArray(e)&&Array.isArray(t)){const o=$o(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:X,position:G,right:ne,shadow:Y,shrink:Z,tag:_,textAlign:Q,textTransform:ue,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:X,$position:G,$right:ne,$shadow:Y,$shrink:Z,$textAlign:Q,$textTransform:ue,$top:$e,$transform:ye,$transition:fe,$width:Ie,$zIndex:we};return r.jsx(wo,{as:Ce,ref:Ne,...V,...Be})}),wo=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(Co,{className:n,ref:t,...f,...h})}),Co=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
|
+
`,jo="alpha",vo="beta",ko="delta",So="epsilon",tr="omega",Ro="pi",To="sigma",jr=s.css`
|
|
8
8
|
display: block;
|
|
9
9
|
white-space: nowrap;
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
text-overflow: ellipsis;
|
|
12
|
-
`,
|
|
12
|
+
`,Io=({$variant:e=tr,theme:t,$fontSize:n,$lineHeight:o})=>{const a=n&&ke({fontSize:n},t),i=o&&ke({lineHeight:o},t);switch(e){case jo:return s.css`
|
|
13
13
|
font-weight: ${t.fontWeights.bold};
|
|
14
14
|
|
|
15
15
|
/* -------------------------------------------------------------
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
line-height: ${t.lineHeights[2]};
|
|
38
38
|
}
|
|
39
39
|
`}
|
|
40
|
-
`;case
|
|
40
|
+
`;case vo:return s.css`
|
|
41
41
|
font-weight: ${t.fontWeights.bold};
|
|
42
42
|
|
|
43
43
|
/* -------------------------------------------------------------
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
/* Mobile: 2.4rem */
|
|
61
61
|
line-height: ${t.lineHeights[1]};
|
|
62
62
|
`}
|
|
63
|
-
`;case
|
|
63
|
+
`;case ko:return s.css`
|
|
64
64
|
font-weight: ${t.fontWeights.semiBold};
|
|
65
65
|
|
|
66
66
|
/* -------------------------------------------------------------
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
line-height: ${t.lineHeights[2]};
|
|
89
89
|
}
|
|
90
90
|
`}
|
|
91
|
-
`;case
|
|
91
|
+
`;case So:return s.css`
|
|
92
92
|
/* -------------------------------------------------------------
|
|
93
93
|
* Font Size
|
|
94
94
|
* -------------------------------------------------------------*/
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
line-height: ${t.lineHeights[4]};
|
|
141
141
|
}
|
|
142
142
|
`}
|
|
143
|
-
`;case
|
|
143
|
+
`;case Ro:return s.css`
|
|
144
144
|
/* -------------------------------------------------------------
|
|
145
145
|
* Font Size
|
|
146
146
|
* -------------------------------------------------------------*/
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
/* All: 1.6rem */
|
|
157
157
|
line-height: ${t.lineHeights[3]};
|
|
158
158
|
`}
|
|
159
|
-
`;case
|
|
159
|
+
`;case To:return s.css`
|
|
160
160
|
font-weight: ${t.fontWeights.bold};
|
|
161
161
|
text-transform: uppercase;
|
|
162
162
|
|
|
@@ -188,12 +188,12 @@
|
|
|
188
188
|
font-size: ${t.fontSizes[2]};
|
|
189
189
|
}
|
|
190
190
|
`}
|
|
191
|
-
`}},
|
|
192
|
-
${({$variant:e,$fontSize:t,$lineHeight:n,theme:o})=>
|
|
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(Do,{ref:t,tag:"span",...g,...f})}),Do=s.styled(v)`
|
|
192
|
+
${({$variant:e,$fontSize:t,$lineHeight:n,theme:o})=>Io({$variant:e,theme:o,$fontSize:t,$lineHeight:n})}
|
|
193
193
|
${({$ellipsis:e})=>e?jr:""}
|
|
194
194
|
|
|
195
195
|
${({theme:e,...t})=>ke({color:t.$textColor,textDecoration:t.$textDecoration,textTransform:t.$textTransform,lineHeight:t.$lineHeight,fontWeight:t.$fontWeight,fontSize:t.$fontSize},e)}
|
|
196
|
-
`,[
|
|
196
|
+
`,[Eo,Dt]=Oe("Accordion"),Ao=l.forwardRef(({children:e,size:t="S",...n},o)=>r.jsx(zo,{ref:o,$size:t,collapsible:!0,...n,type:"single",children:r.jsx(Eo,{size:t,children:e})})),zo=s.styled(Ue.Root)`
|
|
197
197
|
background-color: ${e=>e.theme.colors.neutral0};
|
|
198
198
|
|
|
199
199
|
${e=>e.$size==="S"?s.css`
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
`:s.css`
|
|
203
203
|
|
|
204
204
|
`}
|
|
205
|
-
`,
|
|
205
|
+
`,Lo=l.forwardRef((e,t)=>{const{size:n}=Dt("Item");return r.jsx(Oo,{$size:n,"data-size":n,ref:t,...e})}),Oo=s.styled(Ue.Item)`
|
|
206
206
|
overflow: hidden;
|
|
207
207
|
margin: 1px 0;
|
|
208
208
|
|
|
@@ -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
|
-
`,
|
|
246
|
+
`,Po=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
|
-
`,
|
|
295
|
+
`,Mo=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
|
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
transition: ${e=>e.theme.transitions.color};
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
`,
|
|
309
|
+
`,Bo=l.forwardRef(({variant:e="primary",...t},n)=>r.jsx(No,{$variant:e,ref:n,...t})),No=s.styled(Ue.Header)`
|
|
310
310
|
display: flex;
|
|
311
311
|
align-items: center;
|
|
312
312
|
background-color: ${e=>e.$variant==="primary"?e.theme.colors.neutral0:e.theme.colors.neutral100};
|
|
@@ -341,35 +341,35 @@
|
|
|
341
341
|
@media (prefers-reduced-motion: no-preference) {
|
|
342
342
|
transition: ${e=>e.theme.transitions.backgroundColor};
|
|
343
343
|
}
|
|
344
|
-
`,
|
|
344
|
+
`,Wo=l.forwardRef((e,t)=>r.jsx(_o,{ref:t,...e})),Fo=s.keyframes`
|
|
345
345
|
from {
|
|
346
346
|
height: 0;
|
|
347
347
|
}
|
|
348
348
|
to {
|
|
349
349
|
height: var(--radix-accordion-content-height);
|
|
350
350
|
}
|
|
351
|
-
`,
|
|
351
|
+
`,Ho=s.keyframes`
|
|
352
352
|
from {
|
|
353
353
|
height: var(--radix-accordion-content-height);
|
|
354
354
|
}
|
|
355
355
|
to {
|
|
356
356
|
height: 0;
|
|
357
357
|
}
|
|
358
|
-
`,
|
|
358
|
+
`,_o=s.styled(Ue.Content)`
|
|
359
359
|
overflow: hidden;
|
|
360
360
|
|
|
361
361
|
@media (prefers-reduced-motion: no-preference) {
|
|
362
362
|
&[data-state='open'] {
|
|
363
|
-
animation: ${
|
|
363
|
+
animation: ${Fo} ${e=>e.theme.motion.timings[320]}
|
|
364
364
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
&[data-state='closed'] {
|
|
368
|
-
animation: ${
|
|
368
|
+
animation: ${Ho} ${e=>e.theme.motion.timings[320]}
|
|
369
369
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`,Vo=Object.freeze(Object.defineProperty({__proto__:null,Actions:Mo,Content:Wo,Header:Bo,Item:Lo,Root:Ao,Trigger:Po},Symbol.toStringTag,{value:"Module"})),st=s.css`
|
|
373
373
|
position: relative;
|
|
374
374
|
outline: none;
|
|
375
375
|
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
border: 2px solid ${e=>e.theme.colors.primary600};
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
`,me=({tag:e,...t})=>{const n=e||"span";return r.jsx(
|
|
403
|
+
`,me=({tag:e,...t})=>{const n=e||"span";return r.jsx(qo,{...t,as:n})},qo=s.styled.span`
|
|
404
404
|
border: 0;
|
|
405
405
|
clip: rect(0 0 0 0);
|
|
406
406
|
height: 1px;
|
|
@@ -409,9 +409,9 @@
|
|
|
409
409
|
padding: 0;
|
|
410
410
|
position: absolute;
|
|
411
411
|
width: 1px;
|
|
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"}},
|
|
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"}},Uo=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,Go=s.styled(v)`
|
|
413
413
|
${st};
|
|
414
|
-
`,
|
|
414
|
+
`,Ko=s.styled(y)`
|
|
415
415
|
svg {
|
|
416
416
|
height: 100%;
|
|
417
417
|
width: 100%;
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
fill: ${xt};
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
`,
|
|
423
|
+
`,Yo=({variant:e,...t})=>e==="success"?r.jsx(O.CheckCircle,{...t}):e==="danger"||e==="warning"?r.jsx(O.WarningCircle,{...t}):r.jsx(O.Information,{...t}),Qo=s.styled(v)`
|
|
424
424
|
& a > span {
|
|
425
425
|
color: ${xt};
|
|
426
426
|
}
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
svg path {
|
|
429
429
|
fill: ${xt};
|
|
430
430
|
}
|
|
431
|
-
`,
|
|
431
|
+
`,Xo=({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:Uo(n),shadow:"filterShadow",gap:3,hasRadius:!0,padding:5,paddingRight:6,...d,children:[r.jsx(Ko,{height:"2rem",shrink:0,$variant:n,width:"2rem",children:r.jsx(Yo,{"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(Qo,{$variant:n,children:c})]}),r.jsx(Go,{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 ce({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"},Zo={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,
|
|
524
|
+
`},qe=32,rr=2,Jo=l.forwardRef(({onLoadingStatusChange:e,delayMs:t=600,src:n,alt:o,crossOrigin:a,fallback:i,preview:c=!1,...d},u)=>{const[h,f]=ce({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(ea,{width:"100%",height:"100%",position:"absolute",background:"neutral0",zIndex:"overlay",style:{opacity:g?.4:0}}):null,r.jsx(ta,{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(ra,{side:"top",sideOffset:4,children:r.jsx(na,{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;
|
|
@@ -544,14 +544,14 @@
|
|
|
544
544
|
/* TODO: we should get the user email & hash it to turn it into a hex-value so different emails can consistently get a different background */
|
|
545
545
|
background-color: ${e=>e.theme.colors.primary600};
|
|
546
546
|
color: ${e=>e.theme.colors.neutral0};
|
|
547
|
-
`,
|
|
547
|
+
`,ea=s.styled(v)`
|
|
548
548
|
@media (prefers-reduced-motion: no-preference) {
|
|
549
549
|
transition: opacity ${e=>e.theme.motion.timings[200]}
|
|
550
550
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
551
551
|
}
|
|
552
|
-
`,
|
|
552
|
+
`,ta=s.styled(Tt.Image)`
|
|
553
553
|
${Ir}
|
|
554
|
-
`,
|
|
554
|
+
`,ra=s.styled(xe.Content)`
|
|
555
555
|
${Tr}
|
|
556
556
|
width: ${qe*rr/10}rem;
|
|
557
557
|
height: ${qe*rr/10}rem;
|
|
@@ -560,13 +560,13 @@
|
|
|
560
560
|
animation: ${q.fadeIn} ${e=>e.theme.motion.timings[200]}
|
|
561
561
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
562
562
|
}
|
|
563
|
-
`,
|
|
563
|
+
`,na=s.styled.img`
|
|
564
564
|
${Ir}
|
|
565
|
-
`,
|
|
565
|
+
`,oa=l.forwardRef((e,t)=>r.jsx(aa,{...e,ref:t,tag:"div"})),aa=s.styled(y)`
|
|
566
566
|
& > ${wt} + ${wt} {
|
|
567
567
|
margin-left: -${qe/10/2}rem;
|
|
568
568
|
}
|
|
569
|
-
`,
|
|
569
|
+
`,sa=Object.freeze(Object.defineProperty({__proto__:null,Group:oa,Item:Jo},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(ia,{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})})},ia=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;
|
|
@@ -575,13 +575,13 @@
|
|
|
575
575
|
padding-block: 0.7rem;
|
|
576
576
|
padding-inline ${t.spaces[2]}
|
|
577
577
|
`};
|
|
578
|
-
`,
|
|
578
|
+
`,la=s.styled(v)`
|
|
579
579
|
text-decoration: none;
|
|
580
580
|
|
|
581
581
|
&:visited {
|
|
582
582
|
color: inherit;
|
|
583
583
|
}
|
|
584
|
-
`,Pe=ae(({href:e,disabled:t=!1,isExternal:n=!1,...o},a)=>r.jsx(
|
|
584
|
+
`,Pe=ae(({href:e,disabled:t=!1,isExternal:n=!1,...o},a)=>r.jsx(la,{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 ca=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(
|
|
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(ca,{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 da=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]};
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
background-color: ${({theme:e})=>e.colors.neutral200};
|
|
603
603
|
color: ${({theme:e})=>e.colors.neutral700};
|
|
604
604
|
}
|
|
605
|
-
`,zr=l.forwardRef(({children:e,...t},n)=>r.jsx(
|
|
605
|
+
`,zr=l.forwardRef(({children:e,...t},n)=>r.jsx(da,{ref:n,...t,children:e}));zr.displayName="CrumbLink";const ze=e=>e.replaceAll(":","");function ua(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function zt(...e){return t=>e.forEach(n=>ua(n,t))}function ee(...e){return l.useCallback(zt(...e),e)}function te(e){const t=oe.useId();return(e==null?void 0:e.toString())??t}const Ge=(e,t,{selectorToWatch:n,skipWhen:o=!1})=>{const a=D.useCallbackRef(t);l.useEffect(()=>{if(o||!e.current)return;const i={root:e.current,rootMargin:"0px"},c=h=>{h.forEach(f=>{f.isIntersecting&&e.current&&e.current.scrollHeight>e.current.clientHeight&&a(f)})},d=new IntersectionObserver(c,i),u=e.current.querySelector(n);return u&&d.observe(u),()=>{d.disconnect()}},[o,a,n,e])},Lt="success-light",Ot="danger-light",it="default",Ke="tertiary",Ye="secondary",Lr="danger",Or="success",lt="ghost",Pt=[Lt,Ot],ha=[it,Ke,Ye,Lr,Or,lt,...Pt],fa=["XS","S","M","L"],le=e=>e===Lt||e===Ot?`${e.substring(0,e.lastIndexOf("-"))}`:e===Ke?"neutral":e===it||e===Ye||ha.every(t=>t!==e)?"primary":`${e}`,Pr=({theme:e})=>s.css`
|
|
606
606
|
border: 1px solid ${e.colors.neutral200};
|
|
607
607
|
background: ${e.colors.neutral150};
|
|
608
608
|
color: ${e.colors.neutral600};
|
|
@@ -617,21 +617,21 @@
|
|
|
617
617
|
border: 1px solid ${e.colors.buttonPrimary500};
|
|
618
618
|
background: ${e.colors.buttonPrimary500};
|
|
619
619
|
`:s.css`
|
|
620
|
-
border: 1px solid ${e.colors[`${
|
|
621
|
-
background: ${e.colors[`${
|
|
620
|
+
border: 1px solid ${e.colors[`${le(t)}500`]};
|
|
621
|
+
background: ${e.colors[`${le(t)}500`]};
|
|
622
622
|
`,Br=({theme:e,$variant:t})=>[...Pt,Ye].includes(t)?s.css`
|
|
623
623
|
background-color: ${e.colors.neutral0};
|
|
624
|
-
border: 1px solid ${e.colors[`${
|
|
625
|
-
color: ${e.colors[`${
|
|
624
|
+
border: 1px solid ${e.colors[`${le(t)}600`]};
|
|
625
|
+
color: ${e.colors[`${le(t)}600`]};
|
|
626
626
|
`:t===Ke||t===lt?s.css`
|
|
627
627
|
background-color: ${e.colors.neutral150};
|
|
628
628
|
`:s.css`
|
|
629
|
-
border: 1px solid ${e.colors[`${
|
|
630
|
-
background: ${e.colors[`${
|
|
629
|
+
border: 1px solid ${e.colors[`${le(t)}600`]};
|
|
630
|
+
background: ${e.colors[`${le(t)}600`]};
|
|
631
631
|
`,Nr=({theme:e,$variant:t})=>{switch(t){case Ot:case Lt:case Ye:return s.css`
|
|
632
|
-
border: 1px solid ${e.colors[`${
|
|
633
|
-
background: ${e.colors[`${
|
|
634
|
-
color: ${e.colors[`${
|
|
632
|
+
border: 1px solid ${e.colors[`${le(t)}200`]};
|
|
633
|
+
background: ${e.colors[`${le(t)}100`]};
|
|
634
|
+
color: ${e.colors[`${le(t)}700`]};
|
|
635
635
|
`;case Ke:return s.css`
|
|
636
636
|
border: 1px solid ${e.colors.neutral200};
|
|
637
637
|
background: ${e.colors.neutral0};
|
|
@@ -645,24 +645,24 @@
|
|
|
645
645
|
fill: ${e.colors.neutral500};
|
|
646
646
|
}
|
|
647
647
|
`;case Or:case Lr:return s.css`
|
|
648
|
-
border: 1px solid ${e.colors[`${
|
|
649
|
-
background: ${e.colors[`${
|
|
648
|
+
border: 1px solid ${e.colors[`${le(t)}600`]};
|
|
649
|
+
background: ${e.colors[`${le(t)}600`]};
|
|
650
650
|
color: ${e.colors.neutral0};
|
|
651
651
|
`;default:return s.css`
|
|
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=
|
|
655
|
+
`}},rt=ae(({variant:e=it,startIcon:t,endIcon:n,disabled:o=!1,children:a,onClick:i,size:c=fa[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(ma,{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(pa,{}):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})]})}),ga=s.keyframes`
|
|
656
656
|
from {
|
|
657
657
|
transform: rotate(0deg);
|
|
658
658
|
}
|
|
659
659
|
to {
|
|
660
660
|
transform: rotate(359deg);
|
|
661
661
|
}
|
|
662
|
-
`,
|
|
663
|
-
animation: ${
|
|
662
|
+
`,pa=s.styled(O.Loader)`
|
|
663
|
+
animation: ${ga} 2s infinite linear;
|
|
664
664
|
will-change: transform;
|
|
665
|
-
`,
|
|
665
|
+
`,ma=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(
|
|
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(ba,{ref:h,sideOffset:8,...u,children:r.jsx(I,{variant:"pi",fontWeight:"bold",children:n||t})})})]})),ba=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
|
-
|
|
765
|
+
`,xa=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(
|
|
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($a,{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})]})),$a=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
|
-
`,
|
|
811
|
+
`,ya=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"}},wa=de.Root,Ca=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(de.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})})}),ja=l.forwardRef(({children:e,intersectionId:t,onCloseAutoFocus:n,popoverPlacement:o="bottom-start",...a},i)=>{const[c,d]=o.split("-");return r.jsx(de.Portal,{children:r.jsx(va,{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;
|
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
&::-webkit-scrollbar {
|
|
818
818
|
display: none;
|
|
819
819
|
}
|
|
820
|
-
`,
|
|
820
|
+
`,va=s.styled(de.Content)`
|
|
821
821
|
@media (prefers-reduced-motion: no-preference) {
|
|
822
822
|
animation-duration: ${e=>e.theme.motion.timings[200]};
|
|
823
823
|
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
`,
|
|
836
|
+
`,ka=({onSelect:e,disabled:t=!1,isLink:n,startIcon:o,endIcon:a,isExternal:i,variant:c="default",...d})=>r.jsx(de.Item,{asChild:!0,onSelect:e,disabled:t,children:n||i?r.jsx(Sa,{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};
|
|
@@ -844,7 +844,7 @@
|
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
&[data-highlighted] {
|
|
847
|
-
background-color: ${e.colors[
|
|
847
|
+
background-color: ${e.colors[ya(t)]};
|
|
848
848
|
}
|
|
849
849
|
|
|
850
850
|
&:focus-visible {
|
|
@@ -856,9 +856,9 @@
|
|
|
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
|
+
`,Sa=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 */
|
|
863
863
|
color: ${({theme:e,color:t})=>_e(e.colors,t,void 0)};
|
|
864
864
|
text-decoration: none;
|
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
${({theme:e,$variant:t})=>Hr({theme:e,$variant:t})}
|
|
891
|
-
`,
|
|
891
|
+
`,Ra=s.styled(v)`
|
|
892
892
|
/* Negative horizontal margin to compensate Menu.Content's padding */
|
|
893
893
|
margin: ${({theme:e})=>e.spaces[1]} -${({theme:e})=>e.spaces[1]};
|
|
894
894
|
width: calc(100% + ${({theme:e})=>e.spaces[2]});
|
|
@@ -896,13 +896,13 @@
|
|
|
896
896
|
&:first-child {
|
|
897
897
|
display: none;
|
|
898
898
|
}
|
|
899
|
-
`,
|
|
899
|
+
`,Ta=l.forwardRef((e,t)=>r.jsx(de.Separator,{...e,asChild:!0,children:r.jsx(Ra,{height:"1px",shrink:0,background:"neutral150",ref:t})})),Ia=l.forwardRef((e,t)=>r.jsx(de.Label,{asChild:!0,children:r.jsx(Da,{ref:t,variant:"sigma",textColor:"neutral600",...e})})),Da=s.styled(I)`
|
|
900
900
|
padding: ${({theme:e})=>e.spaces[2]} ${({theme:e})=>e.spaces[4]};
|
|
901
|
-
`,
|
|
901
|
+
`,Ea=de.Sub,Aa=l.forwardRef(({disabled:e=!1,...t},n)=>r.jsx(de.SubTrigger,{asChild:!0,disabled:e,children:r.jsxs(za,{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"})]})})),za=s.styled(_r)`
|
|
902
902
|
&[data-state='open'] {
|
|
903
903
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
904
904
|
}
|
|
905
|
-
`,
|
|
905
|
+
`,La=l.forwardRef((e,t)=>r.jsx(de.Portal,{children:r.jsx(de.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=wa,qr=Ca,Ur=ja,Gr=ka,Oa=Ta,Pa=Ia,Ma=Ea,Ba=Aa,Na=La,Wa=Object.freeze(Object.defineProperty({__proto__:null,Content:Ur,Item:Gr,Label:Pa,Root:Vr,Separator:Oa,SubContent:Na,SubRoot:Ma,SubTrigger:Ba,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=ee(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=te(),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})]})}),Fa=Gr,Ha=s.styled(Kr)`
|
|
906
906
|
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[2]}`};
|
|
907
907
|
height: unset;
|
|
908
908
|
|
|
@@ -910,12 +910,12 @@
|
|
|
910
910
|
:focus {
|
|
911
911
|
background-color: ${({theme:e})=>e.colors.neutral200};
|
|
912
912
|
}
|
|
913
|
-
`,Yr=l.forwardRef(({children:e,...t},n)=>r.jsx(
|
|
913
|
+
`,Yr=l.forwardRef(({children:e,...t},n)=>r.jsx(Ha,{ref:n,endIcon:null,size:"S",...t,children:e}));Yr.displayName="CrumbSimpleMenu";const Qr=l.createContext({id:""}),Xr=()=>l.useContext(Qr),_a=l.forwardRef(({id:e,...t},n)=>{const o=te(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(Va,{ref:n,$position:e,...t,direction:"row",gap:2})),Va=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]}};
|
|
917
917
|
left: ${({$position:e,theme:t})=>{if(e==="start")return t.spaces[3]}};
|
|
918
|
-
`,
|
|
918
|
+
`,qa=({size:e="M",children:t,...n})=>r.jsx(Ga,{$size:e,children:t||r.jsx(Ua,{...n,"aria-hidden":!0})}),Ua=s.styled.img`
|
|
919
919
|
// inline flows is based on typography and displays an extra white space below the image
|
|
920
920
|
// switch to block is required in order to make the img stick the bottom of the container
|
|
921
921
|
// addition infos: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image
|
|
@@ -924,7 +924,7 @@
|
|
|
924
924
|
max-height: 100%;
|
|
925
925
|
max-width: 100%;
|
|
926
926
|
object-fit: contain;
|
|
927
|
-
`,
|
|
927
|
+
`,Ga=s.styled.div`
|
|
928
928
|
display: flex;
|
|
929
929
|
justify-content: center;
|
|
930
930
|
height: ${({$size:e})=>e==="S"?"8.8rem":"16.4rem"};
|
|
@@ -933,12 +933,12 @@
|
|
|
933
933
|
20px;
|
|
934
934
|
border-top-left-radius: ${({theme:e})=>e.borderRadius};
|
|
935
935
|
border-top-right-radius: ${({theme:e})=>e.borderRadius};
|
|
936
|
-
`,
|
|
936
|
+
`,Ka=s.styled.div`
|
|
937
937
|
margin-left: auto;
|
|
938
938
|
flex-shrink: 0;
|
|
939
|
-
`,
|
|
939
|
+
`,Ya=s.styled(At)`
|
|
940
940
|
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
941
|
-
`,
|
|
941
|
+
`,Qa=e=>r.jsx(Ka,{children:r.jsx(Ya,{...e})}),Xa=e=>r.jsx(v,{paddingLeft:3,paddingRight:3,paddingTop:2,paddingBottom:2,children:r.jsx(y,{...e,alignItems:"flex-start"})}),Za=({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]=ce({defaultProp:e,prop:t,onChange:n}),u=ee(i,a);return r.jsx(Ja,{ref:u,checked:c,onCheckedChange:d,...o,children:r.jsxs(es,{forceMount:!0,children:[c===!0?r.jsx(Za,{width:"1.6rem",fill:"neutral0"}):null,c==="indeterminate"?r.jsx(O.Minus,{fill:"neutral0"}):null]})})}),Ja=s.styled(yr.Root)`
|
|
942
942
|
background: ${e=>e.theme.colors.neutral0};
|
|
943
943
|
width: 2rem;
|
|
944
944
|
height: 2rem;
|
|
@@ -975,7 +975,7 @@
|
|
|
975
975
|
min-width: 44px;
|
|
976
976
|
min-height: 44px;
|
|
977
977
|
}
|
|
978
|
-
`,
|
|
978
|
+
`,es=s.styled(yr.Indicator)`
|
|
979
979
|
display: inline-flex;
|
|
980
980
|
pointer-events: auto !important;
|
|
981
981
|
width: 100%;
|
|
@@ -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=
|
|
990
|
+
`,dt=l.forwardRef(({children:e,...t},n)=>{const o=te(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})}),ts=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})})}),rs=s.styled(v)`
|
|
991
991
|
word-break: break-all;
|
|
992
|
-
`,
|
|
992
|
+
`,ns=({children:e,...t})=>r.jsx(rs,{...t,children:e}),os=s.styled(y)`
|
|
993
993
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
994
|
-
`,
|
|
994
|
+
`,as=e=>r.jsx(os,{position:"relative",justifyContent:"center",...e}),ss=({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})}),is=e=>{const{id:t}=Xr();return r.jsx(I,{variant:"pi",id:`${t}-title`,textColor:"neutral800",fontWeight:"bold",tag:"div",...e})},ls=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"},cs=s.styled(v)`
|
|
995
995
|
grid-template-columns: auto 1fr auto;
|
|
996
996
|
grid-template-areas: 'startAction slides endAction';
|
|
997
|
-
`,
|
|
997
|
+
`,ds=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(cs,{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(ds,{"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})})})})]})})}),us={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:us,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:Zo,motion:{easings:$t,timings:yt}},hs={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"}},fs={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:hs.color,shadows:fs.shadow,...en},gs={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"}},ps={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)"}},ms={colorScheme:"dark",colors:gs.color,shadows:ps.shadow,...en},ar=e=>`
|
|
1007
1007
|
${e}
|
|
1008
1008
|
|
|
1009
1009
|
The following is an example:
|
|
@@ -1015,7 +1015,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1015
1015
|
${Object.keys(Mt).map(t=>`${t}: /* put the overrides for the ${t} key */,`).join(`
|
|
1016
1016
|
`)}
|
|
1017
1017
|
})
|
|
1018
|
-
`,
|
|
1018
|
+
`,bs=(e,t)=>{if(!et(e)){const i=ar("The first argument should be an object and corresponds to the theme you want to extend.");throw new Error(i)}if(!et(t)){const i=ar("The second argument should be an object and corresponds to the keys of the theme you want to override.");throw new Error(i)}function n(i,c){if(Array.isArray(i))return c;if(et(i)&&et(c))return Je.merge(i,c)}const o=Je.cloneDeep(e??{}),a=Je.cloneDeep(t??{});return Je.assignWith(o,a,n),o},xs=e=>({theme:t,size:n})=>t.sizes[e][n],be=(e="&")=>({theme:t,$hasError:n=!1})=>s.css`
|
|
1019
1019
|
outline: none;
|
|
1020
1020
|
box-shadow: none;
|
|
1021
1021
|
transition-property: border-color, box-shadow, fill;
|
|
@@ -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
|
-
`,[
|
|
1028
|
+
`,[$s,re]=Oe("Field",{}),Re=l.forwardRef(({children:e,name:t,error:n=!1,hint:o,id:a,required:i=!1,...c},d)=>{const u=te(a),[h,f]=l.useState();return r.jsx($s,{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}=re("Label"),d=ee(o,c);return e?r.jsxs(y,{alignItems:"center",children:[r.jsxs(ys,{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(ws,{marginLeft:1,children:t})]}):null}),ys=s.styled(I)`
|
|
1029
1029
|
display: block;
|
|
1030
|
-
`,
|
|
1030
|
+
`,ws=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}=re("Input");let x;g?x=`${f}-error`:p&&(x=`${f}-hint`);const k=!!g,S=l.useRef(null),$=l.useRef(null),w=ee($,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(vs,{gap:2,justifyContent:"space-between",$hasError:k||a,$disabled:n,$size:d,$hasLeftAction:!!t,$hasRightAction:!!e,className:c,children:[t,r.jsx(Cs,{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(js,{ref:S,children:e})]})}),Cs=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
|
-
`,
|
|
1083
|
+
`,js=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
|
-
`,
|
|
1088
|
+
`,vs=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,14 +1097,14 @@ 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}=
|
|
1100
|
+
`,tn=()=>{const{id:e,hint:t,error:n}=re("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}=re("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})},ks=l.forwardRef(({label:e,children:t,...n},o)=>r.jsx(Ss,{justifyContent:"unset",background:"transparent",borderStyle:"none",...n,type:"button",tag:"button",ref:o,children:r.jsx(Se,{label:e,children:t})})),Ss=s.styled(y)`
|
|
1101
1101
|
font-size: 1.6rem;
|
|
1102
1102
|
padding: 0;
|
|
1103
|
-
`,
|
|
1103
|
+
`,Rs=Object.freeze(Object.defineProperty({__proto__:null,Action:ks,Error:rn,Hint:tn,Input:ut,Label:Bt,Root:Re,useField:re},Symbol.toStringTag,{value:"Module"})),Ts=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=te(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,{})]})})}),Is=({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
|
-
`,
|
|
1105
|
+
`,Ds=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})},Es=s.styled(y)`
|
|
1106
1106
|
display: ${({$selected:e})=>e?"flex":"none"};
|
|
1107
|
-
`,
|
|
1107
|
+
`,As=({label:e,children:t,selected:n=!1,...o})=>r.jsx(Es,{$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;
|
|
1109
1109
|
line-height: 2.4rem;
|
|
1110
1110
|
|
|
@@ -1128,12 +1128,12 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1128
1128
|
${o.breakpoints.medium} {
|
|
1129
1129
|
padding-block: ${o.spaces[2]};
|
|
1130
1130
|
}
|
|
1131
|
-
`}},Qe=l.forwardRef(({children:e,viewportRef:t,...n},o)=>r.jsxs(
|
|
1131
|
+
`}},Qe=l.forwardRef(({children:e,viewportRef:t,...n},o)=>r.jsxs(zs,{ref:o,...n,children:[r.jsx(Ls,{ref:t,children:e}),r.jsx(ir,{orientation:"vertical",children:r.jsx(lr,{})}),r.jsx(ir,{orientation:"horizontal",children:r.jsx(lr,{})})]})),zs=s.styled(ot.Root)`
|
|
1132
1132
|
width: 100%;
|
|
1133
1133
|
height: 100%;
|
|
1134
1134
|
overflow: hidden;
|
|
1135
1135
|
display: flex;
|
|
1136
|
-
`,
|
|
1136
|
+
`,Ls=s.styled(ot.Viewport)`
|
|
1137
1137
|
min-width: 100%;
|
|
1138
1138
|
`,ir=s.styled(ot.Scrollbar)`
|
|
1139
1139
|
display: flex;
|
|
@@ -1172,22 +1172,22 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1172
1172
|
min-height: 44px;
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
|
-
`,
|
|
1175
|
+
`,Os="data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e",nt=l.forwardRef(({children:e,small:t=!1,...n},o)=>r.jsxs("div",{role:"alert","aria-live":"assertive",ref:o,...n,children:[r.jsx(me,{children:e}),r.jsx(Ms,{src:Os,"aria-hidden":!0,$small:t})]})),Ps=s.keyframes`
|
|
1176
1176
|
from {
|
|
1177
1177
|
transform: rotate(0deg);
|
|
1178
1178
|
}
|
|
1179
1179
|
to {
|
|
1180
1180
|
transform: rotate(359deg);
|
|
1181
1181
|
}
|
|
1182
|
-
`,
|
|
1183
|
-
animation: ${
|
|
1182
|
+
`,Ms=s.styled.img`
|
|
1183
|
+
animation: ${Ps} 1s infinite linear;
|
|
1184
1184
|
will-change: transform;
|
|
1185
1185
|
${({$small:e,theme:t})=>e&&`width: ${t.spaces[6]}; height: ${t.spaces[6]};`}
|
|
1186
|
-
`,
|
|
1186
|
+
`,Bs=ae((e,t)=>{const{gap:n=0,gridCols:o=12,...a}=e;return r.jsx(Ns,{ref:t,$gap:n,$gridCols:o,...a})}),Ns=s.styled(v)`
|
|
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
|
-
`,
|
|
1190
|
+
`,Ws=ae(({col:e,s:t,xs:n,m:o,...a},i)=>r.jsx(Fs,{ref:i,$col:e,$s:t,$xs:n,$m:o,...a})),Fs=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
|
-
`,
|
|
1205
|
+
`,Hs=Object.freeze(Object.defineProperty({__proto__:null,Item:Ws,Root:Bs},Symbol.toStringTag,{value:"Module"})),_s=({children:e,estimatedItemSize:t=40,overscan:n=10,itemCount:o,renderItem:a})=>{const i=oe.useRef(null),[c,d]=oe.useState(!1),u=oe.useRef(!0);oe.useEffect(()=>(u.current=!0,typeof oe.startTransition=="function"&&oe.startTransition(()=>{u.current&&d(!0)}),()=>{u.current=!1}),[]);const h=oe.useMemo(()=>a&&o!==void 0?[]:oe.Children.toArray(e),[e,a,o]),f=o??h.length,g=ro.useVirtualizer({count:f,getScrollElement:()=>i.current??null,estimateSize:oe.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=Z=>`Create "${Z}"`,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:X,value:G,...ne},Y)=>{const[Z,_]=ce({prop:p,defaultProp:g,onChange:C}),[Q,ue]=ce({prop:X,defaultProp:e&&!f?G:f,onChange:N}),[$e,ye]=ce({prop:S,defaultProp:h,onChange:U}),fe=l.useRef(null),Ie=l.useRef(null),we=ee(fe,Y),Be=l.useRef(null),Ne=se=>{E&&!m&&(ue(""),ye(""),E(se),fe.current.focus())},Ce=se=>{_(se)},V=se=>{ue(se)},De=se=>{ye(se)},We=se=>{B&&B(se)},Vn=se=>{z&&z(se)},qn=se=>{H&&$&&!j&&H(se)},Kt=()=>{A&&Q&&i!=="visible"?A(Q):A&&i==="visible"&&(A(),_(!1))},Un=te(),Yt=`intersection-${ze(Un)}`;Ge(Ie,qn,{selectorToWatch:`#${Yt}`,skipWhen:!Z});const{error:ht,...Ze}=re("Combobox"),Gn=!!ht||x,ft=Ze.id??k,Kn=Ze.name??b,Yn=Ze.required||K,Qt=l.Children.toArray(n).filter(Boolean).length,Qn=!!!(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:Z,onTextValueChange:V,textValue:Q,allowCustomValue:!!i||e,disabled:m,required:Yn,value:G,onValueChange:Vn,filterValue:$e,onFilterValueChange:De,isPrintableCharacter:w,visible:i==="visible",children:[r.jsxs(Vs,{$hasError:Gn,$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(qs,{placeholder:P,id:ft,"aria-invalid":!!ht,onChange:We,ref:we,name:Kn,"aria-describedby":gt,...ne})]}),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(Us,{children:r.jsx(O.CaretDown,{fill:"neutral500"})})]})]}),r.jsx(D.Combobox.Portal,{children:r.jsxs(Gs,{sideOffset:4,children:[r.jsx(Qe,{viewportRef:Ie,children:r.jsx(D.Combobox.Viewport,{children:r.jsxs(v,{padding:1,children:[Qn?r.jsx(_s,{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(Ks,{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]})})]})}),Vs=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};
|
|
@@ -1228,7 +1228,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
1230
|
${({theme:e,$hasError:t})=>be()({theme:e,$hasError:t})};
|
|
1231
|
-
`,
|
|
1231
|
+
`,qs=s.styled(D.Combobox.TextInput)`
|
|
1232
1232
|
width: 100%;
|
|
1233
1233
|
${nn}
|
|
1234
1234
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
@@ -1249,7 +1249,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1249
1249
|
&[aria-disabled='true'] {
|
|
1250
1250
|
cursor: inherit;
|
|
1251
1251
|
}
|
|
1252
|
-
`,
|
|
1252
|
+
`,Us=s.styled(D.Combobox.Icon)`
|
|
1253
1253
|
border: none;
|
|
1254
1254
|
background: transparent;
|
|
1255
1255
|
padding: 0;
|
|
@@ -1259,7 +1259,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1259
1259
|
&[aria-disabled='true'] {
|
|
1260
1260
|
cursor: inherit;
|
|
1261
1261
|
}
|
|
1262
|
-
`,
|
|
1262
|
+
`,Gs=s.styled(D.Combobox.Content)`
|
|
1263
1263
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
1264
1264
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
1265
1265
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
@@ -1290,7 +1290,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
`,
|
|
1293
|
+
`,Ks=s.styled(D.Combobox.CreateItem)`
|
|
1294
1294
|
&& {
|
|
1295
1295
|
border-top: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
1296
1296
|
border-top-left-radius: 0;
|
|
@@ -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;
|
|
@@ -1350,7 +1350,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1350
1350
|
color: ${({theme:e})=>e.colors.primary600};
|
|
1351
1351
|
font-weight: bold;
|
|
1352
1352
|
}
|
|
1353
|
-
`,Wt=(e,t)=>`${e}${Math.floor(t*255).toString(16).padStart(2,"0")}`,
|
|
1353
|
+
`,Wt=(e,t)=>`${e}${Math.floor(t*255).toString(16).padStart(2,"0")}`,Ys=pe.Root,Qs=l.forwardRef((e,t)=>r.jsx(pe.Trigger,{...e,asChild:!0,ref:t})),Xs=l.forwardRef((e,t)=>r.jsx(pe.Portal,{children:r.jsx(Zs,{children:r.jsx(Js,{ref:t,...e})})})),Zs=s.styled(pe.Overlay)`
|
|
1354
1354
|
background: ${e=>Wt(e.theme.colors.neutral800,.2)};
|
|
1355
1355
|
position: fixed;
|
|
1356
1356
|
inset: 0;
|
|
@@ -1361,7 +1361,7 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1361
1361
|
animation: ${q.overlayFadeIn} ${e=>e.theme.motion.timings[200]}
|
|
1362
1362
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
1363
1363
|
}
|
|
1364
|
-
`,
|
|
1364
|
+
`,Js=s.styled(pe.Content)`
|
|
1365
1365
|
max-width: 42rem;
|
|
1366
1366
|
height: min-content;
|
|
1367
1367
|
width: calc(100% - ${({theme:e})=>e.spaces[8]});
|
|
@@ -1393,14 +1393,14 @@ const myCustomTheme = extendTheme(lightTheme, {
|
|
|
1393
1393
|
animation-name: ${q.modalPopOut};
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
`,
|
|
1396
|
+
`,ei=l.forwardRef(({children:e,...t},n)=>r.jsx(pe.Title,{asChild:!0,children:r.jsx(ti,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...t,children:e})})),ti=s.styled(I)`
|
|
1397
1397
|
display: flex;
|
|
1398
1398
|
justify-content: center;
|
|
1399
1399
|
border-bottom: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1400
|
-
`,
|
|
1400
|
+
`,ri=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"})})),ni=l.forwardRef((e,t)=>r.jsx(oi,{ref:t,gap:2,padding:4,justifyContent:"space-between",...e,tag:"footer"})),oi=s.styled(y)`
|
|
1401
1401
|
border-top: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1402
1402
|
flex: 1;
|
|
1403
|
-
`,
|
|
1403
|
+
`,ai=l.forwardRef((e,t)=>r.jsx(pe.Cancel,{...e,asChild:!0,ref:t})),si=l.forwardRef((e,t)=>r.jsx(pe.Action,{...e,asChild:!0,ref:t})),ii=Object.freeze(Object.defineProperty({__proto__:null,Action:si,Body:ri,Cancel:ai,Content:Xs,Description:sn,Footer:ni,Header:ei,Root:Ys,Trigger:Qs},Symbol.toStringTag,{value:"Module"}));function he(e,t){const n=l.useRef(null);return t&&n.current&&li(t,n.current)&&(t=n.current),n.current=t??null,l.useMemo(()=>new F.DateFormatter(e,t),[e,t])}function li(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 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)},ci=()=>(l.useEffect(()=>()=>{cr(""),ur(""),dr("")},[]),{notifyLog:cr,notifyAlert:ur,notifyStatus:dr}),ln=()=>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"})]}),di=s.createGlobalStyle`
|
|
1404
1404
|
${s.css`
|
|
1405
1405
|
*,
|
|
1406
1406
|
*::before,
|
|
@@ -1499,7 +1499,7 @@ ${s.css`
|
|
|
1499
1499
|
overflow-y: hidden;
|
|
1500
1500
|
}
|
|
1501
1501
|
`}
|
|
1502
|
-
`,hr="en-EN",
|
|
1502
|
+
`,hr="en-EN",cn=()=>typeof navigator>"u"?hr:navigator.language?navigator.language:hr,[ui,Xe]=Oe("StrapiDesignSystem",{locale:cn()}),hi=({children:e,locale:t=cn(),theme:n=Mt,tooltipConfig:o})=>(ie.useColorScheme(n.colorScheme),ie.useIsomorphicLayoutEffect(()=>{const a=document.createElement("style");a.type="text/css",a.appendChild(document.createTextNode(`
|
|
1503
1503
|
* {
|
|
1504
1504
|
-webkit-transition: none !important;
|
|
1505
1505
|
-moz-transition: none !important;
|
|
@@ -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(
|
|
1511
|
+
`)),document.head.appendChild(a),window.getComputedStyle(a).opacity,document.head.removeChild(a)},[n]),r.jsx(ui,{locale:t,children:r.jsxs(s.ThemeProvider,{theme:n,children:[r.jsx($r.Provider,{...o,children:e}),r.jsx(ln,{}),r.jsx(di,{})]})})),dn=bo.Root,Ft=l.forwardRef(({container:e=(o=>(o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body)(),...t},n)=>e?lo.createPortal(r.jsx(v,{ref:n,...t}),e):null);Ft.displayName="Portal";const fi=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}=re("SelectTrigger"),x=ee(p,g);return r.jsx(D.Select.Trigger,{asChild:!0,children:r.jsxs(gi,{"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(pi,{children:r.jsx(O.CaretDown,{})})]})]})})}),gi=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]};
|
|
@@ -1534,25 +1534,25 @@ ${s.css`
|
|
|
1534
1534
|
}
|
|
1535
1535
|
|
|
1536
1536
|
${({theme:e,$hasError:t})=>be()({theme:e,$hasError:t})};
|
|
1537
|
-
`,
|
|
1537
|
+
`,pi=s.styled(D.Select.Icon)`
|
|
1538
1538
|
display: flex;
|
|
1539
1539
|
& > svg {
|
|
1540
1540
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
1541
1541
|
}
|
|
1542
|
-
`,
|
|
1542
|
+
`,mi=l.forwardRef(({children:e,placeholder:t,withTags:n,...o},a)=>r.jsx(bi,{ref:a,ellipsis:!0,...o,children:r.jsx(xi,{placeholder:t,$withTags:n,children:e})})),bi=s.styled(I)`
|
|
1543
1543
|
flex: 1;
|
|
1544
1544
|
min-height: 2.4rem;
|
|
1545
1545
|
|
|
1546
1546
|
${({theme:e})=>e.breakpoints.medium} {
|
|
1547
1547
|
min-height: 2.2rem;
|
|
1548
1548
|
}
|
|
1549
|
-
|
|
1549
|
+
`,xi=s.styled(D.Select.Value)`
|
|
1550
1550
|
${({$withTags:e})=>e?s.css`
|
|
1551
1551
|
display: flex;
|
|
1552
1552
|
flex-wrap: wrap;
|
|
1553
1553
|
gap: ${({theme:t})=>t.spaces[1]};
|
|
1554
1554
|
`:null};
|
|
1555
|
-
|
|
1555
|
+
`,$i=l.forwardRef((e,t)=>r.jsx(yi,{ref:t,...e,children:r.jsx(Qe,{children:e.children})})),yi=s.styled(D.Select.Content)`
|
|
1556
1556
|
background: ${({theme:e})=>e.colors.neutral0};
|
|
1557
1557
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
1558
1558
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
@@ -1577,9 +1577,9 @@ ${s.css`
|
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
`,
|
|
1580
|
+
`,wi=s.styled(D.Select.Viewport)`
|
|
1581
1581
|
padding: ${({theme:e})=>e.spaces[1]};
|
|
1582
|
-
`,
|
|
1582
|
+
`,Ci=l.forwardRef((e,t)=>r.jsx(vi,{ref:t,...e})),ji=s.css`
|
|
1583
1583
|
width: 100%;
|
|
1584
1584
|
border: none;
|
|
1585
1585
|
text-align: left;
|
|
@@ -1600,14 +1600,14 @@ ${s.css`
|
|
|
1600
1600
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
1601
1601
|
cursor: pointer;
|
|
1602
1602
|
}
|
|
1603
|
-
`,
|
|
1604
|
-
${
|
|
1603
|
+
`,vi=s.styled(D.Select.Item)`
|
|
1604
|
+
${ji}
|
|
1605
1605
|
|
|
1606
1606
|
&:hover {
|
|
1607
1607
|
background-color: ${({theme:e})=>e.colors.primary100};
|
|
1608
1608
|
cursor: pointer;
|
|
1609
1609
|
}
|
|
1610
|
-
`,
|
|
1610
|
+
`,un=D.Select.Root,hn=fi,fn=mi,gn=D.Select.Portal,pn=$i,mn=wi,Ht=Ci,bn=D.Select.ItemIndicator,xn=D.Select.ItemText,ki=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=te(),B=`intersection-${ze(U)}`;Ge(A,Y=>{g&&g(Y)},{selectorToWatch:`#${B}`,skipWhen:!T});const{error:H,required:P,...K}=re("SingleSelect"),L=!!H||a,M=K.id??i,X=K.name??d;let G;H?G=`${M}-error`:K.hint&&(G=`${M}-hint`);const ne=(typeof k<"u"&&k!==null?k.toString():w)??"";return r.jsxs(un,{onOpenChange:R,disabled:o,required:P??C,onValueChange:E,value:ne,...S,children:[r.jsx(hn,{ref:$,id:M,name:X,startIcon:x,hasError:L,disabled:o,clearLabel:t,loading:c,onClear:ne&&h?z:void 0,"aria-label":S["aria-label"],"aria-describedby":G??S["aria-describedby"],size:m,children:r.jsx(fn,{placeholder:p,textColor:ne?"neutral800":"neutral600",children:ne&&n?n(ne):void 0})}),r.jsx(gn,{children:r.jsx(pn,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:r.jsxs(mn,{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(xn,{children:n})})]})),Si=200,fr=15,[Ri,Me]=Oe("DatePicker"),Ti=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=he(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,X]=ce({defaultProp:n?je(n):void 0,prop:u?je(u):void 0,onChange(V){d&&d(V==null?void 0:V.toDate(j))}}),[G,ne]=l.useMemo(()=>{const V=n?je(n):F.today("UTC"),De=i?je(i):V.set({day:1,month:1,year:V.year-Si});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,Z]=l.useState(Ii({currentValue:M,minDate:G,maxDate:ne})),_=te(),Q=l.useRef(null),ue=V=>{x&&!C&&(L(""),X(void 0),x(V),B==null||B.focus())},$e=l.useCallback(V=>{V&&M&&Z(M),E(V)},[M]);ie.useIsomorphicLayoutEffect(()=>{if(u){const V=je(u);L(R.format(V.toDate(j))),Z(V)}else L("")},[u,R,j]),ie.useIsomorphicLayoutEffect(()=>{if(n&&K===void 0){const V=je(n);L(R.format(V.toDate(j)))}},[n,K,R,j]);const{error:ye,...fe}=re("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(Ri,{calendarDate:Y,content:H,contentId:_,disabled:C,locale:b,minDate:G,maxDate:ne,open:z,onCalendarDateChange:Z,onContentChange:P,onOpenChange:$e,onTextInputChange:N,onTextValueChange:L,onTriggerChange:U,onValueChange:X,onClear:x,required:Ne,textInput:B,textValue:K,timeZone:j,trigger:A,value:M,children:[r.jsxs(Ei,{className:t,hasError:Ie,size:S,children:[r.jsx(O.Calendar,{fill:"neutral500","aria-hidden":!0}),r.jsx(Li,{ref:w,"aria-describedby":Ce,id:we,name:Be,...$}),K&&x?r.jsx(ge,{size:"XS",variant:"ghost",onClick:ue,"aria-disabled":C,"aria-label":k,label:k,ref:Q,children:r.jsx(O.Cross,{})}):null]}),r.jsx(Ft,{children:r.jsx(Bi,{label:e,children:r.jsx(qi,{monthSelectLabel:c,yearSelectLabel:h})})})]})}),gr=e=>!!e.match(/^[^a-zA-Z]*$/),Ii=({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)},Di="DatePickerTrigger",Ei=l.forwardRef(({hasError:e,size:t,...n},o)=>{const a=Me(Di),i=ee(o,d=>a.onTriggerChange(d)),c=()=>{a.disabled||a.onOpenChange(!0)};return r.jsx(so.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(Ai,{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())})})})}),Ai=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
|
-
`,
|
|
1632
|
+
`,zi="DatePickerTextInput",Li=l.forwardRef(({placeholder:e,...t},n)=>{const o=Me(zi),{onTextValueChange:a,textValue:i,onTextInputChange:c,onOpenChange:d,disabled:u,locale:h}=o,f=ee(n,S=>c(S)),g=()=>{u||d(!0)},p=he(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(Pi,{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(Oi(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 Oi(e,t,n){return t&&(e=F.maxDate(e,t)),n&&(e=F.minDate(e,n)),e}const Pi=s.styled.input`
|
|
1633
1633
|
width: 100%;
|
|
1634
1634
|
${nn}
|
|
1635
1635
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
@@ -1648,7 +1648,7 @@ ${s.css`
|
|
|
1648
1648
|
&[aria-disabled='true'] {
|
|
1649
1649
|
cursor: inherit;
|
|
1650
1650
|
}
|
|
1651
|
-
`,
|
|
1651
|
+
`,Mi="DatePickerContent",Bi=l.forwardRef((e,t)=>{const n=Me(Mi),[o,a]=l.useState(!1);return l.useEffect(()=>{n.open&&!o&&a(!0)},[n.open,o]),!n.open&&!o||!n.open?null:r.jsx(Wi,{...e,ref:t})}),Ni="DatePickerContent",Wi=l.forwardRef((e,t)=>{const{label:n="Choose date",...o}=e,{onOpenChange:a,...i}=Me(Ni),{x:c,y:d,refs:u,strategy:h,placement:f}=Fe.useFloating({strategy:"fixed",placement:"bottom-start",middleware:[Fe.offset({mainAxis:4}),Fe.shift(),Fe.flip()],elements:{reference:i.trigger},whileElementsMounted:Fe.autoUpdate});l.useEffect(()=>{const p=()=>{a(!1)};return window.addEventListener("blur",p),window.addEventListener("resize",p),()=>{window.removeEventListener("blur",p),window.removeEventListener("resize",p)}},[a]);const g=ee(t,p=>i.onContentChange(p),u.setFloating);return ao.useFocusGuards(),r.jsx(io.RemoveScroll,{allowPinchZoom:!0,children:r.jsx(dn,{asChild:!0,onFocusOutside:p=>{p.preventDefault()},onDismiss:()=>{a(!1)},children:r.jsx(Fi,{ref:g,"data-state":i.open?"open":"closed","data-side":f.includes("top")?"top":"bottom",onContextMenu:p=>p.preventDefault(),id:i.contentId,role:"dialog","aria-modal":"true","aria-label":n,style:{left:c,top:d,position:h},hasRadius:!0,background:"neutral0",padding:1,...o})})})}),Fi=s.styled(v)`
|
|
1652
1652
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
1653
1653
|
z-index: ${({theme:e})=>e.zIndices.popover};
|
|
1654
1654
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
@@ -1668,7 +1668,7 @@ ${s.css`
|
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
1671
|
-
`,
|
|
1671
|
+
`,Hi="DatePickerCalendar",[_i,Vi]=Oe("DateFormatters"),qi=l.forwardRef(({monthSelectLabel:e,yearSelectLabel:t,...n},o)=>{const{locale:a,timeZone:i,minDate:c,maxDate:d,calendarDate:u,onCalendarDateChange:h}=Me(Hi),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=he(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=he(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=he(a,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),S=he(a,{day:"numeric",calendar:u.calendar.identifier}),$=he(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=Ui(f,a);return r.jsx(_i,{dateFormatter:k,cellDateFormatter:S,textValueFormatter:$,children:r.jsxs(y,{ref:o,direction:"column",alignItems:"stretch",padding:4,...n,children:[r.jsxs(Gi,{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(Ki,{"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(Xi,{"aria-colindex":z+1,date:R,startDate:f,disabled:c.compare(R)>0||R.compare(d)>0},R.toString()):r.jsx($n,{"aria-colindex":z+1},z+1))},b))})]})]})})}),Ui=(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},Gi=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
|
-
`,
|
|
1685
|
+
`,Ki=l.forwardRef(({children:e,...t},n)=>r.jsx(Yi,{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)})})),Yi=s.styled(v)`
|
|
1686
1686
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1687
1687
|
text-transform: capitalize;
|
|
1688
|
-
`,
|
|
1688
|
+
`,Qi="DatePickerCalendarCell",Xi=l.forwardRef(({date:e,startDate:t,disabled:n,...o},a)=>{const{timeZone:i,calendarDate:c,onValueChange:d,onOpenChange:u,onTextValueChange:h,onCalendarDateChange:f}=Me(Qi),{dateFormatter:g,cellDateFormatter:p,textValueFormatter:C}=Vi("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($n,{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})})}),$n=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
|
|
@@ -1701,18 +1701,18 @@ ${s.css`
|
|
|
1701
1701
|
color: ${({theme:e})=>e.colors.primary600};
|
|
1702
1702
|
}
|
|
1703
1703
|
}
|
|
1704
|
-
`,je=e=>{const t=e.toISOString(),n=F.parseAbsolute(t,"UTC");return F.toCalendarDate(n)},
|
|
1704
|
+
`,je=e=>{const t=e.toISOString(),n=F.parseAbsolute(t,"UTC");return F.toCalendarDate(n)},yn=l.memo(Ti),pt=e=>!!e.match(/^[^a-zA-Z]*$/);function Zi(e=""){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Ji=s.styled(on)`
|
|
1705
1705
|
min-width: ${({onClear:e})=>e?"160px":"130px"};
|
|
1706
|
-
`,
|
|
1706
|
+
`,wn=l.forwardRef(({step:e=15,value:t,defaultValue:n,onChange:o,...a},i)=>{const c=Xe("TimePicker"),[d,u]=l.useState(""),[h,f]=ce({prop:t,defaultProp:n,onChange:o}),g=he(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}${Zi(p)}\\d{2}`;return r.jsx(Ji,{...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))})}),el=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]=ce({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=he(j.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),b=$?T.format($.toDate(F.getLocalTimeZone())):"",R=l.useRef(h);ie.useIsomorphicLayoutEffect(()=>{x&&$&&w(void 0)},[x,$,w]),ie.useIsomorphicLayoutEffect(()=>{const L=R.current;h==null&&L!=null&&$&&w(void 0),x&&h!==L&&k(!1),R.current=h},[h,$,x,w,k]),ie.useIsomorphicLayoutEffect(()=>{x&&$===void 0&&h==null&&k(!1)},[x,$,h,k]);const z=L=>{let M=L?Ee(L):void 0;if(b&&M){const[X,G]=b.split(":");M=M.set({hour:parseInt(X,10),minute:parseInt(G,10)})}w(M)},E=L=>{if(!L)return;const[M,X]=L.split(":"),G=$?$.set({hour:parseInt(M,10),minute:parseInt(X,10)}):Ee(new Date).set({hour:parseInt(M,10),minute:parseInt(X,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=ee(m,C),{error:N,id:H,labelNode:P}=re("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(yn,{...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(wn,{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(tl,{ref:t,background:"neutral150",...e,"data-orientation":"horizontal",role:"separator",tag:"div"})),tl=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 */
|
|
1710
1710
|
flex-shrink: 0;
|
|
1711
|
-
`,
|
|
1711
|
+
`,rl=s.styled(v)`
|
|
1712
1712
|
svg {
|
|
1713
1713
|
height: 8.8rem;
|
|
1714
1714
|
}
|
|
1715
|
-
`,
|
|
1715
|
+
`,nl=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(rl,{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]})),Cn=Rt.StateEffect.define(),jn=Rt.StateEffect.define(),ol=bt.Decoration.mark({attributes:{style:"background-color: yellow; color: black"}}),al=Rt.StateField.define({create(){return bt.Decoration.none},update(e,t){return e=e.map(t.changes),t.effects.forEach(n=>{n.is(Cn)?e=e.update({add:n.value,sort:!0}):n.is(jn)&&(e=e.update({filter:n.value}))}),e},provide:e=>bt.EditorView.decorations.from(e)}),sl=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}=re("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:Cn.of([ol.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:jn.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}=co.useCodeMirror({value:o,onCreateEditor:T,container:u.current,editable:!a,extensions:[Xt.json(),al],onChange:j,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),z=ee(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(il,{ref:z,$disabled:a,$hasError:C,alignItems:"stretch",hasRadius:!0,"aria-required":x,id:m,"aria-describedby":k,...c})}),il=s.styled(y)`
|
|
1716
1716
|
font-size: ${({theme:e})=>e.fontSizes[3]};
|
|
1717
1717
|
line-height: ${({theme:e})=>e.lineHeights[6]};
|
|
1718
1718
|
|
|
@@ -1750,19 +1750,19 @@ ${s.css`
|
|
|
1750
1750
|
*/
|
|
1751
1751
|
background-color: #4a4a6a;
|
|
1752
1752
|
}
|
|
1753
|
-
`,
|
|
1753
|
+
`,ll=ae(({disabled:e,...t},n)=>r.jsx(rt,{ref:n,tag:Pe,tabIndex:e?-1:void 0,disabled:e,...t})),cl=s.styled(v)`
|
|
1754
1754
|
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
1755
1755
|
&:focus-visible {
|
|
1756
1756
|
outline: none;
|
|
1757
1757
|
}
|
|
1758
|
-
`,
|
|
1758
|
+
`,dl=({labelledBy:e="main-content-title",...t})=>r.jsx(cl,{"aria-labelledby":e,tag:"main",id:"main-content",tabIndex:-1,...t}),ul=s.styled(v)`
|
|
1759
1759
|
text-decoration: none;
|
|
1760
1760
|
|
|
1761
1761
|
&:focus {
|
|
1762
1762
|
left: ${({theme:e})=>e.spaces[3]};
|
|
1763
1763
|
top: ${({theme:e})=>e.spaces[3]};
|
|
1764
1764
|
}
|
|
1765
|
-
`,
|
|
1765
|
+
`,hl=({children:e})=>r.jsx(ul,{tag:"a",href:"#main-content",background:"primary600",color:"neutral0",left:"-100%",padding:3,position:"absolute",top:"-100%",hasRadius:!0,zIndex:9999,children:e}),fl=Te.Root,gl=l.forwardRef((e,t)=>r.jsx(Te.Trigger,{...e,asChild:!0,ref:t})),pl=l.forwardRef((e,t)=>r.jsx(Te.Portal,{children:r.jsx(ml,{children:r.jsx(bl,{ref:t,...e})})})),ml=s.styled(Te.Overlay)`
|
|
1766
1766
|
background: ${e=>Wt(e.theme.colors.neutral800,.2)};
|
|
1767
1767
|
position: fixed;
|
|
1768
1768
|
inset: 0;
|
|
@@ -1773,7 +1773,7 @@ ${s.css`
|
|
|
1773
1773
|
animation: ${q.overlayFadeIn} ${e=>e.theme.motion.timings[200]}
|
|
1774
1774
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
1775
1775
|
}
|
|
1776
|
-
`,
|
|
1776
|
+
`,bl=s.styled(Te.Content)`
|
|
1777
1777
|
max-width: 83rem;
|
|
1778
1778
|
max-height: 90vh;
|
|
1779
1779
|
height: auto;
|
|
@@ -1814,9 +1814,9 @@ ${s.css`
|
|
|
1814
1814
|
animation-name: ${q.modalPopOut};
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
`,
|
|
1817
|
+
`,vn=l.forwardRef((e,t)=>r.jsx(Te.Close,{...e,asChild:!0,ref:t})),xl=l.forwardRef(({children:e,closeLabel:t="Close modal",...n},o)=>r.jsxs($l,{ref:o,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[e,r.jsx(vn,{children:r.jsx(ge,{withTooltip:!1,label:t,children:r.jsx(O.Cross,{})})})]})),$l=s.styled(y)`
|
|
1818
1818
|
border-bottom: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1819
|
-
`,
|
|
1819
|
+
`,yl=l.forwardRef((e,t)=>r.jsx(Te.Title,{asChild:!0,children:r.jsx(I,{tag:"h2",variant:"omega",fontWeight:"bold",ref:t,...e})})),wl=l.forwardRef(({children:e,...t},n)=>r.jsx(Cl,{ref:n,...t,children:e})),Cl=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
|
-
`,
|
|
1834
|
+
`,jl=l.forwardRef((e,t)=>r.jsx(vl,{ref:t,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...e,tag:"footer"})),vl=s.styled(y)`
|
|
1835
1835
|
border-top: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1836
1836
|
flex: 1;
|
|
1837
|
-
`,
|
|
1837
|
+
`,kl=Object.freeze(Object.defineProperty({__proto__:null,Body:wl,Close:vn,Content:pl,Footer:jl,Header:xl,Root:fl,Title:yl,Trigger:gl},Symbol.toStringTag,{value:"Module"})),Sl="",Rl=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]=Tl({prop(b){const R=String(o);return isNaN(Number(R))||R!==b&&b!==""?b:g.current.format(Number(o))},defaultProp:Sl,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
|
|
1849
|
+
`;function Tl({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 kn=l.createContext({activePage:1,pageCount:1}),Vt=()=>l.useContext(kn),Il=({children:e,label:t="Pagination",activePage:n,pageCount:o})=>{const a=l.useMemo(()=>({activePage:n,pageCount:o}),[n,o]);return r.jsx(kn.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))})})})},Dl=ae(({children:e,...t},n)=>{const{activePage:o}=Vt(),a=o===1;return r.jsxs(Rn,{ref:n,"aria-disabled":a,tabIndex:a?-1:void 0,...t,children:[r.jsx(me,{children:e}),r.jsx(O.ChevronLeft,{"aria-hidden":!0})]})}),El=ae(({children:e,...t},n)=>{const{activePage:o,pageCount:a}=Vt(),i=o===a;return r.jsxs(Rn,{ref:n,"aria-disabled":i,tabIndex:i?-1:void 0,...t,children:[r.jsx(me,{children:e}),r.jsx(O.ChevronRight,{"aria-hidden":!0})]})}),Sn=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};
|
|
@@ -1854,7 +1854,7 @@ ${s.css`
|
|
|
1854
1854
|
display: flex;
|
|
1855
1855
|
|
|
1856
1856
|
${st}
|
|
1857
|
-
`,
|
|
1857
|
+
`,Rn=s.styled(Sn)`
|
|
1858
1858
|
font-size: 1.1rem;
|
|
1859
1859
|
|
|
1860
1860
|
svg path {
|
|
@@ -1871,14 +1871,14 @@ ${s.css`
|
|
|
1871
1871
|
${e=>e["aria-disabled"]?`
|
|
1872
1872
|
pointer-events: none;
|
|
1873
1873
|
`:void 0}
|
|
1874
|
-
`,
|
|
1874
|
+
`,Al=ae(({number:e,children:t,...n},o)=>{const{activePage:a}=Vt(),i=a===e;return r.jsxs(zl,{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})]})}),zl=s.styled(Sn)`
|
|
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
|
-
`,
|
|
1881
|
+
`,Ll=({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:"…"})]}),Ol=Le.Root,Pl=Le.Anchor,Ml=Le.Arrow,Bl=l.forwardRef((e,t)=>r.jsx(Le.Trigger,{...e,asChild:!0,ref:t})),Nl=l.forwardRef((e,t)=>r.jsx(Le.Portal,{children:r.jsx(Wl,{sideOffset:4,side:"bottom",align:"start",...e,ref:t})})),Wl=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};
|
|
@@ -1912,9 +1912,9 @@ ${s.css`
|
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
|
-
`,
|
|
1915
|
+
`,Fl=l.forwardRef(({children:e,intersectionId:t,onReachEnd:n,...o},a)=>{const i=l.useRef(null),c=ee(i,a),d=te();return Ge(i,n??(()=>{}),{selectorToWatch:`#${ze(d)}`,skipWhen:!t||!n}),r.jsxs(Hl,{ref:c,...o,children:[e,t&&n&&r.jsx(v,{id:ze(d),width:"100%",height:"1px"})]})}),Hl=s.styled(Qe)`
|
|
1916
1916
|
height: 20rem;
|
|
1917
|
-
`,
|
|
1917
|
+
`,_l=Object.freeze(Object.defineProperty({__proto__:null,Anchor:Pl,Arrow:Ml,Content:Nl,Root:Ol,ScrollArea:Fl,Trigger:Bl},Symbol.toStringTag,{value:"Module"})),Vl=l.forwardRef(({size:e="M",value:t,...n},o)=>r.jsx(ql,{ref:o,$size:e,...n,children:r.jsx(Ul,{style:{transform:`translate3D(-${100-(t??0)}%, 0, 0)`}})})),ql=s.styled(wr.Root)`
|
|
1918
1918
|
position: relative;
|
|
1919
1919
|
overflow: hidden;
|
|
1920
1920
|
width: ${e=>e.$size==="S"?"7.8rem":"10.2rem"};
|
|
@@ -1925,7 +1925,7 @@ ${s.css`
|
|
|
1925
1925
|
/* Fix overflow clipping in Safari */
|
|
1926
1926
|
/* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
1927
1927
|
transform: translateZ(0);
|
|
1928
|
-
`,
|
|
1928
|
+
`,Ul=s.styled(wr.Indicator)`
|
|
1929
1929
|
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
1930
1930
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
1931
1931
|
width: 100%;
|
|
@@ -1935,11 +1935,11 @@ ${s.css`
|
|
|
1935
1935
|
transition: transform ${e=>e.theme.motion.timings[320]}
|
|
1936
1936
|
${e=>e.theme.motion.easings.authenticMotion};
|
|
1937
1937
|
}
|
|
1938
|
-
`,
|
|
1938
|
+
`,Gl=l.forwardRef((e,t)=>r.jsx(Kl,{ref:t,...e})),Kl=s.styled(It.Root)`
|
|
1939
1939
|
display: flex;
|
|
1940
1940
|
flex-direction: column;
|
|
1941
1941
|
gap: ${e=>e.theme.spaces[3]};
|
|
1942
|
-
`,
|
|
1942
|
+
`,Yl=l.forwardRef(({children:e,id:t,...n},o)=>{const a=te(t);return r.jsxs(y,{gap:2,children:[r.jsx(Ql,{id:a,ref:o,...n,children:r.jsx(Xl,{})}),r.jsx(I,{tag:"label",htmlFor:a,children:e})]})}),Ql=s.styled(It.Item)`
|
|
1943
1943
|
background: ${e=>e.theme.colors.neutral0};
|
|
1944
1944
|
width: 2rem;
|
|
1945
1945
|
height: 2rem;
|
|
@@ -1976,7 +1976,7 @@ ${s.css`
|
|
|
1976
1976
|
min-width: 44px;
|
|
1977
1977
|
min-height: 44px;
|
|
1978
1978
|
}
|
|
1979
|
-
`,
|
|
1979
|
+
`,Xl=s.styled(It.Indicator)`
|
|
1980
1980
|
display: flex;
|
|
1981
1981
|
align-items: center;
|
|
1982
1982
|
justify-content: center;
|
|
@@ -1998,26 +1998,26 @@ ${s.css`
|
|
|
1998
1998
|
border-radius: 50%;
|
|
1999
1999
|
background: ${e=>e.theme.colors.primary600};
|
|
2000
2000
|
}
|
|
2001
|
-
`,
|
|
2001
|
+
`,Zl=Object.freeze(Object.defineProperty({__proto__:null,Group:Gl,Item:Yl},Symbol.toStringTag,{value:"Module"})),Jl=e=>{const t=e.querySelector('[tabindex="0"]');t&&t.focus()},Tn=l.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),ec=()=>l.useContext(Tn),In=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=ee(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&&Jl(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(Tn.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=ee(o,a),{rowIndex:c,colIndex:d,setTableValues:u}=ec(),[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;ie.useIsomorphicLayoutEffect(()=>{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 ie.useIsomorphicLayoutEffect(()=>{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})}),Dn=e=>r.jsx(qt,{...e,tag:"th"}),En=({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})},An=({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})},zn=({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})},tc=s.styled(O.Cross)`
|
|
2002
2002
|
font-size: 0.5rem;
|
|
2003
2003
|
path {
|
|
2004
2004
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
2005
2005
|
}
|
|
2006
|
-
`,
|
|
2006
|
+
`,Ln=s.styled(O.Search)`
|
|
2007
2007
|
font-size: 1rem;
|
|
2008
2008
|
path {
|
|
2009
2009
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
2010
2010
|
}
|
|
2011
|
-
`,
|
|
2011
|
+
`,rc=s.styled.div`
|
|
2012
2012
|
border-radius: ${({theme:e})=>e.borderRadius};
|
|
2013
2013
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
2014
2014
|
|
|
2015
2015
|
&:focus-within {
|
|
2016
|
-
${
|
|
2016
|
+
${Ln} {
|
|
2017
2017
|
fill: ${({theme:e})=>e.colors.primary600};
|
|
2018
2018
|
}
|
|
2019
2019
|
}
|
|
2020
|
-
`,
|
|
2020
|
+
`,nc=s.styled(ut)`
|
|
2021
2021
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
2022
2022
|
padding: 0 0 0 8px;
|
|
2023
2023
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
@@ -2048,7 +2048,7 @@ ${s.css`
|
|
|
2048
2048
|
> input::-webkit-search-results-decoration {
|
|
2049
2049
|
display: none;
|
|
2050
2050
|
}
|
|
2051
|
-
`,
|
|
2051
|
+
`,On=l.forwardRef(({name:e,children:t,value:n="",onClear:o,clearLabel:a="Clear",...i},c)=>{const d=l.useRef(null),u=n.length>0,h=g=>{o(g),d.current.focus()},f=zt(c,d);return r.jsx(rc,{children:r.jsxs(Re,{name:e,children:[r.jsx(me,{children:r.jsx(Bt,{children:t})}),r.jsx(nc,{size:"S",type:"search",ref:f,value:n,startAction:r.jsx(Ln,{"aria-hidden":!0}),onKeyDown:g=>{g.stopPropagation(),g.key==="Escape"&&u&&h(g)},endAction:u?r.jsx(ge,{onClick:h,onMouseDown:g=>{g.preventDefault()},label:a,size:"XS",variant:"ghost",type:"button",children:r.jsx(tc,{})}):void 0,...i})]})})}),Pn=e=>r.jsx("form",{...e,role:"search"}),oc=s.styled(v)`
|
|
2052
2052
|
display: inline-flex;
|
|
2053
2053
|
border: none;
|
|
2054
2054
|
|
|
@@ -2064,14 +2064,14 @@ ${s.css`
|
|
|
2064
2064
|
&:hover {
|
|
2065
2065
|
cursor: ${({$iconAction:e})=>e?"pointer":"initial"};
|
|
2066
2066
|
}
|
|
2067
|
-
`,
|
|
2067
|
+
`,Mn=({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(ac,{$disabled:o,variant:"pi",fontWeight:"bold",children:e}),r.jsx(oc,{tag:"button",disabled:o,"aria-disabled":o,"aria-label":n,padding:2,onClick:c,$iconAction:!!a,children:t})]})},ac=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
|
-
`,
|
|
2071
|
+
`,Bn=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(ue=>ue!==_):(T??[]).filter(ue=>ue!==_);u?u(Q):b(Q)},U=_=>{z(_)},B=te(),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(Mn,{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}=re("MultiSelect"),X=!!L||a,G=M.id??i,ne=M.name??d,Y=M.required??C;let Z;return L?Z=`${G}-error`:M.hint&&(Z=`${G}-hint`),r.jsxs(un,{onOpenChange:U,disabled:o,required:Y,onValueChange:E,value:P,...$,multi:!0,children:[r.jsx(hn,{ref:w,id:G,name:ne,"aria-label":$["aria-label"],"aria-describedby":Z??$["aria-describedby"],startIcon:x,hasError:X,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(fn,{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(gn,{children:r.jsx(pn,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:r.jsxs(mn,{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(bn,{children:({isSelected:i,isIntermediate:c})=>r.jsx(dt,{checked:c?"indeterminate":i})}),r.jsx(I,{children:r.jsx(xn,{children:t})})]})),Nn=l.forwardRef(({children:e,label:t,startIcon:n,values:o=[],...a},i)=>r.jsxs(ki,{ref:i,children:[r.jsxs(Ht,{value:o,...a,children:[n&&r.jsx(v,{tag:"span","aria-hidden":!0,children:n}),r.jsx(bn,{children:({isSelected:c,isIntermediate:d})=>r.jsx(dt,{checked:d?"indeterminate":c})}),r.jsx(I,{children:t})]}),e]})),sc=({options:e,...t})=>r.jsx(Bn,{...t,children:e.map(n=>"children"in n?r.jsx(Nn,{label:n.label,values:n.children.map(o=>o.value.toString()),children:n.children.map(o=>r.jsx(ic,{value:o.value,children:o.label},o.value))},n.label):r.jsx(Ut,{value:n.value,children:n.label},n.value))}),ic=s.styled(Ut)`
|
|
2072
2072
|
padding-left: ${({theme:e})=>e.spaces[7]};
|
|
2073
|
-
`,
|
|
2074
|
-
width: ${
|
|
2073
|
+
`,lc=e=>e==="XS"?{paddingX:"0.6rem",paddingY:"0.2rem"}:e==="S"?{paddingX:2,paddingY:1}:{paddingX:5,paddingY:4},cc=({variant:e="primary",size:t="M",children:n,...o})=>{const a=`${e}100`,i=`${e}200`,c=`${e}600`,{paddingX:d,paddingY:u}=lc(t);return r.jsx(v,{borderColor:i,color:c,background:a,hasRadius:!0,paddingTop:u,paddingBottom:u,paddingLeft:d,paddingRight:d,...o,children:n})},dc="23.2rem",uc=l.forwardRef(({...e},t)=>r.jsx(hc,{ref:t,...e,tag:"nav"})),hc=s.styled(v)`
|
|
2074
|
+
width: ${dc};
|
|
2075
2075
|
background: ${({theme:e})=>e.colors.neutral100};
|
|
2076
2076
|
position: sticky;
|
|
2077
2077
|
top: 0;
|
|
@@ -2082,12 +2082,12 @@ ${s.css`
|
|
|
2082
2082
|
`,mr=s.styled(_t)`
|
|
2083
2083
|
width: 2.4rem;
|
|
2084
2084
|
background-color: ${({theme:e})=>e.colors.neutral200};
|
|
2085
|
-
`,
|
|
2085
|
+
`,fc=({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=te(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(Pn,{children:r.jsx(On,{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,{})})]})},gc=ae(({active:e,children:t,icon:n=null,withBullet:o=!1,isSubSectionChild:a=!1,...i},c)=>r.jsxs(pc,{background:"neutral100",paddingLeft:a?9:7,paddingBottom:2,paddingTop:2,ref:c,...i,children:[r.jsxs(y,{children:[n?r.jsx(mc,{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};
|
|
2089
2089
|
border-radius: 50%;
|
|
2090
|
-
`,
|
|
2090
|
+
`,pc=s.styled(Pe)`
|
|
2091
2091
|
display: flex;
|
|
2092
2092
|
align-items: center;
|
|
2093
2093
|
justify-content: space-between;
|
|
@@ -2113,23 +2113,23 @@ ${s.css`
|
|
|
2113
2113
|
&:focus-visible {
|
|
2114
2114
|
outline-offset: -2px;
|
|
2115
2115
|
}
|
|
2116
|
-
`,
|
|
2116
|
+
`,mc=s.styled.div`
|
|
2117
2117
|
svg {
|
|
2118
2118
|
height: 1.6rem;
|
|
2119
2119
|
width: 1.6rem;
|
|
2120
2120
|
}
|
|
2121
|
-
`,
|
|
2121
|
+
`,bc=s.styled.button`
|
|
2122
2122
|
border: none;
|
|
2123
2123
|
padding: 0;
|
|
2124
2124
|
background: transparent;
|
|
2125
2125
|
display: flex;
|
|
2126
2126
|
align-items: center;
|
|
2127
|
-
|
|
2127
|
+
`,xc=({label:e,children:t,id:n})=>{const[o,a]=l.useState(!0),i=te(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(bc,{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))})]})},$c=({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})})}),yc=s.styled(v)`
|
|
2128
2128
|
& > svg {
|
|
2129
2129
|
height: 0.4rem;
|
|
2130
2130
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
2131
2131
|
}
|
|
2132
|
-
`,
|
|
2132
|
+
`,wc=({collapsable:e=!1,label:t,badgeLabel:n,children:o,id:a})=>{const[i,c]=l.useState(!0),d=te(a),u=()=>{c(h=>!h)};return r.jsxs(y,{direction:"column",alignItems:"stretch",gap:1,children:[r.jsx(yc,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:r.jsxs(v,{position:"relative",paddingRight:n?6:0,children:[r.jsx($c,{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))})]})},Cc=({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))})}),jc=l.forwardRef(({visibleLabels:e,onLabel:t="On",offLabel:n="Off",onCheckedChange:o,checked:a,defaultChecked:i,disabled:c,...d},u)=>{const[h,f]=ce({prop:a,defaultProp:i}),g=p=>{f(p)};return r.jsxs(y,{gap:3,children:[r.jsx(vc,{ref:u,onCheckedChange:D.composeEventHandlers(o,g),checked:h,disabled:c,...d,children:r.jsx(kc,{})}),e?r.jsx(Sc,{"aria-hidden":!0,"data-disabled":c,"data-state":h?"checked":"unchecked",children:h?t:n}):null]})}),vc=s.styled(Cr.Root)`
|
|
2133
2133
|
width: 4rem;
|
|
2134
2134
|
height: 2.4rem;
|
|
2135
2135
|
border-radius: 1.2rem;
|
|
@@ -2146,7 +2146,7 @@ ${s.css`
|
|
|
2146
2146
|
@media (prefers-reduced-motion: no-preference) {
|
|
2147
2147
|
transition: ${e=>e.theme.transitions.backgroundColor};
|
|
2148
2148
|
}
|
|
2149
|
-
`,
|
|
2149
|
+
`,kc=s.styled(Cr.Thumb)`
|
|
2150
2150
|
display: block;
|
|
2151
2151
|
height: 1.6rem;
|
|
2152
2152
|
width: 1.6rem;
|
|
@@ -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
|
-
`,
|
|
2165
|
+
`,Sc=s.styled(I)`
|
|
2166
2166
|
color: ${e=>e.theme.colors.danger600};
|
|
2167
2167
|
|
|
2168
2168
|
&[data-state='checked'] {
|
|
@@ -2172,15 +2172,15 @@ ${s.css`
|
|
|
2172
2172
|
&[data-disabled='true'] {
|
|
2173
2173
|
color: ${({theme:e})=>e.colors.neutral500};
|
|
2174
2174
|
}
|
|
2175
|
-
`,[
|
|
2175
|
+
`,[Rc,Gt]=Oe("Tabs"),Tc=l.forwardRef(({disabled:e=!1,variant:t="regular",hasError:n,...o},a)=>r.jsx(Rc,{disabled:e,hasError:n,variant:t,children:r.jsx(Ic,{ref:a,...o})})),Ic=s.styled(at.Root)`
|
|
2176
2176
|
width: 100%;
|
|
2177
2177
|
position: relative;
|
|
2178
|
-
`,
|
|
2178
|
+
`,Dc=l.forwardRef((e,t)=>{const{variant:n}=Gt("List");return r.jsx(Ec,{ref:t,...e,$variant:n})}),Ec=s.styled(at.List)`
|
|
2179
2179
|
display: flex;
|
|
2180
2180
|
align-items: ${e=>e.$variant==="regular"?"flex-end":"unset"};
|
|
2181
2181
|
position: relative;
|
|
2182
2182
|
z-index: 0;
|
|
2183
|
-
`,
|
|
2183
|
+
`,Ac=l.forwardRef(({children:e,disabled:t,...n},o)=>{const{disabled:a,variant:i,hasError:c}=Gt("Trigger"),d=a===!0||a===n.value||t,u=c===n.value;return r.jsxs(zc,{ref:o,...n,$hasError:u,$variant:i,disabled:d,children:[r.jsx(Fn,{fontWeight:"bold",variant:i==="simple"?"sigma":void 0,children:e}),i==="simple"?r.jsx(Wn,{}):null]})}),Wn=s.styled.span`
|
|
2184
2184
|
display: block;
|
|
2185
2185
|
width: 100%;
|
|
2186
2186
|
background-color: currentColor;
|
|
@@ -2189,7 +2189,7 @@ ${s.css`
|
|
|
2189
2189
|
left: 0;
|
|
2190
2190
|
opacity: 0;
|
|
2191
2191
|
height: 0.2rem;
|
|
2192
|
-
`,
|
|
2192
|
+
`,Fn=s.styled(I)``,zc=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;
|
|
@@ -2199,14 +2199,14 @@ ${s.css`
|
|
|
2199
2199
|
padding-block: ${t=>t.theme.spaces[4]};
|
|
2200
2200
|
padding-inline: ${t=>t.theme.spaces[4]};
|
|
2201
2201
|
|
|
2202
|
-
& > ${
|
|
2202
|
+
& > ${Fn} {
|
|
2203
2203
|
line-height: 1.2rem;
|
|
2204
2204
|
}
|
|
2205
2205
|
|
|
2206
2206
|
&[data-state='active'] {
|
|
2207
2207
|
color: ${e.$hasError?e.theme.colors.danger600:e.theme.colors.primary700};
|
|
2208
2208
|
|
|
2209
|
-
& > ${
|
|
2209
|
+
& > ${Wn} {
|
|
2210
2210
|
opacity: 1;
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
@@ -2238,7 +2238,7 @@ ${s.css`
|
|
|
2238
2238
|
cursor: not-allowed;
|
|
2239
2239
|
color: ${e=>e.theme.colors.neutral400};
|
|
2240
2240
|
}
|
|
2241
|
-
`,
|
|
2241
|
+
`,Lc=l.forwardRef((e,t)=>{const{variant:n}=Gt("Content");return r.jsx(Oc,{$variant:n,ref:t,...e})}),Oc=s.styled(at.Content)`
|
|
2242
2242
|
${e=>e.$variant==="simple"?s.css`
|
|
2243
2243
|
|
|
2244
2244
|
`:s.css`
|
|
@@ -2246,13 +2246,13 @@ ${s.css`
|
|
|
2246
2246
|
z-index: 1;
|
|
2247
2247
|
background-color: ${t=>t.theme.colors.neutral0};
|
|
2248
2248
|
`}
|
|
2249
|
-
`,
|
|
2249
|
+
`,Pc=Object.freeze(Object.defineProperty({__proto__:null,Content:Lc,List:Dc,Root:Tc,Trigger:Ac},Symbol.toStringTag,{value:"Module"})),Mc=s.styled(v)`
|
|
2250
2250
|
overflow: hidden;
|
|
2251
2251
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
2252
|
-
`,
|
|
2252
|
+
`,Bc=s.styled(In)`
|
|
2253
2253
|
width: 100%;
|
|
2254
2254
|
white-space: nowrap;
|
|
2255
|
-
`,
|
|
2255
|
+
`,Nc=s.styled(v)`
|
|
2256
2256
|
&:before {
|
|
2257
2257
|
// TODO: make sure to add a token for this weird stuff
|
|
2258
2258
|
background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
@@ -2277,15 +2277,15 @@ ${s.css`
|
|
|
2277
2277
|
right: 0;
|
|
2278
2278
|
top: 0;
|
|
2279
2279
|
}
|
|
2280
|
-
`,
|
|
2280
|
+
`,Wc=s.styled(v)`
|
|
2281
2281
|
overflow-x: auto;
|
|
2282
|
-
`,
|
|
2282
|
+
`,Fc=l.forwardRef(({footer:e,...t},n)=>{const o=l.useRef(null),[a,i]=l.useState(),c=d=>{const u=d.target.scrollWidth-d.target.clientWidth;if(d.target.scrollLeft===0){i("right");return}if(d.target.scrollLeft===u){i("left");return}d.target.scrollLeft>0&&i("both")};return l.useEffect(()=>{o.current.scrollWidth>o.current.clientWidth&&i("right")},[]),r.jsxs(Mc,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[r.jsx(Nc,{$overflowing:a,position:"relative",children:r.jsx(Wc,{ref:o,onScroll:c,paddingLeft:6,paddingRight:6,children:r.jsx(Bc,{ref:n,...t})})}),e]})}),Hc=s.styled(An)`
|
|
2283
2283
|
& tr:last-of-type {
|
|
2284
2284
|
border-bottom: none;
|
|
2285
2285
|
}
|
|
2286
|
-
`,
|
|
2286
|
+
`,_c=({children:e,...t})=>r.jsx(Hc,{...t,children:e}),Vc=s.styled(En)`
|
|
2287
2287
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
2288
|
-
`,
|
|
2288
|
+
`,qc=({children:e,...t})=>r.jsx(Vc,{...t,children:e}),Uc=s.styled(zn)`
|
|
2289
2289
|
border-bottom: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
2290
2290
|
|
|
2291
2291
|
& td,
|
|
@@ -2304,7 +2304,7 @@ ${s.css`
|
|
|
2304
2304
|
padding-bottom: 0;
|
|
2305
2305
|
height: 5.6rem;
|
|
2306
2306
|
}
|
|
2307
|
-
`,
|
|
2307
|
+
`,Gc=e=>r.jsx(Uc,{...e}),Hn=s.styled(qt)`
|
|
2308
2308
|
vertical-align: middle;
|
|
2309
2309
|
text-align: left;
|
|
2310
2310
|
outline-offset: -4px;
|
|
@@ -2315,7 +2315,7 @@ ${s.css`
|
|
|
2315
2315
|
input {
|
|
2316
2316
|
vertical-align: sub;
|
|
2317
2317
|
}
|
|
2318
|
-
`,
|
|
2318
|
+
`,Kc=l.forwardRef(({children:e,action:t,...n},o)=>r.jsx(Hn,{color:"neutral600",as:Dn,ref:o,...n,children:r.jsxs(y,{children:[e,t]})})),Yc=l.forwardRef(({children:e,...t},n)=>r.jsx(Hn,{color:"neutral800",ref:n,...t,children:e})),Qc=s.styled(v)`
|
|
2319
2319
|
height: 2.4rem;
|
|
2320
2320
|
width: 2.4rem;
|
|
2321
2321
|
border-radius: 50%;
|
|
@@ -2331,23 +2331,23 @@ ${s.css`
|
|
|
2331
2331
|
svg path {
|
|
2332
2332
|
fill: ${({theme:e})=>e.colors.primary600};
|
|
2333
2333
|
}
|
|
2334
|
-
`,
|
|
2334
|
+
`,Xc=s.styled(v)`
|
|
2335
2335
|
border-radius: 0 0 ${({theme:e})=>e.borderRadius} ${({theme:e})=>e.borderRadius};
|
|
2336
2336
|
display: block;
|
|
2337
2337
|
width: 100%;
|
|
2338
2338
|
border: none;
|
|
2339
|
-
`,
|
|
2339
|
+
`,Zc=({children:e,icon:t,...n})=>r.jsxs("div",{children:[r.jsx(_t,{}),r.jsx(Xc,{tag:"button",background:"primary100",padding:5,...n,children:r.jsxs(y,{children:[r.jsx(Qc,{"aria-hidden":!0,background:"primary200",children:t}),r.jsx(v,{paddingLeft:3,children:r.jsx(I,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:e})})]})})]}),Jc=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(rd,{ref:d,disabled:u,"aria-disabled":u,tag:"button",type:i,gap:2,...c,children:[a?r.jsx(td,{"aria-hidden":!0,children:r.jsx(O.Loader,{})}):t,r.jsx(I,{variant:"pi",children:e}),n]})}),ed=s.keyframes`
|
|
2340
2340
|
from {
|
|
2341
2341
|
transform: rotate(0deg);
|
|
2342
2342
|
}
|
|
2343
2343
|
to {
|
|
2344
2344
|
transform: rotate(359deg);
|
|
2345
2345
|
}
|
|
2346
|
-
`,
|
|
2346
|
+
`,td=s.styled.span`
|
|
2347
2347
|
display: flex;
|
|
2348
|
-
animation: ${
|
|
2348
|
+
animation: ${ed} 2s infinite linear;
|
|
2349
2349
|
will-change: transform;
|
|
2350
|
-
`,
|
|
2350
|
+
`,rd=s.styled(y)`
|
|
2351
2351
|
border: none;
|
|
2352
2352
|
background-color: transparent;
|
|
2353
2353
|
color: ${e=>e.theme.colors.primary600};
|
|
@@ -2359,9 +2359,9 @@ ${s.css`
|
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
2361
|
${st}
|
|
2362
|
-
`,
|
|
2362
|
+
`,_n=l.forwardRef((e,t)=>r.jsx(ut,{ref:t,...e}));_n.displayName="TextInput";const nd=l.forwardRef(({disabled:e,hasError:t,id:n,name:o,required:a,resizable:i=!0,...c},d)=>{const{error:u,...h}=re("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(od,{borderColor:f?"danger600":"neutral200",$hasError:f,hasRadius:!0,children:r.jsx(ad,{"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})})}),od=s.styled(v)`
|
|
2363
2363
|
${be()}
|
|
2364
|
-
`,
|
|
2364
|
+
`,ad=s.styled(v)`
|
|
2365
2365
|
display: block;
|
|
2366
2366
|
border: none;
|
|
2367
2367
|
resize: ${({$resizable:e})=>e?"vertical":"none"};
|
|
@@ -2389,11 +2389,11 @@ ${s.css`
|
|
|
2389
2389
|
&:disabled {
|
|
2390
2390
|
cursor: not-allowed;
|
|
2391
2391
|
}
|
|
2392
|
-
`,
|
|
2392
|
+
`,sd=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]=ce({prop:d}),C=g!==null&&!g,{error:m,...x}=re("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(id,{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(ld,{...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})]})}),id=s.styled(y)`
|
|
2393
2393
|
${be()}
|
|
2394
|
-
`,br=s.styled(
|
|
2394
|
+
`,br=s.styled(y)`
|
|
2395
2395
|
padding-block: 0.6rem;
|
|
2396
|
-
`,
|
|
2396
|
+
`,ld=s.styled.input`
|
|
2397
2397
|
height: 100%;
|
|
2398
2398
|
left: 0;
|
|
2399
2399
|
opacity: 0;
|
|
@@ -2401,4 +2401,4 @@ ${s.css`
|
|
|
2401
2401
|
top: 0;
|
|
2402
2402
|
z-index: 0;
|
|
2403
2403
|
width: 100%;
|
|
2404
|
-
`,
|
|
2404
|
+
`,cd={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function dd(){const[e,t]=oe.useState(null),[n,o]=oe.useState(cd),a=oe.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 ie.useIsomorphicLayoutEffect(()=>{if(e)return a.observe(e),()=>{a.disconnect()}},[e,a]),[t,n]}const ud=({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})},hd=({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})};exports.isSSR=ie.isSSR;exports.useIsomorphicLayoutEffect=ie.useIsomorphicLayoutEffect;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=Vo;exports.Alert=Xo;exports.Avatar=sa;exports.Badge=At;exports.BaseLink=Pe;exports.Box=v;exports.Breadcrumbs=Er;exports.Button=rt;exports.Card=_a;exports.CardAction=Zr;exports.CardAsset=qa;exports.CardBadge=Qa;exports.CardBody=Xa;exports.CardCheckbox=ts;exports.CardContent=ns;exports.CardHeader=as;exports.CardSubtitle=ls;exports.CardTimer=ss;exports.CardTitle=is;exports.Carousel=Jr;exports.CarouselActions=Is;exports.CarouselImage=Ds;exports.CarouselInput=Ts;exports.CarouselSlide=As;exports.Checkbox=dt;exports.Combobox=on;exports.ComboboxOption=an;exports.Crumb=Ar;exports.CrumbLink=zr;exports.CrumbSimpleMenu=Yr;exports.DatePicker=yn;exports.DateTimePicker=el;exports.DesignSystemProvider=hi;exports.Dialog=ii;exports.DismissibleLayer=dn;exports.Divider=_t;exports.Dots=Ll;exports.EmptyStateLayout=nl;exports.Field=Rs;exports.Flex=y;exports.FocusTrap=ud;exports.Grid=Hs;exports.IconButton=ge;exports.IconButtonGroup=xa;exports.JSONInput=sl;exports.KeyboardKeys=W;exports.KeyboardNavigable=hd;exports.Link=Wr;exports.LinkButton=ll;exports.LiveRegions=ln;exports.Loader=nt;exports.Main=dl;exports.Menu=Wa;exports.MenuItem=Fa;exports.Modal=kl;exports.MultiSelect=Bn;exports.MultiSelectGroup=Nn;exports.MultiSelectNested=sc;exports.MultiSelectOption=Ut;exports.NextLink=El;exports.NumberInput=Rl;exports.PageLink=Al;exports.Pagination=Il;exports.Popover=_l;exports.Portal=Ft;exports.PreviousLink=Dl;exports.ProgressBar=Vl;exports.Radio=Zl;exports.RawTable=In;exports.RawTbody=An;exports.RawTd=qt;exports.RawTh=Dn;exports.RawThead=En;exports.RawTr=zn;exports.ScrollArea=Qe;exports.SearchForm=Pn;exports.Searchbar=On;exports.SimpleMenu=Kr;exports.SingleSelect=vt;exports.SingleSelectOption=kt;exports.SkipToContent=hl;exports.Status=cc;exports.SubNav=uc;exports.SubNavHeader=fc;exports.SubNavLink=gc;exports.SubNavLinkSection=xc;exports.SubNavSection=wc;exports.SubNavSections=Cc;exports.Switch=jc;exports.TFooter=Zc;exports.Table=Fc;exports.Tabs=Pc;exports.Tag=Mn;exports.Tbody=_c;exports.Td=Yc;exports.TextButton=Jc;exports.TextInput=_n;exports.Textarea=nd;exports.Th=Kc;exports.Thead=qc;exports.TimePicker=wn;exports.Toggle=sd;exports.Tooltip=ct;exports.Tr=Gc;exports.Typography=I;exports.VisuallyHidden=me;exports._internaluseUncontrolledState=Et;exports.composeRefs=zt;exports.convertUTCDateToCalendarDateTime=Ee;exports.darkTheme=ms;exports.extendTheme=bs;exports.extractStyleFromTheme=_e;exports.getThemeSize=xs;exports.handleResponsiveValues=ke;exports.inputFocusStyle=be;exports.lightTheme=Mt;exports.setOpacity=Wt;exports.useComposedRefs=ee;exports.useControllableState=ce;exports.useDateFormatter=he;exports.useDesignSystem=Xe;exports.useField=re;exports.useId=te;exports.useMeasure=dd;exports.useNotifyAT=ci;
|