blunt-ui 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +5 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts +8 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.test.d.ts +0 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts +13 -0
- package/dist/components/ConfirmDialog/index.d.ts +4 -0
- package/dist/components/ConfirmDialog/useConfirm.d.ts +6 -0
- package/dist/components/ConfirmDialog/useConfirm.test.d.ts +0 -0
- package/dist/components/ConfirmDialog/useConfirm.types.d.ts +14 -0
- package/dist/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +11 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +0 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +14 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/Editable/Editable.d.ts +5 -0
- package/dist/components/Editable/Editable.stories.d.ts +10 -0
- package/dist/components/Editable/Editable.types.d.ts +9 -0
- package/dist/components/Editable/index.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +5 -0
- package/dist/components/Field/Field.stories.d.ts +8 -0
- package/dist/components/Field/Field.types.d.ts +6 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/useForm.d.ts +2 -0
- package/dist/components/Form/useForm.test.d.ts +1 -0
- package/dist/components/Form/useForm.types.d.ts +20 -0
- package/dist/components/Input/Input.types.d.ts +1 -1
- package/dist/components/Select/Select.types.d.ts +2 -3
- package/dist/components/Spinner/Spinner.d.ts +5 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +9 -0
- package/dist/components/Spinner/Spinner.types.d.ts +8 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.stories.d.ts +2 -10
- package/dist/components/Table/Table.types.d.ts +2 -1
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/useTable.d.ts +12 -0
- package/dist/components/Table/useTableSort.d.ts +1 -1
- package/dist/components/Textarea/Textarea.d.ts +5 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +8 -0
- package/dist/components/Textarea/Textarea.types.d.ts +11 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/useToast.d.ts +6 -0
- package/dist/components/Toast/useToast.test.d.ts +0 -0
- package/dist/components/Toast/useToast.types.d.ts +17 -0
- package/dist/index.cjs +576 -257
- package/dist/index.d.ts +21 -14
- package/dist/index.js +1757 -1221
- package/dist/{components/ThemeProvider/index.d.ts → themes/ThemeProvider.d.ts} +1 -1
- package/dist/themes/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/components/DataTable/DataTable.d.ts +0 -5
- package/dist/components/DataTable/DataTable.stories.d.ts +0 -13
- package/dist/components/DataTable/DataTable.types.d.ts +0 -25
- package/dist/components/DataTable/index.d.ts +0 -2
- package/dist/themes/default.d.ts +0 -2
- /package/dist/{styles → themes}/GlobalStyles.d.ts +0 -0
- /package/dist/{consts.d.ts → themes/consts.d.ts} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("styled-components"),l=require("react"),bo=require("react-dom"),B=(o,r,n)=>s.css`
|
|
2
2
|
background: ${r};
|
|
3
3
|
color: ${n};
|
|
4
4
|
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
5
5
|
box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
|
|
6
|
-
`,
|
|
6
|
+
`,Oo=s.span`
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
font-weight: 700;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
font-size: ${r.fontSizes.sm};
|
|
24
24
|
`})[o]}
|
|
25
25
|
|
|
26
|
-
${({$variant:o,theme:r})=>r.brutalism?{primary:
|
|
26
|
+
${({$variant:o,theme:r})=>r.brutalism?{primary:B(r,r.colors.primary[500],r.colors.primary.contrast),neutral:B(r,r.colors.neutral[200],r.colors.neutral[900]),success:B(r,r.colors.success[50],r.colors.success[500]),error:B(r,r.colors.error[50],r.colors.error[500]),warning:B(r,r.colors.warning[50],r.colors.warning[500]),info:B(r,r.colors.info[50],r.colors.info[500])}[o]:{primary:s.css`
|
|
27
27
|
background: ${r.colors.primary[50]};
|
|
28
28
|
color: ${r.colors.primary[500]};
|
|
29
29
|
`,neutral:s.css`
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
background: ${r.colors.info[50]};
|
|
43
43
|
color: ${r.colors.info[500]};
|
|
44
44
|
`}[o]}
|
|
45
|
-
`;function
|
|
45
|
+
`;function go({variant:o="primary",size:r="md",children:n,...e}){return t.jsx(Oo,{$variant:o,$size:r,...e,children:n})}go.displayName="Badge";const J=(o,r,n)=>s.css`
|
|
46
46
|
background-color: ${r};
|
|
47
47
|
color: ${n};
|
|
48
48
|
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
transform: translate(2px, 2px);
|
|
56
56
|
box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,No=s.button`
|
|
59
59
|
display: inline-flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
justify-content: center;
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
padding: ${r.spacing[3]} ${r.spacing[6]};
|
|
108
108
|
font-size: ${r.fontSizes.lg};
|
|
109
109
|
`})[o]}
|
|
110
|
-
`;function
|
|
110
|
+
`;function H({ref:o,as:r,href:n,variant:e="primary",size:a="md",isLoading:i,disabled:c,children:d,...f}){const $=r??(n?"a":"button");return t.jsx(No,{ref:o,as:$,href:n,$variant:e,$size:a,disabled:i||c,...f,children:i?"Loading...":d})}H.displayName="Button";const Fo=s.div`
|
|
111
111
|
display: flex;
|
|
112
112
|
flex-direction: column;
|
|
113
113
|
gap: ${({theme:o})=>o.spacing[1]};
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
`,Lo=s.label`
|
|
116
116
|
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
117
117
|
font-weight: ${({theme:o})=>o.brutalism?"700":"500"};
|
|
118
|
-
`,
|
|
118
|
+
`,Bo=s.span`
|
|
119
119
|
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
120
120
|
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
121
|
-
`,
|
|
121
|
+
`,Vo=s.div`
|
|
122
122
|
display: flex;
|
|
123
123
|
align-items: center;
|
|
124
124
|
border-radius: ${({theme:o})=>o.radius.md};
|
|
@@ -148,9 +148,6 @@
|
|
|
148
148
|
`,outlined:s.css`
|
|
149
149
|
border: 2px solid ${r.colors.primary[500]};
|
|
150
150
|
background-color: ${r.colors.neutral[0]};
|
|
151
|
-
`,filled:s.css`
|
|
152
|
-
border: 1px solid transparent;
|
|
153
|
-
background-color: ${r.colors.neutral[100]};
|
|
154
151
|
`}[o]}
|
|
155
152
|
|
|
156
153
|
${({$error:o,theme:r})=>o&&s.css`
|
|
@@ -174,11 +171,11 @@
|
|
|
174
171
|
cursor: not-allowed;
|
|
175
172
|
opacity: 0.6;
|
|
176
173
|
}
|
|
177
|
-
`,
|
|
174
|
+
`,to=s.div`
|
|
178
175
|
display: inline-flex;
|
|
179
176
|
align-items: center;
|
|
180
177
|
margin: 0 ${({theme:o})=>o.spacing[1]};
|
|
181
|
-
`,
|
|
178
|
+
`,Ao=s.button`
|
|
182
179
|
display: inline-flex;
|
|
183
180
|
align-items: center;
|
|
184
181
|
margin: 0 ${({theme:o})=>o.spacing[1]};
|
|
@@ -191,19 +188,266 @@
|
|
|
191
188
|
&:hover {
|
|
192
189
|
opacity: 0.8;
|
|
193
190
|
}
|
|
194
|
-
`;function
|
|
191
|
+
`;function xo({ref:o,type:r="text",size:n="md",variant:e="default",label:a,helperText:i,error:c,leftElement:d,rightElement:f,clearable:$,onClear:b,fullWidth:y,id:g,value:p,defaultValue:x,onChange:m,...S}){const C=l.useId(),j=g??C,z=`${j}-hint`,[k,w]=l.useState(x??""),v=p!==void 0,T=v?p:k,I=typeof c=="string"?c:void 0,W=!!(i||c),M=D=>{v||w(D.target.value),m?.(D)},V=()=>{v||w(""),b?.()};return t.jsxs(Fo,{$fullWidth:y,children:[a&&t.jsx(Lo,{htmlFor:j,children:a}),t.jsxs(Vo,{$size:n,$variant:e,$error:!!c,children:[d&&t.jsx(to,{children:d}),t.jsx(_o,{id:j,ref:o,type:r,value:T,onChange:M,...S,"aria-invalid":!!c,"aria-describedby":W?z:void 0}),$&&T&&t.jsx(Ao,{type:"button",onClick:V,"aria-label":"Clear input",children:"✕"}),f&&t.jsx(to,{children:f})]}),W&&t.jsx(Bo,{id:z,$error:!!c,children:I??i})]})}xo.displayName="Input";const Ro=s.div`
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: ${({theme:o})=>o.spacing[1]};
|
|
195
|
+
width: ${({$fullWidth:o})=>o?"100%":"auto"};
|
|
196
|
+
`,Yo=s.label`
|
|
197
|
+
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
198
|
+
font-weight: ${({theme:o})=>o.brutalism?"700":"500"};
|
|
199
|
+
`,Ho=s.span`
|
|
200
|
+
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
201
|
+
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
202
|
+
`,qo=s.div`
|
|
203
|
+
display: flex;
|
|
204
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
205
|
+
transition:
|
|
206
|
+
border-color 0.2s,
|
|
207
|
+
box-shadow 0.2s;
|
|
208
|
+
|
|
209
|
+
${({$size:o="md",theme:r})=>({sm:s.css`
|
|
210
|
+
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
211
|
+
font-size: ${r.fontSizes.sm};
|
|
212
|
+
`,md:s.css`
|
|
213
|
+
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
214
|
+
font-size: ${r.fontSizes.md};
|
|
215
|
+
`,lg:s.css`
|
|
216
|
+
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
217
|
+
font-size: ${r.fontSizes.lg};
|
|
218
|
+
`})[o]}
|
|
219
|
+
|
|
220
|
+
${({$variant:o="default",theme:r})=>r.brutalism?s.css`
|
|
221
|
+
border: ${r.brutalism.borderWidth} solid
|
|
222
|
+
${r.colors.neutral[900]};
|
|
223
|
+
background-color: ${r.colors.neutral[0]};
|
|
224
|
+
box-shadow: 3px 3px 0 ${r.colors.neutral[900]};
|
|
225
|
+
`:{default:s.css`
|
|
226
|
+
border: 1px solid ${r.colors.neutral[400]};
|
|
227
|
+
background-color: ${r.colors.neutral[0]};
|
|
228
|
+
`,outlined:s.css`
|
|
229
|
+
border: 2px solid ${r.colors.primary[500]};
|
|
230
|
+
background-color: ${r.colors.neutral[0]};
|
|
231
|
+
`}[o]}
|
|
232
|
+
|
|
233
|
+
${({$error:o,theme:r})=>o&&s.css`
|
|
234
|
+
border-color: ${r.colors.error[500]};
|
|
235
|
+
${r.brutalism&&s.css`
|
|
236
|
+
box-shadow: 3px 3px 0 ${r.colors.error[500]};
|
|
237
|
+
`}
|
|
238
|
+
`}
|
|
239
|
+
|
|
240
|
+
&:focus-within {
|
|
241
|
+
box-shadow: ${({theme:o})=>o.shadows.focusRing};
|
|
242
|
+
}
|
|
243
|
+
`,Uo=s.textarea`
|
|
244
|
+
flex: 1;
|
|
245
|
+
border: none;
|
|
246
|
+
outline: none;
|
|
247
|
+
background: transparent;
|
|
248
|
+
font: inherit;
|
|
249
|
+
resize: vertical;
|
|
250
|
+
min-height: 80px;
|
|
251
|
+
|
|
252
|
+
&:disabled {
|
|
253
|
+
cursor: not-allowed;
|
|
254
|
+
opacity: 0.6;
|
|
255
|
+
}
|
|
256
|
+
`;function yo({ref:o,size:r="md",variant:n="default",label:e,helperText:a,error:i,fullWidth:c,id:d,value:f,defaultValue:$,onChange:b,...y}){const g=l.useId(),p=d??g,x=`${p}-hint`,[m,S]=l.useState($??""),C=f!==void 0,j=C?f:m,z=typeof i=="string"?i:void 0,k=!!(a||i),w=v=>{C||S(v.target.value),b?.(v)};return t.jsxs(Ro,{$fullWidth:c,children:[e&&t.jsx(Yo,{htmlFor:p,children:e}),t.jsx(qo,{$size:r,$variant:n,$error:!!i,children:t.jsx(Uo,{id:p,ref:o,value:j,onChange:w,...y,"aria-invalid":!!i,"aria-describedby":k?x:void 0})}),k&&t.jsx(Ho,{id:x,$error:!!i,children:z??a})]})}yo.displayName="Textarea";const ho=(...o)=>o.filter((r,n,e)=>!!r&&r.trim()!==""&&e.indexOf(r)===n).join(" ").trim();const Ko=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Go=o=>o.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,n,e)=>e?e.toUpperCase():n.toLowerCase());const eo=o=>{const r=Go(o);return r.charAt(0).toUpperCase()+r.slice(1)};var X={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Jo=o=>{for(const r in o)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},Xo=l.createContext({}),Zo=()=>l.useContext(Xo),Qo=l.forwardRef(({color:o,size:r,strokeWidth:n,absoluteStrokeWidth:e,className:a="",children:i,iconNode:c,...d},f)=>{const{size:$=24,strokeWidth:b=2,absoluteStrokeWidth:y=!1,color:g="currentColor",className:p=""}=Zo()??{},x=e??y?Number(n??b)*24/Number(r??$):n??b;return l.createElement("svg",{ref:f,...X,width:r??$??X.width,height:r??$??X.height,stroke:o??g,strokeWidth:x,className:ho("lucide",p,a),...!i&&!Jo(d)&&{"aria-hidden":"true"},...d},[...c.map(([m,S])=>l.createElement(m,S)),...Array.isArray(i)?i:[i]])});const N=(o,r)=>{const n=l.forwardRef(({className:e,...a},i)=>l.createElement(Qo,{ref:i,iconNode:r,className:ho(`lucide-${Ko(eo(o))}`,`lucide-${o}`,e),...a}));return n.displayName=eo(o),n};const or=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],rr=N("arrow-down",or);const sr=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],nr=N("arrow-up-down",sr);const tr=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],er=N("arrow-up",tr);const ir=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],ar=N("calendar",ir);const lr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mo=N("chevron-down",lr);const cr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dr=N("chevron-left",cr);const ur=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],pr=N("chevron-right",ur);const fr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Q=N("x",fr),$r=s.div`
|
|
257
|
+
display: inline-flex;
|
|
258
|
+
flex-direction: column;
|
|
259
|
+
gap: ${({theme:o})=>o.spacing[1]};
|
|
260
|
+
width: ${({$fullWidth:o})=>o?"100%":"auto"};
|
|
261
|
+
`,br=s.div`
|
|
262
|
+
position: relative;
|
|
263
|
+
display: flex;
|
|
264
|
+
width: 100%;
|
|
265
|
+
`,gr=s.span`
|
|
266
|
+
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
267
|
+
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
268
|
+
`,xr=s.select`
|
|
269
|
+
appearance: none;
|
|
270
|
+
width: 100%;
|
|
271
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
272
|
+
cursor: pointer;
|
|
273
|
+
font: inherit;
|
|
274
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
275
|
+
transition:
|
|
276
|
+
border-color 0.2s,
|
|
277
|
+
box-shadow 0.2s;
|
|
278
|
+
|
|
279
|
+
${({$size:o,theme:r})=>({sm:s.css`
|
|
280
|
+
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
281
|
+
font-size: ${r.fontSizes.sm};
|
|
282
|
+
`,md:s.css`
|
|
283
|
+
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
284
|
+
font-size: ${r.fontSizes.md};
|
|
285
|
+
`,lg:s.css`
|
|
286
|
+
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
287
|
+
font-size: ${r.fontSizes.lg};
|
|
288
|
+
`})[o]}
|
|
289
|
+
|
|
290
|
+
padding-right: 2.5rem;
|
|
291
|
+
|
|
292
|
+
${({$variant:o,theme:r})=>r.brutalism?s.css`
|
|
293
|
+
border: ${r.brutalism.borderWidth} solid
|
|
294
|
+
${r.colors.neutral[900]};
|
|
295
|
+
background-color: ${r.colors.neutral[0]};
|
|
296
|
+
box-shadow: 3px 3px 0 ${r.colors.neutral[900]};
|
|
297
|
+
`:{default:s.css`
|
|
298
|
+
border: 1px solid ${r.colors.neutral[400]};
|
|
299
|
+
background-color: ${r.colors.neutral[0]};
|
|
300
|
+
`,outlined:s.css`
|
|
301
|
+
border: 2px solid ${r.colors.primary[500]};
|
|
302
|
+
background-color: ${r.colors.neutral[0]};
|
|
303
|
+
`}[o]}
|
|
304
|
+
|
|
305
|
+
${({$error:o,theme:r})=>o&&s.css`
|
|
306
|
+
border-color: ${r.colors.error[500]};
|
|
307
|
+
`}
|
|
308
|
+
|
|
309
|
+
&:focus {
|
|
310
|
+
outline: none;
|
|
311
|
+
box-shadow: ${({theme:o})=>o.shadows.focusRing};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&:disabled {
|
|
315
|
+
cursor: not-allowed;
|
|
316
|
+
opacity: 0.6;
|
|
317
|
+
}
|
|
318
|
+
`,yr=s.button`
|
|
319
|
+
position: absolute;
|
|
320
|
+
right: ${({theme:o})=>o.spacing[3]};
|
|
321
|
+
top: 50%;
|
|
322
|
+
transform: translateY(-50%);
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
padding: 0;
|
|
326
|
+
background: none;
|
|
327
|
+
border: none;
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
330
|
+
|
|
331
|
+
&:hover {
|
|
332
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&:focus-visible {
|
|
336
|
+
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
337
|
+
outline-offset: 2px;
|
|
338
|
+
border-radius: 2px;
|
|
339
|
+
}
|
|
340
|
+
`,hr=s.span`
|
|
341
|
+
position: absolute;
|
|
342
|
+
right: ${({theme:o})=>o.spacing[3]};
|
|
343
|
+
top: 50%;
|
|
344
|
+
transform: translateY(-50%);
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
display: flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
349
|
+
`;function wo({options:o,placeholder:r,size:n="md",variant:e="default",error:a,fullWidth:i,clearable:c,onClear:d,id:f,value:$,defaultValue:b,onChange:y,...g}){const p=l.useId(),x=f??p,m=`${x}-hint`,S=typeof a=="string"?a:void 0,[C,j]=l.useState(b??""),z=$!==void 0,k=z?$:C,w=I=>{z||j(I.target.value),y?.(I)},v=()=>{z||j(""),d?.()},T=c&&!!k;return t.jsxs($r,{$fullWidth:i,children:[t.jsxs(br,{children:[t.jsxs(xr,{id:x,$size:n,$variant:e,$error:!!a,"aria-invalid":!!a,"aria-describedby":S?m:void 0,value:k,onChange:w,...g,children:[r&&t.jsx("option",{value:"",disabled:!0,children:r}),o.map(I=>t.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))]}),T?t.jsx(yr,{type:"button",onClick:v,"aria-label":"Clear selection",children:t.jsx(Q,{size:14})}):t.jsx(hr,{"aria-hidden":"true",children:t.jsx(mo,{size:14})})]}),S&&t.jsx(gr,{id:m,$error:!0,children:S})]})}wo.displayName="Select";const io=s.span`
|
|
350
|
+
display: inline-block;
|
|
351
|
+
`,mr=s.span`
|
|
352
|
+
display: inline-block;
|
|
353
|
+
min-width: 60px;
|
|
354
|
+
padding: ${({theme:o})=>`${o.spacing[1]} ${o.spacing[2]}`};
|
|
355
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
356
|
+
color: ${({$empty:o,theme:r})=>o?r.colors.neutral[400]:"inherit"};
|
|
357
|
+
|
|
358
|
+
${({theme:o})=>o.brutalism?s.css`
|
|
359
|
+
border: ${o.brutalism.borderWidth} solid transparent;
|
|
360
|
+
`:s.css`
|
|
361
|
+
border: 1px solid transparent;
|
|
362
|
+
`}
|
|
363
|
+
|
|
364
|
+
${({$disabled:o,theme:r})=>o?s.css`
|
|
365
|
+
opacity: 0.5;
|
|
366
|
+
`:s.css`
|
|
367
|
+
cursor: text;
|
|
368
|
+
|
|
369
|
+
&:hover {
|
|
370
|
+
${r.brutalism?s.css`
|
|
371
|
+
border-color: ${r.colors.neutral[900]};
|
|
372
|
+
box-shadow: ${r.brutalism.shadowOffset}
|
|
373
|
+
${r.brutalism.shadowOffset} 0
|
|
374
|
+
${r.colors.neutral[900]};
|
|
375
|
+
`:s.css`
|
|
376
|
+
border-color: ${r.colors.primary[500]};
|
|
377
|
+
box-shadow: ${r.shadows.focusRing};
|
|
378
|
+
`}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
&:focus {
|
|
382
|
+
outline: none;
|
|
383
|
+
box-shadow: ${r.shadows.focusRing};
|
|
384
|
+
}
|
|
385
|
+
`}
|
|
386
|
+
`,wr=s.input`
|
|
387
|
+
display: inline-block;
|
|
388
|
+
min-width: 60px;
|
|
389
|
+
padding: ${({theme:o})=>`${o.spacing[1]} ${o.spacing[2]}`};
|
|
390
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
391
|
+
font: inherit;
|
|
392
|
+
color: inherit;
|
|
393
|
+
background: ${({theme:o})=>o.colors.neutral[0]};
|
|
394
|
+
outline: none;
|
|
395
|
+
|
|
396
|
+
${({theme:o})=>o.brutalism?s.css`
|
|
397
|
+
border: ${o.brutalism.borderWidth} solid
|
|
398
|
+
${o.colors.neutral[900]};
|
|
399
|
+
box-shadow: ${o.brutalism.shadowOffset}
|
|
400
|
+
${o.brutalism.shadowOffset} 0 ${o.colors.neutral[900]};
|
|
401
|
+
`:s.css`
|
|
402
|
+
border: 1px solid ${o.colors.primary[500]};
|
|
403
|
+
box-shadow: ${o.shadows.focusRing};
|
|
404
|
+
`}
|
|
405
|
+
`;function vo({value:o,defaultValue:r="",onChange:n,onSubmit:e,onCancel:a,placeholder:i="Click to edit",disabled:c=!1}){const d=o!==void 0,[f,$]=l.useState(r),b=d?o:f,[y,g]=l.useState(!1),[p,x]=l.useState(""),m=l.useRef(null),S=()=>{c||(x(b),g(!0),setTimeout(()=>{m.current?.focus(),m.current?.select()},0))},C=()=>{d||$(p),n?.(p),e?.(p),g(!1)},j=()=>{a?.(b),g(!1)},z=k=>{k.key==="Enter"?C():k.key==="Escape"&&j()};return y?t.jsx(io,{children:t.jsx(wr,{ref:m,value:p,size:Math.max(p.length,i.length,10),onChange:k=>x(k.target.value),onBlur:C,onKeyDown:z,"aria-label":"Edit value"})}):t.jsx(io,{children:t.jsx(mr,{role:c?void 0:"button",tabIndex:c?void 0:0,$disabled:c,$empty:!b,onClick:S,onKeyDown:k=>k.key==="Enter"&&S(),children:b||i})})}vo.displayName="Editable";const vr=s.a`
|
|
406
|
+
text-decoration: underline;
|
|
407
|
+
text-underline-offset: 2px;
|
|
408
|
+
transition: color 0.15s;
|
|
409
|
+
|
|
410
|
+
&:focus-visible {
|
|
411
|
+
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
412
|
+
outline-offset: 2px;
|
|
413
|
+
border-radius: 2px;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
${({$variant:o,theme:r})=>({default:s.css`
|
|
417
|
+
color: ${r.colors.primary[500]};
|
|
418
|
+
&:hover {
|
|
419
|
+
color: ${r.colors.primary[700]};
|
|
420
|
+
}
|
|
421
|
+
`,subtle:s.css`
|
|
422
|
+
color: ${r.colors.neutral[500]};
|
|
423
|
+
&:hover {
|
|
424
|
+
color: ${r.colors.neutral[900]};
|
|
425
|
+
}
|
|
426
|
+
`})[o]}
|
|
427
|
+
`;function oo({variant:o="default",external:r,children:n,...e}){return t.jsx(vr,{$variant:o,...r&&{target:"_blank",rel:"noreferrer"},...e,children:n})}oo.displayName="Link";const kr=s.div`
|
|
428
|
+
display: flex;
|
|
429
|
+
flex-direction: column;
|
|
430
|
+
gap: ${({theme:o})=>o.spacing[1]};
|
|
431
|
+
`,Sr=s.span`
|
|
432
|
+
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
433
|
+
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
434
|
+
font-weight: ${({theme:o})=>o.brutalism?"700":"500"};
|
|
435
|
+
`,jr=s.span`
|
|
436
|
+
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
437
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
438
|
+
`;function ko({label:o,value:r,href:n}){return t.jsxs(kr,{children:[t.jsx(Sr,{children:o}),n?t.jsx(oo,{href:n,external:!0,children:r}):t.jsx(jr,{children:r??"—"})]})}ko.displayName="Field";const Cr=s.keyframes`
|
|
195
439
|
from { opacity: 0; }
|
|
196
440
|
to { opacity: 1; }
|
|
197
|
-
`,
|
|
441
|
+
`,zr=s.keyframes`
|
|
198
442
|
from { opacity: 1; }
|
|
199
443
|
to { opacity: 0; }
|
|
200
|
-
`,
|
|
444
|
+
`,Tr=s.keyframes`
|
|
201
445
|
from { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
202
446
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
203
|
-
`,
|
|
447
|
+
`,Ir=s.keyframes`
|
|
204
448
|
from { opacity: 1; transform: scale(1) translateY(0); }
|
|
205
449
|
to { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
206
|
-
`,
|
|
450
|
+
`,Mr=s.div`
|
|
207
451
|
position: fixed;
|
|
208
452
|
inset: 0;
|
|
209
453
|
background-color: rgba(0, 0, 0, 0.5);
|
|
@@ -211,9 +455,9 @@
|
|
|
211
455
|
align-items: center;
|
|
212
456
|
justify-content: center;
|
|
213
457
|
z-index: ${({theme:o})=>o.zIndex.modal};
|
|
214
|
-
animation: ${({$closing:o})=>o?
|
|
458
|
+
animation: ${({$closing:o})=>o?zr:Cr} 0.15s ease
|
|
215
459
|
forwards;
|
|
216
|
-
`,
|
|
460
|
+
`,Dr=s.div`
|
|
217
461
|
position: relative;
|
|
218
462
|
background: ${({theme:o})=>o.colors.neutral[0]};
|
|
219
463
|
border-radius: ${({theme:o})=>o.radius.md};
|
|
@@ -222,7 +466,7 @@
|
|
|
222
466
|
display: flex;
|
|
223
467
|
flex-direction: column;
|
|
224
468
|
max-height: 90vh;
|
|
225
|
-
animation: ${({$closing:o})=>o?
|
|
469
|
+
animation: ${({$closing:o})=>o?Ir:Tr} 0.15s ease
|
|
226
470
|
forwards;
|
|
227
471
|
|
|
228
472
|
${({$size:o})=>o==="sm"&&s.css`
|
|
@@ -240,19 +484,19 @@
|
|
|
240
484
|
max-height: 100vh;
|
|
241
485
|
border-radius: 0;
|
|
242
486
|
`}
|
|
243
|
-
`,
|
|
487
|
+
`,Er=s.div`
|
|
244
488
|
display: flex;
|
|
245
489
|
align-items: center;
|
|
246
490
|
gap: ${({theme:o})=>o.spacing[2]};
|
|
247
491
|
padding: ${({theme:o})=>o.spacing[4]};
|
|
248
492
|
border-bottom: 1px solid ${({theme:o})=>o.colors.neutral[200]};
|
|
249
493
|
flex-shrink: 0;
|
|
250
|
-
`,
|
|
494
|
+
`,Pr=s.h2`
|
|
251
495
|
flex: 1;
|
|
252
496
|
font-size: ${({theme:o})=>o.fontSizes.lg};
|
|
253
497
|
font-weight: 600;
|
|
254
498
|
margin: 0;
|
|
255
|
-
`,
|
|
499
|
+
`,Wr=s.button`
|
|
256
500
|
display: inline-flex;
|
|
257
501
|
align-items: center;
|
|
258
502
|
justify-content: center;
|
|
@@ -277,11 +521,11 @@
|
|
|
277
521
|
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
278
522
|
outline-offset: 2px;
|
|
279
523
|
}
|
|
280
|
-
`,
|
|
524
|
+
`,Or=s.div`
|
|
281
525
|
padding: ${({theme:o})=>o.spacing[4]};
|
|
282
526
|
overflow-y: auto;
|
|
283
527
|
flex: 1;
|
|
284
|
-
`,
|
|
528
|
+
`,Nr=s.div`
|
|
285
529
|
display: flex;
|
|
286
530
|
align-items: center;
|
|
287
531
|
justify-content: flex-end;
|
|
@@ -289,16 +533,16 @@
|
|
|
289
533
|
padding: ${({theme:o})=>o.spacing[4]};
|
|
290
534
|
border-top: 1px solid ${({theme:o})=>o.colors.neutral[200]};
|
|
291
535
|
flex-shrink: 0;
|
|
292
|
-
`,
|
|
536
|
+
`,Fr=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])'].join(", ");function ao(o){return Array.from(o.querySelectorAll(Fr))}function ro({open:o,onClose:r,title:n,children:e,footer:a,size:i="md",closeOnBackdrop:c=!0,closeOnEscape:d=!0,ariaLabelledBy:f,ariaDescribedBy:$}){const b=l.useRef(null),y=l.useId(),g=f??(n?y:void 0),[p,x]=l.useState(o),[m,S]=l.useState(!1);return l.useEffect(()=>{if(o)x(!0),S(!1);else if(p){S(!0);const C=setTimeout(()=>{x(!1),S(!1)},150);return()=>clearTimeout(C)}},[o,p]),l.useEffect(()=>{if(!o)return;const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=C}},[o]),l.useEffect(()=>{if(!o||!b.current)return;const C=b.current,j=document.activeElement;(ao(C)[0]??C).focus();const k=w=>{if(w.key==="Escape"&&d){r();return}if(w.key!=="Tab")return;const v=ao(C);if(v.length===0){w.preventDefault();return}const T=v[0],I=v[v.length-1];w.shiftKey?document.activeElement===T&&(w.preventDefault(),I.focus()):document.activeElement===I&&(w.preventDefault(),T.focus())};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),j?.focus()}},[o,d,r,p]),p?bo.createPortal(t.jsx(Mr,{$closing:m,onClick:c?r:void 0,children:t.jsxs(Dr,{ref:b,role:"dialog","aria-modal":"true","aria-labelledby":g,"aria-describedby":$,$size:i,$closing:m,tabIndex:-1,onClick:C=>C.stopPropagation(),children:[t.jsxs(Er,{children:[n&&t.jsx(Pr,{id:y,children:n}),t.jsx(Wr,{onClick:r,"aria-label":"Close modal",children:"×"})]}),t.jsx(Or,{children:e}),a&&t.jsx(Nr,{children:a})]})}),document.body):null}ro.displayName="Modal";const Lr=s.keyframes`
|
|
293
537
|
from { opacity: 0; transform: translateY(12px); }
|
|
294
538
|
to { opacity: 1; transform: translateY(0); }
|
|
295
|
-
|
|
539
|
+
`,Br=s.keyframes`
|
|
296
540
|
from { opacity: 0; transform: translateY(-12px); }
|
|
297
541
|
to { opacity: 1; transform: translateY(0); }
|
|
298
|
-
`,
|
|
542
|
+
`,Vr=s.keyframes`
|
|
299
543
|
from { opacity: 1; }
|
|
300
544
|
to { opacity: 0; }
|
|
301
|
-
`,
|
|
545
|
+
`,_r=s.div`
|
|
302
546
|
position: fixed;
|
|
303
547
|
z-index: ${({theme:o})=>o.zIndex.toast};
|
|
304
548
|
display: flex;
|
|
@@ -309,11 +553,11 @@
|
|
|
309
553
|
padding: ${({theme:o})=>`${o.spacing[3]} ${o.spacing[4]}`};
|
|
310
554
|
border-radius: ${({theme:o})=>o.radius.md};
|
|
311
555
|
animation: ${({$closing:o,$position:r})=>o?s.css`
|
|
312
|
-
${
|
|
556
|
+
${Vr} 0.2s ease forwards
|
|
313
557
|
`:r.startsWith("top")?s.css`
|
|
314
|
-
${
|
|
558
|
+
${Br} 0.2s ease forwards
|
|
315
559
|
`:s.css`
|
|
316
|
-
${
|
|
560
|
+
${Lr} 0.2s ease forwards
|
|
317
561
|
`};
|
|
318
562
|
|
|
319
563
|
${({$position:o,theme:r})=>({"bottom-right":s.css`
|
|
@@ -329,13 +573,13 @@
|
|
|
329
573
|
top: ${r.spacing[6]};
|
|
330
574
|
left: ${r.spacing[6]};
|
|
331
575
|
`})[o]}
|
|
332
|
-
`,
|
|
576
|
+
`,R=(o,r,n)=>s.css`
|
|
333
577
|
background: ${r};
|
|
334
578
|
border: ${o.brutalism.borderWidth} solid ${n};
|
|
335
579
|
box-shadow: ${o.brutalism.shadowOffset} ${o.brutalism.shadowOffset}
|
|
336
580
|
0 ${n};
|
|
337
|
-
`,
|
|
338
|
-
${({$variant:o,theme:r})=>r.brutalism?{success:
|
|
581
|
+
`,Ar=s(_r)`
|
|
582
|
+
${({$variant:o,theme:r})=>r.brutalism?{success:R(r,r.colors.success[50],r.colors.success[500]),error:R(r,r.colors.error[50],r.colors.error[500]),warning:R(r,r.colors.warning[50],r.colors.warning[500]),info:R(r,r.colors.info[50],r.colors.info[500])}[o]:{success:s.css`
|
|
339
583
|
background: ${r.colors.success[50]};
|
|
340
584
|
border-left: 4px solid ${r.colors.success[500]};
|
|
341
585
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
@@ -352,14 +596,14 @@
|
|
|
352
596
|
border-left: 4px solid ${r.colors.info[500]};
|
|
353
597
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
354
598
|
`}[o]}
|
|
355
|
-
`,
|
|
599
|
+
`,Rr=s.p`
|
|
356
600
|
flex: 1;
|
|
357
601
|
margin: 0;
|
|
358
602
|
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
359
603
|
font-weight: ${({theme:o})=>o.brutalism?600:400};
|
|
360
604
|
line-height: 1.5;
|
|
361
605
|
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
362
|
-
`,
|
|
606
|
+
`,Yr=s.button`
|
|
363
607
|
flex-shrink: 0;
|
|
364
608
|
display: inline-flex;
|
|
365
609
|
align-items: center;
|
|
@@ -381,143 +625,25 @@
|
|
|
381
625
|
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
382
626
|
outline-offset: 2px;
|
|
383
627
|
}
|
|
384
|
-
`;function so({open:o,onClose:r,message:n,variant:e="info",duration:
|
|
628
|
+
`;function so({open:o,onClose:r,message:n,variant:e="info",duration:a=4e3,position:i="bottom-right"}){const[c,d]=l.useState(o),[f,$]=l.useState(!1);return l.useEffect(()=>{if(o)d(!0),$(!1);else if(c){$(!0);const b=setTimeout(()=>{d(!1),$(!1)},200);return()=>{clearTimeout(b)}}},[o,c]),l.useEffect(()=>{if(!o||a===0)return;const b=setTimeout(r,a);return()=>{clearTimeout(b)}},[o,a,r]),c?bo.createPortal(t.jsxs(Ar,{$position:i,$variant:e,$closing:f,role:"alert","aria-live":"polite",children:[t.jsx(Rr,{children:n}),t.jsx(Yr,{onClick:r,"aria-label":"Close notification",children:t.jsx(Q,{size:14,strokeWidth:2.5})})]}),document.body):null}so.displayName="Toast";const So=l.createContext(null);function Hr({children:o}){const[r,n]=l.useState(null),e=l.useCallback(i=>{n({...i,id:Date.now()})},[]),a=l.useMemo(()=>Object.assign(i=>e(i),{success:(i,c)=>e({...c,message:i,variant:"success"}),error:(i,c)=>e({...c,message:i,variant:"error"}),warning:(i,c)=>e({...c,message:i,variant:"warning"}),info:(i,c)=>e({...c,message:i,variant:"info"})}),[e]);return t.jsxs(So.Provider,{value:{toast:a},children:[o,r&&t.jsx(so,{open:!0,onClose:()=>n(null),message:r.message,variant:r.variant,duration:r.duration,position:r.position},r.id)]})}function qr(){const o=l.useContext(So);if(!o)throw new Error("useToast must be used within a ToastProvider");return o}const Ur=s.form`
|
|
385
629
|
display: flex;
|
|
386
630
|
flex-direction: column;
|
|
387
631
|
gap: ${({theme:o})=>o.spacing[4]};
|
|
388
|
-
`,
|
|
632
|
+
`,Kr=s.div`
|
|
389
633
|
display: flex;
|
|
390
634
|
flex-direction: column;
|
|
391
635
|
gap: ${({theme:o})=>o.spacing[1]};
|
|
392
|
-
`,
|
|
636
|
+
`,Gr=s.label`
|
|
393
637
|
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
394
638
|
font-weight: 500;
|
|
395
639
|
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
396
|
-
`,
|
|
640
|
+
`,Jr=s.span`
|
|
397
641
|
color: ${({theme:o})=>o.colors.error[500]};
|
|
398
642
|
margin-left: 2px;
|
|
399
|
-
`,
|
|
643
|
+
`,Xr=s.span`
|
|
400
644
|
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
401
645
|
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
402
|
-
`;function
|
|
403
|
-
display: inline-flex;
|
|
404
|
-
flex-direction: column;
|
|
405
|
-
gap: ${({theme:o})=>o.spacing[1]};
|
|
406
|
-
width: ${({$fullWidth:o})=>o?"100%":"auto"};
|
|
407
|
-
`,Tr=s.div`
|
|
408
|
-
position: relative;
|
|
409
|
-
display: flex;
|
|
410
|
-
width: 100%;
|
|
411
|
-
`,Ir=s.span`
|
|
412
|
-
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
413
|
-
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
414
|
-
`,Er=s.select`
|
|
415
|
-
appearance: none;
|
|
416
|
-
width: 100%;
|
|
417
|
-
border-radius: ${({theme:o})=>o.radius.md};
|
|
418
|
-
cursor: pointer;
|
|
419
|
-
font: inherit;
|
|
420
|
-
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
421
|
-
transition:
|
|
422
|
-
border-color 0.2s,
|
|
423
|
-
box-shadow 0.2s;
|
|
424
|
-
|
|
425
|
-
${({$size:o,theme:r})=>({sm:s.css`
|
|
426
|
-
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
427
|
-
font-size: ${r.fontSizes.sm};
|
|
428
|
-
`,md:s.css`
|
|
429
|
-
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
430
|
-
font-size: ${r.fontSizes.md};
|
|
431
|
-
`,lg:s.css`
|
|
432
|
-
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
433
|
-
font-size: ${r.fontSizes.lg};
|
|
434
|
-
`})[o]}
|
|
435
|
-
|
|
436
|
-
padding-right: 2.5rem;
|
|
437
|
-
|
|
438
|
-
${({$variant:o,theme:r})=>r.brutalism?s.css`
|
|
439
|
-
border: ${r.brutalism.borderWidth} solid
|
|
440
|
-
${r.colors.neutral[900]};
|
|
441
|
-
background-color: ${r.colors.neutral[0]};
|
|
442
|
-
box-shadow: 3px 3px 0 ${r.colors.neutral[900]};
|
|
443
|
-
`:{default:s.css`
|
|
444
|
-
border: 1px solid ${r.colors.neutral[400]};
|
|
445
|
-
background-color: ${r.colors.neutral[0]};
|
|
446
|
-
`,outlined:s.css`
|
|
447
|
-
border: 2px solid ${r.colors.primary[500]};
|
|
448
|
-
background-color: ${r.colors.neutral[0]};
|
|
449
|
-
`,filled:s.css`
|
|
450
|
-
border: 1px solid transparent;
|
|
451
|
-
background-color: ${r.colors.neutral[100]};
|
|
452
|
-
`}[o]}
|
|
453
|
-
|
|
454
|
-
${({$error:o,theme:r})=>o&&s.css`
|
|
455
|
-
border-color: ${r.colors.error[500]};
|
|
456
|
-
`}
|
|
457
|
-
|
|
458
|
-
&:focus {
|
|
459
|
-
outline: none;
|
|
460
|
-
box-shadow: ${({theme:o})=>o.shadows.focusRing};
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
&:disabled {
|
|
464
|
-
cursor: not-allowed;
|
|
465
|
-
opacity: 0.6;
|
|
466
|
-
}
|
|
467
|
-
`,Wr=s.button`
|
|
468
|
-
position: absolute;
|
|
469
|
-
right: ${({theme:o})=>o.spacing[3]};
|
|
470
|
-
top: 50%;
|
|
471
|
-
transform: translateY(-50%);
|
|
472
|
-
display: flex;
|
|
473
|
-
align-items: center;
|
|
474
|
-
padding: 0;
|
|
475
|
-
background: none;
|
|
476
|
-
border: none;
|
|
477
|
-
cursor: pointer;
|
|
478
|
-
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
479
|
-
|
|
480
|
-
&:hover {
|
|
481
|
-
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
&:focus-visible {
|
|
485
|
-
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
486
|
-
outline-offset: 2px;
|
|
487
|
-
border-radius: 2px;
|
|
488
|
-
}
|
|
489
|
-
`,Br=s.span`
|
|
490
|
-
position: absolute;
|
|
491
|
-
right: ${({theme:o})=>o.spacing[3]};
|
|
492
|
-
top: 50%;
|
|
493
|
-
transform: translateY(-50%);
|
|
494
|
-
pointer-events: none;
|
|
495
|
-
display: flex;
|
|
496
|
-
align-items: center;
|
|
497
|
-
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
498
|
-
`;function mo({options:o,placeholder:r,size:n="md",variant:e="default",error:c,fullWidth:i,clearable:l,onClear:u,id:x,value:p,defaultValue:g,onChange:w,...y}){const b=a.useId(),k=x??b,C=`${k}-hint`,S=typeof c=="string"?c:void 0,[v,z]=a.useState(g??""),W=p!==void 0,B=W?p:v,h=E=>{W||z(E.target.value),w?.(E)},$=()=>{W||z(""),u?.()},m=l&&!!B;return t.jsxs(zr,{$fullWidth:i,children:[t.jsxs(Tr,{children:[t.jsxs(Er,{id:k,$size:n,$variant:e,$error:!!c,"aria-invalid":!!c,"aria-describedby":S?C:void 0,value:B,onChange:h,...y,children:[r&&t.jsx("option",{value:"",disabled:!0,children:r}),o.map(E=>t.jsx("option",{value:E.value,disabled:E.disabled,children:E.label},E.value))]}),m?t.jsx(Wr,{type:"button",onClick:$,"aria-label":"Clear selection",children:t.jsx(wo,{size:14})}):t.jsx(Br,{"aria-hidden":"true",children:t.jsx(ho,{size:14})})]}),S&&t.jsx(Ir,{id:C,$error:!0,children:S})]})}mo.displayName="Select";const Pr=s.a`
|
|
499
|
-
text-decoration: underline;
|
|
500
|
-
text-underline-offset: 2px;
|
|
501
|
-
transition: color 0.15s;
|
|
502
|
-
|
|
503
|
-
&:focus-visible {
|
|
504
|
-
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
505
|
-
outline-offset: 2px;
|
|
506
|
-
border-radius: 2px;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
${({$variant:o,theme:r})=>({default:s.css`
|
|
510
|
-
color: ${r.colors.primary[500]};
|
|
511
|
-
&:hover {
|
|
512
|
-
color: ${r.colors.primary[700]};
|
|
513
|
-
}
|
|
514
|
-
`,subtle:s.css`
|
|
515
|
-
color: ${r.colors.neutral[500]};
|
|
516
|
-
&:hover {
|
|
517
|
-
color: ${r.colors.neutral[900]};
|
|
518
|
-
}
|
|
519
|
-
`})[o]}
|
|
520
|
-
`;function jo({variant:o="default",external:r,children:n,...e}){return t.jsx(Pr,{$variant:o,...r&&{target:"_blank",rel:"noreferrer"},...e,children:n})}jo.displayName="Link";const Or=s.div`
|
|
646
|
+
`;function jo({onSubmit:o,children:r,...n}){return t.jsx(Ur,{onSubmit:e=>{e.preventDefault(),o?.(e)},noValidate:!0,...n,children:r})}jo.displayName="Form";function Co({label:o,error:r,helperText:n,required:e,children:a}){const i=l.useId(),c=`${i}-hint`,d=!!(r||n),f=typeof r=="string"?r:void 0,$=l.isValidElement(a)?l.cloneElement(a,{id:i,...d&&{"aria-describedby":c},...r&&{"aria-invalid":!0}}):a;return t.jsxs(Kr,{children:[o&&t.jsxs(Gr,{htmlFor:i,children:[o,e&&t.jsx(Jr,{"aria-hidden":"true",children:" *"})]}),$,d&&t.jsx(Xr,{id:c,$error:!!r,children:f??n})]})}Co.displayName="FormField";function Zr({initialValues:o,validate:r,onSubmit:n,onError:e}){const[a,i]=l.useState(o),[c,d]=l.useState({}),[f,$]=l.useState({}),[b,y]=l.useState(!1),g=l.useRef(a);g.current=a;const p=l.useCallback(w=>{if(!r)return{};const v=r(w);return Object.fromEntries(Object.entries(v).filter(([,T])=>T!==void 0))},[r]),x=l.useRef(f);x.current=f;const m=l.useCallback(w=>{const{name:v,value:T}=w.target;process.env.NODE_ENV!=="production"&&!v&&console.warn("[useForm] handleChange: field is missing a `name` attribute — value will not be tracked.");const I={...g.current,[v]:T};i(I),x.current[v]&&d(p(I))},[p]),S=l.useCallback(w=>{const{name:v}=w.target;process.env.NODE_ENV!=="production"&&!v&&console.warn("[useForm] handleBlur: field is missing a `name` attribute — touched state will not be tracked."),$(T=>({...T,[v]:!0})),d(p(g.current))},[p]),C=l.useCallback(w=>{w?.preventDefault();const v=Object.keys(g.current).reduce((W,M)=>({...W,[M]:!0}),{});$(v);const T=p(g.current);if(d(T),Object.keys(T).length>0){e?.(T);return}(async()=>{y(!0);try{await n?.(g.current)}finally{y(!1)}})()},[p,n,e]),j=l.useCallback((w,v)=>{i(T=>({...T,[w]:v}))},[]),z=l.useCallback(w=>{i(w??o),d({}),$({}),y(!1)},[o]),k=Object.fromEntries(Object.entries(c).filter(([w])=>f[w]));return{values:a,errors:k,touched:f,handleChange:m,handleBlur:S,handleSubmit:C,setFieldValue:j,reset:z,isSubmitting:b}}const Qr=s.div`
|
|
521
647
|
border-radius: ${({theme:o})=>o.radius.md};
|
|
522
648
|
background: ${({theme:o})=>o.colors.neutral[0]};
|
|
523
649
|
overflow: hidden;
|
|
@@ -532,7 +658,7 @@
|
|
|
532
658
|
border: 1px solid ${r??o.colors.neutral[200]};
|
|
533
659
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
534
660
|
`}
|
|
535
|
-
`,
|
|
661
|
+
`,os=s.button`
|
|
536
662
|
width: 100%;
|
|
537
663
|
display: flex;
|
|
538
664
|
align-items: flex-start;
|
|
@@ -552,19 +678,19 @@
|
|
|
552
678
|
${({theme:o,$accentColor:r})=>r??o.colors.primary[500]};
|
|
553
679
|
outline-offset: -2px;
|
|
554
680
|
}
|
|
555
|
-
`,
|
|
681
|
+
`,rs=s.div`
|
|
556
682
|
flex: 1;
|
|
557
683
|
min-width: 0;
|
|
558
|
-
`,
|
|
684
|
+
`,ss=s.span`
|
|
559
685
|
display: block;
|
|
560
686
|
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
561
687
|
font-weight: 600;
|
|
562
688
|
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
563
|
-
`,
|
|
689
|
+
`,ns=s.span`
|
|
564
690
|
display: block;
|
|
565
691
|
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
566
692
|
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
567
|
-
`,
|
|
693
|
+
`,ts=s.div`
|
|
568
694
|
display: flex;
|
|
569
695
|
flex-direction: row;
|
|
570
696
|
align-items: center;
|
|
@@ -576,11 +702,11 @@
|
|
|
576
702
|
align-items: flex-start;
|
|
577
703
|
gap: ${({theme:o})=>o.spacing[2]};
|
|
578
704
|
}
|
|
579
|
-
`,
|
|
705
|
+
`,es=s.div`
|
|
580
706
|
display: flex;
|
|
581
707
|
align-items: center;
|
|
582
708
|
gap: ${({theme:o})=>o.spacing[2]};
|
|
583
|
-
`,
|
|
709
|
+
`,is=s.span`
|
|
584
710
|
display: inline-flex;
|
|
585
711
|
align-items: center;
|
|
586
712
|
justify-content: center;
|
|
@@ -588,16 +714,29 @@
|
|
|
588
714
|
transition: transform 0.2s ease;
|
|
589
715
|
transform: ${({$open:o})=>o?"rotate(180deg)":"rotate(0deg)"};
|
|
590
716
|
color: ${({theme:o,$accentColor:r})=>r??o.colors.neutral[500]};
|
|
591
|
-
`,
|
|
717
|
+
`,as=s.div`
|
|
592
718
|
display: grid;
|
|
593
719
|
grid-template-rows: ${({$open:o})=>o?"1fr":"0fr"};
|
|
594
720
|
transition: grid-template-rows 0.2s ease;
|
|
595
|
-
`,
|
|
721
|
+
`,ls=s.div`
|
|
596
722
|
overflow: hidden;
|
|
597
|
-
`,
|
|
723
|
+
`,cs=s.div`
|
|
598
724
|
padding: ${({theme:o})=>o.spacing[4]};
|
|
599
725
|
border-top: 1px solid ${({theme:o})=>o.colors.neutral[200]};
|
|
600
|
-
`;function
|
|
726
|
+
`;function zo({title:o,children:r,defaultOpen:n=!1,open:e,onToggle:a,subtitle:i,headerActions:c,accentColor:d}){const[f,$]=l.useState(n),b=l.useId(),y=e!==void 0,g=y?e:f,p=()=>{const x=!g;y||$(x),a?.(x)};return t.jsxs(Qr,{$accentColor:d,children:[t.jsxs(os,{type:"button",$open:g,$accentColor:d,"aria-expanded":g,"aria-controls":b,onClick:p,children:[t.jsxs(rs,{children:[t.jsx(ss,{children:o}),(i||c)&&t.jsxs(ts,{children:[i&&t.jsx(ns,{children:i}),c&&t.jsx(es,{onClick:x=>x.stopPropagation(),children:c})]})]}),t.jsx(is,{$open:g,$accentColor:d,"aria-hidden":"true",children:t.jsx(mo,{size:18,strokeWidth:2.5})})]}),t.jsx(as,{$open:g,children:t.jsx(ls,{id:b,role:"region","aria-label":o,children:t.jsx(cs,{children:r})})})]})}zo.displayName="CollapsibleCard";const ds=s.keyframes`
|
|
727
|
+
to { transform: rotate(360deg); }
|
|
728
|
+
`,us={sm:"16px",md:"24px",lg:"40px"},ps={thin:"2px",normal:"3px",bold:"5px"},fs=s.span`
|
|
729
|
+
display: inline-block;
|
|
730
|
+
border-radius: 50%;
|
|
731
|
+
animation: ${ds} 0.7s linear infinite;
|
|
732
|
+
|
|
733
|
+
${({$size:o="md",$weight:r="normal",$color:n,theme:e})=>{const a=us[o],i=ps[r],c=e.colors.neutral[200],d=n??e.colors.primary[500];return s.css`
|
|
734
|
+
width: ${a};
|
|
735
|
+
height: ${a};
|
|
736
|
+
border: ${i} solid ${c};
|
|
737
|
+
border-top-color: ${d};
|
|
738
|
+
`}}
|
|
739
|
+
`;function To({size:o="md",weight:r="normal",color:n,label:e="Loading..."}){return t.jsx(fs,{$size:o,$weight:r,$color:n,role:"status","aria-label":e})}To.displayName="Spinner";function $s(o,r){return o?.key!==r?{key:r,direction:"asc"}:o.direction==="asc"?{key:r,direction:"desc"}:null}function bs({data:o,sort:r,defaultSort:n,onSortChange:e}){const a=r!==void 0,[i,c]=l.useState(n??null),d=a?r??null:i,f=b=>{const y=$s(d,b);return a||c(y),e?.(y),y},$=l.useMemo(()=>a||!d?o:[...o].sort((b,y)=>{const g=b[d.key],p=y[d.key],x=g<p?-1:g>p?1:0;return d.direction==="asc"?x:-x}),[o,d,a]);return{activeSort:d,sortedData:$,handleSort:f}}const gs=7,lo=3,co=1;function xs(o,r){if(r<=gs)return Array.from({length:r},(e,a)=>a+1);const n=[1];o>lo&&n.push("...");for(let e=Math.max(2,o-co);e<=Math.min(r-1,o+co);e++)n.push(e);return o<r-lo+1&&n.push("..."),n.push(r),n}function ys({data:o,pageSize:r,page:n,defaultPage:e,totalRows:a,onPageChange:i}){const c=n!==void 0,[d,f]=l.useState(e??1),$=c?n:d,b=m=>{c||f(m),i?.(m)},y=c||a!==void 0,g=a??o.length,p=r?Math.max(1,Math.ceil(g/r)):1,x=l.useMemo(()=>{if(!r||y)return o;const m=($-1)*r;return o.slice(m,m+r)},[o,r,$,y]);return{activePage:$,totalPages:p,displayData:x,handlePageChange:b}}const Io=(o,r)=>o==="sm"?`${r.spacing[1]} ${r.spacing[2]}`:o==="lg"?`${r.spacing[3]} ${r.spacing[4]}`:`${r.spacing[2]} ${r.spacing[3]}`,hs=s.div`
|
|
601
740
|
width: 100%;
|
|
602
741
|
|
|
603
742
|
${({theme:o,$borderColor:r})=>o.brutalism?s.css`
|
|
@@ -616,7 +755,7 @@
|
|
|
616
755
|
${({$stickyHeader:o})=>o&&s.css`
|
|
617
756
|
overflow-y: auto;
|
|
618
757
|
`}
|
|
619
|
-
`,
|
|
758
|
+
`,ms=s.table`
|
|
620
759
|
width: 100%;
|
|
621
760
|
border-collapse: collapse;
|
|
622
761
|
font-size: ${({$size:o,theme:r})=>({sm:r.fontSizes.sm,md:r.fontSizes.md,lg:r.fontSizes.lg})[o]};
|
|
@@ -624,7 +763,7 @@
|
|
|
624
763
|
caption {
|
|
625
764
|
padding: 8px 0;
|
|
626
765
|
}
|
|
627
|
-
`,
|
|
766
|
+
`,ws=s.thead`
|
|
628
767
|
${({$stickyHeader:o})=>o&&s.css`
|
|
629
768
|
position: sticky;
|
|
630
769
|
top: 0;
|
|
@@ -644,7 +783,7 @@
|
|
|
644
783
|
--th-text: ${o.colors.neutral[600]};
|
|
645
784
|
--th-sep: ${n??o.colors.neutral[300]};
|
|
646
785
|
`}
|
|
647
|
-
`,
|
|
786
|
+
`,vs=s.tbody`
|
|
648
787
|
${({$rowColor:o})=>o&&s.css`
|
|
649
788
|
tr {
|
|
650
789
|
background-color: ${o};
|
|
@@ -660,21 +799,37 @@
|
|
|
660
799
|
tr:last-child td {
|
|
661
800
|
border-bottom: none;
|
|
662
801
|
}
|
|
663
|
-
|
|
802
|
+
|
|
803
|
+
tr:hover td {
|
|
804
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
805
|
+
}
|
|
806
|
+
`,Y=s.tr``,ks=s(Y)`
|
|
807
|
+
cursor: pointer;
|
|
808
|
+
|
|
809
|
+
td {
|
|
810
|
+
transition:
|
|
811
|
+
background-color 0.1s,
|
|
812
|
+
box-shadow 0.1s;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
&:hover td {
|
|
816
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
&:hover td:first-child {
|
|
820
|
+
box-shadow: inset 4px 0 0
|
|
821
|
+
${({$accentColor:o,theme:r})=>o??r.colors.neutral[900]};
|
|
822
|
+
}
|
|
823
|
+
`,Ss=s.th`
|
|
664
824
|
background-color: var(--th-bg);
|
|
665
825
|
color: var(--th-text);
|
|
666
826
|
text-align: left;
|
|
667
827
|
font-weight: 700;
|
|
668
828
|
white-space: nowrap;
|
|
669
829
|
|
|
670
|
-
padding: ${({$size:o,theme:r})=>
|
|
830
|
+
padding: ${({$size:o,theme:r})=>Io(o,r)};
|
|
671
831
|
|
|
672
|
-
${({theme:o,$bordered:r})=>o.brutalism?s.css`
|
|
673
|
-
border-right: 1px solid var(--th-sep);
|
|
674
|
-
&:last-child {
|
|
675
|
-
border-right: none;
|
|
676
|
-
}
|
|
677
|
-
`:s.css`
|
|
832
|
+
${({theme:o,$bordered:r})=>o.brutalism?s.css``:s.css`
|
|
678
833
|
border-bottom: 2px solid var(--th-sep);
|
|
679
834
|
${r&&s.css`
|
|
680
835
|
border-right: 1px solid var(--th-sep);
|
|
@@ -683,7 +838,7 @@
|
|
|
683
838
|
}
|
|
684
839
|
`}
|
|
685
840
|
`}
|
|
686
|
-
`,
|
|
841
|
+
`,js=s.button`
|
|
687
842
|
display: inline-flex;
|
|
688
843
|
align-items: center;
|
|
689
844
|
gap: ${({theme:o})=>o.spacing[1]};
|
|
@@ -702,12 +857,12 @@
|
|
|
702
857
|
outline-offset: 2px;
|
|
703
858
|
border-radius: 2px;
|
|
704
859
|
}
|
|
705
|
-
`,
|
|
860
|
+
`,Cs=s.span`
|
|
706
861
|
opacity: 0.5;
|
|
707
862
|
display: inline-flex;
|
|
708
863
|
align-items: center;
|
|
709
|
-
`,
|
|
710
|
-
padding: ${({$size:o,theme:r})=>
|
|
864
|
+
`,Mo=s.td`
|
|
865
|
+
padding: ${({$size:o,theme:r})=>Io(o,r)};
|
|
711
866
|
|
|
712
867
|
${({$bordered:o,$borderColor:r,theme:n})=>n.brutalism?s.css`
|
|
713
868
|
border-bottom: ${n.brutalism.borderWidth} solid
|
|
@@ -725,16 +880,16 @@
|
|
|
725
880
|
border-bottom: 1px solid
|
|
726
881
|
${r??n.colors.neutral[200]};
|
|
727
882
|
`}
|
|
728
|
-
`,
|
|
883
|
+
`,zs=s.td`
|
|
729
884
|
text-align: center;
|
|
730
885
|
color: ${({theme:o})=>o.colors.neutral[400]};
|
|
731
886
|
padding: ${({theme:o})=>`${o.spacing[4]} ${o.spacing[3]}`};
|
|
732
887
|
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
733
888
|
border-bottom: none;
|
|
734
|
-
`,
|
|
889
|
+
`,Ts=s.keyframes`
|
|
735
890
|
0% { background-position: -400px 0; }
|
|
736
891
|
100% { background-position: 400px 0; }
|
|
737
|
-
`,
|
|
892
|
+
`,Is=s(Mo)``,Ms=s.div`
|
|
738
893
|
height: 14px;
|
|
739
894
|
border-radius: 4px;
|
|
740
895
|
background: linear-gradient(
|
|
@@ -744,8 +899,8 @@
|
|
|
744
899
|
${({theme:o})=>o.colors.neutral[200]} 75%
|
|
745
900
|
);
|
|
746
901
|
background-size: 800px 100%;
|
|
747
|
-
animation: ${
|
|
748
|
-
`,
|
|
902
|
+
animation: ${Ts} 1.6s ease-in-out infinite;
|
|
903
|
+
`,Ds=s.div`
|
|
749
904
|
display: flex;
|
|
750
905
|
align-items: center;
|
|
751
906
|
justify-content: center;
|
|
@@ -758,7 +913,7 @@
|
|
|
758
913
|
`:s.css`
|
|
759
914
|
border-top: 1px solid ${o.colors.neutral[200]};
|
|
760
915
|
`}
|
|
761
|
-
`,
|
|
916
|
+
`,Z=s.button`
|
|
762
917
|
display: inline-flex;
|
|
763
918
|
align-items: center;
|
|
764
919
|
justify-content: center;
|
|
@@ -801,96 +956,260 @@
|
|
|
801
956
|
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
802
957
|
outline-offset: 2px;
|
|
803
958
|
}
|
|
804
|
-
`,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
${({
|
|
808
|
-
|
|
809
|
-
|
|
959
|
+
`,Es=4;function Ps(o,r){return o?.key!==r?t.jsx(nr,{size:14}):o.direction==="asc"?t.jsx(er,{size:14}):t.jsx(rr,{size:14})}function Do({columns:o,data:r,rowKey:n,size:e="md",striped:a,bordered:i,stickyHeader:c,caption:d,emptyMessage:f="No data",loading:$,sort:b,defaultSort:y,onSortChange:g,pageSize:p,page:x,defaultPage:m,totalRows:S,onPageChange:C,onChange:j,onRowClick:z,borderColor:k,headerColor:w,rowColor:v,stripeColor:T,className:I,style:W}){const{activeSort:M,sortedData:V,handleSort:D}=bs({data:r,sort:b,defaultSort:y,onSortChange:g}),{activePage:E,totalPages:_,displayData:u,handlePageChange:O}=ys({data:V,pageSize:p,page:x,defaultPage:m,totalRows:S,onPageChange:C}),F=h=>{const P=D(h);j?.({sort:P,page:E})},L=h=>{O(h),j?.({sort:M,page:h})},U=(h,P)=>String(n?h[n]:P),K=!$&&u.length===0,Wo=p??Es;return t.jsxs(hs,{$borderColor:k,$stickyHeader:c,className:I,style:W,children:[t.jsxs(ms,{$size:e,children:[d&&t.jsx("caption",{children:d}),t.jsx(ws,{$headerColor:w,$borderColor:k,$stickyHeader:c,children:t.jsx(Y,{children:o.map(h=>t.jsx(Ss,{$size:e,$bordered:i,scope:"col",style:h.width?{width:h.width}:void 0,children:h.sortable?t.jsxs(js,{type:"button",onClick:()=>F(h.key),"aria-label":`Sort by ${h.header}${M?.key===h.key?`, ${M.direction}ending`:""}`,children:[h.header,t.jsx(Cs,{"aria-hidden":"true",children:Ps(M,h.key)})]}):h.header},h.key))})}),t.jsx(vs,{$striped:a,$rowColor:v,$stripeColor:T,children:$?Array.from({length:Wo}).map((h,P)=>t.jsx(Y,{children:o.map(G=>t.jsx(Is,{$size:e,$bordered:i,$borderColor:k,children:t.jsx(Ms,{})},G.key))},P)):K?t.jsx("tr",{children:t.jsx(zs,{colSpan:o.length,children:f})}):u.map((h,P)=>{const G=z?ks:Y;return t.jsx(G,{onClick:z?()=>z(h):void 0,$accentColor:z?k:void 0,children:o.map(A=>t.jsx(Mo,{$size:e,$bordered:i,$borderColor:k,children:A.render?A.render(h[A.key],h,P):String(h[A.key]??"")||" "},A.key))},U(h,P))})})]}),p&&_>1&&t.jsxs(Ds,{children:[t.jsx(Z,{type:"button",onClick:()=>L(E-1),disabled:E<=1,"aria-label":"Previous page",children:"←"}),xs(E,_).map((h,P)=>h==="..."?t.jsx("span",{"aria-hidden":"true",style:{padding:"0 4px"},children:"…"},`e${P}`):t.jsx(Z,{type:"button",$active:h===E,onClick:()=>L(h),"aria-label":`Page ${h}`,"aria-current":h===E?"page":void 0,children:h},h)),t.jsx(Z,{type:"button",onClick:()=>L(E+1),disabled:E>=_,"aria-label":"Next page",children:"→"})]})]})}Do.displayName="Table";function Ws({defaultSort:o,defaultPage:r=1}={}){const[n,e]=l.useState(o??null),[a,i]=l.useState(r);return{sort:n,page:a,onSortChange:f=>{e(f),i(1)},onPageChange:f=>{i(f)}}}const Os=s.p`
|
|
960
|
+
margin: 0;
|
|
961
|
+
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
962
|
+
color: ${({theme:o})=>o.colors.neutral[600]};
|
|
963
|
+
line-height: 1.5;
|
|
964
|
+
`,Ns=s.button`
|
|
965
|
+
display: inline-flex;
|
|
966
|
+
align-items: center;
|
|
967
|
+
justify-content: center;
|
|
968
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
969
|
+
font-weight: 600;
|
|
970
|
+
cursor: pointer;
|
|
971
|
+
padding: ${({theme:o})=>o.spacing[2]} ${({theme:o})=>o.spacing[4]};
|
|
972
|
+
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
973
|
+
background-color: ${({theme:o})=>o.colors.error[500]};
|
|
974
|
+
color: ${({theme:o})=>o.colors.neutral[0]};
|
|
975
|
+
border: none;
|
|
810
976
|
|
|
811
|
-
|
|
812
|
-
|
|
977
|
+
&:hover:not(:disabled) {
|
|
978
|
+
opacity: 0.88;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
&:focus-visible {
|
|
982
|
+
outline: 2px solid ${({theme:o})=>o.colors.error[500]};
|
|
983
|
+
outline-offset: 2px;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
&:disabled {
|
|
987
|
+
opacity: 0.5;
|
|
988
|
+
cursor: not-allowed;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
${({theme:o})=>o.brutalism&&s.css`
|
|
992
|
+
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
993
|
+
box-shadow: ${o.brutalism.shadowOffset}
|
|
994
|
+
${o.brutalism.shadowOffset} 0 ${o.colors.neutral[900]};
|
|
995
|
+
transition:
|
|
996
|
+
transform 0.1s,
|
|
997
|
+
box-shadow 0.1s;
|
|
998
|
+
&:hover:not(:disabled) {
|
|
999
|
+
opacity: 1;
|
|
1000
|
+
transform: translate(2px, 2px);
|
|
1001
|
+
box-shadow: 2px 2px 0 ${o.colors.neutral[900]};
|
|
813
1002
|
}
|
|
814
1003
|
`}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1004
|
+
`;function no({open:o,title:r="Are you sure?",message:n,confirmLabel:e="Confirm",cancelLabel:a="Cancel",variant:i="default",size:c="sm",onConfirm:d,onCancel:f}){return t.jsx(ro,{open:o,onClose:f,title:r,size:c,closeOnBackdrop:!1,footer:t.jsxs(t.Fragment,{children:[t.jsx(H,{variant:"outline",onClick:f,children:a}),i==="danger"?t.jsx(Ns,{type:"button",onClick:d,children:e}):t.jsx(H,{variant:"primary",onClick:d,children:e})]}),children:t.jsx(Os,{children:n})})}no.displayName="ConfirmDialog";const Eo=l.createContext(null);function Fs({children:o}){const[r,n]=l.useState(null),e=l.useCallback(c=>new Promise(d=>{n({...c,resolve:d})}),[]),a=()=>{r?.resolve(!0),n(null)},i=()=>{r?.resolve(!1),n(null)};return t.jsxs(Eo.Provider,{value:{confirm:e},children:[o,r&&t.jsx(no,{open:!0,title:r.title,message:r.message,confirmLabel:r.confirmLabel,cancelLabel:r.cancelLabel,variant:r.variant,size:r.size,onConfirm:a,onCancel:i})]})}function Ls(){const o=l.useContext(Eo);if(!o)throw new Error("useConfirm must be used within a ConfirmProvider");return o.confirm}const Bs=s.div`
|
|
1005
|
+
position: relative;
|
|
1006
|
+
display: inline-flex;
|
|
1007
|
+
flex-direction: column;
|
|
1008
|
+
gap: ${({theme:o})=>o.spacing[1]};
|
|
1009
|
+
`,Vs=s.div`
|
|
1010
|
+
display: flex;
|
|
1011
|
+
align-items: center;
|
|
1012
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
1013
|
+
cursor: pointer;
|
|
1014
|
+
user-select: none;
|
|
1015
|
+
min-width: 200px;
|
|
1016
|
+
transition:
|
|
1017
|
+
border-color 0.2s,
|
|
1018
|
+
box-shadow 0.2s;
|
|
1019
|
+
|
|
1020
|
+
${({$size:o,theme:r})=>({sm:s.css`
|
|
1021
|
+
padding: ${r.spacing[1]} ${r.spacing[2]};
|
|
1022
|
+
font-size: ${r.fontSizes.sm};
|
|
1023
|
+
`,md:s.css`
|
|
1024
|
+
padding: ${r.spacing[2]} ${r.spacing[3]};
|
|
1025
|
+
font-size: ${r.fontSizes.md};
|
|
1026
|
+
`,lg:s.css`
|
|
1027
|
+
padding: ${r.spacing[3]} ${r.spacing[4]};
|
|
1028
|
+
font-size: ${r.fontSizes.lg};
|
|
1029
|
+
`})[o]}
|
|
827
1030
|
|
|
828
1031
|
${({theme:o})=>o.brutalism?s.css`
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1032
|
+
border: ${o.brutalism.borderWidth} solid
|
|
1033
|
+
${o.colors.neutral[900]};
|
|
1034
|
+
background-color: ${o.colors.neutral[0]};
|
|
1035
|
+
box-shadow: 3px 3px 0 ${o.colors.neutral[900]};
|
|
1036
|
+
`:s.css`
|
|
1037
|
+
border: 1px solid ${o.colors.neutral[400]};
|
|
1038
|
+
background-color: ${o.colors.neutral[0]};
|
|
1039
|
+
`}
|
|
1040
|
+
|
|
1041
|
+
${({$error:o,theme:r})=>o&&s.css`
|
|
1042
|
+
border-color: ${r.colors.error[500]};
|
|
1043
|
+
`}
|
|
1044
|
+
|
|
1045
|
+
${({$disabled:o})=>o&&s.css`
|
|
1046
|
+
cursor: not-allowed;
|
|
1047
|
+
opacity: 0.6;
|
|
1048
|
+
`}
|
|
1049
|
+
|
|
1050
|
+
&:focus {
|
|
1051
|
+
outline: none;
|
|
1052
|
+
box-shadow: ${({theme:o})=>o.shadows.focusRing};
|
|
1053
|
+
}
|
|
1054
|
+
`,_s=s.span`
|
|
1055
|
+
flex: 1;
|
|
1056
|
+
color: ${({$hasValue:o,theme:r})=>o?r.colors.neutral[900]:r.colors.neutral[400]};
|
|
1057
|
+
white-space: nowrap;
|
|
1058
|
+
overflow: hidden;
|
|
1059
|
+
text-overflow: ellipsis;
|
|
1060
|
+
`,As=s.span`
|
|
846
1061
|
display: inline-flex;
|
|
847
1062
|
align-items: center;
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1063
|
+
margin-left: ${({theme:o})=>o.spacing[2]};
|
|
1064
|
+
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
1065
|
+
flex-shrink: 0;
|
|
1066
|
+
`,Rs=s.button`
|
|
1067
|
+
display: inline-flex;
|
|
1068
|
+
align-items: center;
|
|
1069
|
+
margin-left: ${({theme:o})=>o.spacing[2]};
|
|
851
1070
|
padding: 0;
|
|
852
1071
|
background: none;
|
|
853
1072
|
border: none;
|
|
854
1073
|
cursor: pointer;
|
|
855
|
-
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
856
1074
|
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
857
|
-
|
|
858
|
-
transition: color 0.1s;
|
|
1075
|
+
flex-shrink: 0;
|
|
859
1076
|
|
|
860
1077
|
&:hover {
|
|
861
|
-
color: ${({theme:o})=>o.colors.
|
|
1078
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
1079
|
+
}
|
|
862
1080
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1081
|
+
&:focus-visible {
|
|
1082
|
+
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
1083
|
+
outline-offset: 2px;
|
|
1084
|
+
border-radius: 2px;
|
|
866
1085
|
}
|
|
867
|
-
`,
|
|
1086
|
+
`,Ys=s.span`
|
|
1087
|
+
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
1088
|
+
color: ${({$error:o,theme:r})=>o?r.colors.error[500]:r.colors.neutral[500]};
|
|
1089
|
+
`,Hs=s.div`
|
|
1090
|
+
position: absolute;
|
|
1091
|
+
top: calc(100% + 4px);
|
|
1092
|
+
left: 0;
|
|
1093
|
+
z-index: ${({theme:o})=>o.zIndex.modal};
|
|
1094
|
+
background: ${({theme:o})=>o.colors.neutral[0]};
|
|
1095
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
1096
|
+
padding: ${({theme:o})=>o.spacing[3]};
|
|
1097
|
+
min-width: 280px;
|
|
1098
|
+
|
|
868
1099
|
${({theme:o})=>o.brutalism?s.css`
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
1100
|
+
border: ${o.brutalism.borderWidth} solid
|
|
1101
|
+
${o.colors.neutral[900]};
|
|
1102
|
+
box-shadow: ${o.brutalism.shadowOffset}
|
|
1103
|
+
${o.brutalism.shadowOffset} 0 ${o.colors.neutral[900]};
|
|
1104
|
+
`:s.css`
|
|
1105
|
+
border: 1px solid ${o.colors.neutral[200]};
|
|
1106
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
1107
|
+
`}
|
|
1108
|
+
`,qs=s.div`
|
|
1109
|
+
display: flex;
|
|
1110
|
+
align-items: center;
|
|
1111
|
+
justify-content: space-between;
|
|
1112
|
+
margin-bottom: ${({theme:o})=>o.spacing[3]};
|
|
1113
|
+
`,uo=s.button`
|
|
875
1114
|
display: inline-flex;
|
|
876
1115
|
align-items: center;
|
|
877
|
-
|
|
878
|
-
|
|
1116
|
+
justify-content: center;
|
|
1117
|
+
width: 28px;
|
|
1118
|
+
height: 28px;
|
|
879
1119
|
border: none;
|
|
1120
|
+
background: none;
|
|
1121
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
880
1122
|
cursor: pointer;
|
|
881
|
-
font: inherit;
|
|
882
|
-
font-weight: 600;
|
|
883
1123
|
color: ${({theme:o})=>o.colors.neutral[600]};
|
|
884
|
-
padding:
|
|
885
|
-
width: 100%;
|
|
886
|
-
text-align: left;
|
|
1124
|
+
padding: 0;
|
|
887
1125
|
|
|
888
1126
|
&:hover {
|
|
889
|
-
color: ${({theme:o})=>o.
|
|
1127
|
+
background-color: ${({theme:o})=>o.colors.neutral[100]};
|
|
1128
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
890
1129
|
}
|
|
891
1130
|
|
|
892
1131
|
&:focus-visible {
|
|
893
1132
|
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
894
1133
|
outline-offset: 2px;
|
|
895
1134
|
}
|
|
896
|
-
|
|
1135
|
+
|
|
1136
|
+
${({theme:o})=>o.brutalism&&s.css`
|
|
1137
|
+
border: ${o.brutalism.borderWidth} solid ${o.colors.neutral[900]};
|
|
1138
|
+
&:hover {
|
|
1139
|
+
background-color: ${o.colors.neutral[100]};
|
|
1140
|
+
transform: translate(1px, 1px);
|
|
1141
|
+
}
|
|
1142
|
+
`}
|
|
1143
|
+
`,Us=s.span`
|
|
1144
|
+
font-weight: 600;
|
|
1145
|
+
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
1146
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
1147
|
+
`,Ks=s.div`
|
|
1148
|
+
display: grid;
|
|
1149
|
+
grid-template-columns: repeat(7, 1fr);
|
|
1150
|
+
gap: 2px;
|
|
1151
|
+
`,Gs=s.span`
|
|
1152
|
+
display: flex;
|
|
1153
|
+
align-items: center;
|
|
1154
|
+
justify-content: center;
|
|
1155
|
+
font-size: ${({theme:o})=>o.fontSizes.xs};
|
|
1156
|
+
font-weight: 600;
|
|
1157
|
+
color: ${({theme:o})=>o.colors.neutral[500]};
|
|
1158
|
+
padding: ${({theme:o})=>o.spacing[1]};
|
|
1159
|
+
margin-bottom: 2px;
|
|
1160
|
+
`,po=s.button`
|
|
1161
|
+
display: flex;
|
|
1162
|
+
align-items: center;
|
|
1163
|
+
justify-content: center;
|
|
1164
|
+
aspect-ratio: 1;
|
|
1165
|
+
border: none;
|
|
1166
|
+
background: none;
|
|
1167
|
+
border-radius: ${({theme:o})=>o.radius.md};
|
|
1168
|
+
cursor: pointer;
|
|
1169
|
+
font-size: ${({theme:o})=>o.fontSizes.sm};
|
|
1170
|
+
padding: ${({theme:o})=>o.spacing[1]};
|
|
1171
|
+
font-weight: ${({$today:o,$selected:r})=>o||r?"600":"400"};
|
|
1172
|
+
pointer-events: ${({$currentMonth:o})=>o?"auto":"none"};
|
|
1173
|
+
|
|
1174
|
+
color: ${({$currentMonth:o,$selected:r,$today:n,theme:e})=>o?r?e.colors.primary.contrast:n?e.colors.primary[500]:e.colors.neutral[900]:e.colors.neutral[300]};
|
|
1175
|
+
|
|
1176
|
+
background-color: ${({$selected:o,theme:r})=>o?r.colors.primary[500]:"transparent"};
|
|
1177
|
+
|
|
1178
|
+
&:hover:not(:disabled) {
|
|
1179
|
+
background-color: ${({$selected:o,theme:r})=>o?r.colors.primary[700]:r.colors.neutral[100]};
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
&:disabled {
|
|
1183
|
+
opacity: 0.35;
|
|
1184
|
+
cursor: not-allowed;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
&:focus-visible {
|
|
1188
|
+
outline: 2px solid ${({theme:o})=>o.colors.primary[500]};
|
|
1189
|
+
outline-offset: 1px;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
${({$selected:o,$today:r,theme:n})=>n.brutalism&&(o||r)&&s.css`
|
|
1193
|
+
border: ${n.brutalism.borderWidth} solid ${n.colors.neutral[900]};
|
|
1194
|
+
${o&&s.css`
|
|
1195
|
+
box-shadow: 2px 2px 0 ${n.colors.neutral[900]};
|
|
1196
|
+
`}
|
|
1197
|
+
`}
|
|
1198
|
+
`,Js=["January","February","March","April","May","June","July","August","September","October","November","December"],Xs=["Su","Mo","Tu","We","Th","Fr","Sa"];function fo(o,r){return new Date(o,r+1,0).getDate()}function Zs(o,r){return new Date(o,r,1).getDay()}function $o(o,r){return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()&&o.getDate()===r.getDate()}function Qs(o,r,n){if(r){const e=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(o<e)return!0}if(n){const e=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(o>e)return!0}return!1}function on(o){return o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function rn(o){return o.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}function Po({value:o=null,onChange:r,placeholder:n="Select date...",size:e="md",disabled:a=!1,clearable:i=!1,minDate:c,maxDate:d,formatDate:f,id:$,error:b}){const y=l.useId(),g=$??y,p=new Date,[x,m]=l.useState(!1),[S,C]=l.useState(()=>(o??p).getFullYear()),[j,z]=l.useState(()=>(o??p).getMonth()),k=l.useRef(null);l.useEffect(()=>{if(!x)return;const u=O=>{k.current&&!k.current.contains(O.target)&&m(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[x]),l.useEffect(()=>{o&&(C(o.getFullYear()),z(o.getMonth()))},[o]);const w=o?f?f(o):on(o):"",v=u=>{r?.(new Date(S,j,u)),m(!1)},T=u=>{u.stopPropagation(),r?.(null)},I=()=>{j===0?(z(11),C(u=>u-1)):z(u=>u-1)},W=()=>{j===11?(z(0),C(u=>u+1)):z(u=>u+1)},M=fo(S,j),V=Zs(S,j),D=[],E=fo(j===0?S-1:S,j===0?11:j-1);for(let u=V-1;u>=0;u--)D.push({day:E-u,currentMonth:!1});for(let u=1;u<=M;u++)D.push({day:u,currentMonth:!0});const _=42-D.length;for(let u=1;u<=_;u++)D.push({day:u,currentMonth:!1});return t.jsxs(Bs,{ref:k,children:[t.jsxs(Vs,{id:g,$size:e,$error:!!b,$disabled:a,role:"combobox","aria-haspopup":"true","aria-expanded":x,tabIndex:a?-1:0,onClick:()=>{a||m(u=>!u)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&!a&&(u.preventDefault(),m(O=>!O)),u.key==="Escape"&&m(!1)},children:[t.jsx(_s,{$hasValue:!!o,children:w||n}),i&&o?t.jsx(Rs,{type:"button",onClick:T,"aria-label":"Clear date",children:t.jsx(Q,{size:14})}):t.jsx(As,{"aria-hidden":"true",children:t.jsx(ar,{size:14})})]}),typeof b=="string"&&t.jsx(Ys,{$error:!0,children:b}),x&&t.jsxs(Hs,{role:"dialog","aria-label":"Calendar",children:[t.jsxs(qs,{children:[t.jsx(uo,{type:"button",onClick:I,"aria-label":"Previous month",children:t.jsx(dr,{size:16})}),t.jsxs(Us,{children:[Js[j]," ",S]}),t.jsx(uo,{type:"button",onClick:W,"aria-label":"Next month",children:t.jsx(pr,{size:16})})]}),t.jsxs(Ks,{children:[Xs.map(u=>t.jsx(Gs,{children:u},u)),D.map((u,O)=>{if(!u.currentMonth)return t.jsx(po,{type:"button",$currentMonth:!1,$selected:!1,$today:!1,disabled:!0,tabIndex:-1,children:u.day},O);const F=new Date(S,j,u.day),L=o?$o(F,o):!1,U=$o(F,p),K=Qs(F,c,d);return t.jsx(po,{type:"button",$currentMonth:!0,$selected:L,$today:U,disabled:K,"aria-label":rn(F),"aria-pressed":L,onClick:()=>v(u.day),children:u.day},O)})]})]})]})}Po.displayName="DatePicker";function sn(o){const r=parseInt(o.slice(1,3),16)/255,n=parseInt(o.slice(3,5),16)/255,e=parseInt(o.slice(5,7),16)/255,a=c=>c<=.03928?c/12.92:((c+.055)/1.055)**2.4;return .2126*a(r)+.7152*a(n)+.0722*a(e)>.179?"#111111":"#ffffff"}const q={colors:{primary:{50:"#fffde6",500:"#ffd000",700:"#ffd000",contrast:"#111111"},neutral:{0:"#ffffff",100:"#f5f0e8",200:"#e8e3db",300:"#ccc8c0",400:"#a8a49c",500:"#706c64",600:"#3c3830",900:"#111111"},error:{50:"#fff0f0",500:"#ff3333"},success:{50:"#f0fff4",500:"#00cc44"},warning:{50:"#fffbe6",500:"#ff9900"},info:{50:"#f0f0ff",500:"#3333ff"}},spacing:{1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px"},radius:{md:"2px"},zIndex:{modal:1e3,toast:1100},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px"},shadows:{focusRing:"3px 3px 0 #111111"},brutalism:{borderWidth:"2px",shadowOffset:"4px"}};function nn(o){return{...q,colors:{...q.colors,primary:{50:"#fffff0",500:o,700:o,contrast:sn(o)}}}}function tn({theme:o=q,children:r}){return t.jsx(s.ThemeProvider,{theme:o,children:r})}const en=s.createGlobalStyle`
|
|
1199
|
+
*, *::before, *::after {
|
|
1200
|
+
box-sizing: border-box;
|
|
1201
|
+
margin: 0;
|
|
1202
|
+
padding: 0;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
html, body {
|
|
1206
|
+
font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
|
|
1207
|
+
font-size: ${({theme:o})=>o.fontSizes.md};
|
|
1208
|
+
color: ${({theme:o})=>o.colors.neutral[900]};
|
|
1209
|
+
background-color: ${({theme:o})=>o.colors.neutral[0]};
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
button, input, select, textarea {
|
|
1213
|
+
font-family: inherit;
|
|
1214
|
+
}
|
|
1215
|
+
`;exports.Badge=go;exports.Button=H;exports.CollapsibleCard=zo;exports.ConfirmDialog=no;exports.ConfirmProvider=Fs;exports.DatePicker=Po;exports.Editable=vo;exports.Field=ko;exports.Form=jo;exports.FormField=Co;exports.GlobalStyles=en;exports.Input=xo;exports.Link=oo;exports.Modal=ro;exports.Select=wo;exports.Spinner=To;exports.Table=Do;exports.Textarea=yo;exports.ThemeProvider=tn;exports.Toast=so;exports.ToastProvider=Hr;exports.createNeoBrutalTheme=nn;exports.neoBrutalTheme=q;exports.useConfirm=Ls;exports.useForm=Zr;exports.useTable=Ws;exports.useToast=qr;
|