@arcadeai/design-system 3.39.4 → 3.41.1

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 (35) hide show
  1. package/dist/assets/icons/forkable.js +10 -0
  2. package/dist/assets/index.css +1 -1
  3. package/dist/assets/tokens.css +1 -1
  4. package/dist/assets/variables.css +1 -1
  5. package/dist/components/index.js +470 -465
  6. package/dist/components/ui/atoms/badge.js +5 -5
  7. package/dist/components/ui/atoms/button.js +1 -1
  8. package/dist/components/ui/atoms/icons/forkable.d.ts +4 -0
  9. package/dist/components/ui/atoms/icons/forkable.d.ts.map +1 -0
  10. package/dist/components/ui/atoms/icons/forkable.js +31 -0
  11. package/dist/components/ui/atoms/icons/index.d.ts +1 -0
  12. package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
  13. package/dist/components/ui/atoms/icons/index.js +220 -218
  14. package/dist/components/ui/atoms/index.js +369 -367
  15. package/dist/components/ui/atoms/switch.js +19 -19
  16. package/dist/components/ui/index.js +470 -465
  17. package/dist/components/ui/molecules/date-time-picker.js +1 -1
  18. package/dist/components/ui/molecules/index.d.ts +2 -0
  19. package/dist/components/ui/molecules/index.d.ts.map +1 -1
  20. package/dist/components/ui/molecules/index.js +30 -27
  21. package/dist/components/ui/molecules/steps-progress.d.ts +3 -1
  22. package/dist/components/ui/molecules/steps-progress.d.ts.map +1 -1
  23. package/dist/components/ui/molecules/steps-progress.js +153 -112
  24. package/dist/components/ui/molecules/tags-input.d.ts +44 -0
  25. package/dist/components/ui/molecules/tags-input.d.ts.map +1 -0
  26. package/dist/components/ui/molecules/tags-input.js +139 -0
  27. package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
  28. package/dist/components/ui/molecules/tool-card.js +19 -22
  29. package/dist/components/ui/pages/login-page.js +13 -13
  30. package/dist/main.js +487 -482
  31. package/dist/metadata/toolkit-icons.d.ts.map +1 -1
  32. package/dist/metadata/toolkit-icons.js +158 -156
  33. package/dist/metadata/toolkits.d.ts.map +1 -1
  34. package/dist/metadata/toolkits.js +13 -0
  35. package/package.json +7 -7
@@ -33,7 +33,7 @@ function P({
33
33
  }
34
34
  ),
35
35
  children: [
36
- e ? e.toLocaleDateString() : "Select date",
36
+ /* @__PURE__ */ r("span", { children: e ? e.toLocaleDateString() : "Select date" }),
37
37
  /* @__PURE__ */ r(u, {})
38
38
  ]
39
39
  }
@@ -21,6 +21,8 @@ export type { Step, StepStatus, StepsProgressProps } from './steps-progress';
21
21
  export { StepsProgress } from './steps-progress';
22
22
  export type { SuggestionCardProps, SuggestionCardSkeletonProps, } from './suggestion-card';
23
23
  export { SuggestionCard, SuggestionCardSkeleton } from './suggestion-card';
24
+ export type { TagsInputProps, TagsInputValidationResult, TagsInputValueProps, } from './tags-input';
25
+ export { TagsInput, TagsInputValue } from './tags-input';
24
26
  export type { ToolAuthorizationArgsProps, ToolAuthorizationHeaderProps, ToolAuthorizationMessageProps, ToolAuthorizationProps, ToolAuthorizationStatus, } from './tool-authorization';
25
27
  export { ToolAuthorization, ToolAuthorizationArgs, ToolAuthorizationContent, ToolAuthorizationHeader, ToolAuthorizationMessage, } from './tool-authorization';
26
28
  export type { ToolCallAccordionContentProps, ToolCallAccordionItemProps, ToolCallAccordionProps, ToolCallAccordionTriggerProps, ToolCallState, ToolCallView, } from './tool-call-accordion';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,sBAAsB,E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,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC7B,aAAa,EACb,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/index.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE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iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC7B,aAAa,EACb,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
@@ -1,35 +1,36 @@
1
1
  import { ChatHistoryItem as r } from "./chat-history-item.js";
2
- import { ChatAssistantMessage as a, ChatMessageList as s, ChatMessageListSkeleton as n, ChatStreamingIndicator as i, ChatUserMessage as m } from "./chat-message-list.js";
2
+ import { ChatAssistantMessage as a, ChatMessageList as s, ChatMessageListSkeleton as n, ChatStreamingIndicator as i, ChatUserMessage as p } from "./chat-message-list.js";
3
3
  import { ClientSecretInput as l } from "./client-secret-field.js";
4
4
  import { CommandBar as C } from "./command-bar.js";
5
5
  import { ConfirmPopover as x } from "./confirm-popover.js";
6
- import { DateTimePicker as c } from "./date-time-picker.js";
7
- import { EmptyState as u } from "./empty-state.js";
6
+ import { DateTimePicker as u } from "./date-time-picker.js";
7
+ import { EmptyState as c } from "./empty-state.js";
8
8
  import { ErrorState as h } from "./error-state.js";
9
- import { Message as S, MessageAction as I, MessageActions as P, MessageAvatar as z, MessageContent as k } from "./message.js";
9
+ import { Message as M, MessageAction as S, MessageActions as P, MessageAvatar as z, MessageContent as k } from "./message.js";
10
10
  import { PromptInput as y, PromptInputAction as B, PromptInputActions as E, PromptInputTextarea as H } from "./prompt-input.js";
11
11
  import { R, T as U } from "../../../toolkit-card-Dc104Z9e.js";
12
12
  import { StepsProgress as D } from "./steps-progress.js";
13
- import { SuggestionCard as b, SuggestionCardSkeleton as j } from "./suggestion-card.js";
14
- import { ToolAuthorization as F, ToolAuthorizationArgs as G, ToolAuthorizationContent as J, ToolAuthorizationHeader as K, ToolAuthorizationMessage as O } from "./tool-authorization.js";
15
- import { ToolCallAccordion as V, ToolCallAccordionContent as W, ToolCallAccordionItem as X, ToolCallAccordionTrigger as Y } from "./tool-call-accordion.js";
16
- import { ToolCard as _ } from "./tool-card.js";
17
- import { UserNav as oo } from "./user-nav.js";
13
+ import { SuggestionCard as V, SuggestionCardSkeleton as b } from "./suggestion-card.js";
14
+ import { TagsInput as w, TagsInputValue as F } from "./tags-input.js";
15
+ import { ToolAuthorization as J, ToolAuthorizationArgs as K, ToolAuthorizationContent as O, ToolAuthorizationHeader as Q, ToolAuthorizationMessage as W } from "./tool-authorization.js";
16
+ import { ToolCallAccordion as Y, ToolCallAccordionContent as Z, ToolCallAccordionItem as _, ToolCallAccordionTrigger as $ } from "./tool-call-accordion.js";
17
+ import { ToolCard as to } from "./tool-card.js";
18
+ import { UserNav as eo } from "./user-nav.js";
18
19
  export {
19
20
  a as ChatAssistantMessage,
20
21
  r as ChatHistoryItem,
21
22
  s as ChatMessageList,
22
23
  n as ChatMessageListSkeleton,
23
24
  i as ChatStreamingIndicator,
24
- m as ChatUserMessage,
25
+ p as ChatUserMessage,
25
26
  l as ClientSecretInput,
26
27
  C as CommandBar,
27
28
  x as ConfirmPopover,
28
- c as DateTimePicker,
29
- u as EmptyState,
29
+ u as DateTimePicker,
30
+ c as EmptyState,
30
31
  h as ErrorState,
31
- S as Message,
32
- I as MessageAction,
32
+ M as Message,
33
+ S as MessageAction,
33
34
  P as MessageActions,
34
35
  z as MessageAvatar,
35
36
  k as MessageContent,
@@ -39,18 +40,20 @@ export {
39
40
  H as PromptInputTextarea,
40
41
  R as RequirementBadges,
41
42
  D as StepsProgress,
42
- b as SuggestionCard,
43
- j as SuggestionCardSkeleton,
44
- F as ToolAuthorization,
45
- G as ToolAuthorizationArgs,
46
- J as ToolAuthorizationContent,
47
- K as ToolAuthorizationHeader,
48
- O as ToolAuthorizationMessage,
49
- V as ToolCallAccordion,
50
- W as ToolCallAccordionContent,
51
- X as ToolCallAccordionItem,
52
- Y as ToolCallAccordionTrigger,
53
- _ as ToolCard,
43
+ V as SuggestionCard,
44
+ b as SuggestionCardSkeleton,
45
+ w as TagsInput,
46
+ F as TagsInputValue,
47
+ J as ToolAuthorization,
48
+ K as ToolAuthorizationArgs,
49
+ O as ToolAuthorizationContent,
50
+ Q as ToolAuthorizationHeader,
51
+ W as ToolAuthorizationMessage,
52
+ Y as ToolCallAccordion,
53
+ Z as ToolCallAccordionContent,
54
+ _ as ToolCallAccordionItem,
55
+ $ as ToolCallAccordionTrigger,
56
+ to as ToolCard,
54
57
  U as ToolkitCard,
55
- oo as UserNav
58
+ eo as UserNav
56
59
  };
@@ -22,10 +22,12 @@ export type StepsProgressProps = {
22
22
  * Respects `prefers-reduced-motion` via token CSS.
23
23
  */
24
24
  animateStepTransitions?: boolean;
25
+ /** Render steps in a vertical list instead of a horizontal bar. */
26
+ orientation?: "horizontal" | "vertical";
25
27
  } & React.ComponentProps<"section">;
26
28
  export declare function getMobileIndexForSteps(steps: Step[], options?: {
27
29
  currentIndex?: number;
28
30
  isDismissible?: boolean;
29
31
  }): number;
30
- export declare function StepsProgress({ steps, onDismiss, animateStepTransitions, className, ...props }: StepsProgressProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function StepsProgress({ steps, onDismiss, animateStepTransitions, orientation, className, ...props }: StepsProgressProps): import("react/jsx-runtime").JSX.Element;
31
33
  //# sourceMappingURL=steps-progress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"steps-progress.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/steps-progress.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAUpC,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9D,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAsDpC,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,UAwBF;AAuBD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,sBAA8B,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAuMpB"}
1
+ {"version":3,"file":"steps-progress.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/steps-progress.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAcpC,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9D,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mEAAmE;IACnE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAsDpC,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,UAwBF;AAuBD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,sBAA8B,EAC9B,WAA0B,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAkPpB"}
@@ -1,237 +1,278 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as n } from "react/jsx-runtime";
3
- import { ChevronLeft as B, X as S, ChevronRight as D } from "lucide-react";
4
- import { useState as C, useLayoutEffect as E, useRef as x, useEffect as M } from "react";
2
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
3
+ import { Check as D, ChevronLeft as E, X as C, ChevronRight as P } from "lucide-react";
4
+ import { useState as L, useLayoutEffect as V, useRef as p, useEffect as M } from "react";
5
5
  import { Button as j } from "../atoms/button.js";
6
- import { DS_SPARKLE_DURATION_MS as P, SparkleBurst as _ } from "../atoms/sparkle-burst.js";
7
- import { StepIndicator as G } from "../atoms/step-indicator.js";
8
- import { cn as u } from "../../../lib/utils.js";
9
- function K({ step: e, stepNumber: t, isAttention: r }) {
10
- const o = /* @__PURE__ */ n(
11
- G,
6
+ import { DS_SPARKLE_DURATION_MS as _, SparkleBurst as G } from "../atoms/sparkle-burst.js";
7
+ import { stepIndicatorIconVariants as K, stepIndicatorLabelVariants as F, StepIndicator as O } from "../atoms/step-indicator.js";
8
+ import { cn as l } from "../../../lib/utils.js";
9
+ function U({ step: e, stepNumber: n, isAttention: a }) {
10
+ const s = /* @__PURE__ */ t(
11
+ O,
12
12
  {
13
13
  className: "min-w-0",
14
14
  label: e.label,
15
15
  status: e.status,
16
- stepNumber: t
16
+ stepNumber: n
17
17
  }
18
- ), c = u(
18
+ ), u = l(
19
19
  "flex min-w-0 flex-1 items-center justify-center",
20
- r && "step-attention-target"
20
+ a && "step-attention-target"
21
21
  );
22
- return e.onClick ? /* @__PURE__ */ n(
22
+ return e.onClick ? /* @__PURE__ */ t(
23
23
  "button",
24
24
  {
25
- className: u(c, "cursor-pointer"),
25
+ className: l(u, "cursor-pointer"),
26
26
  onClick: e.onClick,
27
27
  type: "button",
28
- children: o
28
+ children: s
29
29
  }
30
- ) : /* @__PURE__ */ n("span", { className: c, children: o });
30
+ ) : /* @__PURE__ */ t("span", { className: u, children: s });
31
31
  }
32
32
  function R(e) {
33
33
  return e.length - 1;
34
34
  }
35
- function F(e) {
36
- return e.findIndex((t) => t.status === "active");
35
+ function X(e) {
36
+ return e.findIndex((n) => n.status === "active");
37
37
  }
38
- function L(e, t) {
39
- return e.length === 0 ? t ? 0 : -1 : t ? e.length : R(e);
38
+ function z(e, n) {
39
+ return e.length === 0 ? n ? 0 : -1 : n ? e.length : R(e);
40
40
  }
41
- function p(e, t) {
42
- const { currentIndex: r, isDismissible: o = !1 } = t ?? {}, c = F(e);
43
- if (c >= 0)
44
- return c;
41
+ function g(e, n) {
42
+ const { currentIndex: a, isDismissible: s = !1 } = n ?? {}, u = X(e);
43
+ if (u >= 0)
44
+ return u;
45
45
  if (e.length === 0)
46
- return o ? 0 : -1;
47
- const a = L(e, o);
48
- return r !== void 0 && r >= 0 && r <= a ? r : R(e);
46
+ return s ? 0 : -1;
47
+ const h = z(e, s);
48
+ return a !== void 0 && a >= 0 && a <= h ? a : R(e);
49
49
  }
50
- function O(e, t, r) {
51
- const o = L(e, r);
52
- return t >= 0 && t <= o ? t : p(e, {
53
- currentIndex: t,
54
- isDismissible: r
50
+ function $(e, n, a) {
51
+ const s = z(e, a);
52
+ return n >= 0 && n <= s ? n : g(e, {
53
+ currentIndex: n,
54
+ isDismissible: a
55
55
  });
56
56
  }
57
- function U(e) {
57
+ function q(e) {
58
58
  return `calc(${(e - 1) / e} * (100% - 4.25rem) + 0.75rem)`;
59
59
  }
60
- function W({
60
+ function te({
61
61
  steps: e,
62
- onDismiss: t,
63
- animateStepTransitions: r = !1,
64
- className: o,
65
- ...c
62
+ onDismiss: n,
63
+ animateStepTransitions: a = !1,
64
+ orientation: s = "horizontal",
65
+ className: u,
66
+ ...h
66
67
  }) {
67
- const a = !!t, [T, h] = C(
68
- () => p(e, { isDismissible: a })
68
+ const m = !!n, [T, b] = L(
69
+ () => g(e, { isDismissible: m })
69
70
  );
70
- E(() => {
71
- h(
72
- (i) => p(e, {
73
- currentIndex: i,
74
- isDismissible: a
71
+ V(() => {
72
+ b(
73
+ (r) => g(e, {
74
+ currentIndex: r,
75
+ isDismissible: m
75
76
  })
76
77
  );
77
- }, [a, e]);
78
- const [g, v] = C(void 0), b = x(null), d = x(null), N = x(0);
78
+ }, [m, e]);
79
+ const [v, N] = L(void 0), x = p(null), f = p(null), k = p(0);
79
80
  M(() => {
80
- const i = b.current, m = new Map(e.map((l) => [l.id, l.status]));
81
- if (i === null) {
82
- b.current = m;
81
+ const r = x.current, o = new Map(e.map((i) => [i.id, i.status]));
82
+ if (r === null) {
83
+ x.current = o;
83
84
  return;
84
85
  }
85
- if (r) {
86
- const l = e.find(
87
- (y) => y.status === "complete" && i.get(y.id) !== "complete"
86
+ if (a) {
87
+ const i = e.find(
88
+ (S) => S.status === "complete" && r.get(S.id) !== "complete"
88
89
  );
89
- l && (d.current !== null && window.clearTimeout(d.current), N.current += 1, v({ stepId: l.id, key: N.current }), d.current = window.setTimeout(() => {
90
- v(void 0), d.current = null;
91
- }, P));
90
+ i && (f.current !== null && window.clearTimeout(f.current), k.current += 1, N({ stepId: i.id, key: k.current }), f.current = window.setTimeout(() => {
91
+ N(void 0), f.current = null;
92
+ }, _));
92
93
  }
93
- b.current = m;
94
- }, [r, e]), M(
94
+ x.current = o;
95
+ }, [a, e]), M(
95
96
  () => () => {
96
- d.current !== null && window.clearTimeout(d.current);
97
+ f.current !== null && window.clearTimeout(f.current);
97
98
  },
98
99
  []
99
100
  );
100
- const s = O(
101
+ const d = $(
101
102
  e,
102
103
  T,
103
- a
104
- ), z = e[s], k = e.length, w = s > 0, I = a ? s < k : s < e.length - 1, A = a && e.at(-1)?.status === "active";
105
- return /* @__PURE__ */ f(
104
+ m
105
+ ), A = e[d], w = e.length, I = d > 0, y = m ? d < w : d < e.length - 1, B = m && e.at(-1)?.status === "active";
106
+ return s === "vertical" ? /* @__PURE__ */ t("section", { "aria-label": "Steps progress", className: l(u), ...h, children: /* @__PURE__ */ t("ol", { className: "flex flex-col", children: e.map((r, o) => {
107
+ const i = o === e.length - 1;
108
+ return /* @__PURE__ */ c(
109
+ "li",
110
+ {
111
+ className: l("flex items-start gap-3", !i && "pb-5"),
112
+ children: [
113
+ /* @__PURE__ */ c("div", { className: "flex shrink-0 flex-col items-center self-stretch", children: [
114
+ /* @__PURE__ */ t(
115
+ "span",
116
+ {
117
+ className: l(
118
+ K({ status: r.status })
119
+ ),
120
+ children: r.status === "complete" ? /* @__PURE__ */ t(D, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t("span", { className: "text-sm", children: o + 1 })
121
+ }
122
+ ),
123
+ !i && /* @__PURE__ */ t("div", { className: "mt-2 w-px flex-1 bg-border" })
124
+ ] }),
125
+ /* @__PURE__ */ c(
126
+ "span",
127
+ {
128
+ "aria-current": r.status === "active" ? "step" : void 0,
129
+ className: l(
130
+ F({ status: r.status }),
131
+ "pt-0.5"
132
+ ),
133
+ children: [
134
+ r.label,
135
+ /* @__PURE__ */ c("span", { className: "sr-only", children: [
136
+ " — ",
137
+ r.status
138
+ ] })
139
+ ]
140
+ }
141
+ )
142
+ ]
143
+ },
144
+ r.id
145
+ );
146
+ }) }) }) : /* @__PURE__ */ c(
106
147
  "section",
107
148
  {
108
149
  "aria-label": "Steps progress",
109
- className: u(
150
+ className: l(
110
151
  "relative h-14 overflow-hidden border border-border bg-card text-foreground",
111
- o
152
+ u
112
153
  ),
113
- ...c,
154
+ ...h,
114
155
  children: [
115
- A && /* @__PURE__ */ n(
156
+ B && /* @__PURE__ */ t(
116
157
  "span",
117
158
  {
118
159
  "aria-hidden": "true",
119
160
  className: "pointer-events-none absolute top-0 right-0 z-10 hidden h-0.5 bg-foreground sm:block",
120
- style: { left: U(e.length) }
161
+ style: { left: q(e.length) }
121
162
  }
122
163
  ),
123
- z?.status === "active" && /* @__PURE__ */ n(
164
+ A?.status === "active" && /* @__PURE__ */ t(
124
165
  "span",
125
166
  {
126
167
  "aria-hidden": "true",
127
168
  className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 bg-foreground sm:hidden"
128
169
  }
129
170
  ),
130
- /* @__PURE__ */ f("div", { className: "relative z-10 flex h-full items-center sm:gap-3 sm:px-3", children: [
131
- /* @__PURE__ */ n(
171
+ /* @__PURE__ */ c("div", { className: "relative z-10 flex h-full items-center sm:gap-3 sm:px-3", children: [
172
+ /* @__PURE__ */ t(
132
173
  "button",
133
174
  {
134
175
  "aria-label": "Go to previous step",
135
- className: u(
176
+ className: l(
136
177
  "flex h-full shrink-0 items-center px-2 text-muted-foreground sm:hidden",
137
- !w && "pointer-events-none invisible"
178
+ !I && "pointer-events-none invisible"
138
179
  ),
139
- onClick: () => h(s - 1),
140
- tabIndex: w ? 0 : -1,
180
+ onClick: () => b(d - 1),
181
+ tabIndex: I ? 0 : -1,
141
182
  type: "button",
142
- children: /* @__PURE__ */ n(B, { className: "h-4 w-4" })
183
+ children: /* @__PURE__ */ t(E, { className: "h-4 w-4" })
143
184
  }
144
185
  ),
145
- /* @__PURE__ */ f("ol", { className: "flex h-full min-w-0 flex-1 items-center gap-0", children: [
146
- e.map((i, m) => {
147
- const l = g?.stepId === i.id;
148
- return /* @__PURE__ */ f(
186
+ /* @__PURE__ */ c("ol", { className: "flex h-full min-w-0 flex-1 items-center gap-0", children: [
187
+ e.map((r, o) => {
188
+ const i = v?.stepId === r.id;
189
+ return /* @__PURE__ */ c(
149
190
  "li",
150
191
  {
151
- "aria-current": i.status === "active" ? "step" : void 0,
152
- className: u(
192
+ "aria-current": r.status === "active" ? "step" : void 0,
193
+ className: l(
153
194
  "relative isolate flex h-full min-w-0 flex-1 items-center justify-center px-2 py-4 sm:px-3",
154
- m !== s && "hidden sm:flex"
195
+ o !== d && "hidden sm:flex"
155
196
  ),
156
- "data-attention": l ? "true" : void 0,
157
- "data-status": i.status,
197
+ "data-attention": i ? "true" : void 0,
198
+ "data-status": r.status,
158
199
  children: [
159
- m > 0 && /* @__PURE__ */ n(
200
+ o > 0 && /* @__PURE__ */ t(
160
201
  "span",
161
202
  {
162
203
  "aria-hidden": "true",
163
204
  className: "absolute left-0 hidden h-full w-px bg-border sm:block"
164
205
  }
165
206
  ),
166
- /* @__PURE__ */ n(
167
- K,
207
+ /* @__PURE__ */ t(
208
+ U,
168
209
  {
169
- isAttention: l,
170
- step: i,
171
- stepNumber: m + 1
210
+ isAttention: i,
211
+ step: r,
212
+ stepNumber: o + 1
172
213
  }
173
214
  ),
174
- l ? /* @__PURE__ */ n(
215
+ i ? /* @__PURE__ */ t(
175
216
  "span",
176
217
  {
177
218
  "aria-hidden": !0,
178
219
  className: "pointer-events-none absolute inset-0 z-30 flex items-center justify-center",
179
- children: /* @__PURE__ */ n(_, {}, g.key)
220
+ children: /* @__PURE__ */ t(G, {}, v.key)
180
221
  }
181
222
  ) : null
182
223
  ]
183
224
  },
184
- i.id
225
+ r.id
185
226
  );
186
227
  }),
187
- t && /* @__PURE__ */ n(
228
+ n && /* @__PURE__ */ t(
188
229
  "li",
189
230
  {
190
- className: u(
231
+ className: l(
191
232
  "relative isolate flex h-full flex-1 items-center justify-center sm:hidden",
192
- s !== k && "hidden"
233
+ d !== w && "hidden"
193
234
  ),
194
- children: /* @__PURE__ */ f(
235
+ children: /* @__PURE__ */ c(
195
236
  j,
196
237
  {
197
238
  "aria-label": "Dismiss steps progress",
198
239
  className: "h-8 gap-1.5 border border-border px-3 text-muted-foreground hover:bg-muted hover:text-foreground",
199
- onClick: t,
240
+ onClick: n,
200
241
  type: "button",
201
242
  variant: "ghost",
202
243
  children: [
203
- /* @__PURE__ */ n(S, { className: "h-4 w-4" }),
204
- /* @__PURE__ */ n("span", { className: "text-sm", children: "Dismiss" })
244
+ /* @__PURE__ */ t(C, { className: "h-4 w-4" }),
245
+ /* @__PURE__ */ t("span", { className: "text-sm", children: "Dismiss" })
205
246
  ]
206
247
  }
207
248
  )
208
249
  }
209
250
  )
210
251
  ] }),
211
- /* @__PURE__ */ n(
252
+ /* @__PURE__ */ t(
212
253
  "button",
213
254
  {
214
255
  "aria-label": "Go to next step",
215
- className: u(
256
+ className: l(
216
257
  "flex h-full shrink-0 items-center px-2 text-muted-foreground sm:hidden",
217
- !I && "pointer-events-none invisible"
258
+ !y && "pointer-events-none invisible"
218
259
  ),
219
- onClick: () => h(s + 1),
220
- tabIndex: I ? 0 : -1,
260
+ onClick: () => b(d + 1),
261
+ tabIndex: y ? 0 : -1,
221
262
  type: "button",
222
- children: /* @__PURE__ */ n(D, { className: "h-4 w-4" })
263
+ children: /* @__PURE__ */ t(P, { className: "h-4 w-4" })
223
264
  }
224
265
  ),
225
- t && /* @__PURE__ */ n(
266
+ n && /* @__PURE__ */ t(
226
267
  j,
227
268
  {
228
269
  "aria-label": "Dismiss steps progress",
229
270
  className: "hidden h-8 w-8 shrink-0 border border-border text-muted-foreground hover:bg-muted hover:text-foreground sm:flex",
230
- onClick: t,
271
+ onClick: n,
231
272
  size: "icon",
232
273
  type: "button",
233
274
  variant: "ghost",
234
- children: /* @__PURE__ */ n(S, { className: "h-4 w-4" })
275
+ children: /* @__PURE__ */ t(C, { className: "h-4 w-4" })
235
276
  }
236
277
  )
237
278
  ] })
@@ -240,6 +281,6 @@ function W({
240
281
  );
241
282
  }
242
283
  export {
243
- W as StepsProgress,
244
- p as getMobileIndexForSteps
284
+ te as StepsProgress,
285
+ g as getMobileIndexForSteps
245
286
  };
@@ -0,0 +1,44 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export type TagsInputValidationResult = {
3
+ /** Normalized value to store. Falls back to the trimmed input if omitted. */
4
+ normalizedValue?: string;
5
+ /** Human-readable error message. Undefined means valid. */
6
+ error?: string;
7
+ };
8
+ type ForwardedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "className" | "defaultValue" | "disabled" | "onBlur" | "onChange" | "onKeyDown" | "onPaste" | "placeholder" | "type" | "value">;
9
+ export type TagsInputProps = {
10
+ values: string[];
11
+ onChange: (values: string[]) => void;
12
+ placeholder?: string;
13
+ /** Commit the pending input value when the field loses focus. Default: true. */
14
+ addOnBlur?: boolean;
15
+ /**
16
+ * Validate (and optionally normalize) a trimmed input string before it is added.
17
+ * Return `{ error }` to reject with a message, `{ normalizedValue }` to accept
18
+ * with a transformed value, or `{}` to accept as-is.
19
+ */
20
+ validateValue?: (trimmed: string, currentValues: string[]) => TagsInputValidationResult;
21
+ /**
22
+ * Determine whether `incoming` is a duplicate of an existing `stored` value.
23
+ * Return `true` to reject with the default "Already added" message, or a
24
+ * non-empty string to reject with that string as the error. Defaults to
25
+ * exact string equality with "Already added".
26
+ */
27
+ isDuplicate?: (incoming: string, stored: string) => boolean | string;
28
+ /**
29
+ * Render a custom chip for each committed value. Receives the value and a
30
+ * `remove` callback. When omitted a plain Badge with an X button is rendered.
31
+ * Keys are managed by TagsInput — do not add a `key` prop to the returned element.
32
+ */
33
+ renderValue?: (value: string, remove: () => void) => React.ReactNode;
34
+ className?: string;
35
+ disabled?: boolean;
36
+ } & ForwardedInputProps;
37
+ export type TagsInputValueProps = {
38
+ value: string;
39
+ onRemove: () => void;
40
+ };
41
+ export declare function TagsInputValue({ value, onRemove }: TagsInputValueProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function TagsInput({ values, onChange, placeholder, addOnBlur, validateValue, isDuplicate, renderValue, className, disabled, id, ...inputProps }: TagsInputProps): import("react/jsx-runtime").JSX.Element;
43
+ export {};
44
+ //# sourceMappingURL=tags-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags-input.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/tags-input.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,mBAAmB,EAKzB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,yBAAyB,GAAG;IACtC,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,mBAAmB,GAAG,IAAI,CAC7B,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,WAAW,GACX,cAAc,GACd,UAAU,GACV,QAAQ,GACR,UAAU,GACV,WAAW,GACX,SAAS,GACT,aAAa,GACb,MAAM,GACN,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EAAE,KACpB,yBAAyB,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAAC;IACrE;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,SAAS,CAAC,EAAE,MAAM,C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