@deriv-web-design/ui 0.1.15 → 0.1.17
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/block-registry.json +110 -0
- package/components.manifest.json +37 -2
- package/dist/index.css +111 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +53 -3
- package/dist/index.d.ts +53 -3
- package/dist/index.js +67 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -47,6 +47,7 @@ var Link = ({
|
|
|
47
47
|
colorScheme = "coral",
|
|
48
48
|
label,
|
|
49
49
|
icon,
|
|
50
|
+
iconPosition = "left",
|
|
50
51
|
showChevron = true,
|
|
51
52
|
disabled = false,
|
|
52
53
|
children,
|
|
@@ -78,8 +79,9 @@ var Link = ({
|
|
|
78
79
|
onClick: handleClick,
|
|
79
80
|
...props,
|
|
80
81
|
children: [
|
|
81
|
-
hasIcon && /* @__PURE__ */ jsx2("span", { className: "icon", children: icon }),
|
|
82
|
+
hasIcon && iconPosition === "left" && /* @__PURE__ */ jsx2("span", { className: "icon", children: icon }),
|
|
82
83
|
/* @__PURE__ */ jsx2("span", { className: "label", children: label ?? children }),
|
|
84
|
+
hasIcon && iconPosition === "right" && /* @__PURE__ */ jsx2("span", { className: "icon", children: icon }),
|
|
83
85
|
!hasIcon && showChevron && /* @__PURE__ */ jsx2("span", { className: "chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(ChevronIcon, {}) })
|
|
84
86
|
]
|
|
85
87
|
}
|
|
@@ -8251,6 +8253,66 @@ var MasterPartner = ({
|
|
|
8251
8253
|
] }, index)) })
|
|
8252
8254
|
] }) });
|
|
8253
8255
|
};
|
|
8256
|
+
|
|
8257
|
+
// templates/ResourceBanner/ResourceBanner.tsx
|
|
8258
|
+
import { jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
8259
|
+
var DEFAULT_LINKS = [{ label: "Learn more", href: "#" }];
|
|
8260
|
+
var RESOURCE_BANNER_DERIV_CONTENT = {
|
|
8261
|
+
title: "Learn more about staying safe",
|
|
8262
|
+
description: "Read our guide on secure and responsible trading for more on protecting your account.",
|
|
8263
|
+
links: [
|
|
8264
|
+
{
|
|
8265
|
+
id: "responsible",
|
|
8266
|
+
label: "Secure and responsible trading",
|
|
8267
|
+
href: "/responsible",
|
|
8268
|
+
external: true
|
|
8269
|
+
}
|
|
8270
|
+
]
|
|
8271
|
+
};
|
|
8272
|
+
var ExternalLinkIcon2 = () => /* @__PURE__ */ jsx62("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx62(
|
|
8273
|
+
"path",
|
|
8274
|
+
{
|
|
8275
|
+
d: "M4.5 11.5 11.5 4.5M5.5 4.5h6v6",
|
|
8276
|
+
stroke: "currentColor",
|
|
8277
|
+
strokeWidth: "1.75",
|
|
8278
|
+
strokeLinecap: "round",
|
|
8279
|
+
strokeLinejoin: "round"
|
|
8280
|
+
}
|
|
8281
|
+
) });
|
|
8282
|
+
var ResourceBanner = ({
|
|
8283
|
+
title = "Section title goes here",
|
|
8284
|
+
description = "Explain how this specific feature helps your user.",
|
|
8285
|
+
links,
|
|
8286
|
+
headingLevel: HeadingTag = "h2",
|
|
8287
|
+
className,
|
|
8288
|
+
...props
|
|
8289
|
+
}) => {
|
|
8290
|
+
const resolvedLinks = links && links.length > 0 ? links : DEFAULT_LINKS;
|
|
8291
|
+
const rootClass = ["rsb", className].filter(Boolean).join(" ");
|
|
8292
|
+
return /* @__PURE__ */ jsx62("section", { className: rootClass, ...props, children: /* @__PURE__ */ jsx62("div", { className: "rsb__inner", children: /* @__PURE__ */ jsx62("div", { className: "rsb__card", children: /* @__PURE__ */ jsxs58("div", { className: "rsb__grid", children: [
|
|
8293
|
+
/* @__PURE__ */ jsxs58("div", { className: "rsb__content", children: [
|
|
8294
|
+
/* @__PURE__ */ jsx62(HeadingTag, { className: "rsb__title", children: title }),
|
|
8295
|
+
description && /* @__PURE__ */ jsx62("p", { className: "rsb__description", children: description })
|
|
8296
|
+
] }),
|
|
8297
|
+
/* @__PURE__ */ jsx62("ul", { className: "rsb__links", children: resolvedLinks.map((link, i) => {
|
|
8298
|
+
const isExternal = link.external ?? true;
|
|
8299
|
+
return /* @__PURE__ */ jsx62("li", { className: "rsb__links-item", children: /* @__PURE__ */ jsx62(
|
|
8300
|
+
Link,
|
|
8301
|
+
{
|
|
8302
|
+
className: "rsb__link",
|
|
8303
|
+
colorScheme: "white",
|
|
8304
|
+
href: link.href,
|
|
8305
|
+
label: link.label,
|
|
8306
|
+
icon: isExternal ? /* @__PURE__ */ jsx62(ExternalLinkIcon2, {}) : void 0,
|
|
8307
|
+
iconPosition: "right",
|
|
8308
|
+
showChevron: !isExternal,
|
|
8309
|
+
target: isExternal ? "_blank" : void 0,
|
|
8310
|
+
rel: isExternal ? "noopener noreferrer" : void 0
|
|
8311
|
+
}
|
|
8312
|
+
) }, link.id ?? i);
|
|
8313
|
+
}) })
|
|
8314
|
+
] }) }) }) });
|
|
8315
|
+
};
|
|
8254
8316
|
export {
|
|
8255
8317
|
AVATAR_DATA,
|
|
8256
8318
|
Accordion,
|
|
@@ -8311,6 +8373,8 @@ export {
|
|
|
8311
8373
|
ParallaxBanner,
|
|
8312
8374
|
PartnersPayout,
|
|
8313
8375
|
PeopleGrid,
|
|
8376
|
+
RESOURCE_BANNER_DERIV_CONTENT,
|
|
8377
|
+
ResourceBanner,
|
|
8314
8378
|
STEPS_DATA,
|
|
8315
8379
|
SearchField,
|
|
8316
8380
|
Stats,
|