@blakesteve/roster 5.2.1 → 5.3.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 +121 -20
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.js +1 -1
- package/dist/components/atoms/Avatar/avatar-variants.cjs +1 -1
- package/dist/components/atoms/Avatar/avatar-variants.js +1 -1
- package/dist/components/atoms/Button/button-variants.cjs +1 -1
- package/dist/components/atoms/Button/button-variants.js +3 -3
- package/dist/components/atoms/Card/card-variants.cjs +1 -1
- package/dist/components/atoms/Card/card-variants.js +3 -2
- package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/atoms/Checkbox/Checkbox.js +54 -40
- package/dist/components/atoms/Checkbox/checkbox-variants.cjs +1 -1
- package/dist/components/atoms/Checkbox/checkbox-variants.js +1 -1
- package/dist/components/atoms/InlineCode/inline-code-variants.cjs +1 -1
- package/dist/components/atoms/InlineCode/inline-code-variants.js +1 -1
- package/dist/components/atoms/Input/input-variants.cjs +1 -1
- package/dist/components/atoms/Input/input-variants.js +17 -7
- package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
- package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -6
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +19 -18
- package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/atoms/Select/select-variants.cjs +1 -1
- package/dist/components/atoms/Select/select-variants.js +9 -2
- package/dist/components/atoms/Switch/switch-variants.cjs +1 -1
- package/dist/components/atoms/Switch/switch-variants.js +1 -1
- package/dist/components/atoms/Textarea/textarea-variants.cjs +1 -1
- package/dist/components/atoms/Textarea/textarea-variants.js +17 -11
- package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.js +1 -1
- package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
- package/dist/components/molecules/Accordion/Accordion.js +19 -19
- package/dist/components/molecules/Alert/Alert.cjs +1 -1
- package/dist/components/molecules/Alert/Alert.js +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +28 -27
- package/dist/components/molecules/Toast/Toast.cjs +1 -1
- package/dist/components/molecules/Toast/Toast.js +1 -1
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +28 -24
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +2 -2
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +1 -1
- package/dist/internal/popup.cjs +1 -1
- package/dist/internal/popup.js +1 -1
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.js +16 -11
- package/dist/meta.json +3 -3
- package/dist/roster.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -162,6 +162,24 @@ is not a descendant of your container. Set those at `:root`. See
|
|
|
162
162
|
bar paints _itself_ with. Pair them with `themeMode="auto"` and the nav follows
|
|
163
163
|
whatever `ThemeToggle` sets.
|
|
164
164
|
|
|
165
|
+
#### Dark mode and `:root` overrides
|
|
166
|
+
|
|
167
|
+
Several token families are declared twice by Roster, once at `:root` and once
|
|
168
|
+
under `.dark`, because dark needs a different value. Override those in **both**
|
|
169
|
+
scopes. A `:root`-only override is wrong in dark mode either way, and which way
|
|
170
|
+
depends on load order, because the two selectors have the same specificity:
|
|
171
|
+
|
|
172
|
+
- Your stylesheet loads **before** Roster's, or `.dark` sits below the root
|
|
173
|
+
(`Select`, `Combobox` and `MultiSelect` copy it onto their portaled panels,
|
|
174
|
+
the `Toaster` onto its queue): Roster's `.dark` value wins and yours is
|
|
175
|
+
discarded.
|
|
176
|
+
- Your stylesheet loads **after** Roster's, with `.dark` on `<html>`: your
|
|
177
|
+
`:root` value wins, and your light value lands on a dark page.
|
|
178
|
+
|
|
179
|
+
Tokens Roster never declares, such as the [shape tokens](#shape) and
|
|
180
|
+
`--roster-elevation-control`, have no such rule to lose to, so `:root` alone
|
|
181
|
+
covers both schemes.
|
|
182
|
+
|
|
165
183
|
### Elevation
|
|
166
184
|
|
|
167
185
|
Three levels, each a themeable box-shadow, and the only way a surface should
|
|
@@ -178,10 +196,17 @@ express depth.
|
|
|
178
196
|
.dark { --roster-elevation-raised: 0 2px 0 0 rgb(0 0 0 / 0.9); }
|
|
179
197
|
```
|
|
180
198
|
|
|
181
|
-
Set them in **both** scopes. Roster re-declares all three under `.dark
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
199
|
+
Set them in **both** scopes. Roster re-declares all three under `.dark` with
|
|
200
|
+
the same specificity as `:root`, so a `:root`-only override either loses to
|
|
201
|
+
Roster's dark value or carries your light value onto a dark page, depending on
|
|
202
|
+
which stylesheet loads last ([Dark mode and `:root` overrides](#dark-mode-and-root-overrides)).
|
|
203
|
+
|
|
204
|
+
**Never set a level to `none`.** A ring is a box-shadow composed into the same
|
|
205
|
+
declaration, so `none` deletes it along with the shadow: the 1px edge of every
|
|
206
|
+
`Select`, `Combobox` and `MultiSelect` panel, `Tooltip` and `Navbar` menu
|
|
207
|
+
vanishes. On the control level below it is worse: the `Select` trigger loses
|
|
208
|
+
its edge, and `Button` and `Select` lose their focus ring. For no shadow, use
|
|
209
|
+
`0 0 #0000`.
|
|
185
210
|
|
|
186
211
|
Apply them with `rst:elevation-raised`, `rst:elevation-anchored` and
|
|
187
212
|
`rst:elevation-overlay`.
|
|
@@ -196,14 +221,24 @@ a surface, so a token that also set a background would mean something different
|
|
|
196
221
|
inside each name. Fill stays with `--roster-card-*`, `--roster-popover-*` and
|
|
197
222
|
`--roster-control-*`.
|
|
198
223
|
|
|
199
|
-
**Controls are not surfaces
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
224
|
+
**Controls are not surfaces, so they have a level of their own.** `Button`
|
|
225
|
+
(`solid` and `outline`), the `Select` trigger, `Avatar` and the `Switch` thumb
|
|
226
|
+
carry a lighter lift, `rst:elevation-control`, and stay out of the three
|
|
227
|
+
surface levels. A button and a card do not have the same relationship to the
|
|
228
|
+
page, and giving a 32px control the depth of a card is how a scale stops
|
|
229
|
+
meaning anything. `src/elevation.test.ts` fails on any raw Tailwind shadow.
|
|
230
|
+
|
|
231
|
+
```css
|
|
232
|
+
/* Flat controls, or a hard printed edge, without touching cards. */
|
|
233
|
+
:root { --roster-elevation-control: 0 0 #0000; }
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`--roster-elevation-control` is a hook: Roster never sets it, and its fallback
|
|
237
|
+
is Tailwind's `shadow-sm`, so nothing changes until you set it, and a `:root`
|
|
238
|
+
value holds in both schemes.
|
|
204
239
|
|
|
205
240
|
**Forced-colors mode gets an outline, on `anchored` only.** Those surfaces draw
|
|
206
|
-
their border as `ring
|
|
241
|
+
their border as a `ring`, which is itself a box-shadow — and forced-colors drops
|
|
207
242
|
`box-shadow`, taking the edge along with the depth. `anchored` carries
|
|
208
243
|
`outline: 1px solid CanvasText` in that mode, as an outline rather than a border
|
|
209
244
|
so nothing shifts by a pixel, and again at `:focus` because those panels are
|
|
@@ -218,6 +253,67 @@ few units. The dark values lean much heavier and still do less than their light
|
|
|
218
253
|
counterparts. On the darkest grounds the **border** is what separates a surface;
|
|
219
254
|
these levels are a lift on top of it, not a replacement for it.
|
|
220
255
|
|
|
256
|
+
### Shape
|
|
257
|
+
|
|
258
|
+
Corner radius, edge width and the overlay backdrop, each one property. Every
|
|
259
|
+
default is the value Roster drew before these existed, so setting none of them
|
|
260
|
+
changes nothing.
|
|
261
|
+
|
|
262
|
+
| token | default | reshapes |
|
|
263
|
+
| ----- | ------- | -------- |
|
|
264
|
+
| `--roster-radius-sm` | `0.25rem` | `Button` `xs`, `Checkbox` `sm` and `md`, `InlineCode`, `Link`, `MultiSelect`'s chip dismiss, the dismiss and reveal buttons in `Alert`, `Toast` and `PasswordInput` |
|
|
265
|
+
| `--roster-radius-md` | `0.375rem` | `Button`, `Input`, `Textarea`, `Select`, `MultiSelect`, `Badge`, `Avatar` and its popover, `Checkbox` `lg`, `CheckboxGroup`'s panel, `Disclosure`, `Dialog`'s and `Sheet`'s close buttons, `Navbar`'s links and menu, popup panels, `Table` |
|
|
266
|
+
| `--roster-radius-lg` | `0.5rem` | `Alert`, `Toast`, `Tooltip`, `CallToAction`, `EmptyState`, `ErrorState`, `LiquidTabs`, `MatchupCard`, `Navbar`'s mobile panel |
|
|
267
|
+
| `--roster-radius-xl` | `0.75rem` | `Card`, `LiquidTabs`' `pill` strip |
|
|
268
|
+
| `--roster-radius-2xl` | `1rem` | `Dialog`, the top of `Sheet` |
|
|
269
|
+
| `--roster-radius-3xl` | `1.5rem` | nothing yet; wired for the first component that uses it |
|
|
270
|
+
| `--roster-border-width` | `1px` | every 1px edge: borders, `divide-y`, the ring `Select`'s trigger and the anchored panels draw their edge with, and the rules in `Accordion` and `LabeledDivider` |
|
|
271
|
+
| `--roster-backdrop` | each component's own | the scrim behind `Dialog` (every variant) and `Sheet` |
|
|
272
|
+
| `--roster-backdrop-blur` | `8px` | `Dialog`'s backdrop |
|
|
273
|
+
|
|
274
|
+
```css
|
|
275
|
+
/* A print look: square corners and heavy keylines. */
|
|
276
|
+
:root {
|
|
277
|
+
--roster-radius-sm: 0;
|
|
278
|
+
--roster-radius-md: 0;
|
|
279
|
+
--roster-radius-lg: 0;
|
|
280
|
+
--roster-radius-xl: 0;
|
|
281
|
+
--roster-radius-2xl: 0;
|
|
282
|
+
--roster-radius-3xl: 0;
|
|
283
|
+
--roster-border-width: 2px;
|
|
284
|
+
--roster-backdrop: rgb(20 17 13 / 0.7);
|
|
285
|
+
--roster-backdrop-blur: 0px;
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
All of them are hooks: Roster never declares them, so a value set at `:root`
|
|
290
|
+
holds in both schemes. Set one under `.dark` as well only if dark wants a
|
|
291
|
+
different value.
|
|
292
|
+
|
|
293
|
+
**Radius steps are independent.** Setting `--roster-radius-md` leaves `-lg`
|
|
294
|
+
where it was, and every component on a step moves together: there is no
|
|
295
|
+
per-component radius. `rounded-full` is not a step, so circles stay circles.
|
|
296
|
+
|
|
297
|
+
**Deliberate widths stay.** Only 1px edges follow `--roster-border-width`.
|
|
298
|
+
`Dialog`'s 4px status bar, `Alert`'s accent rule, `EmptyState`'s dashed 2px,
|
|
299
|
+
`Spinner`'s stroke, the `Switch` track's 2px inset and every focus ring keep
|
|
300
|
+
their widths. `Select`'s and `MultiSelect`'s focus ring is their edge plus a
|
|
301
|
+
pixel, so focus is still a heavier line at any width.
|
|
302
|
+
|
|
303
|
+
**The backdrop is shared, its defaults are not.** `Sheet` and `Dialog` never
|
|
304
|
+
drew the same scrim (in dark mode `Sheet` uses pure black and `Dialog` Roster's
|
|
305
|
+
warm `--roster-black`), so each keeps its own default until you set
|
|
306
|
+
`--roster-backdrop`, and then both use yours. `Dialog`'s `glass` variant reads
|
|
307
|
+
it too, but stays unblurred. `--roster-sheet-backdrop`, the earlier name, still
|
|
308
|
+
works and still moves `Sheet` alone; `--roster-backdrop` wins when both are set.
|
|
309
|
+
|
|
310
|
+
**Radius and backdrop blur moved namespace, a small breaking change like
|
|
311
|
+
mono's.** Corners used to resolve through `--rst-radius-sm` to `-3xl`, and
|
|
312
|
+
`Dialog`'s blur through `--rst-blur-sm`, Tailwind-internal variables an app
|
|
313
|
+
could set and Roster never promised. Nothing emits or reads them now. An app
|
|
314
|
+
that set one moves to the matching `--roster-*` name. Setting neither is
|
|
315
|
+
unaffected.
|
|
316
|
+
|
|
221
317
|
### The three font roles
|
|
222
318
|
|
|
223
319
|
Roster exposes three type roles, each settable with one custom property:
|
|
@@ -426,9 +522,9 @@ Retint it for your own accent:
|
|
|
426
522
|
}
|
|
427
523
|
```
|
|
428
524
|
|
|
429
|
-
Set it in **both** scopes. Roster's own `.dark` rule has the same specificity
|
|
430
|
-
|
|
431
|
-
|
|
525
|
+
Set it in **both** scopes. Roster's own `.dark` rule has the same specificity,
|
|
526
|
+
so a `:root`-only override is wrong in dark mode one way or the other
|
|
527
|
+
([Dark mode and `:root` overrides](#dark-mode-and-root-overrides)).
|
|
432
528
|
|
|
433
529
|
The band matters more than it looks. Without it the ring sits directly on the
|
|
434
530
|
fill, and a `primary-500` ring on a `primary-600` button is 1.37:1 — which is
|
|
@@ -470,7 +566,8 @@ self-contained — the same reasoning as not bundling a preflight.
|
|
|
470
566
|
(280ms), `--roster-sheet-leave-duration` (200ms), the two matching easings, and
|
|
471
567
|
`--roster-sheet-fade-duration` (150ms), which is the whole of its motion under
|
|
472
568
|
reduced motion: a fade, with no slide. Set them at `:root`; they are the same in
|
|
473
|
-
both schemes, so they are not redeclared under `.dark`.
|
|
569
|
+
both schemes, so they are not redeclared under `.dark`. Its backdrop is
|
|
570
|
+
`--roster-backdrop`, shared with `Dialog` ([Shape](#shape)).
|
|
474
571
|
|
|
475
572
|
`animate-shimmer` is a highlight travelling across a base, used by `Countdown`'s
|
|
476
573
|
`gradient` variant. Retint it with two variables:
|
|
@@ -508,8 +605,8 @@ its `label` (default "loading") says so.
|
|
|
508
605
|
}
|
|
509
606
|
```
|
|
510
607
|
|
|
511
|
-
Set it in both scopes
|
|
512
|
-
|
|
608
|
+
Set it in both scopes, for the reason in
|
|
609
|
+
[Dark mode and `:root` overrides](#dark-mode-and-root-overrides).
|
|
513
610
|
|
|
514
611
|
The default sits close to what the browser already draws, on purpose: a
|
|
515
612
|
component library should not repaint your scrollbars merely for being installed.
|
|
@@ -550,14 +647,18 @@ on white but only 2.53 on a gray-800 Dialog, while gray-400 reaches 6.01 there
|
|
|
550
647
|
and 2.52 on white. No single step of the ramp clears 3:1 both ways. The old
|
|
551
648
|
gray-300 / gray-700 pair was 1.49 and 1.48 — a hairline rather than a boundary.
|
|
552
649
|
|
|
553
|
-
Set them in both scopes, for the
|
|
554
|
-
|
|
650
|
+
Set them in both scopes, for the reason in
|
|
651
|
+
[Dark mode and `:root` overrides](#dark-mode-and-root-overrides).
|
|
555
652
|
|
|
556
653
|
Three of the four still default to what the components used to hardcode.
|
|
557
654
|
`--roster-control-border` does not — the 1.4.11 pass moved it two ramp steps —
|
|
558
|
-
so installing this version **does** change how your fields look, deliberately.
|
|
655
|
+
so installing this version **does** change how your fields look, deliberately. The error state and the
|
|
559
656
|
focus ring are deliberately not on tokens — the ring is already
|
|
560
|
-
`--roster-ring`, and error styling should stay recognizably an error.
|
|
657
|
+
`--roster-ring`, and error styling should stay recognizably an error. The
|
|
658
|
+
placeholder has no token of its own: in `outline` it is `--roster-control-text`
|
|
659
|
+
at 65%, so it follows the text to whatever surface you chose it for and stays
|
|
660
|
+
above 4.5:1 there (5.46:1 on a white page, 7.76 on the dark one, 5.02 inside a
|
|
661
|
+
`slate` Dialog). An error no longer recolors it.
|
|
561
662
|
|
|
562
663
|
Not every control uses every token: `Select` takes the first three, because
|
|
563
664
|
focus on its trigger is the shared `--roster-ring` rather than a border color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),o=require("../../../lib/utils.cjs"),h=require("./avatar-variants.cjs"),t=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),i=n.forwardRef(({className:c,size:l,colorScheme:u,shape:d,initials:g,src:s,alt:v,title:e,...m},f)=>{const[p,b]=n.useState(!1),x=s&&!p,a=r.jsx("div",{ref:f,className:o.cn(h.avatarVariants({size:l,colorScheme:u,shape:d}),c),...m,children:x?r.jsx("img",{src:s,alt:v||"Avatar",className:"rst:h-full rst:w-full rst:object-cover",onError:()=>b(!0)}):r.jsx("span",{className:"rst:leading-none rst:uppercase",children:g?.slice(0,2)})});return e?r.jsxs(t.Popover,{className:"rst:relative rst:inline-flex",children:[r.jsx(t.PopoverButton,{as:"div",className:"rst:cursor-pointer rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:rounded-full",children:a}),r.jsx(t.PopoverPanel,{anchor:"bottom",className:o.cn("rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:elevation-anchored rst:backdrop-blur-md rst:ring
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),o=require("../../../lib/utils.cjs"),h=require("./avatar-variants.cjs"),t=require("../../../node_modules/@headlessui/react/dist/components/popover/popover.cjs"),i=n.forwardRef(({className:c,size:l,colorScheme:u,shape:d,initials:g,src:s,alt:v,title:e,...m},f)=>{const[p,b]=n.useState(!1),x=s&&!p,a=r.jsx("div",{ref:f,className:o.cn(h.avatarVariants({size:l,colorScheme:u,shape:d}),c),...m,children:x?r.jsx("img",{src:s,alt:v||"Avatar",className:"rst:h-full rst:w-full rst:object-cover",onError:()=>b(!0)}):r.jsx("span",{className:"rst:leading-none rst:uppercase",children:g?.slice(0,2)})});return e?r.jsxs(t.Popover,{className:"rst:relative rst:inline-flex",children:[r.jsx(t.PopoverButton,{as:"div",className:"rst:cursor-pointer rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:rounded-full",children:a}),r.jsx(t.PopoverPanel,{anchor:"bottom",className:o.cn("rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:elevation-anchored rst:backdrop-blur-md rst:ring","rst:bg-gray-900/95 rst:text-white rst:ring-black/5 rst:dark:bg-gray-100/95 rst:dark:text-gray-900 rst:dark:ring-white/20","rst:transition rst:duration-200 rst:ease-in-out rst:data-closed:opacity-0 rst:data-closed:translate-y-1"),children:e})]}):a});i.displayName="Avatar";exports.Avatar=i;
|
|
@@ -47,7 +47,7 @@ const w = b.forwardRef(
|
|
|
47
47
|
{
|
|
48
48
|
anchor: "bottom",
|
|
49
49
|
className: a(
|
|
50
|
-
"rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:elevation-anchored rst:backdrop-blur-md rst:ring
|
|
50
|
+
"rst:z-50 rst:mt-2 rst:rounded-md rst:px-3 rst:py-1.5 rst:text-xs rst:font-medium rst:elevation-anchored rst:backdrop-blur-md rst:ring",
|
|
51
51
|
"rst:bg-gray-900/95 rst:text-white rst:ring-black/5 rst:dark:bg-gray-100/95 rst:dark:text-gray-900 rst:dark:ring-white/20",
|
|
52
52
|
"rst:transition rst:duration-200 rst:ease-in-out rst:data-closed:opacity-0 rst:data-closed:translate-y-1"
|
|
53
53
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-ui rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-hidden rst:select-none rst:shrink-0 rst:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-ui rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-hidden rst:select-none rst:shrink-0 rst:elevation-control",{variants:{size:{xs:"rst:h-6 rst:w-6 rst:text-[10px]",sm:"rst:h-8 rst:w-8 rst:text-xs",md:"rst:h-10 rst:w-10 rst:text-sm",lg:"rst:h-12 rst:w-12 rst:text-base",xl:"rst:h-16 rst:w-16 rst:text-xl"},colorScheme:{primary:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/30 rst:dark:border-primary-800/50 rst:dark:text-primary-300",orange:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300",teal:"rst:bg-teal-50 rst:border-teal-200 rst:text-teal-700 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300",purple:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300",amber:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300",success:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300",error:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300",neutral:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"},shape:{circle:"rst:rounded-full",square:"rst:rounded-md"}},defaultVariants:{size:"md",colorScheme:"primary",shape:"circle"}});exports.avatarVariants=t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva as r } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
2
2
|
const s = /* @__PURE__ */ r(
|
|
3
|
-
"rst:font-ui rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-hidden rst:select-none rst:shrink-0 rst:
|
|
3
|
+
"rst:font-ui rst:relative rst:inline-flex rst:items-center rst:justify-center rst:overflow-hidden rst:font-semibold rst:border rst:transition-colors rst:focus:outline-hidden rst:select-none rst:shrink-0 rst:elevation-control",
|
|
4
4
|
{
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("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:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("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:elevation-control",soft:"rst:border-transparent rst:shadow-none",outline:"rst:border rst:bg-transparent rst:elevation-control",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-sm 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"}});exports.buttonVariants=t;
|
|
@@ -5,9 +5,9 @@ const e = /* @__PURE__ */ r(
|
|
|
5
5
|
{
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
|
-
solid: "rst:border rst:border-transparent rst:
|
|
8
|
+
solid: "rst:border rst:border-transparent rst:elevation-control",
|
|
9
9
|
soft: "rst:border-transparent rst:shadow-none",
|
|
10
|
-
outline: "rst:border rst:bg-transparent rst:
|
|
10
|
+
outline: "rst:border rst:bg-transparent rst:elevation-control",
|
|
11
11
|
ghost: "rst:border rst:border-transparent rst:bg-transparent",
|
|
12
12
|
link: "rst:bg-transparent rst:underline-offset-4 rst:hover:underline"
|
|
13
13
|
},
|
|
@@ -22,7 +22,7 @@ const e = /* @__PURE__ */ r(
|
|
|
22
22
|
neutral: ""
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
|
-
xs: "rst:h-7 rst:rounded rst:px-2 rst:text-xs",
|
|
25
|
+
xs: "rst:h-7 rst:rounded-sm rst:px-2 rst:text-xs",
|
|
26
26
|
sm: "rst:h-9 rst:rounded-md rst:px-3",
|
|
27
27
|
default: "rst:h-10 rst:px-4 rst:py-2",
|
|
28
28
|
lg: "rst:h-11 rst:rounded-md rst:px-8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:relative rst:isolate rst:w-full rst:overflow-hidden rst:rounded-xl rst:transition-all",{variants:{variant:{white:"rst:bg-[var(--roster-card-bg)] rst:border rst:border-[var(--roster-card-border)] rst:text-[var(--roster-card-text)] rst:elevation-raised",soft:"rst:bg-gray-50 rst:border rst:border-gray-100 rst:text-gray-900 rst:dark:bg-gray-900/40 rst:dark:border-gray-800/50 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border rst:border-gray-600 rst:text-gray-100 rst:elevation-raised rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",primary:"rst:bg-primary-600 rst:border rst:border-primary-700 rst:text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:relative rst:isolate rst:w-full rst:overflow-hidden rst:rounded-xl rst:transition-all",{variants:{variant:{white:"rst:bg-[var(--roster-card-bg)] rst:border rst:border-[var(--roster-card-border)] rst:text-[var(--roster-card-text)] rst:elevation-raised",soft:"rst:bg-gray-50 rst:border rst:border-gray-100 rst:text-gray-900 rst:dark:bg-gray-900/40 rst:dark:border-gray-800/50 rst:dark:text-gray-100",slate:"rst:bg-gray-700 rst:border rst:border-gray-600 rst:text-gray-100 rst:elevation-raised rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",primary:"rst:bg-primary-600 rst:border rst:border-primary-700 rst:text-primary-600-ink rst:elevation-raised rst:dark:bg-primary-900 rst:dark:border-primary-800 rst:dark:text-primary-50",outline:"rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:dark:border-gray-800 rst:dark:text-gray-100",ghost:"rst:bg-transparent rst:border rst:border-transparent rst:text-gray-900 rst:hover:bg-gray-50 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800/50",glass:"rst:bg-white/50 rst:border rst:border-white/20 rst:backdrop-blur-md rst:text-gray-900 rst:elevation-raised rst:dark:bg-gray-950/50 rst:dark:border-white/10 rst:dark:text-gray-100"},padding:{none:"rst:p-0",sm:"rst:p-4",md:"rst:p-6",lg:"rst:p-8"}},defaultVariants:{variant:"white",padding:"md"}});exports.cardVariants=t;
|
|
@@ -16,8 +16,9 @@ const a = /* @__PURE__ */ r(
|
|
|
16
16
|
soft: "rst:bg-gray-50 rst:border rst:border-gray-100 rst:text-gray-900 rst:dark:bg-gray-900/40 rst:dark:border-gray-800/50 rst:dark:text-gray-100",
|
|
17
17
|
// Moody slate, baby.
|
|
18
18
|
slate: "rst:bg-gray-700 rst:border rst:border-gray-600 rst:text-gray-100 rst:elevation-raised rst:dark:bg-gray-800 rst:dark:border-gray-700 rst:dark:text-gray-100",
|
|
19
|
-
// Primary: Fully drenched in brand color.
|
|
20
|
-
|
|
19
|
+
// Primary: Fully drenched in brand color. Text is the fill's ink token,
|
|
20
|
+
// as on every other solid fill, so a light primary gets dark text.
|
|
21
|
+
primary: "rst:bg-primary-600 rst:border rst:border-primary-700 rst:text-primary-600-ink rst:elevation-raised rst:dark:bg-primary-900 rst:dark:border-primary-800 rst:dark:text-primary-50",
|
|
21
22
|
// Outline: Transparent background, just the structural border.
|
|
22
23
|
outline: "rst:bg-transparent rst:border rst:border-gray-200 rst:text-gray-900 rst:dark:border-gray-800 rst:dark:text-gray-100",
|
|
23
24
|
// Ghost: Completely invisible structure until hovered (great for clickable cards).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),t=require("react"),m=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),b=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),d=require("../../../lib/utils.cjs"),q=require("./checkbox-variants.cjs"),C=require("../../../node_modules/@headlessui/react/dist/components/checkbox/checkbox.cjs"),h=t.forwardRef(({callerDescribedBy:i,"aria-describedby":n,...o},s)=>l.jsx("span",{ref:s,...o,"aria-describedby":[n,i].filter(Boolean).join(" ")||void 0}));h.displayName="Checkbox.DescribedSpan";const x=t.forwardRef(({className:i,colorScheme:n="primary",variant:o="solid",size:s="md",indeterminate:c=!1,"aria-describedby":f,...a},r)=>{const y={sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-4 h-4"},u=t.useRef(null),k=e=>{u.current=e,typeof r=="function"?r(e):r&&(r.current=e)};return t.useEffect(()=>{c&&u.current&&u.current.setAttribute("aria-checked","mixed")},[c,a.checked]),l.jsx(C.Checkbox,{ref:k,...a,as:h,callerDescribedBy:f,className:({checked:e,disabled:p})=>d.cn(q.checkboxVariants({colorScheme:n,variant:o,size:s,checked:e||c}),p||a.disabled?"rst:opacity-50":"rst:cursor-pointer",i),children:({checked:e})=>l.jsx(m.FontAwesomeIcon,{icon:c?b.faMinus:b.faCheck,className:d.cn("rst:pointer-events-none rst:transition-opacity rst:duration-200",e||c?"rst:opacity-100":"rst:opacity-0",y[s])})})});x.displayName="Checkbox";exports.Checkbox=x;
|
|
@@ -6,6 +6,11 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof HeadlessCheckb
|
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Set to true to display a dash instead of a checkmark */
|
|
8
8
|
indeterminate?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Ids of elements that describe the checkbox, added after any `Description`
|
|
11
|
+
* in its `Field`. Headless UI's own props leave this out.
|
|
12
|
+
*/
|
|
13
|
+
"aria-describedby"?: string;
|
|
9
14
|
}
|
|
10
15
|
declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
11
16
|
export { Checkbox };
|
|
@@ -1,55 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faMinus as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { checkboxVariants as
|
|
8
|
-
import { Checkbox as
|
|
9
|
-
const
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f, useRef as y, useEffect as k } from "react";
|
|
4
|
+
import { FontAwesomeIcon as x } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
5
|
+
import { faMinus as C, faCheck as N } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
6
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
7
|
+
import { checkboxVariants as D } from "./checkbox-variants.js";
|
|
8
|
+
import { Checkbox as S } from "../../../node_modules/@headlessui/react/dist/components/checkbox/checkbox.js";
|
|
9
|
+
const p = f(
|
|
10
|
+
({ callerDescribedBy: o, "aria-describedby": t, ...i }, s) => /* @__PURE__ */ m(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
ref: s,
|
|
14
|
+
...i,
|
|
15
|
+
"aria-describedby": [t, o].filter(Boolean).join(" ") || void 0
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
p.displayName = "Checkbox.DescribedSpan";
|
|
20
|
+
const j = f(
|
|
10
21
|
({
|
|
11
|
-
className:
|
|
12
|
-
colorScheme:
|
|
13
|
-
variant:
|
|
14
|
-
size:
|
|
22
|
+
className: o,
|
|
23
|
+
colorScheme: t = "primary",
|
|
24
|
+
variant: i = "solid",
|
|
25
|
+
size: s = "md",
|
|
15
26
|
indeterminate: r = !1,
|
|
16
|
-
|
|
27
|
+
"aria-describedby": b,
|
|
28
|
+
...a
|
|
17
29
|
}, c) => {
|
|
18
|
-
const
|
|
30
|
+
const u = {
|
|
19
31
|
sm: "w-2.5 h-2.5",
|
|
20
32
|
md: "w-3 h-3",
|
|
21
33
|
lg: "w-4 h-4"
|
|
22
|
-
},
|
|
23
|
-
|
|
34
|
+
}, n = y(null), h = (e) => {
|
|
35
|
+
n.current = e, typeof c == "function" ? c(e) : c && (c.current = e);
|
|
24
36
|
};
|
|
25
|
-
return
|
|
26
|
-
r &&
|
|
27
|
-
}, [r,
|
|
28
|
-
|
|
37
|
+
return k(() => {
|
|
38
|
+
r && n.current && n.current.setAttribute("aria-checked", "mixed");
|
|
39
|
+
}, [r, a.checked]), /* @__PURE__ */ m(
|
|
40
|
+
S,
|
|
29
41
|
{
|
|
30
|
-
ref:
|
|
31
|
-
...
|
|
42
|
+
ref: h,
|
|
43
|
+
...a,
|
|
44
|
+
as: p,
|
|
45
|
+
callerDescribedBy: b,
|
|
32
46
|
className: ({
|
|
33
|
-
checked:
|
|
34
|
-
disabled:
|
|
35
|
-
}) =>
|
|
36
|
-
|
|
37
|
-
colorScheme:
|
|
38
|
-
variant:
|
|
39
|
-
size:
|
|
40
|
-
checked:
|
|
47
|
+
checked: e,
|
|
48
|
+
disabled: d
|
|
49
|
+
}) => l(
|
|
50
|
+
D({
|
|
51
|
+
colorScheme: t,
|
|
52
|
+
variant: i,
|
|
53
|
+
size: s,
|
|
54
|
+
checked: e || r
|
|
41
55
|
}),
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
d || a.disabled ? "rst:opacity-50" : "rst:cursor-pointer",
|
|
57
|
+
o
|
|
44
58
|
),
|
|
45
|
-
children: ({ checked:
|
|
46
|
-
|
|
59
|
+
children: ({ checked: e }) => /* @__PURE__ */ m(
|
|
60
|
+
x,
|
|
47
61
|
{
|
|
48
|
-
icon: r ?
|
|
49
|
-
className:
|
|
62
|
+
icon: r ? C : N,
|
|
63
|
+
className: l(
|
|
50
64
|
"rst:pointer-events-none rst:transition-opacity rst:duration-200",
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
e || r ? "rst:opacity-100" : "rst:opacity-0",
|
|
66
|
+
u[s]
|
|
53
67
|
)
|
|
54
68
|
}
|
|
55
69
|
)
|
|
@@ -57,7 +71,7 @@ const A = h(
|
|
|
57
71
|
);
|
|
58
72
|
}
|
|
59
73
|
);
|
|
60
|
-
|
|
74
|
+
j.displayName = "Checkbox";
|
|
61
75
|
export {
|
|
62
|
-
|
|
76
|
+
j as Checkbox
|
|
63
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),e=r.cva("rst:font-ui rst:relative rst:flex rst:items-center rst:justify-center rst:shrink-0 rst:transition-colors rst:before:absolute rst:before:top-1/2 rst:before:left-1/2 rst:before:size-11 rst:before:-translate-x-1/2 rst:before:-translate-y-1/2 rst:before:content-[''] rst:focus:outline-hidden rst:focus-visible:ring-ring rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:ring-offset-background",{variants:{size:{sm:"rst:h-4 rst:w-4 rst:rounded-sm rst:border",md:"rst:h-5 rst:w-5 rst:rounded rst:border",lg:"rst:h-6 rst:w-6 rst:rounded-md rst:border"},variant:{solid:"",soft:""},checked:{true:"",false:"rst:bg-white rst:border-[var(--roster-control-border)] rst:dark:bg-gray-900 rst:text-transparent"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""}},compoundVariants:[{checked:!0,variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:border-primary-600 rst:dark:bg-primary-600 rst:dark:border-primary-500 rst:text-primary-600-ink"},{checked:!0,variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:border-orange-600 rst:dark:bg-orange-600 rst:dark:border-orange-500 rst:text-orange-600-ink"},{checked:!0,variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:border-teal-600 rst:dark:bg-teal-600 rst:dark:border-teal-500 rst:text-teal-600-ink"},{checked:!0,variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:border-purple-600 rst:dark:bg-purple-600 rst:dark:border-purple-500 rst:text-purple-600-ink"},{checked:!0,variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:border-amber-400 rst:dark:bg-amber-500 rst:dark:border-amber-500 rst:text-amber-400-ink rst:dark:text-amber-500-ink"},{checked:!0,variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:border-success-600 rst:dark:bg-success-600 rst:dark:border-success-500 rst:text-success-600-ink"},{checked:!0,variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:border-error-600 rst:dark:bg-error-600 rst:dark:border-error-500 rst:text-error-600-ink"},{checked:!0,variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:border-gray-600 rst:dark:bg-gray-600 rst:dark:border-gray-500 rst:text-gray-600-ink"},{checked:!0,variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/40 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{checked:!0,variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{checked:!0,variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{checked:!0,variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{checked:!0,variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{checked:!0,variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{checked:!0,variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{checked:!0,variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"md",checked:!1}});exports.checkboxVariants=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),e=r.cva("rst:font-ui rst:relative rst:flex rst:items-center rst:justify-center rst:shrink-0 rst:transition-colors rst:before:absolute rst:before:top-1/2 rst:before:left-1/2 rst:before:size-11 rst:before:-translate-x-1/2 rst:before:-translate-y-1/2 rst:before:content-[''] rst:focus:outline-hidden rst:focus-visible:ring-ring rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:ring-offset-background",{variants:{size:{sm:"rst:h-4 rst:w-4 rst:rounded-sm rst:border",md:"rst:h-5 rst:w-5 rst:rounded-sm rst:border",lg:"rst:h-6 rst:w-6 rst:rounded-md rst:border"},variant:{solid:"",soft:""},checked:{true:"",false:"rst:bg-white rst:border-[var(--roster-control-border)] rst:dark:bg-gray-900 rst:text-transparent"},colorScheme:{primary:"",orange:"",teal:"",purple:"",amber:"",success:"",error:"",neutral:""}},compoundVariants:[{checked:!0,variant:"solid",colorScheme:"primary",className:"rst:bg-primary-600 rst:border-primary-600 rst:dark:bg-primary-600 rst:dark:border-primary-500 rst:text-primary-600-ink"},{checked:!0,variant:"solid",colorScheme:"orange",className:"rst:bg-orange-600 rst:border-orange-600 rst:dark:bg-orange-600 rst:dark:border-orange-500 rst:text-orange-600-ink"},{checked:!0,variant:"solid",colorScheme:"teal",className:"rst:bg-teal-600 rst:border-teal-600 rst:dark:bg-teal-600 rst:dark:border-teal-500 rst:text-teal-600-ink"},{checked:!0,variant:"solid",colorScheme:"purple",className:"rst:bg-purple-600 rst:border-purple-600 rst:dark:bg-purple-600 rst:dark:border-purple-500 rst:text-purple-600-ink"},{checked:!0,variant:"solid",colorScheme:"amber",className:"rst:bg-amber-400 rst:border-amber-400 rst:dark:bg-amber-500 rst:dark:border-amber-500 rst:text-amber-400-ink rst:dark:text-amber-500-ink"},{checked:!0,variant:"solid",colorScheme:"success",className:"rst:bg-success-600 rst:border-success-600 rst:dark:bg-success-600 rst:dark:border-success-500 rst:text-success-600-ink"},{checked:!0,variant:"solid",colorScheme:"error",className:"rst:bg-error-600 rst:border-error-600 rst:dark:bg-error-600 rst:dark:border-error-500 rst:text-error-600-ink"},{checked:!0,variant:"solid",colorScheme:"neutral",className:"rst:bg-gray-600 rst:border-gray-600 rst:dark:bg-gray-600 rst:dark:border-gray-500 rst:text-gray-600-ink"},{checked:!0,variant:"soft",colorScheme:"primary",className:"rst:bg-primary-50 rst:border-primary-200 rst:text-primary-700 rst:dark:bg-primary-900/40 rst:dark:border-primary-800/50 rst:dark:text-primary-300"},{checked:!0,variant:"soft",colorScheme:"orange",className:"rst:bg-orange-50 rst:border-orange-200 rst:text-orange-700 rst:dark:bg-orange-900/30 rst:dark:border-orange-800/50 rst:dark:text-orange-300"},{checked:!0,variant:"soft",colorScheme:"teal",className:"rst:bg-teal-100 rst:border-teal-300 rst:text-teal-800 rst:dark:bg-teal-900/30 rst:dark:border-teal-800/50 rst:dark:text-teal-300"},{checked:!0,variant:"soft",colorScheme:"purple",className:"rst:bg-purple-50 rst:border-purple-200 rst:text-purple-700 rst:dark:bg-purple-900/30 rst:dark:border-purple-800/50 rst:dark:text-purple-300"},{checked:!0,variant:"soft",colorScheme:"amber",className:"rst:bg-amber-50 rst:border-amber-200 rst:text-amber-800 rst:dark:bg-amber-900/30 rst:dark:border-amber-800/50 rst:dark:text-amber-300"},{checked:!0,variant:"soft",colorScheme:"success",className:"rst:bg-success-50 rst:border-success-200 rst:text-success-700 rst:dark:bg-success-900/30 rst:dark:border-success-800/50 rst:dark:text-success-300"},{checked:!0,variant:"soft",colorScheme:"error",className:"rst:bg-error-50 rst:border-error-200 rst:text-error-700 rst:dark:bg-error-900/30 rst:dark:border-error-800/50 rst:dark:text-error-300"},{checked:!0,variant:"soft",colorScheme:"neutral",className:"rst:bg-gray-100 rst:border-gray-200 rst:text-gray-700 rst:dark:bg-gray-800/50 rst:dark:border-gray-700/50 rst:dark:text-gray-300"}],defaultVariants:{colorScheme:"primary",variant:"solid",size:"md",checked:!1}});exports.checkboxVariants=e;
|
|
@@ -5,7 +5,7 @@ const t = /* @__PURE__ */ r(
|
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
7
7
|
sm: "rst:h-4 rst:w-4 rst:rounded-sm rst:border",
|
|
8
|
-
md: "rst:h-5 rst:w-5 rst:rounded rst:border",
|
|
8
|
+
md: "rst:h-5 rst:w-5 rst:rounded-sm rst:border",
|
|
9
9
|
lg: "rst:h-6 rst:w-6 rst:rounded-md rst:border"
|
|
10
10
|
},
|
|
11
11
|
variant: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-mono rst:text-[0.8125rem]",{variants:{colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-800 rst:dark:text-gray-200",current:"rst:text-current"},surface:{none:"",soft:"rst:rounded rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"}},defaultVariants:{colorScheme:"primary",surface:"none"}});exports.inlineCodeVariants=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-mono rst:text-[0.8125rem]",{variants:{colorScheme:{primary:"rst:text-primary-600 rst:dark:text-primary-400",neutral:"rst:text-gray-800 rst:dark:text-gray-200",current:"rst:text-current"},surface:{none:"",soft:"rst:rounded-sm rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"}},defaultVariants:{colorScheme:"primary",surface:"none"}});exports.inlineCodeVariants=t;
|
|
@@ -8,7 +8,7 @@ const e = /* @__PURE__ */ r("rst:font-mono rst:text-[0.8125rem]", {
|
|
|
8
8
|
},
|
|
9
9
|
surface: {
|
|
10
10
|
none: "",
|
|
11
|
-
soft: "rst:rounded rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"
|
|
11
|
+
soft: "rst:rounded-sm rst:bg-gray-100 rst:px-1 rst:py-0.5 rst:dark:bg-gray-800"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
defaultVariants: { colorScheme: "primary", surface: "none" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-ui rst:flex rst:w-full rst:rounded-md rst:border rst:h-10 rst:px-4 rst:text-sm rst:ring-offset-background rst:focus-visible:ring-offset-2 rst:file:border-0 rst:file:bg-transparent rst:file:text-sm rst:file:font-medium rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-all",{variants:{variant:{white:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../node_modules/class-variance-authority/dist/index.cjs"),t=r.cva("rst:font-ui rst:flex rst:w-full rst:rounded-md rst:border rst:h-10 rst:px-4 rst:text-sm rst:ring-offset-background rst:focus-visible:ring-offset-2 rst:file:border-0 rst:file:bg-transparent rst:file:text-sm rst:file:font-medium rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:transition-all",{variants:{variant:{white:"rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-500 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400",soft:"rst:border-[var(--roster-control-border)] rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-500 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:focus-visible:border-primary-400 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400 rst:dark:focus-visible:bg-gray-900",slate:"rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-300 rst:focus-visible:bg-gray-600 rst:dark:bg-gray-900 rst:dark:placeholder:text-gray-400 rst:dark:focus-visible:bg-gray-800",outline:"rst:border-[var(--roster-control-border)] rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:placeholder:text-[color-mix(in_srgb,var(--roster-control-text)_65%,transparent)] rst:focus-visible:border-[var(--roster-control-border-focus)]",ghost:"rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-500 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800"},size:{sm:"rst:h-9 rst:px-3",default:"rst:h-10 rst:px-4",lg:"rst:h-11 rst:px-4"},error:{true:"rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-600 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:focus-visible:ring-error-400",false:""}},defaultVariants:{variant:"outline",size:"default",error:!1}}),s=r.cva("rst:absolute rst:top-1/2 rst:-translate-y-1/2 rst:transition-colors",{variants:{variant:{white:"rst:text-gray-400 rst:dark:text-gray-500",soft:"rst:text-gray-500 rst:dark:text-gray-400",slate:"rst:text-gray-300 rst:dark:text-gray-500",outline:"rst:text-gray-400 rst:dark:text-gray-500",ghost:"rst:text-gray-500 rst:dark:text-gray-400"},error:{true:"rst:text-error-500 rst:dark:text-error-400",false:""}},defaultVariants:{variant:"outline",error:!1}});exports.iconVariants=s;exports.inputVariants=t;
|
|
@@ -9,7 +9,7 @@ const s = /* @__PURE__ */ r(
|
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
white: "rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-
|
|
12
|
+
white: "rst:border-gray-300 rst:bg-white rst:text-gray-900 rst:placeholder:text-gray-500 rst:focus-visible:border-primary-500 rst:dark:border-gray-700 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400",
|
|
13
13
|
/* A boundary that does not depend on what is behind it. `soft` used
|
|
14
14
|
`border-transparent` and leaned on its fill alone, which fails the
|
|
15
15
|
moment the fill matches the surface — exactly 1.00:1 inside a
|
|
@@ -17,8 +17,8 @@ const s = /* @__PURE__ */ r(
|
|
|
17
17
|
vanished until focus. Reported twice in one app before anyone read
|
|
18
18
|
the variant. The border is the same token `outline` reads, so a
|
|
19
19
|
consumer repaints both at once. */
|
|
20
|
-
soft: "rst:border-[var(--roster-control-border)] rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-
|
|
21
|
-
slate: "rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-
|
|
20
|
+
soft: "rst:border-[var(--roster-control-border)] rst:bg-gray-100 rst:text-gray-900 rst:placeholder:text-gray-500 rst:focus-visible:bg-white rst:focus-visible:border-primary-500 rst:dark:focus-visible:border-primary-400 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400 rst:dark:focus-visible:bg-gray-900",
|
|
21
|
+
slate: "rst:border-transparent rst:bg-gray-700 rst:text-gray-100 rst:placeholder:text-gray-300 rst:focus-visible:bg-gray-600 rst:dark:bg-gray-900 rst:dark:placeholder:text-gray-400 rst:dark:focus-visible:bg-gray-800",
|
|
22
22
|
/* The default variant, and the only one that reads tokens.
|
|
23
23
|
`Button`'s colors resolve through `--roster-*`, so remapping a palette
|
|
24
24
|
carries; these were hardcoded, so a consumer wanting a field border in
|
|
@@ -33,9 +33,19 @@ const s = /* @__PURE__ */ r(
|
|
|
33
33
|
know, and `soft` leaning on fill alone made it invisible at 1.00:1
|
|
34
34
|
inside a `white` Dialog in dark mode. `white`, `slate` and `ghost`
|
|
35
35
|
stay fully opinionated — each names a specific surface, and a token
|
|
36
|
-
that meant something different in each would not be a token.
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
that meant something different in each would not be a token.
|
|
37
|
+
|
|
38
|
+
Placeholders have to reach 4.5:1; gray-400, which every variant
|
|
39
|
+
used, is 2.52:1 on white. Here the placeholder is the text token at
|
|
40
|
+
65%, so it follows whatever surface the text was chosen for (5.46:1
|
|
41
|
+
on a white page, 7.76 on the dark one, 5.02 inside the `slate`
|
|
42
|
+
Dialog, where a fixed gray-500 would fall to 1.71; measured
|
|
43
|
+
rendered, src/fills-and-fields.checks.stories.tsx). The opinionated
|
|
44
|
+
variants name a step per scheme instead, measured on their own
|
|
45
|
+
fill. An error leaves the placeholder alone: a red that passes is
|
|
46
|
+
too close to the typed text's red to tell them apart. */
|
|
47
|
+
outline: "rst:border-[var(--roster-control-border)] rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:placeholder:text-[color-mix(in_srgb,var(--roster-control-text)_65%,transparent)] rst:focus-visible:border-[var(--roster-control-border-focus)]",
|
|
48
|
+
ghost: "rst:border-transparent rst:bg-transparent rst:text-gray-900 rst:placeholder:text-gray-500 rst:hover:bg-gray-100 rst:focus-visible:bg-gray-100 rst:dark:text-gray-100 rst:dark:placeholder:text-gray-400 rst:dark:hover:bg-gray-800 rst:dark:focus-visible:bg-gray-800"
|
|
39
49
|
},
|
|
40
50
|
/* Deliberately the same three heights as Button: h-9 / h-10 / h-11.
|
|
41
51
|
Input was a fixed 42px, which agreed with Button at no size at all, so
|
|
@@ -51,7 +61,7 @@ const s = /* @__PURE__ */ r(
|
|
|
51
61
|
lg: "rst:h-11 rst:px-4"
|
|
52
62
|
},
|
|
53
63
|
error: {
|
|
54
|
-
true: "rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-600 rst:
|
|
64
|
+
true: "rst:border-error-500 rst:focus-visible:ring-error-500 rst:text-error-600 rst:dark:border-error-500 rst:dark:text-error-400 rst:dark:focus-visible:ring-error-400",
|
|
55
65
|
false: ""
|
|
56
66
|
}
|
|
57
67
|
},
|