@brightlocal/ui-components 1.3.0 → 1.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),E=require("react"),I=require("framer-motion"),L=require("@brightlocal/icons"),N=require("@brightlocal/ui-components/lib/utils"),T=require("../button.cjs"),D=require("../field.cjs"),z=require("../input.cjs"),d=require("../list.cjs");function B(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const o=B(E);function k({value:e,onValueChange:a,placeholder:r="Add item",addButtonLabel:c="Add",skeletonCount:$=3,disabled:u=!1,loading:f=!1,error:g=!1,errorMessage:b,description:j,dataHook:l,trackingEl:q,trackingLabel:A,className:S}){const[p,y]=o.useState(""),m=o.useRef(e.length),[_,x]=o.useState(()=>e.map((t,s)=>s));o.useEffect(()=>{x(t=>t.length===e.length?t:e.length>t.length?[...t,...Array.from({length:e.length-t.length},()=>m.current++)]:e.map(()=>m.current++))},[e]);const O=u||f,P=u||f,h=o.useCallback(t=>{const s=t.map(i=>i.trim()).filter(Boolean);s.length&&(x(i=>[...i,...s.map(()=>m.current++)]),a([...e,...s]),y(""))},[e,a]),R=o.useCallback(t=>{x(s=>s.filter((i,C)=>C!==t)),a(e.filter((s,i)=>i!==t))},[e,a]),w=t=>{t.key==="Enter"&&(t.preventDefault(),h([p]))},K=t=>{const i=t.clipboardData.getData("text").split(`
2
- `);i.length>1&&(t.preventDefault(),h(i))};return n.jsxs("div",{className:N.cn("flex flex-col gap-4",S),"data-hook":l,"data-slot":"input-list","data-tracking-el":q,"data-tracking-label":A,children:[f?n.jsx("ul",{className:"flex flex-col gap-2","data-slot":"input-list-skeleton",children:Array.from({length:$}).map((t,s)=>n.jsx(d.Item,{variant:"loading"},s))}):n.jsx("ul",{className:"flex flex-col gap-2","data-hook":`${l}-list`,"data-slot":"list",children:n.jsx(I.AnimatePresence,{initial:!1,children:e.map((t,s)=>n.jsx(I.motion.li,{layout:!0,animate:{opacity:1,scale:1},"data-hook":`${l}-item-${s}`,"data-slot":"item",exit:{opacity:0,scale:.8,transition:{opacity:{duration:.15},scale:{duration:.12}}},initial:{opacity:0,scale:.8},transition:{opacity:{duration:.15},scale:{duration:.15},layout:{type:"spring",stiffness:500,damping:35}},children:n.jsxs("div",{className:"bg-card flex items-center gap-4 rounded-lg py-2 pr-2 pl-4",children:[n.jsx(d.ItemContent,{children:n.jsx(d.ItemTitle,{children:t})}),n.jsx(d.ItemActions,{children:n.jsx("button",{"aria-label":`Remove ${t}`,className:N.cn("inline-flex size-9 cursor-pointer items-center justify-center rounded-full","text-muted-foreground","focus-visible:shadow-default outline-none","transition-colors duration-150 ease-in-out","disabled:pointer-events-none disabled:opacity-50"),"data-hook":`${l}-remove-${s}`,disabled:u,type:"button",onClick:()=>R(s),children:n.jsx(L.X,{})})})]})},_[s]))})}),n.jsxs("div",{className:"flex flex-col gap-2","data-slot":"input-list-input-area",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(z.Input,{className:"flex-1",dataHook:`${l}-input`,disabled:O,error:g,placeholder:r,value:p,onChange:t=>y(t.target.value),onKeyDown:w,onPaste:K}),n.jsx(T.Button,{dataHook:`${l}-add`,disabled:P,onClick:()=>h([p]),children:c})]}),g&&b?n.jsx(D.FieldError,{className:"text-left","data-slot":"input-list-error",dataHook:`${l}-error`,children:b}):j&&n.jsx(D.FieldDescription,{className:"text-left","data-slot":"input-list-description",dataHook:`${l}-description`,children:j})]})]})}k.displayName="InputList";exports.InputList=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),z=require("react"),D=require("framer-motion"),F=require("@brightlocal/icons"),k=require("@brightlocal/ui-components/lib/utils"),M=require("../button.cjs"),$=require("../field.cjs"),v=require("../input.cjs"),d=require("../list.cjs");function X(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(l,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return l.default=e,Object.freeze(l)}const o=X(z);function q({value:e,onValueChange:l,onBeforeAdd:a,placeholder:c="Add item",addButtonLabel:S="Add",skeletonCount:_=3,disabled:f=!1,loading:p=!1,error:j=!1,errorMessage:y,description:I,dataHook:r,trackingEl:O,trackingLabel:P,className:R}){const[m,N]=o.useState(""),[u,x]=o.useState(null),h=o.useRef(e.length),[A,g]=o.useState(()=>e.map((t,s)=>s));o.useEffect(()=>{g(t=>t.length===e.length?t:e.length>t.length?[...t,...Array.from({length:e.length-t.length},()=>h.current++)]:e.map(()=>h.current++))},[e]);const E=f||p,w=f||p,b=o.useCallback(t=>{const s=t.map(i=>i.trim()).filter(Boolean);if(s.length){if(a){const i=a(s,e);if(i!==!0){x(i);return}}x(null),g(i=>[...i,...s.map(()=>h.current++)]),l([...e,...s]),N("")}},[e,l,a]),K=o.useCallback(t=>{g(s=>s.filter((i,T)=>T!==t)),l(e.filter((s,i)=>i!==t))},[e,l]),C=t=>{t.key==="Enter"&&(t.preventDefault(),b([m]))},L=t=>{const i=t.clipboardData.getData("text").split(`
2
+ `);i.length>1&&(t.preventDefault(),b(i))};return n.jsxs("div",{className:k.cn("flex flex-col gap-4",R),"data-hook":r,"data-slot":"input-list","data-tracking-el":O,"data-tracking-label":P,children:[p?n.jsx("ul",{className:"flex flex-col gap-2","data-slot":"input-list-skeleton",children:Array.from({length:_}).map((t,s)=>n.jsx(d.Item,{variant:"loading"},s))}):n.jsx("ul",{className:"flex flex-col gap-2","data-hook":`${r}-list`,"data-slot":"list",children:n.jsx(D.AnimatePresence,{initial:!1,children:e.map((t,s)=>n.jsx(D.motion.li,{layout:!0,animate:{opacity:1,scale:1},"data-hook":`${r}-item-${s}`,"data-slot":"item",exit:{opacity:0,scale:.8,transition:{opacity:{duration:.15},scale:{duration:.12}}},initial:{opacity:0,scale:.8},transition:{opacity:{duration:.15},scale:{duration:.15},layout:{type:"spring",stiffness:500,damping:35}},children:n.jsxs("div",{className:"bg-card flex items-center gap-4 rounded-lg py-2 pr-2 pl-4",children:[n.jsx(d.ItemContent,{children:n.jsx(d.ItemTitle,{children:t})}),n.jsx(d.ItemActions,{children:n.jsx("button",{"aria-label":`Remove ${t}`,className:k.cn("inline-flex size-9 cursor-pointer items-center justify-center rounded-full","text-muted-foreground","focus-visible:shadow-default outline-none","transition-colors duration-150 ease-in-out","disabled:pointer-events-none disabled:opacity-50"),"data-hook":`${r}-remove-${s}`,disabled:f,type:"button",onClick:()=>K(s),children:n.jsx(F.X,{})})})]})},A[s]))})}),n.jsxs("div",{className:"flex flex-col gap-2","data-slot":"input-list-input-area",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(v.Input,{className:"flex-1",dataHook:`${r}-input`,disabled:E,error:j||!!u,placeholder:c,value:m,onChange:t=>{N(t.target.value),u&&x(null)},onKeyDown:C,onPaste:L}),n.jsx(M.Button,{dataHook:`${r}-add`,disabled:w,onClick:()=>b([m]),children:S})]}),j&&y||u?n.jsx($.FieldError,{className:"text-left","data-slot":"input-list-error",dataHook:`${r}-error`,children:u??y}):I&&n.jsx($.FieldDescription,{className:"text-left","data-slot":"input-list-description",dataHook:`${r}-description`,children:I})]})]})}q.displayName="InputList";exports.InputList=q;
@@ -11,6 +11,21 @@ export interface InputListProps {
11
11
  * Called when the list of items changes.
12
12
  */
13
13
  onValueChange: (value: string[]) => void;
14
+ /**
15
+ * Called before items are added to the list.
16
+ * Return `true` to allow the addition, or a `string` to block it
17
+ * and display that string as an error message.
18
+ * The input value is preserved when addition is blocked.
19
+ * @example
20
+ * ```tsx
21
+ * onBeforeAdd={(newItems, current) => {
22
+ * const existing = new Set(current.map((k) => k.toLowerCase()));
23
+ * const hasDupe = newItems.some((item) => existing.has(item.toLowerCase()));
24
+ * return hasDupe ? "Keyword already added" : true;
25
+ * }}
26
+ * ```
27
+ */
28
+ onBeforeAdd?: (newItems: string[], currentValue: string[]) => true | string;
14
29
  /**
15
30
  * Placeholder text for the text input.
16
31
  * @default "Add item"
@@ -78,7 +93,7 @@ export interface InputListProps {
78
93
  * />
79
94
  * ```
80
95
  */
81
- declare function InputList({ value, onValueChange, placeholder, addButtonLabel, skeletonCount, disabled, loading, error, errorMessage, description, dataHook, trackingEl, trackingLabel, className, }: InputListProps): import("react/jsx-runtime").JSX.Element;
96
+ declare function InputList({ value, onValueChange, onBeforeAdd, placeholder, addButtonLabel, skeletonCount, disabled, loading, error, errorMessage, description, dataHook, trackingEl, trackingLabel, className, }: InputListProps): import("react/jsx-runtime").JSX.Element;
82
97
  declare namespace InputList {
83
98
  var displayName: string;
84
99
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-list.d.ts","sourceRoot":"","sources":["../../src/blocks/input-list.tsx"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,aAAa,EACb,WAAwB,EACxB,cAAsB,EACtB,aAAiB,EACjB,QAAgB,EAChB,OAAe,EACf,KAAa,EACb,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,SAAS,GACV,EAAE,cAAc,2CAkMhB;kBAjNQ,SAAS;;;AAqNlB,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"input-list.d.ts","sourceRoot":"","sources":["../../src/blocks/input-list.tsx"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,MAAM,CAAC;IAC5E;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,aAAa,EACb,WAAW,EACX,WAAwB,EACxB,cAAsB,EACtB,aAAiB,EACjB,QAAgB,EAChB,OAAe,EACf,KAAa,EACb,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACb,SAAS,GACV,EAAE,cAAc,2CAkNhB;kBAlOQ,SAAS;;;AAsOlB,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,82 +1,94 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { AnimatePresence as P, motion as S } from "framer-motion";
4
- import { X as B } from "@brightlocal/icons";
5
- import { cn as b } from "@brightlocal/ui-components/lib/utils";
6
- import { Button as F } from "../button.js";
7
- import { FieldError as L, FieldDescription as z } from "../field.js";
8
- import { Input as T } from "../input.js";
9
- import { Item as X, ItemContent as q, ItemTitle as G, ItemActions as J } from "../list.js";
10
- function O({
11
- value: i,
12
- onValueChange: o,
13
- placeholder: I = "Add item",
14
- addButtonLabel: N = "Add",
15
- skeletonCount: $ = 3,
16
- disabled: c = !1,
17
- loading: d = !1,
18
- error: h = !1,
19
- errorMessage: g,
20
- description: y,
21
- dataHook: l,
22
- trackingEl: k,
23
- trackingLabel: D,
24
- className: A
3
+ import { AnimatePresence as L, motion as z } from "framer-motion";
4
+ import { X as T } from "@brightlocal/icons";
5
+ import { cn as $ } from "@brightlocal/ui-components/lib/utils";
6
+ import { Button as X } from "../button.js";
7
+ import { FieldError as q, FieldDescription as B } from "../field.js";
8
+ import { Input as G } from "../input.js";
9
+ import { Item as J, ItemContent as O, ItemTitle as Q, ItemActions as U } from "../list.js";
10
+ function V({
11
+ value: n,
12
+ onValueChange: r,
13
+ onBeforeAdd: d,
14
+ placeholder: k = "Add item",
15
+ addButtonLabel: D = "Add",
16
+ skeletonCount: A = 3,
17
+ disabled: m = !1,
18
+ loading: p = !1,
19
+ error: x = !1,
20
+ errorMessage: b,
21
+ description: I,
22
+ dataHook: a,
23
+ trackingEl: E,
24
+ trackingLabel: K,
25
+ className: R
25
26
  }) {
26
- const [m, x] = s.useState(""), p = s.useRef(i.length), [K, f] = s.useState(
27
- () => i.map((t, e) => e)
27
+ const [f, N] = s.useState(""), [o, u] = s.useState(
28
+ null
29
+ ), h = s.useRef(n.length), [S, g] = s.useState(
30
+ () => n.map((t, e) => e)
28
31
  );
29
32
  s.useEffect(() => {
30
- f((t) => t.length === i.length ? t : i.length > t.length ? [
33
+ g((t) => t.length === n.length ? t : n.length > t.length ? [
31
34
  ...t,
32
35
  ...Array.from(
33
- { length: i.length - t.length },
34
- () => p.current++
36
+ { length: n.length - t.length },
37
+ () => h.current++
35
38
  )
36
- ] : i.map(() => p.current++));
37
- }, [i]);
38
- const R = c || d, _ = c || d, u = s.useCallback(
39
+ ] : n.map(() => h.current++));
40
+ }, [n]);
41
+ const _ = m || p, j = m || p, y = s.useCallback(
39
42
  (t) => {
40
- const e = t.map((n) => n.trim()).filter(Boolean);
41
- e.length && (f((n) => [
42
- ...n,
43
- ...e.map(() => p.current++)
44
- ]), o([...i, ...e]), x(""));
43
+ const e = t.map((l) => l.trim()).filter(Boolean);
44
+ if (e.length) {
45
+ if (d) {
46
+ const l = d(e, n);
47
+ if (l !== !0) {
48
+ u(l);
49
+ return;
50
+ }
51
+ }
52
+ u(null), g((l) => [
53
+ ...l,
54
+ ...e.map(() => h.current++)
55
+ ]), r([...n, ...e]), N("");
56
+ }
45
57
  },
46
- [i, o]
47
- ), j = s.useCallback(
58
+ [n, r, d]
59
+ ), w = s.useCallback(
48
60
  (t) => {
49
- f((e) => e.filter((n, E) => E !== t)), o(i.filter((e, n) => n !== t));
61
+ g((e) => e.filter((l, F) => F !== t)), r(n.filter((e, l) => l !== t));
50
62
  },
51
- [i, o]
52
- ), w = (t) => {
53
- t.key === "Enter" && (t.preventDefault(), u([m]));
54
- }, C = (t) => {
55
- const n = t.clipboardData.getData("text").split(`
63
+ [n, r]
64
+ ), C = (t) => {
65
+ t.key === "Enter" && (t.preventDefault(), y([f]));
66
+ }, P = (t) => {
67
+ const l = t.clipboardData.getData("text").split(`
56
68
  `);
57
- n.length > 1 && (t.preventDefault(), u(n));
69
+ l.length > 1 && (t.preventDefault(), y(l));
58
70
  };
59
- return /* @__PURE__ */ r(
71
+ return /* @__PURE__ */ c(
60
72
  "div",
61
73
  {
62
- className: b("flex flex-col gap-4", A),
63
- "data-hook": l,
74
+ className: $("flex flex-col gap-4", R),
75
+ "data-hook": a,
64
76
  "data-slot": "input-list",
65
- "data-tracking-el": k,
66
- "data-tracking-label": D,
77
+ "data-tracking-el": E,
78
+ "data-tracking-label": K,
67
79
  children: [
68
- d ? /* @__PURE__ */ a("ul", { className: "flex flex-col gap-2", "data-slot": "input-list-skeleton", children: Array.from({ length: $ }).map((t, e) => /* @__PURE__ */ a(X, { variant: "loading" }, e)) }) : /* @__PURE__ */ a(
80
+ p ? /* @__PURE__ */ i("ul", { className: "flex flex-col gap-2", "data-slot": "input-list-skeleton", children: Array.from({ length: A }).map((t, e) => /* @__PURE__ */ i(J, { variant: "loading" }, e)) }) : /* @__PURE__ */ i(
69
81
  "ul",
70
82
  {
71
83
  className: "flex flex-col gap-2",
72
- "data-hook": `${l}-list`,
84
+ "data-hook": `${a}-list`,
73
85
  "data-slot": "list",
74
- children: /* @__PURE__ */ a(P, { initial: !1, children: i.map((t, e) => /* @__PURE__ */ a(
75
- S.li,
86
+ children: /* @__PURE__ */ i(L, { initial: !1, children: n.map((t, e) => /* @__PURE__ */ i(
87
+ z.li,
76
88
  {
77
89
  layout: !0,
78
90
  animate: { opacity: 1, scale: 1 },
79
- "data-hook": `${l}-item-${e}`,
91
+ "data-hook": `${a}-item-${e}`,
80
92
  "data-slot": "item",
81
93
  exit: {
82
94
  opacity: 0,
@@ -96,73 +108,75 @@ function O({
96
108
  damping: 35
97
109
  }
98
110
  },
99
- children: /* @__PURE__ */ r("div", { className: "bg-card flex items-center gap-4 rounded-lg py-2 pr-2 pl-4", children: [
100
- /* @__PURE__ */ a(q, { children: /* @__PURE__ */ a(G, { children: t }) }),
101
- /* @__PURE__ */ a(J, { children: /* @__PURE__ */ a(
111
+ children: /* @__PURE__ */ c("div", { className: "bg-card flex items-center gap-4 rounded-lg py-2 pr-2 pl-4", children: [
112
+ /* @__PURE__ */ i(O, { children: /* @__PURE__ */ i(Q, { children: t }) }),
113
+ /* @__PURE__ */ i(U, { children: /* @__PURE__ */ i(
102
114
  "button",
103
115
  {
104
116
  "aria-label": `Remove ${t}`,
105
- className: b(
117
+ className: $(
106
118
  "inline-flex size-9 cursor-pointer items-center justify-center rounded-full",
107
119
  "text-muted-foreground",
108
120
  "focus-visible:shadow-default outline-none",
109
121
  "transition-colors duration-150 ease-in-out",
110
122
  "disabled:pointer-events-none disabled:opacity-50"
111
123
  ),
112
- "data-hook": `${l}-remove-${e}`,
113
- disabled: c,
124
+ "data-hook": `${a}-remove-${e}`,
125
+ disabled: m,
114
126
  type: "button",
115
- onClick: () => j(e),
116
- children: /* @__PURE__ */ a(B, {})
127
+ onClick: () => w(e),
128
+ children: /* @__PURE__ */ i(T, {})
117
129
  }
118
130
  ) })
119
131
  ] })
120
132
  },
121
- K[e]
133
+ S[e]
122
134
  )) })
123
135
  }
124
136
  ),
125
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", "data-slot": "input-list-input-area", children: [
126
- /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
127
- /* @__PURE__ */ a(
128
- T,
137
+ /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", "data-slot": "input-list-input-area", children: [
138
+ /* @__PURE__ */ c("div", { className: "flex gap-2", children: [
139
+ /* @__PURE__ */ i(
140
+ G,
129
141
  {
130
142
  className: "flex-1",
131
- dataHook: `${l}-input`,
132
- disabled: R,
133
- error: h,
134
- placeholder: I,
135
- value: m,
136
- onChange: (t) => x(t.target.value),
137
- onKeyDown: w,
138
- onPaste: C
143
+ dataHook: `${a}-input`,
144
+ disabled: _,
145
+ error: x || !!o,
146
+ placeholder: k,
147
+ value: f,
148
+ onChange: (t) => {
149
+ N(t.target.value), o && u(null);
150
+ },
151
+ onKeyDown: C,
152
+ onPaste: P
139
153
  }
140
154
  ),
141
- /* @__PURE__ */ a(
142
- F,
155
+ /* @__PURE__ */ i(
156
+ X,
143
157
  {
144
- dataHook: `${l}-add`,
145
- disabled: _,
146
- onClick: () => u([m]),
147
- children: N
158
+ dataHook: `${a}-add`,
159
+ disabled: j,
160
+ onClick: () => y([f]),
161
+ children: D
148
162
  }
149
163
  )
150
164
  ] }),
151
- h && g ? /* @__PURE__ */ a(
152
- L,
165
+ x && b || o ? /* @__PURE__ */ i(
166
+ q,
153
167
  {
154
168
  className: "text-left",
155
169
  "data-slot": "input-list-error",
156
- dataHook: `${l}-error`,
157
- children: g
170
+ dataHook: `${a}-error`,
171
+ children: o ?? b
158
172
  }
159
- ) : y && /* @__PURE__ */ a(
160
- z,
173
+ ) : I && /* @__PURE__ */ i(
174
+ B,
161
175
  {
162
176
  className: "text-left",
163
177
  "data-slot": "input-list-description",
164
- dataHook: `${l}-description`,
165
- children: y
178
+ dataHook: `${a}-description`,
179
+ children: I
166
180
  }
167
181
  )
168
182
  ] })
@@ -170,7 +184,7 @@ function O({
170
184
  }
171
185
  );
172
186
  }
173
- O.displayName = "InputList";
187
+ V.displayName = "InputList";
174
188
  export {
175
- O as InputList
189
+ V as InputList
176
190
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("react"),T=require("framer-motion"),ht=require("flubber"),gt=require("@brightlocal/ui-components/lib/utils"),bt=require("./hooks/use-prefers-reduced-motion.cjs");function yt(u){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const m in u)if(m!=="default"){const P=Object.getOwnPropertyDescriptor(u,m);Object.defineProperty(S,m,P.get?P:{enumerable:!0,get:()=>u[m]})}}return S.default=u,Object.freeze(S)}const Q=yt(c),V="M250 500C388.071 500 500 388.071 500 250C500 111.929 388.071 0 250 0C111.929 0 0 111.929 0 250C0 388.071 111.929 500 250 500Z",Y="M492.425 259.355C332.265 293.145 293.145 332.265 259.355 492.425C257.225 502.525 242.775 502.525 240.645 492.425C206.855 332.265 167.735 293.145 7.575 259.355C-2.525 257.225 -2.525 242.775 7.575 240.645C167.735 206.855 206.855 167.735 240.645 7.575C242.775 -2.525 257.225 -2.525 259.355 7.575C293.145 167.735 332.265 206.855 492.425 240.645C502.525 242.775 502.525 257.225 492.425 259.355Z",tt="M258.366 5.58795L296.379 97.3854C298.509 102.526 304.729 104.546 309.47 101.636L394.177 49.7215C401.057 45.5112 409.598 51.7117 407.708 59.5523L384.506 156.16C383.206 161.571 387.046 166.861 392.596 167.301L491.645 175.092C499.685 175.722 502.945 185.763 496.815 191.003L421.259 255.528C417.029 259.138 417.029 265.679 421.259 269.299L496.815 333.824C502.945 339.065 499.685 349.106 491.645 349.736L392.596 357.526C387.046 357.966 383.206 363.257 384.506 368.667L407.708 465.275C409.588 473.116 401.047 479.326 394.177 475.106L309.47 423.192C304.729 420.282 298.509 422.302 296.379 427.442L258.366 519.24C255.275 526.69 244.725 526.69 241.634 519.24L203.621 427.442C201.491 422.302 195.271 420.282 190.53 423.192L105.823 475.106C98.9428 479.316 90.4021 473.116 92.2922 465.275L115.494 368.667C116.794 363.257 112.954 357.966 107.403 357.526L8.35543 349.736C0.314784 349.106 -2.94548 339.065 3.18502 333.824L78.7411 269.299C82.9715 265.689 82.9715 259.148 78.7411 255.528L3.18502 191.003C-2.94548 185.763 0.314784 175.722 8.35543 175.092L107.403 167.301C112.954 166.861 116.794 161.571 115.494 156.16L92.2922 59.5523C90.4121 51.7117 98.9528 45.5012 105.823 49.7215L190.53 101.636C195.271 104.546 201.491 102.526 203.621 97.3854L241.634 5.58795C244.725 -1.86265 255.275 -1.86265 258.366 5.58795Z",j=u=>u<0?0:u>1?1:u,Ct=[V,Y,tt,V,tt,Y],et=Q.forwardRef(({className:u,dataHook:S,holdTime:m=1300,shimmer:P=!0,gradientFrom:nt="var(--loading-gradient-from)",gradientTo:st="var(--loading-gradient-to)",trackingEl:rt,trackingLabel:at,children:ot,...it},lt)=>{const o=Ct,q=.8,X=180,z=24,F=1,k=bt.usePrefersReducedMotion(),D=`text-reveal-gradient-${c.useId().replace(/:/g,"")}`,N=c.useRef(null),O=c.useRef(null),_=c.useRef(null),H=c.useRef(null),W=c.useRef(null),w=c.useRef(new Map),$=Q.Children.toArray(ot),[ct,ft]=c.useState({widths:[],ballSize:0}),{widths:R,ballSize:i}=ct,ut=c.useCallback(e=>t=>{t?w.current.set(e,t):w.current.delete(e)},[]);c.useEffect(()=>{if(w.current.size===0)return;const e=requestAnimationFrame(()=>{const t=[];let d=32;w.current.forEach((h,n)=>{if(t[n]=h.scrollWidth,n===0){const v=h.firstElementChild??h,b=parseFloat(getComputedStyle(v).fontSize)||16;d=Math.round(b*1.5)}}),ft({widths:t,ballSize:d})});return()=>cancelAnimationFrame(e)},[$.length]),c.useEffect(()=>{if(k)return;const e=W.current;if(!e)return;const t=e;let d,h=null;const n=.12+Math.random()*.06,v=.08+Math.random()*.04,b=Math.random()*Math.PI*2,U=Math.random()*Math.PI*2;let r=-1/0;function a(f){h||(h=f);const M=(f-h)/1e3,p=Math.sin(M*n+b)*Math.PI+Math.sin(M*v+U)*.5;if(Math.abs(p-r)>.01){r=p;const y=Math.cos(p),A=Math.sin(p);t.setAttribute("x1",`${50+45*y}%`),t.setAttribute("y1",`${50+45*A}%`),t.setAttribute("x2",`${50-45*y}%`),t.setAttribute("y2",`${50-45*A}%`)}d=requestAnimationFrame(a)}return d=requestAnimationFrame(a),()=>cancelAnimationFrame(d)},[k]);function dt(e){e.style.opacity="1",T.animate(0,1,{duration:1.2,ease:[.25,1,.5,1],onUpdate:t=>{e.style.transform=`translateX(${-100+t*200}%)`},onComplete:()=>{e.style.opacity="0"}})}c.useEffect(()=>{if(!_.current||!H.current||!N.current||!O.current||R.length===0||i===0)return;const e=_.current,t=H.current,d=N.current,h=O.current;if(k){e.setAttribute("d",o[0]),t.style.opacity="1";const r=w.current.get(0);r&&(r.style.visibility="visible",r.style.clipPath="none");const a=i*.5,f=(R[0]??0)+a+i/2;d.style.transform=`translateX(${f}px)`;return}let n=!1;const v=i*.5,b=[];for(let r=0;r<o.length;r++)b.push(ht.interpolate(o[r],o[(r+1)%o.length]));async function U(){t.style.opacity="1";let r=0,a=0,f=0;for(;!n;){const M=r%$.length,p=R[M]??0,y=-(v+i/2),A=p+v+i/2,G=A-y,B=w.current.get(M);if(!B)break;w.current.forEach((s,x)=>{s.style.visibility=x===M?"visible":"hidden",s.style.clipPath="inset(0 100% 0 0)"});const pt=b[a%o.length],E=360,J=f;if(await new Promise(s=>{if(n){s();return}const x=T.animate(y,A,{type:"spring",stiffness:X*q,damping:z,mass:F,onUpdate:g=>{if(n){x.stop(),s();return}d.style.transform=`translateX(${g}px)`;const L=p>0?100-j(g/p)*100:100;B.style.clipPath=`inset(0 ${L}% 0 0)`;const C=(g-y)/G;t.style.transform=`rotate(${J+C*E}deg)`,e.setAttribute("d",pt(j(C)))},onComplete:()=>{f=J+E,a=(a+1)%o.length,s()}})}),n)break;if(P&&dt(h),m>0){const s=performance.now();for(;!n&&performance.now()-s<m&&(await new Promise(I=>setTimeout(I,300)),!(n||performance.now()-s>=m));){const x=(a+1)%o.length,g=b[a%o.length],L=f,C=f+360;await T.animate(0,1,{type:"spring",stiffness:30,damping:9,mass:.5,onUpdate:I=>{e.setAttribute("d",g(j(I))),t.style.transform=`rotate(${L+I*(C-L)}deg)`}}),f=C,a=x}}if(n)break;const mt=b[a%o.length],K=f;if(await new Promise(s=>{if(n){s();return}const x=T.animate(A,y,{type:"spring",stiffness:X*q,damping:z,mass:F,onUpdate:g=>{if(n){x.stop(),s();return}d.style.transform=`translateX(${g}px)`;const L=p>0?100-j(g/p)*100:100;B.style.clipPath=`inset(0 ${L}% 0 0)`;const C=1-(g-y)/G;t.style.transform=`rotate(${K-C*E}deg)`,e.setAttribute("d",mt(j(C)))},onComplete:()=>{f=K-E,a=(a+1)%o.length,s()}})}),n)break;await new Promise(s=>setTimeout(s,300)),r++}}return U(),()=>{n=!0}},[R,i,$.length,k,q,m,P,X,z,F,o]);const Z=R.length>0?Math.max(...R):0;return l.jsx("div",{ref:lt,className:gt.cn("relative inline-flex items-center",u),"data-hook":S,"data-slot":"text-reveal","data-tracking-el":rt,"data-tracking-label":at,...it,children:l.jsxs("div",{className:"relative flex items-center",style:{width:Z||void 0},children:[l.jsxs("span",{className:"relative inline-block overflow-hidden",style:{width:Z||void 0},children:[$.map((e,t)=>l.jsx("span",{ref:ut(t),style:{display:"block",whiteSpace:"nowrap",visibility:"hidden",clipPath:"inset(0 100% 0 0)",willChange:"clip-path, visibility",...t>0?{position:"absolute",top:0,left:0}:{}},children:e},t)),l.jsx("div",{ref:O,className:"pointer-events-none absolute inset-0",style:{opacity:0,transform:"translateX(-100%)",willChange:"transform, opacity",background:"linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--background) 40%, transparent) 40%, color-mix(in srgb, var(--background) 70%, transparent) 50%, color-mix(in srgb, var(--background) 40%, transparent) 60%, transparent 100%)"}})]}),l.jsx("div",{ref:N,className:"absolute",style:{left:-i/2,top:"50%",marginTop:-i/2,width:i,height:i,transform:"translateX(0px)",willChange:"transform"},children:l.jsxs("svg",{"aria-label":"Loading","data-slot":"text-reveal-ball",fill:"none",height:i,role:"img",style:{overflow:"visible"},viewBox:"-30 -30 560 560",width:i,xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("defs",{children:l.jsxs("linearGradient",{ref:W,id:D,children:[l.jsx("stop",{offset:"-20%",stopColor:nt}),l.jsx("stop",{offset:"120%",stopColor:st})]})}),l.jsx("g",{ref:H,style:{opacity:0,transformOrigin:"250px 250px",willChange:"transform"},children:l.jsx("path",{ref:_,d:o[0],fill:`url(#${D})`})})]})})]})})});et.displayName="TextRevealMotion";exports.TextRevealMotion=et;
1
+ "use strict";var jt=Object.create;var mt=Object.defineProperty;var kt=Object.getOwnPropertyDescriptor;var It=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty;var Xt=(t,n,e,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of It(n))!Ft.call(t,u)&&u!==e&&mt(t,u,{get:()=>n[u],enumerable:!(i=kt(n,u))||i.enumerable});return t};var $t=(t,n,e)=>(e=t!=null?jt(Et(t)):{},Xt(n||!t||!t.__esModule?mt(e,"default",{value:t,enumerable:!0}):e,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),o=require("react"),W=require("framer-motion"),qt=require("@brightlocal/ui-components/lib/utils"),Ot=require("./hooks/use-prefers-reduced-motion.cjs");function Tt(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const ht=Tt(o),gt="M250 500C388.071 500 500 388.071 500 250C500 111.929 388.071 0 250 0C111.929 0 0 111.929 0 250C0 388.071 111.929 500 250 500Z",yt="M492.425 259.355C332.265 293.145 293.145 332.265 259.355 492.425C257.225 502.525 242.775 502.525 240.645 492.425C206.855 332.265 167.735 293.145 7.575 259.355C-2.525 257.225 -2.525 242.775 7.575 240.645C167.735 206.855 206.855 167.735 240.645 7.575C242.775 -2.525 257.225 -2.525 259.355 7.575C293.145 167.735 332.265 206.855 492.425 240.645C502.525 242.775 502.525 257.225 492.425 259.355Z",Ct="M258.366 5.58795L296.379 97.3854C298.509 102.526 304.729 104.546 309.47 101.636L394.177 49.7215C401.057 45.5112 409.598 51.7117 407.708 59.5523L384.506 156.16C383.206 161.571 387.046 166.861 392.596 167.301L491.645 175.092C499.685 175.722 502.945 185.763 496.815 191.003L421.259 255.528C417.029 259.138 417.029 265.679 421.259 269.299L496.815 333.824C502.945 339.065 499.685 349.106 491.645 349.736L392.596 357.526C387.046 357.966 383.206 363.257 384.506 368.667L407.708 465.275C409.588 473.116 401.047 479.326 394.177 475.106L309.47 423.192C304.729 420.282 298.509 422.302 296.379 427.442L258.366 519.24C255.275 526.69 244.725 526.69 241.634 519.24L203.621 427.442C201.491 422.302 195.271 420.282 190.53 423.192L105.823 475.106C98.9428 479.316 90.4021 473.116 92.2922 465.275L115.494 368.667C116.794 363.257 112.954 357.966 107.403 357.526L8.35543 349.736C0.314784 349.106 -2.94548 339.065 3.18502 333.824L78.7411 269.299C82.9715 265.689 82.9715 259.148 78.7411 255.528L3.18502 191.003C-2.94548 185.763 0.314784 175.722 8.35543 175.092L107.403 167.301C112.954 166.861 116.794 161.571 115.494 156.16L92.2922 59.5523C90.4121 51.7117 98.9528 45.5012 105.823 49.7215L190.53 101.636C195.271 104.546 201.491 102.526 203.621 97.3854L241.634 5.58795C244.725 -1.86265 255.275 -1.86265 258.366 5.58795Z",D=t=>t<0?0:t>1?1:t,_t=[gt,yt,Ct,gt,Ct,yt],Dt=30,zt=15,Ht=typeof navigator<"u"&&typeof navigator.hardwareConcurrency=="number"&&navigator.hardwareConcurrency<=4;function Nt(t,n,e){let i=!1,u=null;const h={ballX:0,clipRight:100,rotate:0,pathD:""};function B(){i=!1,t.style.transform=`translateX(${h.ballX}px)`,u&&(u.style.clipPath=`inset(0 ${h.clipRight}% 0 0)`),n.style.transform=`rotate(${h.rotate}deg)`,e.setAttribute("d",h.pathD)}function z(O,Z,G,c){h.ballX=O,h.clipRight=Z,h.rotate=G,h.pathD=c,i||(i=!0,requestAnimationFrame(B))}return z.setItem=O=>{u=O},z}function wt(t,n){return new Promise(e=>{const i=performance.now();function u(){n.cancelled||performance.now()-i>=t?e():requestAnimationFrame(u)}requestAnimationFrame(u)})}const bt=ht.forwardRef(({className:t,dataHook:n,holdTime:e=1300,shimmer:i=!0,gradientFrom:u="var(--loading-gradient-from)",gradientTo:h="var(--loading-gradient-to)",trackingEl:B,trackingLabel:z,children:O,...Z},G)=>{const c=_t,J=.8,K=180,Q=24,V=1,H=Ot.usePrefersReducedMotion(),at=o.useId(),ot=o.useMemo(()=>`text-reveal-gradient-${at.replace(/:/g,"")}`,[at]),Y=o.useRef(null),tt=o.useRef(null),et=o.useRef(null),nt=o.useRef(null),ct=o.useRef(null),rt=o.useRef(null),st=o.useRef(null),j=o.useRef([]),F=ht.Children.toArray(O),[xt,Rt]=o.useState({widths:[],ballSize:0}),{widths:y,ballSize:f}=xt,Mt=o.useCallback(a=>r=>{j.current[a]=r},[]);o.useEffect(()=>{if(j.current.length===0||!j.current[0])return;let a=!1;function r(){if(a)return;const C=[];let M=32;for(let w=0;w<F.length;w++){const v=j.current[w];if(v&&(C[w]=v.scrollWidth,w===0)){const X=v.firstElementChild??v,s=parseFloat(getComputedStyle(X).fontSize)||16;M=Math.round(s*1.5)}}Rt({widths:C,ballSize:M})}return document.fonts.ready.then(()=>{a||requestAnimationFrame(r)}),()=>{a=!0}},[F.length]),o.useEffect(()=>{if(H)return;const a=ct.current;if(!a)return;const r=a;let C,M=null;const w=.12+Math.random()*.06,v=.08+Math.random()*.04,X=Math.random()*Math.PI*2,s=Math.random()*Math.PI*2;let T=-1/0;function N(g){M||(M=g);const d=(g-M)/1e3,m=Math.sin(d*w+X)*Math.PI+Math.sin(d*v+s)*.5;if(Math.abs(m-T)>.01){T=m;const k=Math.cos(m),_=Math.sin(m);r.setAttribute("x1",`${50+45*k}%`),r.setAttribute("y1",`${50+45*_}%`),r.setAttribute("x2",`${50-45*k}%`),r.setAttribute("y2",`${50-45*_}%`)}C=requestAnimationFrame(N)}return C=requestAnimationFrame(N),()=>cancelAnimationFrame(C)},[H]);function vt(a){a.style.opacity="1",W.animate(0,1,{duration:1.2,ease:[.25,1,.5,1],onUpdate:r=>{a.style.transform=`translateX(${-100+r*200}%)`},onComplete:()=>{a.style.opacity="0"}})}o.useEffect(()=>{if(!et.current||!nt.current||!Y.current||!tt.current||!rt.current||!st.current||y.length===0||f===0)return;const a=et.current,r=nt.current,C=Y.current,M=tt.current,w=rt.current,v=st.current;function X(g){const d=`${g}px`;w.style.width=d,v.style.width=d}if(H){a.setAttribute("d",c[0]),r.style.opacity="1";const g=j.current[0];g&&(g.style.opacity="1",g.style.clipPath="none"),X(y[0]??0);const d=f*.25,m=(y[0]??0)+d+f/2;C.style.transform=`translateX(${m}px)`;return}const s={cancelled:!1},T=f*.25;async function N(){const{interpolate:g}=await import("flubber");if(s.cancelled)return;const d=Ht?zt:Dt,m=[];for(let L=0;L<c.length;L++){const S=g(c[L],c[(L+1)%c.length]),A=[];for(let P=0;P<=d;P++)A.push(S(P/d));m.push(A)}const k=Nt(C,r,a);r.style.opacity="1";let _=0,b=0,I=0;for(;!s.cancelled;){const L=_%F.length,S=y[L]??0;X(S);const A=-(T+f/2),P=S+T+f/2,it=P-A,ut=j.current[L];if(!ut)break;k.setItem(ut);for(let l=0;l<F.length;l++){const x=j.current[l];x&&(x.style.opacity=l===L?"1":"0",x.style.clipPath="inset(0 100% 0 0)")}const St=m[b%c.length],U=360,ft=I;if(await new Promise(l=>{if(s.cancelled){l();return}const x=W.animate(A,P,{type:"spring",stiffness:K*J,damping:Q,mass:V,onUpdate:R=>{if(s.cancelled){x.stop(),l();return}const E=D((R-A)/it),$=S>0?100-D(R/S)*100:100,q=Math.round(E*d);k(R,$,ft+E*U,St[q])},onComplete:()=>{I=ft+U,b=(b+1)%c.length,l()}})}),s.cancelled)break;if(i&&vt(M),e>0){const l=performance.now(),x=P;for(;!s.cancelled&&performance.now()-l<e&&(await wt(300,s),!(s.cancelled||performance.now()-l>=e));){const R=(b+1)%c.length,E=m[b%c.length],$=I,q=I+360;await W.animate(0,1,{type:"spring",stiffness:30,damping:9,mass:.5,onUpdate:pt=>{const Pt=Math.round(D(pt)*d);k(x,0,$+pt*(q-$),E[Pt])}}),I=q,b=R}}if(s.cancelled)break;const At=m[b%c.length],dt=I;if(await new Promise(l=>{if(s.cancelled){l();return}const x=W.animate(P,A,{type:"spring",stiffness:K*J,damping:Q,mass:V,onUpdate:R=>{if(s.cancelled){x.stop(),l();return}const E=D(1-(R-A)/it),$=S>0?100-D(R/S)*100:100,q=Math.round(E*d);k(R,$,dt-E*U,At[q])},onComplete:()=>{I=dt-U,b=(b+1)%c.length,l()}})}),s.cancelled)break;await wt(300,s),_++}}return N(),()=>{s.cancelled=!0}},[y,f,F.length,H,J,e,i,K,Q,V,c]);const lt=o.useMemo(()=>y.length>0?Math.max(...y):0,[y]),Lt=y.length>0&&f>0;return p.jsx("div",{ref:G,className:qt.cn("relative inline-flex items-center",t),"data-hook":n,"data-slot":"text-reveal","data-tracking-el":B,"data-tracking-label":z,style:{opacity:Lt?1:0,transition:"opacity 0.4s ease-out"},...Z,children:p.jsxs("div",{ref:rt,className:"relative flex items-center",style:{width:lt||void 0,transition:"width 0.3s ease-out"},children:[p.jsxs("span",{ref:st,className:"relative inline-block overflow-hidden",style:{width:lt||void 0,transition:"width 0.3s ease-out"},children:[F.map((a,r)=>p.jsx("span",{ref:Mt(r),style:{display:"block",whiteSpace:"nowrap",opacity:0,clipPath:"inset(0 100% 0 0)",willChange:"clip-path",...r>0?{position:"absolute",top:0,left:0}:{}},children:a},r)),p.jsx("div",{ref:tt,className:"pointer-events-none absolute inset-0",style:{opacity:0,transform:"translateX(-100%)",willChange:"transform",background:"linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--background) 40%, transparent) 40%, color-mix(in srgb, var(--background) 70%, transparent) 50%, color-mix(in srgb, var(--background) 40%, transparent) 60%, transparent 100%)"}})]}),p.jsx("div",{ref:Y,className:"absolute",style:{left:-f/2,top:"50%",marginTop:-f/2,width:f,height:f,transform:"translateX(0px)",willChange:"transform"},children:p.jsxs("svg",{"aria-label":"Loading","data-slot":"text-reveal-ball",fill:"none",height:f,role:"img",style:{overflow:"visible"},viewBox:"-30 -30 560 560",width:f,xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("defs",{children:p.jsxs("linearGradient",{ref:ct,id:ot,children:[p.jsx("stop",{offset:"-20%",stopColor:u}),p.jsx("stop",{offset:"120%",stopColor:h})]})}),p.jsx("g",{ref:nt,style:{opacity:0,transformOrigin:"250px 250px",willChange:"transform"},children:p.jsx("path",{ref:et,d:c[0],fill:`url(#${ot})`})})]})})]})})});bt.displayName="TextRevealMotion";exports.TextRevealMotion=bt;
@@ -1 +1 @@
1
- {"version":3,"file":"text-reveal-motion.d.ts","sourceRoot":"","sources":["../../src/components/text-reveal-motion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsC/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,UAAU,CACX;IACC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;OAQG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,QAAA,MAAM,gBAAgB,8FA8brB,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"text-reveal-motion.d.ts","sourceRoot":"","sources":["../../src/components/text-reveal-motion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmI/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,UAAU,CACX;IACC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;OAQG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,QAAA,MAAM,gBAAgB,8FAqgBrB,CAAC;AAIF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}