jynko-kit 1.0.0 → 1.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/dist/components/atoms/AIcon/AIcon.d.ts +5 -2
- package/dist/components/atoms/AIcon/AIcon.d.ts.map +1 -1
- package/dist/components/atoms/AIconButton/AIconButton.d.ts +4 -2
- package/dist/components/atoms/AIconButton/AIconButton.d.ts.map +1 -1
- package/dist/components/atoms/AIconLink/AIconLink.d.ts +4 -2
- package/dist/components/atoms/AIconLink/AIconLink.d.ts.map +1 -1
- package/dist/components/atoms/AInput/AInput.d.ts.map +1 -1
- package/dist/components/atoms/AInput/AInput.styles.d.ts.map +1 -1
- package/dist/components/atoms/ASearchInput/ASearchInput.d.ts.map +1 -1
- package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts.map +1 -1
- package/dist/components/atoms/ASelect/ASelect.d.ts.map +1 -1
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts +7 -0
- package/dist/components/atoms/ASelect/ASelect.styles.d.ts.map +1 -1
- package/dist/components/atoms/ATypography/ATypography.styles.d.ts.map +1 -1
- package/dist/components/molecules/MModal/MModal.d.ts.map +1 -1
- package/dist/components/organisms/OSidebar/OSidebar.d.ts.map +1 -1
- package/dist/components/organisms/OUserCamera/OUserCamera.d.ts.map +1 -1
- package/dist/index.cjs +488 -483
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +866 -2138
- package/dist/index.js.map +1 -1
- package/dist/shared/styles/componentMetrics.d.ts.map +1 -1
- package/dist/shared/styles/theme.d.ts +1 -2
- package/dist/shared/styles/theme.d.ts.map +1 -1
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("styled-components"),n=require("react/jsx-runtime"),r=require("lucide-react"),i=require("react-dom"),a=require("react-router-dom");function o(e,t){return`color-mix(in srgb, ${e} 88%, ${t})`}var s={bg:`#0f172a`,surface:`#1e293b`,background:`#edf7f6`,text:`#0f172a`,muted:`#94a3b8`,primary:`#38bdf8`,primaryHover:`#7dd3fc`,primaryText:`#0f172a`,secondary:`#334155`,secondaryHover:`#475569`,ink:`#000000`,error:`#dc2626`,success:`#16a34a`,warning:`#d97706`},c=`30px`,l={width:`3px`,offset:`2px`,colorMix:`45%`},u={regular:400,semibold:600,bold:700},d={colors:s,opacity:{disabled:.6,disabledButton:.55},radius:{sm:`6px`,md:`10px`,lg:`16px`,full:`9999px`},space:{xs:`0.25rem`,sm:`0.5rem`,md:`0.75rem`,lg:`1rem`,inset:`10px`,components:{button:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},badge:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},link:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},iconButton:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},iconLink:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`}}},font:{sans:`'Segoe UI', system-ui, -apple-system, sans-serif`,weight:u},typography:{fallback:`1rem`,h1:`2.5rem`,h2:`2rem`,h3:`1.75rem`,h4:`1.5rem`,h5:`1.25rem`,h6:`1.125rem`,small:`0.875rem`,sub:`0.75rem`,sup:`0.75rem`},avatar:{border:`2px solid ${s.ink}`,borderRadius:`50%`,fontWeight:u.semibold,sizes:{sm:{diameter:`32px`,fontSize:`12px`},md:{diameter:`40px`,fontSize:`14px`},lg:{diameter:`48px`,fontSize:`16px`}}},icon:{sizes:{sm:`1rem`,md:`1.25rem`,lg:`1.5rem`}},logo:{size:`36px`,fontSize:`1rem`,fontWeight:u.bold,whiteSpace:`nowrap`},sidebar:{width:{compact:`64px`,extended:`240px`},height:{fallback:`100vh`,dynamic:`100dvh`},border:`2px solid ${s.ink}`,borderRadius:`16px`},camera:{border:`2px solid ${s.ink}`,borderRadius:`12px`,nameBorderRadius:`4px`,nameMaxWidthOffset:`64px`,fallbackFontSize:`clamp(2rem, 8vw, 5rem)`,fallbackFontWeight:u.bold},shadow:{offsetX:`2px`,offsetY:`3px`,button:`2px 3px 0 0 ${s.ink}`,link:`2px 3px 0 0 ${s.ink}`,navLinks:`2px 3px 0 0 ${s.ink}`,section:`3px 5px 0 0 ${s.ink}`,modal:`3px 5px 0 0 ${s.ink}`,sidebar:`3px 5px 0 0 ${s.ink}`},button:{border:`2px solid ${s.ink}`,borderRadius:`8px`,focus:l,padding:`16px`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`},iconButton:{border:`2px solid ${s.ink}`,borderRadius:`8px`,focus:l},iconLink:{border:`2px solid ${s.ink}`,borderRadius:`8px`,focus:l},badge:{border:`2px solid ${s.ink}`,borderRadius:`8px`,fontSize:`14px`,textTransform:`uppercase`},link:{border:`2px solid ${s.ink}`,borderRadius:`8px`,focus:l,padding:`16px`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`},navLinks:{border:`2px solid ${s.ink}`,borderRadius:`8px`,focus:l,padding:`0`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`,itemPadding:`16px`},formControl:{border:`2px solid ${s.ink}`,borderRadius:`8px`,padding:`8px`,textareaHeight:`3rem`,dropdownBorder:`2px solid ${s.ink}`,optionListMaxHeight:`16rem`,focus:l,trailingActionPadding:`3.25rem`,fontSize:`14px`,optionTextTransform:`none`},userBadge:{focus:l,textDecoration:`none`},section:{border:`2px solid ${s.ink}`,borderRadius:`16px`,padding:c},modal:{padding:c,maxWidth:`720px`,maxHeight:`80vh`,border:`2px solid ${s.ink}`,borderRadius:`16px`,title:{fontSize:`1.25rem`,fontWeight:u.semibold},body:{fontSize:`1rem`}}};function f(e){return e?.colors?e:d}var p=t.styled.span`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
flex: 0 0 auto;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
border: ${({theme:e})=>
|
|
8
|
-
border-radius: ${({theme:e})=>
|
|
9
|
-
background: ${({theme:e})=>
|
|
10
|
-
color: ${({theme:e})=>
|
|
11
|
-
font-family: ${({theme:e})=>
|
|
12
|
-
font-weight: ${({theme:e})=>
|
|
13
|
-
width: ${({$size:e,theme:t})=>
|
|
14
|
-
height: ${({$size:e,theme:t})=>
|
|
15
|
-
font-size: ${({$size:e,theme:t})=>
|
|
7
|
+
border: ${({theme:e})=>f(e).avatar.border};
|
|
8
|
+
border-radius: ${({theme:e})=>f(e).avatar.borderRadius};
|
|
9
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
10
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
11
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
12
|
+
font-weight: ${({theme:e})=>f(e).avatar.fontWeight};
|
|
13
|
+
width: ${({$size:e,theme:t})=>f(t).avatar.sizes[e].diameter};
|
|
14
|
+
height: ${({$size:e,theme:t})=>f(t).avatar.sizes[e].diameter};
|
|
15
|
+
font-size: ${({$size:e,theme:t})=>f(t).avatar.sizes[e].fontSize};
|
|
16
16
|
|
|
17
17
|
& > img {
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 100%;
|
|
20
20
|
object-fit: cover;
|
|
21
21
|
}
|
|
22
|
-
`;function
|
|
22
|
+
`;function m({firstName:t,lastName:r,src:i,alt:a,size:o=`md`,...s}){let[c,l]=(0,e.useState)(),u=`${t} ${r}`.trim(),d=a??u,f=`${t.charAt(0)}${r.charAt(0)}`.toUpperCase(),m=!!(i&&c!==i);return(0,n.jsx)(p,{$size:o,role:m?void 0:`img`,"aria-label":m?void 0:d,...s,children:m?(0,n.jsx)(`img`,{src:i,alt:d,onError:()=>{l(i)}}):f})}var h=t.css`
|
|
23
23
|
display: grid;
|
|
24
|
-
gap: ${({theme:e})=>
|
|
24
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
25
25
|
width: 100%;
|
|
26
|
-
`,
|
|
27
|
-
padding: ${({theme:t})=>
|
|
28
|
-
`,md:
|
|
29
|
-
padding: ${({theme:t})=>
|
|
30
|
-
`,lg:
|
|
31
|
-
padding: ${({theme:t})=>
|
|
32
|
-
`}),
|
|
33
|
-
padding: ${({theme:e})
|
|
34
|
-
`,
|
|
26
|
+
`,g=e=>({sm:t.css`
|
|
27
|
+
padding: ${({theme:t})=>f(t).space.components[e].sm};
|
|
28
|
+
`,md:t.css`
|
|
29
|
+
padding: ${({theme:t})=>f(t).space.components[e].md};
|
|
30
|
+
`,lg:t.css`
|
|
31
|
+
padding: ${({theme:t})=>f(t).space.components[e].lg};
|
|
32
|
+
`}),_=t.css`
|
|
33
|
+
padding: ${({theme:e})=>f(e).formControl.padding};
|
|
34
|
+
`,v=e=>t.css`
|
|
35
35
|
&:focus-visible {
|
|
36
|
-
outline: ${({theme:t})=>`${
|
|
37
|
-
outline-offset: ${({theme:t})=>
|
|
36
|
+
outline: ${({theme:t})=>`${f(t)[e].focus.width} solid color-mix(in srgb, ${f(t).colors.primary} ${f(t)[e].focus.colorMix}, transparent)`};
|
|
37
|
+
outline-offset: ${({theme:t})=>f(t)[e].focus.offset};
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
40
|
-
background: ${({theme:e})=>
|
|
41
|
-
color: ${({theme:e})=>
|
|
42
|
-
`,info:
|
|
43
|
-
background: ${({theme:e})=>
|
|
44
|
-
color: ${({theme:e})=>
|
|
45
|
-
`,success:
|
|
46
|
-
background: ${({theme:e})=>
|
|
47
|
-
color: ${({theme:e})=>
|
|
48
|
-
`,warning:
|
|
49
|
-
background: ${({theme:e})=>
|
|
50
|
-
color: ${({theme:e})=>
|
|
51
|
-
`,error:
|
|
52
|
-
background: ${({theme:e})=>
|
|
53
|
-
color: ${({theme:e})=>
|
|
54
|
-
`},
|
|
39
|
+
`,y=g(`badge`),b={default:t.css`
|
|
40
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
41
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
42
|
+
`,info:t.css`
|
|
43
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
44
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
45
|
+
`,success:t.css`
|
|
46
|
+
background: ${({theme:e})=>f(e).colors.success};
|
|
47
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
48
|
+
`,warning:t.css`
|
|
49
|
+
background: ${({theme:e})=>f(e).colors.warning};
|
|
50
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
51
|
+
`,error:t.css`
|
|
52
|
+
background: ${({theme:e})=>f(e).colors.error};
|
|
53
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
54
|
+
`},x=t.styled.span`
|
|
55
55
|
display: inline-flex;
|
|
56
56
|
align-items: center;
|
|
57
57
|
justify-content: center;
|
|
58
|
-
gap: ${({theme:e})=>
|
|
59
|
-
border: ${({theme:e})=>
|
|
60
|
-
border-radius: ${({theme:e})=>
|
|
61
|
-
font-family: ${({theme:e})=>
|
|
62
|
-
font-size: ${({theme:e})=>
|
|
63
|
-
font-weight: ${({theme:e})=>
|
|
64
|
-
text-transform: ${({theme:e})=>
|
|
65
|
-
|
|
66
|
-
${({$size:e})=>
|
|
67
|
-
${({$variant:e})=>
|
|
68
|
-
`;function
|
|
69
|
-
background: ${({theme:e})=>
|
|
70
|
-
color: ${({theme:e})=>
|
|
58
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
59
|
+
border: ${({theme:e})=>f(e).badge.border};
|
|
60
|
+
border-radius: ${({theme:e})=>f(e).badge.borderRadius};
|
|
61
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
62
|
+
font-size: ${({theme:e})=>f(e).badge.fontSize};
|
|
63
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
64
|
+
text-transform: ${({theme:e})=>f(e).badge.textTransform};
|
|
65
|
+
|
|
66
|
+
${({$size:e})=>y[e]}
|
|
67
|
+
${({$variant:e})=>b[e]}
|
|
68
|
+
`;function S({children:e,size:t=`md`,variant:r=`default`,...i}){return(0,n.jsx)(x,{$size:t,$variant:r,...i,children:e})}var C=150;function w({disabled:t,onPointerDown:n,onPointerUp:r,onPointerCancel:i,onLostPointerCapture:a}){let[o,s]=(0,e.useState)(!1),c=(0,e.useRef)(0),l=(0,e.useRef)(null);(0,e.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]);let u=()=>{l.current&&clearTimeout(l.current)},d=()=>{if(!c.current)return;let e=performance.now()-c.current,t=Math.max(0,C-e);u(),l.current=setTimeout(()=>{s(!1),c.current=0,l.current=null},t)};return{pressed:o,pressHandlers:{onPointerDown:e=>{n?.(e),e.defaultPrevented||t||e.button!==0||(e.currentTarget.setPointerCapture(e.pointerId),u(),c.current=performance.now(),s(!0))},onPointerUp:e=>{r?.(e),d()},onPointerCancel:e=>{i?.(e),d()},onLostPointerCapture:e=>{a?.(e),d()}}}}var T=g(`button`),E={primary:t.css`
|
|
69
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
70
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
71
71
|
|
|
72
72
|
&:hover:not(:disabled) {
|
|
73
|
-
background: ${({theme:e})=>f(
|
|
73
|
+
background: ${({theme:e})=>o(f(e).colors.primary,f(e).colors.ink)};
|
|
74
74
|
}
|
|
75
|
-
`,secondary:
|
|
76
|
-
background: ${({theme:e})=>
|
|
77
|
-
color: ${({theme:e})=>
|
|
75
|
+
`,secondary:t.css`
|
|
76
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
77
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
78
78
|
|
|
79
79
|
&:hover:not(:disabled) {
|
|
80
|
-
background: ${({theme:e})=>f(
|
|
80
|
+
background: ${({theme:e})=>o(f(e).colors.secondary,f(e).colors.ink)};
|
|
81
81
|
}
|
|
82
|
-
`},
|
|
82
|
+
`},D=t.css`
|
|
83
83
|
display: inline-flex;
|
|
84
84
|
align-items: center;
|
|
85
85
|
justify-content: center;
|
|
86
|
-
gap: ${({theme:e})=>
|
|
87
|
-
font-family: ${({theme:e})=>
|
|
88
|
-
font-size: ${({theme:e})=>
|
|
89
|
-
font-weight: ${({theme:e})=>
|
|
90
|
-
text-transform: ${({theme:e})=>
|
|
86
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
87
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
88
|
+
font-size: ${({theme:e})=>f(e).button.fontSize};
|
|
89
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
90
|
+
text-transform: ${({theme:e})=>f(e).button.textTransform};
|
|
91
91
|
cursor: pointer;
|
|
92
92
|
transition:
|
|
93
93
|
background-color 0.15s ease,
|
|
@@ -95,97 +95,97 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
95
95
|
box-shadow 0.15s ease;
|
|
96
96
|
white-space: nowrap;
|
|
97
97
|
|
|
98
|
-
${
|
|
98
|
+
${v(`button`)}
|
|
99
99
|
|
|
100
100
|
&:disabled {
|
|
101
|
-
opacity: ${({theme:e})=>
|
|
101
|
+
opacity: ${({theme:e})=>f(e).opacity.disabledButton};
|
|
102
102
|
cursor: not-allowed;
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
105
|
-
border: ${({theme:e})=>
|
|
106
|
-
box-shadow: ${({theme:e})=>
|
|
104
|
+
`,O=t.css`
|
|
105
|
+
border: ${({theme:e})=>f(e).button.border};
|
|
106
|
+
box-shadow: ${({theme:e})=>f(e).shadow.button};
|
|
107
107
|
|
|
108
108
|
&:active:not(:disabled),
|
|
109
109
|
&[data-pressed='true']:not(:disabled),
|
|
110
110
|
&:disabled {
|
|
111
|
-
transform: ${({theme:e})=>`translate(${
|
|
111
|
+
transform: ${({theme:e})=>`translate(${f(e).shadow.offsetX}, ${f(e).shadow.offsetY})`};
|
|
112
112
|
box-shadow: none;
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
115
|
-
border-radius: ${({theme:e})=>
|
|
116
|
-
`,
|
|
117
|
-
padding: ${({theme:e})=>
|
|
118
|
-
`,
|
|
119
|
-
${
|
|
120
|
-
${
|
|
121
|
-
${
|
|
122
|
-
${
|
|
123
|
-
${({$variant:e})=>
|
|
124
|
-
${({$size:e})=>
|
|
125
|
-
`;function
|
|
114
|
+
`,k=t.css`
|
|
115
|
+
border-radius: ${({theme:e})=>f(e).button.borderRadius};
|
|
116
|
+
`,A=t.css`
|
|
117
|
+
padding: ${({theme:e})=>f(e).button.padding};
|
|
118
|
+
`,j=t.styled.button`
|
|
119
|
+
${D}
|
|
120
|
+
${O}
|
|
121
|
+
${k}
|
|
122
|
+
${A}
|
|
123
|
+
${({$variant:e})=>E[e]}
|
|
124
|
+
${({$size:e})=>T[e]}
|
|
125
|
+
`;function M({children:e,variant:t=`primary`,size:r=`md`,type:i=`button`,disabled:a,onPointerDown:o,onPointerUp:s,onPointerCancel:c,onLostPointerCapture:l,...u}){let{pressed:d,pressHandlers:f}=w({disabled:a,onPointerDown:o,onPointerUp:s,onPointerCancel:c,onLostPointerCapture:l});return(0,n.jsx)(j,{$size:r,$variant:t,type:i,disabled:a,"data-pressed":d?`true`:void 0,...u,...f,children:e})}var N={default:e=>f(e).colors.text,error:e=>f(e).colors.error,success:e=>f(e).colors.success,warning:e=>f(e).colors.warning},P=t.styled.span`
|
|
126
126
|
display: inline-flex;
|
|
127
|
-
width: ${({$size:e,theme:t})=>
|
|
128
|
-
height: ${({$size:e,theme:t})=>
|
|
127
|
+
width: ${({$size:e,theme:t})=>f(t).icon.sizes[e]};
|
|
128
|
+
height: ${({$size:e,theme:t})=>f(t).icon.sizes[e]};
|
|
129
129
|
flex: 0 0 auto;
|
|
130
130
|
align-items: center;
|
|
131
131
|
justify-content: center;
|
|
132
|
-
color: ${({$type:e,theme:t})=>
|
|
132
|
+
color: ${({$type:e,theme:t})=>N[e](t)};
|
|
133
133
|
|
|
134
134
|
& > svg {
|
|
135
135
|
display: block;
|
|
136
136
|
width: 100%;
|
|
137
137
|
height: 100%;
|
|
138
138
|
}
|
|
139
|
-
`;function F({
|
|
140
|
-
background: ${({theme:e})=>
|
|
141
|
-
color: ${({theme:e})=>
|
|
139
|
+
`;function F({icon:e,children:t,size:r=`md`,type:i=`default`,title:a,"aria-label":o,...s}){let c=a??o;return(0,n.jsx)(P,{$size:r,$type:i,"aria-hidden":!c||void 0,"aria-label":c,role:c?`img`:void 0,title:a,...s,children:e?(0,n.jsx)(e,{"aria-hidden":!0,focusable:!1}):t})}var I=g(`iconButton`),L={primary:t.css`
|
|
140
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
141
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
142
142
|
|
|
143
143
|
&:hover:not(:disabled) {
|
|
144
|
-
background: ${({theme:e})=>f(
|
|
144
|
+
background: ${({theme:e})=>o(f(e).colors.primary,f(e).colors.ink)};
|
|
145
145
|
}
|
|
146
|
-
`,secondary:
|
|
147
|
-
background: ${({theme:e})=>
|
|
148
|
-
color: ${({theme:e})=>
|
|
146
|
+
`,secondary:t.css`
|
|
147
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
148
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
149
149
|
|
|
150
150
|
&:hover:not(:disabled) {
|
|
151
|
-
background: ${({theme:e})=>f(
|
|
151
|
+
background: ${({theme:e})=>o(f(e).colors.secondary,f(e).colors.ink)};
|
|
152
152
|
}
|
|
153
|
-
`},
|
|
153
|
+
`},R=t.css`
|
|
154
154
|
display: inline-flex;
|
|
155
155
|
align-items: center;
|
|
156
156
|
justify-content: center;
|
|
157
|
-
gap: ${({theme:e})=>
|
|
158
|
-
font-family: ${({theme:e})=>
|
|
159
|
-
font-size: ${({theme:e})=>
|
|
160
|
-
font-weight: ${({theme:e})=>
|
|
161
|
-
text-transform: ${({theme:e})=>
|
|
157
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
158
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
159
|
+
font-size: ${({theme:e})=>f(e).button.fontSize};
|
|
160
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
161
|
+
text-transform: ${({theme:e})=>f(e).button.textTransform};
|
|
162
162
|
cursor: pointer;
|
|
163
163
|
transition:
|
|
164
164
|
background-color 0.15s ease,
|
|
165
165
|
transform 0.15s ease,
|
|
166
166
|
box-shadow 0.15s ease;
|
|
167
167
|
|
|
168
|
-
${
|
|
168
|
+
${v(`iconButton`)}
|
|
169
169
|
|
|
170
170
|
&:disabled {
|
|
171
|
-
opacity: ${({theme:e})=>
|
|
171
|
+
opacity: ${({theme:e})=>f(e).opacity.disabledButton};
|
|
172
172
|
cursor: not-allowed;
|
|
173
173
|
}
|
|
174
|
-
`,
|
|
175
|
-
border: ${({theme:e})=>
|
|
176
|
-
box-shadow: ${({theme:e})=>
|
|
174
|
+
`,z=t.css`
|
|
175
|
+
border: ${({theme:e})=>f(e).iconButton.border};
|
|
176
|
+
box-shadow: ${({theme:e})=>f(e).shadow.button};
|
|
177
177
|
|
|
178
178
|
&:active:not(:disabled),
|
|
179
179
|
&[data-pressed='true']:not(:disabled),
|
|
180
180
|
&:disabled {
|
|
181
|
-
transform: ${({theme:e})=>`translate(${
|
|
181
|
+
transform: ${({theme:e})=>`translate(${f(e).shadow.offsetX}, ${f(e).shadow.offsetY})`};
|
|
182
182
|
box-shadow: none;
|
|
183
183
|
}
|
|
184
|
-
`,
|
|
185
|
-
border-radius: ${({theme:e})=>
|
|
186
|
-
`,rounded:
|
|
187
|
-
border-radius: ${({theme:e})=>
|
|
188
|
-
`},
|
|
184
|
+
`,B={square:t.css`
|
|
185
|
+
border-radius: ${({theme:e})=>f(e).iconButton.borderRadius};
|
|
186
|
+
`,rounded:t.css`
|
|
187
|
+
border-radius: ${({theme:e})=>f(e).radius.full};
|
|
188
|
+
`},ee=t.css`
|
|
189
189
|
background: transparent;
|
|
190
190
|
border: none;
|
|
191
191
|
box-shadow: none;
|
|
@@ -196,61 +196,61 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
196
196
|
transform: none;
|
|
197
197
|
box-shadow: none;
|
|
198
198
|
}
|
|
199
|
-
`;function
|
|
200
|
-
color: ${({theme:e})=>
|
|
199
|
+
`;function V(e,t){return`color-mix(in srgb, ${e} ${t}, transparent)`}var te={primary:t.css`
|
|
200
|
+
color: ${({theme:e})=>f(e).colors.primary};
|
|
201
201
|
|
|
202
202
|
&:hover:not(:disabled) {
|
|
203
|
-
background: ${({theme:e})=>
|
|
203
|
+
background: ${({theme:e})=>V(f(e).colors.primary,`18%`)};
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
&:active:not(:disabled),
|
|
207
207
|
&[data-pressed='true']:not(:disabled) {
|
|
208
|
-
background: ${({theme:e})=>
|
|
208
|
+
background: ${({theme:e})=>o(V(f(e).colors.primary,`18%`),f(e).colors.ink)};
|
|
209
209
|
}
|
|
210
|
-
`,secondary:
|
|
211
|
-
color: ${({theme:e})=>
|
|
210
|
+
`,secondary:t.css`
|
|
211
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
212
212
|
|
|
213
213
|
&:hover:not(:disabled) {
|
|
214
|
-
background: ${({theme:e})=>
|
|
214
|
+
background: ${({theme:e})=>V(f(e).colors.text,`12%`)};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
&:active:not(:disabled),
|
|
218
218
|
&[data-pressed='true']:not(:disabled) {
|
|
219
|
-
background: ${({theme:e})=>
|
|
219
|
+
background: ${({theme:e})=>o(V(f(e).colors.text,`12%`),f(e).colors.ink)};
|
|
220
220
|
}
|
|
221
|
-
`},
|
|
222
|
-
${
|
|
221
|
+
`},H=t.styled.button`
|
|
222
|
+
${R}
|
|
223
223
|
padding: 0;
|
|
224
224
|
flex-shrink: 0;
|
|
225
225
|
|
|
226
|
-
${({$size:e})=>
|
|
227
|
-
${({$shape:e})=>
|
|
228
|
-
${({$ghost:e,$variant:
|
|
229
|
-
${
|
|
230
|
-
${
|
|
231
|
-
`:
|
|
232
|
-
${
|
|
233
|
-
${
|
|
226
|
+
${({$size:e})=>I[e]}
|
|
227
|
+
${({$shape:e})=>B[e]}
|
|
228
|
+
${({$ghost:e,$variant:n})=>e?t.css`
|
|
229
|
+
${ee}
|
|
230
|
+
${te[n]}
|
|
231
|
+
`:t.css`
|
|
232
|
+
${z}
|
|
233
|
+
${L[n]}
|
|
234
234
|
`}
|
|
235
|
-
`;function
|
|
236
|
-
background: ${({theme:e})=>
|
|
237
|
-
color: ${({theme:e})=>
|
|
235
|
+
`;function U({children:e,icon:t,variant:r=`primary`,size:i=`md`,shape:a=`square`,ghost:o=!1,type:s=`button`,disabled:c,ref:l,onPointerDown:u,onPointerUp:d,onPointerCancel:f,onLostPointerCapture:p,...m}){let{pressed:h,pressHandlers:g}=w({disabled:c,onPointerDown:u,onPointerUp:d,onPointerCancel:f,onLostPointerCapture:p});return(0,n.jsx)(H,{$ghost:o,$shape:a,$size:i,$variant:r,type:s,disabled:c,"data-pressed":h?`true`:void 0,ref:l,...m,...g,children:(0,n.jsx)(F,{icon:t,size:i,style:{color:`inherit`},children:e})})}var ne=g(`iconLink`),re={primary:t.css`
|
|
236
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
237
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
238
238
|
|
|
239
239
|
&:hover {
|
|
240
|
-
background: ${({theme:e})=>f(
|
|
240
|
+
background: ${({theme:e})=>o(f(e).colors.primary,f(e).colors.ink)};
|
|
241
241
|
}
|
|
242
|
-
`,secondary:
|
|
243
|
-
background: ${({theme:e})=>
|
|
244
|
-
color: ${({theme:e})=>
|
|
242
|
+
`,secondary:t.css`
|
|
243
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
244
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
245
245
|
|
|
246
246
|
&:hover {
|
|
247
|
-
background: ${({theme:e})=>f(
|
|
247
|
+
background: ${({theme:e})=>o(f(e).colors.secondary,f(e).colors.ink)};
|
|
248
248
|
}
|
|
249
|
-
`},
|
|
250
|
-
border-radius: ${({theme:e})=>
|
|
251
|
-
`,rounded:
|
|
252
|
-
border-radius: ${({theme:e})=>
|
|
253
|
-
`},
|
|
249
|
+
`},ie={square:t.css`
|
|
250
|
+
border-radius: ${({theme:e})=>f(e).iconLink.borderRadius};
|
|
251
|
+
`,rounded:t.css`
|
|
252
|
+
border-radius: ${({theme:e})=>f(e).radius.full};
|
|
253
|
+
`},ae=t.css`
|
|
254
254
|
background: transparent;
|
|
255
255
|
border: none;
|
|
256
256
|
box-shadow: none;
|
|
@@ -261,180 +261,179 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
261
261
|
transform: none;
|
|
262
262
|
box-shadow: none;
|
|
263
263
|
}
|
|
264
|
-
`;function
|
|
265
|
-
color: ${({theme:e})=>
|
|
264
|
+
`;function W(e,t){return`color-mix(in srgb, ${e} ${t}, transparent)`}var oe={primary:t.css`
|
|
265
|
+
color: ${({theme:e})=>f(e).colors.primary};
|
|
266
266
|
|
|
267
267
|
&:hover {
|
|
268
|
-
background: ${({theme:e})=>
|
|
268
|
+
background: ${({theme:e})=>W(f(e).colors.primary,`18%`)};
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
&:active,
|
|
272
272
|
&[data-pressed='true'] {
|
|
273
|
-
background: ${({theme:e})=>
|
|
273
|
+
background: ${({theme:e})=>o(W(f(e).colors.primary,`18%`),f(e).colors.ink)};
|
|
274
274
|
}
|
|
275
|
-
`,secondary:
|
|
276
|
-
color: ${({theme:e})=>
|
|
275
|
+
`,secondary:t.css`
|
|
276
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
277
277
|
|
|
278
278
|
&:hover {
|
|
279
|
-
background: ${({theme:e})=>
|
|
279
|
+
background: ${({theme:e})=>W(f(e).colors.text,`12%`)};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
&:active,
|
|
283
283
|
&[data-pressed='true'] {
|
|
284
|
-
background: ${({theme:e})=>
|
|
284
|
+
background: ${({theme:e})=>o(W(f(e).colors.text,`12%`),f(e).colors.ink)};
|
|
285
285
|
}
|
|
286
|
-
`},
|
|
286
|
+
`},se=t.styled.a`
|
|
287
287
|
display: inline-flex;
|
|
288
288
|
align-items: center;
|
|
289
289
|
justify-content: center;
|
|
290
|
-
gap: ${({theme:e})=>
|
|
291
|
-
font-family: ${({theme:e})=>
|
|
292
|
-
font-size: ${({theme:e})=>
|
|
293
|
-
font-weight: ${({theme:e})=>
|
|
294
|
-
text-transform: ${({theme:e})=>
|
|
295
|
-
text-decoration: ${({theme:e})=>
|
|
290
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
291
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
292
|
+
font-size: ${({theme:e})=>f(e).button.fontSize};
|
|
293
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
294
|
+
text-transform: ${({theme:e})=>f(e).button.textTransform};
|
|
295
|
+
text-decoration: ${({theme:e})=>f(e).button.textDecoration};
|
|
296
296
|
cursor: pointer;
|
|
297
297
|
transition:
|
|
298
298
|
background-color 0.15s ease,
|
|
299
299
|
transform 0.15s ease,
|
|
300
300
|
box-shadow 0.15s ease;
|
|
301
301
|
|
|
302
|
-
${
|
|
302
|
+
${v(`iconLink`)}
|
|
303
303
|
|
|
304
|
-
border: ${({theme:e})=>
|
|
305
|
-
box-shadow: ${({theme:e})=>
|
|
304
|
+
border: ${({theme:e})=>f(e).iconLink.border};
|
|
305
|
+
box-shadow: ${({theme:e})=>f(e).shadow.button};
|
|
306
306
|
|
|
307
307
|
&:active,
|
|
308
308
|
&[data-pressed='true'] {
|
|
309
|
-
transform: ${({theme:e})=>`translate(${
|
|
309
|
+
transform: ${({theme:e})=>`translate(${f(e).shadow.offsetX}, ${f(e).shadow.offsetY})`};
|
|
310
310
|
box-shadow: none;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
${({$size:e})=>
|
|
314
|
-
${({$shape:e})=>
|
|
315
|
-
${({$ghost:e,$variant:
|
|
316
|
-
${
|
|
317
|
-
${
|
|
318
|
-
`:
|
|
319
|
-
`;function
|
|
320
|
-
color: ${({theme:e})=>
|
|
321
|
-
font-size: ${({theme:e})=>
|
|
322
|
-
font-weight: ${({theme:e})=>
|
|
323
|
-
`,
|
|
313
|
+
${({$size:e})=>ne[e]}
|
|
314
|
+
${({$shape:e})=>ie[e]}
|
|
315
|
+
${({$ghost:e,$variant:n})=>e?t.css`
|
|
316
|
+
${ae}
|
|
317
|
+
${oe[n]}
|
|
318
|
+
`:re[n]}
|
|
319
|
+
`;function G({children:e,icon:t,variant:r=`primary`,size:i=`md`,shape:a=`square`,ghost:o=!1,onPointerDown:s,onPointerUp:c,onPointerCancel:l,onLostPointerCapture:u,...d}){let{pressed:f,pressHandlers:p}=w({onPointerDown:s,onPointerUp:c,onPointerCancel:l,onLostPointerCapture:u});return(0,n.jsx)(se,{$ghost:o,$shape:a,$size:i,$variant:r,"data-pressed":f?`true`:void 0,...d,...p,children:(0,n.jsx)(F,{icon:t,size:i,style:{color:`inherit`},children:e})})}var K=t.css`
|
|
320
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
321
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
322
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
323
|
+
`,ce=t.css`
|
|
324
324
|
box-sizing: border-box;
|
|
325
325
|
width: 100%;
|
|
326
|
-
|
|
327
|
-
border: ${({theme:e})=>
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
color: ${({theme:e})=>v(e).colors.text};
|
|
326
|
+
border: ${({theme:e})=>f(e).formControl.border};
|
|
327
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
328
|
+
padding: ${({theme:e,$hasTrailingAction:t})=>t?`${f(e).formControl.padding} ${f(e).formControl.trailingActionPadding} ${f(e).formControl.padding} ${f(e).formControl.padding}`:f(e).formControl.padding};
|
|
329
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
330
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
332
331
|
font: inherit;
|
|
333
|
-
font-size: ${({theme:e})=>
|
|
332
|
+
font-size: ${({theme:e})=>f(e).formControl.fontSize};
|
|
334
333
|
|
|
335
|
-
${
|
|
334
|
+
${v(`formControl`)}
|
|
336
335
|
|
|
337
336
|
&:disabled {
|
|
338
337
|
cursor: not-allowed;
|
|
339
|
-
opacity: ${({theme:e})=>
|
|
338
|
+
opacity: ${({theme:e})=>f(e).opacity.disabled};
|
|
340
339
|
}
|
|
341
340
|
|
|
342
|
-
${({$invalid:e,theme:
|
|
343
|
-
border-color: ${
|
|
341
|
+
${({$invalid:e,theme:n})=>e&&t.css`
|
|
342
|
+
border-color: ${f(n).colors.error};
|
|
344
343
|
`}
|
|
345
344
|
|
|
346
|
-
${({$invalid:e,$warning:
|
|
347
|
-
border-color: ${
|
|
345
|
+
${({$invalid:e,$warning:n,theme:r})=>!e&&n&&t.css`
|
|
346
|
+
border-color: ${f(r).colors.warning};
|
|
348
347
|
`}
|
|
349
|
-
`,
|
|
350
|
-
color: ${({theme:e,$type:t})=>
|
|
351
|
-
font-size: ${({theme:e})=>
|
|
352
|
-
`,
|
|
353
|
-
${
|
|
354
|
-
`,
|
|
355
|
-
${
|
|
356
|
-
`,
|
|
348
|
+
`,le=t.css`
|
|
349
|
+
color: ${({theme:e,$type:t})=>f(e).colors[t]};
|
|
350
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
351
|
+
`,ue=t.styled.div`
|
|
352
|
+
${h}
|
|
353
|
+
`,de=t.styled.label`
|
|
354
|
+
${K}
|
|
355
|
+
`,fe=t.styled.div`
|
|
357
356
|
position: relative;
|
|
358
|
-
`,
|
|
359
|
-
${
|
|
357
|
+
`,pe=t.styled.input`
|
|
358
|
+
${ce}
|
|
360
359
|
|
|
361
360
|
&:focus,
|
|
362
361
|
&:focus-visible {
|
|
363
|
-
${({$invalid:e,$warning:
|
|
364
|
-
border-color: ${
|
|
365
|
-
`:t
|
|
366
|
-
border-color: ${
|
|
362
|
+
${({$invalid:e,$warning:n,theme:r})=>e?t.css`
|
|
363
|
+
border-color: ${f(r).colors.error};
|
|
364
|
+
`:n?t.css`
|
|
365
|
+
border-color: ${f(r).colors.warning};
|
|
367
366
|
`:``}
|
|
368
367
|
/* TODO: This prevents the outline from appearing when navigating with the Tab key */
|
|
369
368
|
outline: none;
|
|
370
369
|
}
|
|
371
|
-
`,
|
|
370
|
+
`,me=(0,t.styled)(U)`
|
|
372
371
|
position: absolute;
|
|
373
372
|
top: 50%;
|
|
374
|
-
right: ${({theme:e})=>
|
|
373
|
+
right: ${({theme:e})=>f(e).space.md};
|
|
375
374
|
translate: 0 -50%;
|
|
376
|
-
`,
|
|
377
|
-
${
|
|
378
|
-
`;function
|
|
379
|
-
background: ${({theme:e})=>
|
|
380
|
-
color: ${({theme:e})=>
|
|
375
|
+
`,q=t.styled.div`
|
|
376
|
+
${le}
|
|
377
|
+
`;function he({type:t=`text`,id:i,label:a,error:o,warning:s,disabled:c,ref:l,"aria-describedby":u,"aria-invalid":d,...f}){let p=(0,e.useId)(),m=i??p,h=`${m}-error`,g=`${m}-warning`,[_,v]=(0,e.useState)(!1),y=!!o||d===!0||d===`true`,b=[u,o?h:void 0,s?g:void 0].filter(Boolean).join(` `)||void 0;return(0,n.jsxs)(ue,{children:[a?(0,n.jsx)(de,{htmlFor:m,children:a}):null,(0,n.jsxs)(fe,{children:[(0,n.jsx)(pe,{...f,$hasTrailingAction:t===`password`,$invalid:y,$warning:!!s,"aria-describedby":b,"aria-invalid":y||void 0,disabled:c,id:m,ref:l,type:t===`password`&&_?`text`:t}),t===`password`?(0,n.jsx)(me,{"aria-label":_?`Hide password`:`Show password`,"aria-pressed":_,disabled:c,ghost:!0,onClick:()=>{v(e=>!e)},shape:`rounded`,size:`sm`,type:`button`,variant:`primary`,icon:_?r.EyeOff:r.Eye}):null]}),o?(0,n.jsx)(q,{$type:`error`,id:h,role:`alert`,children:o}):null,s?(0,n.jsx)(q,{$type:`warning`,id:g,role:`status`,children:s}):null]})}var ge=g(`link`),_e={primary:t.css`
|
|
378
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
379
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
381
380
|
|
|
382
381
|
&:hover:not(:disabled) {
|
|
383
|
-
background: ${({theme:e})=>f(
|
|
382
|
+
background: ${({theme:e})=>o(f(e).colors.primary,f(e).colors.ink)};
|
|
384
383
|
}
|
|
385
|
-
`,secondary:
|
|
386
|
-
background: ${({theme:e})=>
|
|
387
|
-
color: ${({theme:e})=>
|
|
384
|
+
`,secondary:t.css`
|
|
385
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
386
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
388
387
|
|
|
389
388
|
&:hover:not(:disabled) {
|
|
390
|
-
background: ${({theme:e})=>f(
|
|
389
|
+
background: ${({theme:e})=>o(f(e).colors.secondary,f(e).colors.ink)};
|
|
391
390
|
}
|
|
392
|
-
`},
|
|
391
|
+
`},ve=t.styled.a`
|
|
393
392
|
display: inline-flex;
|
|
394
393
|
align-items: center;
|
|
395
394
|
justify-content: center;
|
|
396
|
-
gap: ${({theme:e})=>
|
|
397
|
-
font-family: ${({theme:e})=>
|
|
398
|
-
font-size: ${({theme:e})=>
|
|
399
|
-
font-weight: ${({theme:e})=>
|
|
400
|
-
text-transform: ${({theme:e})=>
|
|
401
|
-
text-decoration: ${({theme:e})=>
|
|
395
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
396
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
397
|
+
font-size: ${({theme:e})=>f(e).link.fontSize};
|
|
398
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
399
|
+
text-transform: ${({theme:e})=>f(e).link.textTransform};
|
|
400
|
+
text-decoration: ${({theme:e})=>f(e).link.textDecoration};
|
|
402
401
|
cursor: pointer;
|
|
403
402
|
transition:
|
|
404
403
|
background-color 0.15s ease,
|
|
405
404
|
transform 0.15s ease,
|
|
406
405
|
box-shadow 0.15s ease;
|
|
407
406
|
|
|
408
|
-
${
|
|
407
|
+
${v(`link`)}
|
|
409
408
|
|
|
410
|
-
border: ${({theme:e})=>
|
|
411
|
-
box-shadow: ${({theme:e})=>
|
|
412
|
-
border-radius: ${({theme:e})=>
|
|
413
|
-
padding: ${({theme:e})=>
|
|
409
|
+
border: ${({theme:e})=>f(e).link.border};
|
|
410
|
+
box-shadow: ${({theme:e})=>f(e).shadow.link};
|
|
411
|
+
border-radius: ${({theme:e})=>f(e).link.borderRadius};
|
|
412
|
+
padding: ${({theme:e})=>f(e).link.padding};
|
|
414
413
|
|
|
415
414
|
white-space: nowrap;
|
|
416
415
|
|
|
417
416
|
&:active,
|
|
418
417
|
&[data-pressed='true'] {
|
|
419
|
-
transform: ${({theme:e})=>`translate(${
|
|
418
|
+
transform: ${({theme:e})=>`translate(${f(e).shadow.offsetX}, ${f(e).shadow.offsetY})`};
|
|
420
419
|
box-shadow: none;
|
|
421
420
|
}
|
|
422
421
|
|
|
423
|
-
${({$variant:e})=>
|
|
424
|
-
${({$size:e})=>
|
|
425
|
-
`;function
|
|
426
|
-
--logo-size: ${({theme:e})=>
|
|
422
|
+
${({$variant:e})=>_e[e]}
|
|
423
|
+
${({$size:e})=>ge[e]}
|
|
424
|
+
`;function J({children:e,variant:t=`primary`,size:r=`md`,onPointerDown:i,onPointerUp:a,onPointerCancel:o,onLostPointerCapture:s,...c}){let{pressed:l,pressHandlers:u}=w({onPointerDown:i,onPointerUp:a,onPointerCancel:o,onLostPointerCapture:s});return(0,n.jsx)(ve,{$size:r,$variant:t,"data-pressed":l?`true`:void 0,...c,...u,children:e})}var ye=t.styled.div`
|
|
425
|
+
--logo-size: ${({theme:e})=>f(e).logo.size};
|
|
427
426
|
|
|
428
427
|
display: inline-flex;
|
|
429
428
|
align-items: center;
|
|
430
429
|
justify-content: center;
|
|
431
|
-
gap: ${({theme:e})=>
|
|
430
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
432
431
|
min-width: 0;
|
|
433
|
-
color: ${({theme:e})=>
|
|
434
|
-
font-family: ${({theme:e})=>
|
|
435
|
-
font-size: ${({theme:e})=>
|
|
436
|
-
font-weight: ${({theme:e})=>
|
|
437
|
-
white-space: ${({theme:e})=>
|
|
432
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
433
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
434
|
+
font-size: ${({theme:e})=>f(e).logo.fontSize};
|
|
435
|
+
font-weight: ${({theme:e})=>f(e).logo.fontWeight};
|
|
436
|
+
white-space: ${({theme:e})=>f(e).logo.whiteSpace};
|
|
438
437
|
|
|
439
438
|
& > span:first-child > svg,
|
|
440
439
|
& > span:first-child img {
|
|
@@ -445,149 +444,156 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
445
444
|
object-fit: contain;
|
|
446
445
|
}
|
|
447
446
|
|
|
448
|
-
${({$variant:e,theme:
|
|
449
|
-
width: ${
|
|
450
|
-
height: ${
|
|
447
|
+
${({$variant:e,theme:n})=>e===`icon`&&t.css`
|
|
448
|
+
width: ${f(n).logo.size};
|
|
449
|
+
height: ${f(n).logo.size};
|
|
451
450
|
`}
|
|
452
|
-
`,
|
|
451
|
+
`,be=t.styled.span`
|
|
453
452
|
overflow: hidden;
|
|
454
453
|
text-overflow: ellipsis;
|
|
455
|
-
`;function
|
|
454
|
+
`;function xe({logo:e,name:t,variant:r=`full`,...i}){return(0,n.jsxs)(ye,{...i,$variant:r,role:r===`icon`?`img`:void 0,"aria-label":r===`icon`?t:i[`aria-label`],children:[(0,n.jsx)(`span`,{"aria-hidden":`true`,children:e}),r===`full`?(0,n.jsx)(be,{children:t}):null]})}var Se=t.css`
|
|
456
455
|
box-sizing: border-box;
|
|
457
456
|
width: 100%;
|
|
458
|
-
|
|
459
|
-
border: ${({theme:e})=>
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
color: ${({theme:e})=>v(e).colors.text};
|
|
457
|
+
border: ${({theme:e})=>f(e).formControl.border};
|
|
458
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
459
|
+
padding: ${({theme:e})=>f(e).formControl.padding};
|
|
460
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
461
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
464
462
|
font: inherit;
|
|
465
|
-
font-size: ${({theme:e})=>
|
|
466
|
-
`,
|
|
467
|
-
${
|
|
468
|
-
`,
|
|
463
|
+
font-size: ${({theme:e})=>f(e).formControl.fontSize};
|
|
464
|
+
`,Ce=t.styled.div`
|
|
465
|
+
${h}
|
|
466
|
+
`,we=t.styled.div`
|
|
469
467
|
position: relative;
|
|
470
|
-
`,
|
|
471
|
-
${
|
|
472
|
-
padding-right: ${({theme:e})=>
|
|
468
|
+
`,Te=t.styled.input`
|
|
469
|
+
${Se}
|
|
470
|
+
padding-right: ${({theme:e})=>f(e).formControl.trailingActionPadding};
|
|
473
471
|
|
|
474
472
|
/* TODO: Outline styles should be implemented for each form ui elements */
|
|
475
473
|
|
|
476
474
|
&:disabled {
|
|
477
475
|
cursor: not-allowed;
|
|
478
|
-
opacity: ${({theme:e})=>
|
|
476
|
+
opacity: ${({theme:e})=>f(e).opacity.disabled};
|
|
479
477
|
}
|
|
480
|
-
`,
|
|
478
|
+
`,Ee=(0,t.styled)(U)`
|
|
481
479
|
position: absolute;
|
|
482
480
|
top: 50%;
|
|
483
|
-
right: ${({theme:e})=>
|
|
481
|
+
right: ${({theme:e})=>f(e).space.md};
|
|
484
482
|
translate: 0 -50%;
|
|
485
|
-
`,
|
|
483
|
+
`,De=t.styled.ul`
|
|
486
484
|
position: absolute;
|
|
487
485
|
z-index: 10;
|
|
488
486
|
top: 100%;
|
|
489
487
|
right: 0;
|
|
490
488
|
left: 0;
|
|
491
|
-
max-height: ${({theme:e})=>
|
|
489
|
+
max-height: ${({theme:e})=>f(e).formControl.optionListMaxHeight};
|
|
492
490
|
margin: 0;
|
|
493
491
|
padding: 0;
|
|
494
492
|
overflow: auto;
|
|
495
|
-
border: ${({theme:e})=>
|
|
496
|
-
border-radius: ${({theme:e})=>
|
|
497
|
-
background: ${({theme:e})=>
|
|
493
|
+
border: ${({theme:e})=>f(e).formControl.dropdownBorder};
|
|
494
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
495
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
498
496
|
list-style: none;
|
|
499
|
-
`,
|
|
500
|
-
${
|
|
501
|
-
background: ${({theme:e,$active:t})=>t?
|
|
502
|
-
color: ${({theme:e})=>
|
|
497
|
+
`,Oe=t.styled.li`
|
|
498
|
+
${_}
|
|
499
|
+
background: ${({theme:e,$active:t})=>t?f(e).colors.secondaryHover:`transparent`};
|
|
500
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
503
501
|
cursor: pointer;
|
|
504
|
-
`;function
|
|
505
|
-
border: ${({theme:e})=>
|
|
506
|
-
border-radius: ${({theme:e})=>
|
|
507
|
-
padding: ${({theme:e})=>
|
|
508
|
-
background-color: ${({theme:e})=>
|
|
509
|
-
box-shadow: ${({$shadow:e,theme:t})=>e?
|
|
510
|
-
`;function
|
|
511
|
-
color: ${({theme:e})=>
|
|
512
|
-
font-size: ${({theme:e})=>
|
|
513
|
-
font-weight: ${({theme:e})=>
|
|
514
|
-
`,
|
|
502
|
+
`;function ke({options:t,value:i,defaultValue:a=``,debounceMs:o=300,onSearch:s,onSelect:c,onChange:l,onFocus:u,onBlur:d,id:f,disabled:p,ref:m,...h}){let g=(0,e.useId)(),_=f??g,v=`${_}-options`,y=(0,e.useRef)(null),b=(0,e.useRef)(!1),x=(0,e.useRef)(null),[S,C]=(0,e.useState)(a),[w,T]=(0,e.useState)(!1),[E,D]=(0,e.useState)(-1),O=i??S,k=i!==void 0,A=O.trim().toLocaleLowerCase(),j=A?t.filter(e=>e.label.toLocaleLowerCase().includes(A)||String(e.value).toLocaleLowerCase().includes(A)):[],M=w&&j.length>0;(0,e.useEffect)(()=>{if(!b.current){b.current=!0;return}if(!s)return;let e=setTimeout(()=>{x.current=null,s(O)},o);return x.current=e,()=>{clearTimeout(e),x.current===e&&(x.current=null)}},[o,s,O]);let N=e=>{k||C(e.currentTarget.value),D(-1),l?.(e)},P=e=>{e.relatedTarget instanceof Node&&y.current?.querySelector(`[role="listbox"]`)?.contains(e.relatedTarget)||(T(!1),D(-1),d?.(e))},F=e=>{k||C(e.label),c?.(e),T(!1)},I=e=>{e.key===`ArrowDown`&&j.length>0?(e.preventDefault(),T(!0),D(e=>(e+1)%j.length)):e.key===`ArrowUp`&&j.length>0?(e.preventDefault(),T(!0),D(e=>e<=0?j.length-1:e-1)):e.key===`Enter`&&M&&j[E]?(e.preventDefault(),F(j[E])):e.key===`Escape`&&(T(!1),D(-1)),h.onKeyDown?.(e)};return(0,n.jsx)(Ce,{ref:y,children:(0,n.jsxs)(we,{children:[(0,n.jsx)(Te,{...h,"aria-activedescendant":M&&E>=0?`${v}-option-${String(E)}`:void 0,"aria-autocomplete":`list`,"aria-controls":M?v:void 0,"aria-expanded":M,"aria-haspopup":`listbox`,autoComplete:`off`,disabled:p,id:_,onBlur:P,onChange:N,onFocus:e=>{T(!0),u&&u(e)},onKeyDown:I,ref:m,role:`combobox`,value:O}),(0,n.jsx)(Ee,{"aria-label":`Search`,disabled:p,ghost:!0,onClick:()=>{x.current&&=(clearTimeout(x.current),null),s?.(O)},shape:`rounded`,size:`sm`,type:`button`,variant:`primary`,icon:r.Search}),M?(0,n.jsx)(De,{id:v,role:`listbox`,children:j.map((e,t)=>(0,n.jsx)(Oe,{"aria-selected":t===E,id:`${v}-option-${String(t)}`,onClick:()=>{F(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,$active:t===E,children:e.label},`${String(e.value)}-${e.label}`))}):null]})})}var Ae=t.styled.section`
|
|
503
|
+
border: ${({theme:e})=>f(e).section.border};
|
|
504
|
+
border-radius: ${({theme:e})=>f(e).section.borderRadius};
|
|
505
|
+
padding: ${({theme:e})=>f(e).section.padding};
|
|
506
|
+
background-color: ${({theme:e})=>f(e).colors.surface};
|
|
507
|
+
box-shadow: ${({$shadow:e,theme:t})=>e?f(t).shadow.section:`none`};
|
|
508
|
+
`;function je({children:e,shadow:t=!1,...r}){return(0,n.jsx)(Ae,{$shadow:t,...r,children:e})}var Me=t.css`
|
|
509
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
510
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
511
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
512
|
+
`,Ne=t.css`
|
|
515
513
|
box-sizing: border-box;
|
|
516
514
|
width: 100%;
|
|
517
|
-
|
|
518
|
-
border: ${({theme:e})=>
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
color: ${({theme:e})=>v(e).colors.text};
|
|
515
|
+
border: ${({theme:e})=>f(e).formControl.border};
|
|
516
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
517
|
+
padding: ${({theme:e,$hasTrailingAction:t})=>t?`${f(e).formControl.padding} ${f(e).formControl.trailingActionPadding} ${f(e).formControl.padding} ${f(e).formControl.padding}`:f(e).formControl.padding};
|
|
518
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
519
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
523
520
|
font: inherit;
|
|
524
|
-
font-size: ${({theme:e})=>
|
|
521
|
+
font-size: ${({theme:e})=>f(e).formControl.fontSize};
|
|
525
522
|
|
|
526
|
-
${
|
|
523
|
+
${v(`formControl`)}
|
|
527
524
|
|
|
528
525
|
&:disabled {
|
|
529
526
|
cursor: not-allowed;
|
|
530
|
-
opacity: ${({theme:e})=>
|
|
527
|
+
opacity: ${({theme:e})=>f(e).opacity.disabled};
|
|
531
528
|
}
|
|
532
529
|
|
|
533
|
-
${({$invalid:e,theme:
|
|
534
|
-
border-color: ${
|
|
530
|
+
${({$invalid:e,theme:n})=>e&&t.css`
|
|
531
|
+
border-color: ${f(n).colors.error};
|
|
535
532
|
`}
|
|
536
533
|
|
|
537
|
-
${({$invalid:e,$warning:
|
|
538
|
-
border-color: ${
|
|
534
|
+
${({$invalid:e,$warning:n,theme:r})=>!e&&n&&t.css`
|
|
535
|
+
border-color: ${f(r).colors.warning};
|
|
539
536
|
`}
|
|
540
|
-
|
|
541
|
-
color: ${({theme:e,$type:t})=>
|
|
542
|
-
font-size: ${({theme:e})=>
|
|
543
|
-
`,
|
|
544
|
-
${
|
|
545
|
-
`,
|
|
537
|
+
`,Pe=t.css`
|
|
538
|
+
color: ${({theme:e,$type:t})=>f(e).colors[t]};
|
|
539
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
540
|
+
`,Fe=t.styled.div`
|
|
541
|
+
${h}
|
|
542
|
+
`,Ie=t.styled.div`
|
|
543
|
+
position: relative;
|
|
544
|
+
`,Le=t.styled.label`
|
|
545
|
+
${Me}
|
|
546
|
+
`,Re=t.styled.div`
|
|
547
|
+
${Ne}
|
|
546
548
|
position: relative;
|
|
547
|
-
`,nt=l.styled.label`
|
|
548
|
-
${Ze}
|
|
549
|
-
`,rt=l.styled.div`
|
|
550
|
-
${Qe}
|
|
551
549
|
display: flex;
|
|
552
550
|
align-items: center;
|
|
553
|
-
justify-content: space-between;
|
|
554
|
-
gap: ${({theme:e})=>v(e).space.lg};
|
|
555
551
|
text-align: left;
|
|
556
552
|
cursor: ${({$disabled:e})=>e?`not-allowed`:`pointer`};
|
|
557
553
|
|
|
558
|
-
${({$disabled:e})=>e&&
|
|
559
|
-
opacity: ${({theme:e})=>
|
|
554
|
+
${({$disabled:e})=>e&&t.css`
|
|
555
|
+
opacity: ${({theme:e})=>f(e).opacity.disabled};
|
|
560
556
|
`}
|
|
561
|
-
`,
|
|
557
|
+
`,ze=t.styled.div`
|
|
562
558
|
position: absolute;
|
|
563
559
|
z-index: 10;
|
|
564
560
|
top: 100%;
|
|
565
561
|
right: 0;
|
|
566
562
|
left: 0;
|
|
567
|
-
max-height: ${({theme:e})=>
|
|
563
|
+
max-height: ${({theme:e})=>f(e).formControl.optionListMaxHeight};
|
|
568
564
|
overflow: auto;
|
|
569
|
-
border: ${({theme:e})=>
|
|
570
|
-
border-radius: ${({theme:e})=>
|
|
571
|
-
background: ${({theme:e})=>
|
|
572
|
-
`,
|
|
565
|
+
border: ${({theme:e})=>f(e).formControl.dropdownBorder};
|
|
566
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
567
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
568
|
+
`,Be=t.styled.button`
|
|
573
569
|
display: block;
|
|
574
570
|
width: 100%;
|
|
575
|
-
${
|
|
571
|
+
${_}
|
|
576
572
|
border: 0;
|
|
577
573
|
border-radius: 0;
|
|
578
|
-
background: ${({theme:e,$selected:t})=>t?
|
|
579
|
-
color: ${({theme:e})=>
|
|
574
|
+
background: ${({theme:e,$selected:t})=>t?f(e).colors.secondary:`transparent`};
|
|
575
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
580
576
|
font: inherit;
|
|
581
577
|
text-align: left;
|
|
582
|
-
text-transform: ${({theme:e})=>
|
|
578
|
+
text-transform: ${({theme:e})=>f(e).formControl.optionTextTransform};
|
|
583
579
|
cursor: pointer;
|
|
584
580
|
|
|
585
581
|
&:hover,
|
|
586
582
|
&:focus-visible {
|
|
587
|
-
background: ${({theme:e})=>
|
|
583
|
+
background: ${({theme:e})=>f(e).colors.secondaryHover};
|
|
588
584
|
outline: none;
|
|
589
585
|
}
|
|
590
|
-
`,
|
|
586
|
+
`,Ve=(0,t.styled)(U)`
|
|
587
|
+
position: absolute;
|
|
588
|
+
top: 50%;
|
|
589
|
+
right: ${({theme:e})=>f(e).space.md};
|
|
590
|
+
translate: 0 -50%;
|
|
591
|
+
|
|
592
|
+
svg {
|
|
593
|
+
transform: ${({$open:e})=>e?`rotate(180deg)`:`none`};
|
|
594
|
+
transition: transform 120ms ease;
|
|
595
|
+
}
|
|
596
|
+
`,He=t.styled.select`
|
|
591
597
|
position: absolute;
|
|
592
598
|
width: 1px;
|
|
593
599
|
height: 1px;
|
|
@@ -596,73 +602,74 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
596
602
|
clip: rect(0, 0, 0, 0);
|
|
597
603
|
white-space: nowrap;
|
|
598
604
|
border: 0;
|
|
599
|
-
`,
|
|
605
|
+
`,Ue=t.styled.span`
|
|
600
606
|
overflow: hidden;
|
|
601
|
-
color: ${({theme:e,$placeholder:t})=>t?
|
|
607
|
+
color: ${({theme:e,$placeholder:t})=>t?f(e).colors.muted:`inherit`};
|
|
602
608
|
text-overflow: ellipsis;
|
|
603
609
|
white-space: nowrap;
|
|
604
|
-
`,
|
|
605
|
-
${
|
|
606
|
-
`;function
|
|
607
|
-
${
|
|
608
|
-
`,
|
|
609
|
-
color: ${({theme:e})=>
|
|
610
|
-
font-size: ${({theme:e})=>
|
|
611
|
-
font-weight: ${({theme:e})=>
|
|
612
|
-
`,
|
|
610
|
+
`,Y=t.styled.div`
|
|
611
|
+
${Pe}
|
|
612
|
+
`;function We({options:t,value:i,defaultValue:a,onChange:o,onValueChange:s,onBlur:c,id:l,name:u,label:d,placeholder:f=`Select an option`,error:p,warning:m,disabled:h,required:g,ref:_,"aria-describedby":v,"aria-invalid":y,...b}){let x=(0,e.useId)(),S=l??x,C=`${S}-options`,w=`${S}-error`,T=`${S}-warning`,E=(0,e.useRef)(null),D=(0,e.useRef)(null),O=(0,e.useRef)(null),[k,A]=(0,e.useState)(a),[j,M]=(0,e.useState)(!1),N=i??k,P=t.find(e=>String(e.value)===String(N)),F=!!p||y===!0||y===`true`,I=[v,p?w:void 0,m?T:void 0].filter(Boolean).join(` `)||void 0,L=e=>{o?.(e)};(0,e.useEffect)(()=>{if(!j)return;let e=e=>{e.target instanceof Node&&E.current?.contains(e.target)||M(!1)};return document.addEventListener(`pointerdown`,e),()=>{document.removeEventListener(`pointerdown`,e)}},[j]),(0,e.useEffect)(()=>{j&&(E.current?.querySelector(`[role="option"][aria-selected="true"]`)??E.current?.querySelector(`[role="option"]`))?.focus()},[j]);let R=e=>{i===void 0&&A(e),s?.(e);let t=D.current;t&&(t.value=String(e),t.dispatchEvent(new Event(`change`,{bubbles:!0})))},z=e=>{E.current?.contains(e.relatedTarget)||(M(!1),D.current?.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0})))},B=(e,n)=>{let r;e.key===`ArrowDown`&&(r=(n+1)%t.length),e.key===`ArrowUp`&&(r=(n-1+t.length)%t.length),e.key===`Home`&&(r=0),e.key===`End`&&(r=t.length-1),e.key===`Escape`?(e.preventDefault(),M(!1),O.current?.focus()):r!==void 0&&(e.preventDefault(),E.current?.querySelectorAll(`[role="option"]`)[r]?.focus())};return(0,n.jsxs)(Fe,{ref:E,children:[d?(0,n.jsx)(Le,{htmlFor:S,children:d}):null,(0,n.jsxs)(Ie,{children:[(0,n.jsxs)(He,{...b,"aria-hidden":`true`,"aria-invalid":F||void 0,disabled:h,id:`${S}-native`,name:u,onBlur:c,onChange:L,ref:e=>{D.current=e,typeof _==`function`?_(e):_&&(_.current=e)},required:g,tabIndex:-1,value:N===void 0?``:String(N),children:[(0,n.jsx)(`option`,{value:``,children:f}),t.map(e=>(0,n.jsx)(`option`,{value:String(e.value),children:e.label},String(e.value)))]}),(0,n.jsxs)(Re,{onClick:()=>{h||M(e=>!e)},$disabled:!!h,$hasTrailingAction:!0,$invalid:F,$warning:!!m,children:[(0,n.jsx)(Ue,{$placeholder:!P,children:P?.label??f}),(0,n.jsx)(Ve,{"aria-controls":C,"aria-describedby":I,"aria-expanded":j,"aria-haspopup":`listbox`,"aria-invalid":F||void 0,"aria-label":d??f,disabled:h,ghost:!0,id:S,onBlur:z,onClick:e=>{e.stopPropagation(),M(e=>!e)},onKeyDown:e=>{e.key===`Escape`?M(!1):j||e.key!==`ArrowDown`&&e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),M(!0))},ref:O,shape:`rounded`,size:`sm`,type:`button`,variant:`primary`,$open:j,icon:r.ChevronDown})]}),j?(0,n.jsx)(ze,{id:C,role:`listbox`,"aria-label":d,children:t.map((e,t)=>{let r=String(e.value)===String(N??``);return(0,n.jsx)(Be,{"aria-selected":r,onClick:()=>{R(e.value),M(!1),O.current?.focus()},onBlur:z,onKeyDown:e=>{B(e,t)},role:`option`,tabIndex:-1,type:`button`,$selected:r,children:e.label},String(e.value))})}):null]}),p?(0,n.jsx)(Y,{$type:`error`,id:w,role:`alert`,children:p}):null,m?(0,n.jsx)(Y,{$type:`warning`,id:T,role:`status`,children:m}):null]})}var Ge=t.styled.div`
|
|
613
|
+
${h}
|
|
614
|
+
`,Ke=t.styled.label`
|
|
615
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
616
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
617
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
618
|
+
`,qe=t.styled.textarea`
|
|
613
619
|
box-sizing: border-box;
|
|
614
620
|
width: 100%;
|
|
615
|
-
height: ${({$height:e,theme:t})=>e==null?
|
|
616
|
-
min-height: ${({theme:e})=>
|
|
617
|
-
border: ${({theme:e})=>
|
|
618
|
-
border-radius: ${({theme:e})=>
|
|
619
|
-
padding: ${({theme:e})=>
|
|
620
|
-
background: ${({theme:e})=>
|
|
621
|
-
color: ${({theme:e})=>
|
|
621
|
+
height: ${({$height:e,theme:t})=>e==null?f(t).formControl.textareaHeight:typeof e==`number`?`${e.toString()}px`:e};
|
|
622
|
+
min-height: ${({theme:e})=>f(e).formControl.textareaHeight};
|
|
623
|
+
border: ${({theme:e})=>f(e).formControl.border};
|
|
624
|
+
border-radius: ${({theme:e})=>f(e).formControl.borderRadius};
|
|
625
|
+
padding: ${({theme:e})=>f(e).formControl.padding};
|
|
626
|
+
background: ${({theme:e})=>f(e).colors.background};
|
|
627
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
622
628
|
font: inherit;
|
|
623
|
-
font-size: ${({theme:e})=>
|
|
629
|
+
font-size: ${({theme:e})=>f(e).formControl.fontSize};
|
|
624
630
|
resize: ${({$resizable:e})=>e?`vertical`:`none`};
|
|
625
631
|
|
|
626
|
-
${
|
|
632
|
+
${v(`formControl`)}
|
|
627
633
|
|
|
628
634
|
&:disabled {
|
|
629
635
|
cursor: not-allowed;
|
|
630
|
-
opacity: ${({theme:e})=>
|
|
636
|
+
opacity: ${({theme:e})=>f(e).opacity.disabled};
|
|
631
637
|
}
|
|
632
638
|
|
|
633
|
-
${({$invalid:e,theme:
|
|
634
|
-
border-color: ${
|
|
639
|
+
${({$invalid:e,theme:n})=>e&&t.css`
|
|
640
|
+
border-color: ${f(n).colors.error};
|
|
635
641
|
`}
|
|
636
642
|
|
|
637
|
-
${({$invalid:e,$warning:
|
|
638
|
-
border-color: ${
|
|
643
|
+
${({$invalid:e,$warning:n,theme:r})=>!e&&n&&t.css`
|
|
644
|
+
border-color: ${f(r).colors.warning};
|
|
639
645
|
`}
|
|
640
646
|
|
|
641
647
|
&:focus,
|
|
642
648
|
&:focus-visible {
|
|
643
|
-
${({$invalid:e,$warning:
|
|
644
|
-
border-color: ${
|
|
645
|
-
`:t
|
|
646
|
-
border-color: ${
|
|
649
|
+
${({$invalid:e,$warning:n,theme:r})=>e?t.css`
|
|
650
|
+
border-color: ${f(r).colors.error};
|
|
651
|
+
`:n?t.css`
|
|
652
|
+
border-color: ${f(r).colors.warning};
|
|
647
653
|
`:``}
|
|
648
654
|
outline: none;
|
|
649
655
|
}
|
|
650
|
-
`,
|
|
651
|
-
color: ${({theme:e,$type:t})=>
|
|
652
|
-
font-size: ${({theme:e})=>
|
|
653
|
-
`;function
|
|
654
|
-
color: ${({theme:e})=>
|
|
655
|
-
font-family: ${({theme:e})=>
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
`,X=t.styled.div`
|
|
657
|
+
color: ${({theme:e,$type:t})=>f(e).colors[t]};
|
|
658
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
659
|
+
`;function Je({id:t,label:r,error:i,warning:a,height:o,resizable:s=!1,ref:c,"aria-describedby":l,"aria-invalid":u,...d}){let f=(0,e.useId)(),p=t??f,m=`${p}-error`,h=`${p}-warning`,g=!!i||u===!0||u===`true`,_=[l,i?m:void 0,a?h:void 0].filter(Boolean).join(` `)||void 0;return(0,n.jsxs)(Ge,{children:[r?(0,n.jsx)(Ke,{htmlFor:p,children:r}):null,(0,n.jsx)(qe,{...d,$height:o,$invalid:g,$resizable:s,$warning:!!a,"aria-describedby":_,"aria-invalid":g||void 0,id:p,ref:c}),i?(0,n.jsx)(X,{$type:`error`,id:m,role:`alert`,children:i}):null,a?(0,n.jsx)(X,{$type:`warning`,id:h,role:`status`,children:a}):null]})}var Ye=t.styled.p`
|
|
660
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
661
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
662
|
+
margin: 0;
|
|
663
|
+
font-size: ${({theme:e,$fontSize:t,$tag:n})=>{if(t!==void 0)return t;let r=f(e).typography;return n&&Object.hasOwn(r,n)?r[n]:r.fallback}};
|
|
664
|
+
`;function Xe({tag:e,as:t,fontSize:r,...i}){let a=e??t??`p`;return(0,n.jsx)(Ye,{$tag:typeof a==`string`?a:void 0,$fontSize:r,as:a,...i})}var Ze=t.css`
|
|
658
665
|
position: fixed;
|
|
659
666
|
inset: 0;
|
|
660
667
|
z-index: 1000;
|
|
661
668
|
display: flex;
|
|
662
669
|
align-items: center;
|
|
663
670
|
justify-content: center;
|
|
664
|
-
padding: ${({theme:e})=>
|
|
665
|
-
`,
|
|
671
|
+
padding: ${({theme:e})=>f(e).space.lg};
|
|
672
|
+
`,Qe=t.css`
|
|
666
673
|
position: absolute;
|
|
667
674
|
inset: 0;
|
|
668
675
|
border: none;
|
|
@@ -670,75 +677,73 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
670
677
|
cursor: pointer;
|
|
671
678
|
background: color-mix(
|
|
672
679
|
in srgb,
|
|
673
|
-
${({theme:e})=>
|
|
680
|
+
${({theme:e})=>f(e).colors.bg} 25%,
|
|
674
681
|
transparent
|
|
675
682
|
);
|
|
676
|
-
|
|
683
|
+
`,$e=t.css`
|
|
677
684
|
position: relative;
|
|
678
685
|
z-index: 1;
|
|
679
686
|
box-sizing: border-box;
|
|
680
687
|
display: flex;
|
|
681
688
|
flex-direction: column;
|
|
682
689
|
width: 100%;
|
|
683
|
-
max-width: ${({theme:e})=>
|
|
684
|
-
max-height: ${({theme:e})=>
|
|
685
|
-
padding: ${({theme:e})=>
|
|
690
|
+
max-width: ${({theme:e})=>f(e).modal.maxWidth};
|
|
691
|
+
max-height: ${({theme:e})=>f(e).modal.maxHeight};
|
|
692
|
+
padding: ${({theme:e})=>f(e).modal.padding};
|
|
686
693
|
overflow: hidden;
|
|
687
|
-
background-color: ${({theme:e})=>
|
|
688
|
-
border: ${({theme:e})=>
|
|
689
|
-
border-radius: ${({theme:e})=>
|
|
690
|
-
box-shadow: ${({theme:e})=>
|
|
691
|
-
`,
|
|
694
|
+
background-color: ${({theme:e})=>f(e).colors.surface};
|
|
695
|
+
border: ${({theme:e})=>f(e).modal.border};
|
|
696
|
+
border-radius: ${({theme:e})=>f(e).modal.borderRadius};
|
|
697
|
+
box-shadow: ${({theme:e})=>f(e).shadow.modal};
|
|
698
|
+
`,et=t.css`
|
|
692
699
|
display: flex;
|
|
693
700
|
align-items: center;
|
|
694
701
|
justify-content: space-between;
|
|
695
|
-
gap: ${({theme:e})=>
|
|
702
|
+
gap: ${({theme:e})=>f(e).space.md};
|
|
696
703
|
flex-shrink: 0;
|
|
697
|
-
`,
|
|
704
|
+
`,tt=t.css`
|
|
698
705
|
margin: 0;
|
|
699
706
|
min-width: 0;
|
|
700
707
|
flex: 1;
|
|
701
|
-
font-family: ${({theme:e})=>
|
|
702
|
-
font-size: ${({theme:e})=>
|
|
703
|
-
font-weight: ${({theme:e})=>
|
|
704
|
-
color: ${({theme:e})=>
|
|
705
|
-
`,
|
|
708
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
709
|
+
font-size: ${({theme:e})=>f(e).modal.title.fontSize};
|
|
710
|
+
font-weight: ${({theme:e})=>f(e).modal.title.fontWeight};
|
|
711
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
712
|
+
`,nt=t.css`
|
|
706
713
|
flex: 1;
|
|
707
714
|
min-height: 0;
|
|
708
|
-
margin-top: ${({theme:e})=>
|
|
715
|
+
margin-top: ${({theme:e})=>f(e).space.lg};
|
|
709
716
|
overflow-x: hidden;
|
|
710
717
|
overflow-y: auto;
|
|
711
|
-
font-family: ${({theme:e})=>
|
|
712
|
-
font-size: ${({theme:e})=>
|
|
713
|
-
color: ${({theme:e})=>
|
|
714
|
-
`,
|
|
715
|
-
${
|
|
716
|
-
`,
|
|
717
|
-
${
|
|
718
|
-
`,
|
|
719
|
-
${
|
|
720
|
-
`,
|
|
721
|
-
${
|
|
722
|
-
`,
|
|
723
|
-
${
|
|
724
|
-
`,
|
|
725
|
-
${
|
|
726
|
-
`;function kt(){return(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,u.jsx)(`path`,{fill:`currentColor`,d:`M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z`})})}function At({open:e,onClose:t,title:n,children:r,closeLabel:i=`Close`}){let a=(0,c.useId)(),o=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!e)return;o.current?.focus();let n=document.body.style.overflow;document.body.style.overflow=`hidden`;let r=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,r),()=>{document.body.style.overflow=n,document.removeEventListener(`keydown`,r)}},[e,t]),!e||typeof document>`u`?null:(0,d.createPortal)((0,u.jsxs)(Ct,{children:[(0,u.jsx)(wt,{type:`button`,"aria-label":`Close overlay`,onClick:t}),(0,u.jsxs)(Tt,{ref:o,role:`dialog`,"aria-modal":`true`,"aria-labelledby":a,tabIndex:-1,children:[(0,u.jsxs)(Et,{children:[(0,u.jsx)(Dt,{id:a,children:n}),(0,u.jsx)(L,{"aria-label":i,ghost:!0,onClick:t,shape:`rounded`,size:`md`,variant:`primary`,children:(0,u.jsx)(kt,{})})]}),r==null?null:(0,u.jsx)(Ot,{children:r})]})]}),document.body)}var jt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Mt=/^[\\/]{2}/;function Nt(e,t){return t+e.replace(/\\/g,`/`)}function R(e,t){if(e===!1||e==null)throw Error(t)}function z(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function B({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function V(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Pt(e,t,n=`/`){return Ft(e,t,n,!1)}function Ft(e,t,n,r,i){let a=U((typeof t==`string`?V(t):t).pathname||`/`,n);if(a==null)return null;let o=i??It(e),s=null,c=Qt(a);for(let e=0;s==null&&e<o.length;++e)s=Yt(o[e],c,r);return s}function It(e){let t=Lt(e);return zt(t),t}function Lt(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;R(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(R(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Lt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:qt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Zt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Rt(e.path))a(e,t,!0,n)}),t}function Rt(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Rt(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function zt(e){e.sort((e,t)=>e.score===t.score?Jt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Bt=/^:[\w-]+$/,Vt=3,Ht=2,Ut=1,Wt=10,Gt=-2,Kt=e=>e===`*`;function qt(e,t){let n=e.split(`/`),r=n.length;return n.some(Kt)&&(r+=Gt),t&&(r+=Ht),n.filter(e=>!Kt(e)).reduce((e,t)=>e+(Bt.test(t)?Vt:t===``?Ut:Wt),r)}function Jt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Yt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Xt(u,l,s.matcher,s.compiledParams):H(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:sn(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function H(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Zt(e.path,e.caseSensitive,e.end);return Xt(e,t,n,r)}function Xt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=G(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=G(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Zt(e,t=!1,n=!0){z(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Qt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return z(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function $t(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?V(e):e,a;return n?(n=on(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?en(n.substring(1),`/`):en(n,t)):a=t,{pathname:a,search:cn(r),hash:ln(i)}}function en(e,t){let n=G(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function tn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function rn(e){let t=nn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function an(e,t,n,r=!1){let i;typeof e==`string`?i=V(e):(i={...e},R(!i.pathname||!i.pathname.includes(`?`),tn(`?`,`pathname`,`search`,i)),R(!i.pathname||!i.pathname.includes(`#`),tn(`#`,`pathname`,`hash`,i)),R(!i.search||!i.search.includes(`#`),tn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=$t(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var on=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>on(e.join(`/`));function G(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var sn=e=>G(e).replace(/^\/*/,`/`),cn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ln=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,un=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function dn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function fn(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}var pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function mn(e,t){let n=e;if(typeof n!=`string`||!jt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pn)try{let e=new URL(window.location.href),r=Mt.test(n)?new URL(Nt(n,e.protocol)):new URL(n),a=U(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{z(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var hn=new URL(`http://localhost`);function gn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),hn)}catch{return hn}}function _n(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function vn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function yn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!_n(i,n),s=!_n(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!vn(e,i)||!_n(i,a)))throw Error(`External navigation is not allowed`)}var bn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(bn);var xn=[`GET`,...bn];new Set(xn);var Sn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Cn(e){try{return Sn.includes(new URL(e).protocol)}catch{return!1}}var K=c.createContext(null);K.displayName=`DataRouter`;var wn=c.createContext(null);wn.displayName=`DataRouterState`;var Tn=c.createContext(!1);function En(){return c.useContext(Tn)}var Dn=c.createContext({isTransitioning:!1});Dn.displayName=`ViewTransition`;var On=c.createContext(new Map);On.displayName=`Fetchers`;var kn=c.createContext(null);kn.displayName=`Await`;var q=c.createContext(null);q.displayName=`Navigation`;var An=c.createContext(null);An.displayName=`Location`;var J=c.createContext({outlet:null,matches:[],isDataRoute:!1});J.displayName=`Route`;var jn=c.createContext(null);jn.displayName=`RouteError`;var Mn=`REACT_ROUTER_ERROR`,Nn=`REDIRECT`,Pn=`ROUTE_ERROR_RESPONSE`;function Fn(e){if(e.startsWith(`${Mn}:${Nn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function In(e){if(e.startsWith(`${Mn}:${Pn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new un(t.status,t.statusText,t.data)}catch{}}function Ln(e,{relative:t}={}){R(Rn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=c.useContext(q),{hash:i,pathname:a,search:o}=X(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:W([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Rn(){return c.useContext(An)!=null}function Y(){return R(Rn(),`useLocation() may be used only in the context of a <Router> component.`),c.useContext(An).location}var zn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Bn(e){c.useContext(q).static||c.useLayoutEffect(e)}function Vn(){let{isDataRoute:e}=c.useContext(J);return e?ir():Hn()}function Hn(){R(Rn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=c.useContext(K),{basename:t,navigator:n}=c.useContext(q),{matches:r}=c.useContext(J),{pathname:i}=Y(),a=JSON.stringify(rn(r)),o=c.useRef(!1);return Bn(()=>{o.current=!0}),c.useCallback((r,s={})=>{if(z(o.current,zn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=an(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),yn(typeof r==`string`?r:B(r),n.createHref(c),gn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}c.createContext(null);function X(e,{relative:t}={}){let{matches:n}=c.useContext(J),{pathname:r}=Y(),i=JSON.stringify(rn(n));return c.useMemo(()=>an(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Un(e,t,n){R(Rn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=c.useContext(q),{matches:i}=c.useContext(J),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;or(s,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
727
|
-
|
|
728
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Y(),f;if(t){let e=typeof t==`string`?V(t):t;R(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Pt(e,{pathname:m});z(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),z(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Xn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:W([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:W([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?c.createElement(An.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Wn(){let e=rr(),t=dn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=c.createElement(c.Fragment,null,c.createElement(`p`,null,`💿 Hey developer 👋`),c.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,c.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,c.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),c.createElement(c.Fragment,null,c.createElement(`h2`,null,`Unexpected Application Error!`),c.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?c.createElement(`pre`,{style:i},n):null,o)}var Gn=c.createElement(Wn,null),Kn=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=In(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:c.createElement(J.Provider,{value:this.props.routeContext},c.createElement(jn.Provider,{value:e,children:this.props.component}));return this.context?c.createElement(Jn,{error:e},t):t}};Kn.contextType=Tn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:n,navigator:r}=c.useContext(q);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Fn(t.digest);if(e){let i=qn.get(t);if(i)throw i;let a=mn(e.location,n),o=a.absoluteURL||a.to;if(yn(e.location,o,gn(r),`allow-explicit`),Cn(o))throw Error(`Invalid redirect location`);if(pn&&!qn.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw qn.set(t,n),n}}return c.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Yn({routeContext:e,match:t,children:n}){let r=c.useContext(K);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(J.Provider,{value:e},n)}function Xn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:fn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Gn,o&&(s<0&&l===0?(or(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?c.createElement(n.route.Component,null):n.route.element?n.route.element:e,c.createElement(Yn,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?c.createElement(Kn,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=c.useContext(K);return R(t,Zn(e)),t}function $n(e){let t=c.useContext(wn);return R(t,Zn(e)),t}function er(e){let t=c.useContext(J);return R(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return R(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let e=c.useContext(jn),t=$n(`useRouteError`),n=tr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ir(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),n=c.useRef(!1);return Bn(()=>{n.current=!0}),c.useCallback(async(r,i={})=>{z(n.current,zn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ar={};function or(e,t,n){!t&&!ar[e]&&(ar[e]=!0,z(!1,n))}c.memo(sr);function sr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}c.Component;var cr=`get`,lr=`application/x-www-form-urlencoded`;function ur(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function dr(e){return ur(e)&&e.tagName.toLowerCase()===`button`}function fr(e){return ur(e)&&e.tagName.toLowerCase()===`form`}function pr(e){return ur(e)&&e.tagName.toLowerCase()===`input`}function mr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hr(e,t){return e.button===0&&(!t||t===`_self`)&&!mr(e)}var Z=null;function gr(){if(Z===null)try{new FormData(document.createElement(`form`),0),Z=!1}catch{Z=!0}return Z}var _r=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function vr(e){return e!=null&&!_r.has(e)?(z(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lr}"`),null):e}function yr(e,t){let n,r,i,a,o;if(fr(e)){let o=e.getAttribute(`action`);r=o?U(o,t):null,n=e.getAttribute(`method`)||cr,i=vr(e.getAttribute(`enctype`))||lr,a=new FormData(e)}else if(dr(e)||pr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?U(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||cr,i=vr(e.getAttribute(`formenctype`))||vr(o.getAttribute(`enctype`))||lr,a=new FormData(o,e),!gr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ur(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=cr,r=null,i=lr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function br(e,t){if(e===!1||e==null)throw Error(t)}function xr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&U(i.pathname,t)===`/`?`${G(t)}/_root.${r}`:`${G(i.pathname)}.${r}`,i}async function Sr(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Cr(e){return e!=null&&typeof e.page==`string`}function wr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Tr(e,t,n){return Ar((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Sr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(wr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Er(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Dr(e,t,{includeHydrateFallback:n}={}){return Or(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Or(e){return[...new Set(e)]}function kr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ar(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Cr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(kr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function jr(){let e=c.useContext(K);return br(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Mr(){let e=c.useContext(wn);return br(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Nr=c.createContext(void 0);Nr.displayName=`FrameworkContext`;function Q(){let e=c.useContext(Nr);return br(e,`You must render this element inside a <HydratedRouter> element`),e}function Pr(e,t){let n=c.useContext(Nr),[r,i]=c.useState(!1),[a,o]=c.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=c.useRef(null);c.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),c.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:$(s,m),onBlur:$(l,h),onMouseEnter:$(u,m),onMouseLeave:$(d,h),onTouchStart:$(f,m)}]:[a,p,{}]:[!1,p,{}]}function $(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Fr({page:e,...t}){let n=En(),{nonce:r}=Q(),{router:i}=jr(),a=c.useMemo(()=>Pt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?c.createElement(Lr,{page:e,matches:a,...t}):c.createElement(Rr,{page:e,matches:a,...t})):null}function Ir(e){let{manifest:t,routeModules:n}=Q(),[r,i]=c.useState([]);return c.useEffect(()=>{let r=!1;return Tr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Lr({page:e,matches:t,...n}){let r=Y(),{future:i}=Q(),{basename:a}=jr(),o=c.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=xr(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return c.createElement(c.Fragment,null,o.map(e=>c.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Rr({page:e,matches:t,...n}){let r=Y(),{future:i,manifest:a,routeModules:o}=Q(),{basename:s}=jr(),{loaderData:l,matches:u}=Mr(),d=c.useMemo(()=>Er(e,t,u,a,r,`data`),[e,t,u,a,r]),f=c.useMemo(()=>Er(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=c.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,c=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?c=!0:n.add(e.route.id))}),n.size===0)return[];let u=xr(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return c&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[s,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,o]),m=c.useMemo(()=>Dr(f,a),[f,a]),h=Ir(f);return c.createElement(c.Fragment,null,p.map(e=>c.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>c.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>c.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function zr(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}c.Component;var Br=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Br&&(window.__reactRouterVersion=`7.18.5`)}catch{}var Vr=c.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=c.useContext(q),y=typeof u==`string`&&jt.test(u),b=mn(u,g);u=b.to;let x=Ln(u,{relative:r}),S=Y(),C=null;if(o){let e=an(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:W([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Pr(n,m),D=Kr(u,{replace:a,mask:o,state:s,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=c.createElement(`a`,{...m,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:zr(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?c.createElement(c.Fragment,null,A,c.createElement(Fr,{page:x})):A});Vr.displayName=`Link`;var Hr=c.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...l},u){let d=X(a,{relative:l.relative}),f=Y(),p=c.useContext(wn),{navigator:m,basename:h}=c.useContext(q),g=p!=null&&Zr(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=U(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return c.createElement(Vr,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Hr.displayName=`NavLink`;var Ur=c.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=cr,action:s,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=c.useContext(q),_=Yr(),v=Xr(s,{relative:u}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&jt.test(s);return c.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?c.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Ur.displayName=`Form`;function Wr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gr(e){let t=c.useContext(K);return R(t,Wr(e)),t}function Kr(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Vn(),f=Y(),p=X(e,{relative:o});return c.useCallback(m=>{if(hr(m,t)){m.preventDefault();let t=n===void 0?B(f)===B(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:l});u?c.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,l,u])}var qr=0,Jr=()=>`__${String(++qr)}__`;function Yr(){let{router:e}=Gr(`useSubmit`),{basename:t}=c.useContext(q),n=nr(),r=e.fetch,i=e.navigate;return c.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=yr(e,t);if(a.navigate===!1){let e=a.fetcherKey||Jr();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Xr(e,{relative:t}={}){let{basename:n}=c.useContext(q),r=c.useContext(J);R(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...X(e||`.`,{relative:t})},o=Y();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:W([n,a.pathname])),B(a)}function Zr(e,{relative:t}={}){let n=c.useContext(Dn);R(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Gr(`useViewTransitionState`),i=X(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=U(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H(i.pathname,o)!=null||H(i.pathname,a)!=null}var Qr=l.css`
|
|
718
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
719
|
+
font-size: ${({theme:e})=>f(e).modal.body.fontSize};
|
|
720
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
721
|
+
`,rt=t.styled.div`
|
|
722
|
+
${Ze}
|
|
723
|
+
`,it=t.styled.button`
|
|
724
|
+
${Qe}
|
|
725
|
+
`,at=t.styled.div`
|
|
726
|
+
${$e}
|
|
727
|
+
`,ot=t.styled.div`
|
|
728
|
+
${et}
|
|
729
|
+
`,st=t.styled.h2`
|
|
730
|
+
${tt}
|
|
731
|
+
`,ct=t.styled.div`
|
|
732
|
+
${nt}
|
|
733
|
+
`;function lt({open:t,onClose:a,title:o,children:s,closeLabel:c=`Close`}){let l=(0,e.useId)(),u=(0,e.useRef)(null);return(0,e.useEffect)(()=>{if(!t)return;u.current?.focus();let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let n=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,n),()=>{document.body.style.overflow=e,document.removeEventListener(`keydown`,n)}},[t,a]),!t||typeof document>`u`?null:(0,i.createPortal)((0,n.jsxs)(rt,{children:[(0,n.jsx)(it,{type:`button`,"aria-label":`Close overlay`,onClick:a}),(0,n.jsxs)(at,{ref:u,role:`dialog`,"aria-modal":`true`,"aria-labelledby":l,tabIndex:-1,children:[(0,n.jsxs)(ot,{children:[(0,n.jsx)(st,{id:l,children:o}),(0,n.jsx)(U,{"aria-label":c,ghost:!0,onClick:a,shape:`rounded`,size:`md`,variant:`primary`,icon:r.X})]}),s==null?null:(0,n.jsx)(ct,{children:s})]})]}),document.body)}var Z=t.css`
|
|
729
734
|
display: inline-flex;
|
|
730
735
|
align-items: center;
|
|
731
736
|
justify-content: center;
|
|
732
737
|
border: 0;
|
|
733
|
-
padding: ${({theme:e})=>
|
|
734
|
-
box-shadow: ${({theme:e})=>
|
|
735
|
-
background: ${({theme:e})=>
|
|
736
|
-
color: ${({theme:e})=>
|
|
737
|
-
font-family: ${({theme:e})=>
|
|
738
|
-
font-size: ${({theme:e})=>
|
|
739
|
-
font-weight: ${({theme:e})=>
|
|
740
|
-
text-decoration: ${({theme:e})=>
|
|
741
|
-
text-transform: ${({theme:e})=>
|
|
738
|
+
padding: ${({theme:e})=>f(e).navLinks.itemPadding};
|
|
739
|
+
box-shadow: ${({theme:e})=>f(e).shadow.link};
|
|
740
|
+
background: ${({theme:e})=>f(e).colors.primary};
|
|
741
|
+
color: ${({theme:e})=>f(e).colors.primaryText};
|
|
742
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
743
|
+
font-size: ${({theme:e})=>f(e).navLinks.fontSize};
|
|
744
|
+
font-weight: ${({theme:e})=>f(e).font.weight.semibold};
|
|
745
|
+
text-decoration: ${({theme:e})=>f(e).navLinks.textDecoration};
|
|
746
|
+
text-transform: ${({theme:e})=>f(e).navLinks.textTransform};
|
|
742
747
|
cursor: pointer;
|
|
743
748
|
position: relative;
|
|
744
749
|
z-index: 1;
|
|
@@ -749,99 +754,99 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
749
754
|
transform 0.15s ease;
|
|
750
755
|
|
|
751
756
|
&:hover:not(:disabled) {
|
|
752
|
-
background: ${({theme:e})=>f(
|
|
757
|
+
background: ${({theme:e})=>o(f(e).colors.primary,f(e).colors.ink)};
|
|
753
758
|
}
|
|
754
759
|
|
|
755
760
|
&:first-child {
|
|
756
|
-
border-top-left-radius: ${({theme:e})=>
|
|
757
|
-
border-bottom-left-radius: ${({theme:e})=>
|
|
761
|
+
border-top-left-radius: ${({theme:e})=>f(e).navLinks.borderRadius};
|
|
762
|
+
border-bottom-left-radius: ${({theme:e})=>f(e).navLinks.borderRadius};
|
|
758
763
|
}
|
|
759
764
|
|
|
760
765
|
&:last-child {
|
|
761
|
-
border-top-right-radius: ${({theme:e})=>
|
|
762
|
-
border-bottom-right-radius: ${({theme:e})=>
|
|
766
|
+
border-top-right-radius: ${({theme:e})=>f(e).navLinks.borderRadius};
|
|
767
|
+
border-bottom-right-radius: ${({theme:e})=>f(e).navLinks.borderRadius};
|
|
763
768
|
}
|
|
764
769
|
|
|
765
|
-
${
|
|
770
|
+
${v(`navLinks`)}
|
|
766
771
|
|
|
767
772
|
&:disabled {
|
|
768
|
-
opacity: ${({theme:e})=>
|
|
773
|
+
opacity: ${({theme:e})=>f(e).opacity.disabledButton};
|
|
769
774
|
cursor: not-allowed;
|
|
770
775
|
}
|
|
771
|
-
|
|
776
|
+
`,ut=t.styled.nav`
|
|
772
777
|
display: inline-flex;
|
|
773
778
|
align-items: center;
|
|
774
|
-
border-radius: ${({theme:e})=>
|
|
779
|
+
border-radius: ${({theme:e})=>f(e).navLinks.borderRadius};
|
|
775
780
|
padding: 0;
|
|
776
|
-
box-shadow: ${({theme:e})=>
|
|
777
|
-
font-family: ${({theme:e})=>
|
|
778
|
-
font-size: ${({theme:e})=>
|
|
779
|
-
text-transform: ${({theme:e})=>
|
|
781
|
+
box-shadow: ${({theme:e})=>f(e).shadow.navLinks};
|
|
782
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
783
|
+
font-size: ${({theme:e})=>f(e).navLinks.fontSize};
|
|
784
|
+
text-transform: ${({theme:e})=>f(e).navLinks.textTransform};
|
|
780
785
|
|
|
781
786
|
& > a {
|
|
782
|
-
${
|
|
787
|
+
${Z}
|
|
783
788
|
|
|
784
|
-
border: ${({theme:e})=>
|
|
789
|
+
border: ${({theme:e})=>f(e).navLinks.border};
|
|
785
790
|
|
|
786
791
|
&:active,
|
|
787
792
|
&[aria-current='page'] {
|
|
788
793
|
z-index: 0;
|
|
789
794
|
box-shadow: none;
|
|
790
795
|
transform: translate(
|
|
791
|
-
calc(0px + ${({theme:e})=>
|
|
792
|
-
${({theme:e})=>
|
|
796
|
+
calc(0px + ${({theme:e})=>f(e).shadow.offsetX}),
|
|
797
|
+
${({theme:e})=>f(e).shadow.offsetY}
|
|
793
798
|
);
|
|
794
799
|
}
|
|
795
800
|
}
|
|
796
|
-
`,
|
|
797
|
-
${
|
|
798
|
-
`;function
|
|
801
|
+
`,dt=t.styled.button`
|
|
802
|
+
${Z}
|
|
803
|
+
`;function ft({links:e,...t}){return(0,n.jsx)(ut,{...t,children:e.map(e=>`href`in e&&e.href!==void 0?(0,n.jsx)(a.NavLink,{to:e.href,className:e.className,style:e.style,end:e.end,caseSensitive:e.caseSensitive,children:e.label},e.id):(0,n.jsx)(dt,{type:`button`,disabled:e.disabled,onClick:e.onClick,children:e.label},e.id))})}var pt=t.styled.a`
|
|
799
804
|
display: inline-flex;
|
|
800
805
|
align-items: center;
|
|
801
|
-
gap: ${({theme:e})=>
|
|
806
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
802
807
|
color: inherit;
|
|
803
|
-
font-family: ${({theme:e})=>
|
|
804
|
-
text-decoration: ${({theme:e})=>
|
|
808
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
809
|
+
text-decoration: ${({theme:e})=>f(e).userBadge.textDecoration};
|
|
805
810
|
|
|
806
|
-
${
|
|
807
|
-
`;function
|
|
811
|
+
${v(`userBadge`)}
|
|
812
|
+
`;function Q({to:e,firstName:t,lastName:r,avatarSrc:i,size:o=`md`,showName:s=!0,...c}){let l=`${t} ${r}`.trim();return(0,n.jsxs)(pt,{as:a.Link,to:e,...c,children:[(0,n.jsx)(m,{firstName:t,lastName:r,src:i,alt:s?``:l,size:o,"aria-hidden":s?!0:void 0}),s?(0,n.jsx)(`span`,{children:l}):null]})}var mt=t.styled.aside`
|
|
808
813
|
box-sizing: border-box;
|
|
809
814
|
display: flex;
|
|
810
815
|
flex: 0 0
|
|
811
|
-
${({$extended:e,theme:t})=>e?
|
|
816
|
+
${({$extended:e,theme:t})=>e?f(t).sidebar.width.extended:f(t).sidebar.width.compact};
|
|
812
817
|
flex-direction: column;
|
|
813
|
-
gap: ${({theme:e})=>
|
|
814
|
-
width: ${({$extended:e,theme:t})=>e?
|
|
815
|
-
height: ${({theme:e})=>
|
|
816
|
-
height: ${({theme:e})=>
|
|
818
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
819
|
+
width: ${({$extended:e,theme:t})=>e?f(t).sidebar.width.extended:f(t).sidebar.width.compact};
|
|
820
|
+
height: ${({theme:e})=>f(e).sidebar.height.fallback};
|
|
821
|
+
height: ${({theme:e})=>f(e).sidebar.height.dynamic};
|
|
817
822
|
min-height: 0;
|
|
818
823
|
overflow: hidden;
|
|
819
|
-
padding: ${({theme:e})=>
|
|
820
|
-
border: ${({theme:e})=>
|
|
821
|
-
border-radius: ${({theme:e})=>
|
|
822
|
-
background: ${({theme:e})=>
|
|
823
|
-
box-shadow: ${({theme:e})=>
|
|
824
|
+
padding: ${({theme:e})=>f(e).space.inset};
|
|
825
|
+
border: ${({theme:e})=>f(e).sidebar.border};
|
|
826
|
+
border-radius: ${({theme:e})=>f(e).sidebar.borderRadius};
|
|
827
|
+
background: ${({theme:e})=>f(e).colors.surface};
|
|
828
|
+
box-shadow: ${({theme:e})=>f(e).shadow.sidebar};
|
|
824
829
|
transition:
|
|
825
830
|
width 0.2s ease,
|
|
826
831
|
flex-basis 0.2s ease;
|
|
827
|
-
`,
|
|
832
|
+
`,ht=t.styled.div`
|
|
828
833
|
display: flex;
|
|
829
834
|
flex-direction: column;
|
|
830
835
|
align-items: center;
|
|
831
|
-
gap: ${({theme:e})=>
|
|
836
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
832
837
|
align-items: ${({$extended:e})=>e?`flex-end`:`center`};
|
|
833
|
-
`,
|
|
838
|
+
`,gt=t.styled.nav`
|
|
834
839
|
display: flex;
|
|
835
840
|
min-height: 0;
|
|
836
841
|
flex: 1;
|
|
837
842
|
flex-direction: column;
|
|
838
843
|
align-items: stretch;
|
|
839
|
-
gap: ${({theme:e})=>
|
|
840
|
-
margin-inline: ${({theme:e})=>`-${
|
|
841
|
-
padding-inline: ${({theme:e})=>
|
|
844
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
845
|
+
margin-inline: ${({theme:e})=>`-${f(e).space.xs}`};
|
|
846
|
+
padding-inline: ${({theme:e})=>f(e).space.xs};
|
|
842
847
|
overflow-y: auto;
|
|
843
848
|
overflow-x: hidden;
|
|
844
|
-
`,
|
|
849
|
+
`,_t=t.styled.div`
|
|
845
850
|
display: flex;
|
|
846
851
|
width: 100%;
|
|
847
852
|
min-width: 0;
|
|
@@ -852,11 +857,11 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
852
857
|
min-width: 0;
|
|
853
858
|
justify-content: ${({$extended:e})=>e?`flex-start`:`center`};
|
|
854
859
|
}
|
|
855
|
-
`,
|
|
860
|
+
`,vt=t.styled.div`
|
|
856
861
|
display: flex;
|
|
857
862
|
flex-direction: column;
|
|
858
|
-
gap: ${({theme:e})=>
|
|
859
|
-
`;function
|
|
863
|
+
gap: ${({theme:e})=>f(e).space.sm};
|
|
864
|
+
`;function yt({links:t,logout:i,extended:a,defaultExtended:o=!1,onExtendedChange:s,navigationLabel:c=`Primary navigation`,"aria-label":l=`Application sidebar`,...u}){let[d,f]=(0,e.useState)(o),p=a??d,[m,h]=(0,e.useState)(p);function g(){let e=!p;e||h(!0),a===void 0&&f(e),s?.(e)}function _(e){e.target===e.currentTarget&&e.propertyName===`width`&&h(p)}function v(e){return(0,n.jsx)(_t,{$extended:m,children:m?(0,n.jsxs)(J,{href:e.href,children:[(0,n.jsx)(F,{size:`md`,style:{color:`inherit`},children:e.icon}),e.label]}):(0,n.jsx)(G,{href:e.href,"aria-label":e.label,title:e.label,children:e.icon})},e.id)}return(0,n.jsxs)(mt,{...u,$extended:p,"aria-label":l,"data-extended":p,onTransitionEnd:_,children:[(0,n.jsx)(ht,{$extended:p,children:(0,n.jsx)(U,{"aria-label":p?`Collapse sidebar`:`Expand sidebar`,"aria-expanded":p,onClick:g,size:`sm`,ghost:!0,icon:p?r.ChevronLeft:r.ChevronRight})}),(0,n.jsx)(gt,{"aria-label":c,children:t.map(e=>v(e))}),(0,n.jsx)(vt,{children:v(i)})]})}var bt=t.styled.div`
|
|
860
865
|
position: relative;
|
|
861
866
|
display: block;
|
|
862
867
|
width: 100%;
|
|
@@ -864,69 +869,69 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
864
869
|
aspect-ratio: ${({$aspectRatio:e})=>e};
|
|
865
870
|
box-sizing: border-box;
|
|
866
871
|
overflow: hidden;
|
|
867
|
-
padding: ${({theme:e})=>
|
|
868
|
-
border: ${({theme:e})=>
|
|
869
|
-
border-radius: ${({theme:e})=>
|
|
870
|
-
background: ${({theme:e})=>
|
|
871
|
-
color: ${({theme:e})=>
|
|
872
|
-
`,
|
|
872
|
+
padding: ${({theme:e})=>f(e).space.inset};
|
|
873
|
+
border: ${({theme:e})=>f(e).camera.border};
|
|
874
|
+
border-radius: ${({theme:e})=>f(e).camera.borderRadius};
|
|
875
|
+
background: ${({theme:e})=>f(e).colors.surface};
|
|
876
|
+
color: ${({theme:e})=>f(e).colors.text};
|
|
877
|
+
`,xt=t.styled.video`
|
|
873
878
|
position: absolute;
|
|
874
879
|
inset: 0;
|
|
875
880
|
width: 100%;
|
|
876
881
|
height: 100%;
|
|
877
882
|
object-fit: cover;
|
|
878
|
-
`,
|
|
883
|
+
`,St=t.styled.div`
|
|
879
884
|
position: absolute;
|
|
880
885
|
inset: 0;
|
|
881
886
|
display: flex;
|
|
882
887
|
align-items: center;
|
|
883
888
|
justify-content: center;
|
|
884
|
-
background: ${({theme:e})=>
|
|
885
|
-
color: ${({theme:e})=>
|
|
886
|
-
font-family: ${({theme:e})=>
|
|
887
|
-
font-size: ${({theme:e})=>
|
|
888
|
-
font-weight: ${({theme:e})=>
|
|
889
|
-
|
|
889
|
+
background: ${({theme:e})=>f(e).colors.secondary};
|
|
890
|
+
color: ${({theme:e})=>f(e).colors.primary};
|
|
891
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
892
|
+
font-size: ${({theme:e})=>f(e).camera.fallbackFontSize};
|
|
893
|
+
font-weight: ${({theme:e})=>f(e).camera.fallbackFontWeight};
|
|
894
|
+
`,$=t.styled.div`
|
|
890
895
|
position: absolute;
|
|
891
896
|
z-index: 1;
|
|
892
|
-
${({$placement:e})=>e===`top-right`?
|
|
893
|
-
top: ${({theme:e})=>
|
|
894
|
-
right: ${({theme:e})=>
|
|
895
|
-
`:
|
|
896
|
-
right: ${({theme:e})=>
|
|
897
|
-
bottom: ${({theme:e})=>
|
|
897
|
+
${({$placement:e})=>e===`top-right`?t.css`
|
|
898
|
+
top: ${({theme:e})=>f(e).space.inset};
|
|
899
|
+
right: ${({theme:e})=>f(e).space.inset};
|
|
900
|
+
`:t.css`
|
|
901
|
+
right: ${({theme:e})=>f(e).space.inset};
|
|
902
|
+
bottom: ${({theme:e})=>f(e).space.inset};
|
|
898
903
|
`}
|
|
899
|
-
`,
|
|
904
|
+
`,Ct=t.styled.span`
|
|
900
905
|
position: absolute;
|
|
901
906
|
z-index: 1;
|
|
902
|
-
bottom: ${({theme:e})=>
|
|
903
|
-
left: ${({theme:e})=>
|
|
904
|
-
max-width: ${({theme:e})=>`calc(100% - ${
|
|
907
|
+
bottom: ${({theme:e})=>f(e).space.inset};
|
|
908
|
+
left: ${({theme:e})=>f(e).space.inset};
|
|
909
|
+
max-width: ${({theme:e})=>`calc(100% - ${f(e).camera.nameMaxWidthOffset})`};
|
|
905
910
|
overflow: hidden;
|
|
906
|
-
padding: ${({theme:e})=>`${
|
|
907
|
-
border-radius: ${({theme:e})=>
|
|
908
|
-
background: ${({theme:e})=>`color-mix(in srgb, ${
|
|
909
|
-
color: ${({theme:e})=>
|
|
910
|
-
font-family: ${({theme:e})=>
|
|
911
|
-
font-size: ${({theme:e})=>
|
|
911
|
+
padding: ${({theme:e})=>`${f(e).space.xs} ${f(e).space.sm}`};
|
|
912
|
+
border-radius: ${({theme:e})=>f(e).camera.nameBorderRadius};
|
|
913
|
+
background: ${({theme:e})=>`color-mix(in srgb, ${f(e).colors.ink} 65%, transparent)`};
|
|
914
|
+
color: ${({theme:e})=>f(e).colors.muted};
|
|
915
|
+
font-family: ${({theme:e})=>f(e).font.sans};
|
|
916
|
+
font-size: ${({theme:e})=>f(e).typography.small};
|
|
912
917
|
text-overflow: ellipsis;
|
|
913
918
|
white-space: nowrap;
|
|
914
|
-
`;function
|
|
919
|
+
`;function wt({firstName:t,lastName:i,stream:a,cameraEnabled:o,audioEnabled:s,onCameraToggle:c,onAudioToggle:l,aspectRatio:u=16/9,...d}){let f=(0,e.useRef)(null),p=`${t} ${i}`.trim(),m=`${t.charAt(0)}${i.charAt(0)}`.toUpperCase(),h=o&&!!a;return(0,e.useEffect)(()=>{let e=f.current;if(e)return e.srcObject=h?a??null:null,()=>{e.srcObject=null}},[h,a]),(0,n.jsxs)(bt,{...d,$aspectRatio:Number.isFinite(u)&&u>0?u:16/9,role:`group`,"aria-label":`${p} camera`,children:[h?(0,n.jsx)(xt,{ref:f,autoPlay:!0,muted:!0,playsInline:!0}):(0,n.jsx)(St,{"aria-hidden":`true`,children:m}),(0,n.jsx)($,{$placement:`top-right`,children:(0,n.jsx)(U,{"aria-label":`Turn camera ${o?`off`:`on`}`,"aria-pressed":o,variant:`primary`,size:`md`,shape:`rounded`,ghost:!0,onClick:c,icon:o?r.Video:r.VideoOff})}),(0,n.jsx)($,{$placement:`bottom-right`,children:(0,n.jsx)(U,{"aria-label":`Turn audio ${s?`off`:`on`}`,"aria-pressed":s,variant:`primary`,size:`md`,shape:`rounded`,ghost:!0,onClick:l,icon:s?r.Mic:r.MicOff})}),(0,n.jsx)(Ct,{children:p})]})}var Tt=t.createGlobalStyle`
|
|
915
920
|
:root {
|
|
916
|
-
--jynko-shadow-solid: ${({theme:e})=>
|
|
917
|
-
--jynko-modal-padding: ${({theme:e})=>
|
|
918
|
-
--jynko-modal-max-width: ${({theme:e})=>
|
|
919
|
-
--jynko-modal-max-height: ${({theme:e})=>
|
|
920
|
-
--jynko-modal-border-radius: ${({theme:e})=>
|
|
921
|
-
--jynko-modal-box-shadow: ${({theme:e})=>
|
|
921
|
+
--jynko-shadow-solid: ${({theme:e})=>f(e).shadow.button};
|
|
922
|
+
--jynko-modal-padding: ${({theme:e})=>f(e).modal.padding};
|
|
923
|
+
--jynko-modal-max-width: ${({theme:e})=>f(e).modal.maxWidth};
|
|
924
|
+
--jynko-modal-max-height: ${({theme:e})=>f(e).modal.maxHeight};
|
|
925
|
+
--jynko-modal-border-radius: ${({theme:e})=>f(e).modal.borderRadius};
|
|
926
|
+
--jynko-modal-box-shadow: ${({theme:e})=>f(e).shadow.modal};
|
|
922
927
|
}
|
|
923
928
|
|
|
924
929
|
button {
|
|
925
|
-
border: ${({theme:e})=>
|
|
926
|
-
border-radius: ${({theme:e})=>
|
|
927
|
-
padding: ${({theme:e})=>
|
|
928
|
-
font-size: ${({theme:e})=>
|
|
929
|
-
text-transform: ${({theme:e})=>
|
|
930
|
+
border: ${({theme:e})=>f(e).button.border};
|
|
931
|
+
border-radius: ${({theme:e})=>f(e).button.borderRadius};
|
|
932
|
+
padding: ${({theme:e})=>f(e).button.padding};
|
|
933
|
+
font-size: ${({theme:e})=>f(e).button.fontSize};
|
|
934
|
+
text-transform: ${({theme:e})=>f(e).button.textTransform};
|
|
930
935
|
}
|
|
931
|
-
`;function
|
|
936
|
+
`;function Et({children:e,theme:r=d}){return(0,n.jsxs)(t.ThemeProvider,{theme:r,children:[(0,n.jsx)(Tt,{}),e]})}exports.AAvatar=m,exports.ABadge=S,exports.AButton=M,exports.AIcon=F,exports.AIconButton=U,exports.AIconLink=G,exports.AInput=he,exports.ALink=J,exports.ALogo=xe,exports.ASearchInput=ke,exports.ASection=je,exports.ASelect=We,exports.ATextarea=Je,exports.ATypography=Xe,exports.JynkoProvider=Et,exports.MModal=lt,exports.MNavLinks=ft,exports.MUserBadge=Q,exports.OSidebar=yt,exports.OUserCamera=wt,exports.theme=d;
|
|
932
937
|
//# sourceMappingURL=index.cjs.map
|