@sankhyatronics/sankhya-cms 0.1.2 → 0.1.4

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 (37) hide show
  1. package/custom-elements.json +2160 -1301
  2. package/dist/{chunk-PKTRYUGP.js → chunk-5KHI36M5.js} +7 -2
  3. package/dist/chunk-5KHI36M5.js.map +1 -0
  4. package/dist/{chunk-FWIG6GEZ.js → chunk-5MTPMXAQ.js} +171 -5
  5. package/dist/chunk-5MTPMXAQ.js.map +1 -0
  6. package/dist/{chunk-TH5NZXA7.js → chunk-KHPJ5FAJ.js} +80 -4
  7. package/dist/chunk-KHPJ5FAJ.js.map +1 -0
  8. package/dist/chunk-MLF6L3KM.js +605 -0
  9. package/dist/chunk-MLF6L3KM.js.map +1 -0
  10. package/dist/{chunk-3TCP25JG.js → chunk-PB7ZPPLP.js} +9 -1
  11. package/dist/chunk-PB7ZPPLP.js.map +1 -0
  12. package/dist/{chunk-5DNVCMOO.js → chunk-S4ARRDAI.js} +2 -2
  13. package/dist/{chunk-5UFRGZWG.js → chunk-TLHG33MM.js} +2 -2
  14. package/dist/dropdown/index.d.ts +30 -2
  15. package/dist/dropdown/index.js +2 -1
  16. package/dist/header/index.js +2 -2
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +36 -28
  19. package/dist/mega-menu/index.d.ts +141 -0
  20. package/dist/mega-menu/index.js +14 -0
  21. package/dist/mega-menu/index.js.map +1 -0
  22. package/dist/menu-item/index.d.ts +3 -0
  23. package/dist/menu-item/index.js +2 -1
  24. package/dist/schema/index.d.ts +3 -0
  25. package/dist/schema/index.js +3 -0
  26. package/dist/schema/index.js.map +1 -1
  27. package/dist/select/index.js +2 -2
  28. package/dist/shared/icons.d.ts +3 -1
  29. package/dist/shared/icons.js +3 -1
  30. package/dist/testimonials/index.js +2 -2
  31. package/package.json +6 -2
  32. package/dist/chunk-3TCP25JG.js.map +0 -1
  33. package/dist/chunk-FWIG6GEZ.js.map +0 -1
  34. package/dist/chunk-PKTRYUGP.js.map +0 -1
  35. package/dist/chunk-TH5NZXA7.js.map +0 -1
  36. /package/dist/{chunk-5DNVCMOO.js.map → chunk-S4ARRDAI.js.map} +0 -0
  37. /package/dist/{chunk-5UFRGZWG.js.map → chunk-TLHG33MM.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/icons.ts"],"sourcesContent":["import { html } from 'lit';\r\nimport type { TemplateResult } from 'lit';\r\n\r\n/**\r\n * Every inline SVG icon used across components, centralized so a glyph's\r\n * path data lives in exactly one place instead of being copy-pasted at each\r\n * call site. Each icon is a small function returning a Lit `TemplateResult`\r\n * (not a `css`-style fragment) so callers can size — and, where noted, class\r\n * — the icon per context while sharing the same markup.\r\n */\r\n\r\nconst FOLDER_ICON_COLOR = 'oklch(0.72 0.09 75)';\r\n\r\n/** Filled folder glyph (browse rows/tiles). Fixed 20x16 — folders don't resize per usage. */\r\nexport function folderIcon(): TemplateResult {\r\n return html`\r\n <svg width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M0 2a2 2 0 012-2h5l2 2h9a2 2 0 012 2v10a2 2 0 01-2 2H2a2 2 0 01-2-2V2z\" fill=${FOLDER_ICON_COLOR} />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Outlined folder glyph (breadcrumb crumb icon). `className` lets the caller hook its own layout class. */\r\nexport function folderOutlineIcon(size = 11, className = ''): TemplateResult {\r\n return html`\r\n <svg class=${className} width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M4 4h5l2 2h9v12H4V4z\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** External-link/\"open\" glyph (open site/library actions in the Templates/Data/Save-location pickers). */\r\nexport function externalLinkIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5M15 4h5v5M20 4l-9 9\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.8\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Refresh/reload glyph (Templates/Data picker refresh buttons). */\r\nexport function refreshIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M17.65 6.35A7.958 7.958 0 0 0 12 4a8 8 0 1 0 8 8h-2a6 6 0 1 1-6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\r\n fill=\"currentColor\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Clock glyph (the wizard's \"Recent activity\" history trigger button, Steps 1-3). */\r\nexport function historyIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M12 7v5l3.5 2\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Trash/delete glyph (clear-all button in the selected-chips summary badge). */\r\nexport function trashIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M4 4h2l1.2 12.4A2 2 0 0 0 9.2 18.2h8.1a2 2 0 0 0 1.98-1.7L20.5 8H6.5\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <circle cx=\"10\" cy=\"21\" r=\"1.4\" fill=\"currentColor\" />\r\n <circle cx=\"17\" cy=\"21\" r=\"1.4\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Chevron glyph (pager prev/next buttons, the select trigger's caret). */\r\nexport function chevronIcon(direction: 'left' | 'right' | 'down', size = 14): TemplateResult {\r\n const d = { left: 'M15 18l-6-6 6-6', right: 'M9 6l6 6-6 6', down: 'M6 9l6 6 6-6' }[direction];\r\n\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=${d} stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Up-right arrow glyph (marks a link that leaves the site — mega-menu links and buttons). */\r\nexport function arrowUpRightIcon(size = 12): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M7 17L17 7M8 7h9v9\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Plus glyph (\"New folder\" action button). */\r\nexport function plusIcon(size = 13): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M12 4v16M4 12h16\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Cards-view glyph (2x2 grid — view-toggle button). */\r\nexport function cardsViewIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\r\n <rect x=\"1\" y=\"1\" width=\"6\" height=\"6\" rx=\"1\" fill=\"currentColor\" />\r\n <rect x=\"9\" y=\"1\" width=\"6\" height=\"6\" rx=\"1\" fill=\"currentColor\" />\r\n <rect x=\"1\" y=\"9\" width=\"6\" height=\"6\" rx=\"1\" fill=\"currentColor\" />\r\n <rect x=\"9\" y=\"9\" width=\"6\" height=\"6\" rx=\"1\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Checkmark glyph (completed-step marker in the step indicator). */\r\nexport function checkIcon(size = 14): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M4 12l5 5L20 6\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** SharePoint site glyph (globe — root \"All sites\" browser rows). */\r\nexport function siteIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.6\" />\r\n <path d=\"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18\" stroke=\"currentColor\" stroke-width=\"1.6\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** 3x3 dot-grid glyph (bento-menu app-switcher trigger). */\r\nexport function bentoGridIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path\r\n d=\"M16 20h4v-4h-4m0-2h4v-4h-4m-6-2h4V4h-4m6 4h4V4h-4m-6 10h4v-4h-4m-6 4h4v-4H4m0 10h4v-4H4m6 4h4v-4h-4M4 8h4V4H4z\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** List-view glyph (stacked rows — view-toggle button). */\r\nexport function listViewIcon(size = 15): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\r\n <rect x=\"1\" y=\"2\" width=\"3\" height=\"3\" rx=\"0.5\" fill=\"currentColor\" />\r\n <rect x=\"6\" y=\"2.5\" width=\"9\" height=\"2\" rx=\"1\" fill=\"currentColor\" />\r\n <rect x=\"1\" y=\"6.5\" width=\"3\" height=\"3\" rx=\"0.5\" fill=\"currentColor\" />\r\n <rect x=\"6\" y=\"7\" width=\"9\" height=\"2\" rx=\"1\" fill=\"currentColor\" />\r\n <rect x=\"1\" y=\"11\" width=\"3\" height=\"3\" rx=\"0.5\" fill=\"currentColor\" />\r\n <rect x=\"6\" y=\"11.5\" width=\"9\" height=\"2\" rx=\"1\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/**\r\n * A small set of generic domain icons for `st-menu-grid-item`'s icon slot (nav \"mega menu\"\r\n * entries — sales/purchase/accounting/settings items) — deliberately simple line glyphs rather\r\n * than pixel-perfect illustrations, same fidelity level as the icons above.\r\n */\r\n\r\n/** Shopping-cart glyph (sales/orders). */\r\nexport function cartIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M3 4h2l2.4 12.4A2 2 0 0 0 9.36 18h8.2a2 2 0 0 0 1.96-1.6L21 8H6\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <circle cx=\"10\" cy=\"21\" r=\"1.4\" fill=\"currentColor\" />\r\n <circle cx=\"17\" cy=\"21\" r=\"1.4\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Delivery-truck glyph (purchase orders / receiving). */\r\nexport function truckIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M2 6h11v10H2z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n <path d=\"M13 10h4l4 3.5V16h-8z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n <circle cx=\"6.5\" cy=\"18\" r=\"1.8\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <circle cx=\"16.5\" cy=\"18\" r=\"1.8\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Package/box glyph (products, inventory). */\r\nexport function boxIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 3l8 4.2v9.6L12 21l-8-4.2V7.2L12 3z\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path d=\"M4.2 7.2L12 11l7.8-3.8M12 11v10\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Map-pin glyph (stock locations). */\r\nexport function mapPinIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 21s7-6.1 7-11.5A7 7 0 0 0 5 9.5C5 14.9 12 21 12 21z\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <circle cx=\"12\" cy=\"9.5\" r=\"2.4\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Two-person glyph (partners — customers/vendors/employees). */\r\nexport function usersIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <circle cx=\"9\" cy=\"8\" r=\"3.2\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n <path\r\n d=\"M16 5.3a3.2 3.2 0 0 1 0 6.2M19 20c0-2.8-2-5.1-4.6-5.8\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Open-book glyph (journals). */\r\nexport function bookIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 5.5c-1.6-1-4-1.5-6-1.5-1 0-2 .1-3 .4v13.6c1-.3 2-.4 3-.4 2 0 4.4.5 6 1.5m0-13.6c1.6-1 4-1.5 6-1.5 1 0 2 .1 3 .4v13.6c-1-.3-2-.4-3-.4-2 0-4.4.5-6 1.5m0-13.6v13.6\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.8\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Document/invoice glyph. */\r\nexport function documentIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M6 2h9l5 5v15H6V2z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n <path d=\"M15 2v5h5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n <path d=\"M9 12h6M9 16h6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Receipt glyph, zig-zag bottom edge (credit/debit notes). */\r\nexport function receiptIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M5 2h14v19l-2.5-1.6L14 21l-2.5-1.6L9 21l-2.5-1.6L5 21V2z\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path d=\"M8 8h8M8 12h8\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Percent glyph (taxes). */\r\nexport function percentIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M19 5L5 19\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n <circle cx=\"7\" cy=\"7\" r=\"2.5\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <circle cx=\"17\" cy=\"17\" r=\"2.5\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Stacked-coins glyph (payment terms). */\r\nexport function coinsIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <ellipse cx=\"8\" cy=\"7\" rx=\"5.5\" ry=\"3\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M2.5 7v10c0 1.7 2.5 3 5.5 3s5.5-1.3 5.5-3V7\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M2.5 12c0 1.7 2.5 3 5.5 3s5.5-1.3 5.5-3\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <ellipse cx=\"16.5\" cy=\"12\" rx=\"5\" ry=\"2.7\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M11.5 12v5c0 1.5 2.2 2.7 5 2.7s5-1.2 5-2.7v-5\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Padlock glyph (fiscal year closing / lock dates). */\r\nexport function lockIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <rect x=\"4\" y=\"11\" width=\"16\" height=\"10\" rx=\"2\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n <circle cx=\"12\" cy=\"16\" r=\"1.6\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/**\r\n * Office file-type glyphs, ported from `PennyIcons` in `@sankhyatronics/sankhya-icons`\r\n * (FileWordIcon/FileExcelIcon/FilePowerPointIcon) — this package is Lit, so it can't import\r\n * the React components and carries the same path data instead. Filled, `currentColor`.\r\n */\r\nconst FILE_TYPE_ICON_PATHS = {\r\n word: 'm19.95 5.54-3.48-3.49A6.96 6.96 0 0 0 11.52 0H7C4.24 0 2 2.24 2 5v14c0 2.76 2.24 5 5 5h10c2.76 0 5-2.24 5-5v-8.51c0-1.87-.73-3.63-2.05-4.95Zm-1.41 1.41c.32.32.59.67.81 1.05h-4.34c-.55 0-1-.45-1-1V2.66c.38.22.73.49 1.05.81l3.48 3.49ZM20 19c0 1.65-1.35 3-3 3H7c-1.65 0-3-1.35-3-3V5c0-1.65 1.35-3 3-3h4.51c.16 0 .33 0 .49.02V7c0 1.65 1.35 3 3 3h4.98c.02.16.02.32.02.49V19Zm-3.28-5.76L15.3 18.9c-.15.61-.68 1.05-1.31 1.09-.63.04-1.21-.32-1.44-.91L12 17.7l-.55 1.38c-.22.56-.75.91-1.34.91h-.1c-.63-.04-1.15-.48-1.31-1.1l-1.41-5.66a1 1 0 0 1 1.94-.48l1 4 .85-2.13a1 1 0 0 1 1.86 0l.84 2.13 1.01-4a1 1 0 0 1 1.94.48Z',\r\n excel:\r\n 'M15.27 13.64 13.3 16l1.97 2.36a1.001 1.001 0 1 1-1.54 1.28L12 17.56l-1.73 2.08a.99.99 0 0 1-.77.36c-.23 0-.45-.08-.64-.23-.42-.35-.48-.98-.13-1.41L10.7 16l-1.97-2.36a1.001 1.001 0 1 1 1.54-1.28L12 14.44l1.73-2.08c.35-.42.98-.48 1.41-.13.42.35.48.98.13 1.41ZM22 10.49V19c0 2.76-2.24 5-5 5H7c-2.76 0-5-2.24-5-5V5c0-2.76 2.24-5 5-5h4.51c1.87 0 3.63.73 4.95 2.05l3.48 3.49a6.96 6.96 0 0 1 2.05 4.95Zm-6.95-7.03c-.32-.32-.67-.59-1.05-.81V7c0 .55.45 1 1 1h4.34c-.22-.38-.49-.73-.81-1.05l-3.48-3.49ZM20 10.48c0-.16 0-.33-.02-.49H15c-1.65 0-3-1.35-3-3V2.02C11.84 2 11.68 2 11.51 2H7C5.35 2 4 3.35 4 5v14c0 1.65 1.35 3 3 3h10c1.65 0 3-1.35 3-3v-8.51Z',\r\n powerpoint:\r\n 'm19.95 5.54-3.49-3.49A6.96 6.96 0 0 0 11.51 0H7C4.24 0 2 2.24 2 5v14c0 2.76 2.24 5 5 5h10c2.76 0 5-2.24 5-5v-8.51c0-1.87-.73-3.63-2.05-4.95Zm-1.41 1.41c.32.32.59.67.81 1.05h-4.34c-.55 0-1-.45-1-1V2.66c.38.22.73.49 1.05.81l3.49 3.49ZM20 19c0 1.65-1.35 3-3 3H7c-1.65 0-3-1.35-3-3V5c0-1.65 1.35-3 3-3h4.51c.16 0 .33 0 .49.02V7c0 1.65 1.35 3 3 3h4.98c.02.16.02.32.02.49V19Zm-10 1c-.55 0-1-.45-1-1v-5c0-1.1.9-2 2-2h1c1.65 0 3 1.35 3 3s-1.35 3-3 3h-1v1c0 .55-.45 1-1 1Zm1-4h1c.55 0 1-.45 1-1s-.45-1-1-1h-1v2Z'\r\n} as const;\r\n\r\n/** Word/Excel/PowerPoint file glyph (the document icon in front of template/file rows). */\r\nexport function fileTypeIcon(type: keyof typeof FILE_TYPE_ICON_PATHS, size = 24): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path d=${FILE_TYPE_ICON_PATHS[type]} />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Hamburger glyph (`st-header`'s mobile nav toggle, closed state). */\r\nexport function menuIcon(size = 20): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M4 6h16M4 12h16M4 18h16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** X/close glyph (`st-header`'s mobile nav toggle, open state). */\r\nexport function closeIcon(size = 20): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path d=\"M5 5l14 14M19 5L5 19\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Gear/cog glyph (company settings). */\r\nexport function gearIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"12\" r=\"3\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path\r\n d=\"M12 3v2.2M12 18.8V21M21 12h-2.2M5.2 12H3M18 6l-1.6 1.6M7.6 16.4L6 18M18 18l-1.6-1.6M7.6 7.6L6 6\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n />\r\n </svg>\r\n `;\r\n}\r\n\r\n/** Paint-palette glyph (theme/color-scheme switcher). */\r\nexport function paletteIcon(size = 18): TemplateResult {\r\n return html`\r\n <svg width=${size} height=${size} viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\r\n <path\r\n d=\"M12 3a9 9 0 1 0 0 18c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3-.3-.4-.5-.8-.5-1.2 0-1.1.9-2 2-2h2a4 4 0 0 0 4-4c0-4.4-4-7.5-9-7.5z\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.6\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <circle cx=\"7.5\" cy=\"10.5\" r=\"1.2\" fill=\"currentColor\" />\r\n <circle cx=\"11\" cy=\"7\" r=\"1.2\" fill=\"currentColor\" />\r\n <circle cx=\"15.5\" cy=\"7.5\" r=\"1.2\" fill=\"currentColor\" />\r\n <circle cx=\"17.5\" cy=\"11.5\" r=\"1.2\" fill=\"currentColor\" />\r\n </svg>\r\n `;\r\n}\r\n"],"mappings":";AAAA,SAAS,YAAY;AAWrB,IAAM,oBAAoB;AAGnB,SAAS,aAA6B;AAC3C,SAAO;AAAA;AAAA,8FAEqF,iBAAiB;AAAA;AAAA;AAG/G;AAGO,SAAS,kBAAkB,OAAO,IAAI,YAAY,IAAoB;AAC3E,SAAO;AAAA,iBACQ,SAAS,UAAU,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUvD;AAGO,SAAS,iBAAiB,OAAO,IAAoB;AAC1D,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,YAAY,OAAO,IAAoB;AACrD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpC;AAGO,SAAS,YAAY,OAAO,IAAoB;AACrD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAKpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYpC;AAGO,SAAS,YAAY,WAAsC,OAAO,IAAoB;AAC3F,QAAM,IAAI,EAAE,MAAM,mBAAmB,OAAO,gBAAgB,MAAM,eAAe,EAAE,SAAS;AAE5F,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA,gBACpB,CAAC;AAAA;AAAA;AAGjB;AAGO,SAAS,iBAAiB,OAAO,IAAoB;AAC1D,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAIpC;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAIpC;AAGO,SAAS,cAAc,OAAO,IAAoB;AACvD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAIpC;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAKpC;AAGO,SAAS,cAAc,OAAO,IAAoB;AACvD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAMpC;AAGO,SAAS,aAAa,OAAO,IAAoB;AACtD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASpC;AASO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpC;AAGO,SAAS,QAAQ,OAAO,IAAoB;AACjD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,WAAW,OAAO,IAAoB;AACpD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpC;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,aAAa,OAAO,IAAoB;AACtD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAMpC;AAGO,SAAS,YAAY,OAAO,IAAoB;AACrD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,YAAY,OAAO,IAAoB;AACrD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAMpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpC;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAMpC;AAOA,IAAM,uBAAuB;AAAA,EAC3B,MAAM;AAAA,EACN,OACE;AAAA,EACF,YACE;AACJ;AAGO,SAAS,aAAa,MAAyC,OAAO,IAAoB;AAC/F,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA,gBACpB,qBAAqB,IAAI,CAAC;AAAA;AAAA;AAG1C;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAIpC;AAGO,SAAS,UAAU,OAAO,IAAoB;AACnD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAIpC;AAGO,SAAS,SAAS,OAAO,IAAoB;AAClD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;AAGO,SAAS,YAAY,OAAO,IAAoB;AACrD,SAAO;AAAA,iBACQ,IAAI,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAapC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chevronIcon
3
- } from "./chunk-3TCP25JG.js";
3
+ } from "./chunk-PB7ZPPLP.js";
4
4
  import {
5
5
  invertedSectionTextStyles,
6
6
  reducedMotionStyles,
@@ -506,4 +506,4 @@ Testimonials = __decorateClass([
506
506
  export {
507
507
  Testimonials
508
508
  };
509
- //# sourceMappingURL=chunk-5DNVCMOO.js.map
509
+ //# sourceMappingURL=chunk-S4ARRDAI.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  chevronIcon,
3
3
  externalLinkIcon
4
- } from "./chunk-3TCP25JG.js";
4
+ } from "./chunk-PB7ZPPLP.js";
5
5
  import {
6
6
  controlBaseStyles,
7
7
  eyebrowLabelStyles,
@@ -265,4 +265,4 @@ Select = __decorateClass([
265
265
  export {
266
266
  Select
267
267
  };
268
- //# sourceMappingURL=chunk-5UFRGZWG.js.map
268
+ //# sourceMappingURL=chunk-TLHG33MM.js.map
@@ -18,7 +18,13 @@ import { LitElement } from 'lit';
18
18
  * because they break existing suite uses (`st-source-bar`'s site/library menus): the 100vw panel
19
19
  * at <=768px (overflows the screen from wherever the trigger sits; the header uses `inline`
20
20
  * instead) and `overflow: hidden` on slotted children (clips their focus rings). Suite additions
21
- * kept on top: `align`, `active`, `disabled`, `inline`, and the `dropdown-toggle` event.
21
+ * kept on top: `align`, `active`, `disabled`, `inline`, and the `dropdown-toggle` event — plus
22
+ * `mega` and `open-on-hover` for an okta.com-style mega menu (see `st-mega-menu`).
23
+ *
24
+ * @cssprop --st-mega-menu-max-width - Maximum width of a `mega` panel (default `1400px`).
25
+ * @cssprop --st-mega-menu-inset - Minimum space between a `mega` panel and the header's sides (default `1rem`).
26
+ * @cssprop --st-mega-menu-gap - Space between the header and a `mega` panel (default `12px`).
27
+ * @cssprop --st-mega-menu-radius - Corner radius of a `mega` panel (default `24px`).
22
28
  */
23
29
  declare class Dropdown extends LitElement {
24
30
  /** The open dropdown, if any — the source's `DropdownContext.activeDropdown`. */
@@ -53,6 +59,21 @@ declare class Dropdown extends LitElement {
53
59
  inline: boolean;
54
60
  /** Whether the panel is showing. Follows user toggles; may also be set from outside. */
55
61
  open: boolean;
62
+ /**
63
+ * Mega-menu panel (okta.com style), typically holding an `st-mega-menu`: the panel spans the
64
+ * full width of the nearest positioned ancestor — `st-header` — right under it, instead of
65
+ * hanging off the trigger. In `st-header`'s hamburger layout (`inline`) it slides in over the
66
+ * screen with a Back button rather than opening as an accordion. A click inside the panel only
67
+ * closes it when it lands on a link.
68
+ */
69
+ mega: boolean;
70
+ /** Opens the panel while a mouse hovers the trigger or panel (touch and keyboard still click). Off while `inline`. */
71
+ openOnHover: boolean;
72
+ /** Text of the Back button in the `mega` + `inline` drill-down panel. */
73
+ backLabel: string;
74
+ private hoverTimer;
75
+ /** When hover last opened the panel — a click right after that keeps it open instead of toggling it shut. */
76
+ private hoverOpenedAt;
56
77
  /** Whether the default slot has content — the source's `children` check. */
57
78
  private hasContent;
58
79
  /** Whether `slot="icon"` has content. */
@@ -61,6 +82,11 @@ declare class Dropdown extends LitElement {
61
82
  disconnectedCallback(): void;
62
83
  protected updated(changed: Map<string, unknown>): void;
63
84
  private setOpen;
85
+ private hovers;
86
+ /** Short delays so a pointer crossing the gap between trigger and panel doesn't close it. */
87
+ private onPointerEnter;
88
+ private onPointerLeave;
89
+ private onBackClick;
64
90
  private closeOnOutsideMouseDown;
65
91
  private closeOnEscape;
66
92
  private trigger;
@@ -75,7 +101,9 @@ declare class Dropdown extends LitElement {
75
101
  /** Arrow keys/Home/End move between the panel's entries; Tab closes the panel and moves on. */
76
102
  private onPanelKeyDown;
77
103
  private onTitleClick;
78
- /** A click anywhere inside the panel closes it, as in the source. */
104
+ /** A click anywhere inside the panel closes it, as in the source — for `mega`, only a click on a
105
+ * link: a big panel has headings and gaps, and a click there shouldn't also close st-header's
106
+ * hamburger layer. */
79
107
  private onPanelClick;
80
108
  private onContentSlotChange;
81
109
  private onIconSlotChange;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  Dropdown
3
- } from "../chunk-FWIG6GEZ.js";
3
+ } from "../chunk-5MTPMXAQ.js";
4
+ import "../chunk-PB7ZPPLP.js";
4
5
  import "../chunk-RHAOQ6K4.js";
5
6
  import "../chunk-EUXUH3YW.js";
6
7
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Header
3
- } from "../chunk-PKTRYUGP.js";
4
- import "../chunk-3TCP25JG.js";
3
+ } from "../chunk-5KHI36M5.js";
4
+ import "../chunk-PB7ZPPLP.js";
5
5
  import "../chunk-RHAOQ6K4.js";
6
6
  import "../chunk-EUXUH3YW.js";
7
7
  export {
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export { Hero, HeroActionEventDetail } from './hero/index.js';
12
12
  export { IconButton } from './icon-button/index.js';
13
13
  export { AccordionItem, AccordionToggleEventDetail, ItemsAccordion } from './items-accordion/index.js';
14
14
  export { Markdown, MarkdownErrorEventDetail } from './markdown/index.js';
15
+ export { MegaMenu, MegaMenuColumn, MegaMenuFeature, MegaMenuSelectEventDetail } from './mega-menu/index.js';
15
16
  export { MenuGrid } from './menu-grid/index.js';
16
17
  export { MenuGridItem, MenuGridItemSelectEventDetail } from './menu-grid-item/index.js';
17
18
  export { MenuItem, MenuItemSelectEventDetail } from './menu-item/index.js';
package/dist/index.js CHANGED
@@ -1,68 +1,73 @@
1
1
  import {
2
- Section
3
- } from "./chunk-N63TVWK3.js";
2
+ Stats
3
+ } from "./chunk-USNFT4DU.js";
4
4
  import {
5
5
  Testimonials
6
- } from "./chunk-5DNVCMOO.js";
6
+ } from "./chunk-S4ARRDAI.js";
7
7
  import {
8
8
  MenuGridItem
9
9
  } from "./chunk-4HKSA5UT.js";
10
10
  import {
11
- PromoBanner
12
- } from "./chunk-3ERKQNZT.js";
11
+ MenuGrid
12
+ } from "./chunk-VYON56QO.js";
13
13
  import {
14
14
  MenuItem
15
- } from "./chunk-TH5NZXA7.js";
15
+ } from "./chunk-KHPJ5FAJ.js";
16
+ import {
17
+ PromoBanner
18
+ } from "./chunk-3ERKQNZT.js";
16
19
  import {
17
20
  Select
18
- } from "./chunk-5UFRGZWG.js";
21
+ } from "./chunk-TLHG33MM.js";
19
22
  import {
20
- Stats
21
- } from "./chunk-USNFT4DU.js";
23
+ Section
24
+ } from "./chunk-N63TVWK3.js";
25
+ import {
26
+ FeatureItem,
27
+ FeaturesSection
28
+ } from "./chunk-E52WO7R7.js";
22
29
  import {
23
30
  Footer
24
31
  } from "./chunk-CDC4P77V.js";
25
32
  import {
26
- FeatureSplit
27
- } from "./chunk-5REZSZCK.js";
33
+ IconButton
34
+ } from "./chunk-XXPBFHWR.js";
28
35
  import {
29
36
  Hero
30
37
  } from "./chunk-K4ZICRZL.js";
31
38
  import {
32
39
  Header
33
- } from "./chunk-PKTRYUGP.js";
34
- import "./chunk-3TCP25JG.js";
35
- import {
36
- IconButton
37
- } from "./chunk-XXPBFHWR.js";
40
+ } from "./chunk-5KHI36M5.js";
38
41
  import {
39
42
  ItemsAccordion
40
43
  } from "./chunk-74MILER4.js";
41
44
  import {
42
- MenuGrid
43
- } from "./chunk-VYON56QO.js";
45
+ MegaMenu,
46
+ MegaMenuColumn,
47
+ MegaMenuFeature
48
+ } from "./chunk-MLF6L3KM.js";
49
+ import {
50
+ Card
51
+ } from "./chunk-7PSYCTEN.js";
44
52
  import {
45
53
  BentoGrid
46
54
  } from "./chunk-OEX5FDMR.js";
47
55
  import {
48
56
  Carousel
49
57
  } from "./chunk-47RPYNFG.js";
50
- import {
51
- ContentBlock
52
- } from "./chunk-IMACP7HN.js";
53
58
  import {
54
59
  CookieConsent
55
60
  } from "./chunk-2VZFHTBC.js";
56
61
  import {
57
- Dropdown
58
- } from "./chunk-FWIG6GEZ.js";
62
+ ContentBlock
63
+ } from "./chunk-IMACP7HN.js";
59
64
  import {
60
- FeatureItem,
61
- FeaturesSection
62
- } from "./chunk-E52WO7R7.js";
65
+ Dropdown
66
+ } from "./chunk-5MTPMXAQ.js";
67
+ import "./chunk-PB7ZPPLP.js";
63
68
  import {
64
- Card
65
- } from "./chunk-7PSYCTEN.js";
69
+ FeatureSplit
70
+ } from "./chunk-5REZSZCK.js";
66
71
  import {
67
72
  Markdown
68
73
  } from "./chunk-3JU3R22O.js";
@@ -85,6 +90,9 @@ export {
85
90
  IconButton,
86
91
  ItemsAccordion,
87
92
  Markdown,
93
+ MegaMenu,
94
+ MegaMenuColumn,
95
+ MegaMenuFeature,
88
96
  MenuGrid,
89
97
  MenuGridItem,
90
98
  MenuItem,
@@ -0,0 +1,141 @@
1
+ import * as lit from 'lit';
2
+ import { LitElement } from 'lit';
3
+
4
+ /**
5
+ * The rich layout of a mega-menu panel, after okta.com: an optional intro column on the left (a
6
+ * large `heading`, a `description` and, under a divider, quick links in `slot="intro"`), then the
7
+ * link columns side by side (`st-mega-menu-column`s in the default slot), then an optional
8
+ * featured column on the right (`featured-heading` over the `st-mega-menu-feature` cards in
9
+ * `slot="featured"`). Slot it into an `st-dropdown` with `mega` set.
10
+ *
11
+ * The layout follows the width it is given, not the viewport (a container query): side by side
12
+ * when there is room; intro and featured column above/below two link columns on a medium panel;
13
+ * everything stacked in the narrow drill-down panel `st-header` shows on a phone (where the intro
14
+ * heading is left out — the drill-down already shows the section's name).
15
+ *
16
+ * @slot - The link columns (`st-mega-menu-column`s, or any blocks).
17
+ * @slot intro - Quick links under the intro text, e.g. `st-menu-item`s with an icon.
18
+ * @slot featured - Promo cards (`st-mega-menu-feature`s), stacked.
19
+ * @csspart inner - The grid holding every area.
20
+ * @csspart intro - The intro column.
21
+ * @csspart columns - The grid holding the link columns.
22
+ * @csspart featured - The featured column.
23
+ */
24
+ declare class MegaMenu extends LitElement {
25
+ static styles: lit.CSSResult;
26
+ /** Large title of the intro column. */
27
+ heading: string;
28
+ /** Text under the intro title. */
29
+ description: string;
30
+ /** Heading over the featured cards. */
31
+ featuredHeading: string;
32
+ /** Number of link columns side by side at full width. `0` (the default) uses one per slotted column. */
33
+ columns: number;
34
+ private columnCount;
35
+ private hasIntroLinks;
36
+ private hasFeatured;
37
+ private onColumnsSlotChange;
38
+ private onIntroSlotChange;
39
+ private onFeaturedSlotChange;
40
+ render(): lit.TemplateResult<1>;
41
+ }
42
+
43
+ /**
44
+ * One column (or one group within a column) of an `st-mega-menu`: a heading, an optional line of
45
+ * description, then its links stacked — usually `st-menu-item`s with `variant="link"`. Nest
46
+ * columns to stack several headed groups in one column, as okta.com does.
47
+ *
48
+ * `variant="card"` puts the column on a tinted rounded tile and `variant="accent"` on a solid
49
+ * accent tile with light text; both suit a row of equal columns without intro or featured area.
50
+ * `cta-label` + `cta-href` add a pill button at the bottom of the column.
51
+ *
52
+ * The heading (when `href` is set) and the button fire a *cancelable* `mega-menu-select` event
53
+ * (detail: `{ href }`) before navigating; a host doing client-side routing calls
54
+ * `event.preventDefault()` on it.
55
+ *
56
+ * @slot - The column's links, or nested `st-mega-menu-column` groups.
57
+ * @fires mega-menu-select - The heading link or the button was clicked (cancelable; detail `{ href }`).
58
+ * @csspart heading - The heading text or link.
59
+ * @csspart description - The line under the heading.
60
+ * @csspart items - The box holding the links.
61
+ * @csspart cta - The pill button.
62
+ */
63
+ declare class MegaMenuColumn extends LitElement {
64
+ static styles: lit.CSSResult;
65
+ heading: string;
66
+ /** Makes the heading a link (e.g. to the section's overview page). */
67
+ href: string;
68
+ description: string;
69
+ /** `plain` (default), `card` (tinted tile) or `accent` (solid accent tile, light text). */
70
+ variant: 'plain' | 'card' | 'accent';
71
+ /** Text of a pill button at the bottom of the column; needs `cta-href`. */
72
+ ctaLabel: string;
73
+ ctaHref: string;
74
+ private select;
75
+ private renderHeading;
76
+ private renderCta;
77
+ render(): lit.TemplateResult<1>;
78
+ }
79
+
80
+ /**
81
+ * A promo card for the featured column of an `st-mega-menu` (`slot="featured"`). The whole card
82
+ * is one link. Two looks, after okta.com:
83
+ *
84
+ * - `story` (default): a rounded image on top, then the description and an underlined
85
+ * call-to-action line — a customer story or announcement.
86
+ * - `overlay`: a tile with light text over `image-url` (darkened), or over an accent gradient when
87
+ * there is no image — an optional `logo-url` top left, the title and description at the bottom.
88
+ *
89
+ * An `http(s)` `href` opens in a new tab unless `target` says otherwise. Any other `href` fires a
90
+ * *cancelable* `mega-menu-select` event (detail: `{ href }`) first; a host doing client-side
91
+ * routing calls `event.preventDefault()` on it.
92
+ *
93
+ * @fires mega-menu-select - The card was clicked (cancelable; detail `{ href }`).
94
+ * @csspart card - The card link.
95
+ * @csspart image - The image (`story`).
96
+ * @csspart logo - The logo (`overlay`).
97
+ * @csspart eyebrow - The small label above the title.
98
+ * @csspart title - The title.
99
+ * @csspart description - The description.
100
+ * @csspart cta - The call-to-action line.
101
+ * @cssprop --st-mega-menu-feature-from - Start colour of the `overlay` gradient (default: the accent colour).
102
+ * @cssprop --st-mega-menu-feature-to - End colour of the `overlay` gradient.
103
+ */
104
+ declare class MegaMenuFeature extends LitElement {
105
+ /** `focus()` on the element focuses its link, so `st-dropdown` can arrow-key to it. */
106
+ static shadowRootOptions: {
107
+ delegatesFocus: boolean;
108
+ clonable?: boolean;
109
+ customElementRegistry?: CustomElementRegistry | null;
110
+ mode: ShadowRootMode;
111
+ serializable?: boolean;
112
+ slotAssignment?: SlotAssignmentMode;
113
+ };
114
+ static styles: lit.CSSResult;
115
+ /** `story` (default) or `overlay` — see the element description. */
116
+ variant: 'story' | 'overlay';
117
+ title: string;
118
+ description: string;
119
+ /** Small label above the title, e.g. "New" or "Report". */
120
+ eyebrow: string;
121
+ href: string;
122
+ /** `target` for the link. Defaults to `_blank` for an `http(s)` `href`, `_self` otherwise. */
123
+ target: string;
124
+ /** Image on top (`story`) or behind the text (`overlay`). */
125
+ imageUrl: string;
126
+ imageAlt: string;
127
+ /** Logo at the top of an `overlay` card. */
128
+ logoUrl: string;
129
+ logoAlt: string;
130
+ /** Call-to-action text at the bottom of the card; empty hides it. */
131
+ ctaLabel: string;
132
+ private get isExternal();
133
+ private onClick;
134
+ render(): lit.TemplateResult<1>;
135
+ }
136
+
137
+ interface MegaMenuSelectEventDetail {
138
+ href: string;
139
+ }
140
+
141
+ export { MegaMenu, MegaMenuColumn, MegaMenuFeature, type MegaMenuSelectEventDetail };
@@ -0,0 +1,14 @@
1
+ import {
2
+ MegaMenu,
3
+ MegaMenuColumn,
4
+ MegaMenuFeature
5
+ } from "../chunk-MLF6L3KM.js";
6
+ import "../chunk-PB7ZPPLP.js";
7
+ import "../chunk-RHAOQ6K4.js";
8
+ import "../chunk-EUXUH3YW.js";
9
+ export {
10
+ MegaMenu,
11
+ MegaMenuColumn,
12
+ MegaMenuFeature
13
+ };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -36,6 +36,9 @@ declare class MenuItem extends LitElement {
36
36
  showDescription: boolean;
37
37
  /** `target` for the `<a>` (source default `_self`). */
38
38
  target: string;
39
+ /** `default` (a row with a hover box) or `link` (a plain text link, as in `st-mega-menu-column`;
40
+ * marked with an arrow when it opens a new tab). */
41
+ variant: 'default' | 'link';
39
42
  /** Whether `slot="icon"` has content, so an omitted icon leaves no empty box. */
40
43
  private hasIcon;
41
44
  private onIconSlotChange;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  MenuItem
3
- } from "../chunk-TH5NZXA7.js";
3
+ } from "../chunk-KHPJ5FAJ.js";
4
+ import "../chunk-PB7ZPPLP.js";
4
5
  import "../chunk-RHAOQ6K4.js";
5
6
  import "../chunk-EUXUH3YW.js";
6
7
  export {
@@ -48,6 +48,9 @@ declare const componentTags: {
48
48
  readonly Hero: "st-hero";
49
49
  readonly IconButton: "st-icon-button";
50
50
  readonly ItemsAccordion: "st-items-accordion";
51
+ readonly MegaMenu: "st-mega-menu";
52
+ readonly MegaMenuColumn: "st-mega-menu-column";
53
+ readonly MegaMenuFeature: "st-mega-menu-feature";
51
54
  readonly MenuGrid: "st-menu-grid";
52
55
  readonly MenuGridItem: "st-menu-grid-item";
53
56
  readonly MenuItem: "st-menu-item";
@@ -29,6 +29,9 @@ var componentTags = {
29
29
  Hero: "st-hero",
30
30
  IconButton: "st-icon-button",
31
31
  ItemsAccordion: "st-items-accordion",
32
+ MegaMenu: "st-mega-menu",
33
+ MegaMenuColumn: "st-mega-menu-column",
34
+ MegaMenuFeature: "st-mega-menu-feature",
32
35
  MenuGrid: "st-menu-grid",
33
36
  MenuGridItem: "st-menu-grid-item",
34
37
  MenuItem: "st-menu-item",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/node.ts","../../src/schema/nodeUtils.ts","../../src/schema/components.ts","../../src/schema/validate.ts"],"sourcesContent":["/** Dependency-free node types, safe to import from the content API layer. */\r\n\r\n/** Action reference in JSON, resolved against the `handlers` prop of `DynamicRenderer`. */\r\nexport type ActionRef = `@action:${string}`;\r\n\r\n/** Keys the renderer owns; everything else on a node is passed to the component as a prop. */\r\nexport interface NodeEnvelope<TNode> {\r\n id?: string;\r\n /** Named slot in the parent (e.g. Header: \"utility\"). Omit for the default slot. */\r\n slot?: string;\r\n /** Editor-only label, never passed to the component. */\r\n label?: string;\r\n children?: TNode[];\r\n}\r\n\r\n/**\r\n * A node as it appears in JSON: flat, no `data` wrapper.\r\n * `{ \"type\": \"Hero\", \"id\": \"home-hero\", \"title\": \"...\", \"children\": [...] }`\r\n */\r\nexport interface ComponentNode extends NodeEnvelope<ComponentNode> {\r\n type: string;\r\n [prop: string]: unknown;\r\n}\r\n\r\n/** A page is a list of nodes. */\r\nexport type PageContent = ComponentNode[];\r\n\r\nexport function isComponentNode(value: unknown): value is ComponentNode {\r\n return (\r\n typeof value === 'object' &&\r\n value !== null &&\r\n !Array.isArray(value) &&\r\n typeof (value as { type?: unknown }).type === 'string' &&\r\n (value as { type: string }).type.trim().length > 0\r\n );\r\n}\r\n","import type { ComponentNode } from './node';\r\n\r\n/**\r\n * Returns a copy of `nodes` where the node with the given `id` has `props` merged in.\r\n * Use it to inject runtime state (e.g. the selected language) into fetched JSON without mutating it.\r\n */\r\nexport function patchNodeById(nodes: ComponentNode[], id: string, props: Record<string, unknown>): ComponentNode[] {\r\n return nodes.map(node => {\r\n const patched = node.id === id ? { ...node, ...props } : node;\r\n return patched.children\r\n ? { ...patched, children: patchNodeById(patched.children, id, props) }\r\n : patched;\r\n });\r\n}\r\n","/**\r\n * The JSON `type` of every base component, and the Lit element that renders it.\r\n * This is the contract page JSON is written against — renderers (React, or any other binding)\r\n * map each `type` to their own component for that element.\r\n */\r\nexport const componentTags = {\r\n BentoGrid: 'st-bento-grid',\r\n Card: 'st-card',\r\n Carousel: 'st-carousel',\r\n ContentBlock: 'st-content-block',\r\n CookieConsent: 'st-cookie-consent',\r\n Dropdown: 'st-dropdown',\r\n FeatureItem: 'st-feature-item',\r\n FeatureSplit: 'st-feature-split',\r\n FeaturesSection: 'st-features-section',\r\n Footer: 'st-footer',\r\n Header: 'st-header',\r\n Hero: 'st-hero',\r\n IconButton: 'st-icon-button',\r\n ItemsAccordion: 'st-items-accordion',\r\n MenuGrid: 'st-menu-grid',\r\n MenuGridItem: 'st-menu-grid-item',\r\n MenuItem: 'st-menu-item',\r\n PromoBanner: 'st-promo-banner',\r\n Section: 'st-section',\r\n Select: 'st-select',\r\n Stats: 'st-stats',\r\n Testimonials: 'st-testimonials'\r\n} as const;\r\n\r\n/** Every `type` the base set knows. */\r\nexport type ComponentType = keyof typeof componentTags;\r\n\r\nexport function isBaseComponentType(type: string): type is ComponentType {\r\n return Object.hasOwn(componentTags, type);\r\n}\r\n","import { isBaseComponentType } from './components';\r\nimport type { ComponentNode } from './node';\r\n\r\n/** Keys from the pre-flat schema; their presence means the JSON still needs `scripts/migrate-json.mjs`. */\r\nconst LEGACY_KEYS = ['data', 'embeddedView', 'data-position', 'image', 'contentUrl'] as const;\r\n\r\n/**\r\n * Returns the schema violations for a node and its descendants (empty when valid).\r\n * `isKnownType` defaults to the base component set; pass a wider predicate when a renderer also\r\n * registers custom components.\r\n */\r\nexport function validateNode(node: unknown, where = 'node', isKnownType: (type: string) => boolean = isBaseComponentType): string[] {\r\n if (typeof node !== 'object' || node === null || Array.isArray(node)) return [`${where}: node must be an object`];\r\n const n = node as ComponentNode;\r\n const found: string[] = [];\r\n if (typeof n.type !== 'string' || !isKnownType(n.type)) found.push(`${where}: unknown type \"${String(n.type)}\"`);\r\n for (const legacy of LEGACY_KEYS) {\r\n if (legacy in n) found.push(`${where}: legacy key \"${legacy}\"`);\r\n }\r\n if (Array.isArray(n.items) && n.items.some(item => typeof item === 'object' && item !== null && 'type' in item)) {\r\n found.push(`${where}: \"items\" must hold plain data; nest components under \"children\"`);\r\n }\r\n if (n.children !== undefined) {\r\n if (!Array.isArray(n.children)) found.push(`${where}: children must be an array`);\r\n else n.children.forEach((child, i) => found.push(...validateNode(child, `${where}.children[${i}]`, isKnownType)));\r\n }\r\n return found;\r\n}\r\n\r\n/** Validates a page: a node or a list of nodes. */\r\nexport function validatePage(page: unknown, isKnownType?: (type: string) => boolean): string[] {\r\n const nodes = Array.isArray(page) ? page : [page];\r\n return nodes.flatMap((node, i) => validateNode(node, `[${i}]`, isKnownType));\r\n}\r\n"],"mappings":";;;AA2BO,SAAS,gBAAgB,OAAwC;AACpE,SACI,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAQ,MAA6B,SAAS,YAC7C,MAA2B,KAAK,KAAK,EAAE,SAAS;AAEzD;;;AC7BO,SAAS,cAAc,OAAwB,IAAY,OAAiD;AAC/G,SAAO,MAAM,IAAI,UAAQ;AACrB,UAAM,UAAU,KAAK,OAAO,KAAK,EAAE,GAAG,MAAM,GAAG,MAAM,IAAI;AACzD,WAAO,QAAQ,WACT,EAAE,GAAG,SAAS,UAAU,cAAc,QAAQ,UAAU,IAAI,KAAK,EAAE,IACnE;AAAA,EACV,CAAC;AACL;;;ACRO,IAAM,gBAAgB;AAAA,EACzB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,aAAa;AAAA,EACb,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,cAAc;AAAA,EACd,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,cAAc;AAClB;AAKO,SAAS,oBAAoB,MAAqC;AACrE,SAAO,OAAO,OAAO,eAAe,IAAI;AAC5C;;;AC/BA,IAAM,cAAc,CAAC,QAAQ,gBAAgB,iBAAiB,SAAS,YAAY;AAO5E,SAAS,aAAa,MAAe,QAAQ,QAAQ,cAAyC,qBAA+B;AAChI,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,MAAM,QAAQ,IAAI,EAAG,QAAO,CAAC,GAAG,KAAK,0BAA0B;AAChH,QAAM,IAAI;AACV,QAAM,QAAkB,CAAC;AACzB,MAAI,OAAO,EAAE,SAAS,YAAY,CAAC,YAAY,EAAE,IAAI,EAAG,OAAM,KAAK,GAAG,KAAK,mBAAmB,OAAO,EAAE,IAAI,CAAC,GAAG;AAC/G,aAAW,UAAU,aAAa;AAC9B,QAAI,UAAU,EAAG,OAAM,KAAK,GAAG,KAAK,iBAAiB,MAAM,GAAG;AAAA,EAClE;AACA,MAAI,MAAM,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,KAAK,UAAQ,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,IAAI,GAAG;AAC7G,UAAM,KAAK,GAAG,KAAK,kEAAkE;AAAA,EACzF;AACA,MAAI,EAAE,aAAa,QAAW;AAC1B,QAAI,CAAC,MAAM,QAAQ,EAAE,QAAQ,EAAG,OAAM,KAAK,GAAG,KAAK,6BAA6B;AAAA,QAC3E,GAAE,SAAS,QAAQ,CAAC,OAAO,MAAM,MAAM,KAAK,GAAG,aAAa,OAAO,GAAG,KAAK,aAAa,CAAC,KAAK,WAAW,CAAC,CAAC;AAAA,EACpH;AACA,SAAO;AACX;AAGO,SAAS,aAAa,MAAe,aAAmD;AAC3F,QAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,SAAO,MAAM,QAAQ,CAAC,MAAM,MAAM,aAAa,MAAM,IAAI,CAAC,KAAK,WAAW,CAAC;AAC/E;","names":[]}
1
+ {"version":3,"sources":["../../src/schema/node.ts","../../src/schema/nodeUtils.ts","../../src/schema/components.ts","../../src/schema/validate.ts"],"sourcesContent":["/** Dependency-free node types, safe to import from the content API layer. */\r\n\r\n/** Action reference in JSON, resolved against the `handlers` prop of `DynamicRenderer`. */\r\nexport type ActionRef = `@action:${string}`;\r\n\r\n/** Keys the renderer owns; everything else on a node is passed to the component as a prop. */\r\nexport interface NodeEnvelope<TNode> {\r\n id?: string;\r\n /** Named slot in the parent (e.g. Header: \"utility\"). Omit for the default slot. */\r\n slot?: string;\r\n /** Editor-only label, never passed to the component. */\r\n label?: string;\r\n children?: TNode[];\r\n}\r\n\r\n/**\r\n * A node as it appears in JSON: flat, no `data` wrapper.\r\n * `{ \"type\": \"Hero\", \"id\": \"home-hero\", \"title\": \"...\", \"children\": [...] }`\r\n */\r\nexport interface ComponentNode extends NodeEnvelope<ComponentNode> {\r\n type: string;\r\n [prop: string]: unknown;\r\n}\r\n\r\n/** A page is a list of nodes. */\r\nexport type PageContent = ComponentNode[];\r\n\r\nexport function isComponentNode(value: unknown): value is ComponentNode {\r\n return (\r\n typeof value === 'object' &&\r\n value !== null &&\r\n !Array.isArray(value) &&\r\n typeof (value as { type?: unknown }).type === 'string' &&\r\n (value as { type: string }).type.trim().length > 0\r\n );\r\n}\r\n","import type { ComponentNode } from './node';\r\n\r\n/**\r\n * Returns a copy of `nodes` where the node with the given `id` has `props` merged in.\r\n * Use it to inject runtime state (e.g. the selected language) into fetched JSON without mutating it.\r\n */\r\nexport function patchNodeById(nodes: ComponentNode[], id: string, props: Record<string, unknown>): ComponentNode[] {\r\n return nodes.map(node => {\r\n const patched = node.id === id ? { ...node, ...props } : node;\r\n return patched.children\r\n ? { ...patched, children: patchNodeById(patched.children, id, props) }\r\n : patched;\r\n });\r\n}\r\n","/**\r\n * The JSON `type` of every base component, and the Lit element that renders it.\r\n * This is the contract page JSON is written against — renderers (React, or any other binding)\r\n * map each `type` to their own component for that element.\r\n */\r\nexport const componentTags = {\r\n BentoGrid: 'st-bento-grid',\r\n Card: 'st-card',\r\n Carousel: 'st-carousel',\r\n ContentBlock: 'st-content-block',\r\n CookieConsent: 'st-cookie-consent',\r\n Dropdown: 'st-dropdown',\r\n FeatureItem: 'st-feature-item',\r\n FeatureSplit: 'st-feature-split',\r\n FeaturesSection: 'st-features-section',\r\n Footer: 'st-footer',\r\n Header: 'st-header',\r\n Hero: 'st-hero',\r\n IconButton: 'st-icon-button',\r\n ItemsAccordion: 'st-items-accordion',\r\n MegaMenu: 'st-mega-menu',\r\n MegaMenuColumn: 'st-mega-menu-column',\r\n MegaMenuFeature: 'st-mega-menu-feature',\r\n MenuGrid: 'st-menu-grid',\r\n MenuGridItem: 'st-menu-grid-item',\r\n MenuItem: 'st-menu-item',\r\n PromoBanner: 'st-promo-banner',\r\n Section: 'st-section',\r\n Select: 'st-select',\r\n Stats: 'st-stats',\r\n Testimonials: 'st-testimonials'\r\n} as const;\r\n\r\n/** Every `type` the base set knows. */\r\nexport type ComponentType = keyof typeof componentTags;\r\n\r\nexport function isBaseComponentType(type: string): type is ComponentType {\r\n return Object.hasOwn(componentTags, type);\r\n}\r\n","import { isBaseComponentType } from './components';\r\nimport type { ComponentNode } from './node';\r\n\r\n/** Keys from the pre-flat schema; their presence means the JSON still needs `scripts/migrate-json.mjs`. */\r\nconst LEGACY_KEYS = ['data', 'embeddedView', 'data-position', 'image', 'contentUrl'] as const;\r\n\r\n/**\r\n * Returns the schema violations for a node and its descendants (empty when valid).\r\n * `isKnownType` defaults to the base component set; pass a wider predicate when a renderer also\r\n * registers custom components.\r\n */\r\nexport function validateNode(node: unknown, where = 'node', isKnownType: (type: string) => boolean = isBaseComponentType): string[] {\r\n if (typeof node !== 'object' || node === null || Array.isArray(node)) return [`${where}: node must be an object`];\r\n const n = node as ComponentNode;\r\n const found: string[] = [];\r\n if (typeof n.type !== 'string' || !isKnownType(n.type)) found.push(`${where}: unknown type \"${String(n.type)}\"`);\r\n for (const legacy of LEGACY_KEYS) {\r\n if (legacy in n) found.push(`${where}: legacy key \"${legacy}\"`);\r\n }\r\n if (Array.isArray(n.items) && n.items.some(item => typeof item === 'object' && item !== null && 'type' in item)) {\r\n found.push(`${where}: \"items\" must hold plain data; nest components under \"children\"`);\r\n }\r\n if (n.children !== undefined) {\r\n if (!Array.isArray(n.children)) found.push(`${where}: children must be an array`);\r\n else n.children.forEach((child, i) => found.push(...validateNode(child, `${where}.children[${i}]`, isKnownType)));\r\n }\r\n return found;\r\n}\r\n\r\n/** Validates a page: a node or a list of nodes. */\r\nexport function validatePage(page: unknown, isKnownType?: (type: string) => boolean): string[] {\r\n const nodes = Array.isArray(page) ? page : [page];\r\n return nodes.flatMap((node, i) => validateNode(node, `[${i}]`, isKnownType));\r\n}\r\n"],"mappings":";;;AA2BO,SAAS,gBAAgB,OAAwC;AACpE,SACI,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,KACpB,OAAQ,MAA6B,SAAS,YAC7C,MAA2B,KAAK,KAAK,EAAE,SAAS;AAEzD;;;AC7BO,SAAS,cAAc,OAAwB,IAAY,OAAiD;AAC/G,SAAO,MAAM,IAAI,UAAQ;AACrB,UAAM,UAAU,KAAK,OAAO,KAAK,EAAE,GAAG,MAAM,GAAG,MAAM,IAAI;AACzD,WAAO,QAAQ,WACT,EAAE,GAAG,SAAS,UAAU,cAAc,QAAQ,UAAU,IAAI,KAAK,EAAE,IACnE;AAAA,EACV,CAAC;AACL;;;ACRO,IAAM,gBAAgB;AAAA,EACzB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,aAAa;AAAA,EACb,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,cAAc;AAAA,EACd,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,cAAc;AAClB;AAKO,SAAS,oBAAoB,MAAqC;AACrE,SAAO,OAAO,OAAO,eAAe,IAAI;AAC5C;;;AClCA,IAAM,cAAc,CAAC,QAAQ,gBAAgB,iBAAiB,SAAS,YAAY;AAO5E,SAAS,aAAa,MAAe,QAAQ,QAAQ,cAAyC,qBAA+B;AAChI,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,MAAM,QAAQ,IAAI,EAAG,QAAO,CAAC,GAAG,KAAK,0BAA0B;AAChH,QAAM,IAAI;AACV,QAAM,QAAkB,CAAC;AACzB,MAAI,OAAO,EAAE,SAAS,YAAY,CAAC,YAAY,EAAE,IAAI,EAAG,OAAM,KAAK,GAAG,KAAK,mBAAmB,OAAO,EAAE,IAAI,CAAC,GAAG;AAC/G,aAAW,UAAU,aAAa;AAC9B,QAAI,UAAU,EAAG,OAAM,KAAK,GAAG,KAAK,iBAAiB,MAAM,GAAG;AAAA,EAClE;AACA,MAAI,MAAM,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,KAAK,UAAQ,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,IAAI,GAAG;AAC7G,UAAM,KAAK,GAAG,KAAK,kEAAkE;AAAA,EACzF;AACA,MAAI,EAAE,aAAa,QAAW;AAC1B,QAAI,CAAC,MAAM,QAAQ,EAAE,QAAQ,EAAG,OAAM,KAAK,GAAG,KAAK,6BAA6B;AAAA,QAC3E,GAAE,SAAS,QAAQ,CAAC,OAAO,MAAM,MAAM,KAAK,GAAG,aAAa,OAAO,GAAG,KAAK,aAAa,CAAC,KAAK,WAAW,CAAC,CAAC;AAAA,EACpH;AACA,SAAO;AACX;AAGO,SAAS,aAAa,MAAe,aAAmD;AAC3F,QAAM,QAAQ,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;AAChD,SAAO,MAAM,QAAQ,CAAC,MAAM,MAAM,aAAa,MAAM,IAAI,CAAC,KAAK,WAAW,CAAC;AAC/E;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Select
3
- } from "../chunk-5UFRGZWG.js";
4
- import "../chunk-3TCP25JG.js";
3
+ } from "../chunk-TLHG33MM.js";
4
+ import "../chunk-PB7ZPPLP.js";
5
5
  import "../chunk-RHAOQ6K4.js";
6
6
  import "../chunk-EUXUH3YW.js";
7
7
  export {
@@ -14,6 +14,8 @@ declare function historyIcon(size?: number): TemplateResult;
14
14
  declare function trashIcon(size?: number): TemplateResult;
15
15
  /** Chevron glyph (pager prev/next buttons, the select trigger's caret). */
16
16
  declare function chevronIcon(direction: 'left' | 'right' | 'down', size?: number): TemplateResult;
17
+ /** Up-right arrow glyph (marks a link that leaves the site — mega-menu links and buttons). */
18
+ declare function arrowUpRightIcon(size?: number): TemplateResult;
17
19
  /** Plus glyph ("New folder" action button). */
18
20
  declare function plusIcon(size?: number): TemplateResult;
19
21
  /** Cards-view glyph (2x2 grid — view-toggle button). */
@@ -74,4 +76,4 @@ declare function gearIcon(size?: number): TemplateResult;
74
76
  /** Paint-palette glyph (theme/color-scheme switcher). */
75
77
  declare function paletteIcon(size?: number): TemplateResult;
76
78
 
77
- export { bentoGridIcon, bookIcon, boxIcon, cardsViewIcon, cartIcon, checkIcon, chevronIcon, closeIcon, coinsIcon, documentIcon, externalLinkIcon, fileTypeIcon, folderIcon, folderOutlineIcon, gearIcon, historyIcon, listViewIcon, lockIcon, mapPinIcon, menuIcon, paletteIcon, percentIcon, plusIcon, receiptIcon, refreshIcon, siteIcon, trashIcon, truckIcon, usersIcon };
79
+ export { arrowUpRightIcon, bentoGridIcon, bookIcon, boxIcon, cardsViewIcon, cartIcon, checkIcon, chevronIcon, closeIcon, coinsIcon, documentIcon, externalLinkIcon, fileTypeIcon, folderIcon, folderOutlineIcon, gearIcon, historyIcon, listViewIcon, lockIcon, mapPinIcon, menuIcon, paletteIcon, percentIcon, plusIcon, receiptIcon, refreshIcon, siteIcon, trashIcon, truckIcon, usersIcon };
@@ -1,4 +1,5 @@
1
1
  import {
2
+ arrowUpRightIcon,
2
3
  bentoGridIcon,
3
4
  bookIcon,
4
5
  boxIcon,
@@ -28,9 +29,10 @@ import {
28
29
  trashIcon,
29
30
  truckIcon,
30
31
  usersIcon
31
- } from "../chunk-3TCP25JG.js";
32
+ } from "../chunk-PB7ZPPLP.js";
32
33
  import "../chunk-EUXUH3YW.js";
33
34
  export {
35
+ arrowUpRightIcon,
34
36
  bentoGridIcon,
35
37
  bookIcon,
36
38
  boxIcon,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Testimonials
3
- } from "../chunk-5DNVCMOO.js";
4
- import "../chunk-3TCP25JG.js";
3
+ } from "../chunk-S4ARRDAI.js";
4
+ import "../chunk-PB7ZPPLP.js";
5
5
  import "../chunk-3VE6VFJ4.js";
6
6
  import "../chunk-RHAOQ6K4.js";
7
7
  import "../chunk-EUXUH3YW.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyatronics/sankhya-cms",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sankhyatronics/SankhyaCMS.git",
@@ -75,6 +75,10 @@
75
75
  "types": "./dist/markdown/index.d.ts",
76
76
  "import": "./dist/markdown/index.js"
77
77
  },
78
+ "./mega-menu": {
79
+ "types": "./dist/mega-menu/index.d.ts",
80
+ "import": "./dist/mega-menu/index.js"
81
+ },
78
82
  "./menu-grid": {
79
83
  "types": "./dist/menu-grid/index.d.ts",
80
84
  "import": "./dist/menu-grid/index.js"
@@ -131,7 +135,7 @@
131
135
  ],
132
136
  "sideEffects": true,
133
137
  "scripts": {
134
- "build": "tsup src/index.ts src/schema/index.ts src/theming/index.ts src/shared/styles.ts src/shared/icons.ts src/bento-grid/index.ts src/card/index.ts src/carousel/index.ts src/content-block/index.ts src/cookie-consent/index.ts src/dropdown/index.ts src/feature-split/index.ts src/features-section/index.ts src/footer/index.ts src/header/index.ts src/hero/index.ts src/icon-button/index.ts src/items-accordion/index.ts src/markdown/index.ts src/menu-grid/index.ts src/menu-grid-item/index.ts src/menu-item/index.ts src/promo-banner/index.ts src/section/index.ts src/select/index.ts src/stats/index.ts src/testimonials/index.ts --format esm --dts --sourcemap --clean && node scripts/copy-theme.mjs && cem analyze",
138
+ "build": "tsup src/index.ts src/schema/index.ts src/theming/index.ts src/shared/styles.ts src/shared/icons.ts src/bento-grid/index.ts src/card/index.ts src/carousel/index.ts src/content-block/index.ts src/cookie-consent/index.ts src/dropdown/index.ts src/feature-split/index.ts src/features-section/index.ts src/footer/index.ts src/header/index.ts src/hero/index.ts src/icon-button/index.ts src/items-accordion/index.ts src/markdown/index.ts src/mega-menu/index.ts src/menu-grid/index.ts src/menu-grid-item/index.ts src/menu-item/index.ts src/promo-banner/index.ts src/section/index.ts src/select/index.ts src/stats/index.ts src/testimonials/index.ts --format esm --dts --sourcemap --clean && node scripts/copy-theme.mjs && cem analyze",
135
139
  "dev": "tsup src/index.ts --watch --format esm --dts",
136
140
  "typecheck": "tsc --noEmit",
137
141
  "lint": "oxlint",