@deriv-web-design/ui 0.0.6 → 0.0.7

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.d.mts CHANGED
@@ -602,11 +602,15 @@ interface NavDropdownItem {
602
602
  /** Opens in a new tab with ↗ indicator */
603
603
  external?: boolean;
604
604
  }
605
- interface NavDropdownColumn {
605
+ interface NavDropdownSection {
606
606
  /** Section heading rendered above the link list */
607
607
  title: string;
608
608
  items: NavDropdownItem[];
609
609
  }
610
+ interface NavDropdownColumn {
611
+ /** One or more titled groups stacked within this column */
612
+ sections: NavDropdownSection[];
613
+ }
610
614
  interface NavDropdownFeature {
611
615
  /** Bold heading inside the dark feature card */
612
616
  title: string;
package/dist/index.d.ts CHANGED
@@ -602,11 +602,15 @@ interface NavDropdownItem {
602
602
  /** Opens in a new tab with ↗ indicator */
603
603
  external?: boolean;
604
604
  }
605
- interface NavDropdownColumn {
605
+ interface NavDropdownSection {
606
606
  /** Section heading rendered above the link list */
607
607
  title: string;
608
608
  items: NavDropdownItem[];
609
609
  }
610
+ interface NavDropdownColumn {
611
+ /** One or more titled groups stacked within this column */
612
+ sections: NavDropdownSection[];
613
+ }
610
614
  interface NavDropdownFeature {
611
615
  /** Bold heading inside the dark feature card */
612
616
  title: string;
package/dist/index.js CHANGED
@@ -2399,9 +2399,9 @@ var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
2399
2399
  onMouseEnter,
2400
2400
  onMouseLeave,
2401
2401
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__dropdown-inner", children: [
2402
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__dropdown-left", children: dropdown.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__dropdown-col", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__dropdown-col-list", children: [
2403
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "navbar__dropdown-col-title", children: col.title }),
2404
- col.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2402
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__dropdown-left", children: dropdown.columns.map((col, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__dropdown-col", children: col.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__dropdown-col-list", children: [
2403
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "navbar__dropdown-col-title", children: section.title }),
2404
+ section.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2405
2405
  "a",
2406
2406
  {
2407
2407
  href: link.href,
@@ -2415,7 +2415,7 @@ var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
2415
2415
  },
2416
2416
  link.href
2417
2417
  ))
2418
- ] }) }, col.title)) }),
2418
+ ] }, section.title)) }, colIdx)) }),
2419
2419
  dropdown.feature && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__dropdown-right", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureCard, { feature: dropdown.feature }) })
2420
2420
  ] })
2421
2421
  }
@@ -2482,24 +2482,20 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
2482
2482
  exit: "hidden",
2483
2483
  transition: { duration: 0.22, ease: EASE_OUT_EXPO },
2484
2484
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-panel-inner", children: [
2485
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-cols", children: [0, 1].map((colIdx) => {
2486
- const colItems = dropdown.columns.filter((_, i) => i % 2 === colIdx);
2487
- if (colItems.length === 0) return null;
2488
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-col", children: colItems.map((col) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-col-section", children: [
2489
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "navbar__drawer-col-title", children: col.title }),
2490
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-col-links", children: col.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2491
- "a",
2492
- {
2493
- href: link.href,
2494
- className: "navbar__drawer-link",
2495
- target: link.external ? "_blank" : void 0,
2496
- rel: link.external ? "noopener noreferrer" : void 0,
2497
- children: link.label
2498
- },
2499
- link.href
2500
- )) })
2501
- ] }, col.title)) }, colIdx);
2502
- }) }),
2485
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-cols", children: dropdown.columns.map((col, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-col", children: col.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-col-section", children: [
2486
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "navbar__drawer-col-title", children: section.title }),
2487
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-col-links", children: section.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2488
+ "a",
2489
+ {
2490
+ href: link.href,
2491
+ className: "navbar__drawer-link",
2492
+ target: link.external ? "_blank" : void 0,
2493
+ rel: link.external ? "noopener noreferrer" : void 0,
2494
+ children: link.label
2495
+ },
2496
+ link.href
2497
+ )) })
2498
+ ] }, section.title)) }, colIdx)) }),
2503
2499
  dropdown.feature && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureCard, { feature: dropdown.feature, mobile: true })
2504
2500
  ] })
2505
2501
  }
@@ -2641,7 +2637,7 @@ var Navbar = ({
2641
2637
  onMouseEnter: clearHoverTimeout,
2642
2638
  onMouseLeave: handleNavLeave
2643
2639
  },
2644
- openDropdown
2640
+ "dropdown"
2645
2641
  ) }),
2646
2642
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__actions", children: [
2647
2643
  loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(