dune-react 0.0.15 → 0.0.18

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 (34) hide show
  1. package/dist/components/puck-base/button.js +1 -1
  2. package/dist/components/puck-base/core/fields.d.ts +33 -10
  3. package/dist/components/puck-base/core/fields.js +27 -3
  4. package/dist/components/puck-base/core/styles.d.ts +1 -5
  5. package/dist/components/puck-base/core/styles.js +1 -5
  6. package/dist/components/puck-base/core/with-editable.js +33 -21
  7. package/dist/components/puck-base/editor-context.d.ts +2 -0
  8. package/dist/components/puck-base/fields/action-field.js +19 -43
  9. package/dist/components/puck-base/fields/auto-field.js +27 -214
  10. package/dist/components/puck-base/fields/color-field.d.ts +6 -0
  11. package/dist/components/puck-base/fields/color-field.js +37 -0
  12. package/dist/components/puck-base/fields/index.d.ts +8 -0
  13. package/dist/components/puck-base/fields/location-field.d.ts +44 -0
  14. package/dist/components/puck-base/fields/location-field.js +207 -0
  15. package/dist/components/puck-base/fields/object-field.d.ts +8 -0
  16. package/dist/components/puck-base/fields/object-field.js +30 -0
  17. package/dist/components/puck-base/fields/radio-toggle-field.d.ts +10 -0
  18. package/dist/components/puck-base/fields/radio-toggle-field.js +53 -0
  19. package/dist/components/puck-base/fields/virtualized-select-field.d.ts +13 -0
  20. package/dist/components/puck-base/fields/virtualized-select-field.js +146 -0
  21. package/dist/components/puck-base/image.js +175 -104
  22. package/dist/components/puck-base/index.d.ts +2 -3
  23. package/dist/components/puck-block/location-sections/location-1/index.js +17 -22
  24. package/dist/components/puck-block/location-sections/location-1/location.d.ts +5 -7
  25. package/dist/components/puck-block/location-sections/location-1/location.js +15 -12
  26. package/dist/components/puck-block/location-sections/location-2/index.js +28 -24
  27. package/dist/components/puck-block/location-sections/location-2/location.d.ts +6 -8
  28. package/dist/components/puck-block/location-sections/location-2/location.js +18 -15
  29. package/dist/components/puck-block/location-sections/location-3/index.js +43 -20
  30. package/dist/components/puck-block/location-sections/location-3/location.d.ts +5 -6
  31. package/dist/components/puck-block/location-sections/location-3/location.js +96 -86
  32. package/dist/components/puck-block/location-sections/props.d.ts +9 -10
  33. package/dist/components/shadcn/slider.js +4 -1
  34. package/package.json +4 -2
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { CompoundButton } from "../../../puck-base/button.js";
3
3
  import { cn } from "../../../../utils/css-utils.js";
4
+ import { getMapEmbedUrl } from "../../../puck-base/core/fields.js";
4
5
  const ActionButton = ({
5
6
  label,
6
7
  url,
@@ -34,24 +35,27 @@ const ActionButton = ({
34
35
  }
35
36
  ) });
36
37
  };
38
+ const MAP_STYLE_FILTERS = {
39
+ default: "",
40
+ grayscale: "grayscale(40%) contrast(1.05) brightness(1.0) saturate(0.85)",
41
+ dark: "grayscale(100%) invert(1) contrast(1.1) brightness(0.8)"
42
+ };
37
43
  const Location2 = ({
38
44
  heading,
39
45
  description,
40
- address,
46
+ displayAddress,
41
47
  contentPosition = "left",
42
- mapEmbedUrl,
43
- mapTitle = "Google Maps",
44
- mapFilter,
45
- mapTintMode = "none",
46
- mapTintColor,
47
- mapTintOpacity = 0.15,
48
+ location: loc,
49
+ mapStyle = "default",
50
+ mapTint = "none",
48
51
  buttons = [],
49
52
  styles
50
53
  }) => {
51
54
  const isRight = contentPosition === "right";
52
55
  const isGlass = (styles == null ? void 0 : styles.cardStyle) === "glass";
53
- const showMapTint = mapTintMode !== "none" && mapTintOpacity > 0;
54
- const tintColor = mapTintMode === "custom" ? mapTintColor || void 0 : void 0;
56
+ const showMapTint = mapTint === "theme";
57
+ const mapEmbedUrl = loc && loc.lat !== 0 ? getMapEmbedUrl(loc) : void 0;
58
+ const mapFilter = MAP_STYLE_FILTERS[mapStyle] || "";
55
59
  const heightClass = (styles == null ? void 0 : styles.sectionHeight) === "sm" ? "h-[480px]" : (styles == null ? void 0 : styles.sectionHeight) === "lg" ? "h-[75vh] min-h-[520px]" : "h-[600px]";
56
60
  return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full overflow-hidden", heightClass), children: [
57
61
  /* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
@@ -59,12 +63,12 @@ const Location2 = ({
59
63
  "iframe",
60
64
  {
61
65
  src: mapEmbedUrl,
62
- title: mapTitle,
66
+ title: (loc == null ? void 0 : loc.address) || "Google Maps",
63
67
  className: "h-full w-full border-0",
64
68
  loading: "lazy",
65
69
  referrerPolicy: "no-referrer-when-downgrade",
66
70
  allowFullScreen: true,
67
- style: { filter: mapFilter }
71
+ style: mapFilter ? { filter: mapFilter } : void 0
68
72
  }
69
73
  ) : /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground flex h-full w-full items-center justify-center text-sm", children: "Map address not configured" }),
70
74
  showMapTint && /* @__PURE__ */ jsx(
@@ -72,8 +76,7 @@ const Location2 = ({
72
76
  {
73
77
  className: "bg-primary pointer-events-none absolute inset-0",
74
78
  style: {
75
- backgroundColor: tintColor,
76
- opacity: mapTintOpacity,
79
+ opacity: 0.15,
77
80
  mixBlendMode: "color"
78
81
  }
79
82
  }
@@ -96,7 +99,7 @@ const Location2 = ({
96
99
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
97
100
  heading && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx("h2", { className: "text-foreground whitespace-pre-line font-serif text-3xl leading-tight tracking-tighter md:text-4xl", children: heading }) }),
98
101
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: description }),
99
- address && /* @__PURE__ */ jsxs("div", { className: "text-foreground flex items-start gap-2 text-sm", children: [
102
+ displayAddress && /* @__PURE__ */ jsxs("div", { className: "text-foreground flex items-start gap-2 text-sm", children: [
100
103
  /* @__PURE__ */ jsxs(
101
104
  "svg",
102
105
  {
@@ -115,7 +118,7 @@ const Location2 = ({
115
118
  ]
116
119
  }
117
120
  ),
118
- /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: address })
121
+ /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: displayAddress })
119
122
  ] }),
120
123
  buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 pt-1", children: buttons.map((button, index) => /* @__PURE__ */ jsx(ActionButton, { ...button }, index)) })
121
124
  ] })
@@ -1,11 +1,16 @@
1
+ import { location } from "../../../puck-base/core/fields.js";
1
2
  import { Location3 } from "./location.js";
2
3
  import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
- const defaultLocation = {
4
+ const defaultLocationEntry = {
4
5
  name: "San Francisco, CA",
5
- address: "123 Market Street\nSan Francisco, CA 94105",
6
+ location: {
7
+ address: "123 Market Street, San Francisco, CA 94105",
8
+ lat: 37.7749,
9
+ lng: -122.4194,
10
+ zoom: 14
11
+ },
6
12
  phone: "+1 (415) 555-0100",
7
- hours: "Mon–Fri: 9am–6pm\nSat: 10am–4pm",
8
- directionsUrl: "https://maps.google.com"
13
+ hours: "Mon–Fri: 9am–6pm\nSat: 10am–4pm"
9
14
  };
10
15
  const location3ExtraStyleFields = {
11
16
  mapHeight: {
@@ -30,9 +35,16 @@ const conf = {
30
35
  fields: {
31
36
  heading: { type: "textarea", contentEditable: true },
32
37
  description: { type: "textarea", contentEditable: true },
33
- mapEmbedUrl: { type: "text", label: "Google Map Embed URL" },
34
- mapTitle: { type: "text", label: "Map Title" },
35
- mapFilter: { type: "text", label: "Map Filter (CSS)" },
38
+ mapLocation: { ...location, label: "Map Location" },
39
+ mapStyle: {
40
+ type: "radio",
41
+ label: "Map Style",
42
+ options: [
43
+ { label: "Default", value: "default" },
44
+ { label: "Grayscale", value: "grayscale" },
45
+ { label: "Dark", value: "dark" }
46
+ ]
47
+ },
36
48
  locations: {
37
49
  type: "array",
38
50
  min: 1,
@@ -40,37 +52,48 @@ const conf = {
40
52
  getItemSummary: (item, index = 0) => item.name || `Location ${index + 1}`,
41
53
  arrayFields: {
42
54
  name: { type: "text", contentEditable: true },
43
- address: { type: "textarea", contentEditable: true },
55
+ location,
44
56
  phone: { type: "text" },
45
57
  hours: { type: "textarea", label: "Business Hours" },
46
- directionsUrl: { type: "text", label: "Directions URL" },
47
58
  directionsLabel: { type: "text", label: "Directions Button Label" }
48
59
  },
49
- defaultItemProps: defaultLocation
60
+ defaultItemProps: defaultLocationEntry
50
61
  },
51
62
  styles: createStylesField(location3ExtraStyleFields)
52
63
  },
53
64
  defaultProps: {
54
65
  heading: "Our Offices",
55
66
  description: "We have teams around the world ready to help you succeed.",
56
- mapEmbedUrl: "https://maps.google.com/maps?q=New%20York%2C%20NY%2C%20United%20States&z=11&t=m&output=embed",
57
- mapTitle: "Google Maps",
58
- mapFilter: "grayscale(35%) contrast(1.05) brightness(1.0)",
67
+ mapLocation: {
68
+ address: "New York, NY, United States",
69
+ lat: 40.7128,
70
+ lng: -74.006,
71
+ zoom: 11
72
+ },
73
+ mapStyle: "grayscale",
59
74
  locations: [
60
- defaultLocation,
75
+ defaultLocationEntry,
61
76
  {
62
77
  name: "London, UK",
63
- address: "10 Finsbury Square\nLondon, EC2A 1AF",
78
+ location: {
79
+ address: "10 Finsbury Square, London, EC2A 1AF",
80
+ lat: 51.5207,
81
+ lng: -0.0876,
82
+ zoom: 14
83
+ },
64
84
  phone: "+44 20 7946 0200",
65
- hours: "Mon–Fri: 9am–6pm\nSat: 10am–3pm",
66
- directionsUrl: "https://maps.google.com"
85
+ hours: "Mon–Fri: 9am–6pm\nSat: 10am–3pm"
67
86
  },
68
87
  {
69
88
  name: "Tokyo, Japan",
70
- address: "1-1-2 Marunouchi\nChiyoda-ku, Tokyo 100-0005",
89
+ location: {
90
+ address: "1-1-2 Marunouchi, Chiyoda-ku, Tokyo 100-0005",
91
+ lat: 35.6812,
92
+ lng: 139.7671,
93
+ zoom: 14
94
+ },
71
95
  phone: "+81 3-1234-5678",
72
- hours: "Mon–Fri: 9am–6pm",
73
- directionsUrl: "https://maps.google.com"
96
+ hours: "Mon–Fri: 9am–6pm"
74
97
  }
75
98
  ],
76
99
  styles: createStylesDefaults({
@@ -1,20 +1,19 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import type { Action } from "@/components/puck-base/core/types";
3
+ import type { MapLocation } from "@/components/puck-base/core/fields";
3
4
  export interface LocationEntry {
4
5
  name: string;
5
- address?: string;
6
+ location?: MapLocation;
6
7
  phone?: string;
7
8
  hours?: string;
8
- directionsUrl?: string;
9
9
  directionsLabel?: string;
10
10
  directionsAction?: Action;
11
11
  }
12
12
  export interface Location3Props {
13
13
  heading?: string;
14
14
  description?: string;
15
- mapEmbedUrl?: string;
16
- mapTitle?: string;
17
- mapFilter?: string;
15
+ mapLocation?: MapLocation;
16
+ mapStyle?: "default" | "grayscale" | "dark";
18
17
  locations: LocationEntry[];
19
18
  styles?: {
20
19
  padding?: CompoundContainerProps["padding"];
@@ -24,4 +23,4 @@ export interface Location3Props {
24
23
  columns?: "2" | "3";
25
24
  };
26
25
  }
27
- export declare const Location3: ({ heading, description, mapEmbedUrl, mapTitle, mapFilter, locations, styles, }: Location3Props) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const Location3: ({ heading, description, mapLocation, mapStyle, locations, styles, }: Location3Props) => import("react/jsx-runtime").JSX.Element;
@@ -2,15 +2,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundButton } from "../../../puck-base/button.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
+ import { getMapEmbedUrl, getDirectionsUrl } from "../../../puck-base/core/fields.js";
6
+ const MAP_STYLE_FILTERS = {
7
+ default: "",
8
+ grayscale: "grayscale(35%) contrast(1.05) brightness(1.0)",
9
+ dark: "grayscale(100%) invert(1) contrast(1.1) brightness(0.8)"
10
+ };
5
11
  const Location3 = ({
6
12
  heading,
7
13
  description,
8
- mapEmbedUrl,
9
- mapTitle = "Google Maps",
10
- mapFilter,
14
+ mapLocation,
15
+ mapStyle = "default",
11
16
  locations = [],
12
17
  styles
13
18
  }) => {
19
+ const mapEmbedUrl = mapLocation && mapLocation.lat !== 0 ? getMapEmbedUrl(mapLocation) : void 0;
20
+ const mapFilter = MAP_STYLE_FILTERS[mapStyle] || "";
14
21
  const mapHeight = (styles == null ? void 0 : styles.mapHeight) ?? "md";
15
22
  const columns = (styles == null ? void 0 : styles.columns) ?? "3";
16
23
  const mapHeightClass = mapHeight === "sm" ? "h-[220px] md:h-[260px]" : mapHeight === "lg" ? "h-[360px] md:h-[440px]" : "h-[280px] md:h-[340px]";
@@ -30,97 +37,100 @@ const Location3 = ({
30
37
  "iframe",
31
38
  {
32
39
  src: mapEmbedUrl,
33
- title: mapTitle,
40
+ title: (mapLocation == null ? void 0 : mapLocation.address) || "Google Maps",
34
41
  className: "h-full w-full border-0",
35
42
  loading: "lazy",
36
43
  referrerPolicy: "no-referrer-when-downgrade",
37
44
  allowFullScreen: true,
38
- style: { filter: mapFilter }
45
+ style: mapFilter ? { filter: mapFilter } : void 0
39
46
  }
40
47
  ) : /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground flex h-full w-full items-center justify-center text-sm", children: "Map address not configured" }) }),
41
- locations.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-1 gap-5", colClass), children: locations.map((loc, i) => /* @__PURE__ */ jsxs(
42
- "div",
43
- {
44
- className: "bg-card border-border flex flex-col gap-3 rounded-xl border p-6",
45
- children: [
46
- /* @__PURE__ */ jsx("h3", { className: "text-foreground text-lg font-semibold", children: loc.name }),
47
- loc.address && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-start gap-2 text-sm", children: [
48
- /* @__PURE__ */ jsxs(
49
- "svg",
50
- {
51
- className: "text-primary mt-0.5 shrink-0",
52
- width: "14",
53
- height: "14",
54
- viewBox: "0 0 24 24",
55
- fill: "none",
56
- stroke: "currentColor",
57
- strokeWidth: "2",
58
- strokeLinecap: "round",
59
- strokeLinejoin: "round",
60
- children: [
61
- /* @__PURE__ */ jsx("path", { d: "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" }),
62
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "3" })
63
- ]
64
- }
65
- ),
66
- /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: loc.address })
67
- ] }),
68
- loc.phone && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-sm", children: [
69
- /* @__PURE__ */ jsx(
70
- "svg",
71
- {
72
- className: "text-primary shrink-0",
73
- width: "14",
74
- height: "14",
75
- viewBox: "0 0 24 24",
76
- fill: "none",
77
- stroke: "currentColor",
78
- strokeWidth: "2",
79
- strokeLinecap: "round",
80
- strokeLinejoin: "round",
81
- children: /* @__PURE__ */ jsx("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 14a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.62 3h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 10.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 17.92Z" })
82
- }
83
- ),
84
- /* @__PURE__ */ jsx("span", { children: loc.phone })
85
- ] }),
86
- loc.hours && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-start gap-2 text-sm", children: [
87
- /* @__PURE__ */ jsxs(
88
- "svg",
48
+ locations.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-1 gap-5", colClass), children: locations.map((loc, i) => {
49
+ var _a;
50
+ return /* @__PURE__ */ jsxs(
51
+ "div",
52
+ {
53
+ className: "bg-card border-border flex flex-col gap-3 rounded-xl border p-6",
54
+ children: [
55
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground text-lg font-semibold", children: loc.name }),
56
+ ((_a = loc.location) == null ? void 0 : _a.address) && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-start gap-2 text-sm", children: [
57
+ /* @__PURE__ */ jsxs(
58
+ "svg",
59
+ {
60
+ className: "text-primary mt-0.5 shrink-0",
61
+ width: "14",
62
+ height: "14",
63
+ viewBox: "0 0 24 24",
64
+ fill: "none",
65
+ stroke: "currentColor",
66
+ strokeWidth: "2",
67
+ strokeLinecap: "round",
68
+ strokeLinejoin: "round",
69
+ children: [
70
+ /* @__PURE__ */ jsx("path", { d: "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" }),
71
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "3" })
72
+ ]
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: loc.location.address })
76
+ ] }),
77
+ loc.phone && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-sm", children: [
78
+ /* @__PURE__ */ jsx(
79
+ "svg",
80
+ {
81
+ className: "text-primary shrink-0",
82
+ width: "14",
83
+ height: "14",
84
+ viewBox: "0 0 24 24",
85
+ fill: "none",
86
+ stroke: "currentColor",
87
+ strokeWidth: "2",
88
+ strokeLinecap: "round",
89
+ strokeLinejoin: "round",
90
+ children: /* @__PURE__ */ jsx("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 14a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.62 3h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 10.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 17.92Z" })
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsx("span", { children: loc.phone })
94
+ ] }),
95
+ loc.hours && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-start gap-2 text-sm", children: [
96
+ /* @__PURE__ */ jsxs(
97
+ "svg",
98
+ {
99
+ className: "text-primary mt-0.5 shrink-0",
100
+ width: "14",
101
+ height: "14",
102
+ viewBox: "0 0 24 24",
103
+ fill: "none",
104
+ stroke: "currentColor",
105
+ strokeWidth: "2",
106
+ strokeLinecap: "round",
107
+ strokeLinejoin: "round",
108
+ children: [
109
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
110
+ /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
111
+ ]
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: loc.hours })
115
+ ] }),
116
+ (loc.directionsAction || loc.location && loc.location.lat !== 0) && /* @__PURE__ */ jsx("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx(
117
+ CompoundButton,
89
118
  {
90
- className: "text-primary mt-0.5 shrink-0",
91
- width: "14",
92
- height: "14",
93
- viewBox: "0 0 24 24",
94
- fill: "none",
95
- stroke: "currentColor",
96
- strokeWidth: "2",
97
- strokeLinecap: "round",
98
- strokeLinejoin: "round",
99
- children: [
100
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
101
- /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
102
- ]
119
+ label: loc.directionsLabel || "Get Directions",
120
+ action: loc.directionsAction ?? (loc.location ? {
121
+ type: "external",
122
+ externalUrl: getDirectionsUrl(loc.location)
123
+ } : void 0),
124
+ variant: "outline",
125
+ size: "sm",
126
+ icon: "map-pin"
103
127
  }
104
- ),
105
- /* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: loc.hours })
106
- ] }),
107
- (loc.directionsAction || loc.directionsUrl) && /* @__PURE__ */ jsx("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx(
108
- CompoundButton,
109
- {
110
- label: loc.directionsLabel || "Get Directions",
111
- action: loc.directionsAction ?? (loc.directionsUrl ? {
112
- type: "external",
113
- externalUrl: loc.directionsUrl
114
- } : void 0),
115
- variant: "outline",
116
- size: "sm",
117
- icon: "map-pin"
118
- }
119
- ) })
120
- ]
121
- },
122
- i
123
- )) })
128
+ ) })
129
+ ]
130
+ },
131
+ i
132
+ );
133
+ }) })
124
134
  ] })
125
135
  }
126
136
  );
@@ -1,3 +1,4 @@
1
+ import type { MapLocation } from "@/components/puck-base/core/fields";
1
2
  type LocationVariant = "location-1" | "location-2" | "location-3";
2
3
  type LocationPadding = {
3
4
  top?: "none" | "small" | "medium" | "large";
@@ -13,22 +14,19 @@ type LocationButton = {
13
14
  };
14
15
  type LocationItem = {
15
16
  name: string;
16
- address?: string;
17
+ location?: MapLocation;
17
18
  phone?: string;
18
19
  hours?: string;
19
- directionsUrl?: string;
20
20
  };
21
- type LocationSectionProps = {
21
+ export type LocationSectionProps = {
22
22
  variant?: LocationVariant;
23
23
  heading?: string;
24
24
  description?: string;
25
- address?: string;
26
- mapEmbedUrl?: string;
27
- mapTitle?: string;
28
- mapFilter?: string;
29
- mapTintMode?: "none" | "theme" | "custom";
30
- mapTintColor?: string;
31
- mapTintOpacity?: number;
25
+ displayAddress?: string;
26
+ location?: MapLocation;
27
+ mapLocation?: MapLocation;
28
+ mapStyle?: "default" | "grayscale" | "dark";
29
+ mapTint?: "none" | "theme";
32
30
  buttons?: LocationButton[];
33
31
  locations?: LocationItem[];
34
32
  contentPosition?: "left" | "right";
@@ -43,3 +41,4 @@ type LocationSectionProps = {
43
41
  sectionHeight?: "sm" | "md" | "lg";
44
42
  };
45
43
  };
44
+ export {};
@@ -18,7 +18,10 @@ function Slider({
18
18
  return /* @__PURE__ */ jsx(
19
19
  Slider$1.Root,
20
20
  {
21
- className: cn("data-horizontal:w-full data-vertical:h-full", className),
21
+ className: cn(
22
+ "data-horizontal:w-full data-vertical:h-full flex items-center",
23
+ className
24
+ ),
22
25
  "data-slot": "slider",
23
26
  defaultValue,
24
27
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dune-react",
3
- "version": "0.0.15",
3
+ "version": "0.0.18",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -16,7 +16,8 @@
16
16
  "build-storybook": "storybook build && cp -r skills storybook-static/skills",
17
17
  "deploy-storybook": "storybook-to-ghpages -- --existing-output-dir=storybook-static",
18
18
  "ondeploy": "pnpm build-storybook && pnpm deploy-storybook",
19
- "postpublish": "bash scripts/postpublish.sh"
19
+ "postpublish": "bash scripts/postpublish.sh",
20
+ "upload:previews": "tsx scripts/upload-previews-r2.ts"
20
21
  },
21
22
  "sideEffects": [
22
23
  "*.css"
@@ -43,6 +44,7 @@
43
44
  }
44
45
  },
45
46
  "devDependencies": {
47
+ "@aws-sdk/client-s3": "3.1017.0",
46
48
  "@puckeditor/core": "0.21.1",
47
49
  "@storybook/addon-docs": "^10.2.19",
48
50
  "@storybook/addon-links": "^10.2.19",