@almadar/ui 4.57.0 → 4.57.2

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.
@@ -9345,7 +9345,7 @@ var init_MapView = __esm({
9345
9345
  shadowSize: [41, 41]
9346
9346
  });
9347
9347
  L.Marker.prototype.options.icon = defaultIcon;
9348
- const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback112, useState: useState100 } = React83__namespace.default;
9348
+ const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback113, useState: useState101 } = React83__namespace.default;
9349
9349
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9350
9350
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9351
9351
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -9390,8 +9390,8 @@ var init_MapView = __esm({
9390
9390
  showAttribution = true
9391
9391
  }) {
9392
9392
  const eventBus = useEventBus2();
9393
- const [clickedPosition, setClickedPosition] = useState100(null);
9394
- const handleMapClick = useCallback112((lat, lng) => {
9393
+ const [clickedPosition, setClickedPosition] = useState101(null);
9394
+ const handleMapClick = useCallback113((lat, lng) => {
9395
9395
  if (showClickedPin) {
9396
9396
  setClickedPosition({ lat, lng });
9397
9397
  }
@@ -9400,7 +9400,7 @@ var init_MapView = __esm({
9400
9400
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
9401
9401
  }
9402
9402
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
9403
- const handleMarkerClick = useCallback112((marker) => {
9403
+ const handleMarkerClick = useCallback113((marker) => {
9404
9404
  onMarkerClick?.(marker);
9405
9405
  if (markerClickEvent) {
9406
9406
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -29283,6 +29283,98 @@ var init_TagCloud = __esm({
29283
29283
  TagCloud.displayName = "TagCloud";
29284
29284
  }
29285
29285
  });
29286
+ var TagInput;
29287
+ var init_TagInput = __esm({
29288
+ "components/molecules/TagInput.tsx"() {
29289
+ "use client";
29290
+ init_cn();
29291
+ init_useEventBus();
29292
+ init_Input();
29293
+ init_Badge();
29294
+ init_Stack();
29295
+ init_Typography();
29296
+ TagInput = ({
29297
+ value,
29298
+ onChange,
29299
+ placeholder,
29300
+ disabled = false,
29301
+ variant = "default",
29302
+ unique = true,
29303
+ helperText,
29304
+ className,
29305
+ addEvent,
29306
+ removeEvent
29307
+ }) => {
29308
+ const eventBus = useEventBus();
29309
+ const [draft, setDraft] = React83.useState("");
29310
+ const commit = React83.useCallback(() => {
29311
+ const tag = draft.trim();
29312
+ if (!tag) return;
29313
+ if (unique && value.includes(tag)) {
29314
+ setDraft("");
29315
+ return;
29316
+ }
29317
+ const next = [...value, tag];
29318
+ onChange?.(next);
29319
+ if (addEvent) {
29320
+ eventBus.emit(`UI:${addEvent}`, { tag, value: next });
29321
+ }
29322
+ setDraft("");
29323
+ }, [draft, value, onChange, unique, addEvent, eventBus]);
29324
+ const removeAt = React83.useCallback(
29325
+ (index) => {
29326
+ if (disabled) return;
29327
+ const tag = value[index];
29328
+ const next = value.slice();
29329
+ next.splice(index, 1);
29330
+ onChange?.(next);
29331
+ if (removeEvent) {
29332
+ eventBus.emit(`UI:${removeEvent}`, { tag, index, value: next });
29333
+ }
29334
+ },
29335
+ [value, onChange, disabled, removeEvent, eventBus]
29336
+ );
29337
+ const handleKeyDown = React83.useCallback(
29338
+ (e) => {
29339
+ if (disabled) return;
29340
+ if (e.key === "Enter") {
29341
+ e.preventDefault();
29342
+ commit();
29343
+ } else if (e.key === "Backspace" && draft.length === 0 && value.length > 0) {
29344
+ e.preventDefault();
29345
+ removeAt(value.length - 1);
29346
+ }
29347
+ },
29348
+ [commit, draft.length, value, removeAt, disabled]
29349
+ );
29350
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", className: cn("w-full", className), children: [
29351
+ value.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", className: "flex-wrap", children: value.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsx(
29352
+ Badge,
29353
+ {
29354
+ variant,
29355
+ size: "sm",
29356
+ onRemove: disabled ? void 0 : () => removeAt(index),
29357
+ removeLabel: `Remove ${tag}`,
29358
+ children: tag
29359
+ },
29360
+ `${tag}-${index}`
29361
+ )) }) : null,
29362
+ /* @__PURE__ */ jsxRuntime.jsx(
29363
+ Input,
29364
+ {
29365
+ value: draft,
29366
+ placeholder: placeholder ?? "Type and press Enter\u2026",
29367
+ disabled,
29368
+ onChange: (e) => setDraft(e.target.value),
29369
+ onKeyDown: handleKeyDown
29370
+ }
29371
+ ),
29372
+ helperText ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: helperText }) : null
29373
+ ] });
29374
+ };
29375
+ TagInput.displayName = "TagInput";
29376
+ }
29377
+ });
29286
29378
  var ShowcaseCard;
29287
29379
  var init_ShowcaseCard = __esm({
29288
29380
  "components/molecules/ShowcaseCard.tsx"() {
@@ -32901,6 +32993,75 @@ var init_GradientDivider = __esm({
32901
32993
  GradientDivider.displayName = "GradientDivider";
32902
32994
  }
32903
32995
  });
32996
+ var MarketingFooter;
32997
+ var init_MarketingFooter = __esm({
32998
+ "components/molecules/MarketingFooter.tsx"() {
32999
+ "use client";
33000
+ init_cn();
33001
+ init_Box();
33002
+ init_Stack();
33003
+ init_Typography();
33004
+ MarketingFooter = ({
33005
+ columns,
33006
+ copyright,
33007
+ logo,
33008
+ className
33009
+ }) => {
33010
+ return /* @__PURE__ */ jsxRuntime.jsx(
33011
+ Box,
33012
+ {
33013
+ as: "footer",
33014
+ className: cn(
33015
+ "bg-surface",
33016
+ "border-t border-border",
33017
+ "pt-12 pb-8 px-4",
33018
+ className
33019
+ ),
33020
+ children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "lg", className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
33021
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "lg", align: "start", className: "flex-wrap w-full justify-between", children: [
33022
+ logo && /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: logo.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: logo.href, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }) : /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }),
33023
+ columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: [
33024
+ /* @__PURE__ */ jsxRuntime.jsx(
33025
+ Typography,
33026
+ {
33027
+ variant: "body2",
33028
+ className: "font-semibold text-foreground mb-1",
33029
+ children: col.title
33030
+ }
33031
+ ),
33032
+ col.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
33033
+ "a",
33034
+ {
33035
+ href: item.href,
33036
+ className: cn(
33037
+ "text-sm no-underline",
33038
+ "text-foreground/60",
33039
+ "hover:text-accent",
33040
+ "transition-colors duration-150"
33041
+ ),
33042
+ target: item.href.startsWith("http") ? "_blank" : void 0,
33043
+ rel: item.href.startsWith("http") ? "noopener noreferrer" : void 0,
33044
+ children: item.label
33045
+ },
33046
+ item.label
33047
+ ))
33048
+ ] }, col.title))
33049
+ ] }),
33050
+ copyright && /* @__PURE__ */ jsxRuntime.jsx(
33051
+ Typography,
33052
+ {
33053
+ variant: "caption",
33054
+ className: "text-foreground/30 text-center w-full pt-6",
33055
+ children: copyright
33056
+ }
33057
+ )
33058
+ ] })
33059
+ }
33060
+ );
33061
+ };
33062
+ MarketingFooter.displayName = "MarketingFooter";
33063
+ }
33064
+ });
32904
33065
  var PullQuote;
32905
33066
  var init_PullQuote = __esm({
32906
33067
  "components/molecules/PullQuote.tsx"() {
@@ -44656,6 +44817,7 @@ var init_component_registry_generated = __esm({
44656
44817
  init_List();
44657
44818
  init_LoadingState();
44658
44819
  init_MarkdownContent();
44820
+ init_MarketingFooter();
44659
44821
  init_MasterDetail();
44660
44822
  init_MasterDetailLayout();
44661
44823
  init_MatrixQuestion();
@@ -44755,6 +44917,7 @@ var init_component_registry_generated = __esm({
44755
44917
  init_Table();
44756
44918
  init_Tabs();
44757
44919
  init_TagCloud();
44920
+ init_TagInput();
44758
44921
  init_TeamCard();
44759
44922
  init_TeamOrganism();
44760
44923
  init_TextHighlight();
@@ -44955,6 +45118,7 @@ var init_component_registry_generated = __esm({
44955
45118
  "MapView": MapViewPattern,
44956
45119
  "MapViewPattern": MapViewPattern,
44957
45120
  "MarkdownContent": MarkdownContent,
45121
+ "MarketingFooter": MarketingFooter,
44958
45122
  "MasterDetail": MasterDetail,
44959
45123
  "MasterDetailLayout": MasterDetailLayout,
44960
45124
  "MatrixQuestion": MatrixQuestion,
@@ -45070,6 +45234,7 @@ var init_component_registry_generated = __esm({
45070
45234
  "Table": Table,
45071
45235
  "Tabs": Tabs,
45072
45236
  "TagCloud": TagCloud,
45237
+ "TagInput": TagInput,
45073
45238
  "TeamCard": TeamCard,
45074
45239
  "TeamOrganism": TeamOrganism,
45075
45240
  "TextHighlight": TextHighlight,
@@ -9299,7 +9299,7 @@ var init_MapView = __esm({
9299
9299
  shadowSize: [41, 41]
9300
9300
  });
9301
9301
  L.Marker.prototype.options.icon = defaultIcon;
9302
- const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback112, useState: useState100 } = React83__default;
9302
+ const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback113, useState: useState101 } = React83__default;
9303
9303
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9304
9304
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9305
9305
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -9344,8 +9344,8 @@ var init_MapView = __esm({
9344
9344
  showAttribution = true
9345
9345
  }) {
9346
9346
  const eventBus = useEventBus2();
9347
- const [clickedPosition, setClickedPosition] = useState100(null);
9348
- const handleMapClick = useCallback112((lat, lng) => {
9347
+ const [clickedPosition, setClickedPosition] = useState101(null);
9348
+ const handleMapClick = useCallback113((lat, lng) => {
9349
9349
  if (showClickedPin) {
9350
9350
  setClickedPosition({ lat, lng });
9351
9351
  }
@@ -9354,7 +9354,7 @@ var init_MapView = __esm({
9354
9354
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
9355
9355
  }
9356
9356
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
9357
- const handleMarkerClick = useCallback112((marker) => {
9357
+ const handleMarkerClick = useCallback113((marker) => {
9358
9358
  onMarkerClick?.(marker);
9359
9359
  if (markerClickEvent) {
9360
9360
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -29237,6 +29237,98 @@ var init_TagCloud = __esm({
29237
29237
  TagCloud.displayName = "TagCloud";
29238
29238
  }
29239
29239
  });
29240
+ var TagInput;
29241
+ var init_TagInput = __esm({
29242
+ "components/molecules/TagInput.tsx"() {
29243
+ "use client";
29244
+ init_cn();
29245
+ init_useEventBus();
29246
+ init_Input();
29247
+ init_Badge();
29248
+ init_Stack();
29249
+ init_Typography();
29250
+ TagInput = ({
29251
+ value,
29252
+ onChange,
29253
+ placeholder,
29254
+ disabled = false,
29255
+ variant = "default",
29256
+ unique = true,
29257
+ helperText,
29258
+ className,
29259
+ addEvent,
29260
+ removeEvent
29261
+ }) => {
29262
+ const eventBus = useEventBus();
29263
+ const [draft, setDraft] = useState("");
29264
+ const commit = useCallback(() => {
29265
+ const tag = draft.trim();
29266
+ if (!tag) return;
29267
+ if (unique && value.includes(tag)) {
29268
+ setDraft("");
29269
+ return;
29270
+ }
29271
+ const next = [...value, tag];
29272
+ onChange?.(next);
29273
+ if (addEvent) {
29274
+ eventBus.emit(`UI:${addEvent}`, { tag, value: next });
29275
+ }
29276
+ setDraft("");
29277
+ }, [draft, value, onChange, unique, addEvent, eventBus]);
29278
+ const removeAt = useCallback(
29279
+ (index) => {
29280
+ if (disabled) return;
29281
+ const tag = value[index];
29282
+ const next = value.slice();
29283
+ next.splice(index, 1);
29284
+ onChange?.(next);
29285
+ if (removeEvent) {
29286
+ eventBus.emit(`UI:${removeEvent}`, { tag, index, value: next });
29287
+ }
29288
+ },
29289
+ [value, onChange, disabled, removeEvent, eventBus]
29290
+ );
29291
+ const handleKeyDown = useCallback(
29292
+ (e) => {
29293
+ if (disabled) return;
29294
+ if (e.key === "Enter") {
29295
+ e.preventDefault();
29296
+ commit();
29297
+ } else if (e.key === "Backspace" && draft.length === 0 && value.length > 0) {
29298
+ e.preventDefault();
29299
+ removeAt(value.length - 1);
29300
+ }
29301
+ },
29302
+ [commit, draft.length, value, removeAt, disabled]
29303
+ );
29304
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: cn("w-full", className), children: [
29305
+ value.length > 0 ? /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: value.map((tag, index) => /* @__PURE__ */ jsx(
29306
+ Badge,
29307
+ {
29308
+ variant,
29309
+ size: "sm",
29310
+ onRemove: disabled ? void 0 : () => removeAt(index),
29311
+ removeLabel: `Remove ${tag}`,
29312
+ children: tag
29313
+ },
29314
+ `${tag}-${index}`
29315
+ )) }) : null,
29316
+ /* @__PURE__ */ jsx(
29317
+ Input,
29318
+ {
29319
+ value: draft,
29320
+ placeholder: placeholder ?? "Type and press Enter\u2026",
29321
+ disabled,
29322
+ onChange: (e) => setDraft(e.target.value),
29323
+ onKeyDown: handleKeyDown
29324
+ }
29325
+ ),
29326
+ helperText ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: helperText }) : null
29327
+ ] });
29328
+ };
29329
+ TagInput.displayName = "TagInput";
29330
+ }
29331
+ });
29240
29332
  var ShowcaseCard;
29241
29333
  var init_ShowcaseCard = __esm({
29242
29334
  "components/molecules/ShowcaseCard.tsx"() {
@@ -32855,6 +32947,75 @@ var init_GradientDivider = __esm({
32855
32947
  GradientDivider.displayName = "GradientDivider";
32856
32948
  }
32857
32949
  });
32950
+ var MarketingFooter;
32951
+ var init_MarketingFooter = __esm({
32952
+ "components/molecules/MarketingFooter.tsx"() {
32953
+ "use client";
32954
+ init_cn();
32955
+ init_Box();
32956
+ init_Stack();
32957
+ init_Typography();
32958
+ MarketingFooter = ({
32959
+ columns,
32960
+ copyright,
32961
+ logo,
32962
+ className
32963
+ }) => {
32964
+ return /* @__PURE__ */ jsx(
32965
+ Box,
32966
+ {
32967
+ as: "footer",
32968
+ className: cn(
32969
+ "bg-surface",
32970
+ "border-t border-border",
32971
+ "pt-12 pb-8 px-4",
32972
+ className
32973
+ ),
32974
+ children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
32975
+ /* @__PURE__ */ jsxs(HStack, { gap: "lg", align: "start", className: "flex-wrap w-full justify-between", children: [
32976
+ logo && /* @__PURE__ */ jsx(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: logo.href ? /* @__PURE__ */ jsx("a", { href: logo.href, children: /* @__PURE__ */ jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }) : /* @__PURE__ */ jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }),
32977
+ columns.map((col) => /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: [
32978
+ /* @__PURE__ */ jsx(
32979
+ Typography,
32980
+ {
32981
+ variant: "body2",
32982
+ className: "font-semibold text-foreground mb-1",
32983
+ children: col.title
32984
+ }
32985
+ ),
32986
+ col.items.map((item) => /* @__PURE__ */ jsx(
32987
+ "a",
32988
+ {
32989
+ href: item.href,
32990
+ className: cn(
32991
+ "text-sm no-underline",
32992
+ "text-foreground/60",
32993
+ "hover:text-accent",
32994
+ "transition-colors duration-150"
32995
+ ),
32996
+ target: item.href.startsWith("http") ? "_blank" : void 0,
32997
+ rel: item.href.startsWith("http") ? "noopener noreferrer" : void 0,
32998
+ children: item.label
32999
+ },
33000
+ item.label
33001
+ ))
33002
+ ] }, col.title))
33003
+ ] }),
33004
+ copyright && /* @__PURE__ */ jsx(
33005
+ Typography,
33006
+ {
33007
+ variant: "caption",
33008
+ className: "text-foreground/30 text-center w-full pt-6",
33009
+ children: copyright
33010
+ }
33011
+ )
33012
+ ] })
33013
+ }
33014
+ );
33015
+ };
33016
+ MarketingFooter.displayName = "MarketingFooter";
33017
+ }
33018
+ });
32858
33019
  var PullQuote;
32859
33020
  var init_PullQuote = __esm({
32860
33021
  "components/molecules/PullQuote.tsx"() {
@@ -44610,6 +44771,7 @@ var init_component_registry_generated = __esm({
44610
44771
  init_List();
44611
44772
  init_LoadingState();
44612
44773
  init_MarkdownContent();
44774
+ init_MarketingFooter();
44613
44775
  init_MasterDetail();
44614
44776
  init_MasterDetailLayout();
44615
44777
  init_MatrixQuestion();
@@ -44709,6 +44871,7 @@ var init_component_registry_generated = __esm({
44709
44871
  init_Table();
44710
44872
  init_Tabs();
44711
44873
  init_TagCloud();
44874
+ init_TagInput();
44712
44875
  init_TeamCard();
44713
44876
  init_TeamOrganism();
44714
44877
  init_TextHighlight();
@@ -44909,6 +45072,7 @@ var init_component_registry_generated = __esm({
44909
45072
  "MapView": MapViewPattern,
44910
45073
  "MapViewPattern": MapViewPattern,
44911
45074
  "MarkdownContent": MarkdownContent,
45075
+ "MarketingFooter": MarketingFooter,
44912
45076
  "MasterDetail": MasterDetail,
44913
45077
  "MasterDetailLayout": MasterDetailLayout,
44914
45078
  "MatrixQuestion": MatrixQuestion,
@@ -45024,6 +45188,7 @@ var init_component_registry_generated = __esm({
45024
45188
  "Table": Table,
45025
45189
  "Tabs": Tabs,
45026
45190
  "TagCloud": TagCloud,
45191
+ "TagInput": TagInput,
45027
45192
  "TeamCard": TeamCard,
45028
45193
  "TeamOrganism": TeamOrganism,
45029
45194
  "TextHighlight": TextHighlight,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.57.0",
3
+ "version": "4.57.2",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [