@blakesteve/roster 4.6.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -13
- package/dist/{Table-DuLc2mEo.js → Table--O-sD53L.js} +8 -8
- package/dist/{Table-C8f0KOSf.cjs → Table-CoQRmik0.cjs} +1 -1
- package/dist/components/atoms/Input/Input.d.ts +10 -1
- package/dist/components/atoms/Input/input-variants.d.ts +1 -0
- package/dist/components/atoms/Select/Select.d.ts +11 -1
- package/dist/components/atoms/Select/select-variants.d.ts +4 -0
- package/dist/components/atoms/Textarea/Textarea.d.ts +9 -0
- package/dist/data-table.cjs.js +1 -1
- package/dist/data-table.es.js +1 -1
- package/dist/meta.json +2 -2
- package/dist/roster.cjs.js +2 -2
- package/dist/roster.css +1 -1
- package/dist/roster.es.js +837 -672
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,14 @@ document head:
|
|
|
144
144
|
If you pass a custom `storageKey`, change the script to match — a mismatch means
|
|
145
145
|
the script and the toggle disagree, which shows up as a flash on every reload.
|
|
146
146
|
|
|
147
|
+
**Components that render into a portal**, such as `Select`'s menu, are attached
|
|
148
|
+
to `<body>` rather than to the element you wrote them next to. When `.dark` is
|
|
149
|
+
on `<html>` — what `ThemeToggle` does, and what the script above sets up — that
|
|
150
|
+
makes no difference, because the portal is still a descendant. If you scope
|
|
151
|
+
`.dark` to a subtree instead, `Select` detects the nearest `.dark` ancestor of
|
|
152
|
+
the field and carries it across the portal, so the menu follows the same scope
|
|
153
|
+
the trigger is in.
|
|
154
|
+
|
|
147
155
|
`Navbar`'s `themeMode` prop is a different thing: it describes what palette the
|
|
148
156
|
bar paints _itself_ with. Pair them with `themeMode="auto"` and the nav follows
|
|
149
157
|
whatever `ThemeToggle` sets.
|
|
@@ -175,19 +183,72 @@ text on it, so it can fail contrast on its own with no help from your app. Every
|
|
|
175
183
|
solid fill in `Badge`, `Pill` and `Button` is measured against WCAG AA (4.5:1)
|
|
176
184
|
by `src/contrast.test.ts`, at rest **and** on hover, in both themes.
|
|
177
185
|
|
|
178
|
-
|
|
186
|
+
`Checkbox` is measured too, at 3:1 rather than 4.5:1 — its tick is a graphical
|
|
187
|
+
object under WCAG 1.4.11, not text. It used to be excluded from the suite
|
|
188
|
+
entirely, which measured it against nothing.
|
|
189
|
+
|
|
190
|
+
#### Ink follows the fill
|
|
191
|
+
|
|
192
|
+
The foreground is a token per fill, not per family:
|
|
193
|
+
|
|
194
|
+
```css
|
|
195
|
+
/* Only after you have retinted `primary` to something light. Against Roster's
|
|
196
|
+
own primary these would be 2.08:1 and 2.84:1 — the tokens do not check your
|
|
197
|
+
arithmetic, they just stop you having to fight a hardcoded `text-white`. */
|
|
198
|
+
:root {
|
|
199
|
+
--roster-primary-600-ink: #10142e; /* the fill Button and Checkbox rest on */
|
|
200
|
+
--roster-primary-500-ink: #10142e; /* Badge and Pill's rest fill, and where
|
|
201
|
+
Button hovers in dark mode */
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Keyed by fill because the right ink flips partway up three of the nine ramps:
|
|
206
|
+
`orange`, `purple` and `success` all want dark ink at 500 and white at 600. A
|
|
207
|
+
per-family token would be wrong for those three — and it is why `Pill` and
|
|
208
|
+
`Button` legitimately disagreed about `success` before this existed. Pill fills
|
|
209
|
+
at 500 and Button at 600, so they reached opposite and equally correct answers.
|
|
210
|
+
|
|
211
|
+
Every fill carries the foreground it always had, so nothing changes until you set
|
|
212
|
+
one. Hover and dark mode each resolve against *their own* fill, so a scheme whose
|
|
213
|
+
hover moves to a lighter shade picks up that shade's ink automatically.
|
|
214
|
+
|
|
215
|
+
This matters when you retheme. Roster's own choice of white or `gray-950` was
|
|
216
|
+
made against Roster's colors, and `--roster-*` exists precisely so you can
|
|
217
|
+
replace those. Two apps remapped `primary` and got a sub-AA fill nobody noticed
|
|
218
|
+
until it was measured by hand: BB Blue put white at 3.66:1 on a dark-mode hover,
|
|
219
|
+
and a gold `primary` failed at every state, worst at 2.10:1.
|
|
220
|
+
|
|
221
|
+
They reached for opposite remedies, which is the clearest argument for the
|
|
222
|
+
token. One moved the *fill* so white stayed readable; the other overrode
|
|
223
|
+
`text-white` from its own stylesheet to darken the *ink*. Only one of those was
|
|
224
|
+
expressible in Roster, and neither survives an upgrade. Setting the ink token is
|
|
225
|
+
the supported way now.
|
|
226
|
+
|
|
227
|
+
##### Upgrading
|
|
228
|
+
|
|
229
|
+
**If you override a solid variant's foreground from your own stylesheet, that
|
|
230
|
+
rule stops matching.** Solid Button, Badge, Pill and Checkbox no longer carry
|
|
231
|
+
`rst:text-white` or `rst:text-gray-950`, so a selector naming either matches
|
|
232
|
+
nothing. It fails silently, and it fails *partially*: those classes are still on
|
|
233
|
+
`Card`, `Navbar`, `Dialog`, `ActionBar`, `Avatar`, `LiquidTabs` and
|
|
234
|
+
`Breadcrumbs`, so a themed foreground keeps working there while reverting on
|
|
235
|
+
every solid control. Replace the rule with the token:
|
|
179
236
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
237
|
+
```css
|
|
238
|
+
/* before */
|
|
239
|
+
.rst\:bg-primary-600.rst\:text-white { color: #10142e; }
|
|
240
|
+
|
|
241
|
+
/* after — and it covers hover and dark mode, which the rule above did not */
|
|
242
|
+
:root { --roster-primary-600-ink: #10142e; }
|
|
243
|
+
```
|
|
185
244
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
`
|
|
190
|
-
|
|
245
|
+
**If you pass a foreground through `className`, add the hover modifier.** Solid
|
|
246
|
+
variants now carry `hover:text-*`, and `tailwind-merge` resolves conflicts per
|
|
247
|
+
modifier, so a bare `rst:text-black` no longer holds through hover. Write
|
|
248
|
+
`rst:text-black rst:hover:text-black`, or set the ink tokens instead.
|
|
249
|
+
|
|
250
|
+
The `Foundations/Solid fill contrast` story measures rendered elements rather
|
|
251
|
+
than tokens, so pointing it at your palette reports _your_ ratios.
|
|
191
252
|
|
|
192
253
|
Note also that a solid fill's contrast against the surface _behind_ it is a
|
|
193
254
|
separate requirement (WCAG 1.4.11, 3:1) and is not covered here. Solid amber on
|
|
@@ -296,6 +357,99 @@ browser honors `scrollbar-width` / `scrollbar-color`, and drops the WebKit
|
|
|
296
357
|
pseudo-elements for any element that sets either of them, so on anything modern
|
|
297
358
|
`thin` is the whole shape control available.
|
|
298
359
|
|
|
360
|
+
### Control surface colors
|
|
361
|
+
|
|
362
|
+
`Input`, `PasswordInput` and `Select` read these variables in their `outline`
|
|
363
|
+
variant, so a consumer can repaint a form control without restating the class
|
|
364
|
+
list.
|
|
365
|
+
|
|
366
|
+
```css
|
|
367
|
+
:root {
|
|
368
|
+
--roster-control-border: #d6d3d1;
|
|
369
|
+
--roster-control-bg: transparent;
|
|
370
|
+
--roster-control-text: #1c1917;
|
|
371
|
+
--roster-control-border-focus: #0f6498;
|
|
372
|
+
}
|
|
373
|
+
.dark {
|
|
374
|
+
--roster-control-border: #44403c;
|
|
375
|
+
--roster-control-bg: transparent;
|
|
376
|
+
--roster-control-text: #f5f5f4;
|
|
377
|
+
--roster-control-border-focus: #0f6498;
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Set them in both scopes, for the same reason the scrollbar thumb needs both:
|
|
382
|
+
Roster's own `.dark` rule has equal specificity and comes later.
|
|
383
|
+
|
|
384
|
+
The defaults are the values the component used to hardcode, so installing this
|
|
385
|
+
version changes nothing on its own. Placeholder color, the error state, and the
|
|
386
|
+
focus ring are deliberately not on tokens — the ring is already
|
|
387
|
+
`--roster-ring`, and error styling should stay recognizably an error.
|
|
388
|
+
|
|
389
|
+
Not every control uses every token: `Select` takes the first three, because
|
|
390
|
+
focus on its trigger is the shared `--roster-ring` rather than a border color.
|
|
391
|
+
One family rather than one per component is deliberate — these controls sit in
|
|
392
|
+
the same row of the same form and are drawn to look identical, so being able to
|
|
393
|
+
repaint one and not the other would be a bug, not a choice.
|
|
394
|
+
|
|
395
|
+
The `outline` variant is the only one that reads them, in every component, and
|
|
396
|
+
it carries no hover fill. The other variants each name a concrete surface
|
|
397
|
+
(`white`, `soft`, `slate`, `ghost`) and stay opinionated: a token that meant
|
|
398
|
+
something different in each would not be a token.
|
|
399
|
+
|
|
400
|
+
One caveat worth knowing before you lean on these: like `--roster-card-*`,
|
|
401
|
+
`--roster-nav-*` and `--roster-footer-*`, they are declared outside
|
|
402
|
+
`@layer roster` and resolved at `:root`. A host that declares its override
|
|
403
|
+
inside `@layer base` is outranked, and an override scoped to a subtree rather
|
|
404
|
+
than the document root will not reach them.
|
|
405
|
+
|
|
406
|
+
### Reaching the control
|
|
407
|
+
|
|
408
|
+
`className` on a field component lands on the outer `Field` wrapper. That is
|
|
409
|
+
right for layout — width, flex, margins — and useless for anything else: it
|
|
410
|
+
cannot reach the element that draws the border, the height or the font.
|
|
411
|
+
|
|
412
|
+
Every field therefore has a second prop, **named for the element it reaches**:
|
|
413
|
+
|
|
414
|
+
| Component | Wrapper | The control itself |
|
|
415
|
+
| -------------- | ----------- | -------------------- |
|
|
416
|
+
| `Input` | `className` | `inputClassName` |
|
|
417
|
+
| `PasswordInput`| `className` | `inputClassName` |
|
|
418
|
+
| `Select` | `className` | `triggerClassName` |
|
|
419
|
+
| `Textarea` | `className` | `textareaClassName` |
|
|
420
|
+
|
|
421
|
+
The names differ on purpose. A single `controlClassName` would name a concept
|
|
422
|
+
rather than an element, and it breaks the first time a component has two
|
|
423
|
+
styleable inner parts — a combobox has an input *and* a toggle. `triggerClassName`
|
|
424
|
+
also tells you something true: the thing you are styling is a `<button>`, so
|
|
425
|
+
`placeholder:` and `disabled:` behave differently on it than they would on an
|
|
426
|
+
`<input>`.
|
|
427
|
+
|
|
428
|
+
These merge last and win, not because they come later in the attribute (CSS
|
|
429
|
+
ignores that) but because `cn` is tailwind-merge and deletes the class they
|
|
430
|
+
conflict with.
|
|
431
|
+
|
|
432
|
+
### Control heights
|
|
433
|
+
|
|
434
|
+
`Button`, `Input` and `Select` share one size scale, so they line up when set
|
|
435
|
+
side by side in a row:
|
|
436
|
+
|
|
437
|
+
| `size` | Height | `Button` padding | `Input` padding | `Select` padding |
|
|
438
|
+
| --------- | ------ | ---------------- | --------------- | ---------------- |
|
|
439
|
+
| `sm` | 36px | `px-3` | `px-3` | `pl-3 pr-9` |
|
|
440
|
+
| `default` | 40px | `px-4` | `px-4` | `pl-4 pr-10` |
|
|
441
|
+
| `lg` | 44px | `px-8` | `px-4` | `pl-4 pr-10` |
|
|
442
|
+
|
|
443
|
+
Padding diverges at `lg` on purpose. A button's label is centered and wants the
|
|
444
|
+
room, while a field's text is left-aligned and a wide inset only pushes the
|
|
445
|
+
caret toward the middle. `Select`'s right padding is clearance for the chevron,
|
|
446
|
+
which is a fixed 14px at every size, so it has nothing to grow for.
|
|
447
|
+
|
|
448
|
+
Unit tests assert the three components resolve to the same height at every
|
|
449
|
+
shared size, so they cannot drift apart. `Button` also has `xs` and `icon`,
|
|
450
|
+
which neither field has an equivalent for. `Textarea` is not on this scale — it
|
|
451
|
+
is multi-line, so the answer there is a min-height rather than a height.
|
|
452
|
+
|
|
299
453
|
### Components that render links
|
|
300
454
|
|
|
301
455
|
`Breadcrumbs` renders a plain `<a>` by default, which is right for a static
|
|
@@ -355,7 +509,7 @@ function App() {
|
|
|
355
509
|
| `Disclosure` | Show/hide toggle using HeadlessUI |
|
|
356
510
|
| `Eyebrow` | Small tracked-out uppercase label above a heading or beside a rule; polymorphic via `as` |
|
|
357
511
|
| `InlineCode` | Inline `<code>` for identifiers in running prose |
|
|
358
|
-
| `Input` | Text input with label, error state, and
|
|
512
|
+
| `Input` | Text input with label, error state, icon slots, and a size scale matching `Button` |
|
|
359
513
|
| `LabeledDivider` | Horizontal rule carrying a label, with an optional trailing count |
|
|
360
514
|
| `Link` | Styled anchor with variant support |
|
|
361
515
|
| `PasswordInput` | Password field with a show/hide reveal toggle |
|
|
@@ -363,7 +517,7 @@ function App() {
|
|
|
363
517
|
| `AvatarStrip` | Stacked avatar row with overflow chip, dismiss button, trailing slot, and label area |
|
|
364
518
|
| `CollapsibleSection` | Clamps any content (prose, chips, image grids) to a fixed height with a fade and expand/collapse toggle |
|
|
365
519
|
| `LiquidTabs` | Controlled tab strip with a liquid sliding pill indicator: pill and filled variants |
|
|
366
|
-
| `Select` | Dropdown selector
|
|
520
|
+
| `Select` | Dropdown selector, on the same size scale as `Button` and `Input` |
|
|
367
521
|
| `SegmentBar` | Proportional horizontal bar divided into colored segments with optional legend |
|
|
368
522
|
| `Stat` | A single figure with its label and, optionally, where the figure came from |
|
|
369
523
|
| `Spinner` | Loading indicator |
|
|
@@ -1126,14 +1126,14 @@ const dr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, mr = Pn, e
|
|
|
1126
1126
|
},
|
|
1127
1127
|
compoundVariants: [
|
|
1128
1128
|
// --- SOLID VARIANTS (Bold Backgrounds) ---
|
|
1129
|
-
{ variant: "solid", colorScheme: "primary", className: "rst:bg-primary-600 rst:
|
|
1130
|
-
{ variant: "solid", colorScheme: "orange", className: "rst:bg-orange-600 rst:
|
|
1131
|
-
{ variant: "solid", colorScheme: "teal", className: "rst:bg-teal-600 rst:
|
|
1132
|
-
{ variant: "solid", colorScheme: "purple", className: "rst:bg-purple-600 rst:
|
|
1133
|
-
{ variant: "solid", colorScheme: "amber", className: "rst:bg-amber-400 rst:
|
|
1134
|
-
{ variant: "solid", colorScheme: "success", className: "rst:bg-success-600 rst:
|
|
1135
|
-
{ variant: "solid", colorScheme: "error", className: "rst:bg-error-600 rst:
|
|
1136
|
-
{ variant: "solid", colorScheme: "neutral", className: "rst:bg-gray-600 rst:
|
|
1129
|
+
{ variant: "solid", colorScheme: "primary", className: "rst:bg-primary-600 rst:hover:bg-primary-700 rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500 rst:text-primary-600-ink rst:hover:text-primary-700-ink rst:dark:hover:text-primary-500-ink" },
|
|
1130
|
+
{ variant: "solid", colorScheme: "orange", className: "rst:bg-orange-600 rst:hover:bg-orange-700 rst:dark:bg-orange-600 rst:dark:hover:bg-orange-700 rst:text-orange-600-ink rst:hover:text-orange-700-ink rst:dark:hover:text-orange-700-ink" },
|
|
1131
|
+
{ variant: "solid", colorScheme: "teal", className: "rst:bg-teal-600 rst:hover:bg-teal-500 rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500 rst:text-teal-600-ink rst:hover:text-teal-500-ink rst:dark:hover:text-teal-500-ink" },
|
|
1132
|
+
{ variant: "solid", colorScheme: "purple", className: "rst:bg-purple-600 rst:hover:bg-purple-700 rst:dark:bg-purple-600 rst:dark:hover:bg-purple-700 rst:text-purple-600-ink rst:hover:text-purple-700-ink rst:dark:hover:text-purple-700-ink" },
|
|
1133
|
+
{ variant: "solid", colorScheme: "amber", className: "rst:bg-amber-400 rst:hover:bg-amber-500 rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400 rst:text-amber-400-ink rst:hover:text-amber-500-ink rst:dark:text-amber-500-ink rst:dark:hover:text-amber-400-ink" },
|
|
1134
|
+
{ variant: "solid", colorScheme: "success", className: "rst:bg-success-600 rst:hover:bg-success-700 rst:dark:bg-success-600 rst:dark:hover:bg-success-700 rst:text-success-600-ink rst:hover:text-success-700-ink rst:dark:hover:text-success-700-ink" },
|
|
1135
|
+
{ variant: "solid", colorScheme: "error", className: "rst:bg-error-600 rst:hover:bg-error-700 rst:dark:bg-error-600 rst:dark:hover:bg-error-500 rst:text-error-600-ink rst:hover:text-error-700-ink rst:dark:hover:text-error-500-ink" },
|
|
1136
|
+
{ variant: "solid", colorScheme: "neutral", className: "rst:bg-gray-600 rst:hover:bg-gray-700 rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500 rst:text-gray-600-ink rst:hover:text-gray-700-ink rst:dark:hover:text-gray-500-ink" },
|
|
1137
1137
|
// --- SOFT VARIANTS (Crisp Light Mode, Translucent Dark Mode) ---
|
|
1138
1138
|
{ variant: "soft", colorScheme: "primary", className: "rst:bg-primary-50 rst:text-primary-700 rst:hover:bg-primary-100 rst:dark:bg-primary-900/40 rst:dark:text-primary-300 rst:dark:hover:bg-primary-900/60" },
|
|
1139
1139
|
{ variant: "soft", colorScheme: "orange", className: "rst:bg-orange-50 rst:text-orange-700 rst:hover:bg-orange-100 rst:dark:bg-orange-900/30 rst:dark:text-orange-300 rst:dark:hover:bg-orange-900/50" },
|
|
@@ -6,7 +6,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
6
6
|
<%s key={someKey} {...props} />`,P,F,se,F),sr[F+P]=!0)}if(F=null,N!==void 0&&(r(N),F=""+N),s(w)&&(r(w.key),F=""+w.key),"key"in w){N={};for(var nt in w)nt!=="key"&&(N[nt]=w[nt])}else N=w;return F&&i(N,typeof d=="function"?d.displayName||d.name||"Unknown":d),f(d,F,N,n(),Ie,at)}function u(d){p(d)?d._store&&(d._store.validated=1):typeof d=="object"&&d!==null&&d.$$typeof===pe&&(d._payload.status==="fulfilled"?p(d._payload.value)&&d._payload.value._store&&(d._payload.value._store.validated=1):d._store&&(d._store.validated=1))}function p(d){return typeof d=="object"&&d!==null&&d.$$typeof===y}var v=h,y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),R=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),et=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),Un=Symbol.for("react.activity"),Yn=Symbol.for("react.client.reference"),tt=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tr=Object.prototype.hasOwnProperty,Gn=Array.isArray,rt=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(d){return d()}};var rr,ar={},nr=v.react_stack_bottom_frame.bind(v,o)(),or=rt(a(o)),sr={};ge.Fragment=x,ge.jsx=function(d,w,N){var P=1e4>tt.recentlyCreatedOwnerStacks++;return c(d,w,N,!1,P?Error("react-stack-top-frame"):nr,P?rt(a(d)):or)},ge.jsxs=function(d,w,N){var P=1e4>tt.recentlyCreatedOwnerStacks++;return c(d,w,N,!0,P?Error("react-stack-top-frame"):nr,P?rt(a(d)):or)}})()),ge}var fr;function Jn(){return fr||(fr=1,process.env.NODE_ENV==="production"?Oe.exports=Xn():Oe.exports=qn()),Oe.exports}var C=Jn();const Zn=typeof document<"u"?h.useLayoutEffect:()=>{},Z=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},ee=e=>e&&"window"in e&&e.window===e?e:Z(e).defaultView||window;function Qn(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function eo(e){return Qn(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let to=!1;function Rt(){return to}function K(e,t){if(!Rt())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:eo(r)?r=r.host:r=r.parentNode}return!1}const vt=(e=document)=>{var t;if(!Rt())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(!((t=r.shadowRoot)===null||t===void 0)&&t.activeElement);)r=r.shadowRoot.activeElement;return r};function Gr(e){return Rt()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function ro(e){if(ao())e.focus({preventScroll:!0});else{let t=no(e);e.focus(),oo(t)}}let Le=null;function ao(){if(Le==null){Le=!1;try{document.createElement("div").focus({get preventScroll(){return Le=!0,!0}})}catch{}}return Le}function no(e){let t=e.parentNode,r=[],a=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==a;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return a instanceof HTMLElement&&r.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),r}function oo(e){for(let{element:t,scrollTop:r,scrollLeft:a}of e)t.scrollTop=r,t.scrollLeft=a}function Be(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let r=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(r)&&r.some(a=>e.test(a.brand))||e.test(window.navigator.userAgent)}function Mt(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Y(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Se=Y(function(){return Mt(/^Mac/i)}),so=Y(function(){return Mt(/^iPhone/i)}),Br=Y(function(){return Mt(/^iPad/i)||Se()&&navigator.maxTouchPoints>1}),io=Y(function(){return so()||Br()});Y(function(){return Se()||io()});const lo=Y(function(){return Be(/AppleWebKit/i)&&!fo()}),fo=Y(function(){return Be(/Chrome/i)}),uo=Y(function(){return Be(/Android/i)}),co=Y(function(){return Be(/Firefox/i)});function Ae(e,t,r=!0){var a,n;let{metaKey:o,ctrlKey:s,altKey:i,shiftKey:l}=t;co()&&(!((n=window.event)===null||n===void 0||(a=n.type)===null||a===void 0)&&a.startsWith("key"))&&e.target==="_blank"&&(Se()?o=!0:s=!0);let f=lo()&&Se()&&!Br()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ae.isOpening=r,ro(e),e.dispatchEvent(f),Ae.isOpening=!1}Ae.isOpening=!1;function Kr(){let e=h.useRef(new Map),t=h.useCallback((n,o,s,i)=>{let l=i?.once?(...f)=>{e.current.delete(s),s(...f)}:s;e.current.set(s,{type:o,eventTarget:n,fn:l,options:i}),n.addEventListener(o,l,i)},[]),r=h.useCallback((n,o,s,i)=>{var l;let f=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;n.removeEventListener(o,f,i),e.current.delete(s)},[]),a=h.useCallback(()=>{e.current.forEach((n,o)=>{r(n.eventTarget,n.type,o,n.options)})},[r]);return h.useEffect(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:a}}function mo(e){return e.pointerType===""&&e.isTrusted?!0:uo()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xr(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function vo(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function qr(e){let t=h.useRef({isFocused:!1,observer:null});return Zn(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),h.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let a=r.target,n=o=>{if(t.current.isFocused=!1,a.disabled){let s=Xr(o);e?.(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};a.addEventListener("focusout",n,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let po=!1,Te=null;const pt=new Set;let ye=new Map,re=!1,bt=!1;const bo={Tab:!0,Escape:!0};function Dt(e,t){for(let r of pt)r(e,t)}function go(e){return!(e.metaKey||!Se()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function He(e){re=!0,!Ae.isOpening&&go(e)&&(Te="keyboard",Dt("keyboard",e))}function _(e){Te="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(re=!0,Dt("pointer",e))}function Jr(e){!Ae.isOpening&&mo(e)&&(re=!0,Te="virtual")}function Zr(e){e.target===window||e.target===document||po||!e.isTrusted||(!re&&!bt&&(Te="virtual",Dt("virtual",e)),re=!1,bt=!1)}function Qr(){re=!1,bt=!0}function gt(e){if(typeof window>"u"||typeof document>"u"||ye.get(ee(e)))return;const t=ee(e),r=Z(e);let a=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){re=!0,a.apply(this,arguments)},r.addEventListener("keydown",He,!0),r.addEventListener("keyup",He,!0),r.addEventListener("click",Jr,!0),t.addEventListener("focus",Zr,!0),t.addEventListener("blur",Qr,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",_,!0),r.addEventListener("pointermove",_,!0),r.addEventListener("pointerup",_,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",_,!0),r.addEventListener("mousemove",_,!0),r.addEventListener("mouseup",_,!0)),t.addEventListener("beforeunload",()=>{ea(e)},{once:!0}),ye.set(t,{focus:a})}const ea=(e,t)=>{const r=ee(e),a=Z(e);t&&a.removeEventListener("DOMContentLoaded",t),ye.has(r)&&(r.HTMLElement.prototype.focus=ye.get(r).focus,a.removeEventListener("keydown",He,!0),a.removeEventListener("keyup",He,!0),a.removeEventListener("click",Jr,!0),r.removeEventListener("focus",Zr,!0),r.removeEventListener("blur",Qr,!1),typeof PointerEvent<"u"?(a.removeEventListener("pointerdown",_,!0),a.removeEventListener("pointermove",_,!0),a.removeEventListener("pointerup",_,!0)):process.env.NODE_ENV==="test"&&(a.removeEventListener("mousedown",_,!0),a.removeEventListener("mousemove",_,!0),a.removeEventListener("mouseup",_,!0)),ye.delete(r))};function ho(e){const t=Z(e);let r;return t.readyState!=="loading"?gt(e):(r=()=>{gt(e)},t.addEventListener("DOMContentLoaded",r)),()=>ea(e,r)}typeof document<"u"&&ho();function ht(){return Te!=="pointer"}const yo=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xo(e,t,r){let a=Z(r?.target);const n=typeof window<"u"?ee(r?.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?ee(r?.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?ee(r?.target).HTMLElement:HTMLElement,i=typeof window<"u"?ee(r?.target).KeyboardEvent:KeyboardEvent;return e=e||a.activeElement instanceof n&&!yo.has(a.activeElement.type)||a.activeElement instanceof o||a.activeElement instanceof s&&a.activeElement.isContentEditable,!(e&&t==="keyboard"&&r instanceof i&&!bo[r.key])}function ko(e,t,r){gt(),h.useEffect(()=>{if(r?.enabled===!1)return;let a=(n,o)=>{xo(!!r?.isTextInput,n,o)&&e(ht())};return pt.add(a),()=>{pt.delete(a)}},t)}function wo(e){let{isDisabled:t,onFocus:r,onBlur:a,onFocusChange:n}=e;const o=h.useCallback(l=>{if(l.target===l.currentTarget)return a&&a(l),n&&n(!1),!0},[a,n]),s=qr(o),i=h.useCallback(l=>{const f=Z(l.target),c=f?vt(f):vt();l.target===l.currentTarget&&c===Gr(l.nativeEvent)&&(r&&r(l),n&&n(!0),s(l))},[n,r,s]);return{focusProps:{onFocus:!t&&(r||n||a)?i:void 0,onBlur:!t&&(a||n)?o:void 0}}}function Eo(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:a,onFocusWithinChange:n}=e,o=h.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:i}=Kr(),l=h.useCallback(u=>{K(u.currentTarget,u.target)&&o.current.isFocusWithin&&!K(u.currentTarget,u.relatedTarget)&&(o.current.isFocusWithin=!1,i(),r&&r(u),n&&n(!1))},[r,n,o,i]),f=qr(l),c=h.useCallback(u=>{if(!K(u.currentTarget,u.target))return;const p=Z(u.target),v=vt(p);if(!o.current.isFocusWithin&&v===Gr(u.nativeEvent)){a&&a(u),n&&n(!0),o.current.isFocusWithin=!0,f(u);let y=u.currentTarget;s(p,"focus",b=>{if(o.current.isFocusWithin&&!K(y,b.target)){let x=new p.defaultView.FocusEvent("blur",{relatedTarget:b.target});vo(x,y);let S=Xr(x);l(S)}},{capture:!0})}},[a,n,f,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let Ve=!1,_e=0;function yt(){Ve=!0,setTimeout(()=>{Ve=!1},50)}function ur(e){e.pointerType==="touch"&&yt()}function So(){if(!(typeof document>"u"))return _e===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",ur):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",yt)),_e++,()=>{_e--,!(_e>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ur):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",yt))}}function ta(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:a,isDisabled:n}=e,[o,s]=h.useState(!1),i=h.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;h.useEffect(So,[]);let{addGlobalListener:l,removeAllGlobalListeners:f}=Kr(),{hoverProps:c,triggerHoverEnd:u}=h.useMemo(()=>{let p=(b,x)=>{if(i.pointerType=x,n||x==="touch"||i.isHovered||!K(b.currentTarget,b.target))return;i.isHovered=!0;let S=b.currentTarget;i.target=S,l(Z(b.target),"pointerover",A=>{i.isHovered&&i.target&&!K(i.target,A.target)&&v(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:S,pointerType:x}),r&&r(!0),s(!0)},v=(b,x)=>{let S=i.target;i.pointerType="",i.target=null,!(x==="touch"||!i.isHovered||!S)&&(i.isHovered=!1,f(),a&&a({type:"hoverend",target:S,pointerType:x}),r&&r(!1),s(!1))},y={};return typeof PointerEvent<"u"?(y.onPointerEnter=b=>{Ve&&b.pointerType==="mouse"||p(b,b.pointerType)},y.onPointerLeave=b=>{!n&&K(b.currentTarget,b.target)&&v(b,b.pointerType)}):process.env.NODE_ENV==="test"&&(y.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},y.onMouseEnter=b=>{!i.ignoreEmulatedMouseEvents&&!Ve&&p(b,"mouse"),i.ignoreEmulatedMouseEvents=!1},y.onMouseLeave=b=>{!n&&K(b.currentTarget,b.target)&&v(b,"mouse")}),{hoverProps:y,triggerHoverEnd:v}},[t,r,a,n,i,l,f]);return h.useEffect(()=>{n&&u({currentTarget:i.target},i.pointerType)},[n]),{hoverProps:c,isHovered:o}}function ra(e={}){let{autoFocus:t=!1,isTextInput:r,within:a}=e,n=h.useRef({isFocused:!1,isFocusVisible:t||ht()}),[o,s]=h.useState(!1),[i,l]=h.useState(()=>n.current.isFocused&&n.current.isFocusVisible),f=h.useCallback(()=>l(n.current.isFocused&&n.current.isFocusVisible),[]),c=h.useCallback(v=>{n.current.isFocused=v,n.current.isFocusVisible=ht(),s(v),f()},[f]);ko(v=>{n.current.isFocusVisible=v,f()},[r,o],{enabled:o,isTextInput:r});let{focusProps:u}=wo({isDisabled:a,onFocusChange:c}),{focusWithinProps:p}=Eo({isDisabled:!a,onFocusWithinChange:c});return{isFocused:o,isFocusVisible:i,focusProps:a?p:u}}var Ao=Object.defineProperty,$o=(e,t,r)=>t in e?Ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ot=(e,t,r)=>($o(e,typeof t!="symbol"?t+"":t,r),r);let No=class{constructor(){ot(this,"current",this.detect()),ot(this,"handoffState","pending"),ot(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ke=new No;function aa(e){var t;return Ke.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function na(e){var t,r;return Ke.isServer?null:e==null?document:(r=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?r:document}function oa(e){var t,r;return(r=(t=na(e))==null?void 0:t.activeElement)!=null?r:null}function To(e){return oa(e)===e}function sa(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function zt(){let e=[],t={addEventListener(r,a,n,o){return r.addEventListener(a,n,o),t.add(()=>r.removeEventListener(a,n,o))},requestAnimationFrame(...r){let a=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(a))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let a=setTimeout(...r);return t.add(()=>clearTimeout(a))},microTask(...r){let a={current:!0};return sa(()=>{a.current&&r[0]()}),t.add(()=>{a.current=!1})},style(r,a,n){let o=r.style.getPropertyValue(a);return Object.assign(r.style,{[a]:n}),this.add(()=>{Object.assign(r.style,{[a]:o})})},group(r){let a=zt();return r(a),this.add(()=>a.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let a=e.indexOf(r);if(a>=0)for(let n of e.splice(a,1))n()}},dispose(){for(let r of e.splice(0))r()}};return t}function ia(){let[e]=h.useState(zt);return h.useEffect(()=>()=>e.dispose(),[e]),e}let la=(e,t)=>{Ke.isServer?h.useEffect(e,t):h.useLayoutEffect(e,t)};function fa(e){let t=h.useRef(e);return la(()=>{t.current=e},[e]),t}let xt=function(e){let t=fa(e);return h.useCallback((...r)=>t.current(...r),[t])};function Po(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function Fo(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function ua({disabled:e=!1}={}){let t=h.useRef(null),[r,a]=h.useState(!1),n=ia(),o=xt(()=>{t.current=null,a(!1),n.dispose()}),s=xt(i=>{if(n.dispose(),t.current===null){t.current=i.currentTarget,a(!0);{let l=aa(i.currentTarget);n.addEventListener(l,"pointerup",o,!1),n.addEventListener(l,"pointermove",f=>{if(t.current){let c=Po(f);a(Fo(c,t.current.getBoundingClientRect()))}},!1),n.addEventListener(l,"pointercancel",o,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:o,onClick:o}}}function ca(e){return h.useMemo(()=>e,Object.values(e))}let da=h.createContext(void 0);function ma(){return h.useContext(da)}function Co({value:e,children:t}){return h.createElement(da.Provider,{value:e},t)}function kt(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Wt(e,t,...r){if(e in t){let n=t[e];return typeof n=="function"?n(...r):n}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,Wt),a}var va=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(va||{}),pa=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pa||{});function ba(){let e=Oo();return h.useCallback(t=>Io({mergeRefs:e,...t}),[e])}function Io({ourProps:e,theirProps:t,slot:r,defaultTag:a,features:n,visible:o=!0,name:s,mergeRefs:i}){i=i??Lo;let l=ga(t,e);if(o)return je(l,r,a,s,i);let f=n??0;if(f&2){let{static:c=!1,...u}=l;if(c)return je(u,r,a,s,i)}if(f&1){let{unmount:c=!0,...u}=l;return Wt(c?0:1,{0(){return null},1(){return je({...u,hidden:!0,style:{display:"none"}},r,a,s,i)}})}return je(l,r,a,s,i)}function je(e,t={},r,a,n){let{as:o=r,children:s,refName:i="ref",...l}=st(e,["unmount","static"]),f=e.ref!==void 0?{[i]:e.ref}:{},c=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let p=!1,v=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&v.push(y.replace(/([A-Z])/g,x=>`-${x.toLowerCase()}`));if(p){u["data-headlessui-state"]=v.join(" ");for(let y of v)u[`data-${y}`]=""}}if(xe(o)&&(Object.keys(Q(l)).length>0||Object.keys(Q(u)).length>0))if(!h.isValidElement(c)||Array.isArray(c)&&c.length>1||jo(c)){if(Object.keys(Q(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Q(l)).concat(Object.keys(Q(u))).map(p=>` - ${p}`).join(`
|
|
7
7
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
8
8
|
`)].join(`
|
|
9
|
-
`))}else{let p=c.props,v=p?.className,y=typeof v=="function"?(...S)=>kt(v(...S),l.className):kt(v,l.className),b=y?{className:y}:{},x=ga(c.props,Q(st(l,["ref"])));for(let S in u)S in x&&delete u[S];return h.cloneElement(c,Object.assign({},x,u,f,{ref:n(_o(c),f.ref)},b))}return h.createElement(o,Object.assign({},st(l,["ref"]),!xe(o)&&f,!xe(o)&&u),c)}function Oo(){let e=h.useRef([]),t=h.useCallback(r=>{for(let a of e.current)a!=null&&(typeof a=="function"?a(r):a.current=r)},[]);return(...r)=>{if(!r.every(a=>a==null))return e.current=r,t}}function Lo(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function ga(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let a of e)for(let n in a)n.startsWith("on")&&typeof a[n]=="function"?(r[n]!=null||(r[n]=[]),r[n].push(a[n])):t[n]=a[n];if(t.disabled||t["aria-disabled"])for(let a in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(a)&&(r[a]=[n=>{var o;return(o=n?.preventDefault)==null?void 0:o.call(n)}]);for(let a in r)Object.assign(t,{[a](n,...o){let s=r[a];for(let i of s){if((n instanceof Event||n?.nativeEvent instanceof Event)&&n.defaultPrevented)return;i(n,...o)}}});return t}function ha(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let a of e)for(let n in a)n.startsWith("on")&&typeof a[n]=="function"?(r[n]!=null||(r[n]=[]),r[n].push(a[n])):t[n]=a[n];for(let a in r)Object.assign(t,{[a](...n){let o=r[a];for(let s of o)s?.(...n)}});return t}function ya(e){var t;return Object.assign(h.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Q(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function st(e,t=[]){let r=Object.assign({},e);for(let a of t)a in r&&delete r[a];return r}function _o(e){return h.version.split(".")[0]>="19"?e.props.ref:e.ref}function xe(e){return e===h.Fragment||e===Symbol.for("react.fragment")}function jo(e){return xe(e.type)}let Ro="button";function Mo(e,t){var r;let a=ma(),{disabled:n=a||!1,autoFocus:o=!1,...s}=e,{isFocusVisible:i,focusProps:l}=ra({autoFocus:o}),{isHovered:f,hoverProps:c}=ta({isDisabled:n}),{pressed:u,pressProps:p}=ua({disabled:n}),v=ha({ref:t,type:(r=s.type)!=null?r:"button",disabled:n||void 0,autoFocus:o},l,c,p),y=ca({disabled:n,hover:f,focus:i,active:u,autofocus:o});return ba()({ourProps:v,theirProps:s,slot:y,defaultTag:Ro,name:"Button"})}let Do=ya(Mo);const cr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dr=j.clsx,G=(e,t)=>r=>{var a;if(t?.variants==null)return dr(e,r?.class,r?.className);const{variants:n,defaultVariants:o}=t,s=Object.keys(n).map(f=>{const c=r?.[f],u=o?.[f];if(c===null)return null;const p=cr(c)||cr(u);return n[f][p]}),i=r&&Object.entries(r).reduce((f,c)=>{let[u,p]=c;return p===void 0||(f[u]=p),f},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((f,c)=>{let{class:u,className:p,...v}=c;return Object.entries(v).every(y=>{let[b,x]=y;return Array.isArray(x)?x.includes({...o,...i}[b]):{...o,...i}[b]===x})?[...f,u,p]:f},[]);return dr(e,s,l,r?.class,r?.className)},zo=G("rst:animate-spin rst:rounded-full rst:transition-colors",{variants:{variant:{primary:"rst:border-primary-600 rst:dark:border-primary-500",neutral:"rst:border-gray-600 rst:dark:border-gray-400",danger:"rst:border-error-600 rst:dark:border-error-500",white:"rst:border-white",current:"rst:border-current"},size:{sm:"rst:h-4 rst:w-4 rst:border-2",md:"rst:h-6 rst:w-6 rst:border-[3px]",lg:"rst:h-8 rst:w-8 rst:border-4"},animation:{classic:"rst:border-solid rst:border-r-transparent rst:dark:border-r-transparent",half:"rst:border-solid rst:border-r-transparent rst:border-b-transparent rst:dark:border-r-transparent rst:dark:border-b-transparent",dashed:"rst:border-dashed",dotted:"rst:border-dotted rst:border-r-transparent rst:dark:border-r-transparent"}},defaultVariants:{variant:"primary",size:"md",animation:"classic"}}),xa=({variant:e,size:t,animation:r,className:a})=>C.jsx("div",{className:j.cn(zo({variant:e,size:t,animation:r}),a),role:"status","aria-label":"loading"}),ka=G("rst:font-ui rst:inline-flex rst:items-center rst:justify-center rst:cursor-pointer rst:whitespace-nowrap rst:rounded-md rst:text-sm rst:font-medium rst:ring-offset-background rst:transition-colors rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:disabled:pointer-events-none rst:disabled:opacity-50",{variants:{variant:{solid:"rst:border rst:border-transparent rst:shadow-sm",soft:"rst:border-transparent rst:shadow-none",outline:"rst:border rst:bg-transparent rst:shadow-sm",ghost:"rst:border rst:border-transparent rst:bg-transparent",link:"rst:bg-transparent rst:underline-offset-4 rst:hover:underline"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""},size:{xs:"rst:h-7 rst:rounded rst:px-2 rst:text-xs",sm:"rst:h-9 rst:rounded-md rst:px-3",default:"rst:h-10 rst:px-4 rst:py-2",lg:"rst:h-11 rst:rounded-md rst:px-8",icon:"rst:h-10 rst:w-10"}},compoundVariants:[{variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:text-white rst:hover:bg-primary-700 rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500"},{variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:text-white rst:hover:bg-orange-700 rst:dark:bg-orange-600 rst:dark:hover:bg-orange-700"},{variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:text-gray-950 rst:hover:bg-teal-500 rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500"},{variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:text-white rst:hover:bg-purple-700 rst:dark:bg-purple-600 rst:dark:hover:bg-purple-700"},{variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:text-gray-950 rst:hover:bg-amber-500 rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400"},{variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:text-white rst:hover:bg-success-700 rst:dark:bg-success-600 rst:dark:hover:bg-success-700"},{variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:text-white rst:hover:bg-error-700 rst:dark:bg-error-600 rst:dark:hover:bg-error-500"},{variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:text-white rst:hover:bg-gray-700 rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500"},{variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:text-primary-700 rst:hover:bg-primary-100 rst:dark:bg-primary-900/40 rst:dark:text-primary-300 rst:dark:hover:bg-primary-900/60"},{variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:text-orange-700 rst:hover:bg-orange-100 rst:dark:bg-orange-900/30 rst:dark:text-orange-300 rst:dark:hover:bg-orange-900/50"},{variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:text-teal-800 rst:hover:bg-teal-200 rst:dark:bg-teal-900/30 rst:dark:text-teal-300 rst:dark:hover:bg-teal-900/50"},{variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:text-purple-700 rst:hover:bg-purple-100 rst:dark:bg-purple-900/30 rst:dark:text-purple-300 rst:dark:hover:bg-purple-900/50"},{variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:text-amber-800 rst:hover:bg-amber-100 rst:dark:bg-amber-900/30 rst:dark:text-amber-300 rst:dark:hover:bg-amber-900/50"},{variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:text-success-700 rst:hover:bg-success-100 rst:dark:bg-success-900/30 rst:dark:text-success-300 rst:dark:hover:bg-success-900/50"},{variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:text-error-700 rst:hover:bg-error-100 rst:dark:bg-error-900/30 rst:dark:text-error-300 rst:dark:hover:bg-error-900/50"},{variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:text-gray-700 rst:hover:bg-gray-200 rst:dark:bg-gray-800/50 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800"},{variant:"outline",colorScheme:"primary",className:"rst:border-primary-600 rst:text-primary-600 rst:hover:bg-primary-50 rst:dark:border-primary-500 rst:dark:text-primary-400 rst:dark:hover:bg-primary-500/10"},{variant:"outline",colorScheme:"orange",className:"rst:border-orange-600 rst:text-orange-600 rst:hover:bg-orange-50 rst:dark:border-orange-500 rst:dark:text-orange-400 rst:dark:hover:bg-orange-500/10"},{variant:"outline",colorScheme:"teal",className:"rst:border-teal-600 rst:text-teal-600 rst:hover:bg-teal-50 rst:dark:border-teal-500 rst:dark:text-teal-400 rst:dark:hover:bg-teal-500/10"},{variant:"outline",colorScheme:"purple",className:"rst:border-purple-600 rst:text-purple-600 rst:hover:bg-purple-50 rst:dark:border-purple-500 rst:dark:text-purple-400 rst:dark:hover:bg-purple-500/10"},{variant:"outline",colorScheme:"amber",className:"rst:border-amber-600 rst:text-amber-600 rst:hover:bg-amber-50 rst:dark:border-amber-500 rst:dark:text-amber-400 rst:dark:hover:bg-amber-500/10"},{variant:"outline",colorScheme:"success",className:"rst:border-success-600 rst:text-success-600 rst:hover:bg-success-50 rst:dark:border-success-500 rst:dark:text-success-400 rst:dark:hover:bg-success-500/10"},{variant:"outline",colorScheme:"error",className:"rst:border-error-600 rst:text-error-600 rst:hover:bg-error-50 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:hover:bg-error-500/10"},{variant:"outline",colorScheme:"neutral",className:"rst:border-gray-300 rst:text-gray-700 rst:hover:bg-gray-50 rst:dark:border-gray-600 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800/50"},{variant:"ghost",colorScheme:"primary",className:"rst:text-primary-600 rst:hover:bg-primary-500/10 rst:dark:text-primary-400 rst:dark:hover:bg-primary-400/15"},{variant:"ghost",colorScheme:"orange",className:"rst:text-orange-600 rst:hover:bg-orange-500/10 rst:dark:text-orange-400 rst:dark:hover:bg-orange-400/15"},{variant:"ghost",colorScheme:"teal",className:"rst:text-teal-600 rst:hover:bg-teal-500/10 rst:dark:text-teal-400 rst:dark:hover:bg-teal-400/15"},{variant:"ghost",colorScheme:"purple",className:"rst:text-purple-600 rst:hover:bg-purple-500/10 rst:dark:text-purple-400 rst:dark:hover:bg-purple-400/15"},{variant:"ghost",colorScheme:"amber",className:"rst:text-amber-600 rst:hover:bg-amber-500/10 rst:dark:text-amber-400 rst:dark:hover:bg-amber-400/15"},{variant:"ghost",colorScheme:"success",className:"rst:text-success-600 rst:hover:bg-success-500/10 rst:dark:text-success-400 rst:dark:hover:bg-success-400/15"},{variant:"ghost",colorScheme:"error",className:"rst:text-error-600 rst:hover:bg-error-500/10 rst:dark:text-error-400 rst:dark:hover:bg-error-400/15"},{variant:"ghost",colorScheme:"neutral",className:"rst:text-gray-600 rst:hover:bg-gray-500/10 rst:dark:text-gray-400 rst:dark:hover:bg-gray-400/15"},{variant:"link",colorScheme:"primary",className:"rst:text-primary-600 rst:hover:text-primary-700 rst:dark:text-primary-400 rst:dark:hover:text-primary-300"},{variant:"link",colorScheme:"orange",className:"rst:text-orange-600 rst:hover:text-orange-700 rst:dark:text-orange-400 rst:dark:hover:text-orange-300"},{variant:"link",colorScheme:"teal",className:"rst:text-teal-600 rst:hover:text-teal-700 rst:dark:text-teal-400 rst:dark:hover:text-teal-300"},{variant:"link",colorScheme:"purple",className:"rst:text-purple-600 rst:hover:text-purple-700 rst:dark:text-purple-400 rst:dark:hover:text-purple-300"},{variant:"link",colorScheme:"amber",className:"rst:text-amber-600 rst:hover:text-amber-700 rst:dark:text-amber-400 rst:dark:hover:text-amber-300"},{variant:"link",colorScheme:"success",className:"rst:text-success-600 rst:hover:text-success-700 rst:dark:text-success-400 rst:dark:hover:text-success-300"},{variant:"link",colorScheme:"error",className:"rst:text-error-600 rst:hover:text-error-700 rst:dark:text-error-400 rst:dark:hover:text-error-300"},{variant:"link",colorScheme:"neutral",className:"rst:text-gray-600 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"default"}}),wa=h.forwardRef(({className:e,colorScheme:t,variant:r,size:a,isLoading:n=!1,startIcon:o,endIcon:s,surface:i="auto",disabled:l,children:f,...c},u)=>{const p=l||n;return C.jsxs(Do,{className:j.cn(ka({colorScheme:t,variant:r,size:a}),i==="dark"&&"dark",e),ref:u,disabled:p,...c,children:[n&&C.jsx("span",{className:"rst:mr-2 rst:flex rst:shrink-0 rst:items-center",children:C.jsx(xa,{size:"sm",variant:"current"})}),!n&&o&&C.jsx("span",{className:"rst:mr-2 rst:inline-flex rst:shrink-0 rst:items-center",children:o}),f,!n&&s&&C.jsx("span",{className:"rst:ml-2 rst:inline-flex rst:shrink-0 rst:items-center",children:s})]})});wa.displayName="Button";function wt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function Wo(e){if(Array.isArray(e))return e}function Ho(e){if(Array.isArray(e))return wt(e)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uo(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Ea(a.key),a)}}function Yo(e,t,r){return t&&Uo(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ht(e))||t){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
+
`))}else{let p=c.props,v=p?.className,y=typeof v=="function"?(...S)=>kt(v(...S),l.className):kt(v,l.className),b=y?{className:y}:{},x=ga(c.props,Q(st(l,["ref"])));for(let S in u)S in x&&delete u[S];return h.cloneElement(c,Object.assign({},x,u,f,{ref:n(_o(c),f.ref)},b))}return h.createElement(o,Object.assign({},st(l,["ref"]),!xe(o)&&f,!xe(o)&&u),c)}function Oo(){let e=h.useRef([]),t=h.useCallback(r=>{for(let a of e.current)a!=null&&(typeof a=="function"?a(r):a.current=r)},[]);return(...r)=>{if(!r.every(a=>a==null))return e.current=r,t}}function Lo(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function ga(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let a of e)for(let n in a)n.startsWith("on")&&typeof a[n]=="function"?(r[n]!=null||(r[n]=[]),r[n].push(a[n])):t[n]=a[n];if(t.disabled||t["aria-disabled"])for(let a in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(a)&&(r[a]=[n=>{var o;return(o=n?.preventDefault)==null?void 0:o.call(n)}]);for(let a in r)Object.assign(t,{[a](n,...o){let s=r[a];for(let i of s){if((n instanceof Event||n?.nativeEvent instanceof Event)&&n.defaultPrevented)return;i(n,...o)}}});return t}function ha(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let a of e)for(let n in a)n.startsWith("on")&&typeof a[n]=="function"?(r[n]!=null||(r[n]=[]),r[n].push(a[n])):t[n]=a[n];for(let a in r)Object.assign(t,{[a](...n){let o=r[a];for(let s of o)s?.(...n)}});return t}function ya(e){var t;return Object.assign(h.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Q(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function st(e,t=[]){let r=Object.assign({},e);for(let a of t)a in r&&delete r[a];return r}function _o(e){return h.version.split(".")[0]>="19"?e.props.ref:e.ref}function xe(e){return e===h.Fragment||e===Symbol.for("react.fragment")}function jo(e){return xe(e.type)}let Ro="button";function Mo(e,t){var r;let a=ma(),{disabled:n=a||!1,autoFocus:o=!1,...s}=e,{isFocusVisible:i,focusProps:l}=ra({autoFocus:o}),{isHovered:f,hoverProps:c}=ta({isDisabled:n}),{pressed:u,pressProps:p}=ua({disabled:n}),v=ha({ref:t,type:(r=s.type)!=null?r:"button",disabled:n||void 0,autoFocus:o},l,c,p),y=ca({disabled:n,hover:f,focus:i,active:u,autofocus:o});return ba()({ourProps:v,theirProps:s,slot:y,defaultTag:Ro,name:"Button"})}let Do=ya(Mo);const cr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dr=j.clsx,G=(e,t)=>r=>{var a;if(t?.variants==null)return dr(e,r?.class,r?.className);const{variants:n,defaultVariants:o}=t,s=Object.keys(n).map(f=>{const c=r?.[f],u=o?.[f];if(c===null)return null;const p=cr(c)||cr(u);return n[f][p]}),i=r&&Object.entries(r).reduce((f,c)=>{let[u,p]=c;return p===void 0||(f[u]=p),f},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((f,c)=>{let{class:u,className:p,...v}=c;return Object.entries(v).every(y=>{let[b,x]=y;return Array.isArray(x)?x.includes({...o,...i}[b]):{...o,...i}[b]===x})?[...f,u,p]:f},[]);return dr(e,s,l,r?.class,r?.className)},zo=G("rst:animate-spin rst:rounded-full rst:transition-colors",{variants:{variant:{primary:"rst:border-primary-600 rst:dark:border-primary-500",neutral:"rst:border-gray-600 rst:dark:border-gray-400",danger:"rst:border-error-600 rst:dark:border-error-500",white:"rst:border-white",current:"rst:border-current"},size:{sm:"rst:h-4 rst:w-4 rst:border-2",md:"rst:h-6 rst:w-6 rst:border-[3px]",lg:"rst:h-8 rst:w-8 rst:border-4"},animation:{classic:"rst:border-solid rst:border-r-transparent rst:dark:border-r-transparent",half:"rst:border-solid rst:border-r-transparent rst:border-b-transparent rst:dark:border-r-transparent rst:dark:border-b-transparent",dashed:"rst:border-dashed",dotted:"rst:border-dotted rst:border-r-transparent rst:dark:border-r-transparent"}},defaultVariants:{variant:"primary",size:"md",animation:"classic"}}),xa=({variant:e,size:t,animation:r,className:a})=>C.jsx("div",{className:j.cn(zo({variant:e,size:t,animation:r}),a),role:"status","aria-label":"loading"}),ka=G("rst:font-ui rst:inline-flex rst:items-center rst:justify-center rst:cursor-pointer rst:whitespace-nowrap rst:rounded-md rst:text-sm rst:font-medium rst:ring-offset-background rst:transition-colors rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:disabled:pointer-events-none rst:disabled:opacity-50",{variants:{variant:{solid:"rst:border rst:border-transparent rst:shadow-sm",soft:"rst:border-transparent rst:shadow-none",outline:"rst:border rst:bg-transparent rst:shadow-sm",ghost:"rst:border rst:border-transparent rst:bg-transparent",link:"rst:bg-transparent rst:underline-offset-4 rst:hover:underline"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""},size:{xs:"rst:h-7 rst:rounded rst:px-2 rst:text-xs",sm:"rst:h-9 rst:rounded-md rst:px-3",default:"rst:h-10 rst:px-4 rst:py-2",lg:"rst:h-11 rst:rounded-md rst:px-8",icon:"rst:h-10 rst:w-10"}},compoundVariants:[{variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:hover:bg-primary-700 rst:dark:bg-primary-600 rst:dark:hover:bg-primary-500 rst:text-primary-600-ink rst:hover:text-primary-700-ink rst:dark:hover:text-primary-500-ink"},{variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:hover:bg-orange-700 rst:dark:bg-orange-600 rst:dark:hover:bg-orange-700 rst:text-orange-600-ink rst:hover:text-orange-700-ink rst:dark:hover:text-orange-700-ink"},{variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:hover:bg-teal-500 rst:dark:bg-teal-600 rst:dark:hover:bg-teal-500 rst:text-teal-600-ink rst:hover:text-teal-500-ink rst:dark:hover:text-teal-500-ink"},{variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:hover:bg-purple-700 rst:dark:bg-purple-600 rst:dark:hover:bg-purple-700 rst:text-purple-600-ink rst:hover:text-purple-700-ink rst:dark:hover:text-purple-700-ink"},{variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:hover:bg-amber-500 rst:dark:bg-amber-500 rst:dark:hover:bg-amber-400 rst:text-amber-400-ink rst:hover:text-amber-500-ink rst:dark:text-amber-500-ink rst:dark:hover:text-amber-400-ink"},{variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:hover:bg-success-700 rst:dark:bg-success-600 rst:dark:hover:bg-success-700 rst:text-success-600-ink rst:hover:text-success-700-ink rst:dark:hover:text-success-700-ink"},{variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:hover:bg-error-700 rst:dark:bg-error-600 rst:dark:hover:bg-error-500 rst:text-error-600-ink rst:hover:text-error-700-ink rst:dark:hover:text-error-500-ink"},{variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:hover:bg-gray-700 rst:dark:bg-gray-600 rst:dark:hover:bg-gray-500 rst:text-gray-600-ink rst:hover:text-gray-700-ink rst:dark:hover:text-gray-500-ink"},{variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:text-primary-700 rst:hover:bg-primary-100 rst:dark:bg-primary-900/40 rst:dark:text-primary-300 rst:dark:hover:bg-primary-900/60"},{variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:text-orange-700 rst:hover:bg-orange-100 rst:dark:bg-orange-900/30 rst:dark:text-orange-300 rst:dark:hover:bg-orange-900/50"},{variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:text-teal-800 rst:hover:bg-teal-200 rst:dark:bg-teal-900/30 rst:dark:text-teal-300 rst:dark:hover:bg-teal-900/50"},{variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:text-purple-700 rst:hover:bg-purple-100 rst:dark:bg-purple-900/30 rst:dark:text-purple-300 rst:dark:hover:bg-purple-900/50"},{variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:text-amber-800 rst:hover:bg-amber-100 rst:dark:bg-amber-900/30 rst:dark:text-amber-300 rst:dark:hover:bg-amber-900/50"},{variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:text-success-700 rst:hover:bg-success-100 rst:dark:bg-success-900/30 rst:dark:text-success-300 rst:dark:hover:bg-success-900/50"},{variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:text-error-700 rst:hover:bg-error-100 rst:dark:bg-error-900/30 rst:dark:text-error-300 rst:dark:hover:bg-error-900/50"},{variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:text-gray-700 rst:hover:bg-gray-200 rst:dark:bg-gray-800/50 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800"},{variant:"outline",colorScheme:"primary",className:"rst:border-primary-600 rst:text-primary-600 rst:hover:bg-primary-50 rst:dark:border-primary-500 rst:dark:text-primary-400 rst:dark:hover:bg-primary-500/10"},{variant:"outline",colorScheme:"orange",className:"rst:border-orange-600 rst:text-orange-600 rst:hover:bg-orange-50 rst:dark:border-orange-500 rst:dark:text-orange-400 rst:dark:hover:bg-orange-500/10"},{variant:"outline",colorScheme:"teal",className:"rst:border-teal-600 rst:text-teal-600 rst:hover:bg-teal-50 rst:dark:border-teal-500 rst:dark:text-teal-400 rst:dark:hover:bg-teal-500/10"},{variant:"outline",colorScheme:"purple",className:"rst:border-purple-600 rst:text-purple-600 rst:hover:bg-purple-50 rst:dark:border-purple-500 rst:dark:text-purple-400 rst:dark:hover:bg-purple-500/10"},{variant:"outline",colorScheme:"amber",className:"rst:border-amber-600 rst:text-amber-600 rst:hover:bg-amber-50 rst:dark:border-amber-500 rst:dark:text-amber-400 rst:dark:hover:bg-amber-500/10"},{variant:"outline",colorScheme:"success",className:"rst:border-success-600 rst:text-success-600 rst:hover:bg-success-50 rst:dark:border-success-500 rst:dark:text-success-400 rst:dark:hover:bg-success-500/10"},{variant:"outline",colorScheme:"error",className:"rst:border-error-600 rst:text-error-600 rst:hover:bg-error-50 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:hover:bg-error-500/10"},{variant:"outline",colorScheme:"neutral",className:"rst:border-gray-300 rst:text-gray-700 rst:hover:bg-gray-50 rst:dark:border-gray-600 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800/50"},{variant:"ghost",colorScheme:"primary",className:"rst:text-primary-600 rst:hover:bg-primary-500/10 rst:dark:text-primary-400 rst:dark:hover:bg-primary-400/15"},{variant:"ghost",colorScheme:"orange",className:"rst:text-orange-600 rst:hover:bg-orange-500/10 rst:dark:text-orange-400 rst:dark:hover:bg-orange-400/15"},{variant:"ghost",colorScheme:"teal",className:"rst:text-teal-600 rst:hover:bg-teal-500/10 rst:dark:text-teal-400 rst:dark:hover:bg-teal-400/15"},{variant:"ghost",colorScheme:"purple",className:"rst:text-purple-600 rst:hover:bg-purple-500/10 rst:dark:text-purple-400 rst:dark:hover:bg-purple-400/15"},{variant:"ghost",colorScheme:"amber",className:"rst:text-amber-600 rst:hover:bg-amber-500/10 rst:dark:text-amber-400 rst:dark:hover:bg-amber-400/15"},{variant:"ghost",colorScheme:"success",className:"rst:text-success-600 rst:hover:bg-success-500/10 rst:dark:text-success-400 rst:dark:hover:bg-success-400/15"},{variant:"ghost",colorScheme:"error",className:"rst:text-error-600 rst:hover:bg-error-500/10 rst:dark:text-error-400 rst:dark:hover:bg-error-400/15"},{variant:"ghost",colorScheme:"neutral",className:"rst:text-gray-600 rst:hover:bg-gray-500/10 rst:dark:text-gray-400 rst:dark:hover:bg-gray-400/15"},{variant:"link",colorScheme:"primary",className:"rst:text-primary-600 rst:hover:text-primary-700 rst:dark:text-primary-400 rst:dark:hover:text-primary-300"},{variant:"link",colorScheme:"orange",className:"rst:text-orange-600 rst:hover:text-orange-700 rst:dark:text-orange-400 rst:dark:hover:text-orange-300"},{variant:"link",colorScheme:"teal",className:"rst:text-teal-600 rst:hover:text-teal-700 rst:dark:text-teal-400 rst:dark:hover:text-teal-300"},{variant:"link",colorScheme:"purple",className:"rst:text-purple-600 rst:hover:text-purple-700 rst:dark:text-purple-400 rst:dark:hover:text-purple-300"},{variant:"link",colorScheme:"amber",className:"rst:text-amber-600 rst:hover:text-amber-700 rst:dark:text-amber-400 rst:dark:hover:text-amber-300"},{variant:"link",colorScheme:"success",className:"rst:text-success-600 rst:hover:text-success-700 rst:dark:text-success-400 rst:dark:hover:text-success-300"},{variant:"link",colorScheme:"error",className:"rst:text-error-600 rst:hover:text-error-700 rst:dark:text-error-400 rst:dark:hover:text-error-300"},{variant:"link",colorScheme:"neutral",className:"rst:text-gray-600 rst:hover:text-gray-900 rst:dark:text-gray-400 rst:dark:hover:text-gray-100"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"default"}}),wa=h.forwardRef(({className:e,colorScheme:t,variant:r,size:a,isLoading:n=!1,startIcon:o,endIcon:s,surface:i="auto",disabled:l,children:f,...c},u)=>{const p=l||n;return C.jsxs(Do,{className:j.cn(ka({colorScheme:t,variant:r,size:a}),i==="dark"&&"dark",e),ref:u,disabled:p,...c,children:[n&&C.jsx("span",{className:"rst:mr-2 rst:flex rst:shrink-0 rst:items-center",children:C.jsx(xa,{size:"sm",variant:"current"})}),!n&&o&&C.jsx("span",{className:"rst:mr-2 rst:inline-flex rst:shrink-0 rst:items-center",children:o}),f,!n&&s&&C.jsx("span",{className:"rst:ml-2 rst:inline-flex rst:shrink-0 rst:items-center",children:s})]})});wa.displayName="Button";function wt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function Wo(e){if(Array.isArray(e))return e}function Ho(e){if(Array.isArray(e))return wt(e)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uo(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Ea(a.key),a)}}function Yo(e,t,r){return t&&Uo(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ht(e))||t){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
10
10
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return s=l.done,l},e:function(l){i=!0,o=l},f:function(){try{s||r.return==null||r.return()}finally{if(i)throw o}}}}function k(e,t,r){return(t=Ea(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Go(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bo(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,n,o,s,i=[],l=!0,f=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=o.call(r)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(c){f=!0,n=c}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw n}}return i}}function Ko(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
11
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
12
12
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(Object(r),!0).forEach(function(a){k(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Xe(e,t){return Wo(e)||Bo(e,t)||Ht(e,t)||Ko()}function D(e){return Ho(e)||Go(e)||Ht(e)||Xo()}function qo(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ea(e){var t=qo(e,"string");return typeof t=="symbol"?t:t+""}function Ue(e){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(e)}function Ht(e,t){if(e){if(typeof e=="string")return wt(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wt(e,t):void 0}}var vr=function(){},Vt={},Sa={},Aa=null,$a={mark:vr,measure:vr};try{typeof window<"u"&&(Vt=window),typeof document<"u"&&(Sa=document),typeof MutationObserver<"u"&&(Aa=MutationObserver),typeof performance<"u"&&($a=performance)}catch{}var Jo=Vt.navigator||{},pr=Jo.userAgent,br=pr===void 0?"":pr,X=Vt,$=Sa,gr=Aa,Re=$a;X.document;var B=!!$.documentElement&&!!$.head&&typeof $.addEventListener=="function"&&typeof $.createElement=="function",Na=~br.indexOf("MSIE")||~br.indexOf("Trident/"),it,Zo=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|gt|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,Qo=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Graphite|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,Ta={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},graphite:{"fa-thin":"thin",fagt:"thin"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},es={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Pa=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],I="classic",Pe="duotone",Fa="sharp",Ca="sharp-duotone",Ia="chisel",Oa="etch",La="graphite",_a="jelly",ja="jelly-duo",Ra="jelly-fill",Ma="notdog",Da="notdog-duo",za="slab",Wa="slab-press",Ha="thumbprint",Va="utility",Ua="utility-duo",Ya="utility-fill",Ga="whiteboard",ts="Classic",rs="Duotone",as="Sharp",ns="Sharp Duotone",os="Chisel",ss="Etch",is="Graphite",ls="Jelly",fs="Jelly Duo",us="Jelly Fill",cs="Notdog",ds="Notdog Duo",ms="Slab",vs="Slab Press",ps="Thumbprint",bs="Utility",gs="Utility Duo",hs="Utility Fill",ys="Whiteboard",Ba=[I,Pe,Fa,Ca,Ia,Oa,La,_a,ja,Ra,Ma,Da,za,Wa,Ha,Va,Ua,Ya,Ga];it={},k(k(k(k(k(k(k(k(k(k(it,I,ts),Pe,rs),Fa,as),Ca,ns),Ia,os),Oa,ss),La,is),_a,ls),ja,fs),Ra,us),k(k(k(k(k(k(k(k(k(it,Ma,cs),Da,ds),za,ms),Wa,vs),Ha,ps),Va,bs),Ua,gs),Ya,hs),Ga,ys);var xs={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},graphite:{100:"fagt"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},ks={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Graphite":{100:"fagt",normal:"fagt"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},ws=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["graphite",{defaultShortPrefixId:"fagt",defaultStyleId:"thin",styleIds:["thin"],futureStyleIds:[],defaultFontWeight:100}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),Es={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},graphite:{thin:"fagt"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},Ka=["fak","fa-kit","fakd","fa-kit-duotone"],hr={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Ss=["kit"],As="kit",$s="kit-duotone",Ns="Kit",Ts="Kit Duotone";k(k({},As,Ns),$s,Ts);var Ps={kit:{"fa-kit":"fak"}},Fs={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Cs={kit:{fak:"fa-kit"}},yr={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},lt,Me={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Is=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Os="classic",Ls="duotone",_s="sharp",js="sharp-duotone",Rs="chisel",Ms="etch",Ds="graphite",zs="jelly",Ws="jelly-duo",Hs="jelly-fill",Vs="notdog",Us="notdog-duo",Ys="slab",Gs="slab-press",Bs="thumbprint",Ks="utility",Xs="utility-duo",qs="utility-fill",Js="whiteboard",Zs="Classic",Qs="Duotone",ei="Sharp",ti="Sharp Duotone",ri="Chisel",ai="Etch",ni="Graphite",oi="Jelly",si="Jelly Duo",ii="Jelly Fill",li="Notdog",fi="Notdog Duo",ui="Slab",ci="Slab Press",di="Thumbprint",mi="Utility",vi="Utility Duo",pi="Utility Fill",bi="Whiteboard";lt={},k(k(k(k(k(k(k(k(k(k(lt,Os,Zs),Ls,Qs),_s,ei),js,ti),Rs,ri),Ms,ai),Ds,ni),zs,oi),Ws,si),Hs,ii),k(k(k(k(k(k(k(k(k(lt,Vs,li),Us,fi),Ys,ui),Gs,ci),Bs,di),Ks,mi),Xs,vi),qs,pi),Js,bi);var gi="kit",hi="kit-duotone",yi="Kit",xi="Kit Duotone";k(k({},gi,yi),hi,xi);var ki={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},graphite:{"fa-thin":"fagt"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},wi={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],graphite:["fagt"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},Et={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},graphite:{fagt:"fa-thin"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},Ei=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],Xa=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fagt","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(Is,Ei),Si=["solid","regular","light","thin","duotone","brands","semibold"],qa=[1,2,3,4,5,6,7,8,9,10],Ai=qa.concat([11,12,13,14,15,16,17,18,19,20]),$i=["aw","fw","pull-left","pull-right"],Ni=[].concat(D(Object.keys(wi)),Si,$i,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Me.GROUP,Me.SWAP_OPACITY,Me.PRIMARY,Me.SECONDARY]).concat(qa.map(function(e){return"".concat(e,"x")})).concat(Ai.map(function(e){return"w-".concat(e)})),Ti={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},V="___FONT_AWESOME___",St=16,Ja="fa",Za="svg-inline--fa",ae="data-fa-i2svg",At="data-fa-pseudo-element",Pi="data-fa-pseudo-element-pending",Ut="data-prefix",Yt="data-icon",xr="fontawesome-i2svg",Fi="async",Ci=["HTML","HEAD","STYLE","SCRIPT"],Qa=["::before","::after",":before",":after"],en=(function(){try{return process.env.NODE_ENV==="production"}catch{return!1}})();function Fe(e){return new Proxy(e,{get:function(r,a){return a in r?r[a]:r[I]}})}var tn=m({},Ta);tn[I]=m(m(m(m({},{"fa-duotone":"duotone"}),Ta[I]),hr.kit),hr["kit-duotone"]);var Ii=Fe(tn),$t=m({},Es);$t[I]=m(m(m(m({},{duotone:"fad"}),$t[I]),yr.kit),yr["kit-duotone"]);var kr=Fe($t),Nt=m({},Et);Nt[I]=m(m({},Nt[I]),Cs.kit);var Gt=Fe(Nt),Tt=m({},ki);Tt[I]=m(m({},Tt[I]),Ps.kit);Fe(Tt);var Oi=Zo,rn="fa-layers-text",Li=Qo,_i=m({},xs);Fe(_i);var ji=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ft=es,Ri=[].concat(D(Ss),D(Ni)),ke=X.FontAwesomeConfig||{};function Mi(e){var t=$.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function Di(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if($&&typeof $.querySelector=="function"){var zi=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];zi.forEach(function(e){var t=Xe(e,2),r=t[0],a=t[1],n=Di(Mi(r));n!=null&&(ke[a]=n)})}var an={styleDefault:"solid",familyDefault:I,cssPrefix:Ja,replacementClass:Za,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};ke.familyPrefix&&(ke.cssPrefix=ke.familyPrefix);var ce=m(m({},an),ke);ce.autoReplaceSvg||(ce.observeMutations=!1);var g={};Object.keys(an).forEach(function(e){Object.defineProperty(g,e,{enumerable:!0,set:function(r){ce[e]=r,we.forEach(function(a){return a(g)})},get:function(){return ce[e]}})});Object.defineProperty(g,"familyPrefix",{enumerable:!0,set:function(t){ce.cssPrefix=t,we.forEach(function(r){return r(g)})},get:function(){return ce.cssPrefix}});X.FontAwesomeConfig=g;var we=[];function Wi(e){return we.push(e),function(){we.splice(we.indexOf(e),1)}}var ie=St,z={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Hi(e){if(!(!e||!B)){var t=$.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var r=$.head.childNodes,a=null,n=r.length-1;n>-1;n--){var o=r[n],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(a=o)}return $.head.insertBefore(t,a),e}}var Vi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function wr(){for(var e=12,t="";e-- >0;)t+=Vi[Math.random()*62|0];return t}function de(e){for(var t=[],r=(e||[]).length>>>0;r--;)t[r]=e[r];return t}function Bt(e){return e.classList?de(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function nn(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ui(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,'="').concat(nn(e[r]),'" ')},"").trim()}function qe(e){return Object.keys(e||{}).reduce(function(t,r){return t+"".concat(r,": ").concat(e[r].trim(),";")},"")}function Kt(e){return e.size!==z.size||e.x!==z.x||e.y!==z.y||e.rotate!==z.rotate||e.flipX||e.flipY}function Yi(e){var t=e.transform,r=e.containerWidth,a=e.iconWidth,n={transform:"translate(".concat(r/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),i="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(i)},f={transform:"translate(".concat(a/2*-1," -256)")};return{outer:n,inner:l,path:f}}function Gi(e){var t=e.transform,r=e.width,a=r===void 0?St:r,n=e.height,o=n===void 0?St:n,s="";return Na?s+="translate(".concat(t.x/ie-a/2,"em, ").concat(t.y/ie-o/2,"em) "):s+="translate(calc(-50% + ".concat(t.x/ie,"em), calc(-50% + ").concat(t.y/ie,"em)) "),s+="scale(".concat(t.size/ie*(t.flipX?-1:1),", ").concat(t.size/ie*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var Bi=`:root, :host {
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { inputVariants } from './input-variants';
|
|
4
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
4
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
5
5
|
label?: string;
|
|
6
6
|
helperText?: string;
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
startIcon?: React.ReactNode;
|
|
9
9
|
endIcon?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Classes for the `<input>` itself.
|
|
12
|
+
*
|
|
13
|
+
* `className` lands on the outer `Field` wrapper, which is right for layout
|
|
14
|
+
* and useless for anything else: a consumer could not reach the control to
|
|
15
|
+
* change its height, border or background. `size` covers the common case;
|
|
16
|
+
* this is the escape hatch for the rest.
|
|
17
|
+
*/
|
|
18
|
+
inputClassName?: string;
|
|
10
19
|
}
|
|
11
20
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
12
21
|
export { Input };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const inputVariants: (props?: ({
|
|
2
2
|
variant?: "soft" | "outline" | "white" | "ghost" | "slate" | null | undefined;
|
|
3
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
3
4
|
error?: boolean | null | undefined;
|
|
4
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
6
|
export declare const iconVariants: (props?: ({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { selectTriggerVariants } from './select-variants';
|
|
3
4
|
export type SelectOption = {
|
|
@@ -13,6 +14,15 @@ export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
className?: string;
|
|
15
16
|
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Classes for the trigger button itself.
|
|
19
|
+
*
|
|
20
|
+
* `className` lands on the outer `Field` wrapper, which is right for layout
|
|
21
|
+
* and useless for anything else: a consumer could not reach the control to
|
|
22
|
+
* change its height, ring or background. `size` covers the common case; this
|
|
23
|
+
* is the escape hatch for the rest. Mirrors `Input`'s `inputClassName`.
|
|
24
|
+
*/
|
|
25
|
+
triggerClassName?: string;
|
|
16
26
|
}
|
|
17
|
-
declare const Select: ({ options, value, onChange, placeholder, disabled, variant, error, className, label, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare const Select: ({ options, value, onChange, placeholder, disabled, variant, size, error, className, triggerClassName, label, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
28
|
export { Select };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const selectTriggerVariants: (props?: ({
|
|
2
2
|
variant?: "soft" | "outline" | "white" | "ghost" | "slate" | null | undefined;
|
|
3
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
3
4
|
error?: boolean | null | undefined;
|
|
4
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const selectOptionVariants: (props?: ({
|
|
7
|
+
size?: "sm" | "lg" | "default" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -5,6 +5,15 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
5
5
|
label?: string;
|
|
6
6
|
helperText?: string;
|
|
7
7
|
errorMessage?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Classes for the `<textarea>` itself.
|
|
10
|
+
*
|
|
11
|
+
* `className` lands on the outer `Field` wrapper, so `<Textarea
|
|
12
|
+
* className="rst:h-40" />` has always sized the wrapper and left the control
|
|
13
|
+
* alone. Mirrors `Input`'s `inputClassName` and `Select`'s
|
|
14
|
+
* `triggerClassName`: the hatch is named for the element it reaches.
|
|
15
|
+
*/
|
|
16
|
+
textareaClassName?: string;
|
|
8
17
|
}
|
|
9
18
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
10
19
|
export { Textarea };
|
package/dist/data-table.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-CoQRmik0.cjs"),p=require("react"),r=require("@tanstack/react-table"),o=require("./utils-C7BfXGiM.cjs"),R=r.tableFeatures({rowSortingFeature:r.rowSortingFeature,rowPaginationFeature:r.rowPaginationFeature,sortedRowModel:r.createSortedRowModel(),paginatedRowModel:r.createPaginatedRowModel(),sortFns:r.sortFns});function f({columns:a,data:i,className:l,tableClassName:x,paginationClassName:c,variant:u="default",size:g="md",hoverable:m=!1}){const[d,j]=p.useState([]),t=r.useTable({features:R,data:i,columns:a,onSortingChange:j,state:{sorting:d},initialState:{pagination:{pageIndex:0,pageSize:10}}});return e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:font-ui rst:flex rst:flex-col rst:gap-4",l),children:[e.jsxRuntimeExports.jsxs(e.Table,{variant:u,size:g,hoverable:m,className:x,children:[e.jsxRuntimeExports.jsx(e.TableHeader,{children:t.getHeaderGroups().map(n=>e.jsxRuntimeExports.jsx(e.TableRow,{children:n.headers.map(s=>e.jsxRuntimeExports.jsx(e.TableHead,{children:s.isPlaceholder?null:e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:flex rst:items-center rst:gap-2 rst:transition-opacity",s.column.getCanSort()&&"rst:cursor-pointer rst:select-none rst:opacity-80 rst:hover:opacity-100"),onClick:s.column.getToggleSortingHandler(),children:[r.flexRender(s.column.columnDef.header,s.getContext()),s.column.getCanSort()&&e.jsxRuntimeExports.jsx("span",{className:"rst:w-4 rst:flex rst:justify-center rst:text-primary-500",children:s.column.getIsSorted()==="asc"?e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faCaretUp}):s.column.getIsSorted()==="desc"?e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faCaretDown}):null})]})},s.id))},n.id))}),e.jsxRuntimeExports.jsx(e.TableBody,{children:t.getRowModel().rows?.length?t.getRowModel().rows.map(n=>e.jsxRuntimeExports.jsx(e.TableRow,{children:n.getAllCells().map(s=>e.jsxRuntimeExports.jsx(e.TableCell,{children:r.flexRender(s.column.columnDef.cell,s.getContext())},s.id))},n.id)):e.jsxRuntimeExports.jsx(e.TableRow,{children:e.jsxRuntimeExports.jsx(e.TableCell,{colSpan:a.length,className:"rst:h-24 rst:text-center rst:text-gray-500 rst:dark:text-gray-400 rst:italic",children:"No results found."})})})]}),e.jsxRuntimeExports.jsxs("div",{className:o.cn("rst:flex rst:flex-col rst:sm:flex-row rst:items-center rst:justify-between rst:gap-4 rst:px-2",c),children:[e.jsxRuntimeExports.jsxs("div",{className:"rst:text-sm rst:font-medium rst:text-gray-500 rst:dark:text-gray-400",children:["Page"," ",e.jsxRuntimeExports.jsx("strong",{className:"rst:text-gray-900 rst:dark:text-gray-100",children:t.state.pagination.pageIndex+1})," ","of"," ",e.jsxRuntimeExports.jsx("strong",{className:"rst:text-gray-900 rst:dark:text-gray-100",children:t.getPageCount()})]}),e.jsxRuntimeExports.jsxs("div",{className:"rst:flex rst:items-center rst:space-x-2",children:[e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),"aria-label":"Go to first page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAnglesLeft})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),"aria-label":"Go to previous page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAngleLeft})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),"aria-label":"Go to next page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAngleRight})}),e.jsxRuntimeExports.jsx(e.Button,{variant:"outline",colorScheme:"neutral",size:"sm",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),"aria-label":"Go to last page",children:e.jsxRuntimeExports.jsx(e.FontAwesomeIcon,{icon:e.faAnglesRight})})]})]})]})}exports.DataTable=f;
|
package/dist/data-table.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as e, T as C, a as S, b as l, c as P, F as a, f as w, d as y, e as v, g as c, B as n, h as N, i as R, k as T, l as k } from "./Table-
|
|
2
|
+
import { j as e, T as C, a as S, b as l, c as P, F as a, f as w, d as y, e as v, g as c, B as n, h as N, i as R, k as T, l as k } from "./Table--O-sD53L.js";
|
|
3
3
|
import { useState as F } from "react";
|
|
4
4
|
import { tableFeatures as I, sortFns as A, rowPaginationFeature as M, rowSortingFeature as z, createPaginatedRowModel as D, createSortedRowModel as G, useTable as H, flexRender as g } from "@tanstack/react-table";
|
|
5
5
|
import { c as o } from "./utils-hNxf9HpA.js";
|
package/dist/meta.json
CHANGED