@almadar/ui 4.56.4 → 4.57.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.
@@ -6432,7 +6432,7 @@ var init_Badge = __esm({
6432
6432
  lg: "px-3 py-1.5 text-base"
6433
6433
  };
6434
6434
  Badge = React96__namespace.default.forwardRef(
6435
- ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
6435
+ ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
6436
6436
  const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
6437
6437
  const resolvedIcon = typeof icon === "string" ? (() => {
6438
6438
  const I = resolveIcon(icon);
@@ -6446,12 +6446,31 @@ var init_Badge = __esm({
6446
6446
  "inline-flex items-center gap-1 font-bold rounded-sm",
6447
6447
  variantStyles3[variant],
6448
6448
  sizeStyles3[size],
6449
+ onRemove && "pr-1",
6449
6450
  className
6450
6451
  ),
6451
6452
  ...props,
6452
6453
  children: [
6453
6454
  resolvedIcon,
6454
- children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label)
6455
+ children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label),
6456
+ onRemove ? /* @__PURE__ */ jsxRuntime.jsx(
6457
+ "button",
6458
+ {
6459
+ type: "button",
6460
+ "aria-label": removeLabel ?? "Remove",
6461
+ onClick: (e) => {
6462
+ e.stopPropagation();
6463
+ onRemove();
6464
+ },
6465
+ className: cn(
6466
+ "inline-flex items-center justify-center rounded-sm",
6467
+ "hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring",
6468
+ "transition-colors",
6469
+ size === "sm" ? "w-4 h-4 ml-0.5" : size === "md" ? "w-5 h-5 ml-1" : "w-6 h-6 ml-1"
6470
+ ),
6471
+ children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: iconSizes3[size] })
6472
+ }
6473
+ ) : null
6455
6474
  ]
6456
6475
  }
6457
6476
  );
@@ -13813,7 +13832,7 @@ var init_MapView = __esm({
13813
13832
  shadowSize: [41, 41]
13814
13833
  });
13815
13834
  L.Marker.prototype.options.icon = defaultIcon;
13816
- const { useEffect: useEffect88, useRef: useRef88, useCallback: useCallback128, useState: useState122 } = React96__namespace.default;
13835
+ const { useEffect: useEffect88, useRef: useRef88, useCallback: useCallback129, useState: useState123 } = React96__namespace.default;
13817
13836
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13818
13837
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13819
13838
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -13858,8 +13877,8 @@ var init_MapView = __esm({
13858
13877
  showAttribution = true
13859
13878
  }) {
13860
13879
  const eventBus = useEventBus3();
13861
- const [clickedPosition, setClickedPosition] = useState122(null);
13862
- const handleMapClick = useCallback128((lat, lng) => {
13880
+ const [clickedPosition, setClickedPosition] = useState123(null);
13881
+ const handleMapClick = useCallback129((lat, lng) => {
13863
13882
  if (showClickedPin) {
13864
13883
  setClickedPosition({ lat, lng });
13865
13884
  }
@@ -13868,7 +13887,7 @@ var init_MapView = __esm({
13868
13887
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
13869
13888
  }
13870
13889
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
13871
- const handleMarkerClick = useCallback128((marker) => {
13890
+ const handleMarkerClick = useCallback129((marker) => {
13872
13891
  onMarkerClick?.(marker);
13873
13892
  if (markerClickEvent) {
13874
13893
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -33285,6 +33304,98 @@ var init_TagCloud = __esm({
33285
33304
  TagCloud.displayName = "TagCloud";
33286
33305
  }
33287
33306
  });
33307
+ var TagInput;
33308
+ var init_TagInput = __esm({
33309
+ "components/molecules/TagInput.tsx"() {
33310
+ "use client";
33311
+ init_cn();
33312
+ init_useEventBus();
33313
+ init_Input();
33314
+ init_Badge();
33315
+ init_Stack();
33316
+ init_Typography();
33317
+ TagInput = ({
33318
+ value,
33319
+ onChange,
33320
+ placeholder,
33321
+ disabled = false,
33322
+ variant = "default",
33323
+ unique = true,
33324
+ helperText,
33325
+ className,
33326
+ addEvent,
33327
+ removeEvent
33328
+ }) => {
33329
+ const eventBus = useEventBus();
33330
+ const [draft, setDraft] = React96.useState("");
33331
+ const commit = React96.useCallback(() => {
33332
+ const tag = draft.trim();
33333
+ if (!tag) return;
33334
+ if (unique && value.includes(tag)) {
33335
+ setDraft("");
33336
+ return;
33337
+ }
33338
+ const next = [...value, tag];
33339
+ onChange?.(next);
33340
+ if (addEvent) {
33341
+ eventBus.emit(`UI:${addEvent}`, { tag, value: next });
33342
+ }
33343
+ setDraft("");
33344
+ }, [draft, value, onChange, unique, addEvent, eventBus]);
33345
+ const removeAt = React96.useCallback(
33346
+ (index) => {
33347
+ if (disabled) return;
33348
+ const tag = value[index];
33349
+ const next = value.slice();
33350
+ next.splice(index, 1);
33351
+ onChange?.(next);
33352
+ if (removeEvent) {
33353
+ eventBus.emit(`UI:${removeEvent}`, { tag, index, value: next });
33354
+ }
33355
+ },
33356
+ [value, onChange, disabled, removeEvent, eventBus]
33357
+ );
33358
+ const handleKeyDown = React96.useCallback(
33359
+ (e) => {
33360
+ if (disabled) return;
33361
+ if (e.key === "Enter") {
33362
+ e.preventDefault();
33363
+ commit();
33364
+ } else if (e.key === "Backspace" && draft.length === 0 && value.length > 0) {
33365
+ e.preventDefault();
33366
+ removeAt(value.length - 1);
33367
+ }
33368
+ },
33369
+ [commit, draft.length, value, removeAt, disabled]
33370
+ );
33371
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: cn("w-full", className), children: [
33372
+ value.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-wrap", children: value.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsx(
33373
+ Badge,
33374
+ {
33375
+ variant,
33376
+ size: "sm",
33377
+ onRemove: disabled ? void 0 : () => removeAt(index),
33378
+ removeLabel: `Remove ${tag}`,
33379
+ children: tag
33380
+ },
33381
+ `${tag}-${index}`
33382
+ )) }) : null,
33383
+ /* @__PURE__ */ jsxRuntime.jsx(
33384
+ Input,
33385
+ {
33386
+ value: draft,
33387
+ placeholder: placeholder ?? "Type and press Enter\u2026",
33388
+ disabled,
33389
+ onChange: (e) => setDraft(e.target.value),
33390
+ onKeyDown: handleKeyDown
33391
+ }
33392
+ ),
33393
+ helperText ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: helperText }) : null
33394
+ ] });
33395
+ };
33396
+ TagInput.displayName = "TagInput";
33397
+ }
33398
+ });
33288
33399
  var ShowcaseCard;
33289
33400
  var init_ShowcaseCard = __esm({
33290
33401
  "components/molecules/ShowcaseCard.tsx"() {
@@ -53843,6 +53954,7 @@ var init_component_registry_generated = __esm({
53843
53954
  init_Table();
53844
53955
  init_Tabs();
53845
53956
  init_TagCloud();
53957
+ init_TagInput();
53846
53958
  init_TeamCard();
53847
53959
  init_TeamOrganism();
53848
53960
  init_TextHighlight();
@@ -54158,6 +54270,7 @@ var init_component_registry_generated = __esm({
54158
54270
  "Table": Table,
54159
54271
  "Tabs": Tabs,
54160
54272
  "TagCloud": TagCloud,
54273
+ "TagInput": TagInput,
54161
54274
  "TeamCard": TeamCard,
54162
54275
  "TeamOrganism": TeamOrganism,
54163
54276
  "TextHighlight": TextHighlight,
package/dist/avl/index.js CHANGED
@@ -6,7 +6,7 @@ import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
7
7
  import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
8
8
  import * as LucideIcons from 'lucide-react';
9
- import { Loader2, ChevronDown, X, Check, Copy, AlertTriangle, Info, AlertCircle, CheckCircle, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Trash2, Menu as Menu$1, Search, Bell, LogOut, ZoomOut, ZoomIn, Download, FileQuestion, Inbox, XCircle, Filter, Pause, Play, RotateCcw, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, Minus, ArrowLeft, Camera, RefreshCw, HelpCircle, ChevronUp, MessageSquare, Flag, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Eraser, Star, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, Sun, Moon, Circle, Clock, CheckCircle2, FileWarning, GitCommit, AlignLeft, Columns, SkipForward, Bug, Send, Wrench, User, Tag, DollarSign, Coffee, Users, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
9
+ import { Loader2, X, ChevronDown, Check, Copy, AlertTriangle, Info, AlertCircle, CheckCircle, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Trash2, Menu as Menu$1, Search, Bell, LogOut, ZoomOut, ZoomIn, Download, FileQuestion, Inbox, XCircle, Filter, Pause, Play, RotateCcw, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, Minus, ArrowLeft, Camera, RefreshCw, HelpCircle, ChevronUp, MessageSquare, Flag, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Eraser, Star, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, Sun, Moon, Circle, Clock, CheckCircle2, FileWarning, GitCommit, AlignLeft, Columns, SkipForward, Bug, Send, Wrench, User, Tag, DollarSign, Coffee, Users, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
10
10
  import { evaluate, createMinimalContext } from '@almadar/evaluator';
11
11
  import { createPortal } from 'react-dom';
12
12
  import { Link, Outlet, useLocation } from 'react-router-dom';
@@ -6386,7 +6386,7 @@ var init_Badge = __esm({
6386
6386
  lg: "px-3 py-1.5 text-base"
6387
6387
  };
6388
6388
  Badge = React96__default.forwardRef(
6389
- ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
6389
+ ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
6390
6390
  const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
6391
6391
  const resolvedIcon = typeof icon === "string" ? (() => {
6392
6392
  const I = resolveIcon(icon);
@@ -6400,12 +6400,31 @@ var init_Badge = __esm({
6400
6400
  "inline-flex items-center gap-1 font-bold rounded-sm",
6401
6401
  variantStyles3[variant],
6402
6402
  sizeStyles3[size],
6403
+ onRemove && "pr-1",
6403
6404
  className
6404
6405
  ),
6405
6406
  ...props,
6406
6407
  children: [
6407
6408
  resolvedIcon,
6408
- children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label)
6409
+ children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label),
6410
+ onRemove ? /* @__PURE__ */ jsx(
6411
+ "button",
6412
+ {
6413
+ type: "button",
6414
+ "aria-label": removeLabel ?? "Remove",
6415
+ onClick: (e) => {
6416
+ e.stopPropagation();
6417
+ onRemove();
6418
+ },
6419
+ className: cn(
6420
+ "inline-flex items-center justify-center rounded-sm",
6421
+ "hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring",
6422
+ "transition-colors",
6423
+ size === "sm" ? "w-4 h-4 ml-0.5" : size === "md" ? "w-5 h-5 ml-1" : "w-6 h-6 ml-1"
6424
+ ),
6425
+ children: /* @__PURE__ */ jsx(X, { className: iconSizes3[size] })
6426
+ }
6427
+ ) : null
6409
6428
  ]
6410
6429
  }
6411
6430
  );
@@ -13767,7 +13786,7 @@ var init_MapView = __esm({
13767
13786
  shadowSize: [41, 41]
13768
13787
  });
13769
13788
  L.Marker.prototype.options.icon = defaultIcon;
13770
- const { useEffect: useEffect88, useRef: useRef88, useCallback: useCallback128, useState: useState122 } = React96__default;
13789
+ const { useEffect: useEffect88, useRef: useRef88, useCallback: useCallback129, useState: useState123 } = React96__default;
13771
13790
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13772
13791
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13773
13792
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -13812,8 +13831,8 @@ var init_MapView = __esm({
13812
13831
  showAttribution = true
13813
13832
  }) {
13814
13833
  const eventBus = useEventBus3();
13815
- const [clickedPosition, setClickedPosition] = useState122(null);
13816
- const handleMapClick = useCallback128((lat, lng) => {
13834
+ const [clickedPosition, setClickedPosition] = useState123(null);
13835
+ const handleMapClick = useCallback129((lat, lng) => {
13817
13836
  if (showClickedPin) {
13818
13837
  setClickedPosition({ lat, lng });
13819
13838
  }
@@ -13822,7 +13841,7 @@ var init_MapView = __esm({
13822
13841
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
13823
13842
  }
13824
13843
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
13825
- const handleMarkerClick = useCallback128((marker) => {
13844
+ const handleMarkerClick = useCallback129((marker) => {
13826
13845
  onMarkerClick?.(marker);
13827
13846
  if (markerClickEvent) {
13828
13847
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -33239,6 +33258,98 @@ var init_TagCloud = __esm({
33239
33258
  TagCloud.displayName = "TagCloud";
33240
33259
  }
33241
33260
  });
33261
+ var TagInput;
33262
+ var init_TagInput = __esm({
33263
+ "components/molecules/TagInput.tsx"() {
33264
+ "use client";
33265
+ init_cn();
33266
+ init_useEventBus();
33267
+ init_Input();
33268
+ init_Badge();
33269
+ init_Stack();
33270
+ init_Typography();
33271
+ TagInput = ({
33272
+ value,
33273
+ onChange,
33274
+ placeholder,
33275
+ disabled = false,
33276
+ variant = "default",
33277
+ unique = true,
33278
+ helperText,
33279
+ className,
33280
+ addEvent,
33281
+ removeEvent
33282
+ }) => {
33283
+ const eventBus = useEventBus();
33284
+ const [draft, setDraft] = useState("");
33285
+ const commit = useCallback(() => {
33286
+ const tag = draft.trim();
33287
+ if (!tag) return;
33288
+ if (unique && value.includes(tag)) {
33289
+ setDraft("");
33290
+ return;
33291
+ }
33292
+ const next = [...value, tag];
33293
+ onChange?.(next);
33294
+ if (addEvent) {
33295
+ eventBus.emit(`UI:${addEvent}`, { tag, value: next });
33296
+ }
33297
+ setDraft("");
33298
+ }, [draft, value, onChange, unique, addEvent, eventBus]);
33299
+ const removeAt = useCallback(
33300
+ (index) => {
33301
+ if (disabled) return;
33302
+ const tag = value[index];
33303
+ const next = value.slice();
33304
+ next.splice(index, 1);
33305
+ onChange?.(next);
33306
+ if (removeEvent) {
33307
+ eventBus.emit(`UI:${removeEvent}`, { tag, index, value: next });
33308
+ }
33309
+ },
33310
+ [value, onChange, disabled, removeEvent, eventBus]
33311
+ );
33312
+ const handleKeyDown = useCallback(
33313
+ (e) => {
33314
+ if (disabled) return;
33315
+ if (e.key === "Enter") {
33316
+ e.preventDefault();
33317
+ commit();
33318
+ } else if (e.key === "Backspace" && draft.length === 0 && value.length > 0) {
33319
+ e.preventDefault();
33320
+ removeAt(value.length - 1);
33321
+ }
33322
+ },
33323
+ [commit, draft.length, value, removeAt, disabled]
33324
+ );
33325
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: cn("w-full", className), children: [
33326
+ value.length > 0 ? /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: value.map((tag, index) => /* @__PURE__ */ jsx(
33327
+ Badge,
33328
+ {
33329
+ variant,
33330
+ size: "sm",
33331
+ onRemove: disabled ? void 0 : () => removeAt(index),
33332
+ removeLabel: `Remove ${tag}`,
33333
+ children: tag
33334
+ },
33335
+ `${tag}-${index}`
33336
+ )) }) : null,
33337
+ /* @__PURE__ */ jsx(
33338
+ Input,
33339
+ {
33340
+ value: draft,
33341
+ placeholder: placeholder ?? "Type and press Enter\u2026",
33342
+ disabled,
33343
+ onChange: (e) => setDraft(e.target.value),
33344
+ onKeyDown: handleKeyDown
33345
+ }
33346
+ ),
33347
+ helperText ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: helperText }) : null
33348
+ ] });
33349
+ };
33350
+ TagInput.displayName = "TagInput";
33351
+ }
33352
+ });
33242
33353
  var ShowcaseCard;
33243
33354
  var init_ShowcaseCard = __esm({
33244
33355
  "components/molecules/ShowcaseCard.tsx"() {
@@ -53797,6 +53908,7 @@ var init_component_registry_generated = __esm({
53797
53908
  init_Table();
53798
53909
  init_Tabs();
53799
53910
  init_TagCloud();
53911
+ init_TagInput();
53800
53912
  init_TeamCard();
53801
53913
  init_TeamOrganism();
53802
53914
  init_TextHighlight();
@@ -54112,6 +54224,7 @@ var init_component_registry_generated = __esm({
54112
54224
  "Table": Table,
54113
54225
  "Tabs": Tabs,
54114
54226
  "TagCloud": TagCloud,
54227
+ "TagInput": TagInput,
54115
54228
  "TeamCard": TeamCard,
54116
54229
  "TeamOrganism": TeamOrganism,
54117
54230
  "TextHighlight": TextHighlight,
@@ -12,5 +12,12 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
12
12
  label?: string | number;
13
13
  /** Icon name (Lucide icon string) or React node */
14
14
  icon?: React.ReactNode;
15
+ /** When set, renders a small X button on the right of the badge that
16
+ * invokes this handler — turns the badge into a removable chip.
17
+ * Used by the TagInput molecule and other "list of removable values"
18
+ * surfaces. */
19
+ onRemove?: () => void;
20
+ /** Accessible label for the remove button. Defaults to "Remove". */
21
+ removeLabel?: string;
15
22
  }
16
23
  export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1770,7 +1770,7 @@ var init_Badge = __esm({
1770
1770
  lg: "px-3 py-1.5 text-base"
1771
1771
  };
1772
1772
  exports.Badge = React78__namespace.default.forwardRef(
1773
- ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1773
+ ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
1774
1774
  const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1775
1775
  const resolvedIcon = typeof icon === "string" ? (() => {
1776
1776
  const I = resolveIcon(icon);
@@ -1784,12 +1784,31 @@ var init_Badge = __esm({
1784
1784
  "inline-flex items-center gap-1 font-bold rounded-sm",
1785
1785
  variantStyles3[variant],
1786
1786
  sizeStyles2[size],
1787
+ onRemove && "pr-1",
1787
1788
  className
1788
1789
  ),
1789
1790
  ...props,
1790
1791
  children: [
1791
1792
  resolvedIcon,
1792
- children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label)
1793
+ children || (amount != null ? `${label ? `${label} ` : ""}${amount}` : label),
1794
+ onRemove ? /* @__PURE__ */ jsxRuntime.jsx(
1795
+ "button",
1796
+ {
1797
+ type: "button",
1798
+ "aria-label": removeLabel ?? "Remove",
1799
+ onClick: (e) => {
1800
+ e.stopPropagation();
1801
+ onRemove();
1802
+ },
1803
+ className: cn(
1804
+ "inline-flex items-center justify-center rounded-sm",
1805
+ "hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring",
1806
+ "transition-colors",
1807
+ size === "sm" ? "w-4 h-4 ml-0.5" : size === "md" ? "w-5 h-5 ml-1" : "w-6 h-6 ml-1"
1808
+ ),
1809
+ children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: iconSizes3[size] })
1810
+ }
1811
+ ) : null
1793
1812
  ]
1794
1813
  }
1795
1814
  );
@@ -7870,7 +7889,7 @@ var init_MapView = __esm({
7870
7889
  shadowSize: [41, 41]
7871
7890
  });
7872
7891
  L.Marker.prototype.options.icon = defaultIcon;
7873
- const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback126, useState: useState108 } = React78__namespace.default;
7892
+ const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback127, useState: useState109 } = React78__namespace.default;
7874
7893
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
7875
7894
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
7876
7895
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -7915,8 +7934,8 @@ var init_MapView = __esm({
7915
7934
  showAttribution = true
7916
7935
  }) {
7917
7936
  const eventBus = useEventBus2();
7918
- const [clickedPosition, setClickedPosition] = useState108(null);
7919
- const handleMapClick = useCallback126((lat, lng) => {
7937
+ const [clickedPosition, setClickedPosition] = useState109(null);
7938
+ const handleMapClick = useCallback127((lat, lng) => {
7920
7939
  if (showClickedPin) {
7921
7940
  setClickedPosition({ lat, lng });
7922
7941
  }
@@ -7925,7 +7944,7 @@ var init_MapView = __esm({
7925
7944
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
7926
7945
  }
7927
7946
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
7928
- const handleMarkerClick = useCallback126((marker) => {
7947
+ const handleMarkerClick = useCallback127((marker) => {
7929
7948
  onMarkerClick?.(marker);
7930
7949
  if (markerClickEvent) {
7931
7950
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -28744,6 +28763,98 @@ var init_TagCloud = __esm({
28744
28763
  exports.TagCloud.displayName = "TagCloud";
28745
28764
  }
28746
28765
  });
28766
+ exports.TagInput = void 0;
28767
+ var init_TagInput = __esm({
28768
+ "components/molecules/TagInput.tsx"() {
28769
+ "use client";
28770
+ init_cn();
28771
+ init_useEventBus();
28772
+ init_Input();
28773
+ init_Badge();
28774
+ init_Stack();
28775
+ init_Typography();
28776
+ exports.TagInput = ({
28777
+ value,
28778
+ onChange,
28779
+ placeholder,
28780
+ disabled = false,
28781
+ variant = "default",
28782
+ unique = true,
28783
+ helperText,
28784
+ className,
28785
+ addEvent,
28786
+ removeEvent
28787
+ }) => {
28788
+ const eventBus = useEventBus();
28789
+ const [draft, setDraft] = React78.useState("");
28790
+ const commit = React78.useCallback(() => {
28791
+ const tag = draft.trim();
28792
+ if (!tag) return;
28793
+ if (unique && value.includes(tag)) {
28794
+ setDraft("");
28795
+ return;
28796
+ }
28797
+ const next = [...value, tag];
28798
+ onChange?.(next);
28799
+ if (addEvent) {
28800
+ eventBus.emit(`UI:${addEvent}`, { tag, value: next });
28801
+ }
28802
+ setDraft("");
28803
+ }, [draft, value, onChange, unique, addEvent, eventBus]);
28804
+ const removeAt = React78.useCallback(
28805
+ (index) => {
28806
+ if (disabled) return;
28807
+ const tag = value[index];
28808
+ const next = value.slice();
28809
+ next.splice(index, 1);
28810
+ onChange?.(next);
28811
+ if (removeEvent) {
28812
+ eventBus.emit(`UI:${removeEvent}`, { tag, index, value: next });
28813
+ }
28814
+ },
28815
+ [value, onChange, disabled, removeEvent, eventBus]
28816
+ );
28817
+ const handleKeyDown = React78.useCallback(
28818
+ (e) => {
28819
+ if (disabled) return;
28820
+ if (e.key === "Enter") {
28821
+ e.preventDefault();
28822
+ commit();
28823
+ } else if (e.key === "Backspace" && draft.length === 0 && value.length > 0) {
28824
+ e.preventDefault();
28825
+ removeAt(value.length - 1);
28826
+ }
28827
+ },
28828
+ [commit, draft.length, value, removeAt, disabled]
28829
+ );
28830
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", className: cn("w-full", className), children: [
28831
+ value.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { gap: "xs", className: "flex-wrap", children: value.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsx(
28832
+ exports.Badge,
28833
+ {
28834
+ variant,
28835
+ size: "sm",
28836
+ onRemove: disabled ? void 0 : () => removeAt(index),
28837
+ removeLabel: `Remove ${tag}`,
28838
+ children: tag
28839
+ },
28840
+ `${tag}-${index}`
28841
+ )) }) : null,
28842
+ /* @__PURE__ */ jsxRuntime.jsx(
28843
+ exports.Input,
28844
+ {
28845
+ value: draft,
28846
+ placeholder: placeholder ?? "Type and press Enter\u2026",
28847
+ disabled,
28848
+ onChange: (e) => setDraft(e.target.value),
28849
+ onKeyDown: handleKeyDown
28850
+ }
28851
+ ),
28852
+ helperText ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", children: helperText }) : null
28853
+ ] });
28854
+ };
28855
+ exports.TagInput.displayName = "TagInput";
28856
+ }
28857
+ });
28747
28858
  exports.ShowcaseCard = void 0;
28748
28859
  var init_ShowcaseCard = __esm({
28749
28860
  "components/molecules/ShowcaseCard.tsx"() {
@@ -32879,6 +32990,7 @@ var init_molecules = __esm({
32879
32990
  init_StepFlow();
32880
32991
  init_SplitSection();
32881
32992
  init_TagCloud();
32993
+ init_TagInput();
32882
32994
  init_CommunityLinks();
32883
32995
  init_TeamCard();
32884
32996
  init_ShowcaseCard();
@@ -44829,6 +44941,7 @@ var init_component_registry_generated = __esm({
44829
44941
  init_Table();
44830
44942
  init_Tabs();
44831
44943
  init_TagCloud();
44944
+ init_TagInput();
44832
44945
  init_TeamCard();
44833
44946
  init_TeamOrganism();
44834
44947
  init_TextHighlight();
@@ -45144,6 +45257,7 @@ var init_component_registry_generated = __esm({
45144
45257
  "Table": exports.Table,
45145
45258
  "Tabs": exports.Tabs,
45146
45259
  "TagCloud": exports.TagCloud,
45260
+ "TagInput": exports.TagInput,
45147
45261
  "TeamCard": exports.TeamCard,
45148
45262
  "TeamOrganism": exports.TeamOrganism,
45149
45263
  "TextHighlight": exports.TextHighlight,