@reblu/site-blocks 0.3.0 → 0.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.
- package/README.md +21 -0
- package/dist/client.cjs +7 -7
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +26 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -9
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -13011,9 +13011,17 @@ function markdownToSafeHtml(markdown) {
|
|
|
13011
13011
|
}
|
|
13012
13012
|
|
|
13013
13013
|
// src/components/markdown-renderer.tsx
|
|
13014
|
-
import { cn } from "@reblu/site-ui";
|
|
13015
|
-
import
|
|
13014
|
+
import { cn } from "@reblu/site-ui/utils";
|
|
13015
|
+
import {
|
|
13016
|
+
domToReact,
|
|
13017
|
+
Element,
|
|
13018
|
+
htmlToDOM
|
|
13019
|
+
} from "html-react-parser";
|
|
13016
13020
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
13021
|
+
var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
|
|
13022
|
+
function parse3(html5, options) {
|
|
13023
|
+
return domToReact(htmlToDOM(html5, HTML_TO_DOM_OPTIONS), options);
|
|
13024
|
+
}
|
|
13017
13025
|
var HEADING_CLASSES = {
|
|
13018
13026
|
1: "text-3xl font-bold mt-8 mb-4 first:mt-0",
|
|
13019
13027
|
2: "text-2xl font-bold mt-7 mb-3 first:mt-0",
|
|
@@ -13124,10 +13132,11 @@ function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
|
13124
13132
|
}
|
|
13125
13133
|
|
|
13126
13134
|
// src/components/treatment.tsx
|
|
13127
|
-
import { cn as cn3 } from "@reblu/site-ui";
|
|
13135
|
+
import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
13128
13136
|
|
|
13129
13137
|
// src/components/_page-parts.tsx
|
|
13130
|
-
import {
|
|
13138
|
+
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13139
|
+
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13131
13140
|
import { Fragment as Fragment2, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13132
13141
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13133
13142
|
"default",
|
|
@@ -13158,14 +13167,19 @@ function PageHero({ page }) {
|
|
|
13158
13167
|
}
|
|
13159
13168
|
function SectionCta({ section }) {
|
|
13160
13169
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13161
|
-
|
|
13170
|
+
const variant = toButtonVariant(section.ctaVariant);
|
|
13171
|
+
return /* @__PURE__ */ jsx2("div", { className: "pt-2", children: /* @__PURE__ */ jsx2(
|
|
13162
13172
|
"a",
|
|
13163
13173
|
{
|
|
13164
13174
|
href: section.ctaUrl,
|
|
13175
|
+
"data-slot": "button",
|
|
13176
|
+
"data-variant": variant,
|
|
13177
|
+
"data-size": "default",
|
|
13178
|
+
className: cn2(buttonVariants({ variant, size: "default" })),
|
|
13165
13179
|
...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13166
13180
|
children: section.ctaLabel
|
|
13167
13181
|
}
|
|
13168
|
-
) })
|
|
13182
|
+
) });
|
|
13169
13183
|
}
|
|
13170
13184
|
function SectionImages({ section }) {
|
|
13171
13185
|
if (section.images.length === 0) return null;
|
|
@@ -13213,7 +13227,7 @@ function Treatment({ page, className }) {
|
|
|
13213
13227
|
}
|
|
13214
13228
|
|
|
13215
13229
|
// src/components/specialty.tsx
|
|
13216
|
-
import { cn as cn4 } from "@reblu/site-ui";
|
|
13230
|
+
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13217
13231
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13218
13232
|
function Specialty({
|
|
13219
13233
|
page,
|
|
@@ -13254,7 +13268,7 @@ function Specialty({
|
|
|
13254
13268
|
}
|
|
13255
13269
|
|
|
13256
13270
|
// src/components/profile-card.tsx
|
|
13257
|
-
import { cn as cn5 } from "@reblu/site-ui";
|
|
13271
|
+
import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
13258
13272
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13259
13273
|
function initials(name) {
|
|
13260
13274
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
@@ -13296,7 +13310,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13296
13310
|
}
|
|
13297
13311
|
|
|
13298
13312
|
// src/components/product-card.tsx
|
|
13299
|
-
import { cn as cn6 } from "@reblu/site-ui";
|
|
13313
|
+
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13300
13314
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13301
13315
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13302
13316
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|