@digital-b2c/coreui-kit 0.11.12 → 0.11.13
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/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +17 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -179,11 +179,10 @@ declare const CountingCard: (({ className, title, count, image, children }: Coun
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
type ResourceView = 'grid' | 'list';
|
|
182
|
-
type ResourceItemType = 'pdf' | '
|
|
182
|
+
type ResourceItemType = 'pdf' | 'externalLink';
|
|
183
183
|
interface ResourceItem {
|
|
184
184
|
title: string;
|
|
185
185
|
date: string;
|
|
186
|
-
image?: string;
|
|
187
186
|
type: ResourceItemType;
|
|
188
187
|
href: string;
|
|
189
188
|
hasNotification?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -179,11 +179,10 @@ declare const CountingCard: (({ className, title, count, image, children }: Coun
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
type ResourceView = 'grid' | 'list';
|
|
182
|
-
type ResourceItemType = 'pdf' | '
|
|
182
|
+
type ResourceItemType = 'pdf' | 'externalLink';
|
|
183
183
|
interface ResourceItem {
|
|
184
184
|
title: string;
|
|
185
185
|
date: string;
|
|
186
|
-
image?: string;
|
|
187
186
|
type: ResourceItemType;
|
|
188
187
|
href: string;
|
|
189
188
|
hasNotification?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1267,20 +1267,14 @@ var ResourceCardItem_module_default = {
|
|
|
1267
1267
|
cardList: "ResourceCardItem_module_cardList",
|
|
1268
1268
|
cardListLeft: "ResourceCardItem_module_cardListLeft",
|
|
1269
1269
|
cardListRight: "ResourceCardItem_module_cardListRight",
|
|
1270
|
-
notificationDot: "ResourceCardItem_module_notificationDot"
|
|
1271
|
-
iconWrapper: "ResourceCardItem_module_iconWrapper"
|
|
1272
|
-
};
|
|
1273
|
-
var ResourceIcon = ({ image, type }) => {
|
|
1274
|
-
if (!image) return null;
|
|
1275
|
-
return /* @__PURE__ */ jsx("div", { className: ResourceCardItem_module_default.iconWrapper, children: /* @__PURE__ */ jsx("img", { src: image, alt: type != null ? type : "", width: 32, height: 32 }) });
|
|
1276
|
-
};
|
|
1270
|
+
notificationDot: "ResourceCardItem_module_notificationDot"};
|
|
1277
1271
|
var ResourceCardItem = ({ item, view }) => {
|
|
1278
1272
|
const hasHref = Boolean(item.href);
|
|
1279
1273
|
const linkWrapper = ({ children }) => /* @__PURE__ */ jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
|
|
1280
1274
|
if (view === "grid") {
|
|
1281
1275
|
return /* @__PURE__ */ jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
|
|
1282
1276
|
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
|
|
1283
|
-
/* @__PURE__ */ jsx(
|
|
1277
|
+
/* @__PURE__ */ jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
|
|
1284
1278
|
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1285
1279
|
] }) }),
|
|
1286
1280
|
/* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
|
|
@@ -1295,7 +1289,7 @@ var ResourceCardItem = ({ item, view }) => {
|
|
|
1295
1289
|
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
|
|
1296
1290
|
] }),
|
|
1297
1291
|
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
|
|
1298
|
-
/* @__PURE__ */ jsx(
|
|
1292
|
+
/* @__PURE__ */ jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
|
|
1299
1293
|
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1300
1294
|
] }) })
|
|
1301
1295
|
] });
|
|
@@ -3282,8 +3276,14 @@ var ResourcesGridList = ({
|
|
|
3282
3276
|
const isMobile = is("tablet", "below");
|
|
3283
3277
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
3284
3278
|
const handleSelectCategory = (index) => {
|
|
3279
|
+
var _a2, _b;
|
|
3285
3280
|
setSelectedCategory(index);
|
|
3286
3281
|
setCurrentPage(1);
|
|
3282
|
+
const categoryText = (_b = (_a2 = categories[index]) == null ? void 0 : _a2.label) == null ? void 0 : _b.replaceAll(" ", "-");
|
|
3283
|
+
if (typeof window !== "undefined" && categoryText) {
|
|
3284
|
+
const url = `${window.location.pathname}#${categoryText}`;
|
|
3285
|
+
window.history.replaceState(null, "", url);
|
|
3286
|
+
}
|
|
3287
3287
|
if (isMobile) setIsSidebarOpen(false);
|
|
3288
3288
|
};
|
|
3289
3289
|
const handleFilterChange = (value) => {
|