@spear-ai/spectral 1.3.62 → 1.3.63

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 (164) hide show
  1. package/dist/.js +181 -152
  2. package/dist/Accordion.d.ts +37 -0
  3. package/dist/Accordion.js +465 -0
  4. package/dist/Alert/AlertBase.js +2 -2
  5. package/dist/Alert.js +4 -3
  6. package/dist/Avatar.js +1 -1
  7. package/dist/Badge.d.ts +12 -2
  8. package/dist/Badge.js +28 -4
  9. package/dist/Button.js +2 -2
  10. package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  11. package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
  12. package/dist/ButtonGroup.d.ts +29 -0
  13. package/dist/ButtonGroup.js +89 -0
  14. package/dist/ButtonIcon.js +2 -1
  15. package/dist/Checkbox/CheckboxBase.js +1 -1
  16. package/dist/Checkbox.js +11 -12
  17. package/dist/Dialog/DialogBase.d.ts +1 -1
  18. package/dist/Dialog/DialogBase.js +2 -2
  19. package/dist/Dialog.js +4 -4
  20. package/dist/Drawer.js +24 -1283
  21. package/dist/HoverCard.d.ts +29 -0
  22. package/dist/HoverCard.js +207 -0
  23. package/dist/Icons/MessagesIcon.d.ts +3 -0
  24. package/dist/Icons/MessagesIcon.js +31 -0
  25. package/dist/Icons/index.d.ts +1 -0
  26. package/dist/Icons.js +50 -48
  27. package/dist/Input.d.ts +2 -0
  28. package/dist/Input.js +98 -89
  29. package/dist/InputGroup.d.ts +16 -0
  30. package/dist/InputGroup.js +129 -0
  31. package/dist/InputOTP.d.ts +0 -2
  32. package/dist/InputOTP.js +138 -142
  33. package/dist/Label.d.ts +3 -7
  34. package/dist/Label.js +11 -11
  35. package/dist/MultiSelect/MultiSelectBase.js +22 -22
  36. package/dist/Popover.d.ts +6 -7
  37. package/dist/Popover.js +60 -71
  38. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
  39. package/dist/RadioButtonGroup.js +1 -1
  40. package/dist/RadioGroup.d.ts +1 -1
  41. package/dist/RadioGroup.js +141 -134
  42. package/dist/Select.js +97 -895
  43. package/dist/Separator.d.ts +12 -0
  44. package/dist/Separator.js +24 -0
  45. package/dist/Skeleton.js +3 -3
  46. package/dist/Slider.d.ts +15 -3
  47. package/dist/Slider.js +464 -40
  48. package/dist/Switch/SwitchBase.js +1 -1
  49. package/dist/Switch.js +2 -2
  50. package/dist/Tabs/TabsBase.js +1 -1
  51. package/dist/Tabs.js +16 -16
  52. package/dist/Textarea.js +41 -42
  53. package/dist/Toggle.js +2 -2
  54. package/dist/ToggleGroup.js +1 -1
  55. package/dist/Tooltip/TooltipBase.js +29 -29
  56. package/dist/Tooltip.js +15 -15
  57. package/dist/Tray/TrayStoriesData.d.ts +39 -0
  58. package/dist/Tray/TrayStoriesData.js +438 -0
  59. package/dist/Tray.d.ts +28 -0
  60. package/dist/Tray.js +227 -0
  61. package/dist/clsx-OuTLNxxd.js +16 -0
  62. package/dist/components/Accordion/Accordion.d.ts +37 -0
  63. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  64. package/dist/components/Badge/Badge.d.ts +12 -2
  65. package/dist/components/Badge/Badge.d.ts.map +1 -1
  66. package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
  67. package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  68. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  69. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
  70. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  71. package/dist/components/Dialog/DialogBase.d.ts +1 -1
  72. package/dist/components/HoverCard/HoverCard.d.ts +29 -0
  73. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
  74. package/dist/components/Icons/MessagesIcon.d.ts +3 -0
  75. package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
  76. package/dist/components/Icons/index.d.ts +1 -0
  77. package/dist/components/Icons/index.d.ts.map +1 -1
  78. package/dist/components/Input/Input.d.ts +2 -0
  79. package/dist/components/Input/Input.d.ts.map +1 -1
  80. package/dist/components/InputGroup/InputGroup.d.ts +16 -0
  81. package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
  82. package/dist/components/InputOTP/InputOTP.d.ts +0 -2
  83. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
  84. package/dist/components/Label/Label.d.ts +3 -7
  85. package/dist/components/Label/Label.d.ts.map +1 -1
  86. package/dist/components/Popover/Popover.d.ts +6 -7
  87. package/dist/components/Popover/Popover.d.ts.map +1 -1
  88. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  89. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  90. package/dist/components/Separator/Separator.d.ts +12 -0
  91. package/dist/components/Separator/Separator.d.ts.map +1 -0
  92. package/dist/components/Slider/Slider.d.ts +15 -3
  93. package/dist/components/Slider/Slider.d.ts.map +1 -1
  94. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  95. package/dist/components/Tray/Tray.d.ts +28 -0
  96. package/dist/components/Tray/Tray.d.ts.map +1 -0
  97. package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
  98. package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
  99. package/dist/features/AuthCard/ForgotPasswordEmailForm.js +4 -3
  100. package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
  101. package/dist/features/AuthCard/PasswordInput.js +78 -9
  102. package/dist/features/AuthCard/SignInForm.js +8 -7
  103. package/dist/features/AuthCard/SignUpForm.js +8 -7
  104. package/dist/features/AuthCard.js +2 -2
  105. package/dist/features/LabelingTools.js +7 -6
  106. package/dist/features/SensorMetadata.js +3 -2
  107. package/dist/features/SettingsPopover.js +3 -2
  108. package/dist/index-0ioNhtNM.js +10 -0
  109. package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
  110. package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
  111. package/dist/index-B2oBi8ng.js +142 -0
  112. package/dist/index-BIpuW_o8.js +146 -0
  113. package/dist/index-BZPx6jYI.js +8 -0
  114. package/dist/index-BhufZRa2.js +232 -0
  115. package/dist/index-CAKA12cC.js +1265 -0
  116. package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
  117. package/dist/index-CVSxKOPp.js +13 -0
  118. package/dist/index-CevVJ05e.js +822 -0
  119. package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
  120. package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
  121. package/dist/index-UEFPWH8U.js +54 -0
  122. package/dist/index-rKs9bXHr.js +6 -0
  123. package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
  124. package/dist/index.d.ts +10 -1
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/linear-cursor-small.png +0 -0
  127. package/dist/message-alert-matte-glass-gradient.webp +0 -0
  128. package/dist/primitives/button.d.ts +10 -0
  129. package/dist/primitives/button.d.ts.map +1 -0
  130. package/dist/primitives/button.js +42 -0
  131. package/dist/primitives/input.d.ts +3 -0
  132. package/dist/primitives/input.d.ts.map +1 -0
  133. package/dist/primitives/input.js +18 -0
  134. package/dist/primitives/select.d.ts +16 -0
  135. package/dist/primitives/select.d.ts.map +1 -0
  136. package/dist/primitives/select.js +196 -0
  137. package/dist/primitives/slot.d.ts.map +1 -1
  138. package/dist/primitives/slot.js +21 -20
  139. package/dist/primitives/textarea.d.ts +3 -0
  140. package/dist/primitives/textarea.d.ts.map +1 -0
  141. package/dist/primitives/textarea.js +16 -0
  142. package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
  143. package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
  144. package/dist/styles/main.css +1 -1
  145. package/dist/utils/formFieldUtils.js +1 -1
  146. package/dist/utils/twUtils.js +2728 -2
  147. package/package.json +13 -8
  148. package/dist/Accordion/AccordionBase.d.ts +0 -42
  149. package/dist/Accordion/AccordionBase.js +0 -225
  150. package/dist/Badge/BadgeBase.d.ts +0 -13
  151. package/dist/Badge/BadgeBase.js +0 -35
  152. package/dist/PasswordInput-ClY_hxuN.js +0 -261
  153. package/dist/components/Accordion/AccordionBase.d.ts +0 -42
  154. package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
  155. package/dist/components/Badge/BadgeBase.d.ts +0 -13
  156. package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
  157. package/dist/index-CA7haECj.js +0 -248
  158. package/dist/index-CbXx14YO.js +0 -59
  159. package/dist/index-VXXKXen4.js +0 -15
  160. package/dist/index-cCg4yNa8.js +0 -132
  161. package/dist/primitives/label.d.ts +0 -5
  162. package/dist/primitives/label.d.ts.map +0 -1
  163. package/dist/primitives/label.js +0 -27
  164. package/dist/twUtils-CRiPKpXj.js +0 -2743
package/dist/Input.js CHANGED
@@ -1,26 +1,26 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
4
- import { usePasswordVisibility as _, usePrefixWidth as q, useClearOnFocus as tt } from "./Input/InputUtils.js";
3
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
4
+ import { usePasswordVisibility as q, usePrefixWidth as tt, useClearOnFocus as et } from "./Input/InputUtils.js";
5
5
  import "./Icons/AnnotationsIcon.js";
6
6
  import "./Icons/CalendarIcon.js";
7
- import { CheckCircleIcon as et } from "./Icons/CheckCircleIcon.js";
7
+ import { CheckCircleIcon as rt } from "./Icons/CheckCircleIcon.js";
8
8
  import "./Icons/CheckSquareIcon.js";
9
9
  import "./Icons/CheckmarkIcon.js";
10
10
  import "./Icons/ChevronDownIcon.js";
11
11
  import "./Icons/ChevronUpIcon.js";
12
12
  import "./Icons/ClockIcon.js";
13
- import { CloseCircleIcon as rt } from "./Icons/CloseCircleIcon.js";
13
+ import { CloseCircleIcon as ot } from "./Icons/CloseCircleIcon.js";
14
14
  import "./Icons/CloseIcon.js";
15
15
  import "./Icons/DashboardIcon.js";
16
16
  import "./Icons/DeleteIcon.js";
17
17
  import "./Icons/DurationIcon.js";
18
18
  import "./Icons/EmailIcon.js";
19
19
  import "./Icons/EraserIcon.js";
20
- import { ErrorIcon as ot } from "./Icons/ErrorIcon.js";
21
- import { EyeClosedIcon as it } from "./Icons/EyeClosedIcon.js";
20
+ import { ErrorIcon as it } from "./Icons/ErrorIcon.js";
21
+ import { EyeClosedIcon as st } from "./Icons/EyeClosedIcon.js";
22
22
  import "./Icons/EyeClosedIcon2.js";
23
- import { EyeOpenIcon as st } from "./Icons/EyeOpenIcon.js";
23
+ import { EyeOpenIcon as at } from "./Icons/EyeOpenIcon.js";
24
24
  import "./Icons/GoToFirstIcon.js";
25
25
  import "./Icons/GoToLastIcon.js";
26
26
  import "./Icons/HarmonicCursorsIcon.js";
@@ -29,9 +29,10 @@ import "./Icons/LabelIcon.js";
29
29
  import "./Icons/LassoIcon.js";
30
30
  import "./Icons/LineToolIcon.js";
31
31
  import "./Icons/LiveViewIcon.js";
32
- import { LoaderIcon as at } from "./Icons/LoaderIcon.js";
32
+ import { LoaderIcon as nt } from "./Icons/LoaderIcon.js";
33
33
  import "./Icons/LocationIcon.js";
34
34
  import "./Icons/LogoutIcon.js";
35
+ import "./Icons/MessagesIcon.js";
35
36
  import "./Icons/MetadataIcon.js";
36
37
  import "./Icons/MinusIcon.js";
37
38
  import "./Icons/OntologyIcon.js";
@@ -49,11 +50,11 @@ import "./Icons/WarningIcon.js";
49
50
  import "./Icons/ZoomAllIcon.js";
50
51
  import "./Icons/ZoomXIcon.js";
51
52
  import "./Icons/ZoomYIcon.js";
52
- import { Label as nt } from "./Label.js";
53
- import { useFormFieldId as pt, getAriaProps as lt, getInputClasses as ct, useFormFieldState as mt, getFormFieldCSSProperties as dt, ErrorMessage as ut } from "./utils/formFieldUtils.js";
54
- import { c as d } from "./twUtils-CRiPKpXj.js";
55
- import { forwardRef as ft, useRef as ht, useCallback as u } from "react";
56
- const bt = (l) => ({
53
+ import { Label as pt } from "./Label.js";
54
+ import { useFormFieldId as lt, getAriaProps as ct, getInputClasses as mt, useFormFieldState as dt, getFormFieldCSSProperties as ut, ErrorMessage as ft } from "./utils/formFieldUtils.js";
55
+ import { cn as f } from "./utils/twUtils.js";
56
+ import { forwardRef as ht, useRef as bt, useCallback as c } from "react";
57
+ const xt = (m) => ({
57
58
  email: "email",
58
59
  password: "current-password",
59
60
  tel: "tel",
@@ -62,133 +63,141 @@ const bt = (l) => ({
62
63
  number: "off",
63
64
  date: "off",
64
65
  "datetime-local": "off"
65
- })[l] || "off", xt = ft(
66
+ })[m] || "off", gt = ht(
66
67
  ({
67
- className: l,
68
- clearOnFocus: f = !1,
68
+ className: m,
69
+ clearOnFocus: h = !1,
69
70
  disabled: k,
70
- errorMessage: h,
71
+ errorMessage: b,
71
72
  id: P,
72
- label: e,
73
- name: b,
74
- onBlur: x,
75
- onChange: g,
73
+ label: r,
74
+ name: x,
75
+ onBlur: g,
76
+ onValueChange: a,
76
77
  onFocus: C,
77
78
  placeholder: R,
78
- prefix: a,
79
+ prefix: n,
79
80
  showClearButton: S = !1,
80
81
  suppressHydrationWarning: $ = !0,
81
- state: r = "default",
82
- type: n = "text",
83
- value: w = "",
84
- required: y,
85
- startIcon: v,
82
+ state: o = "default",
83
+ type: p = "text",
84
+ value: v = "",
85
+ required: w,
86
+ startIcon: y,
86
87
  endIcon: I,
87
- "aria-label": V,
88
- "aria-describedby": L,
89
- ...M
90
- }, O) => {
91
- const p = pt(P, b), N = `${p}-error`, { isDisabled: F, isLoading: j, isInvalid: A } = mt(k, r), B = lt(r, y, N, L), H = ht(null), o = O || H, { isVisible: c, toggleVisibility: W, inputType: D } = _(), { prefixWidth: T, prefixRef: G } = q(a), { handleFocus: E } = tt(f, g), J = u(
92
- (i) => {
93
- x?.(i);
88
+ "aria-label": L,
89
+ "aria-describedby": M,
90
+ ...O
91
+ }, j) => {
92
+ const l = lt(P, x), N = `${l}-error`, { isDisabled: F, isLoading: A, isInvalid: B } = dt(k, o), H = ct(o, w, N, M), W = bt(null), i = j || W, { isVisible: d, toggleVisibility: D, inputType: T } = q(), { prefixWidth: V, prefixRef: G } = tt(n), { handleFocus: E } = et(
93
+ h,
94
+ a ? (e) => a(e.target.value) : void 0
95
+ ), J = c(
96
+ (e) => {
97
+ g?.(e);
94
98
  },
95
- [x]
96
- ), K = u(
97
- (i) => {
98
- E(i, C);
99
+ [g]
100
+ ), K = c(
101
+ (e) => {
102
+ E(e, C);
99
103
  },
100
104
  [E, C]
101
- ), Q = u(() => {
102
- o.current && (o.current.value = "", o.current.dispatchEvent(new Event("input", { bubbles: !0 })), o.current.focus());
103
- }, [o]), z = S && w.length > 0, U = () => {
104
- const i = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer", s = {
105
+ ), Q = c(
106
+ (e) => {
107
+ a?.(e.target.value);
108
+ },
109
+ [a]
110
+ ), U = c(() => {
111
+ i.current && (i.current.value = "", i.current.dispatchEvent(new Event("input", { bubbles: !0 })), i.current.focus());
112
+ }, [i]), z = S && v.length > 0, X = () => {
113
+ const e = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer", s = {
105
114
  password: () => /* @__PURE__ */ t(
106
115
  "button",
107
116
  {
108
- className: i,
117
+ className: e,
109
118
  type: "button",
110
- onClick: W,
111
- "aria-label": c ? `Hide ${e}` : `Show ${e}`,
112
- "aria-pressed": c,
113
- "aria-controls": p,
119
+ onClick: D,
120
+ "aria-label": d ? `Hide ${r}` : `Show ${r}`,
121
+ "aria-pressed": d,
122
+ "aria-controls": l,
114
123
  "data-testid": "input-password-toggle",
115
- children: c ? /* @__PURE__ */ t(it, { size: 22 }) : /* @__PURE__ */ t(st, { size: 22 })
124
+ children: d ? /* @__PURE__ */ t(st, { size: 22 }) : /* @__PURE__ */ t(at, { size: 22 })
116
125
  }
117
126
  ),
118
127
  clear: () => /* @__PURE__ */ t(
119
128
  "button",
120
129
  {
121
- className: i,
130
+ className: e,
122
131
  type: "button",
123
- onClick: Q,
124
- "aria-label": `Clear ${e}`,
132
+ onClick: U,
133
+ "aria-label": `Clear ${r}`,
125
134
  "data-testid": "input-clear-button",
126
- children: /* @__PURE__ */ t(rt, { size: 24 })
135
+ children: /* @__PURE__ */ t(ot, { size: 24 })
127
136
  }
128
137
  ),
129
- loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(at, { size: 24 }) }),
130
- error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(ot, { size: 24 }) }),
131
- success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(et, { size: 24 }) })
138
+ loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(nt, { size: 24 }) }),
139
+ error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(it, { size: 24 }) }),
140
+ success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(rt, { size: 24 }) })
132
141
  };
133
- return I || (n === "password" ? s.password() : z ? s.clear() : j ? s.loading() : r === "success" ? s.success() : r === "error" ? s.error() : null);
134
- }, X = () => v || null, Y = d(
135
- ct(r, l),
142
+ return I || (p === "password" ? s.password() : z ? s.clear() : A ? s.loading() : o === "success" ? s.success() : o === "error" ? s.error() : null);
143
+ }, Y = () => y || null, Z = f(
144
+ mt(o, m),
136
145
  "[text-indent:var(--prefix-width)]",
137
146
  z && "pr-10"
138
- ), Z = d(
147
+ ), _ = f(
139
148
  "pointer-events-none absolute inset-y-0 left-4 flex items-center text-base text-input-text-prefix opacity-100 peer-disabled:opacity-50"
140
149
  );
141
- return /* @__PURE__ */ m("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
142
- e && /* @__PURE__ */ t(
143
- nt,
150
+ return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
151
+ r && /* @__PURE__ */ t(
152
+ pt,
144
153
  {
145
- htmlFor: p,
146
- className: d(
154
+ htmlFor: l,
155
+ className: f(
147
156
  "mb-2 block",
148
157
  F && "text-input-text--disabled placeholder:text-input-text-placeholder cursor-not-allowed"
149
158
  ),
150
- children: e
159
+ children: r
151
160
  }
152
161
  ),
153
- /* @__PURE__ */ m("div", { className: "relative", "data-testid": "input-wrapper", children: [
154
- /* @__PURE__ */ m("div", { className: "relative", children: [
155
- X(),
156
- a && /* @__PURE__ */ t("span", { ref: G, className: Z, children: a }),
162
+ /* @__PURE__ */ u("div", { className: "relative", "data-testid": "input-wrapper", children: [
163
+ /* @__PURE__ */ u("div", { className: "relative", children: [
164
+ Y(),
165
+ n && /* @__PURE__ */ t("span", { ref: G, className: _, children: n }),
157
166
  /* @__PURE__ */ t(
158
167
  "input",
159
168
  {
160
- id: p,
161
- name: b,
162
- ref: o,
163
- type: n === "password" ? D : n,
164
- value: w,
169
+ id: l,
170
+ name: x,
171
+ ref: i,
172
+ type: p === "password" ? T : p,
173
+ value: v,
165
174
  disabled: F,
166
- required: y,
167
- autoComplete: bt(n),
168
- className: Y,
169
- onChange: g,
175
+ required: w,
176
+ autoComplete: xt(p),
177
+ className: Z,
178
+ onChange: Q,
170
179
  onFocus: K,
171
180
  onBlur: J,
172
- placeholder: R || e,
181
+ placeholder: R || r,
173
182
  suppressHydrationWarning: $,
174
- ...B,
175
- ...M,
183
+ ...H,
184
+ ...O,
176
185
  "data-testid": "input-input",
177
- "data-state": r,
178
- style: dt({
179
- "--prefix-width": a ? `${T}px` : "0px"
186
+ "data-state": o,
187
+ style: ut({
188
+ "--prefix-width": n ? `${V}px` : "0px"
180
189
  }),
181
- "aria-label": V || e
190
+ "aria-label": L || r
182
191
  }
183
192
  ),
184
- U()
193
+ X()
185
194
  ] }),
186
- A && h && /* @__PURE__ */ t(ut, { id: N, message: h })
195
+ B && b && /* @__PURE__ */ t(ft, { id: N, message: b })
187
196
  ] })
188
197
  ] });
189
198
  }
190
199
  );
191
- xt.displayName = "Input";
200
+ gt.displayName = "Input";
192
201
  export {
193
- xt as Input
202
+ gt as Input
194
203
  };
@@ -0,0 +1,16 @@
1
+ import { Button } from '../../primitives/button';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { ComponentProps } from 'react';
4
+ export declare const InputGroup: ({ className, ...props }: ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const inputGroupAddonVariants: (props?: ({
6
+ align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export declare const InputGroupAddon: ({ className, align, ...props }: ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const inputGroupButtonVariants: (props?: ({
10
+ size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
11
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
+ export declare const InputGroupButton: ({ className, type, variant, size, ...props }: Omit<ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const InputGroupText: ({ className, ...props }: ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const InputGroupInput: ({ className, ...props }: ComponentProps<"input">) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const InputGroupTextarea: ({ className, ...props }: ComponentProps<"textarea">) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=InputGroup.d.ts.map
@@ -0,0 +1,129 @@
1
+ import "./styles/main.css";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { Button as u } from "./primitives/button.js";
4
+ import { Input as p } from "./primitives/input.js";
5
+ import { Textarea as l } from "./primitives/textarea.js";
6
+ import { cn as e } from "./utils/twUtils.js";
7
+ import { c as s } from "./index-D29mdTf5.js";
8
+ import "react";
9
+ const k = ({ className: r, ...t }) => /* @__PURE__ */ n(
10
+ "div",
11
+ {
12
+ "data-slot": "input-group",
13
+ role: "group",
14
+ className: e(
15
+ "group/input-group border-input-border relative flex w-full items-center rounded-[var(--radius,0.375rem)] border shadow-xs transition-[color,box-shadow] outline-none",
16
+ "h-9 min-w-0 has-[>textarea]:h-auto",
17
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
18
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
19
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
20
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
21
+ "has-[[data-slot=input-group-control]:focus-visible]:border-input-border has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
22
+ "has-[[data-slot][aria-invalid=true]]:ring-danger/20 has-[[data-slot][aria-invalid=true]]:border-danger",
23
+ r
24
+ ),
25
+ ...t
26
+ }
27
+ ), d = s(
28
+ `text-text-secondary flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4
29
+ [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50`,
30
+ {
31
+ variants: {
32
+ align: {
33
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
34
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
35
+ "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
36
+ "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ align: "inline-start"
41
+ }
42
+ }
43
+ ), y = ({
44
+ className: r,
45
+ align: t = "inline-start",
46
+ ...o
47
+ }) => /* @__PURE__ */ n(
48
+ "div",
49
+ {
50
+ role: "group",
51
+ "data-slot": "input-group-addon",
52
+ "data-align": t,
53
+ className: e(d({ align: t }), r),
54
+ onClick: (a) => {
55
+ a.target.closest("button") || a.currentTarget.parentElement?.querySelector("input")?.focus();
56
+ },
57
+ onKeyDown: (a) => {
58
+ if (a.key === "Enter" || a.key === " ") {
59
+ if (a.target.closest("button"))
60
+ return;
61
+ a.preventDefault(), a.currentTarget.parentElement?.querySelector("input")?.focus();
62
+ }
63
+ },
64
+ ...o
65
+ }
66
+ ), c = s("text-sm shadow-none flex gap-2 items-center", {
67
+ variants: {
68
+ size: {
69
+ xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
70
+ sm: "h-8 px-2.5 gap-1.5 rounded-[var(--radius,0.375rem)] has-[>svg]:px-2.5",
71
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
72
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0 rounded-[var(--radius,0.375rem)]"
73
+ }
74
+ },
75
+ defaultVariants: {
76
+ size: "xs"
77
+ }
78
+ }), z = ({
79
+ className: r,
80
+ type: t = "button",
81
+ variant: o = "ghost",
82
+ size: a = "xs",
83
+ ...i
84
+ }) => /* @__PURE__ */ n(
85
+ u,
86
+ {
87
+ type: t,
88
+ "data-size": a,
89
+ variant: o,
90
+ className: e(c({ size: a }), r),
91
+ ...i
92
+ }
93
+ ), w = ({ className: r, ...t }) => /* @__PURE__ */ n(
94
+ "span",
95
+ {
96
+ className: e(
97
+ "text-input-text flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
98
+ r
99
+ ),
100
+ ...t
101
+ }
102
+ ), G = ({ className: r, ...t }) => /* @__PURE__ */ n(
103
+ p,
104
+ {
105
+ "data-slot": "input-group-control",
106
+ className: e("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0", r),
107
+ ...t
108
+ }
109
+ ), I = ({ className: r, ...t }) => /* @__PURE__ */ n(
110
+ l,
111
+ {
112
+ "data-slot": "input-group-control",
113
+ className: e(
114
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0",
115
+ r
116
+ ),
117
+ ...t
118
+ }
119
+ );
120
+ export {
121
+ k as InputGroup,
122
+ y as InputGroupAddon,
123
+ z as InputGroupButton,
124
+ G as InputGroupInput,
125
+ w as InputGroupText,
126
+ I as InputGroupTextarea,
127
+ d as inputGroupAddonVariants,
128
+ c as inputGroupButtonVariants
129
+ };
@@ -5,8 +5,6 @@ type InputOTPRootProps = Omit<OTPInputProps, 'textAlign' | 'pushPasswordManagerS
5
5
  className?: string;
6
6
  separator?: boolean;
7
7
  variant?: 'outlined' | 'filled';
8
- groupSize?: number;
9
- separatorPositions?: number[];
10
8
  };
11
9
  export type InputOTPProps = InputOTPRootProps & ({
12
10
  value: number | string;