@blakesteve/roster 5.2.0 → 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.
Files changed (68) hide show
  1. package/README.md +121 -20
  2. package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
  3. package/dist/components/atoms/Avatar/Avatar.js +1 -1
  4. package/dist/components/atoms/Avatar/avatar-variants.cjs +1 -1
  5. package/dist/components/atoms/Avatar/avatar-variants.js +1 -1
  6. package/dist/components/atoms/Button/button-variants.cjs +1 -1
  7. package/dist/components/atoms/Button/button-variants.js +3 -3
  8. package/dist/components/atoms/Card/card-variants.cjs +1 -1
  9. package/dist/components/atoms/Card/card-variants.js +3 -2
  10. package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
  11. package/dist/components/atoms/Checkbox/Checkbox.d.ts +5 -0
  12. package/dist/components/atoms/Checkbox/Checkbox.js +54 -40
  13. package/dist/components/atoms/Checkbox/checkbox-variants.cjs +1 -1
  14. package/dist/components/atoms/Checkbox/checkbox-variants.js +1 -1
  15. package/dist/components/atoms/Combobox/Combobox.cjs +1 -1
  16. package/dist/components/atoms/Combobox/Combobox.js +63 -62
  17. package/dist/components/atoms/InlineCode/inline-code-variants.cjs +1 -1
  18. package/dist/components/atoms/InlineCode/inline-code-variants.js +1 -1
  19. package/dist/components/atoms/Input/Input.cjs +1 -1
  20. package/dist/components/atoms/Input/Input.js +49 -52
  21. package/dist/components/atoms/Input/input-variants.cjs +1 -1
  22. package/dist/components/atoms/Input/input-variants.js +17 -7
  23. package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
  24. package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -6
  25. package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
  26. package/dist/components/atoms/MultiSelect/MultiSelect.js +62 -60
  27. package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
  28. package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -1
  29. package/dist/components/atoms/Select/Select.cjs +1 -1
  30. package/dist/components/atoms/Select/Select.js +52 -51
  31. package/dist/components/atoms/Select/select-variants.cjs +1 -1
  32. package/dist/components/atoms/Select/select-variants.js +9 -2
  33. package/dist/components/atoms/Switch/switch-variants.cjs +1 -1
  34. package/dist/components/atoms/Switch/switch-variants.js +1 -1
  35. package/dist/components/atoms/Textarea/Textarea.cjs +1 -1
  36. package/dist/components/atoms/Textarea/Textarea.js +36 -34
  37. package/dist/components/atoms/Textarea/textarea-variants.cjs +1 -1
  38. package/dist/components/atoms/Textarea/textarea-variants.js +17 -11
  39. package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
  40. package/dist/components/atoms/Tooltip/Tooltip.js +1 -1
  41. package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
  42. package/dist/components/molecules/Accordion/Accordion.js +19 -19
  43. package/dist/components/molecules/Alert/Alert.cjs +1 -1
  44. package/dist/components/molecules/Alert/Alert.js +1 -1
  45. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
  46. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts +5 -3
  47. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +68 -65
  48. package/dist/components/molecules/RadioGroup/RadioGroup.cjs +1 -1
  49. package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +4 -3
  50. package/dist/components/molecules/RadioGroup/RadioGroup.js +48 -47
  51. package/dist/components/molecules/Toast/Toast.cjs +1 -1
  52. package/dist/components/molecules/Toast/Toast.js +1 -1
  53. package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
  54. package/dist/components/organisms/Dialog/Dialog.js +28 -24
  55. package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
  56. package/dist/components/organisms/Navbar/Navbar.js +2 -2
  57. package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
  58. package/dist/components/organisms/Sheet/Sheet.js +1 -1
  59. package/dist/internal/field-invalid.cjs +1 -0
  60. package/dist/internal/field-invalid.d.ts +37 -0
  61. package/dist/internal/field-invalid.js +13 -0
  62. package/dist/internal/popup.cjs +1 -1
  63. package/dist/internal/popup.js +1 -1
  64. package/dist/lib/utils.cjs +1 -1
  65. package/dist/lib/utils.js +16 -11
  66. package/dist/meta.json +3 -3
  67. package/dist/roster.css +1 -1
  68. package/package.json +1 -1
@@ -1,19 +1,20 @@
1
1
  "use client";
2
2
  import { jsxs as c, jsx as r } from "react/jsx-runtime";
3
- import B, { Fragment as M } from "react";
4
- import { Description as H } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
- import { Field as V } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
6
- import { Label as W } from "../../../node_modules/@headlessui/react/dist/components/label/label.js";
7
- import { Listbox as Y, ListboxButton as C, ListboxOptions as K, ListboxOption as X } from "../../../node_modules/@headlessui/react/dist/components/listbox/listbox.js";
8
- import { Transition as Z } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
9
- import { FontAwesomeIcon as S } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
10
- import { faChevronDown as q, faXmark as G } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
3
+ import H, { Fragment as V } from "react";
4
+ import { Description as W } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
+ import { Field as Y } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
6
+ import { Label as C } from "../../../node_modules/@headlessui/react/dist/components/label/label.js";
7
+ import { Listbox as K, ListboxButton as X, ListboxOptions as Z, ListboxOption as q } from "../../../node_modules/@headlessui/react/dist/components/listbox/listbox.js";
8
+ import { Transition as G } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
9
+ import { FontAwesomeIcon as _ } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
10
+ import { faChevronDown as J, faXmark as Q } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
11
11
  import { cn as s } from "../../../lib/utils.js";
12
- import { selectTriggerVariants as J } from "../Select/select-variants.js";
13
- import { Chip as _ } from "../Chip/Chip.js";
14
- import { PopupOption as Q } from "../../../internal/PopupOption.js";
15
- import { useDarkScope as z, POPUP_ANCHOR as tt, POPUP_WIDTH_OF_BUTTON as rt, POPUP_PANEL as et, popupInDarkPalette as st } from "../../../internal/popup.js";
16
- const bt = ({
12
+ import { isFieldInvalid as z, withoutInvalidProps as tt } from "../../../internal/field-invalid.js";
13
+ import { selectTriggerVariants as rt } from "../Select/select-variants.js";
14
+ import { Chip as T } from "../Chip/Chip.js";
15
+ import { PopupOption as et } from "../../../internal/PopupOption.js";
16
+ import { useDarkScope as st, POPUP_ANCHOR as nt, POPUP_WIDTH_OF_BUTTON as ot, POPUP_PANEL as at, popupInDarkPalette as it } from "../../../internal/popup.js";
17
+ const It = ({
17
18
  options: u,
18
19
  value: n,
19
20
  onChange: p,
@@ -21,10 +22,10 @@ const bt = ({
21
22
  disabled: i = !1,
22
23
  variant: v,
23
24
  size: o,
24
- error: T,
25
- className: F,
26
- triggerClassName: L,
27
- optionsClassName: R,
25
+ error: F,
26
+ className: L,
27
+ triggerClassName: R,
28
+ optionsClassName: D,
28
29
  helperText: x,
29
30
  errorMessage: h,
30
31
  label: b,
@@ -33,47 +34,48 @@ const bt = ({
33
34
  clearable: N = !1,
34
35
  chipColorScheme: k = "neutral",
35
36
  chipVariant: w = "outline",
36
- clearLabel: D = "Clear selection",
37
- removeLabel: j = (l) => `Remove ${l}`,
38
- ...E
37
+ clearLabel: j = "Clear selection",
38
+ removeLabel: E = (l) => `Remove ${l}`,
39
+ ...I
39
40
  }) => {
40
- const l = !!h || T, a = n.length > 0, y = new Map(u.map((t, e) => [t.value, e])), d = n.map((t) => ({
41
+ const l = !!h || F, U = z(l, I), $ = tt(I), a = n.length > 0, P = new Map(u.map((t, e) => [t.value, e])), d = n.map((t) => ({
41
42
  value: t,
42
43
  label: u.find((e) => e.value === t)?.label ?? String(t)
43
44
  })).sort(
44
- (t, e) => (y.get(t.value) ?? Number.POSITIVE_INFINITY) - (y.get(e.value) ?? Number.POSITIVE_INFINITY)
45
- ), I = g === void 0 ? d : d.slice(0, g), P = d.length - I.length, { ref: U, inDarkScope: $ } = z(), O = B.useRef(null);
45
+ (t, e) => (P.get(t.value) ?? Number.POSITIVE_INFINITY) - (P.get(e.value) ?? Number.POSITIVE_INFINITY)
46
+ ), y = g === void 0 ? d : d.slice(0, g), O = d.length - y.length, { ref: A, inDarkScope: B } = st(), S = H.useRef(null);
46
47
  return /* @__PURE__ */ c(
47
- V,
48
+ Y,
48
49
  {
49
50
  disabled: i,
50
- className: s("rst:flex rst:flex-col rst:gap-1.5", F),
51
- ...E,
51
+ className: s("rst:flex rst:flex-col rst:gap-1.5", L),
52
+ ...$,
52
53
  children: [
53
- b && /* @__PURE__ */ r(W, { className: "rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left", children: b }),
54
- /* @__PURE__ */ r(Y, { value: n, onChange: p, disabled: i, multiple: !0, children: /* @__PURE__ */ c("div", { ref: U, className: "rst:relative", children: [
54
+ b && /* @__PURE__ */ r(C, { className: "rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left", children: b }),
55
+ /* @__PURE__ */ r(K, { value: n, onChange: p, disabled: i, multiple: !0, children: /* @__PURE__ */ c("div", { ref: A, className: "rst:relative", children: [
55
56
  /* @__PURE__ */ c(
56
57
  "div",
57
58
  {
58
59
  className: s(
59
- J({ variant: v, size: o, error: l }),
60
+ rt({ variant: v, size: o, error: l }),
60
61
  "rst:h-auto rst:flex-wrap rst:items-center rst:gap-1.5 rst:py-1.5",
61
62
  o === "sm" ? "rst:min-h-9" : o === "lg" ? "rst:min-h-11" : "rst:min-h-10",
62
63
  N && a && "rst:pr-16",
63
64
  /* The ring is on the shell and fires from `focus-within`, because
64
65
  the element that actually takes focus is the invisible button
65
66
  stretched across it — and, deliberately, from a dismiss
66
- control too: those are inside the field and should light it. */
67
- "rst:focus-within:ring-2 rst:focus-within:ring-ring",
67
+ control too: those are inside the field and should light it.
68
+ One pixel heavier than the edge, as Select's trigger is. */
69
+ "rst:focus-within:ring-[length:calc(var(--roster-border-width,1px)+1px)] rst:focus-within:ring-ring",
68
70
  i && "rst:opacity-50 rst:cursor-not-allowed",
69
- L
71
+ R
70
72
  ),
71
73
  children: [
72
74
  /* @__PURE__ */ r(
73
- C,
75
+ X,
74
76
  {
75
- ref: O,
76
- "aria-invalid": l || void 0,
77
+ ref: S,
78
+ "aria-invalid": U || void 0,
77
79
  className: "rst:absolute rst:inset-0 rst:h-full rst:w-full rst:cursor-pointer rst:rounded-md rst:focus:outline-hidden rst:disabled:cursor-not-allowed",
78
80
  children: /* @__PURE__ */ r("span", { className: "rst:sr-only", children: a ? m === "count" ? `${n.length} selected` : d.map((t) => t.label).join(", ") : f })
79
81
  }
@@ -97,15 +99,15 @@ const bt = ({
97
99
  ]
98
100
  }
99
101
  ),
100
- a && m === "chips" && I.map((t, e) => /* @__PURE__ */ r(
101
- _,
102
+ a && m === "chips" && y.map((t, e) => /* @__PURE__ */ r(
103
+ T,
102
104
  {
103
105
  size: "sm",
104
106
  variant: w,
105
107
  colorScheme: k,
106
108
  disabled: i,
107
- onRemove: () => p(n.filter((A) => A !== t.value)),
108
- removeLabel: j(t.label),
109
+ onRemove: () => p(n.filter((M) => M !== t.value)),
110
+ removeLabel: E(t.label),
109
111
  className: s(
110
112
  "rst:relative rst:max-w-[12rem] rst:pointer-events-none",
111
113
  "rst:[&_button]:pointer-events-auto",
@@ -115,8 +117,8 @@ const bt = ({
115
117
  },
116
118
  `${e}-${String(t.value)}`
117
119
  )),
118
- P > 0 && m === "chips" && /* @__PURE__ */ c(
119
- _,
120
+ O > 0 && m === "chips" && /* @__PURE__ */ c(
121
+ T,
120
122
  {
121
123
  size: "sm",
122
124
  variant: w,
@@ -125,7 +127,7 @@ const bt = ({
125
127
  className: "rst:pointer-events-none rst:relative rst:text-inherit rst:border-current/70 rst:dark:text-inherit rst:dark:border-current/70",
126
128
  children: [
127
129
  "+",
128
- P
130
+ O
129
131
  ]
130
132
  }
131
133
  ),
@@ -137,9 +139,9 @@ const bt = ({
137
139
  o === "sm" ? "rst:pr-2.5" : "rst:pr-3"
138
140
  ),
139
141
  children: /* @__PURE__ */ r(
140
- S,
142
+ _,
141
143
  {
142
- icon: q,
144
+ icon: J,
143
145
  className: "rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500",
144
146
  "aria-hidden": "true"
145
147
  }
@@ -152,9 +154,9 @@ const bt = ({
152
154
  type: "button",
153
155
  disabled: i,
154
156
  onClick: () => {
155
- p([]), O.current?.focus();
157
+ p([]), S.current?.focus();
156
158
  },
157
- "aria-label": D,
159
+ "aria-label": j,
158
160
  className: s(
159
161
  /* `w-6` is not decoration: WCAG 2.5.8 asks 24x24 CSS px and
160
162
  a bare 14px icon measured 20px wide. The spacing exception
@@ -167,9 +169,9 @@ const bt = ({
167
169
  o === "sm" ? "rst:right-7" : "rst:right-8"
168
170
  ),
169
171
  children: /* @__PURE__ */ r(
170
- S,
172
+ _,
171
173
  {
172
- icon: G,
174
+ icon: Q,
173
175
  className: "rst:h-3.5 rst:w-3.5",
174
176
  "aria-hidden": "true"
175
177
  }
@@ -180,26 +182,26 @@ const bt = ({
180
182
  }
181
183
  ),
182
184
  /* @__PURE__ */ r(
183
- Z,
185
+ G,
184
186
  {
185
- as: M,
187
+ as: V,
186
188
  leave: "rst:transition rst:ease-in rst:duration-100",
187
189
  leaveFrom: "rst:opacity-100",
188
190
  leaveTo: "rst:opacity-0",
189
191
  children: /* @__PURE__ */ r(
190
- K,
192
+ Z,
191
193
  {
192
- anchor: tt,
194
+ anchor: nt,
193
195
  className: s(
194
- st($, v) && "dark",
195
- et,
196
- rt,
197
- R
196
+ it(B, v) && "dark",
197
+ at,
198
+ ot,
199
+ D
198
200
  ),
199
201
  children: u.map((t) => /* @__PURE__ */ r(
200
- Q,
202
+ et,
201
203
  {
202
- as: X,
204
+ as: q,
203
205
  value: t.value,
204
206
  disabled: t.disabled,
205
207
  size: o,
@@ -213,7 +215,7 @@ const bt = ({
213
215
  )
214
216
  ] }) }),
215
217
  (x || h) && /* @__PURE__ */ r(
216
- H,
218
+ W,
217
219
  {
218
220
  className: s(
219
221
  "rst:text-xs rst:text-left",
@@ -227,5 +229,5 @@ const bt = ({
227
229
  );
228
230
  };
229
231
  export {
230
- bt as MultiSelect
232
+ It as MultiSelect
231
233
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),j=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),c=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),a=require("../../../lib/utils.cjs"),S=require("../Input/Input.cjs"),u=i.forwardRef(({revealable:l=!0,defaultRevealed:d=!1,revealed:r,onRevealChange:p,showLabel:y="Show password",hideLabel:f="Hide password",disabled:e,variant:w,error:m,errorMessage:h,className:v,...x},g)=>{const[I,q]=i.useState(d),o=r!==void 0,t=o?r:I,b=()=>{const n=!t;o||q(n),p?.(n)};return s.jsx(S.Input,{ref:g,type:t?"text":"password",disabled:e,variant:w,error:m,errorMessage:h,className:a.cn("rst:[&_input::-ms-reveal]:hidden",v),endIcon:l?s.jsx("button",{type:"button",onClick:b,disabled:e,"aria-label":t?f:y,"aria-pressed":t,className:a.cn("rst:-m-1 rst:flex rst:items-center rst:rounded rst:p-1 rst:transition-opacity","rst:opacity-70 rst:hover:opacity-100","rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",e&&"rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"),children:s.jsx(j.FontAwesomeIcon,{icon:t?c.faEyeSlash:c.faEye,className:"rst:h-4 rst:w-4","aria-hidden":"true"})}):void 0,...x})});u.displayName="PasswordInput";exports.PasswordInput=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),j=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),c=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),a=require("../../../lib/utils.cjs"),S=require("../Input/Input.cjs"),u=i.forwardRef(({revealable:l=!0,defaultRevealed:d=!1,revealed:r,onRevealChange:p,showLabel:y="Show password",hideLabel:f="Hide password",disabled:e,variant:m,error:w,errorMessage:h,className:v,...x},g)=>{const[I,q]=i.useState(d),o=r!==void 0,t=o?r:I,b=()=>{const n=!t;o||q(n),p?.(n)};return s.jsx(S.Input,{ref:g,type:t?"text":"password",disabled:e,variant:m,error:w,errorMessage:h,className:a.cn("rst:[&_input::-ms-reveal]:hidden",v),endIcon:l?s.jsx("button",{type:"button",onClick:b,disabled:e,"aria-label":t?f:y,"aria-pressed":t,className:a.cn("rst:-m-1 rst:flex rst:items-center rst:rounded-sm rst:p-1 rst:transition-opacity","rst:opacity-70 rst:hover:opacity-100","rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",e&&"rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"),children:s.jsx(j.FontAwesomeIcon,{icon:t?c.faEyeSlash:c.faEye,className:"rst:h-4 rst:w-4","aria-hidden":"true"})}):void 0,...x})});u.displayName="PasswordInput";exports.PasswordInput=u;
@@ -43,7 +43,7 @@ const C = i.forwardRef(
43
43
  "aria-label": t ? m : p,
44
44
  "aria-pressed": t,
45
45
  className: a(
46
- "rst:-m-1 rst:flex rst:items-center rst:rounded rst:p-1 rst:transition-opacity",
46
+ "rst:-m-1 rst:flex rst:items-center rst:rounded-sm rst:p-1 rst:transition-opacity",
47
47
  "rst:opacity-70 rst:hover:opacity-100",
48
48
  "rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",
49
49
  r && "rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),y=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),k=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),S=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),n=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),D=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),L=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),T=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),r=require("../../../lib/utils.cjs"),F=require("./select-variants.cjs"),_=require("../../../internal/PopupOption.cjs"),s=require("../../../internal/popup.cjs"),R=({options:l,value:d,onChange:f,placeholder:h="Select an option",disabled:x=!1,variant:u,size:a,error:b,className:v,triggerClassName:j,optionsClassName:P,helperText:p,errorMessage:i,label:m,...q})=>{const c=l.find(e=>e.value===d),o=!!i||b,{ref:N,inDarkScope:O}=s.useDarkScope();return t.jsxs(k.Field,{disabled:x,className:r.cn("rst:flex rst:flex-col rst:gap-1.5",v),...q,children:[m&&t.jsx(S.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:m}),t.jsx(n.Listbox,{value:d??void 0,onChange:f,disabled:x,children:t.jsxs("div",{ref:N,className:"rst:relative",children:[t.jsxs(n.ListboxButton,{"aria-invalid":o||void 0,className:r.cn(F.selectTriggerVariants({variant:u,size:a,error:o}),j),children:[t.jsx("span",{className:r.cn("rst:block rst:truncate",!c&&"rst:text-gray-500 rst:dark:text-gray-400"),children:c?c.label:h}),t.jsx("span",{className:r.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",a==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(L.FontAwesomeIcon,{icon:T.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),t.jsx(D.Transition,{as:g.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(n.ListboxOptions,{anchor:s.POPUP_ANCHOR,className:r.cn(s.popupInDarkPalette(O,u)&&"dark",s.POPUP_PANEL,s.POPUP_WIDTH_OF_BUTTON,P),children:l.map(e=>t.jsx(_.PopupOption,{as:n.ListboxOption,value:e.value,disabled:e.disabled,size:a,children:e.label},e.value))})})]})}),(p||i)&&t.jsx(y.Description,{className:r.cn("rst:text-xs rst:text-left",o?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:i||p})]})};exports.Select=R;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),D=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),F=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),I=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),n=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),L=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),T=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),_=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),r=require("../../../lib/utils.cjs"),f=require("../../../internal/field-invalid.cjs"),w=require("./select-variants.cjs"),R=require("../../../internal/PopupOption.cjs"),s=require("../../../internal/popup.cjs"),U=({options:o,value:d,onChange:h,placeholder:P="Select an option",disabled:u=!1,variant:x,size:i,error:b,className:j,triggerClassName:q,optionsClassName:N,helperText:p,errorMessage:a,label:m,...v})=>{const c=o.find(e=>e.value===d),l=!!a||b,O=f.isFieldInvalid(l,v),g=f.withoutInvalidProps(v),{ref:y,inDarkScope:k}=s.useDarkScope();return t.jsxs(F.Field,{disabled:u,className:r.cn("rst:flex rst:flex-col rst:gap-1.5",j),...g,children:[m&&t.jsx(I.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:m}),t.jsx(n.Listbox,{value:d??void 0,onChange:h,disabled:u,children:t.jsxs("div",{ref:y,className:"rst:relative",children:[t.jsxs(n.ListboxButton,{"aria-invalid":O||void 0,className:r.cn(w.selectTriggerVariants({variant:x,size:i,error:l}),q),children:[t.jsx("span",{className:r.cn("rst:block rst:truncate",!c&&"rst:text-gray-500 rst:dark:text-gray-400"),children:c?c.label:P}),t.jsx("span",{className:r.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",i==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(T.FontAwesomeIcon,{icon:_.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),t.jsx(L.Transition,{as:S.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(n.ListboxOptions,{anchor:s.POPUP_ANCHOR,className:r.cn(s.popupInDarkPalette(k,x)&&"dark",s.POPUP_PANEL,s.POPUP_WIDTH_OF_BUTTON,N),children:o.map(e=>t.jsx(R.PopupOption,{as:n.ListboxOption,value:e.value,disabled:e.disabled,size:i,children:e.label},e.value))})})]})}),(p||a)&&t.jsx(D.Description,{className:r.cn("rst:text-xs rst:text-left",l?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:a||p})]})};exports.Select=U;
@@ -1,35 +1,36 @@
1
1
  "use client";
2
2
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
3
- import { Fragment as g } from "react";
4
- import { Description as y } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
- import { Field as D } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
3
+ import { Fragment as D } from "react";
4
+ import { Description as F } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
5
+ import { Field as I } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
6
6
  import { Label as L } from "../../../node_modules/@headlessui/react/dist/components/label/label.js";
7
- import { Listbox as F, ListboxButton as T, ListboxOptions as _, ListboxOption as I } from "../../../node_modules/@headlessui/react/dist/components/listbox/listbox.js";
8
- import { Transition as S } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
9
- import { FontAwesomeIcon as U } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
10
- import { faChevronDown as w } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
11
- import { cn as e } from "../../../lib/utils.js";
12
- import { selectTriggerVariants as A } from "./select-variants.js";
13
- import { PopupOption as B } from "../../../internal/PopupOption.js";
14
- import { useDarkScope as j, POPUP_ANCHOR as C, POPUP_WIDTH_OF_BUTTON as E, POPUP_PANEL as H, popupInDarkPalette as R } from "../../../internal/popup.js";
15
- const tt = ({
7
+ import { Listbox as T, ListboxButton as _, ListboxOptions as w, ListboxOption as S } from "../../../node_modules/@headlessui/react/dist/components/listbox/listbox.js";
8
+ import { Transition as U } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
9
+ import { FontAwesomeIcon as A } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
10
+ import { faChevronDown as B } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
11
+ import { cn as s } from "../../../lib/utils.js";
12
+ import { isFieldInvalid as j, withoutInvalidProps as C } from "../../../internal/field-invalid.js";
13
+ import { selectTriggerVariants as E } from "./select-variants.js";
14
+ import { PopupOption as H } from "../../../internal/PopupOption.js";
15
+ import { useDarkScope as R, POPUP_ANCHOR as W, POPUP_WIDTH_OF_BUTTON as K, POPUP_PANEL as M, popupInDarkPalette as V } from "../../../internal/popup.js";
16
+ const ot = ({
16
17
  options: l,
17
18
  value: m,
18
- onChange: x,
19
- placeholder: h = "Select an option",
19
+ onChange: h,
20
+ placeholder: u = "Select an option",
20
21
  disabled: c = !1,
21
22
  variant: d,
22
- size: s,
23
- error: u,
24
- className: v,
23
+ size: e,
24
+ error: v,
25
+ className: P,
25
26
  triggerClassName: N,
26
- optionsClassName: P,
27
+ optionsClassName: b,
27
28
  helperText: p,
28
29
  errorMessage: a,
29
30
  label: f,
30
- ...b
31
+ ...x
31
32
  }) => {
32
- const o = l.find((r) => r.value === m), i = !!a || u, { ref: k, inDarkScope: O } = j();
33
+ const o = l.find((r) => r.value === m), i = !!a || v, k = j(i, x), O = C(x), { ref: g, inDarkScope: y } = R();
33
34
  return (
34
35
  /* `...props` is spread here, and was not before. The prop type has always
35
36
  extended `HTMLAttributes<HTMLDivElement>`, so `id`, `data-*` and the
@@ -42,52 +43,52 @@ const tt = ({
42
43
  which is the one path assistive tech actually follows. Before those
43
44
  existed there was no way to describe this trigger at all. */
44
45
  /* @__PURE__ */ n(
45
- D,
46
+ I,
46
47
  {
47
48
  disabled: c,
48
- className: e("rst:flex rst:flex-col rst:gap-1.5", v),
49
- ...b,
49
+ className: s("rst:flex rst:flex-col rst:gap-1.5", P),
50
+ ...O,
50
51
  children: [
51
52
  f && /* @__PURE__ */ t(L, { className: "rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left", children: f }),
52
53
  /* @__PURE__ */ t(
53
- F,
54
+ T,
54
55
  {
55
56
  value: m ?? void 0,
56
- onChange: x,
57
+ onChange: h,
57
58
  disabled: c,
58
- children: /* @__PURE__ */ n("div", { ref: k, className: "rst:relative", children: [
59
+ children: /* @__PURE__ */ n("div", { ref: g, className: "rst:relative", children: [
59
60
  /* @__PURE__ */ n(
60
- T,
61
+ _,
61
62
  {
62
- "aria-invalid": i || void 0,
63
- className: e(
64
- A({ variant: d, size: s, error: i }),
63
+ "aria-invalid": k || void 0,
64
+ className: s(
65
+ E({ variant: d, size: e, error: i }),
65
66
  N
66
67
  ),
67
68
  children: [
68
69
  /* @__PURE__ */ t(
69
70
  "span",
70
71
  {
71
- className: e(
72
+ className: s(
72
73
  "rst:block rst:truncate",
73
74
  !o && "rst:text-gray-500 rst:dark:text-gray-400"
74
75
  ),
75
- children: o ? o.label : h
76
+ children: o ? o.label : u
76
77
  }
77
78
  ),
78
79
  /* @__PURE__ */ t(
79
80
  "span",
80
81
  {
81
- className: e(
82
+ className: s(
82
83
  "rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",
83
84
  /* Clearance tracks the size's own right padding, the way
84
85
  Input's icon inset tracks its horizontal padding. */
85
- s === "sm" ? "rst:pr-2.5" : "rst:pr-3"
86
+ e === "sm" ? "rst:pr-2.5" : "rst:pr-3"
86
87
  ),
87
88
  children: /* @__PURE__ */ t(
88
- U,
89
+ A,
89
90
  {
90
- icon: w,
91
+ icon: B,
91
92
  className: "rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500",
92
93
  "aria-hidden": "true"
93
94
  }
@@ -98,29 +99,29 @@ const tt = ({
98
99
  }
99
100
  ),
100
101
  /* @__PURE__ */ t(
101
- S,
102
+ U,
102
103
  {
103
- as: g,
104
+ as: D,
104
105
  leave: "rst:transition rst:ease-in rst:duration-100",
105
106
  leaveFrom: "rst:opacity-100",
106
107
  leaveTo: "rst:opacity-0",
107
108
  children: /* @__PURE__ */ t(
108
- _,
109
+ w,
109
110
  {
110
- anchor: C,
111
- className: e(
112
- R(O, d) && "dark",
113
- H,
114
- E,
115
- P
111
+ anchor: W,
112
+ className: s(
113
+ V(y, d) && "dark",
114
+ M,
115
+ K,
116
+ b
116
117
  ),
117
118
  children: l.map((r) => /* @__PURE__ */ t(
118
- B,
119
+ H,
119
120
  {
120
- as: I,
121
+ as: S,
121
122
  value: r.value,
122
123
  disabled: r.disabled,
123
- size: s,
124
+ size: e,
124
125
  children: r.label
125
126
  },
126
127
  r.value
@@ -133,9 +134,9 @@ const tt = ({
133
134
  }
134
135
  ),
135
136
  (p || a) && /* @__PURE__ */ t(
136
- y,
137
+ F,
137
138
  {
138
- className: e(
139
+ className: s(
139
140
  "rst:text-xs rst:text-left",
140
141
  i ? "rst:text-error-600 rst:dark:text-error-400 rst:font-medium" : "rst:text-gray-500 rst:dark:text-gray-400"
141
142
  ),
@@ -148,5 +149,5 @@ const tt = ({
148
149
  );
149
150
  };
150
151
  export {
151
- tt as Select
152
+ ot as Select
152
153
  };
@@ -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:flex rst:w-full rst:cursor-pointer rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:items-center rst:rounded-md rst:h-10 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:shadow-sm rst:ring-1 rst:ring-inset rst:transition-all rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:ring-gray-700 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:ring-[var(--roster-control-border)] rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:ring-transparent rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:ring-[color:var(--roster-control-border)]",ghost:"rst:bg-transparent rst:text-gray-700 rst:ring-transparent rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"},size:{sm:"rst:h-9 rst:pl-3 rst:pr-9",default:"rst:h-10 rst:pl-4 rst:pr-10",lg:"rst:h-11 rst:pl-4 rst:pr-10"},error:{true:"rst:ring-error-500 rst:text-error-600 rst:focus-visible:ring-error-500 rst:dark:ring-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:text-sm rst:group rst:relative rst:cursor-default rst:select-none rst:py-2.5 rst:pl-4 rst:pr-9 rst:transition-colors rst:text-inherit rst:data-focus:bg-primary-100 rst:data-focus:text-primary-900 rst:dark:data-focus:bg-primary-900/30 rst:dark:data-focus:text-primary-100 rst:data-selected:bg-gray-50 rst:dark:data-selected:bg-gray-700/50 rst:data-disabled:opacity-50 rst:data-disabled:cursor-not-allowed",{variants:{size:{sm:"rst:py-2 rst:pl-3 rst:pr-8",default:"rst:py-2.5 rst:pl-4 rst:pr-9",lg:"rst:py-2.5 rst:pl-4 rst:pr-9"}},defaultVariants:{size:"default"}});exports.selectOptionVariants=s;exports.selectTriggerVariants=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-ui rst:relative rst:flex rst:w-full rst:cursor-pointer rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:items-center rst:rounded-md rst:h-10 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:elevation-control rst:ring rst:ring-inset rst:transition-all rst:focus:outline-hidden rst:focus-visible:ring-[length:calc(var(--roster-border-width,1px)+1px)] rst:focus-visible:ring-ring",{variants:{variant:{white:"rst:bg-white rst:text-gray-900 rst:ring-gray-300 rst:hover:bg-gray-50 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:ring-gray-700 rst:dark:hover:bg-gray-700",soft:"rst:bg-gray-100 rst:text-gray-900 rst:ring-[var(--roster-control-border)] rst:hover:bg-gray-200 rst:dark:bg-gray-800 rst:dark:text-gray-100 rst:dark:hover:bg-gray-700",slate:"rst:bg-gray-700 rst:text-gray-100 rst:ring-transparent rst:hover:bg-gray-600 rst:dark:bg-gray-900 rst:dark:text-gray-100 rst:dark:hover:bg-gray-800",outline:"rst:bg-[var(--roster-control-bg)] rst:text-[var(--roster-control-text)] rst:ring-[color:var(--roster-control-border)]",ghost:"rst:bg-transparent rst:text-gray-700 rst:ring-transparent rst:hover:bg-gray-100 rst:hover:text-gray-900 rst:dark:text-gray-300 rst:dark:hover:bg-gray-800 rst:dark:hover:text-gray-100"},size:{sm:"rst:h-9 rst:pl-3 rst:pr-9",default:"rst:h-10 rst:pl-4 rst:pr-10",lg:"rst:h-11 rst:pl-4 rst:pr-10"},error:{true:"rst:ring-error-500 rst:text-error-600 rst:focus-visible:ring-error-500 rst:dark:ring-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:text-sm rst:group rst:relative rst:cursor-default rst:select-none rst:py-2.5 rst:pl-4 rst:pr-9 rst:transition-colors rst:text-inherit rst:data-focus:bg-primary-100 rst:data-focus:text-primary-900 rst:dark:data-focus:bg-primary-900/30 rst:dark:data-focus:text-primary-100 rst:data-selected:bg-gray-50 rst:dark:data-selected:bg-gray-700/50 rst:data-disabled:opacity-50 rst:data-disabled:cursor-not-allowed",{variants:{size:{sm:"rst:py-2 rst:pl-3 rst:pr-8",default:"rst:py-2.5 rst:pl-4 rst:pr-9",lg:"rst:py-2.5 rst:pl-4 rst:pr-9"}},defaultVariants:{size:"default"}});exports.selectOptionVariants=s;exports.selectTriggerVariants=t;
@@ -9,8 +9,15 @@ const s = /* @__PURE__ */ r(
9
9
  Height used to be a side effect of `py-2.5` plus the line box, and the
10
10
  base carried `sm:leading-6` — which made this the only control in the
11
11
  library whose height changed at a breakpoint: 40px on mobile, 44px from
12
- `sm` up. It is now an explicit height at every width. */
13
- "rst:font-ui rst:relative rst:flex rst:w-full rst:cursor-pointer rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:items-center rst:rounded-md rst:h-10 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:shadow-sm rst:ring-1 rst:ring-inset rst:transition-all rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",
12
+ `sm` up. It is now an explicit height at every width.
13
+
14
+ The trigger draws its edge as a bare `ring`, which reads
15
+ `--roster-border-width` so it matches Input's `border` at any width. Its
16
+ focus ring is that width plus a pixel rather than a literal `ring-2`:
17
+ with the edge set to 2px, a 2px focus ring would change only the color,
18
+ and focus would stop being a heavier line. Unset, it computes to 2px, as
19
+ before. */
20
+ "rst:font-ui rst:relative rst:flex rst:w-full rst:cursor-pointer rst:disabled:cursor-not-allowed rst:disabled:opacity-50 rst:items-center rst:rounded-md rst:h-10 rst:pl-4 rst:pr-10 rst:text-left rst:text-sm rst:font-medium rst:elevation-control rst:ring rst:ring-inset rst:transition-all rst:focus:outline-hidden rst:focus-visible:ring-[length:calc(var(--roster-border-width,1px)+1px)] rst:focus-visible:ring-ring",
14
21
  {
15
22
  variants: {
16
23
  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: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:font-ui rst:group rst:relative rst:inline-flex rst:shrink-0 rst:cursor-pointer rst:rounded-full rst:border-2 rst:border-transparent rst:transition-colors rst:duration-200 rst:ease-in-out rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:disabled:cursor-not-allowed rst:disabled:opacity-50",{variants:{variant:{primary:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-primary-500 rst:focus-visible:ring-ring",success:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-green-500 rst:focus-visible:ring-ring",danger:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-error-500 rst:focus-visible:ring-ring",neutral:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-gray-600 rst:dark:data-[checked]:bg-gray-500 rst:focus-visible:ring-ring"},size:{xs:"rst:h-4 rst:w-7",sm:"rst:h-5 rst:w-9",md:"rst:h-6 rst:w-11",lg:"rst:h-7 rst:w-14"}},defaultVariants:{variant:"primary",size:"md"}}),s=r.cva("rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:shadow rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",{variants:{size:{xs:"rst:h-3 rst:w-3 rst:translate-x-0 rst:group-data-[checked]:translate-x-3",sm:"rst:h-4 rst:w-4 rst:translate-x-0 rst:group-data-[checked]:translate-x-4",md:"rst:h-5 rst:w-5 rst:translate-x-0 rst:group-data-[checked]:translate-x-5",lg:"rst:h-6 rst:w-6 rst:translate-x-0 rst:group-data-[checked]:translate-x-7"}},defaultVariants:{size:"md"}});exports.switchThumbVariants=s;exports.switchTrackVariants=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: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:font-ui rst:group rst:relative rst:inline-flex rst:shrink-0 rst:cursor-pointer rst:rounded-full rst:border-2 rst:border-transparent rst:transition-colors rst:duration-200 rst:ease-in-out rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-offset-2 rst:ring-offset-background rst:disabled:cursor-not-allowed rst:disabled:opacity-50",{variants:{variant:{primary:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-primary-500 rst:focus-visible:ring-ring",success:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-green-500 rst:focus-visible:ring-ring",danger:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-error-500 rst:focus-visible:ring-ring",neutral:"rst:bg-gray-200 rst:dark:bg-gray-700 rst:data-[checked]:bg-gray-600 rst:dark:data-[checked]:bg-gray-500 rst:focus-visible:ring-ring"},size:{xs:"rst:h-4 rst:w-7",sm:"rst:h-5 rst:w-9",md:"rst:h-6 rst:w-11",lg:"rst:h-7 rst:w-14"}},defaultVariants:{variant:"primary",size:"md"}}),s=r.cva("rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:elevation-control rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",{variants:{size:{xs:"rst:h-3 rst:w-3 rst:translate-x-0 rst:group-data-[checked]:translate-x-3",sm:"rst:h-4 rst:w-4 rst:translate-x-0 rst:group-data-[checked]:translate-x-4",md:"rst:h-5 rst:w-5 rst:translate-x-0 rst:group-data-[checked]:translate-x-5",lg:"rst:h-6 rst:w-6 rst:translate-x-0 rst:group-data-[checked]:translate-x-7"}},defaultVariants:{size:"md"}});exports.switchThumbVariants=s;exports.switchTrackVariants=t;
@@ -22,7 +22,7 @@ const s = /* @__PURE__ */ r(
22
22
  }
23
23
  }
24
24
  ), a = /* @__PURE__ */ r(
25
- "rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:shadow rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",
25
+ "rst:pointer-events-none rst:inline-block rst:rounded-full rst:bg-white rst:elevation-control rst:ring-0 rst:transition rst:duration-200 rst:ease-in-out rst:transform",
26
26
  {
27
27
  variants: {
28
28
  size: {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),b=require("react"),q=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),j=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),p=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/textarea/textarea.cjs"),r=require("../../../lib/utils.cjs"),N=require("./textarea-variants.cjs"),n=b.forwardRef(({className:c,label:s,helperText:a,errorMessage:e,variant:o,error:l,resize:x,disabled:d,textareaClassName:u,...m},f)=>{const i=!!e||l;return t.jsxs(j.Field,{className:r.cn("rst:w-full",c),children:[s&&t.jsx(p.Label,{className:"rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-[var(--roster-control-text)] rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left rst:mb-1.5",children:s}),t.jsx(y.Textarea,{ref:f,disabled:d,className:r.cn(N.textareaVariants({variant:o,resize:x,error:i}),u),...m}),(a||e)&&t.jsx(q.Description,{className:r.cn("rst:text-xs rst:text-left rst:mt-1.5",i?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:e||a})]})});n.displayName="Textarea";exports.Textarea=n;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),v=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),N=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),h=require("../../../node_modules/@headlessui/react/dist/components/textarea/textarea.cjs"),s=require("../../../lib/utils.cjs"),w=require("./textarea-variants.cjs"),o=require("../../../internal/field-invalid.cjs"),l=p.forwardRef(({className:c,label:a,helperText:i,errorMessage:e,variant:d,error:x,resize:u,disabled:m,textareaClassName:f,...n},q)=>{const r=!!e||x,b=o.isFieldInvalid(r,n),j=o.withoutInvalidProps(n);return t.jsxs(y.Field,{className:s.cn("rst:w-full",c),children:[a&&t.jsx(N.Label,{className:"rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-[var(--roster-control-text)] rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left rst:mb-1.5",children:a}),t.jsx(h.Textarea,{ref:q,disabled:m,className:s.cn(w.textareaVariants({variant:d,resize:u,error:r}),f),...j,invalid:b}),(i||e)&&t.jsx(v.Description,{className:s.cn("rst:text-xs rst:text-left rst:mt-1.5",r?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:e||i})]})});l.displayName="Textarea";exports.Textarea=l;