@pibit.ai/cure-design-system 0.5.2 → 0.5.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,IAAI,kBAAkB,EACrC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAqB3E,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8IAA8I;IAC9I,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACvD,gEAAgE;IAChE,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC/D,2DAA2D;IAC3D,cAA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CAAC,aAAa,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;uUAyBnB,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;;CAgVxC,CAAC;AAIF,UAAU,SAAS;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cACf,SACE,SAAS,EACT,kBAAkB,EAClB,IAAI,CACF,cAAc,EACZ,MAAM,GACN,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,CACrB;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAID,eAAO,MAAM,SAAS;8BAA6B,cAAc;;CAehE,CAAC;AAIF,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,SAAS;IAC3D,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,oDAAoD;IACpD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IACtE,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,sCAAsC;IACtC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC,6BAA6B;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK;wXA6Bf,UAAU;;CAqFZ,CAAC"}
@@ -1,55 +1,57 @@
1
- import { jsx as r, jsxs as R, Fragment as Y } from "react/jsx-runtime";
2
- import { Group as Z, Input as A, TextField as W } from "react-aria-components";
3
- import { cx as i, sortCx as D } from "../../utils/cn.js";
4
- import { useState as H, useContext as ee, createContext as re, useEffect as ae } from "react";
5
- import { HintText as G } from "./hint-text.js";
6
- import { EyeOff as te, Eye as ie, XClose as se, HelpCircle as le, InfoCircle as ne } from "@untitledui/icons";
7
- import { Label as oe } from "./label.js";
8
- import { Tooltip as de, TooltipTrigger as pe } from "../tooltip/tooltip.js";
9
- import { getPlatformShortcutLabel as ue } from "../../utils/keyboard-shortcut.js";
10
- import { Badge as ge } from "../badge/badge.js";
11
- const X = {
1
+ import { jsx as r, jsxs as B, Fragment as Q } from "react/jsx-runtime";
2
+ import { Group as D, Input as ee, TextField as re } from "react-aria-components";
3
+ import { cx as i, sortCx as ae } from "../../utils/cn.js";
4
+ import { useState as I, useContext as te, createContext as ie, useEffect as se } from "react";
5
+ import { HintText as J } from "./hint-text.js";
6
+ import { EyeOff as ne, Eye as le, XClose as oe, HelpCircle as de, InfoCircle as pe } from "@untitledui/icons";
7
+ import { Label as ue } from "./label.js";
8
+ import { Tooltip as ge, TooltipTrigger as me } from "../tooltip/tooltip.js";
9
+ import { getPlatformShortcutLabel as fe } from "../../utils/keyboard-shortcut.js";
10
+ import { Badge as ce } from "../badge/badge.js";
11
+ const M = {
12
12
  sm: "text-xs",
13
13
  md: "text-sm",
14
14
  lg: "text-md"
15
- }, me = {
15
+ }, he = {
16
16
  sm: "text-xs",
17
17
  md: "text-xs",
18
18
  lg: "text-sm"
19
- }, J = ({
20
- ref: o,
19
+ }, U = ({
20
+ ref: d,
21
21
  isReadOnly: f,
22
22
  tooltip: c,
23
- shortcut: N,
23
+ shortcut: T,
24
24
  groupRef: C,
25
- size: _ = "sm",
25
+ size: j = "sm",
26
26
  isInvalid: h,
27
- isDisabled: u,
27
+ isDisabled: g,
28
28
  icon: v,
29
29
  iconTrailing: x,
30
- placeholder: B,
31
- wrapperClassName: E,
32
- tooltipClassName: j,
33
- inputClassName: k,
34
- iconClassName: L,
35
- trailingAction: T,
36
- trailingIconCount: g,
37
- mode: m,
30
+ placeholder: L,
31
+ wrapperClassName: $,
32
+ tooltipClassName: R,
33
+ inputClassName: E,
34
+ iconClassName: F,
35
+ trailingAction: z,
36
+ trailingSlot: w,
37
+ trailingIconCount: p,
38
+ mode: y,
38
39
  // Omit this prop to avoid invalid HTML attribute warning
39
- isRequired: V,
40
- customStyles: F,
41
- ...P
40
+ isRequired: X,
41
+ customStyles: K,
42
+ showInfoIcon: P = !0,
43
+ ...O
42
44
  }) => {
43
- const z = c || h || x || T, q = v, [w, y] = H([]), [d, b] = H(""), e = ee(M), s = (e == null ? void 0 : e.size) || _, l = D({
45
+ const b = !!w, N = !b && (c || h || x || z || P), q = v, [_, o] = I([]), [m, k] = I(""), e = te(Y), s = (e == null ? void 0 : e.size) || j, n = ae({
44
46
  sm: {
45
47
  root: i(
46
- "p-2 h-8",
47
- z && "pr-9",
48
+ b ? "min-w-0 flex-1 px-3 py-2" : "p-2 h-8",
49
+ N && "pr-9",
48
50
  q && "pl-10",
49
- g && "pr-16"
51
+ p && "pr-16"
50
52
  ),
51
53
  iconLeading: "left-3 size-4",
52
- trailingIconCount: g === 2 ? "right-6 size-4" : "",
54
+ trailingIconCount: p === 2 ? "right-6 size-4" : "",
53
55
  iconTrailing: "right-3 size-4",
54
56
  shortcut: "pr-2.5",
55
57
  tags: "flex gap-1",
@@ -58,13 +60,13 @@ const X = {
58
60
  },
59
61
  md: {
60
62
  root: i(
61
- "px-3 py-2 h-9",
62
- z && "pr-9.5",
63
+ b ? "min-w-0 flex-1 px-3 py-2" : "px-3 py-2 h-9",
64
+ N && "pr-9.5",
63
65
  q && "pl-10.5",
64
- g && "pr-16"
66
+ p && "pr-16"
65
67
  ),
66
68
  iconLeading: "left-3.5",
67
- trailingIconCount: g === 2 ? "right-6.5" : "",
69
+ trailingIconCount: p === 2 ? "right-6.5" : "",
68
70
  iconTrailing: "right-3.5",
69
71
  shortcut: "pr-3",
70
72
  tags: "flex gap-1",
@@ -73,80 +75,90 @@ const X = {
73
75
  },
74
76
  lg: {
75
77
  root: i(
76
- "px-3.5 py-2.5 h-11",
77
- z && "pr-10",
78
+ b ? "min-w-0 flex-1 px-3.5 py-2.5" : "px-3.5 py-2.5 h-11",
79
+ N && "pr-10",
78
80
  q && "pl-11",
79
- g && "pr-18"
81
+ p && "pr-18"
80
82
  ),
81
83
  iconLeading: "left-4 size-5",
82
- trailingIconCount: g === 2 ? "right-7 size-5" : "",
84
+ trailingIconCount: p === 2 ? "right-7 size-5" : "",
83
85
  iconTrailing: "right-4 size-5",
84
86
  shortcut: "pr-3.5",
85
87
  tags: "flex gap-1",
86
88
  tag: "rounded-md bg-primary border border-secondary p-2.5",
87
89
  wrapper: "rounded-lg"
88
90
  }
89
- }), $ = () => {
91
+ }), H = () => {
90
92
  var t;
91
- const a = d.trim();
93
+ const a = m.trim();
92
94
  a && ((t = e == null ? void 0 : e.onChange) == null || t.call(
93
95
  e,
94
96
  e != null && e.value ? (e == null ? void 0 : e.value) + "," + a : a
95
- ), y((n) => [...n, a]), b(""));
96
- }, I = (a) => {
97
- var t, n, K;
98
- if (m === "tag") {
97
+ ), o((l) => [...l, a]), k(""));
98
+ }, S = (a) => {
99
+ var t, l, V;
100
+ if (y === "tag") {
99
101
  if (a.key === "Enter" || a.key === ",") {
100
102
  a.preventDefault();
101
- const p = d.trim();
102
- p && ((t = e == null ? void 0 : e.onChange) == null || t.call(
103
+ const u = m.trim();
104
+ u && ((t = e == null ? void 0 : e.onChange) == null || t.call(
103
105
  e,
104
- e != null && e.value ? (e == null ? void 0 : e.value) + "," + p : p
105
- ), y((O) => [...O, p]), b(""));
106
+ e != null && e.value ? (e == null ? void 0 : e.value) + "," + u : u
107
+ ), o((G) => [...G, u]), k(""));
106
108
  }
107
- if (a.key === "Backspace" && !d)
109
+ if (a.key === "Backspace" && !m)
108
110
  if (e != null && e.value) {
109
- const p = e.value.split(",").map((O) => O.trim()).filter(Boolean);
110
- p.pop(), (n = e.onChange) == null || n.call(e, p.join(", "));
111
+ const u = e.value.split(",").map((G) => G.trim()).filter(Boolean);
112
+ u.pop(), (l = e.onChange) == null || l.call(e, u.join(", "));
111
113
  } else
112
- (K = e == null ? void 0 : e.onChange) == null || K.call(e, "");
114
+ (V = e == null ? void 0 : e.onChange) == null || V.call(e, "");
113
115
  }
114
- }, S = (a) => {
116
+ }, A = (a) => {
115
117
  const t = a.target.value;
116
- m === "tag" && b(t);
117
- }, U = (a) => {
118
- var n;
119
- const t = w.filter((K, p) => p !== a);
120
- y(t), (n = e == null ? void 0 : e.onChange) == null || n.call(e, t.join(", "));
118
+ y === "tag" && k(t);
119
+ }, W = (a) => {
120
+ var l;
121
+ const t = _.filter((V, u) => u !== a);
122
+ o(t), (l = e == null ? void 0 : e.onChange) == null || l.call(e, t.join(", "));
121
123
  };
122
- return ae(() => {
123
- if (m === "tag")
124
+ return se(() => {
125
+ if (y === "tag")
124
126
  if (e != null && e.value) {
125
127
  const a = e.value.split(",").map((t) => t.trim()).filter(Boolean);
126
- y(a);
128
+ o(a);
127
129
  } else
128
- y([]);
129
- }, [e == null ? void 0 : e.value]), /* @__PURE__ */ R(
130
- Z,
130
+ o([]);
131
+ }, [e == null ? void 0 : e.value]), /* @__PURE__ */ B(
132
+ D,
131
133
  {
132
- isDisabled: u,
134
+ isDisabled: g,
133
135
  isInvalid: h,
134
136
  ref: C,
135
- className: ({ isFocusWithin: a, isDisabled: t, isInvalid: n }) => i(
136
- "relative flex w-full flex-row place-content-center place-items-center bg-primary border border-secondary duration-100 ease-linear",
137
- a && !t && !f && "ring-1 ring-brand",
137
+ className: ({ isFocusWithin: a, isDisabled: t, isInvalid: l }) => i(
138
+ // Frozen to platform-ui's Input, which is the one users see today. The
139
+ // trailing slot has to be able to reach the group's edge, so the group
140
+ // clips its children and stretches them instead of centring them.
141
+ "relative flex w-full flex-row place-content-center bg-primary border border-secondary duration-100 ease-linear overflow-hidden",
142
+ b ? "items-stretch" : "place-items-center",
143
+ // The focus ring is drawn inside the border, so it does not add a pixel
144
+ // to the control's outer size when the field is focused.
145
+ a && !t && !f && "ring-1 ring-inset ring-brand",
138
146
  // Disabled state styles
139
147
  t && "cursor-not-allowed bg-disabled_subtle ring-disabled",
140
148
  "group-disabled:cursor-not-allowed group-disabled:bg-disabled_subtle group-disabled:ring-disabled",
141
- // Invalid state styles
142
- n && "ring-error_subtle",
143
- "group-invalid:ring-error_subtle",
149
+ // Invalid state styles. The border colour changes too, not just the ring:
150
+ // on a field with no focus the ring alone is nearly invisible.
151
+ l && "border-error ring-error_subtle",
152
+ "group-invalid:border-error group-invalid:ring-error_subtle",
144
153
  // Invalid state with focus-within styles
145
- n && a && "ring-2 ring-error",
154
+ l && a && "ring-2 ring-error",
146
155
  a && "group-invalid:ring-2 group-invalid:ring-error",
147
156
  e == null ? void 0 : e.wrapperClassName,
148
- E,
149
- l[s].wrapper
157
+ // The caller's class comes last so it wins. Reversed, a caller passing
158
+ // `rounded-full` loses to the size's own `rounded-md` and silently does
159
+ // nothing — which is what platform-ui's 70 call sites rely on not happening.
160
+ n[s].wrapper,
161
+ $
150
162
  ),
151
163
  children: [
152
164
  v && /* @__PURE__ */ r(
@@ -154,30 +166,30 @@ const X = {
154
166
  {
155
167
  className: i(
156
168
  "pointer-events-none absolute size-5 text-fg-quaternary",
157
- u && "text-fg-disabled",
158
- l[s].iconLeading,
169
+ g && "text-fg-disabled",
170
+ n[s].iconLeading,
159
171
  e == null ? void 0 : e.iconClassName,
160
- L
172
+ F
161
173
  )
162
174
  }
163
175
  ),
164
- m === "tag" && /* @__PURE__ */ R(
176
+ y === "tag" && /* @__PURE__ */ B(
165
177
  "div",
166
178
  {
167
179
  className: i(
168
180
  "flex flex-wrap w-full items-center justify-start gap-1 pl-1.5",
169
- u && "text-fg-disabled"
181
+ g && "text-fg-disabled"
170
182
  ),
171
183
  children: [
172
- w.map((a, t) => (
184
+ _.map((a, t) => (
173
185
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
174
- /* @__PURE__ */ r("div", { onClick: (n) => n.stopPropagation(), children: /* @__PURE__ */ R(ge, { className: "rounded-md bg-primary border border-secondary px-2 py-1 pointer-events-auto!", children: [
186
+ /* @__PURE__ */ r("div", { onClick: (l) => l.stopPropagation(), children: /* @__PURE__ */ B(ce, { className: "rounded-md bg-primary border border-secondary px-2 py-1 pointer-events-auto!", children: [
175
187
  a,
176
188
  /* @__PURE__ */ r(
177
- se,
189
+ oe,
178
190
  {
179
191
  className: "size-4 cursor-pointer text-fg-quaternary hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover",
180
- onClick: () => U(t)
192
+ onClick: () => W(t)
181
193
  }
182
194
  )
183
195
  ] }) }, `${a}-${t}`)
@@ -186,91 +198,101 @@ const X = {
186
198
  "input",
187
199
  {
188
200
  type: "text",
189
- value: d,
190
- onChange: S,
191
- onKeyDown: I,
192
- placeholder: w.length === 0 ? B : "",
193
- disabled: u,
194
- onBlur: $,
201
+ value: m,
202
+ onChange: A,
203
+ onKeyDown: S,
204
+ placeholder: _.length === 0 ? L : "",
205
+ disabled: g,
206
+ onBlur: H,
195
207
  className: i(
196
208
  "bg-transparent outline-none flex-1 min-w-[50px] w-full text-primary placeholder:text-placeholder_subtle",
197
209
  "disabled:cursor-not-allowed disabled:text-disabled group-disabled:pointer-events-none",
198
- l[s].root,
199
- X[s],
200
- k
210
+ n[s].root,
211
+ M[s],
212
+ E
201
213
  )
202
214
  }
203
215
  )
204
216
  ]
205
217
  }
206
218
  ),
207
- m !== "tag" && /* @__PURE__ */ r(
208
- A,
219
+ y !== "tag" && /* @__PURE__ */ r(
220
+ ee,
209
221
  {
210
- ...P,
211
- ref: o,
212
- placeholder: B,
222
+ ...O,
223
+ ref: d,
224
+ placeholder: L,
213
225
  className: i(
214
226
  "m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder_subtle autofill:rounded-lg autofill:text-primary",
215
227
  "disabled:cursor-not-allowed disabled:text-disabled group-disabled:pointer-events-none",
216
- l[s].root,
217
- X[s],
228
+ n[s].root,
229
+ M[s],
218
230
  e == null ? void 0 : e.inputClassName,
219
- k
231
+ E
220
232
  ),
221
- style: { ...F }
233
+ style: { ...K }
222
234
  }
223
235
  ),
224
- T && !x && /* @__PURE__ */ r(
236
+ w && /* @__PURE__ */ B(Q, { children: [
237
+ /* @__PURE__ */ r(
238
+ "div",
239
+ {
240
+ className: "w-px shrink-0 self-stretch bg-secondary",
241
+ "aria-hidden": "true"
242
+ }
243
+ ),
244
+ /* @__PURE__ */ r("div", { className: "flex shrink-0 items-stretch", children: w })
245
+ ] }),
246
+ z && !x && !w && /* @__PURE__ */ r(
225
247
  "div",
226
248
  {
227
249
  className: i(
228
250
  "absolute flex items-center justify-center",
229
- l[s].iconTrailing,
230
- l[s].trailingIconCount
251
+ n[s].iconTrailing,
252
+ n[s].trailingIconCount
231
253
  ),
232
- children: T
254
+ children: z
233
255
  }
234
256
  ),
235
- c && !h && /* @__PURE__ */ r(de, { title: c, placement: "top", children: /* @__PURE__ */ r(
236
- pe,
257
+ c && !h && /* @__PURE__ */ r(ge, { title: c, placement: "top", children: /* @__PURE__ */ r(
258
+ me,
237
259
  {
238
260
  className: i(
239
261
  "absolute cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover",
240
- l[s].iconTrailing,
262
+ n[s].iconTrailing,
241
263
  e == null ? void 0 : e.tooltipClassName,
242
- j
264
+ R
243
265
  ),
244
- children: /* @__PURE__ */ r(le, { className: "size-4" })
266
+ children: /* @__PURE__ */ r(de, { className: "size-4" })
245
267
  }
246
268
  ) }),
247
- h && /* @__PURE__ */ r(
248
- ne,
269
+ h && P && /* @__PURE__ */ r(
270
+ pe,
249
271
  {
250
272
  className: i(
251
273
  "pointer-events-none absolute size-4 text-fg-error-secondary",
252
- l[s].iconTrailing,
274
+ n[s].iconTrailing,
253
275
  e == null ? void 0 : e.tooltipClassName,
254
- j
276
+ R
255
277
  )
256
278
  }
257
279
  ),
258
- N && /* @__PURE__ */ r(
280
+ T && /* @__PURE__ */ r(
259
281
  "div",
260
282
  {
261
283
  className: i(
262
284
  "pointer-events-none absolute inset-y-0.5 right-0.5 z-10 flex items-center rounded-r-[inherit] bg-linear-to-r from-transparent pl-8",
263
- l[s].shortcut
285
+ n[s].shortcut
264
286
  ),
265
287
  children: /* @__PURE__ */ r(
266
288
  "span",
267
289
  {
268
290
  className: i(
269
291
  "pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset",
270
- u && "bg-transparent text-disabled"
292
+ g && "bg-transparent text-disabled"
271
293
  ),
272
294
  "aria-hidden": "true",
273
- children: typeof N == "string" ? N : ue(["meta"], "K")
295
+ children: typeof T == "string" ? T : fe(["meta"], "K")
274
296
  }
275
297
  )
276
298
  }
@@ -280,10 +302,10 @@ const X = {
280
302
  {
281
303
  className: i(
282
304
  "pointer-events-none absolute size-5 text-fg-quaternary",
283
- u && "text-fg-disabled",
284
- l[s].iconTrailing,
305
+ g && "text-fg-disabled",
306
+ n[s].iconTrailing,
285
307
  e == null ? void 0 : e.iconClassName,
286
- L
308
+ F
287
309
  )
288
310
  }
289
311
  )
@@ -291,108 +313,112 @@ const X = {
291
313
  }
292
314
  );
293
315
  };
294
- J.displayName = "InputBase";
295
- const M = re({}), Q = ({ className: o, ...f }) => /* @__PURE__ */ r(M.Provider, { value: f, children: /* @__PURE__ */ r(
296
- W,
316
+ U.displayName = "InputBase";
317
+ const Y = ie({}), Z = ({ className: d, ...f }) => /* @__PURE__ */ r(Y.Provider, { value: f, children: /* @__PURE__ */ r(
318
+ re,
297
319
  {
298
320
  ...f,
299
321
  "data-input-wrapper": !0,
300
322
  className: (c) => i(
301
323
  "group flex h-max w-full flex-col items-start justify-start gap-1.5",
302
- typeof o == "function" ? o(c) : o
324
+ typeof d == "function" ? d(c) : d
303
325
  )
304
326
  }
305
327
  ) });
306
- Q.displayName = "TextField";
307
- const fe = ({
308
- size: o = "sm",
328
+ Z.displayName = "TextField";
329
+ const ye = ({
330
+ size: d = "sm",
309
331
  placeholder: f,
310
332
  icon: c,
311
- iconTrailing: N,
333
+ iconTrailing: T,
312
334
  label: C,
313
- supportingText: _,
335
+ supportingText: j,
314
336
  hint: h,
315
- shortcut: u,
337
+ shortcut: g,
316
338
  hideRequiredIndicator: v,
317
339
  className: x,
318
- ref: B,
319
- groupRef: E,
320
- tooltip: j,
321
- iconClassName: k,
322
- inputClassName: L,
323
- wrapperClassName: T,
324
- tooltipClassName: g,
325
- inputType: m = "text",
326
- customStyles: V = {},
327
- containerStyles: F = {},
328
- trailingAction: P,
329
- trailingIconCount: z,
330
- mode: q,
331
- isDisabled: w,
332
- isInvalid: y,
333
- ...d
340
+ ref: L,
341
+ groupRef: $,
342
+ tooltip: R,
343
+ iconClassName: E,
344
+ inputClassName: F,
345
+ wrapperClassName: z,
346
+ tooltipClassName: w,
347
+ inputType: p = "text",
348
+ customStyles: y = {},
349
+ containerStyles: X = {},
350
+ trailingAction: K,
351
+ trailingSlot: P,
352
+ trailingIconCount: O,
353
+ mode: b,
354
+ isDisabled: N,
355
+ isInvalid: q,
356
+ showInfoIcon: _ = !0,
357
+ ...o
334
358
  }) => {
335
- const [b, e] = H(!1), s = m === "password", l = s ? b ? "text" : "password" : m, $ = d == null ? void 0 : d.isReadOnly;
359
+ const [m, k] = I(!1), e = p === "password", s = e ? m ? "text" : "password" : p, n = o == null ? void 0 : o.isReadOnly;
336
360
  return /* @__PURE__ */ r(
337
- Q,
361
+ Z,
338
362
  {
339
- style: F,
363
+ style: X,
340
364
  "aria-label": C ? void 0 : f,
341
- ...d,
342
- isDisabled: w,
343
- isInvalid: y,
365
+ ...o,
366
+ isDisabled: N,
367
+ isInvalid: q,
344
368
  className: x,
345
- children: ({ isRequired: I, isInvalid: S }) => /* @__PURE__ */ R(Y, { children: [
369
+ children: ({ isRequired: H, isInvalid: S }) => /* @__PURE__ */ B(Q, { children: [
346
370
  C && /* @__PURE__ */ r(
347
- oe,
371
+ ue,
348
372
  {
349
- className: i("color-text-label", me[o]),
350
- isRequired: v ? !v : I,
373
+ className: i("color-text-label", he[d]),
374
+ isRequired: v ? !v : H,
351
375
  children: C
352
376
  }
353
377
  ),
354
- _ && /* @__PURE__ */ r(G, { className: "mt-[-5px] text-tertiary!", isInvalid: !1, children: _ }),
378
+ j && /* @__PURE__ */ r(J, { className: "mt-[-5px] text-tertiary!", isInvalid: !1, children: j }),
355
379
  /* @__PURE__ */ r(
356
- J,
380
+ U,
357
381
  {
358
- ref: B,
359
- groupRef: E,
360
- size: o,
382
+ ref: L,
383
+ groupRef: $,
384
+ size: d,
361
385
  placeholder: f,
362
- isReadOnly: $,
363
- isDisabled: w,
386
+ isReadOnly: n,
387
+ isDisabled: N,
364
388
  isInvalid: S,
365
389
  icon: c,
366
- iconTrailing: N,
367
- shortcut: u,
368
- iconClassName: k,
369
- inputClassName: L,
370
- wrapperClassName: T,
371
- tooltipClassName: g,
372
- tooltip: j,
373
- type: l,
374
- customStyles: V,
375
- mode: q,
376
- trailingAction: s ? /* @__PURE__ */ r(
390
+ iconTrailing: T,
391
+ shortcut: g,
392
+ iconClassName: E,
393
+ inputClassName: F,
394
+ wrapperClassName: z,
395
+ tooltipClassName: w,
396
+ tooltip: R,
397
+ type: s,
398
+ customStyles: y,
399
+ mode: b,
400
+ trailingAction: e ? /* @__PURE__ */ r(
377
401
  "button",
378
402
  {
379
403
  type: "button",
380
- onClick: () => e(!b),
404
+ onClick: () => k(!m),
381
405
  className: "text-fg-quaternary hover:text-fg-quaternary_hover focus:outline-none",
382
- children: b ? /* @__PURE__ */ r(te, { className: "size-5" }) : /* @__PURE__ */ r(ie, { className: "size-5" })
406
+ children: m ? /* @__PURE__ */ r(ne, { className: "size-5" }) : /* @__PURE__ */ r(le, { className: "size-5" })
383
407
  }
384
- ) : P,
385
- trailingIconCount: z
408
+ ) : K,
409
+ trailingSlot: P,
410
+ trailingIconCount: O,
411
+ showInfoIcon: _
386
412
  }
387
413
  ),
388
- h && /* @__PURE__ */ r(G, { size: o, isInvalid: S, children: h })
414
+ h && /* @__PURE__ */ r(J, { size: d, isInvalid: S, children: h })
389
415
  ] })
390
416
  }
391
417
  );
392
418
  };
393
- fe.displayName = "Input";
419
+ ye.displayName = "Input";
394
420
  export {
395
- fe as Input,
396
- J as InputBase,
397
- Q as TextField
421
+ ye as Input,
422
+ U as InputBase,
423
+ Z as TextField
398
424
  };