panelize 0.0.0-stage → 0.1.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/CHANGELOG.md +30 -0
- package/LICENSE +21 -0
- package/README.md +617 -2
- package/dist/index.d.cts +1815 -0
- package/dist/index.d.ts +1815 -0
- package/dist/panelize.cjs +858 -0
- package/dist/panelize.cjs.map +1 -0
- package/dist/panelize.es.js +3011 -0
- package/dist/panelize.es.js.map +1 -0
- package/docs/accessibility.md +43 -0
- package/docs/components.md +61 -0
- package/docs/composition.md +138 -0
- package/docs/controls.md +47 -0
- package/docs/forms.md +64 -0
- package/docs/layout.md +59 -0
- package/docs/recipes.md +170 -0
- package/docs/shell.md +57 -0
- package/docs/text.md +26 -0
- package/docs/theme.md +121 -0
- package/examples/AGENTS.md +9 -0
- package/examples/cursor-rule.mdc +17 -0
- package/examples/panelize.theme.md +312 -0
- package/llms-full.txt +1206 -0
- package/llms.txt +51 -0
- package/package.json +105 -4
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("styled-components"),n=require("react/jsx-runtime"),r=require("react-dom");var i=[`muted`,`base`,`highlighted`],a=[`base`,`muted`,`highlighted`],o=[`dark`,`light`],s=[`primary`,`secondary`,`accent`],c=[`danger`,`warning`,`success`,`info`],l=[`base`,`hover`,`active`],u=[`none`,`extraSmall`,`small`,`base`,`large`,`extraLarge`],d=[`start`,`end`,`center`,`stretch`,`baseline`,`space-between`,`space-around`,`space-evenly`],f=[`vertical`,`horizontal`,`both`],p=[`sm`,`md`,`lg`],m=[`extraSmall`,`small`,`base`,`large`,`extraLarge`],h=[`thin`,`base`,`bold`,`heavy`],g=[`base`,`display`,`mono`],_=[1,2,3,4,5,6],v={none:`0rem`,extraSmall:`0.25rem`,small:`0.5rem`,base:`1rem`,large:`1.5rem`,extraLarge:`2rem`};function y(e){return u.includes(e)}function b(e,t,n){let r=e??t;return Object.hasOwn(n,r)?n[r]:r}function x(e,t,n,r){return e===void 0?t===void 0?n:y(t)?r[t]:t:y(e)?r[e]:e}function S(e,t,n){let r=b(e.padding,t.padding,n),i=b(e.margin,t.margin,n);return{paddingTop:x(e.paddingTop,e.paddingY,r,n),paddingRight:x(e.paddingRight,e.paddingX,r,n),paddingBottom:x(e.paddingBottom,e.paddingY,r,n),paddingLeft:x(e.paddingLeft,e.paddingX,r,n),marginTop:x(e.marginTop,e.marginY,i,n),marginRight:x(e.marginRight,e.marginX,i,n),marginBottom:x(e.marginBottom,e.marginY,i,n),marginLeft:x(e.marginLeft,e.marginX,i,n)}}function C(e){let{padding:t,margin:n,paddingX:r,paddingY:i,paddingTop:a,paddingRight:o,paddingBottom:s,paddingLeft:c,marginX:l,marginY:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,minWidth:h,maxWidth:g,minHeight:_,maxHeight:v,width:y,height:b,...x}=e;return{spacing:{padding:t,margin:n,paddingX:r,paddingY:i,paddingTop:a,paddingRight:o,paddingBottom:s,paddingLeft:c,marginX:l,marginY:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m},size:{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v,width:y,height:b},rest:x}}function w(e,t){return{minWidth:e.minWidth===void 0?void 0:b(e.minWidth,`none`,t),maxWidth:e.maxWidth===void 0?void 0:b(e.maxWidth,`none`,t),minHeight:e.minHeight===void 0?void 0:b(e.minHeight,`none`,t),maxHeight:e.maxHeight===void 0?void 0:b(e.maxHeight,`none`,t)}}function T(e,t,n){return{...w(e,t),width:e.width===void 0&&n?.width===void 0?void 0:b(e.width,n?.width??`auto`,t),height:e.height===void 0&&n?.height===void 0?void 0:b(e.height,n?.height??`auto`,t)}}function E(e,n){let r=e.width??(n?`100%`:void 0),i=e.height??(n?`100%`:void 0);return t.css`
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
${r===void 0?``:t.css`
|
|
4
|
+
width: ${r};
|
|
5
|
+
`}
|
|
6
|
+
${i===void 0?``:t.css`
|
|
7
|
+
height: ${i};
|
|
8
|
+
`}
|
|
9
|
+
${D(e)}
|
|
10
|
+
`}function D(e){return t.css`
|
|
11
|
+
${e.minWidth===void 0?``:t.css`
|
|
12
|
+
min-width: ${e.minWidth};
|
|
13
|
+
`}
|
|
14
|
+
${e.maxWidth===void 0?``:t.css`
|
|
15
|
+
max-width: ${e.maxWidth};
|
|
16
|
+
`}
|
|
17
|
+
${e.minHeight===void 0?``:t.css`
|
|
18
|
+
min-height: ${e.minHeight};
|
|
19
|
+
`}
|
|
20
|
+
${e.maxHeight===void 0?``:t.css`
|
|
21
|
+
max-height: ${e.maxHeight};
|
|
22
|
+
`}
|
|
23
|
+
`}function O(e){return t.css`
|
|
24
|
+
padding-top: ${e.paddingTop};
|
|
25
|
+
padding-right: ${e.paddingRight};
|
|
26
|
+
padding-bottom: ${e.paddingBottom};
|
|
27
|
+
padding-left: ${e.paddingLeft};
|
|
28
|
+
margin-top: ${e.marginTop};
|
|
29
|
+
margin-right: ${e.marginRight};
|
|
30
|
+
margin-bottom: ${e.marginBottom};
|
|
31
|
+
margin-left: ${e.marginLeft};
|
|
32
|
+
`}var k={none:`0`,extraSmall:`1px`,small:`2px`,base:`4px`,large:`8px`,extraLarge:`12px`},A={none:`0`,extraSmall:`0.125rem`,small:`0.25rem`,base:`0.5rem`,large:`0.75rem`,extraLarge:`1rem`};function j(e){return typeof e==`object`&&!!e}function M(e,t,n,r){return e===void 0?t===void 0?n:b(t,n,r):b(e,n,r)}function N(e,t,n){let r=b(e.borderWidth,t,n);return[M(e.borderTop,e.borderY,r,n),M(e.borderRight,e.borderX,r,n),M(e.borderBottom,e.borderY,r,n),M(e.borderLeft,e.borderX,r,n)].join(` `)}function P(e,t,n,r,a,o=`base`){if(e!==void 0){if(i.includes(e)){let r=n[e];return t===`background`?r.background:t===`text`?r.text.base:r.border}return s.includes(e)?r[e][o]:c.includes(e)?a[e][o]:e}}function F(e,t,n,r,i,a){if(e!==void 0){if(j(e)){let o=e[n];return o===void 0?void 0:P(o,t,r,i,a,n)}return P(e,t,r,i,a,`base`)}}function I(e,t,n,r,i){return P(e,`border`,n,r,i)??n[t].border}var L={sm:`40rem`,md:`48rem`,lg:`64rem`};function ee(e){return p.includes(e)}function te(e,t){if(e!==void 0)return ee(e)?t[e]:e}function ne(e,n=1){let r=Number.isFinite(n)&&n>=1?Math.floor(n):1,i=`repeat(${r}, minmax(0, 1fr))`;return t.css`
|
|
33
|
+
container-type: inline-size;
|
|
34
|
+
@container (max-width: ${e}) {
|
|
35
|
+
grid-template-columns: ${i};
|
|
36
|
+
justify-items: stretch;
|
|
37
|
+
align-items: stretch;
|
|
38
|
+
${r===1?t.css`
|
|
39
|
+
& > * {
|
|
40
|
+
grid-column: auto / span 1;
|
|
41
|
+
}
|
|
42
|
+
`:``}
|
|
43
|
+
}
|
|
44
|
+
`}function re(e,n=`start`){return t.css`
|
|
45
|
+
container-type: inline-size;
|
|
46
|
+
@container (max-width: ${e}) {
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
flex-wrap: nowrap;
|
|
49
|
+
align-items: stretch;
|
|
50
|
+
justify-content: ${n};
|
|
51
|
+
& > * {
|
|
52
|
+
width: auto;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`}function ie(e,n){return t.css`
|
|
57
|
+
justify-items: ${e};
|
|
58
|
+
align-items: ${n};
|
|
59
|
+
`}function ae(e,n){if(e||n)return t.css`
|
|
60
|
+
${e?t.css`
|
|
61
|
+
justify-self: ${e};
|
|
62
|
+
`:``}
|
|
63
|
+
${n?t.css`
|
|
64
|
+
align-self: ${n};
|
|
65
|
+
`:``}
|
|
66
|
+
`}function oe(e){return e?{alignX:`stretch`,alignY:`start`}:{alignX:`start`,alignY:`stretch`}}function se(e,n,r){let i=e?r:n,a=e?n:r;if(i||a)return t.css`
|
|
67
|
+
${i?t.css`
|
|
68
|
+
justify-content: ${i};
|
|
69
|
+
`:``}
|
|
70
|
+
${a?t.css`
|
|
71
|
+
align-items: ${a};
|
|
72
|
+
`:``}
|
|
73
|
+
`}function R(e,t){return e??t}function z(e,n){if(e)return t.css`
|
|
74
|
+
flex: 1 1 0%;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
min-height: 0;
|
|
77
|
+
`;if(n)return t.css`
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
`}function ce(e){return e??`start`}function le(e){if(!e)return;let n=e===`vertical`||e===`both`,r=e===`horizontal`||e===`both`;return t.css`
|
|
80
|
+
overflow-x: ${r?`auto`:`hidden`};
|
|
81
|
+
overflow-y: ${n?`auto`:`hidden`};
|
|
82
|
+
${n?t.css`
|
|
83
|
+
min-height: 0;
|
|
84
|
+
`:``}
|
|
85
|
+
${r?t.css`
|
|
86
|
+
min-width: 0;
|
|
87
|
+
`:``}
|
|
88
|
+
`}var ue=(0,e.createContext)(void 0);function B({kind:e,children:t}){return(0,n.jsx)(ue.Provider,{value:e,children:t})}function de(){return(0,e.useContext)(ue)}function V(e,n,r){if(e===`column`)return n?t.css`
|
|
89
|
+
align-self: ${n};
|
|
90
|
+
`:void 0;if(e===`row`)return r?t.css`
|
|
91
|
+
align-self: ${r};
|
|
92
|
+
`:void 0;if(n||r)return t.css`
|
|
93
|
+
${n?t.css`
|
|
94
|
+
justify-self: ${n};
|
|
95
|
+
`:``}
|
|
96
|
+
${r?t.css`
|
|
97
|
+
align-self: ${r};
|
|
98
|
+
`:``}
|
|
99
|
+
`}var H=[`extraDark`,`dark`,`base`,`light`,`extraLight`],fe=[0,1,2,3,4,5,6],U=[`#000000`,`#292929`,`#4e4e4e`,`#777777`,`#a2a2a2`,`#d0d0d0`,`#ffffff`],W={black:U[0],white:U[6],gray:{0:U[0],1:U[1],2:U[2],3:U[3],4:U[4],5:U[5],6:U[6],extraDark:U[1],dark:U[2],base:U[3],light:U[4],extraLight:U[5]}};function pe(e){let t=e.trim(),n=/^#([\da-fA-F])([\da-fA-F])([\da-fA-F])$/.exec(t);if(n)return[Number.parseInt(n[1]+n[1],16),Number.parseInt(n[2]+n[2],16),Number.parseInt(n[3]+n[3],16)];let r=/^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/.exec(t);return r?[Number.parseInt(r[1],16),Number.parseInt(r[2],16),Number.parseInt(r[3],16)]:null}function G(e,t,n){return`#${[e,t,n].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function K(e,t,n){return Math.round(e+(t-e)*n)}function me(e,t,n){let r=pe(e);return r?G(K(r[0],t,n),K(r[1],t,n),K(r[2],t,n)):null}function q(e){return{base:e,hover:me(e,255,.25)??e,active:me(e,0,.055)??e}}var J={extraSmall:`0.75rem`,small:`0.875rem`,base:`1rem`,large:`1.25rem`,extraLarge:`1.5rem`},he={thin:`100`,base:`400`,bold:`700`,heavy:`800`},ge={base:`"Open Sans", sans-serif`,display:`Montserrat, sans-serif`,mono:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},_e=1.2,ve={padding:`none`,margin:`none`},ye={...ve,borderWidth:`none`,borderRadius:`none`},be={...ye,height:`auto`},Y={...ye,width:`auto`},xe={...ve,gap:`none`,alignX:`stretch`,alignY:`start`},Se={...ve,gap:`none`,alignX:`start`,alignY:`stretch`},Ce={...ve,gap:`none`,alignX:`stretch`,alignY:`stretch`},we={muted:{background:`#222222`,text:{base:W.gray.extraLight,muted:W.gray.base,highlighted:W.white},border:W.gray.dark},base:{background:`#333333`,text:{base:W.gray.extraLight,muted:W.gray.light,highlighted:W.white},border:W.gray.base},highlighted:{background:W.gray.dark,text:{base:W.white,muted:W.gray.light,highlighted:W.white},border:W.gray.base}},X={mode:`dark`,colorSchemes:{dark:we,light:{muted:{background:`#f2f2f2`,text:{base:`#222222`,muted:W.gray.base,highlighted:W.black},border:W.gray.light},base:{background:`#f7f7f7`,text:{base:`#333333`,muted:W.gray.base,highlighted:W.black},border:W.gray.base},highlighted:{background:W.white,text:{base:W.gray.dark,muted:W.gray.base,highlighted:W.black},border:W.gray.base}}},colors:we,brand:{primary:q(`#ff9f2e`),secondary:q(`#ff9f2e`),accent:q(`#ff9f2e`)},status:{danger:q(`#f2555a`),warning:q(`#ffd60a`),success:q(`#4ade80`),info:q(`#38bdf8`)},space:v,borderWidths:k,radii:A,breakpoints:{...L},fontSizes:J,fontWeights:he,fontFamilies:ge,lineHeight:_e,defaults:{panel:{...ye},panels:{...ve,gap:`none`},rows:{...xe},row:{...be},cols:{...Se},col:{...Y},grid:{...Ce},cell:{...ye},div:{...ye},text:{size:`base`,weight:`base`},heading:{size:{1:`2rem`,2:`1.5rem`,3:`1.17rem`,4:`1rem`,5:`0.83rem`,6:`0.67rem`},weight:`bold`,family:`display`},textLink:{color:`primary`,hover:`primary`,hoverUnderline:!1},button:{color:`primary`,size:`small`,weight:`bold`,ink:W.black,hover:{color:W.black},paddingX:`base`,paddingY:`small`,gap:`extraSmall`,borderWidth:`extraSmall`,borderRadius:`base`},chip:{color:`primary`,size:`extraSmall`,weight:`bold`,tint:`12%`,paddingX:`base`,paddingY:`extraSmall`,gap:`extraSmall`,borderRadius:`999px`,uppercase:!0},input:{color:`primary`,size:`small`,weight:`base`,paddingX:`base`,paddingY:`small`,borderWidth:`extraSmall`,borderRadius:`base`},textarea:{color:`primary`,size:`small`,weight:`base`,paddingX:`base`,paddingY:`small`,borderWidth:`extraSmall`,borderRadius:`base`,resize:!1,rows:3},select:{color:`primary`,size:`small`,weight:`base`,paddingX:`base`,paddingY:`small`,borderWidth:`extraSmall`,borderRadius:`base`,listMaxHeight:`16rem`,listOffset:`extraSmall`,optionPaddingX:`base`,optionPaddingY:`extraSmall`,listZIndex:1100,listShadow:`0 8px 24px rgb(0 0 0 / 35%)`},switch:{color:`primary`,size:`base`,ink:W.white,widthFactor:2,insetFactor:.2,borderRadius:`999px`},checkbox:{color:`primary`,size:`base`,ink:W.black,borderWidth:`extraSmall`,borderRadius:`small`},radio:{color:`primary`,size:`base`,borderWidth:`extraSmall`,borderRadius:`999px`,insetFactor:.22}}};function Te(e,t,n){let r={...t};if(!n)return r;for(let t of e){let e=n[t];e!==void 0&&(r[t]=e)}return r}function Ee(e,t){return Te(u,e,t)}function De(e,t){return Te(p,e,t)}function Oe(e,t){return{padding:t?.padding??e.padding,margin:t?.margin??e.margin}}function ke(e,t){return{...Oe(e,t),borderWidth:t?.borderWidth??e.borderWidth,borderRadius:t?.borderRadius??e.borderRadius}}function Ae(e,t){return{...ke(e,t),height:t?.height??e.height}}function je(e,t){return{...ke(e,t),width:t?.width??e.width}}function Me(e,t){return{...Oe(e,t),gap:t?.gap??e.gap}}function Ne(e,t){return{size:t?.size??e.size,weight:t?.weight??e.weight}}function Pe(e,t){let n={...e.size};for(let e of _){let r=t?.size?.[e];r!==void 0&&(n[e]=r)}return{size:n,weight:t?.weight??e.weight,family:t?.family??e.family}}function Fe(e,t){return{color:t?.color??e.color,hover:t?.hover??e.hover,hoverUnderline:t?.hoverUnderline??e.hoverUnderline}}function Ie(e,t){return{color:t?.color??e.color,size:t?.size??e.size,weight:t?.weight??e.weight,tint:t?.tint??e.tint,paddingX:t?.paddingX??e.paddingX,paddingY:t?.paddingY??e.paddingY,gap:t?.gap??e.gap,borderRadius:t?.borderRadius??e.borderRadius,uppercase:t?.uppercase??e.uppercase}}function Le(e,t){return{color:t?.color??e.color,size:t?.size??e.size,weight:t?.weight??e.weight,paddingX:t?.paddingX??e.paddingX,paddingY:t?.paddingY??e.paddingY,borderWidth:t?.borderWidth??e.borderWidth,borderRadius:t?.borderRadius??e.borderRadius}}function Re(e,t){return{...Le(e,t),resize:t?.resize??e.resize,rows:t?.rows??e.rows}}function ze(e,t){return{...Le(e,t),listMaxHeight:t?.listMaxHeight??e.listMaxHeight,listOffset:t?.listOffset??e.listOffset,optionPaddingX:t?.optionPaddingX??e.optionPaddingX,optionPaddingY:t?.optionPaddingY??e.optionPaddingY,listZIndex:t?.listZIndex??e.listZIndex,listShadow:t?.listShadow??e.listShadow}}function Be(e,t){return{color:t?.color??e.color,size:t?.size??e.size,ink:t?.ink??e.ink,widthFactor:t?.widthFactor??e.widthFactor,insetFactor:t?.insetFactor??e.insetFactor,borderRadius:t?.borderRadius??e.borderRadius}}function Ve(e,t){return{color:t?.color??e.color,size:t?.size??e.size,ink:t?.ink??e.ink,borderWidth:t?.borderWidth??e.borderWidth,borderRadius:t?.borderRadius??e.borderRadius}}function He(e,t){return{color:t?.color??e.color,size:t?.size??e.size,borderWidth:t?.borderWidth??e.borderWidth,borderRadius:t?.borderRadius??e.borderRadius,insetFactor:t?.insetFactor??e.insetFactor}}function Ue(e,t){return{color:t?.color??e.color,size:t?.size??e.size,weight:t?.weight??e.weight,ink:t?.ink??e.ink,hover:{color:t?.hover?.color??e.hover.color,background:t?.hover?.background??e.hover.background},paddingX:t?.paddingX??e.paddingX,paddingY:t?.paddingY??e.paddingY,gap:t?.gap??e.gap,borderWidth:t?.borderWidth??e.borderWidth,borderRadius:t?.borderRadius??e.borderRadius}}function Z(e,t){if(t===void 0)return{...e};if(typeof t==`string`)return q(t);let n=t.base??e.base,r=q(n);return{base:n,hover:t.hover??(t.base===void 0?e.hover:r.hover),active:t.active??(t.base===void 0?e.active:r.active)}}function We(e,t){return{danger:Z(e.danger,t?.danger),warning:Z(e.warning,t?.warning),success:Z(e.success,t?.success),info:Z(e.info,t?.info)}}function Ge(e,t){let n=Z(e.primary,t?.primary),r=t?.primary!==void 0;return{primary:n,secondary:Z(r?n:e.secondary,t?.secondary),accent:Z(r?n:e.accent,t?.accent)}}function Ke(e,t){return{...Oe(e,t),gap:t?.gap??e.gap,alignX:t?.alignX??e.alignX,alignY:t?.alignY??e.alignY}}function qe(e,t){return Te(a,e,t)}function Je(e,t){return{background:t?.background??e.background,border:t?.border??e.border,text:qe(e.text,t?.text)}}function Ye(e,t){let n={...e};for(let r of i)n[r]=Je(e[r],t?.[r]);let r=t?.app;return r?.background||r?.text?n.app={...e.app,...r}:e.app&&(n.app={...e.app}),n}function Xe(e,t){return{...e,mode:t,colors:e.colorSchemes[t]}}function Ze(e){let t={dark:Ye(X.colorSchemes.dark,e?.colors?.dark),light:Ye(X.colorSchemes.light,e?.colors?.light)},n=Le(X.defaults.input,e?.defaults?.input);return{mode:`dark`,colorSchemes:t,colors:t.dark,brand:Ge(X.brand,e?.brand),status:We(X.status,e?.status),space:Ee(X.space,e?.space),borderWidths:Ee(X.borderWidths,e?.borderWidths),radii:Ee(X.radii,e?.radii),breakpoints:De(X.breakpoints,e?.breakpoints),fontSizes:Te(m,X.fontSizes,e?.fontSizes),fontWeights:Te(h,X.fontWeights,e?.fontWeights),fontFamilies:Te(g,X.fontFamilies,e?.fontFamilies),lineHeight:e?.lineHeight??X.lineHeight,defaults:{panel:ke(X.defaults.panel,e?.defaults?.panel),panels:Me(X.defaults.panels,e?.defaults?.panels),rows:Ke(X.defaults.rows,e?.defaults?.rows),row:Ae(X.defaults.row,e?.defaults?.row),cols:Ke(X.defaults.cols,e?.defaults?.cols),col:je(X.defaults.col,e?.defaults?.col),grid:Ke(X.defaults.grid,e?.defaults?.grid),cell:ke(X.defaults.cell,e?.defaults?.cell),div:ke(X.defaults.div,e?.defaults?.div),text:Ne(X.defaults.text,e?.defaults?.text),heading:Pe(X.defaults.heading,e?.defaults?.heading),textLink:Fe(X.defaults.textLink,e?.defaults?.textLink),button:Ue(X.defaults.button,e?.defaults?.button),chip:Ie(X.defaults.chip,e?.defaults?.chip),input:n,textarea:Re({...n,resize:X.defaults.textarea.resize,rows:X.defaults.textarea.rows},e?.defaults?.textarea),select:ze({...n,listMaxHeight:X.defaults.select.listMaxHeight,listOffset:X.defaults.select.listOffset,optionPaddingX:X.defaults.select.optionPaddingX,optionPaddingY:X.defaults.select.optionPaddingY,listZIndex:X.defaults.select.listZIndex,listShadow:X.defaults.select.listShadow},e?.defaults?.select),switch:Be(X.defaults.switch,e?.defaults?.switch),checkbox:Ve(X.defaults.checkbox,e?.defaults?.checkbox),radio:He(X.defaults.radio,e?.defaults?.radio)}}}function Qe(e){return!!e&&`colorSchemes`in e&&e.colorSchemes?.dark?.muted!=null&&e.colorSchemes?.light?.muted!=null}var $e={background:`--panelize-app-bg`,text:`--panelize-app-text`},et=(0,e.createContext)(X),tt=t.styled.div`
|
|
100
|
+
position: relative;
|
|
101
|
+
min-height: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
color-scheme: ${({$colorScheme:e})=>e};
|
|
104
|
+
${({$background:e})=>e?t.css`
|
|
105
|
+
${$e.background}: ${e};
|
|
106
|
+
background: var(${$e.background});
|
|
107
|
+
`:``}
|
|
108
|
+
${({$text:e})=>e?t.css`
|
|
109
|
+
${$e.text}: ${e};
|
|
110
|
+
color: var(${$e.text});
|
|
111
|
+
`:``}
|
|
112
|
+
`;function nt({theme:t,mode:r=`dark`,children:i}){let a=(0,e.useMemo)(()=>Qe(t)?t:Ze(t),[t]),o=(0,e.useMemo)(()=>Xe(a,r),[a,r]),s=o.colors.app;return(0,n.jsx)(et.Provider,{value:o,children:(0,n.jsx)(tt,{$colorScheme:r,$background:s?.background,$text:s?.text,children:i})})}function Q(){return(0,e.useContext)(et)}var $={background:`--panelize-bg`,text:`--panelize-text`,textMuted:`--panelize-text-muted`,textHighlighted:`--panelize-text-highlighted`,border:`--panelize-border`},rt=t.styled.div`
|
|
113
|
+
position: relative;
|
|
114
|
+
${({$edges:e})=>O(e)}
|
|
115
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
116
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
117
|
+
border-style: solid;
|
|
118
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
119
|
+
background: var(${$.background});
|
|
120
|
+
color: var(${$.text});
|
|
121
|
+
border-color: var(${$.border});
|
|
122
|
+
${({$colors:e,$borderColor:n})=>t.css`
|
|
123
|
+
${$.background}: ${e.background};
|
|
124
|
+
${$.text}: ${e.text.base};
|
|
125
|
+
${$.textMuted}: ${e.text.muted};
|
|
126
|
+
${$.textHighlighted}: ${e.text.highlighted};
|
|
127
|
+
${$.border}: ${n};
|
|
128
|
+
`}
|
|
129
|
+
${({$flex:e})=>z(e,!0)}
|
|
130
|
+
${({$scroll:e})=>le(e)}
|
|
131
|
+
${({$trackKind:e,$alignX:t,$alignY:n})=>V(e,t,n)}
|
|
132
|
+
${({$customCss:e})=>e??``}
|
|
133
|
+
`;function it(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,alignX:s,alignY:c,variant:l=`base`,css:u,borderWidth:d,borderX:f,borderY:p,borderTop:m,borderRight:h,borderBottom:g,borderLeft:_,borderRadius:v,borderColor:y,scroll:x,...w}=i,{colors:E,space:D,borderWidths:O,radii:k,defaults:A,brand:j,status:M}=Q(),P=de();return(0,n.jsx)(rt,{$flex:a,$fill:o,$colors:E[l],$edges:S(t,A.panel,D),$size:T(r,D),$borderWidth:N({borderWidth:d,borderX:f,borderY:p,borderTop:m,borderRight:h,borderBottom:g,borderLeft:_},A.panel.borderWidth,O),$borderRadius:b(v,A.panel.borderRadius,k),$borderColor:I(y,l,E,j,M),$scroll:x,$alignX:s,$alignY:c,$trackKind:P,$customCss:u,...w})}function at(e){return!!e&&s.includes(e)}function ot(e){return!!e&&c.includes(e)}function st(e){return at(e)||ot(e)}function ct(e,t,n){return at(e)?t[e]:ot(e)?n[e]:{base:e,hover:e,active:e}}function lt(e,t,n){return ct(e,t,n).base}function ut(e,t,n,r,i){return e!==void 0&&st(e)?ct(e,r,i).base:e||(t?`var(${$.textHighlighted})`:n?`var(${$.textMuted})`:`var(${$.text})`)}function dt(e,t,n,r){let i=e!==void 0&&st(e)?ct(e,n,r):void 0;if(t===`inherit`){let e=`var(${$.text})`;return{hover:e,active:i?.active??e}}if(st(t)){let i=ct(t,n,r);return{hover:e===t?i.hover:i.base,active:i.active}}return{hover:t,active:i?.active??t}}var ft=t.styled.button`
|
|
134
|
+
appearance: none;
|
|
135
|
+
display: ${({$fill:e})=>e?`flex`:`inline-flex`};
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
gap: ${({$gap:e})=>e};
|
|
139
|
+
${({$fill:e})=>e?t.css`
|
|
140
|
+
width: 100%;
|
|
141
|
+
height: 100%;
|
|
142
|
+
`:``}
|
|
143
|
+
margin: 0;
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
font-family: ${({$family:e})=>e};
|
|
147
|
+
font-size: ${({$size:e})=>e};
|
|
148
|
+
font-weight: ${({$weight:e})=>e};
|
|
149
|
+
line-height: ${({$lineHeight:e})=>e};
|
|
150
|
+
padding: ${({$paddingY:e,$paddingX:t})=>`${e} ${t}`};
|
|
151
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
152
|
+
border-style: solid;
|
|
153
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
154
|
+
border-color: ${({$restBorder:e})=>e};
|
|
155
|
+
background: ${({$restBg:e})=>e};
|
|
156
|
+
color: ${({$restFg:e})=>e};
|
|
157
|
+
&:focus-visible {
|
|
158
|
+
outline: 2px solid currentColor;
|
|
159
|
+
outline-offset: 2px;
|
|
160
|
+
}
|
|
161
|
+
&:hover:not(:disabled) {
|
|
162
|
+
background: ${({$hoverBg:e})=>e};
|
|
163
|
+
color: ${({$hoverFg:e})=>e};
|
|
164
|
+
border-color: ${({$hoverBorder:e})=>e};
|
|
165
|
+
}
|
|
166
|
+
&:active:not(:disabled) {
|
|
167
|
+
background: ${({$activeBg:e})=>e};
|
|
168
|
+
color: ${({$activeFg:e})=>e};
|
|
169
|
+
border-color: ${({$activeBorder:e})=>e};
|
|
170
|
+
}
|
|
171
|
+
&:disabled {
|
|
172
|
+
cursor: not-allowed;
|
|
173
|
+
opacity: 0.45;
|
|
174
|
+
}
|
|
175
|
+
${({$italic:e})=>e?t.css`
|
|
176
|
+
font-style: italic;
|
|
177
|
+
`:``}
|
|
178
|
+
${({$uppercase:e})=>e?t.css`
|
|
179
|
+
text-transform: uppercase;
|
|
180
|
+
`:``}
|
|
181
|
+
${({$customCss:e})=>e??``}
|
|
182
|
+
`;function pt(e,t,n,r){return st(e)?ct(e,t,n)[r]:e}function mt(e,t,n){return t!==void 0&&!st(t)?t:e[n]}function ht(e){let{color:t,outline:r,size:i,weight:a,family:o,italic:s,uppercase:c,fill:l,label:u,css:d,padding:f,paddingX:p,paddingY:m,borderWidth:h,borderRadius:g,background:_,ink:v,type:y=`button`,children:x,...S}=e,{fontSizes:C,fontWeights:w,fontFamilies:T,lineHeight:E,space:D,borderWidths:O,radii:k,defaults:A,brand:j,status:M,colors:N}=Q(),P=ct(t??A.button.color,j,M),I=!r,L=A.button.hover,ee=pt(L.color,j,M,`base`),te=(e,t,n)=>F(e,t,n,N,j,M),ne=e=>{let t=te(_,`background`,e);return t===void 0?I?e===`base`?P.base:mt(P,L.background,e):`transparent`:t},re=e=>{let t=te(v,`text`,e);return t===void 0?I?e===`base`?A.button.ink:ee:P[e]:t},ie=ne(`base`),ae=ne(`hover`),oe=ne(`active`),se=re(`base`),R=re(`hover`),z=re(`active`),ce=I?ie:P.base,le=I?ae:P.hover,ue=I?oe:P.active;return(0,n.jsx)(ft,{type:y,$family:T[o??`base`],$size:b(i,A.button.size,C),$weight:b(a,A.button.weight,w),$lineHeight:E,$paddingX:b(p??f,A.button.paddingX,D),$paddingY:b(m??f,A.button.paddingY,D),$gap:b(void 0,A.button.gap,D),$borderWidth:b(h,A.button.borderWidth,O),$borderRadius:b(g,A.button.borderRadius,k),$restBg:ie,$restFg:se,$restBorder:ce,$hoverBg:ae,$hoverFg:R,$hoverBorder:le,$activeBg:oe,$activeFg:z,$activeBorder:ue,$italic:s,$uppercase:c,$fill:l,$customCss:d,...S,children:x??u})}var gt=t.styled.span`
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
gap: ${({$gap:e})=>e};
|
|
187
|
+
margin: 0;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
white-space: nowrap;
|
|
190
|
+
font-family: ${({$family:e})=>e};
|
|
191
|
+
font-size: ${({$size:e})=>e};
|
|
192
|
+
font-weight: ${({$weight:e})=>e};
|
|
193
|
+
line-height: ${({$lineHeight:e})=>e};
|
|
194
|
+
padding: ${({$paddingY:e,$paddingX:t})=>`${e} ${t}`};
|
|
195
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
196
|
+
border-style: solid;
|
|
197
|
+
border-color: ${({$borderColor:e})=>e};
|
|
198
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
199
|
+
background: ${({$bg:e})=>e};
|
|
200
|
+
color: ${({$fg:e})=>e};
|
|
201
|
+
${({$uppercase:e})=>e?`text-transform: uppercase;`:``}
|
|
202
|
+
${({$customCss:e})=>e??``}
|
|
203
|
+
`;function _t(e){let{color:t,size:r,weight:i,family:a,uppercase:o,label:s,css:c,padding:l,paddingX:u,paddingY:d,borderWidth:f,borderRadius:p,background:m,ink:h,borderColor:g,children:_,...v}=e,{fontSizes:y,fontWeights:x,fontFamilies:S,lineHeight:C,space:w,borderWidths:T,radii:E,defaults:D,brand:O,status:k,colors:A}=Q(),j=D.chip,M=ct(t??j.color,O,k).base,N=`color-mix(in srgb, ${M} ${j.tint}, var(${$.background}, transparent))`,F=P(m,`background`,A,O,k)??N,I=P(h,`text`,A,O,k)??M,L=P(g,`border`,A,O,k)??M;return(0,n.jsx)(gt,{$family:S[a??`base`],$size:b(r,j.size,y),$weight:b(i,j.weight,x),$lineHeight:C,$paddingX:b(u??l,j.paddingX,w),$paddingY:b(d??l,j.paddingY,w),$gap:b(void 0,j.gap,w),$borderWidth:b(f,`none`,T),$borderRadius:b(p,j.borderRadius,E),$borderColor:L,$bg:F,$fg:I,$uppercase:o??j.uppercase,$customCss:c,...v,children:_??s})}function vt(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var yt=t.styled.input`
|
|
204
|
+
appearance: none;
|
|
205
|
+
margin: 0;
|
|
206
|
+
flex-shrink: 0;
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
position: relative;
|
|
209
|
+
display: inline-block;
|
|
210
|
+
vertical-align: middle;
|
|
211
|
+
color: inherit;
|
|
212
|
+
width: ${({$width:e})=>e};
|
|
213
|
+
height: ${({$height:e})=>e};
|
|
214
|
+
font-size: ${({$size:e})=>e};
|
|
215
|
+
padding: 0;
|
|
216
|
+
border: ${({$borderWidth:e})=>e} solid ${({$borderColor:e})=>e};
|
|
217
|
+
border-radius: ${({$radius:e})=>e};
|
|
218
|
+
background: ${({$off:e})=>e};
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
transition:
|
|
221
|
+
background 120ms ease,
|
|
222
|
+
border-color 120ms ease,
|
|
223
|
+
box-shadow 120ms ease;
|
|
224
|
+
&::after {
|
|
225
|
+
content: '';
|
|
226
|
+
position: absolute;
|
|
227
|
+
box-sizing: border-box;
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
opacity: 0;
|
|
230
|
+
}
|
|
231
|
+
&:hover:not(:disabled):not(:checked):not(:indeterminate) {
|
|
232
|
+
border-color: ${({$hoverBorder:e})=>e};
|
|
233
|
+
}
|
|
234
|
+
&:active:not(:disabled):not(:checked):not(:indeterminate) {
|
|
235
|
+
border-color: ${({$activeBorder:e})=>e};
|
|
236
|
+
}
|
|
237
|
+
&:checked,
|
|
238
|
+
&:indeterminate {
|
|
239
|
+
background: ${({$on:e})=>e};
|
|
240
|
+
border-color: ${({$on:e})=>e};
|
|
241
|
+
}
|
|
242
|
+
&:is(:checked, :indeterminate):hover:not(:disabled) {
|
|
243
|
+
background: ${({$hoverOn:e})=>e};
|
|
244
|
+
border-color: ${({$hoverOn:e})=>e};
|
|
245
|
+
}
|
|
246
|
+
&:is(:checked, :indeterminate):active:not(:disabled) {
|
|
247
|
+
background: ${({$activeOn:e})=>e};
|
|
248
|
+
border-color: ${({$activeOn:e})=>e};
|
|
249
|
+
}
|
|
250
|
+
&:checked:not(:indeterminate)::after {
|
|
251
|
+
opacity: ${({$hideCheckIcon:e})=>+!e};
|
|
252
|
+
left: 50%;
|
|
253
|
+
top: 42%;
|
|
254
|
+
width: 0.3em;
|
|
255
|
+
height: 0.52em;
|
|
256
|
+
border: solid ${({$ink:e})=>e};
|
|
257
|
+
border-width: 0 0.17em 0.17em 0;
|
|
258
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
259
|
+
}
|
|
260
|
+
&:indeterminate::after {
|
|
261
|
+
opacity: 1;
|
|
262
|
+
left: 50%;
|
|
263
|
+
top: 50%;
|
|
264
|
+
width: 50%;
|
|
265
|
+
height: 0.17em;
|
|
266
|
+
border: none;
|
|
267
|
+
border-radius: 999px;
|
|
268
|
+
background: ${({$ink:e})=>e};
|
|
269
|
+
transform: translate(-50%, -50%);
|
|
270
|
+
}
|
|
271
|
+
&:focus-visible {
|
|
272
|
+
outline: none;
|
|
273
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${({$on:e})=>e} 18%, transparent);
|
|
274
|
+
}
|
|
275
|
+
&:disabled {
|
|
276
|
+
cursor: not-allowed;
|
|
277
|
+
}
|
|
278
|
+
&:disabled:is(:checked, :indeterminate) {
|
|
279
|
+
opacity: 0.45;
|
|
280
|
+
}
|
|
281
|
+
@media (prefers-reduced-motion: reduce) {
|
|
282
|
+
transition: none;
|
|
283
|
+
}
|
|
284
|
+
${({$customCss:e})=>e??``}
|
|
285
|
+
`;function bt(e){let{color:t,size:r,css:i,background:a,ink:o,borderColor:s,borderWidth:c,borderRadius:l,width:u,height:d,indeterminate:f=!1,hideCheckIcon:p=!1,ref:m,...h}=e,{space:g,radii:_,fontSizes:v,borderWidths:y,defaults:x,brand:S,status:C,colors:w}=Q(),T=x.checkbox,E=ct(t??T.color,S,C),D=P(a,`background`,w,S,C)??`transparent`,O=F(o,`text`,`base`,w,S,C)??T.ink,k=P(s,`border`,w,S,C)??`currentColor`,A=b(r,T.size,v),j=A,M=u===void 0?j:b(u,A,g),N=d===void 0?j:b(d,A,g);return(0,n.jsx)(yt,{$width:M,$height:N,$size:A,$radius:b(l,T.borderRadius,_),$borderWidth:b(c,T.borderWidth,y),$borderColor:k,$hoverBorder:k,$activeBorder:k,$off:D,$on:E.base,$hoverOn:E.hover,$activeOn:E.active,$ink:O,$hideCheckIcon:p,$customCss:i,...h,ref:e=>{e&&(e.indeterminate=f),vt(m,e)},type:`checkbox`})}bt.displayName=`Checkbox`;var xt=t.css`
|
|
286
|
+
appearance: none;
|
|
287
|
+
margin: 0;
|
|
288
|
+
box-sizing: border-box;
|
|
289
|
+
min-width: 0;
|
|
290
|
+
${({$fill:e})=>e?t.css`
|
|
291
|
+
display: block;
|
|
292
|
+
width: 100%;
|
|
293
|
+
height: 100%;
|
|
294
|
+
`:``}
|
|
295
|
+
font-family: ${({$family:e})=>e};
|
|
296
|
+
font-size: ${({$size:e})=>e};
|
|
297
|
+
font-weight: ${({$weight:e})=>e};
|
|
298
|
+
line-height: ${({$lineHeight:e})=>e};
|
|
299
|
+
padding: ${({$paddingY:e,$paddingX:t})=>`${e} ${t}`};
|
|
300
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
301
|
+
border-style: solid;
|
|
302
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
303
|
+
border-color: ${({$borderColor:e})=>e};
|
|
304
|
+
background: ${({$bg:e})=>e};
|
|
305
|
+
color: ${({$ink:e})=>e};
|
|
306
|
+
caret-color: ${({$focus:e})=>e};
|
|
307
|
+
&::placeholder {
|
|
308
|
+
color: var(${$.textMuted});
|
|
309
|
+
opacity: 1;
|
|
310
|
+
}
|
|
311
|
+
${({$focus:e,$invalid:n})=>t.css`
|
|
312
|
+
&:focus {
|
|
313
|
+
outline: none;
|
|
314
|
+
border-color: ${e};
|
|
315
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${e} 18%, transparent);
|
|
316
|
+
}
|
|
317
|
+
&:user-invalid,
|
|
318
|
+
&[aria-invalid='true'] {
|
|
319
|
+
border-color: ${n};
|
|
320
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${n} 18%, transparent);
|
|
321
|
+
caret-color: ${n};
|
|
322
|
+
}
|
|
323
|
+
&:user-invalid:focus,
|
|
324
|
+
&[aria-invalid='true']:focus {
|
|
325
|
+
border-color: ${n};
|
|
326
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${n} 18%, transparent);
|
|
327
|
+
caret-color: ${n};
|
|
328
|
+
}
|
|
329
|
+
`}
|
|
330
|
+
&:disabled {
|
|
331
|
+
cursor: not-allowed;
|
|
332
|
+
opacity: 0.45;
|
|
333
|
+
}
|
|
334
|
+
&:is(input, textarea):read-only {
|
|
335
|
+
opacity: 0.45;
|
|
336
|
+
}
|
|
337
|
+
${({$italic:e})=>e?t.css`
|
|
338
|
+
font-style: italic;
|
|
339
|
+
`:``}
|
|
340
|
+
${({$uppercase:e})=>e?t.css`
|
|
341
|
+
text-transform: uppercase;
|
|
342
|
+
`:``}
|
|
343
|
+
`,St=t.styled.input`
|
|
344
|
+
${xt}
|
|
345
|
+
${({$customCss:e})=>e??``}
|
|
346
|
+
`;function Ct(e){let{color:t,size:r,weight:i,family:a,italic:o,uppercase:s,fill:c,css:l,padding:u,paddingX:d,paddingY:f,borderWidth:p,borderRadius:m,background:h,ink:g,borderColor:_,type:v=`text`,...y}=e,{fontSizes:x,fontWeights:S,fontFamilies:C,lineHeight:w,space:T,borderWidths:E,radii:D,defaults:O,brand:k,status:A,colors:j}=Q(),M=O.input;return(0,n.jsx)(St,{type:v,$family:C[a??`base`],$size:b(r,M.size,x),$weight:b(i,M.weight,S),$lineHeight:w,$paddingX:b(d??u,M.paddingX,T),$paddingY:b(f??u,M.paddingY,T),$borderWidth:b(p,M.borderWidth,E),$borderRadius:b(m,M.borderRadius,D),$bg:P(h,`background`,j,k,A)??`var(${$.background})`,$ink:P(g,`text`,j,k,A)??`var(${$.text})`,$borderColor:P(_,`border`,j,k,A)??`var(${$.border})`,$focus:lt(t??M.color,k,A),$invalid:A.danger.base,$italic:o,$uppercase:s,$fill:c,$customCss:l,...y})}var wt=(0,e.createContext)(null);function Tt(){return(0,e.useContext)(wt)}var Et=t.css`
|
|
347
|
+
margin: 0;
|
|
348
|
+
padding: 0;
|
|
349
|
+
font-family: ${({$family:e})=>e};
|
|
350
|
+
font-size: ${({$size:e})=>e};
|
|
351
|
+
color: ${({$color:e})=>e};
|
|
352
|
+
font-weight: ${({$weight:e})=>e};
|
|
353
|
+
line-height: ${({$lineHeight:e})=>e};
|
|
354
|
+
${({$italic:e})=>e?t.css`
|
|
355
|
+
font-style: italic;
|
|
356
|
+
`:``}
|
|
357
|
+
${({$underlined:e})=>e?t.css`
|
|
358
|
+
text-decoration: underline;
|
|
359
|
+
`:``}
|
|
360
|
+
${({$uppercase:e})=>e?t.css`
|
|
361
|
+
text-transform: uppercase;
|
|
362
|
+
`:``}
|
|
363
|
+
`,Dt=`:is(button, input, select, textarea)`,Ot=t.styled.label`
|
|
364
|
+
display: inline-block;
|
|
365
|
+
cursor: ${({$clickable:e})=>e?`pointer`:`default`};
|
|
366
|
+
${Et}
|
|
367
|
+
line-height: 1;
|
|
368
|
+
text-box: trim-both cap alphabetic;
|
|
369
|
+
&[for],
|
|
370
|
+
&:has(${Dt}) {
|
|
371
|
+
cursor: pointer;
|
|
372
|
+
}
|
|
373
|
+
&:has(${Dt}:disabled) {
|
|
374
|
+
cursor: not-allowed;
|
|
375
|
+
}
|
|
376
|
+
&:has(${Dt}) {
|
|
377
|
+
text-box: unset;
|
|
378
|
+
}
|
|
379
|
+
${({$customCss:e})=>e??``}
|
|
380
|
+
`;function kt(e){let{size:t,color:r,muted:i,highlighted:a,weight:o,family:s,italic:c,underlined:l,uppercase:u,label:d,css:f,children:p,onClick:m,...h}=e,{fontSizes:g,fontWeights:_,fontFamilies:v,defaults:y,brand:x,status:S}=Q(),C=v[s??`base`],w=b(t,y.text.size,g),T=b(o,y.text.weight,_);return(0,n.jsx)(wt.Provider,{value:{family:C,size:w,weight:T,lineHeight:1},children:(0,n.jsx)(Ot,{$family:C,$size:w,$color:ut(r,a,i,x,S),$weight:T,$lineHeight:1,$italic:c,$underlined:l,$uppercase:u,$clickable:typeof m==`function`,$customCss:f,onClick:m,...h,children:p??d})})}kt.displayName=`Label`;function At(e){e.preventDefault(),e.currentTarget.blur()}function jt(e){let{onWheel:t,...r}=e;return(0,n.jsx)(Ct,{...r,type:`number`,onWheel:e=>{At(e),t?.(e)}})}jt.displayName=`NumberInput`;var Mt=t.styled.input`
|
|
381
|
+
appearance: none;
|
|
382
|
+
margin: 0;
|
|
383
|
+
flex-shrink: 0;
|
|
384
|
+
box-sizing: border-box;
|
|
385
|
+
position: relative;
|
|
386
|
+
display: inline-block;
|
|
387
|
+
vertical-align: middle;
|
|
388
|
+
color: inherit;
|
|
389
|
+
width: ${({$width:e})=>e};
|
|
390
|
+
height: ${({$height:e})=>e};
|
|
391
|
+
font-size: ${({$size:e})=>e};
|
|
392
|
+
padding: 0;
|
|
393
|
+
border: ${({$borderWidth:e})=>e} solid ${({$borderColor:e})=>e};
|
|
394
|
+
border-radius: ${({$radius:e})=>e};
|
|
395
|
+
background: ${({$off:e})=>e};
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
transition:
|
|
398
|
+
background 120ms ease,
|
|
399
|
+
border-color 120ms ease,
|
|
400
|
+
box-shadow 120ms ease;
|
|
401
|
+
&::after {
|
|
402
|
+
content: '';
|
|
403
|
+
position: absolute;
|
|
404
|
+
box-sizing: border-box;
|
|
405
|
+
pointer-events: none;
|
|
406
|
+
opacity: 0;
|
|
407
|
+
left: 50%;
|
|
408
|
+
top: 50%;
|
|
409
|
+
width: calc(100% - 2 * ${({$inset:e})=>e});
|
|
410
|
+
height: calc(100% - 2 * ${({$inset:e})=>e});
|
|
411
|
+
border-radius: min(${({$radius:e})=>e}, 50%);
|
|
412
|
+
background: ${({$dot:e})=>e};
|
|
413
|
+
transform: translate(-50%, -50%);
|
|
414
|
+
transition: background 120ms ease;
|
|
415
|
+
}
|
|
416
|
+
&:hover:not(:disabled):not(:checked) {
|
|
417
|
+
border-color: ${({$hoverBorder:e})=>e};
|
|
418
|
+
}
|
|
419
|
+
&:active:not(:disabled):not(:checked) {
|
|
420
|
+
border-color: ${({$activeBorder:e})=>e};
|
|
421
|
+
}
|
|
422
|
+
&:checked {
|
|
423
|
+
border-color: ${({$on:e})=>e};
|
|
424
|
+
}
|
|
425
|
+
&:checked::after {
|
|
426
|
+
opacity: 1;
|
|
427
|
+
}
|
|
428
|
+
&:checked:hover:not(:disabled) {
|
|
429
|
+
border-color: ${({$hoverOn:e})=>e};
|
|
430
|
+
}
|
|
431
|
+
&:checked:hover:not(:disabled)::after {
|
|
432
|
+
background: ${({$hoverDot:e})=>e};
|
|
433
|
+
}
|
|
434
|
+
&:checked:active:not(:disabled) {
|
|
435
|
+
border-color: ${({$activeOn:e})=>e};
|
|
436
|
+
}
|
|
437
|
+
&:checked:active:not(:disabled)::after {
|
|
438
|
+
background: ${({$activeDot:e})=>e};
|
|
439
|
+
}
|
|
440
|
+
&:focus-visible {
|
|
441
|
+
outline: none;
|
|
442
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${({$on:e})=>e} 18%, transparent);
|
|
443
|
+
}
|
|
444
|
+
&:disabled {
|
|
445
|
+
cursor: not-allowed;
|
|
446
|
+
}
|
|
447
|
+
&:disabled:checked {
|
|
448
|
+
opacity: 0.45;
|
|
449
|
+
}
|
|
450
|
+
@media (prefers-reduced-motion: reduce) {
|
|
451
|
+
transition: none;
|
|
452
|
+
&::after {
|
|
453
|
+
transition: none;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
${({$customCss:e})=>e??``}
|
|
457
|
+
`;function Nt(e){let{color:t,size:r,css:i,background:a,ink:o,borderColor:s,borderWidth:c,borderRadius:l,width:u,height:d,...f}=e,{space:p,radii:m,fontSizes:h,borderWidths:g,defaults:_,brand:v,status:y,colors:x}=Q(),S=_.radio,C=ct(t??S.color,v,y),w=P(a,`background`,x,v,y)??`transparent`,T=F(o,`text`,`base`,x,v,y),E=F(o,`text`,`hover`,x,v,y),D=F(o,`text`,`active`,x,v,y),O=P(s,`border`,x,v,y)??`currentColor`,k=b(r,S.size,h),A=k,j=u===void 0?A:b(u,k,p),M=d===void 0?A:b(d,k,p),N=b(l,S.borderRadius,m);return(0,n.jsx)(Mt,{$width:j,$height:M,$size:k,$radius:N,$borderWidth:b(c,S.borderWidth,g),$borderColor:O,$hoverBorder:O,$activeBorder:O,$off:w,$on:C.base,$hoverOn:C.hover,$activeOn:C.active,$dot:T??C.base,$hoverDot:E??T??C.hover,$activeDot:D??T??C.active,$inset:`calc(${k} * ${S.insetFactor})`,$customCss:i,...f,type:`radio`})}Nt.displayName=`Radio`;function Pt(e){return null}Pt.displayName=`Option`;function Ft(e){return e.label===void 0?typeof e.children==`string`?e.children:e.value:e.label}function It(t){return(0,e.isValidElement)(t)&&t.type===Pt}function Lt(t,n){let r=new Map;for(let e of t??[])r.set(e.value,{value:e.value,label:e.label,disabled:e.disabled});return e.Children.forEach(n,e=>{if(!It(e))return;let{value:t,disabled:n}=e.props;r.set(t,{value:t,label:Ft(e.props),disabled:n})}),[...r.values()]}function Rt(e,t,n,r){return!t||r||e.some(e=>e.value===``)?e:[{value:``,label:typeof t==`string`?t:n??``},...e]}function zt(e,t,n){if(!n||t===``)return e;let r=e.findIndex(e=>e.value===t);if(r<=0)return e;let i=e.slice(),[a]=i.splice(r,1);return a&&i.unshift(a),i}function Bt(e,t,n){if(!n||t.length===0)return e;let r=new Set(t),i=[],a=[];for(let t of e)r.has(t.value)?i.push(t):a.push(t);return[...i,...a]}function Vt(e){return e.findIndex(e=>!e.disabled)}function Ht(e){for(let t=e.length-1;t>=0;--t)if(!e[t]?.disabled)return t;return-1}function Ut(e,t,n){if(e.length===0)return-1;let r=t;for(let t=0;t<e.length;t+=1)if(r=(r+n+e.length)%e.length,!e[r]?.disabled)return r;return t}function Wt(e,t,n){let r=t.toLowerCase(),i=n<0?0:n,a=[...e.slice(i),...e.slice(0,i)].find(e=>!e.disabled&&e.label.toLowerCase().startsWith(r));return a?e.indexOf(a):-1}function Gt(e){let t=getComputedStyle(e),n={};for(let e of Object.values($))n[e]=t.getPropertyValue(e).trim();return n}function Kt(e,t=16){let n=Number.parseFloat(e);if(!Number.isFinite(n))return 256;if(e.endsWith(`rem`)){let e=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);return n*(Number.isFinite(e)?e:16)}return e.endsWith(`em`)?n*t:n}function qt(e,t,n,r){let i=e.getBoundingClientRect(),a=Number.parseFloat(getComputedStyle(e).fontSize),o=Number.isFinite(a)?a:16,s=Kt(t,o),c=Kt(b(void 0,n,r),o),l=window.innerHeight-i.bottom-c,u=i.top-c,d=l<Math.min(s,120)&&u>l,f=Math.max(8,Math.min(s,d?u:l));return{vars:Gt(e),box:{top:d?i.top-f-c:i.bottom+c,left:i.left,width:i.width,maxHeight:f}}}function Jt({items:t,open:n,onOpenChange:r,activeOnOpen:i,listMaxHeight:a,listOffset:o,space:s}){let c=n!==void 0,[l,u]=(0,e.useState)(!1),d=c?n:l,[f,p]=(0,e.useState)(-1),[m,h]=(0,e.useState)(null),[g,_]=(0,e.useState)({}),v=(0,e.useRef)(null),y=(0,e.useRef)(null),b=(0,e.useRef)(null),x=(0,e.useRef)({buffer:``,timer:0}),S=(0,e.useRef)(void 0),C=e=>{p(e),S.current=e>=0?t[e]?.value:void 0},w=(e,t)=>{C(e?t??i:-1),c||u(e),r?.(e)},T=e=>{e>=0&&C(e)},E=()=>{let e=v.current;if(!e)return;let t=qt(e,a,o,s);_(t.vars),h(t.box)};return(0,e.useEffect)(()=>{let e=x.current;return()=>window.clearTimeout(e.timer)},[]),(0,e.useLayoutEffect)(()=>{if(!d)return;let e=S.current;if(e===void 0)return;let n=t.findIndex(t=>t.value===e);n>=0&&n!==f&&p(n)},[t,d,f]),(0,e.useLayoutEffect)(()=>{if(!d)return;E();let e=()=>E();return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[d,a,o,s]),(0,e.useLayoutEffect)(()=>{if(!d)return;let e=b.current?.querySelector(`[data-active="true"]`);e instanceof HTMLElement&&e.scrollIntoView?.({block:`nearest`})},[d,f]),(0,e.useEffect)(()=>{if(!d)return;let e=e=>{let t=e.target;t instanceof Node&&(y.current?.contains(t)||b.current?.contains(t)||(w(!1),v.current?.blur()))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[d,c,r,t,i]),{isOpen:d,activeIndex:f,box:m,listVars:g,triggerRef:v,wrapRef:y,listRef:b,typeRef:x,setOpen:w,moveActive:T,placeList:E}}function Yt(e,t){if(e.defaultPrevented||t.disabled)return;let n=e.key,{isOpen:r,items:i,activeIndex:a,showClear:o,readOnly:s,typeRef:c,placeList:l,setOpen:u,moveActive:d,openHighlightDown:f,openHighlightUp:p,onCommit:m,onClear:h,onClosedTypeahead:g,closedTypeaheadFrom:_}=t;if(!r&&(n===`ArrowDown`||n===`ArrowUp`||n===`Enter`||n===` `))e.preventDefault(),l(),n===`ArrowUp`?u(!0,p):u(!0,f);else if(!r){if((n===`Backspace`||n===`Delete`)&&o){e.preventDefault(),h();return}if(n.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!s){let e=Wt(i,n,_+1);e>=0&&i[e]&&g(i[e])}}else if(n===`Escape`)e.preventDefault(),u(!1);else if(n===`ArrowDown`)e.preventDefault(),d(Ut(i,a,1));else if(n===`ArrowUp`)e.preventDefault(),d(Ut(i,a,-1));else if(n===`Home`)e.preventDefault(),d(Vt(i));else if(n===`End`)e.preventDefault(),d(Ht(i));else if(n===`Enter`||n===` `){e.preventDefault();let t=i[a];t&&!t.disabled&&m(t)}else if(n.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.preventDefault(),window.clearTimeout(c.current.timer),c.current.buffer+=n,c.current.timer=window.setTimeout(()=>{c.current.buffer=``},400);let t=Wt(i,c.current.buffer,a);t>=0&&d(t)}}var Xt=t.styled.span`
|
|
458
|
+
position: relative;
|
|
459
|
+
display: ${({$fill:e})=>e?`block`:`inline-block`};
|
|
460
|
+
${({$fill:e})=>e?t.css`
|
|
461
|
+
width: 100%;
|
|
462
|
+
`:``}
|
|
463
|
+
min-width: 0;
|
|
464
|
+
vertical-align: top;
|
|
465
|
+
`,Zt=t.styled.button`
|
|
466
|
+
position: absolute;
|
|
467
|
+
z-index: 1;
|
|
468
|
+
top: 50%;
|
|
469
|
+
inset-inline-end: ${({$end:e})=>e};
|
|
470
|
+
box-sizing: border-box;
|
|
471
|
+
width: 1.375rem;
|
|
472
|
+
height: 1.375rem;
|
|
473
|
+
margin: 0;
|
|
474
|
+
padding: 0.1875rem;
|
|
475
|
+
transform: translateY(-50%);
|
|
476
|
+
border: 0;
|
|
477
|
+
border-radius: 50%;
|
|
478
|
+
background: transparent;
|
|
479
|
+
background-clip: content-box;
|
|
480
|
+
cursor: pointer;
|
|
481
|
+
&::before,
|
|
482
|
+
&::after {
|
|
483
|
+
content: '';
|
|
484
|
+
position: absolute;
|
|
485
|
+
top: 50%;
|
|
486
|
+
left: 50%;
|
|
487
|
+
width: 0.58em;
|
|
488
|
+
height: 0.12em;
|
|
489
|
+
background: ${({$ink:e})=>e};
|
|
490
|
+
}
|
|
491
|
+
&::before {
|
|
492
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
493
|
+
}
|
|
494
|
+
&::after {
|
|
495
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
496
|
+
}
|
|
497
|
+
&:hover {
|
|
498
|
+
background: color-mix(
|
|
499
|
+
in srgb,
|
|
500
|
+
var(${$.textHighlighted}) 16%,
|
|
501
|
+
var(${$.background})
|
|
502
|
+
);
|
|
503
|
+
background-clip: content-box;
|
|
504
|
+
&::before,
|
|
505
|
+
&::after {
|
|
506
|
+
background: ${({$hoverInk:e})=>e};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
&:disabled {
|
|
510
|
+
cursor: not-allowed;
|
|
511
|
+
opacity: 0.45;
|
|
512
|
+
}
|
|
513
|
+
`,Qt=t.styled.span`
|
|
514
|
+
min-width: 0;
|
|
515
|
+
flex: 1 1 auto;
|
|
516
|
+
overflow: hidden;
|
|
517
|
+
text-overflow: ellipsis;
|
|
518
|
+
white-space: nowrap;
|
|
519
|
+
color: ${({$ink:e})=>e};
|
|
520
|
+
-webkit-text-fill-color: ${({$ink:e})=>e};
|
|
521
|
+
`,$t=t.styled.button`
|
|
522
|
+
${xt}
|
|
523
|
+
position: relative;
|
|
524
|
+
display: ${({$fill:e})=>e?`flex`:`inline-flex`};
|
|
525
|
+
align-items: center;
|
|
526
|
+
justify-content: flex-start;
|
|
527
|
+
text-align: left;
|
|
528
|
+
cursor: pointer;
|
|
529
|
+
color: ${({$ink:e})=>e};
|
|
530
|
+
-webkit-text-fill-color: ${({$ink:e})=>e};
|
|
531
|
+
border: ${({$borderWidth:e,$borderColor:t})=>`${e} solid ${t}`};
|
|
532
|
+
background-color: ${({$bg:e})=>e};
|
|
533
|
+
padding-inline-end: calc(
|
|
534
|
+
${({$paddingX:e,$clearable:t})=>t?`${e} + 2.15em`:`${e} + 1.15em`}
|
|
535
|
+
);
|
|
536
|
+
${({$focus:e,$invalid:n})=>t.css`
|
|
537
|
+
&:focus,
|
|
538
|
+
&[aria-expanded='true'] {
|
|
539
|
+
outline: none;
|
|
540
|
+
border-color: ${e};
|
|
541
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${e} 18%, transparent);
|
|
542
|
+
}
|
|
543
|
+
&[aria-invalid='true'],
|
|
544
|
+
&[aria-invalid='true']:focus,
|
|
545
|
+
&[aria-invalid='true'][aria-expanded='true'] {
|
|
546
|
+
border-color: ${n};
|
|
547
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${n} 18%, transparent);
|
|
548
|
+
}
|
|
549
|
+
`}
|
|
550
|
+
&::after {
|
|
551
|
+
content: '';
|
|
552
|
+
position: absolute;
|
|
553
|
+
inset-inline-end: ${({$paddingX:e})=>e};
|
|
554
|
+
top: 50%;
|
|
555
|
+
width: 0.4em;
|
|
556
|
+
height: 0.4em;
|
|
557
|
+
box-sizing: border-box;
|
|
558
|
+
border-right: 0.12em solid ${({$muted:e})=>e};
|
|
559
|
+
border-bottom: 0.12em solid ${({$muted:e})=>e};
|
|
560
|
+
transform: ${({$open:e})=>e?`translateY(calc(-50% + 0.06em)) rotate(-135deg)`:`translateY(calc(-50% - 0.06em)) rotate(45deg)`};
|
|
561
|
+
pointer-events: none;
|
|
562
|
+
}
|
|
563
|
+
&:disabled {
|
|
564
|
+
cursor: not-allowed;
|
|
565
|
+
}
|
|
566
|
+
${({$customCss:e})=>e??``}
|
|
567
|
+
`,en=t.styled.ul`
|
|
568
|
+
box-sizing: border-box;
|
|
569
|
+
position: fixed;
|
|
570
|
+
z-index: ${({$zIndex:e})=>e};
|
|
571
|
+
top: ${({$top:e})=>`${e}px`};
|
|
572
|
+
left: ${({$left:e})=>`${e}px`};
|
|
573
|
+
width: ${({$width:e})=>`${e}px`};
|
|
574
|
+
max-height: ${({$maxHeight:e})=>`${e}px`};
|
|
575
|
+
margin: 0;
|
|
576
|
+
padding: 0.25rem 0;
|
|
577
|
+
overflow: auto;
|
|
578
|
+
list-style: none;
|
|
579
|
+
font-family: ${({$family:e})=>e};
|
|
580
|
+
font-size: ${({$size:e})=>e};
|
|
581
|
+
font-weight: ${({$weight:e})=>e};
|
|
582
|
+
line-height: ${({$lineHeight:e})=>e};
|
|
583
|
+
color: ${({$ink:e})=>e};
|
|
584
|
+
-webkit-text-fill-color: ${({$ink:e})=>e};
|
|
585
|
+
border: ${({$borderWidth:e})=>e} solid ${({$borderColor:e})=>e};
|
|
586
|
+
border-radius: ${({$radius:e})=>e};
|
|
587
|
+
background: ${({$bg:e})=>e};
|
|
588
|
+
box-shadow: ${({$shadow:e})=>e};
|
|
589
|
+
`,tn=t.styled.li`
|
|
590
|
+
display: flex;
|
|
591
|
+
align-items: center;
|
|
592
|
+
justify-content: flex-start;
|
|
593
|
+
gap: 0.5em;
|
|
594
|
+
padding: ${({$padY:e,$padX:t})=>`${e} ${t}`};
|
|
595
|
+
cursor: ${({$disabled:e})=>e?`not-allowed`:`pointer`};
|
|
596
|
+
opacity: ${({$disabled:e})=>e?.45:1};
|
|
597
|
+
color: ${({$selected:e,$chroma:t,$ink:n})=>e?t:n};
|
|
598
|
+
-webkit-text-fill-color: ${({$selected:e,$chroma:t,$ink:n})=>e?t:n};
|
|
599
|
+
background: ${({$active:e,$disabled:t})=>e&&!t?`color-mix(in srgb, var(${$.textHighlighted}) 18%, var(${$.background}))`:`transparent`};
|
|
600
|
+
`,nn=t.styled.span`
|
|
601
|
+
display: flex;
|
|
602
|
+
flex-shrink: 0;
|
|
603
|
+
pointer-events: none;
|
|
604
|
+
`;function rn(t){let{ref:i,color:a,size:o,weight:s,family:c,italic:l,uppercase:u,fill:d,css:f,padding:p,paddingX:m,paddingY:h,borderWidth:g,borderRadius:_,background:v,ink:y,borderColor:x,value:S,defaultValue:C,onChange:w,open:T,onOpenChange:E,options:D,placeholder:O,name:k,required:A,clearable:j,selectedAtTop:M,children:N,disabled:F,readOnly:I,id:L,onKeyDown:ee,onClick:te,onBlur:ne,...re}=t,{fontSizes:ie,fontWeights:ae,fontFamilies:oe,lineHeight:se,space:R,borderWidths:z,radii:ce,defaults:le,brand:ue,status:B,colors:de}=Q(),V=le.select,H=S!==void 0,[fe,U]=(0,e.useState)(()=>C??[]),W=H?S??[]:fe,pe=new Set(W),G=Bt(Lt(D,N),W,!!M),K=G.findIndex(e=>pe.has(e.value)),me=K>=0?K:Vt(G),{isOpen:q,activeIndex:J,box:he,listVars:ge,triggerRef:_e,wrapRef:ve,listRef:ye,typeRef:be,setOpen:Y,moveActive:xe,placeList:Se}=Jt({items:G,open:T,onOpenChange:E,activeOnOpen:me,listMaxHeight:V.listMaxHeight,listOffset:V.listOffset,space:R}),Ce=(0,e.useId)(),we=e=>{_e.current=e,typeof i==`function`?i(e):i&&(i.current=e)},X=lt(a??V.color,ue,B),Te=B.danger.base,Ee=b(o,V.size,ie),De=b(m??p,V.paddingX,R),Oe=b(h??p,V.paddingY,R),ke=b(_,V.borderRadius,ce),Ae=b(g,V.borderWidth,z),je=P(v,`background`,de,ue,B)??`var(${$.background})`,Me=P(y,`text`,de,ue,B)??`var(${$.textHighlighted})`,Ne=P(x,`border`,de,ue,B)??`var(${$.border})`,Pe=W.length===0,Fe=!!j&&!A&&!Pe&&!F&&!I,Ie=`var(${$.textMuted})`,Le=Pe?Ie:Me,Re=Pe?O??``:`${W.length} selected`,ze=b(void 0,V.optionPaddingX,R),Be=b(void 0,V.optionPaddingY,R),Ve=b(s,V.weight,ae),He=oe[c??`base`],Ue=a??V.color,Z=e=>{H||U(e),w?.(e)},We=e=>{if(!I){if(pe.has(e)){if(A&&W.length<=1)return;Z(W.filter(t=>t!==e))}else Z([...W,e])}},Ge=e=>{I||A||Pe||(Z([]),Y(!1),e&&_e.current?.blur())},Ke=e=>{ee?.(e),Yt(e,{disabled:F,readOnly:I,isOpen:q,items:G,activeIndex:J,showClear:Fe,typeRef:be,placeList:Se,setOpen:Y,moveActive:xe,openHighlightDown:me,openHighlightUp:K>=0?K:Ht(G),closedTypeaheadFrom:K,onCommit:e=>We(e.value),onClear:()=>Ge(!1),onClosedTypeahead:e=>{let t=G.findIndex(t=>t.value===e.value);Se(),Y(!0,t>=0?t:void 0)}})},qe=q&&J>=0&&G[J]?`${Ce}-${G[J].value}`:void 0;return(0,n.jsxs)(n.Fragment,{children:[k===void 0?null:Pe?(0,n.jsx)(`input`,{type:`hidden`,name:k,value:``,required:A||void 0,disabled:F||void 0}):W.map(e=>(0,n.jsx)(`input`,{type:`hidden`,name:k,value:e,disabled:F||void 0},e)),(0,n.jsxs)(Xt,{ref:ve,$fill:d,children:[(0,n.jsx)($t,{...re,ref:we,id:L,type:`button`,disabled:F,role:`combobox`,"aria-haspopup":`listbox`,"aria-autocomplete":`none`,"aria-expanded":q,"aria-controls":q?Ce:void 0,"aria-activedescendant":qe,"aria-required":A||void 0,"aria-readonly":I||void 0,$family:He,$size:Ee,$weight:Ve,$lineHeight:se,$paddingX:De,$paddingY:Oe,$borderWidth:Ae,$borderRadius:ke,$bg:je,$ink:Me,$muted:Ie,$borderColor:Ne,$focus:X,$invalid:Te,$italic:l,$uppercase:u,$fill:d,$open:q,$clearable:Fe,$customCss:f,onKeyDown:Ke,onBlur:e=>{if(ne?.(e),e.defaultPrevented)return;let t=e.relatedTarget;t instanceof Node&&(ve.current?.contains(t)||ye.current?.contains(t))||q&&Y(!1)},onClick:e=>{te?.(e),!(e.defaultPrevented||F)&&(q?(Y(!1),_e.current?.blur()):(Se(),Y(!0)))},children:(0,n.jsx)(Qt,{$ink:Le,children:Re})}),Fe?(0,n.jsx)(Zt,{type:`button`,tabIndex:-1,"aria-label":`Clear`,$end:`calc(${De} + 0.95em)`,$ink:Ie,$hoverInk:Me,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),Ge(!0)}}):null]}),q&&he&&typeof document<`u`?(0,r.createPortal)((0,n.jsx)(en,{ref:ye,id:Ce,role:`listbox`,"aria-multiselectable":!0,"aria-labelledby":L||void 0,style:ge,$top:he.top,$left:he.left,$width:he.width,$maxHeight:he.maxHeight,$zIndex:V.listZIndex,$shadow:V.listShadow,$radius:ke,$borderWidth:Ae,$borderColor:Ne,$bg:je,$ink:Me,$size:Ee,$weight:Ve,$family:He,$lineHeight:se,children:G.map((e,t)=>{let r=pe.has(e.value);return(0,n.jsxs)(tn,{id:`${Ce}-${e.value}`,role:`option`,"aria-selected":r,"aria-disabled":e.disabled||void 0,"data-active":t===J?`true`:void 0,$padX:ze,$padY:Be,$chroma:X,$ink:Me,$selected:r,$active:t===J,$disabled:!!e.disabled,onMouseEnter:()=>{e.disabled||xe(t)},onMouseDown:e=>e.preventDefault(),onClick:()=>{e.disabled||(xe(t),We(e.value))},children:[(0,n.jsx)(nn,{"aria-hidden":!0,children:(0,n.jsx)(bt,{tabIndex:-1,checked:r,disabled:e.disabled,color:Ue,size:o??V.size,onChange:()=>void 0})}),e.label]},e.value)})}),document.body):null]})}rn.displayName=`MultiSelect`;var an=t.styled.li`
|
|
605
|
+
position: relative;
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
justify-content: space-between;
|
|
609
|
+
gap: 0.75em;
|
|
610
|
+
padding: ${({$padY:e,$padX:t})=>`${e} ${t}`};
|
|
611
|
+
cursor: ${({$disabled:e})=>e?`not-allowed`:`pointer`};
|
|
612
|
+
opacity: ${({$disabled:e})=>e?.45:1};
|
|
613
|
+
color: ${({$selected:e,$chroma:t,$ink:n})=>e?t:n};
|
|
614
|
+
-webkit-text-fill-color: ${({$selected:e,$chroma:t,$ink:n})=>e?t:n};
|
|
615
|
+
background: ${({$active:e,$disabled:t})=>e&&!t?`color-mix(in srgb, var(${$.textHighlighted}) 18%, var(${$.background}))`:`transparent`};
|
|
616
|
+
${({$selected:e,$chroma:t})=>e?`
|
|
617
|
+
&::after {
|
|
618
|
+
content: '';
|
|
619
|
+
flex-shrink: 0;
|
|
620
|
+
width: 0.28em;
|
|
621
|
+
height: 0.48em;
|
|
622
|
+
box-sizing: border-box;
|
|
623
|
+
border: solid ${t};
|
|
624
|
+
border-width: 0 0.14em 0.14em 0;
|
|
625
|
+
transform: translateY(-12%) rotate(45deg);
|
|
626
|
+
}
|
|
627
|
+
`:``}
|
|
628
|
+
`;function on(t){let{ref:i,color:a,size:o,weight:s,family:c,italic:l,uppercase:u,fill:d,css:f,padding:p,paddingX:m,paddingY:h,borderWidth:g,borderRadius:_,background:v,ink:y,borderColor:x,value:S,defaultValue:C,onChange:w,open:T,onOpenChange:E,options:D,placeholder:O,name:k,required:A,clearable:j,selectedAtTop:M,emptyOption:N,children:F,disabled:I,readOnly:L,id:ee,onKeyDown:te,onClick:ne,onBlur:re,...ie}=t,{fontSizes:ae,fontWeights:oe,fontFamilies:se,lineHeight:R,space:z,borderWidths:ce,radii:le,defaults:ue,brand:B,status:de,colors:V}=Q(),H=ue.select,fe=S!==void 0,[U,W]=(0,e.useState)(C??``),pe=fe?S??``:U,G=Rt(zt(Lt(D,F),pe,!!M),N,O,A),K=G.findIndex(e=>e.value===pe),me=K>=0?K:Vt(G),{isOpen:q,activeIndex:J,box:he,listVars:ge,triggerRef:_e,wrapRef:ve,listRef:ye,typeRef:be,setOpen:Y,moveActive:xe,placeList:Se}=Jt({items:G,open:T,onOpenChange:E,activeOnOpen:me,listMaxHeight:H.listMaxHeight,listOffset:H.listOffset,space:z}),Ce=(0,e.useId)(),we=e=>{_e.current=e,typeof i==`function`?i(e):i&&(i.current=e)},X=lt(a??H.color,B,de),Te=de.danger.base,Ee=b(o,H.size,ae),De=b(m??p,H.paddingX,z),Oe=b(h??p,H.paddingY,z),ke=b(_,H.borderRadius,le),Ae=b(g,H.borderWidth,ce),je=P(v,`background`,V,B,de)??`var(${$.background})`,Me=P(y,`text`,V,B,de)??`var(${$.textHighlighted})`,Ne=P(x,`border`,V,B,de)??`var(${$.border})`,Pe=G.find(e=>e.value===pe),Fe=pe===``,Ie=!!j&&!A&&!Fe&&!I&&!L,Le=`var(${$.textMuted})`,Re=Fe?Le:Me,ze=Fe?Pe?.label||O||``:Pe?.label??pe,Be=b(void 0,H.optionPaddingX,z),Ve=b(void 0,H.optionPaddingY,z),He=b(s,H.weight,oe),Ue=se[c??`base`],Z=e=>{fe||W(e),w?.(e)},We=(e,t)=>{L?q&&(Y(!1),t&&_e.current?.blur()):!A&&pe===e?(Z(``),Y(!1),t&&_e.current?.blur()):(Z(e),Y(!1),t&&_e.current?.blur())},Ge=e=>{L||A||Fe||(Z(``),Y(!1),e&&_e.current?.blur())},Ke=e=>{te?.(e),Yt(e,{disabled:I,readOnly:L,isOpen:q,items:G,activeIndex:J,showClear:Ie,typeRef:be,placeList:Se,setOpen:Y,moveActive:xe,openHighlightDown:me,openHighlightUp:K>=0?K:Ht(G),closedTypeaheadFrom:K,onCommit:e=>We(e.value,!1),onClear:()=>Ge(!1),onClosedTypeahead:e=>We(e.value,!1)})},qe=q&&J>=0&&G[J]?`${Ce}-${G[J].value}`:void 0;return(0,n.jsxs)(n.Fragment,{children:[k===void 0?null:(0,n.jsx)(`input`,{type:`hidden`,name:k,value:pe,required:A||void 0,disabled:I||void 0}),(0,n.jsxs)(Xt,{ref:ve,$fill:d,children:[(0,n.jsx)($t,{...ie,ref:we,id:ee,type:`button`,disabled:I,role:`combobox`,"aria-haspopup":`listbox`,"aria-autocomplete":`none`,"aria-expanded":q,"aria-controls":q?Ce:void 0,"aria-activedescendant":qe,"aria-required":A||void 0,"aria-readonly":L||void 0,$family:Ue,$size:Ee,$weight:He,$lineHeight:R,$paddingX:De,$paddingY:Oe,$borderWidth:Ae,$borderRadius:ke,$bg:je,$ink:Me,$muted:Le,$borderColor:Ne,$focus:X,$invalid:Te,$italic:l,$uppercase:u,$fill:d,$open:q,$clearable:Ie,$customCss:f,onKeyDown:Ke,onBlur:e=>{if(re?.(e),e.defaultPrevented)return;let t=e.relatedTarget;t instanceof Node&&(ve.current?.contains(t)||ye.current?.contains(t))||q&&Y(!1)},onClick:e=>{ne?.(e),!(e.defaultPrevented||I)&&(q?(Y(!1),_e.current?.blur()):(Se(),Y(!0)))},children:(0,n.jsx)(Qt,{$ink:Re,children:ze})}),Ie?(0,n.jsx)(Zt,{type:`button`,tabIndex:-1,"aria-label":`Clear`,$end:`calc(${De} + 0.95em)`,$ink:Le,$hoverInk:Me,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),Ge(!0)}}):null]}),q&&he&&typeof document<`u`?(0,r.createPortal)((0,n.jsx)(en,{ref:ye,id:Ce,role:`listbox`,"aria-labelledby":ee||void 0,style:ge,$top:he.top,$left:he.left,$width:he.width,$maxHeight:he.maxHeight,$zIndex:H.listZIndex,$shadow:H.listShadow,$radius:ke,$borderWidth:Ae,$borderColor:Ne,$bg:je,$ink:Me,$size:Ee,$weight:He,$family:Ue,$lineHeight:R,children:G.map((e,t)=>(0,n.jsx)(an,{id:`${Ce}-${e.value}`,role:`option`,"aria-selected":e.value===pe,"aria-disabled":e.disabled||void 0,"data-active":t===J?`true`:void 0,$padX:Be,$padY:Ve,$chroma:X,$ink:Me,$selected:e.value===pe,$active:t===J,$disabled:!!e.disabled,onMouseEnter:()=>{e.disabled||xe(t)},onMouseDown:e=>e.preventDefault(),onClick:()=>{e.disabled||We(e.value,!0)},children:e.label},e.value))}),document.body):null]})}on.displayName=`Select`;var sn=t.styled.input`
|
|
629
|
+
appearance: none;
|
|
630
|
+
margin: 0;
|
|
631
|
+
flex-shrink: 0;
|
|
632
|
+
box-sizing: border-box;
|
|
633
|
+
position: relative;
|
|
634
|
+
display: inline-block;
|
|
635
|
+
vertical-align: middle;
|
|
636
|
+
width: ${({$width:e})=>e};
|
|
637
|
+
height: ${({$height:e})=>e};
|
|
638
|
+
font-size: ${({$size:e})=>e};
|
|
639
|
+
padding: 0;
|
|
640
|
+
border: none;
|
|
641
|
+
border-radius: ${({$radius:e})=>e};
|
|
642
|
+
background: ${({$off:e})=>e};
|
|
643
|
+
cursor: pointer;
|
|
644
|
+
transition:
|
|
645
|
+
background 120ms ease,
|
|
646
|
+
box-shadow 120ms ease;
|
|
647
|
+
&::before {
|
|
648
|
+
content: '';
|
|
649
|
+
position: absolute;
|
|
650
|
+
top: 50%;
|
|
651
|
+
left: ${({$inset:e})=>e};
|
|
652
|
+
width: ${({$thumb:e})=>e};
|
|
653
|
+
height: ${({$thumb:e})=>e};
|
|
654
|
+
margin-top: calc(${({$thumb:e})=>e} / -2);
|
|
655
|
+
border-radius: min(${({$radius:e})=>e}, 50%);
|
|
656
|
+
background: ${({$ink:e})=>e};
|
|
657
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 35%);
|
|
658
|
+
transition: left 120ms ease;
|
|
659
|
+
}
|
|
660
|
+
&:checked {
|
|
661
|
+
background: ${({$on:e})=>e};
|
|
662
|
+
}
|
|
663
|
+
&:checked:hover:not(:disabled) {
|
|
664
|
+
background: ${({$hoverOn:e})=>e};
|
|
665
|
+
}
|
|
666
|
+
&:checked:active:not(:disabled) {
|
|
667
|
+
background: ${({$activeOn:e})=>e};
|
|
668
|
+
}
|
|
669
|
+
&:checked::before {
|
|
670
|
+
left: calc(100% - ${({$inset:e,$thumb:t})=>`${e} - ${t}`});
|
|
671
|
+
}
|
|
672
|
+
&:focus-visible {
|
|
673
|
+
outline: none;
|
|
674
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, ${({$on:e})=>e} 18%, transparent);
|
|
675
|
+
}
|
|
676
|
+
&:disabled {
|
|
677
|
+
cursor: not-allowed;
|
|
678
|
+
opacity: 0.45;
|
|
679
|
+
}
|
|
680
|
+
@media (prefers-reduced-motion: reduce) {
|
|
681
|
+
transition: none;
|
|
682
|
+
&::before {
|
|
683
|
+
transition: none;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
${({$customCss:e})=>e??``}
|
|
687
|
+
`;function cn(e){let{color:t,size:r,css:i,background:a,ink:o,width:s,height:c,borderRadius:l,...u}=e,{space:d,radii:f,fontSizes:p,defaults:m,brand:h,status:g,colors:_,lineHeight:v}=Q(),y=m.switch,x=ct(t??y.color,h,g),S=P(a,`background`,_,h,g)??`color-mix(in srgb, var(${$.text}) 28%, var(${$.background}))`,C=P(o,`text`,_,h,g)??y.ink,w=b(r,y.size,p),T=c===void 0?`calc(${w} * ${v})`:b(c,w,d),E=s===void 0?`calc(${w} * ${y.widthFactor})`:b(s,w,d),D=`calc(${w} * ${y.insetFactor})`,O=`calc(${T} - 2 * ${D})`;return(0,n.jsx)(sn,{$width:E,$height:T,$size:w,$thumb:O,$inset:D,$radius:b(l,y.borderRadius,f),$off:S,$on:x.base,$hoverOn:x.hover,$activeOn:x.active,$ink:C,$customCss:i,...u,type:`checkbox`,role:`switch`})}cn.displayName=`Switch`;var ln=t.styled.textarea`
|
|
688
|
+
${xt}
|
|
689
|
+
vertical-align: top;
|
|
690
|
+
overflow: auto;
|
|
691
|
+
resize: ${({$resize:e})=>e?`vertical`:`none`};
|
|
692
|
+
&:disabled {
|
|
693
|
+
resize: none;
|
|
694
|
+
}
|
|
695
|
+
${({$customCss:e})=>e??``}
|
|
696
|
+
`;function un(e){let{color:t,size:r,weight:i,family:a,italic:o,uppercase:s,fill:c,resize:l,css:u,padding:d,paddingX:f,paddingY:p,borderWidth:m,borderRadius:h,background:g,ink:_,borderColor:v,rows:y,...x}=e,{fontSizes:S,fontWeights:C,fontFamilies:w,lineHeight:T,space:E,borderWidths:D,radii:O,defaults:k,brand:A,status:j,colors:M}=Q(),N=k.textarea;return(0,n.jsx)(ln,{rows:y??N.rows,$family:w[a??`base`],$size:b(r,N.size,S),$weight:b(i,N.weight,C),$lineHeight:T,$paddingX:b(f??d,N.paddingX,E),$paddingY:b(p??d,N.paddingY,E),$borderWidth:b(m,N.borderWidth,D),$borderRadius:b(h,N.borderRadius,O),$bg:P(g,`background`,M,A,j)??`var(${$.background})`,$ink:P(_,`text`,M,A,j)??`var(${$.text})`,$borderColor:P(v,`border`,M,A,j)??`var(${$.border})`,$focus:lt(t??N.color,A,j),$invalid:j.danger.base,$resize:l??N.resize,$italic:o,$uppercase:s,$fill:c,$customCss:u,...x})}function dn(e,n){if(n===void 0||!Number.isFinite(n)||n<1||Math.floor(n)===1)return;let r=Math.floor(n);return e===`column`?t.css`
|
|
697
|
+
grid-column: span ${r};
|
|
698
|
+
`:t.css`
|
|
699
|
+
grid-row: span ${r};
|
|
700
|
+
`}var fn=t.styled.div`
|
|
701
|
+
position: relative;
|
|
702
|
+
min-width: 0;
|
|
703
|
+
min-height: 0;
|
|
704
|
+
${({$edges:e})=>O(e)}
|
|
705
|
+
${({$size:e})=>D(e)}
|
|
706
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
707
|
+
border-style: solid;
|
|
708
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
709
|
+
border-color: ${({$borderColor:e})=>e};
|
|
710
|
+
${({$spanX:e})=>dn(`column`,e)}
|
|
711
|
+
${({$spanY:e})=>dn(`row`,e)}
|
|
712
|
+
${({$alignX:e,$alignY:t})=>ae(e,t)}
|
|
713
|
+
${({$customCss:e})=>e??``}
|
|
714
|
+
`;function pn(e){let{spacing:t,size:r,rest:i}=C(e),{spanX:a,spanY:o,alignX:s,alignY:c,css:l,borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g,borderRadius:_,borderColor:v,...y}=i,{colors:x,space:T,borderWidths:E,radii:D,defaults:O,brand:k,status:A}=Q();return(0,n.jsx)(fn,{$spanX:a,$spanY:o,$alignX:s,$alignY:c,$edges:S(t,O.cell,T),$size:w(r,T),$borderWidth:N({borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g},O.cell.borderWidth,E),$borderRadius:b(_,O.cell.borderRadius,D),$borderColor:I(v,`base`,x,k,A),$customCss:l,...y})}var mn=t.styled.div`
|
|
715
|
+
position: relative;
|
|
716
|
+
${({$edges:e})=>O(e)}
|
|
717
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
718
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
719
|
+
border-style: solid;
|
|
720
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
721
|
+
border-color: ${({$borderColor:e})=>e};
|
|
722
|
+
${({$flex:e})=>z(e,!0)}
|
|
723
|
+
${({$trackKind:e,$alignX:t,$alignY:n})=>V(e,t,n)}
|
|
724
|
+
${({$customCss:e})=>e??``}
|
|
725
|
+
`;function hn(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,alignX:s,alignY:c,css:l,borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g,borderRadius:_,borderColor:v,...y}=i,{colors:x,space:w,borderWidths:E,radii:D,defaults:O,brand:k,status:A}=Q(),j=de();return(0,n.jsx)(mn,{$flex:a,$fill:o,$edges:S(t,O.col,w),$size:T(r,w,{width:O.col.width}),$borderWidth:N({borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g},O.col.borderWidth,E),$borderRadius:b(_,O.col.borderRadius,D),$borderColor:I(v,`base`,x,k,A),$alignX:s,$alignY:c,$trackKind:j,$customCss:l,...y})}var gn=t.styled.div`
|
|
726
|
+
display: flex;
|
|
727
|
+
flex-direction: row;
|
|
728
|
+
position: relative;
|
|
729
|
+
flex-wrap: ${({$wrap:e})=>e?`wrap`:`nowrap`};
|
|
730
|
+
gap: ${({$gap:e})=>e};
|
|
731
|
+
${({$alignX:e,$alignY:t})=>se(!1,e,t)}
|
|
732
|
+
${({$edges:e})=>O(e)}
|
|
733
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
734
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
735
|
+
border-style: solid;
|
|
736
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
737
|
+
border-color: ${({$borderColor:e})=>e};
|
|
738
|
+
${({$flex:e})=>z(e)}
|
|
739
|
+
${({$stackMax:e,$stackedJustify:t})=>e?re(e,t):``}
|
|
740
|
+
${({$customCss:e})=>e??``}
|
|
741
|
+
`;function _n(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,gap:s,alignX:c,alignY:l,wrap:u,stack:d,css:f,borderWidth:p,borderX:m,borderY:h,borderTop:g,borderRight:_,borderBottom:v,borderLeft:y,borderRadius:x,borderColor:w,...E}=i,{space:D,breakpoints:O,defaults:k,colors:A,borderWidths:j,radii:M,brand:P,status:F}=Q();return(0,n.jsx)(B,{kind:`row`,children:(0,n.jsx)(gn,{$flex:a,$fill:o,$gap:b(s,k.cols.gap,D),$alignX:R(c,k.cols.alignX),$alignY:R(l,k.cols.alignY),$wrap:u,$stackMax:te(d,O),$stackedJustify:ce(l),$edges:S(t,k.cols,D),$size:T(r,D),$borderWidth:N({borderWidth:p,borderX:m,borderY:h,borderTop:g,borderRight:_,borderBottom:v,borderLeft:y},`none`,j),$borderRadius:b(x,`none`,M),$borderColor:I(w,`base`,A,P,F),$customCss:f,...E})})}var vn=t.styled.div`
|
|
742
|
+
position: relative;
|
|
743
|
+
${({$edges:e})=>O(e)}
|
|
744
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
745
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
746
|
+
border-style: solid;
|
|
747
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
748
|
+
border-color: ${({$borderColor:e})=>e};
|
|
749
|
+
${({$flex:e})=>z(e,!0)}
|
|
750
|
+
${({$trackKind:e,$alignX:t,$alignY:n})=>V(e,t,n)}
|
|
751
|
+
${({$customCss:e})=>e??``}
|
|
752
|
+
`;function yn(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,alignX:s,alignY:c,css:l,borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g,borderRadius:_,borderColor:v,...y}=i,{colors:x,space:w,borderWidths:E,radii:D,defaults:O,brand:k,status:A}=Q(),j=de();return(0,n.jsx)(vn,{$flex:a,$fill:o,$edges:S(t,O.div,w),$size:T(r,w),$borderWidth:N({borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g},O.div.borderWidth,E),$borderRadius:b(_,O.div.borderRadius,D),$borderColor:v===void 0?`var(${$.border})`:I(v,`base`,x,k,A),$alignX:s,$alignY:c,$trackKind:j,$customCss:l,...y})}function bn(e){if(!(e===void 0||!Number.isFinite(e)||e<1))return`repeat(${Math.floor(e)}, minmax(0, 1fr))`}var xn=t.styled.div`
|
|
753
|
+
display: grid;
|
|
754
|
+
position: relative;
|
|
755
|
+
gap: ${({$gap:e})=>e};
|
|
756
|
+
${({$columns:e})=>e?t.css`
|
|
757
|
+
grid-template-columns: ${e};
|
|
758
|
+
`:``}
|
|
759
|
+
${({$rows:e})=>e?t.css`
|
|
760
|
+
grid-template-rows: ${e};
|
|
761
|
+
`:``}
|
|
762
|
+
${({$alignX:e,$alignY:t})=>ie(e,t)}
|
|
763
|
+
${({$edges:e})=>O(e)}
|
|
764
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
765
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
766
|
+
border-style: solid;
|
|
767
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
768
|
+
border-color: ${({$borderColor:e})=>e};
|
|
769
|
+
${({$flex:e})=>z(e)}
|
|
770
|
+
${({$stackMax:e,$stackCols:t})=>e?ne(e,t):``}
|
|
771
|
+
${({$customCss:e})=>e??``}
|
|
772
|
+
`;function Sn(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,gap:s,alignX:c,alignY:l,numCols:u,numRows:d,stack:f,stackCols:p,css:m,borderWidth:h,borderX:g,borderY:_,borderTop:v,borderRight:y,borderBottom:x,borderLeft:w,borderRadius:E,borderColor:D,...O}=i,{space:k,breakpoints:A,defaults:j,colors:M,borderWidths:P,radii:F,brand:L,status:ee}=Q();return(0,n.jsx)(B,{kind:`grid`,children:(0,n.jsx)(xn,{$flex:a,$fill:o,$gap:b(s,j.grid.gap,k),$columns:bn(u),$rows:bn(d),$alignX:R(c,j.grid.alignX),$alignY:R(l,j.grid.alignY),$stackMax:te(f,A),$stackCols:p!==void 0&&Number.isFinite(p)&&p>=1?Math.floor(p):1,$edges:S(t,j.grid,k),$size:T(r,k),$borderWidth:N({borderWidth:h,borderX:g,borderY:_,borderTop:v,borderRight:y,borderBottom:x,borderLeft:w},`none`,P),$borderRadius:b(E,`none`,F),$borderColor:I(D,`base`,M,L,ee),$customCss:m,...O})})}function Cn(e,n,r){if(!n||r)return E(e,n);let i=e.width===void 0,a=e.height===void 0;return t.css`
|
|
773
|
+
${a?t.css`
|
|
774
|
+
top: 0;
|
|
775
|
+
bottom: 0;
|
|
776
|
+
`:``}
|
|
777
|
+
${i?t.css`
|
|
778
|
+
left: 0;
|
|
779
|
+
right: 0;
|
|
780
|
+
`:``}
|
|
781
|
+
${E(e,!1)}
|
|
782
|
+
`}var wn=t.styled.div`
|
|
783
|
+
display: flex;
|
|
784
|
+
flex-direction: ${({$horizontal:e})=>e?`row`:`column`};
|
|
785
|
+
position: ${({$relative:e})=>e?`relative`:`absolute`};
|
|
786
|
+
gap: ${({$gap:e})=>e};
|
|
787
|
+
${({$edges:e})=>O(e)}
|
|
788
|
+
${({$size:e,$fill:t,$relative:n})=>Cn(e,t,n)}
|
|
789
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
790
|
+
border-style: solid;
|
|
791
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
792
|
+
border-color: ${({$borderColor:e})=>e};
|
|
793
|
+
${({$flex:e})=>z(e)}
|
|
794
|
+
${({$horizontal:e,$alignX:t,$alignY:n})=>se(!e,t,n)}
|
|
795
|
+
${({$stackMax:e,$stackedJustify:t})=>e?re(e,t):``}
|
|
796
|
+
${({$scroll:e})=>le(e)}
|
|
797
|
+
${({$customCss:e})=>e??``}
|
|
798
|
+
`;function Tn(e){let{spacing:t,size:r,rest:i}=C(e),{horizontal:a,flex:o,fill:s,relative:c,stack:l,scroll:u,alignX:d,alignY:f,gap:p,css:m,borderWidth:h,borderX:g,borderY:_,borderTop:v,borderRight:y,borderBottom:x,borderLeft:w,borderRadius:E,borderColor:D,...O}=i,{space:k,breakpoints:A,defaults:j,colors:M,borderWidths:P,radii:F,brand:L,status:ee}=Q(),ne=oe(!a);return(0,n.jsx)(B,{kind:a?`row`:`column`,children:(0,n.jsx)(wn,{$horizontal:a,$flex:o,$fill:s,$relative:c,$gap:b(p,j.panels.gap,k),$stackMax:a?te(l,A):void 0,$stackedJustify:ce(f),$scroll:u,$alignX:R(d,ne.alignX),$alignY:R(f,ne.alignY),$edges:S(t,j.panels,k),$size:T(r,k),$borderWidth:N({borderWidth:h,borderX:g,borderY:_,borderTop:v,borderRight:y,borderBottom:x,borderLeft:w},`none`,P),$borderRadius:b(E,`none`,F),$borderColor:I(D,`base`,M,L,ee),$customCss:m,...O})})}var En=t.styled.div`
|
|
799
|
+
position: relative;
|
|
800
|
+
${({$edges:e})=>O(e)}
|
|
801
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
802
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
803
|
+
border-style: solid;
|
|
804
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
805
|
+
border-color: ${({$borderColor:e})=>e};
|
|
806
|
+
${({$flex:e})=>z(e,!0)}
|
|
807
|
+
${({$trackKind:e,$alignX:t,$alignY:n})=>V(e,t,n)}
|
|
808
|
+
${({$customCss:e})=>e??``}
|
|
809
|
+
`;function Dn(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,alignX:s,alignY:c,css:l,borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g,borderRadius:_,borderColor:v,...y}=i,{colors:x,space:w,borderWidths:E,radii:D,defaults:O,brand:k,status:A}=Q(),j=de();return(0,n.jsx)(En,{$flex:a,$fill:o,$edges:S(t,O.row,w),$size:T(r,w,{height:O.row.height}),$borderWidth:N({borderWidth:u,borderX:d,borderY:f,borderTop:p,borderRight:m,borderBottom:h,borderLeft:g},O.row.borderWidth,E),$borderRadius:b(_,O.row.borderRadius,D),$borderColor:I(v,`base`,x,k,A),$alignX:s,$alignY:c,$trackKind:j,$customCss:l,...y})}var On=t.styled.div`
|
|
810
|
+
display: flex;
|
|
811
|
+
flex-direction: column;
|
|
812
|
+
position: relative;
|
|
813
|
+
flex-wrap: ${({$wrap:e})=>e?`wrap`:`nowrap`};
|
|
814
|
+
gap: ${({$gap:e})=>e};
|
|
815
|
+
${({$alignX:e,$alignY:t})=>se(!0,e,t)}
|
|
816
|
+
${({$edges:e})=>O(e)}
|
|
817
|
+
${({$size:e,$fill:t})=>E(e,t)}
|
|
818
|
+
border-width: ${({$borderWidth:e})=>e};
|
|
819
|
+
border-style: solid;
|
|
820
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
821
|
+
border-color: ${({$borderColor:e})=>e};
|
|
822
|
+
${({$flex:e})=>z(e)}
|
|
823
|
+
${({$customCss:e})=>e??``}
|
|
824
|
+
`;function kn(e){let{spacing:t,size:r,rest:i}=C(e),{flex:a,fill:o,gap:s,alignX:c,alignY:l,wrap:u,css:d,borderWidth:f,borderX:p,borderY:m,borderTop:h,borderRight:g,borderBottom:_,borderLeft:v,borderRadius:y,borderColor:x,...w}=i,{space:E,defaults:D,colors:O,borderWidths:k,radii:A,brand:j,status:M}=Q();return(0,n.jsx)(B,{kind:`column`,children:(0,n.jsx)(On,{$flex:a,$fill:o,$gap:b(s,D.rows.gap,E),$alignX:R(c,D.rows.alignX),$alignY:R(l,D.rows.alignY),$wrap:u,$edges:S(t,D.rows,E),$size:T(r,E),$borderWidth:N({borderWidth:f,borderX:p,borderY:m,borderTop:h,borderRight:g,borderBottom:_,borderLeft:v},`none`,k),$borderRadius:b(y,`none`,A),$borderColor:I(x,`base`,O,j,M),$customCss:d,...w})})}var An={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`},jn=t.styled.h1`
|
|
825
|
+
${Et}
|
|
826
|
+
line-height: 1;
|
|
827
|
+
text-box: trim-both cap alphabetic;
|
|
828
|
+
${({$customCss:e})=>e??``}
|
|
829
|
+
`;function Mn(e){let{level:t,size:r,color:i,muted:a,highlighted:o,weight:s,family:c,italic:l,underlined:u,uppercase:d,css:f,...p}=e,{fontSizes:m,fontWeights:h,fontFamilies:g,defaults:_,brand:v,status:y}=Q(),x=g[c??_.heading.family],S=_.heading.size[t],C=r===void 0?S:b(r,S,m),w=b(s,_.heading.weight,h);return(0,n.jsx)(wt.Provider,{value:{family:x,size:C,weight:w,lineHeight:1},children:(0,n.jsx)(jn,{as:An[t],$family:x,$size:C,$color:ut(i,o,a,v,y),$weight:w,$lineHeight:1,$italic:l,$underlined:u,$uppercase:d,$customCss:f,...p})})}var Nn=t.styled.span`
|
|
830
|
+
${Et}
|
|
831
|
+
${({$customCss:e})=>e??``}
|
|
832
|
+
`;function Pn(e){let{size:t,color:r,muted:i,highlighted:a,weight:o,family:s,italic:c,underlined:l,uppercase:u,css:d,...f}=e,{fontSizes:p,fontWeights:m,fontFamilies:h,lineHeight:g,defaults:_,brand:v,status:y}=Q(),x=Tt(),S=s===void 0?x?.family??h.base:h[s],C=t===void 0?x?.size??b(void 0,_.text.size,p):b(t,_.text.size,p),w=o===void 0?x?.weight??b(void 0,_.text.weight,m):b(o,_.text.weight,m),T=x?.lineHeight??g,E=r!==void 0||a||i?ut(r,a,i,v,y):`inherit`;return(0,n.jsx)(wt.Provider,{value:{family:S,size:C,weight:w,lineHeight:T},children:(0,n.jsx)(Nn,{$family:S,$size:C,$color:E,$weight:w,$lineHeight:T,$italic:c,$underlined:l,$uppercase:u,$customCss:d,...f})})}var Fn=t.styled.p`
|
|
833
|
+
${Et}
|
|
834
|
+
${({$customCss:e})=>e??``}
|
|
835
|
+
`;function In(e){let{size:t,color:r,muted:i,highlighted:a,weight:o,family:s,italic:c,underlined:l,uppercase:u,css:d,...f}=e,{fontSizes:p,fontWeights:m,fontFamilies:h,lineHeight:g,defaults:_,brand:v,status:y}=Q(),x=h[s??`base`],S=b(t,_.text.size,p),C=b(o,_.text.weight,m);return(0,n.jsx)(wt.Provider,{value:{family:x,size:S,weight:C,lineHeight:g},children:(0,n.jsx)(Fn,{$family:x,$size:S,$color:ut(r,a,i,v,y),$weight:C,$lineHeight:g,$italic:c,$underlined:l,$uppercase:u,$customCss:d,...f})})}var Ln=t.css`
|
|
836
|
+
text-decoration: underline;
|
|
837
|
+
`,Rn=t.styled.a`
|
|
838
|
+
padding: 0;
|
|
839
|
+
border: 0;
|
|
840
|
+
background: none;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
text-decoration: none;
|
|
843
|
+
${Et}
|
|
844
|
+
&:focus-visible {
|
|
845
|
+
outline: 2px solid currentColor;
|
|
846
|
+
outline-offset: 2px;
|
|
847
|
+
}
|
|
848
|
+
&:hover {
|
|
849
|
+
color: ${({$hover:e})=>e};
|
|
850
|
+
${({$hoverUnderline:e,$underlined:t})=>e||t?Ln:``}
|
|
851
|
+
}
|
|
852
|
+
&:active {
|
|
853
|
+
color: ${({$active:e})=>e};
|
|
854
|
+
${({$hoverUnderline:e,$underlined:t})=>e||t?Ln:``}
|
|
855
|
+
}
|
|
856
|
+
${({$customCss:e})=>e??``}
|
|
857
|
+
`;function zn(e){let{size:t,color:r,muted:i,highlighted:a,weight:o,family:s,italic:c,underlined:l,uppercase:u,css:d,...f}=e,{fontSizes:p,fontWeights:m,fontFamilies:h,lineHeight:g,defaults:_,brand:v,status:y}=Q(),x=Tt(),S=r??(i||a?void 0:_.textLink.color),{hover:C,active:w}=dt(S,_.textLink.hover===`inherit`?`inherit`:st(r)?r:_.textLink.hover,v,y),T=s===void 0?x?.family??h.base:h[s],E=t===void 0?x?.size??b(void 0,_.text.size,p):b(t,_.text.size,p),D=o===void 0?x?.weight??b(void 0,_.text.weight,m):b(o,_.text.weight,m);return(0,n.jsx)(Rn,{$family:T,$size:E,$color:ut(S,a,i,v,y),$hover:C,$active:w,$weight:D,$lineHeight:x?.lineHeight??g,$italic:c,$underlined:l,$hoverUnderline:_.textLink.hoverUnderline,$uppercase:u,$customCss:d,...f})}exports.Button=ht,exports.Cell=pn,exports.Checkbox=bt,exports.Chip=_t,exports.Col=hn,exports.Cols=_n,exports.Div=yn,exports.Grid=Sn,exports.Heading=Mn,exports.Input=Ct,exports.Label=kt,exports.MultiSelect=rn,exports.NumberInput=jt,exports.Option=Pt,exports.Panel=it,exports.PanelizeProvider=nt,exports.Panels=Tn,exports.Radio=Nt,exports.Row=Dn,exports.Rows=kn,exports.Select=on,exports.Span=Pn,exports.Switch=cn,exports.Text=In,exports.TextLink=zn,exports.Textarea=un,exports.alignValues=d,exports.appCssVars=$e,exports.brandStateTokens=l,exports.brandTokens=s,exports.breakpointTokens=p,exports.colorSchemeTokens=o,exports.createPanelizeTheme=Ze,exports.defaultBorderWidths=k,exports.defaultBreakpoints=L,exports.defaultFontFamilies=ge,exports.defaultFontSizes=J,exports.defaultFontWeights=he,exports.defaultLineHeight=_e,exports.defaultRadii=A,exports.defaultSpace=v,exports.defaultTheme=X,exports.fontFamilyTokens=g,exports.fontSizeTokens=m,exports.fontWeightTokens=h,exports.grayRampTokens=fe,exports.grayTokens=H,exports.headingLevels=_,exports.palette=W,exports.panelCssVars=$,exports.panelTextRoles=a,exports.panelVariants=i,exports.scrollValues=f,exports.spaceTokens=u,exports.statusTokens=c,exports.usePanelizeTheme=Q;
|
|
858
|
+
//# sourceMappingURL=panelize.cjs.map
|