@sankhyatronics/sankhya-cms 0.1.16 → 0.2.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/custom-elements.json +842 -213
- package/dist/bento-grid/index.d.ts +8 -1
- package/dist/bento-grid/index.js +2 -1
- package/dist/card/index.d.ts +3 -4
- package/dist/card/index.js +1 -1
- package/dist/{chunk-LEXZKGQX.js → chunk-2DXHPEB5.js} +1 -1
- package/dist/chunk-2DXHPEB5.js.map +1 -0
- package/dist/{chunk-R5G6KFTJ.js → chunk-2FJDNJ7R.js} +1 -1
- package/dist/chunk-2FJDNJ7R.js.map +1 -0
- package/dist/{chunk-ZN4LIKVG.js → chunk-3OEEOBHB.js} +1 -1
- package/dist/chunk-3OEEOBHB.js.map +1 -0
- package/dist/{chunk-BMHMNXIA.js → chunk-4AFOKKSU.js} +1 -1
- package/dist/chunk-4AFOKKSU.js.map +1 -0
- package/dist/{chunk-76AVBQUA.js → chunk-5C6C6K5U.js} +98 -4
- package/dist/chunk-5C6C6K5U.js.map +1 -0
- package/dist/{chunk-7NLZND6Q.js → chunk-5F5PTVWR.js} +27 -2
- package/dist/chunk-5F5PTVWR.js.map +1 -0
- package/dist/chunk-5MY6OWMK.js +125 -0
- package/dist/chunk-5MY6OWMK.js.map +1 -0
- package/dist/{chunk-FLY7TNRT.js → chunk-7NIWQWTA.js} +1 -1
- package/dist/chunk-7NIWQWTA.js.map +1 -0
- package/dist/{chunk-ALI26WOB.js → chunk-EE6PAN3B.js} +33 -2
- package/dist/chunk-EE6PAN3B.js.map +1 -0
- package/dist/chunk-FML6AG2V.js +107 -0
- package/dist/chunk-FML6AG2V.js.map +1 -0
- package/dist/{chunk-VWS53WY4.js → chunk-HMUZON6I.js} +49 -4
- package/dist/chunk-HMUZON6I.js.map +1 -0
- package/dist/{chunk-G3CF7MBO.js → chunk-J6EO4R73.js} +27 -1
- package/dist/{chunk-G3CF7MBO.js.map → chunk-J6EO4R73.js.map} +1 -1
- package/dist/chunk-O4FCRKDX.js +178 -0
- package/dist/chunk-O4FCRKDX.js.map +1 -0
- package/dist/{chunk-SMLR736E.js → chunk-OELI3IWC.js} +1 -1
- package/dist/chunk-OELI3IWC.js.map +1 -0
- package/dist/{chunk-JQY2G4QK.js → chunk-OLA35A2O.js} +1 -1
- package/dist/chunk-OLA35A2O.js.map +1 -0
- package/dist/{chunk-YQ42EBK5.js → chunk-PHEGSCOM.js} +1 -1
- package/dist/chunk-PHEGSCOM.js.map +1 -0
- package/dist/{chunk-5EBWMPJS.js → chunk-QLA4BH2B.js} +5 -5
- package/dist/chunk-QLA4BH2B.js.map +1 -0
- package/dist/{chunk-JKBWZLG4.js → chunk-SQ3OZO32.js} +141 -3
- package/dist/chunk-SQ3OZO32.js.map +1 -0
- package/dist/chunk-UAIUBPDN.js +11 -0
- package/dist/chunk-UAIUBPDN.js.map +1 -0
- package/dist/{chunk-XWB4CKDU.js → chunk-XUGEXERO.js} +6 -6
- package/dist/chunk-XUGEXERO.js.map +1 -0
- package/dist/chunk-ZRC5BVDX.js +219 -0
- package/dist/chunk-ZRC5BVDX.js.map +1 -0
- package/dist/cms-theme.css +7 -0
- package/dist/content-block/index.d.ts +2 -3
- package/dist/content-block/index.js +3 -2
- package/dist/dropdown/index.d.ts +8 -11
- package/dist/dropdown/index.js +1 -1
- package/dist/feature-split/index.js +2 -1
- package/dist/features-section/index.d.ts +4 -4
- package/dist/features-section/index.js +4 -3
- package/dist/flow/index.d.ts +35 -0
- package/dist/flow/index.js +9 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/header/index.d.ts +8 -15
- package/dist/header/index.js +1 -1
- package/dist/hero/index.d.ts +18 -3
- package/dist/hero/index.js +1 -1
- package/dist/icon-button/index.d.ts +2 -4
- package/dist/icon-button/index.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +38 -25
- package/dist/items-accordion/index.d.ts +5 -0
- package/dist/items-accordion/index.js +2 -1
- package/dist/markdown/index.d.ts +1 -2
- package/dist/markdown/index.js +2 -1
- package/dist/mega-menu/index.d.ts +2 -2
- package/dist/mega-menu/index.js +1 -1
- package/dist/menu-grid/index.d.ts +2 -3
- package/dist/menu-grid/index.js +1 -1
- package/dist/menu-grid-item/index.d.ts +6 -8
- package/dist/menu-grid-item/index.js +1 -1
- package/dist/menu-item/index.d.ts +5 -7
- package/dist/menu-item/index.js +1 -1
- package/dist/promo-banner/index.d.ts +14 -3
- package/dist/promo-banner/index.js +1 -1
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/section/index.d.ts +3 -0
- package/dist/section/index.js +1 -1
- package/dist/steps/index.d.ts +33 -0
- package/dist/steps/index.js +10 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/tag-strip/index.d.ts +26 -0
- package/dist/tag-strip/index.js +9 -0
- package/dist/tag-strip/index.js.map +1 -0
- package/dist/tooltip/index.d.ts +18 -6
- package/dist/tooltip/index.js +1 -1
- package/package.json +14 -2
- package/dist/chunk-5EBWMPJS.js.map +0 -1
- package/dist/chunk-76AVBQUA.js.map +0 -1
- package/dist/chunk-7NLZND6Q.js.map +0 -1
- package/dist/chunk-ALI26WOB.js.map +0 -1
- package/dist/chunk-BMHMNXIA.js.map +0 -1
- package/dist/chunk-FLY7TNRT.js.map +0 -1
- package/dist/chunk-JKBWZLG4.js.map +0 -1
- package/dist/chunk-JQY2G4QK.js.map +0 -1
- package/dist/chunk-LEXZKGQX.js.map +0 -1
- package/dist/chunk-R5G6KFTJ.js.map +0 -1
- package/dist/chunk-SMLR736E.js.map +0 -1
- package/dist/chunk-VWS53WY4.js.map +0 -1
- package/dist/chunk-XCA3XFFG.js +0 -74
- package/dist/chunk-XCA3XFFG.js.map +0 -1
- package/dist/chunk-XWB4CKDU.js.map +0 -1
- package/dist/chunk-YQ42EBK5.js.map +0 -1
- package/dist/chunk-ZN4LIKVG.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/header/Header.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { chevronIcon, closeIcon, menuIcon } from '../shared/icons';\nimport { BREAKPOINT_TABLET, buttonResetStyles, controlBaseStyles, dropdownPanelStyles, rootFontFamilyStyles } from '../shared/styles';\nimport type { LanguageChangedEventDetail } from './HeaderEvents';\n\n/**\n * The app-shell header bar — brand (image + title, or title alone) on the left, a `slot=\"menu\"`\n * for primary nav (e.g. `st-dropdown`/`st-menu-grid` mega-menus, or plain links) taking the\n * middle, and a `slot=\"utility\"` for account/app-switcher/theme controls on the right. `title` is\n * the primary brand prop; `brand-image-url` is optional. For a fixed nav-links/user-menu header,\n * use `st-app-header` instead.\n *\n * Layout: the menu starts 4rem after the brand, the utility\n * controls sit after a vertical divider, and below `BREAKPOINT_TABLET` (900px) `menu`/`utility`\n * collapse behind a hamburger toggle into a full-screen layer under the\n * toggle (closes on Escape or a click inside it), where the menu's `st-dropdown`s are switched to\n * `inline` so they open in the flow — the same two slotted elements just get repositioned by CSS\n * (`.mobile-panel`'s `display: contents` at desktop width vs. a real fixed-position box below\n * `BREAKPOINT_TABLET`), rather than the slots being duplicated in the template, since a shadow\n * root can only ever assign a given light-DOM child to the *first* slot of a given name.\n *\n * An optional `slot=\"brand-extra\"` sits right after the brand (e.g. an edition badge such as\n * \"🇮🇳 India Edition\"); unlike `menu`/`utility` it stays in the bar at every width.\n *\n * Also carries an optional built-in language switcher (`languages`/`currentLanguageCode`, fires\n * `language-change`). Hidden entirely when `languages` has fewer than two entries.\n * This component has no translation logic itself; the consuming app owns what a language `code`\n * means and which content it re-renders in response.\n *\n * @slot menu - Primary navigation.\n * @slot utility - Account, app-switcher and theme controls, after the divider.\n * @slot brand-extra - Shown right after the brand at every width (e.g. an edition badge).\n * @slot menu-icon - Replaces the hamburger on the narrow-screen toggle (the built-in glyph when empty).\n * @slot close-icon - Replaces the close (X) on the toggle while the menu is open (the built-in glyph when empty).\n * @cssprop --st-header-toggle-icon-size - Width and height of a slotted toggle icon (default 20px, the built-in glyph's size).\n */\n@customElement('st-header')\nexport class Header extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: flex;\n align-items: center;\n /* The containing block of an st-dropdown[mega] panel, which spans the bar. */\n position: relative;\n /* Spacing between brand, menu and utility controls is the rows' own margins, not a\n flex gap. */\n gap: 0;\n /* !important on the box-model properties only: a shadow host's own :host rule always loses\n * to ANY rule the consuming page has for the same property on that element, regardless of\n * specificity (see st-footer's own padding/border-top for the same fix). Without\n * box-sizing: border-box pinned here, a page that also sets its own padding on this host\n * (e.g. a p-2 utility class) adds that padding on TOP of the fixed 64px height instead of\n * being absorbed inside it — which is exactly what happens in Template Hub, the one app that\n * doesn't load Tailwind Preflight (Preflight's own box-sizing: border-box reset is what\n * silently keeps every other app's header at the intended 64px). */\n box-sizing: border-box !important;\n padding: 0 2rem !important;\n height: 64px !important;\n background: var(--st-color-surface);\n border-bottom: 1px solid var(--st-color-border) !important;\n ${rootFontFamilyStyles}\n color: var(--st-color-text-strong);\n }\n\n :host([sticky]) {\n position: sticky;\n top: 0;\n z-index: 100;\n }\n\n /* Toggle icons: a host's slotted icon, else the built-in glyph; only the current state's shows. */\n .toggle slot {\n display: contents;\n }\n\n .toggle slot[hidden] {\n display: none;\n }\n\n .toggle ::slotted(*) {\n flex: none;\n width: var(--st-header-toggle-icon-size, 20px);\n height: var(--st-header-toggle-icon-size, 20px);\n }\n\n :host([inverted]) {\n background: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n border-bottom-color: transparent;\n }\n\n :host([sticky]),\n :host([transparent]),\n :host([hide-on-scroll]) {\n transition:\n background-color 0.3s ease,\n color 0.3s ease,\n box-shadow 0.3s ease,\n border-color 0.3s ease,\n transform 0.3s ease;\n }\n\n /* Once the page has scrolled, a sticky/fixed header lifts off the content. */\n :host([scrolled][sticky]),\n :host([scrolled][transparent]),\n :host([scrolled][hide-on-scroll]) {\n box-shadow: 0 4px 16px var(--st-shadow-color-md);\n border-bottom-color: transparent !important;\n }\n\n /* transparent: fixed over the top of the page (e.g. a dark hero), see-through until scrolled. */\n :host([transparent]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 100;\n }\n\n :host([transparent]:not([scrolled]):not([mobile-open])) {\n background: transparent;\n border-bottom-color: transparent !important;\n color: var(--st-header-transparent-color, var(--st-color-on-solid));\n /* Read by st-menu-item / st-dropdown triggers in the bar (their panels reset them). */\n --st-nav-color: var(--st-header-transparent-color, var(--st-color-on-solid));\n --st-nav-hover-bg: color-mix(in oklch, currentColor 14%, transparent);\n }\n\n :host([transparent]:not([scrolled]):not([mobile-open])) .utility-row {\n border-left-color: color-mix(in oklch, currentColor 35%, transparent);\n }\n\n :host([transparent]:not([scrolled]):not([mobile-open])) .lang-trigger {\n color: inherit;\n }\n\n :host([transparent]:not([scrolled]):not([mobile-open])) .lang-trigger:hover,\n :host([transparent]:not([scrolled]):not([mobile-open])) .toggle:hover {\n background: color-mix(in oklch, currentColor 14%, transparent);\n }\n\n /* hide-on-scroll: slides away while scrolling down, back as soon as the user scrolls up. */\n :host([hide-on-scroll]:not([sticky]):not([transparent])) {\n position: sticky;\n top: 0;\n z-index: 100;\n }\n\n :host([scroll-hidden]:not([mobile-open])) {\n transform: translateY(-100%);\n box-shadow: none;\n }\n\n .brand {\n display: flex;\n align-items: center;\n gap: var(--st-space-10);\n flex: none;\n text-decoration: none;\n color: inherit;\n }\n\n .brand-mark {\n width: var(--st-size-28);\n height: var(--st-size-28);\n border-radius: var(--st-radius-sm);\n flex: none;\n object-fit: contain;\n }\n\n .brand-title {\n font-size: var(--st-text-xl);\n font-weight: var(--st-font-weight-bold);\n letter-spacing: var(--st-tracking-tight);\n white-space: nowrap;\n }\n\n /* Optional slot=\"brand-extra\" (e.g. an edition badge) right after the brand. Outside the\n mobile panel, so it stays beside the logo at every width; no box at all when empty. */\n .brand-extra {\n display: flex;\n align-items: center;\n gap: var(--st-space-8);\n flex: none;\n margin-left: var(--st-space-10);\n white-space: nowrap;\n }\n\n .brand-extra.empty {\n display: none;\n }\n\n /* Desktop: a transparent pass-through so .menu-row/.utility-row lay out directly as :host's\n own flex children. Mobile (see below) turns this into the actual overlay box. */\n .mobile-panel {\n display: contents;\n }\n\n /* Desktop layout: the menu starts 4rem after the brand and takes the\n free width; the utility controls sit after a vertical divider. Between 901px and 1200px the\n gaps tighten so the menu still fits down to the 900px hamburger breakpoint. */\n .menu-row {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 1.5rem;\n min-width: 0;\n margin-left: 4rem;\n }\n\n .utility-row {\n flex: none;\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-left: 1.5rem;\n padding-left: 1.5rem;\n border-left: 1px solid var(--st-color-border);\n }\n\n :host([inverted]) .utility-row {\n border-left-color: currentColor;\n }\n\n .utility-row.empty {\n display: none;\n }\n\n @media (max-width: 1200px) {\n :host {\n padding: 0 1rem !important;\n }\n\n .menu-row {\n margin-left: 0.5rem;\n }\n\n .utility-row {\n margin-left: 0.5rem;\n padding-left: 0.5rem;\n }\n }\n\n @keyframes st-header-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .toggle {\n display: none;\n align-items: center;\n justify-content: center;\n flex: none;\n position: relative;\n z-index: 1002;\n width: var(--st-size-32);\n height: var(--st-size-32);\n margin-left: auto;\n padding: 0.5rem;\n border: 0;\n border-radius: var(--st-radius-sm);\n background: transparent;\n color: inherit;\n cursor: pointer;\n }\n\n .toggle:hover {\n background: var(--st-color-hover);\n }\n\n .lang-menu {\n position: relative;\n flex: none;\n }\n\n .lang-trigger {\n ${buttonResetStyles}\n display: flex;\n align-items: center;\n gap: var(--st-space-4);\n height: var(--st-size-32);\n padding: 0 var(--st-space-8);\n border-radius: var(--st-radius-sm);\n font-size: var(--st-text-base);\n font-weight: var(--st-font-weight-semibold);\n color: var(--st-color-text-muted);\n }\n\n .lang-trigger:hover {\n background: var(--st-color-hover);\n color: var(--st-color-text-strong);\n }\n\n .lang-dropdown {\n ${dropdownPanelStyles}\n min-width: 140px;\n }\n\n .lang-option {\n ${buttonResetStyles}\n display: block;\n width: 100%;\n padding: var(--st-space-10) var(--st-space-14);\n font-size: var(--st-text-base);\n font-weight: var(--st-font-weight-semibold);\n text-align: left;\n color: inherit;\n }\n\n .lang-option:hover {\n background: var(--st-color-hover);\n }\n\n .lang-option.active {\n color: var(--st-color-accent-text);\n }\n\n /* Hamburger layout: a full-screen layer under the toggle, menu above\n the utility controls, the menu's dropdowns opening in the flow (see syncInlineDropdowns). */\n @media (max-width: ${BREAKPOINT_TABLET}px) {\n :host {\n padding: 0 1rem !important;\n }\n\n .mobile-panel {\n display: none;\n }\n\n .toggle {\n display: inline-flex;\n }\n\n :host([mobile-open]) .mobile-panel {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n position: fixed;\n inset: 0;\n background: var(--st-color-surface);\n padding: 5rem 1.5rem 2rem;\n overflow-y: auto;\n z-index: 1001;\n animation: st-header-fade-in 0.3s ease;\n }\n\n :host([mobile-open]) .menu-row,\n :host([mobile-open]) .utility-row {\n flex-direction: column;\n align-items: stretch;\n gap: 1.5rem;\n margin-left: 0;\n }\n\n :host([mobile-open]) .utility-row {\n padding: 1.5rem 0 0;\n border-left: 0;\n border-top: 1px solid var(--st-color-border);\n }\n\n /* Apps usually slot one flex-row wrapper per slot; stack its items as the source does. */\n :host([mobile-open]) ::slotted([slot='menu']),\n :host([mobile-open]) ::slotted([slot='utility']) {\n flex-direction: column !important;\n align-items: stretch !important;\n margin: 0 !important;\n }\n }\n\n /* The same collapsed layout, switched on by script when the menu no longer fits the bar at\n desktop width (see evaluateFit) — without it the menu spills over the utility controls. */\n :host([compact]) .mobile-panel {\n display: none;\n }\n\n :host([compact]) .toggle {\n display: inline-flex;\n }\n\n :host([compact][mobile-open]) .mobile-panel {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n position: fixed;\n inset: 0;\n background: var(--st-color-surface);\n padding: 5rem 1.5rem 2rem;\n overflow-y: auto;\n z-index: 1001;\n animation: st-header-fade-in 0.3s ease;\n }\n\n :host([compact][mobile-open]) .menu-row,\n :host([compact][mobile-open]) .utility-row {\n flex-direction: column;\n align-items: stretch;\n gap: 1.5rem;\n margin-left: 0;\n }\n\n :host([compact][mobile-open]) .utility-row {\n padding: 1.5rem 0 0;\n border-left: 0;\n border-top: 1px solid var(--st-color-border);\n }\n\n :host([compact][mobile-open]) ::slotted([slot='menu']),\n :host([compact][mobile-open]) ::slotted([slot='utility']) {\n flex-direction: column !important;\n align-items: stretch !important;\n margin: 0 !important;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host,\n .mobile-panel {\n animation: none !important;\n transition: none !important;\n }\n }\n `;\n\n @property({ type: String })\n title = '';\n\n /** Optional logo image URL, shown before `title`. Omitted entirely when empty — none of this suite's apps has one today. Matches the source component's `imageSrc` (renamed here to pair with `title`/`logoHref`, since this component's only image use is the brand mark). */\n @property({ type: String, attribute: 'brand-image-url' })\n brandImageUrl = '';\n\n /** `alt` text for the brand image — matches the source component's `altText` (default `'Logo'`). */\n @property({ type: String, attribute: 'alt-text' })\n altText = 'Logo';\n\n /** Wraps the brand in an `<a>` when set (e.g. `/`); a plain non-link `<div>` otherwise. */\n @property({ type: String })\n logoHref = '';\n\n /** `target` for the brand `<a>` — matches the source component's `logoTarget` (default `_self`). No effect when `logoHref` isn't set. */\n @property({ type: String, attribute: 'logo-target' })\n logoTarget = '_self';\n\n /** Extra class(es) appended to the brand link/div — matches the source component's `logoClassName`. */\n @property({ type: String, attribute: 'logo-class-name' })\n logoClassName = '';\n\n /** Inverts the header's color roles (light-on-dark instead of dark-on-light) — matches the\n * source component's `inverted` (from its shared `BaseProps`). */\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n @property({ type: Boolean, reflect: true })\n sticky = false;\n\n /**\n * Fixes the header over the top of the page and makes it see-through, with light text\n * (`--st-header-transparent-color`), until the page scrolls past `scroll-threshold` — for a\n * header laid over a dark hero. It then takes its normal background and a shadow. The page\n * content starts under it, so the first section should leave room for the 64px bar.\n */\n @property({ type: Boolean, reflect: true })\n transparent = false;\n\n /** Slides the header out of view while the page scrolls down and back in when it scrolls up. */\n @property({ type: Boolean, reflect: true, attribute: 'hide-on-scroll' })\n hideOnScroll = false;\n\n /** Scroll distance in px after which the header counts as `scrolled`. */\n @property({ type: Number, attribute: 'scroll-threshold' })\n scrollThreshold = 8;\n\n /** True once the page has scrolled past `scroll-threshold`; reflected so pages can style `st-header[scrolled]`. Set by the header, never from outside. */\n @property({ type: Boolean, reflect: true })\n scrolled = false;\n\n /** True while `hide-on-scroll` has slid the header away. Set by the header, never from outside. */\n @property({ type: Boolean, reflect: true, attribute: 'scroll-hidden' })\n scrollHidden = false;\n\n private lastScrollY = 0;\n private scrollFrame = 0;\n\n private onScroll = (): void => {\n if (this.scrollFrame) return;\n this.scrollFrame = requestAnimationFrame(() => {\n this.scrollFrame = 0;\n const y = Math.max(0, window.scrollY);\n this.scrolled = y > this.scrollThreshold;\n if (this.hideOnScroll) {\n const delta = y - this.lastScrollY;\n // Ignore tiny jitters; never hide while still at the top of the page or with the menu open.\n if (Math.abs(delta) > 4) this.scrollHidden = delta > 0 && y > this.offsetHeight && !this.mobileOpen;\n } else {\n this.scrollHidden = false;\n }\n this.lastScrollY = y;\n });\n };\n\n /**\n * Language switcher options, e.g. `[{ code: 'en', label: 'English' }, ...]` — hidden entirely\n * when empty or when only one language is offered (same convention as `st-app-header`'s\n * `languages`, which this reuses verbatim). This component has no translation logic itself —\n * selecting an option fires `language-change` (detail: `{ code }`), and the consuming app owns\n * what `code` actually means and which content it re-renders.\n */\n @property({ attribute: false })\n languages: { code: string; label: string }[] = [];\n\n @property({ type: String, attribute: 'current-language-code' })\n currentLanguageCode = '';\n\n @property({ type: String, attribute: 'language-menu-label' })\n languageMenuLabel = 'Language';\n\n /** Internal open/closed state for the mobile nav overlay, reflected to an attribute purely so\n * the `:host([mobile-open])` CSS selector above can react to it — not meant to be set from\n * outside. */\n @property({ type: Boolean, reflect: true, attribute: 'mobile-open' })\n mobileOpen = false;\n\n /** True while the menu doesn't fit the bar at the current width: the header then shows the same\n * hamburger layout it uses on a narrow screen. Set by `evaluateFit`, never from outside. */\n @property({ type: Boolean, reflect: true })\n compact = false;\n\n @state() private languageMenuOpen = false;\n\n /** Whether `slot=\"utility\"` has content — an empty utility row (and its divider) is hidden. */\n @state() private hasUtility = false;\n\n /** Whether `slot=\"brand-extra\"` has content — an empty one takes no room beside the brand. */\n @state() private hasBrandExtra = false;\n\n private resizeObserver?: ResizeObserver;\n\n /** Matches below BREAKPOINT_TABLET, where the hamburger layout is always on. */\n private narrowQuery?: MediaQueryList;\n\n /** The dropdowns this header switched to `inline` — only these are switched back, so a caller's\n * own `inline` setting is left alone. */\n private inlinedDropdowns = new Set<HTMLElement & { inline: boolean; open: boolean }>();\n\n /** While the hamburger layout is on, the dropdowns in the header open in the flow of the\n * full-screen panel instead of floating over it (the touch-device layout). */\n private syncInlineDropdowns = (): void => {\n const collapsed = this.compact || !!this.narrowQuery?.matches;\n const dropdowns = Array.from(this.querySelectorAll('st-dropdown')) as (HTMLElement & { inline: boolean; open: boolean })[];\n if (collapsed) {\n for (const dropdown of dropdowns) {\n if (dropdown.inline) continue;\n dropdown.inline = true;\n this.inlinedDropdowns.add(dropdown);\n }\n } else {\n for (const dropdown of this.inlinedDropdowns) dropdown.inline = false;\n this.inlinedDropdowns.clear();\n }\n };\n\n private onBrandExtraSlotChange = (event: Event): void => {\n this.hasBrandExtra = (event.target as HTMLSlotElement).assignedElements({ flatten: true }).length > 0;\n this.evaluateFit();\n };\n\n private onUtilitySlotChange = (event: Event): void => {\n this.hasUtility = (event.target as HTMLSlotElement).assignedElements({ flatten: true }).length > 0;\n this.evaluateFit();\n };\n\n private onMenuSlotChange = (): void => {\n this.evaluateFit();\n this.syncInlineDropdowns();\n };\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('compact')) this.syncInlineDropdowns();\n // A mega dropdown's drill-down panel would otherwise still cover the menu next time it opens.\n if (changed.has('mobileOpen') && !this.mobileOpen) {\n for (const dropdown of this.inlinedDropdowns) dropdown.open = false;\n }\n }\n\n /** The bar width at which the menu last overflowed — the bar only expands again once it is\n * clearly wider than this, so it can't flip back and forth right at the threshold. */\n private collapsedAtWidth = 0;\n\n /** Collapses to the hamburger layout when the slotted menu overflows its row, and expands again\n * once there is room. The collapsed layout hides the menu, so the room it needs can't be\n * measured then; the width remembered when it collapsed stands in for it. */\n private evaluateFit = (): void => {\n const width = this.clientWidth;\n if (this.compact) {\n if (width > this.collapsedAtWidth + 24) {\n this.compact = false;\n this.mobileOpen = false;\n void this.updateComplete.then(this.evaluateFit);\n }\n return;\n }\n if (this.menuOverflows()) {\n this.collapsedAtWidth = width;\n this.compact = true;\n }\n };\n\n /** Whether the visible menu items reach past the right edge of the menu row. Measured from the\n * items' own boxes (the slotted elements and their direct children), not the row's scrollWidth:\n * a closed dropdown's absolutely positioned panel also counts towards scrollWidth, which would\n * report overflow at any width. */\n private menuOverflows(): boolean {\n const row = this.renderRoot.querySelector<HTMLElement>('.menu-row');\n const slot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"menu\"]');\n if (!row || !slot) return false;\n const limit = row.getBoundingClientRect().right + 1;\n let right = 0;\n for (const el of slot.assignedElements({ flatten: true })) {\n for (const box of [el, ...Array.from(el.children)]) {\n const rect = box.getBoundingClientRect();\n if (rect.width > 0) right = Math.max(right, rect.right);\n }\n }\n return right > limit;\n }\n\n protected firstUpdated(): void {\n this.resizeObserver = new ResizeObserver(this.evaluateFit);\n this.resizeObserver.observe(this);\n this.evaluateFit();\n this.syncInlineDropdowns();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('keydown', this.closeOnEscape);\n window.addEventListener('click', this.closeLanguageMenuOnOutsideClick);\n window.addEventListener('scroll', this.onScroll, { passive: true });\n this.onScroll();\n this.narrowQuery = window.matchMedia(`(max-width: ${BREAKPOINT_TABLET}px)`);\n this.narrowQuery.addEventListener('change', this.syncInlineDropdowns);\n // Menus often render their dropdowns after the header (e.g. once the user's role loads),\n // deeper than a slotchange reports.\n this.lightDomObserver = new MutationObserver(this.syncInlineDropdowns);\n this.lightDomObserver.observe(this, { childList: true, subtree: true });\n }\n\n private lightDomObserver?: MutationObserver;\n\n disconnectedCallback(): void {\n this.lightDomObserver?.disconnect();\n this.narrowQuery?.removeEventListener('change', this.syncInlineDropdowns);\n this.resizeObserver?.disconnect();\n window.removeEventListener('keydown', this.closeOnEscape);\n window.removeEventListener('click', this.closeLanguageMenuOnOutsideClick);\n window.removeEventListener('scroll', this.onScroll);\n if (this.scrollFrame) cancelAnimationFrame(this.scrollFrame);\n this.scrollFrame = 0;\n super.disconnectedCallback();\n }\n\n private closeOnEscape = (event: KeyboardEvent): void => {\n if (this.mobileOpen && event.key === 'Escape') this.mobileOpen = false;\n if (this.languageMenuOpen && event.key === 'Escape') this.languageMenuOpen = false;\n };\n\n private closeLanguageMenuOnOutsideClick = (event: Event): void => {\n if (this.languageMenuOpen && !event.composedPath().includes(this)) this.languageMenuOpen = false;\n };\n\n private renderLanguageMenu() {\n if (this.languages.length < 2) return nothing;\n const current = this.languages.find((lang) => lang.code === this.currentLanguageCode);\n return html`\n <div class=\"lang-menu\" part=\"language-menu\">\n <button\n part=\"language-menu-trigger\"\n type=\"button\"\n class=\"lang-trigger\"\n aria-label=${this.languageMenuLabel}\n aria-expanded=${this.languageMenuOpen}\n @click=${(event: Event) => {\n event.stopPropagation();\n this.languageMenuOpen = !this.languageMenuOpen;\n }}\n >\n <span part=\"language-menu-current\">${current?.label ?? this.languageMenuLabel}</span>\n ${chevronIcon('down', 10)}\n </button>\n ${this.languageMenuOpen\n ? html`\n <div part=\"language-dropdown\" class=\"lang-dropdown\">\n ${this.languages.map(\n (lang) => html`\n <button\n part=\"language-option\"\n type=\"button\"\n class=\"lang-option ${lang.code === this.currentLanguageCode ? 'active' : ''}\"\n aria-current=${lang.code === this.currentLanguageCode}\n @click=${() => this.onLanguageSelect(lang.code)}\n >\n ${lang.label}\n </button>\n `\n )}\n </div>\n `\n : nothing}\n </div>\n `;\n }\n\n private onLanguageSelect(code: string): void {\n this.languageMenuOpen = false;\n if (code === this.currentLanguageCode) return;\n this.dispatchEvent(new CustomEvent<LanguageChangedEventDetail>('language-change', { detail: { code }, bubbles: true, composed: true }));\n }\n\n private renderBrand() {\n const content = html`\n ${this.brandImageUrl ? html`<img part=\"brand-mark\" class=\"brand-mark\" src=${this.brandImageUrl} alt=${this.altText} /> ` : nothing}\n <span part=\"brand-title\" class=\"brand-title\">${this.title}</span>\n `;\n return this.logoHref\n ? html`<a part=\"brand\" class=\"brand ${this.logoClassName}\" href=${this.logoHref} target=${this.logoTarget}>${content}</a>`\n : html`<div part=\"brand\" class=\"brand ${this.logoClassName}\">${content}</div>`;\n }\n\n render() {\n return html`\n ${this.renderBrand()}\n <div class=\"brand-extra ${this.hasBrandExtra ? '' : 'empty'}\" part=\"brand-extra\"><slot name=\"brand-extra\" @slotchange=${this.onBrandExtraSlotChange}></slot></div>\n\n <div class=\"mobile-panel\" part=\"mobile-panel\" @click=${() => (this.mobileOpen = false)}>\n <div class=\"menu-row\" part=\"menu-row\"><slot name=\"menu\" @slotchange=${this.onMenuSlotChange}></slot></div>\n <div class=\"utility-row ${this.hasUtility || this.languages.length >= 2 ? '' : 'empty'}\" part=\"utility-row\">\n ${this.renderLanguageMenu()}<slot name=\"utility\" @slotchange=${this.onUtilitySlotChange}></slot>\n </div>\n </div>\n\n <button\n part=\"toggle\"\n type=\"button\"\n class=\"toggle\"\n aria-label=${this.mobileOpen ? 'Close menu' : 'Open menu'}\n aria-expanded=${this.mobileOpen}\n @click=${() => (this.mobileOpen = !this.mobileOpen)}\n >\n <slot name=\"menu-icon\" ?hidden=${this.mobileOpen}>${menuIcon()}</slot>\n <slot name=\"close-icon\" ?hidden=${!this.mobileOpen}>${closeIcon()}</slot>\n </button>\n `;\n }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A1e/B,OA2eX;AAEiB;AAAA,EAAhB,MAAM;AAAA,GA7eI,OA6eM;AAGA;AAAA,EAAhB,MAAM;AAAA,GAhfI,OAgfM;AAGA;AAAA,EAAhB,MAAM;AAAA,GAnfI,OAmfM;AAnfN,SAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":[]}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sectionHeaderStyles,
|
|
3
|
+
sectionSubtitleStyles,
|
|
4
|
+
sectionTitleStyles
|
|
5
|
+
} from "./chunk-FZ36KL73.js";
|
|
6
|
+
import {
|
|
7
|
+
controlBaseStyles,
|
|
8
|
+
fontFamilyStyles
|
|
9
|
+
} from "./chunk-KMU6ABQF.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-EUXUH3YW.js";
|
|
13
|
+
|
|
14
|
+
// src/steps/Steps.ts
|
|
15
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
16
|
+
import { customElement, property } from "lit/decorators.js";
|
|
17
|
+
var Steps = class extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.eyebrow = "";
|
|
21
|
+
this.title = "";
|
|
22
|
+
this.subtitle = "";
|
|
23
|
+
this.items = [];
|
|
24
|
+
this.highlightLast = false;
|
|
25
|
+
this.inverted = false;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const heading = this.eyebrow || this.title || this.subtitle;
|
|
29
|
+
const last = this.items.length - 1;
|
|
30
|
+
return html`
|
|
31
|
+
<div class="container" part="container">
|
|
32
|
+
${heading ? html`<div class="header" part="header">
|
|
33
|
+
${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
|
|
34
|
+
${this.title ? html`<h2 class="title" part="title">${this.title}</h2>` : nothing}
|
|
35
|
+
${this.subtitle ? html`<p class="subtitle" part="subtitle">${this.subtitle}</p>` : nothing}
|
|
36
|
+
</div>` : nothing}
|
|
37
|
+
<ol class="grid" part="grid" aria-label=${this.title || nothing}>
|
|
38
|
+
${this.items.map(
|
|
39
|
+
(step, index) => html`
|
|
40
|
+
<li class="card ${this.highlightLast && index === last ? "highlight" : ""}" part="card">
|
|
41
|
+
<span class="number" part="number" aria-hidden="true">${String(index + 1).padStart(2, "0")}</span>
|
|
42
|
+
<h3 class="card-title" part="card-title">${step.title}</h3>
|
|
43
|
+
${step.description ? html`<p class="description" part="description">${step.description}</p>` : nothing}
|
|
44
|
+
</li>
|
|
45
|
+
`
|
|
46
|
+
)}
|
|
47
|
+
</ol>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
Steps.styles = css`
|
|
53
|
+
${controlBaseStyles}
|
|
54
|
+
${fontFamilyStyles}
|
|
55
|
+
|
|
56
|
+
:host {
|
|
57
|
+
display: block;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
/* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
|
|
60
|
+
padding; override with --st-steps-padding instead. */
|
|
61
|
+
padding: var(--st-steps-padding, var(--st-cms-section-padding) var(--st-space-24)) !important;
|
|
62
|
+
background: var(--st-color-page);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([inverted]) {
|
|
66
|
+
background: var(--st-cms-band-dark-bg);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.container {
|
|
70
|
+
max-width: var(--st-cms-container-max);
|
|
71
|
+
margin: 0 auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.header {
|
|
75
|
+
${sectionHeaderStyles}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.eyebrow {
|
|
79
|
+
margin: 0 0 var(--st-space-12);
|
|
80
|
+
font-size: var(--st-text-sm);
|
|
81
|
+
font-weight: var(--st-font-weight-bold);
|
|
82
|
+
letter-spacing: 0.12em;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
color: var(--st-color-text-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.title {
|
|
88
|
+
${sectionTitleStyles}
|
|
89
|
+
color: inherit;
|
|
90
|
+
letter-spacing: -0.02em;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.subtitle {
|
|
94
|
+
${sectionSubtitleStyles}
|
|
95
|
+
max-width: 60ch;
|
|
96
|
+
margin: 0 auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.grid {
|
|
100
|
+
list-style: none;
|
|
101
|
+
margin: 0;
|
|
102
|
+
padding: 0;
|
|
103
|
+
display: grid;
|
|
104
|
+
grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
|
|
105
|
+
gap: var(--st-space-24);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.card {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: var(--st-space-12);
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
margin: 0;
|
|
114
|
+
padding: var(--st-space-32);
|
|
115
|
+
border: 1px solid var(--st-color-border);
|
|
116
|
+
border-radius: var(--st-radius-lg);
|
|
117
|
+
background: var(--st-color-surface);
|
|
118
|
+
color: var(--st-color-text);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.number {
|
|
122
|
+
font-size: var(--st-cms-text-3xl);
|
|
123
|
+
font-weight: var(--st-font-weight-bold);
|
|
124
|
+
line-height: 1;
|
|
125
|
+
letter-spacing: -0.02em;
|
|
126
|
+
color: var(--st-color-accent);
|
|
127
|
+
font-variant-numeric: tabular-nums;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.card-title {
|
|
131
|
+
margin: var(--st-space-8) 0 0;
|
|
132
|
+
font-size: var(--st-text-xl);
|
|
133
|
+
font-weight: var(--st-font-weight-semibold);
|
|
134
|
+
line-height: 1.3;
|
|
135
|
+
color: var(--st-color-text-strong);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.description {
|
|
139
|
+
margin: 0;
|
|
140
|
+
font-size: var(--st-text-md);
|
|
141
|
+
line-height: 1.6;
|
|
142
|
+
color: var(--st-color-text-muted);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* inverted: a dark band with light cards; the number moves to the cyan highlight so it reads on navy. */
|
|
146
|
+
:host([inverted]) .card {
|
|
147
|
+
background: color-mix(in oklch, var(--st-cms-band-dark-color) 6%, transparent);
|
|
148
|
+
border-color: color-mix(in oklch, var(--st-cms-band-dark-color) 16%, transparent);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([inverted]) .number {
|
|
152
|
+
color: var(--st-cms-highlight);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host([inverted]) .title,
|
|
156
|
+
:host([inverted]) .card-title {
|
|
157
|
+
color: var(--st-cms-band-dark-color);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host([inverted]) .eyebrow,
|
|
161
|
+
:host([inverted]) .subtitle,
|
|
162
|
+
:host([inverted]) .description {
|
|
163
|
+
color: color-mix(in oklch, var(--st-cms-band-dark-color) 75%, transparent);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* highlightLast: the final card is the dark call-out. Declared after the inverted rules so it wins. */
|
|
167
|
+
.card.highlight {
|
|
168
|
+
background: var(--st-cms-navy);
|
|
169
|
+
border-color: var(--st-cms-navy);
|
|
170
|
+
color: var(--st-cms-on-dark);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.card.highlight .number {
|
|
174
|
+
color: var(--st-cms-highlight);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.card.highlight .card-title {
|
|
178
|
+
color: var(--st-cms-on-dark);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.card.highlight .description {
|
|
182
|
+
color: color-mix(in oklch, var(--st-cms-on-dark) 80%, transparent);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: 600px) {
|
|
186
|
+
:host {
|
|
187
|
+
padding: var(--st-steps-padding, var(--st-space-40) var(--st-space-20)) !important;
|
|
188
|
+
}
|
|
189
|
+
.card {
|
|
190
|
+
padding: var(--st-space-24);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
`;
|
|
194
|
+
__decorateClass([
|
|
195
|
+
property({ type: String })
|
|
196
|
+
], Steps.prototype, "eyebrow", 2);
|
|
197
|
+
__decorateClass([
|
|
198
|
+
property({ type: String })
|
|
199
|
+
], Steps.prototype, "title", 2);
|
|
200
|
+
__decorateClass([
|
|
201
|
+
property({ type: String })
|
|
202
|
+
], Steps.prototype, "subtitle", 2);
|
|
203
|
+
__decorateClass([
|
|
204
|
+
property({ attribute: false })
|
|
205
|
+
], Steps.prototype, "items", 2);
|
|
206
|
+
__decorateClass([
|
|
207
|
+
property({ type: Boolean, reflect: true, attribute: "highlight-last" })
|
|
208
|
+
], Steps.prototype, "highlightLast", 2);
|
|
209
|
+
__decorateClass([
|
|
210
|
+
property({ type: Boolean, reflect: true })
|
|
211
|
+
], Steps.prototype, "inverted", 2);
|
|
212
|
+
Steps = __decorateClass([
|
|
213
|
+
customElement("st-steps")
|
|
214
|
+
], Steps);
|
|
215
|
+
|
|
216
|
+
export {
|
|
217
|
+
Steps
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=chunk-ZRC5BVDX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/steps/Steps.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport { sectionHeaderStyles, sectionSubtitleStyles, sectionTitleStyles } from '../shared/section-styles';\n\nexport interface StepItem {\n title: string;\n description?: string;\n}\n\n/**\n * A numbered process: a responsive grid of cards, each with an automatic \"01\", \"02\", ... number, a\n * title and a description. `highlightLast` makes the final card a dark navy call-out, the way\n * enterprise pages close a how-it-works sequence. `inverted` puts the whole block on the dark band.\n *\n * @cssprop --st-steps-padding - Overrides the block's padding.\n * @csspart header - The eyebrow/title/subtitle block.\n * @csspart card - Each step card (an `li`).\n * @csspart number - The step number.\n */\n@customElement('st-steps')\nexport class Steps extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n ${fontFamilyStyles}\n\n :host {\n display: block;\n box-sizing: border-box;\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-steps-padding instead. */\n padding: var(--st-steps-padding, var(--st-cms-section-padding) var(--st-space-24)) !important;\n background: var(--st-color-page);\n }\n\n :host([inverted]) {\n background: var(--st-cms-band-dark-bg);\n }\n\n .container {\n max-width: var(--st-cms-container-max);\n margin: 0 auto;\n }\n\n .header {\n ${sectionHeaderStyles}\n }\n\n .eyebrow {\n margin: 0 0 var(--st-space-12);\n font-size: var(--st-text-sm);\n font-weight: var(--st-font-weight-bold);\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: var(--st-color-text-muted);\n }\n\n .title {\n ${sectionTitleStyles}\n color: inherit;\n letter-spacing: -0.02em;\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n max-width: 60ch;\n margin: 0 auto;\n }\n\n .grid {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));\n gap: var(--st-space-24);\n }\n\n .card {\n display: flex;\n flex-direction: column;\n gap: var(--st-space-12);\n box-sizing: border-box;\n margin: 0;\n padding: var(--st-space-32);\n border: 1px solid var(--st-color-border);\n border-radius: var(--st-radius-lg);\n background: var(--st-color-surface);\n color: var(--st-color-text);\n }\n\n .number {\n font-size: var(--st-cms-text-3xl);\n font-weight: var(--st-font-weight-bold);\n line-height: 1;\n letter-spacing: -0.02em;\n color: var(--st-color-accent);\n font-variant-numeric: tabular-nums;\n }\n\n .card-title {\n margin: var(--st-space-8) 0 0;\n font-size: var(--st-text-xl);\n font-weight: var(--st-font-weight-semibold);\n line-height: 1.3;\n color: var(--st-color-text-strong);\n }\n\n .description {\n margin: 0;\n font-size: var(--st-text-md);\n line-height: 1.6;\n color: var(--st-color-text-muted);\n }\n\n /* inverted: a dark band with light cards; the number moves to the cyan highlight so it reads on navy. */\n :host([inverted]) .card {\n background: color-mix(in oklch, var(--st-cms-band-dark-color) 6%, transparent);\n border-color: color-mix(in oklch, var(--st-cms-band-dark-color) 16%, transparent);\n }\n\n :host([inverted]) .number {\n color: var(--st-cms-highlight);\n }\n\n :host([inverted]) .title,\n :host([inverted]) .card-title {\n color: var(--st-cms-band-dark-color);\n }\n\n :host([inverted]) .eyebrow,\n :host([inverted]) .subtitle,\n :host([inverted]) .description {\n color: color-mix(in oklch, var(--st-cms-band-dark-color) 75%, transparent);\n }\n\n /* highlightLast: the final card is the dark call-out. Declared after the inverted rules so it wins. */\n .card.highlight {\n background: var(--st-cms-navy);\n border-color: var(--st-cms-navy);\n color: var(--st-cms-on-dark);\n }\n\n .card.highlight .number {\n color: var(--st-cms-highlight);\n }\n\n .card.highlight .card-title {\n color: var(--st-cms-on-dark);\n }\n\n .card.highlight .description {\n color: color-mix(in oklch, var(--st-cms-on-dark) 80%, transparent);\n }\n\n @media (max-width: 600px) {\n :host {\n padding: var(--st-steps-padding, var(--st-space-40) var(--st-space-20)) !important;\n }\n .card {\n padding: var(--st-space-24);\n }\n }\n `;\n\n /** Small uppercase label above the title. */\n @property({ type: String })\n eyebrow = '';\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n /** The steps, in order. */\n @property({ attribute: false })\n items: StepItem[] = [];\n\n /** Renders the last step as a dark navy call-out card. */\n @property({ type: Boolean, reflect: true, attribute: 'highlight-last' })\n highlightLast = false;\n\n /** Puts the block on the dark band (`--st-cms-band-dark-bg`), which stays dark in the dark theme. */\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n render() {\n const heading = this.eyebrow || this.title || this.subtitle;\n const last = this.items.length - 1;\n return html`\n <div class=\"container\" part=\"container\">\n ${heading\n ? html`<div class=\"header\" part=\"header\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.title ? html`<h2 class=\"title\" part=\"title\">${this.title}</h2>` : nothing}\n ${this.subtitle ? html`<p class=\"subtitle\" part=\"subtitle\">${this.subtitle}</p>` : nothing}\n </div>`\n : nothing}\n <ol class=\"grid\" part=\"grid\" aria-label=${this.title || nothing}>\n ${this.items.map(\n (step, index) => html`\n <li class=\"card ${this.highlightLast && index === last ? 'highlight' : ''}\" part=\"card\">\n <span class=\"number\" part=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span>\n <h3 class=\"card-title\" part=\"card-title\">${step.title}</h3>\n ${step.description ? html`<p class=\"description\" part=\"description\">${step.description}</p>` : nothing}\n </li>\n `\n )}\n </ol>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAqBjC,IAAM,QAAN,cAAoB,WAAW;AAAA,EAA/B;AAAA;AAkJL,mBAAU;AAGV,iBAAQ;AAGR,oBAAW;AAIX,iBAAoB,CAAC;AAIrB,yBAAgB;AAIhB,oBAAW;AAAA;AAAA,EAEX,SAAS;AACP,UAAM,UAAU,KAAK,WAAW,KAAK,SAAS,KAAK;AACnD,UAAM,OAAO,KAAK,MAAM,SAAS;AACjC,WAAO;AAAA;AAAA,UAED,UACE;AAAA,gBACI,KAAK,UAAU,yCAAyC,KAAK,OAAO,SAAS,OAAO;AAAA,gBACpF,KAAK,QAAQ,sCAAsC,KAAK,KAAK,UAAU,OAAO;AAAA,gBAC9E,KAAK,WAAW,2CAA2C,KAAK,QAAQ,SAAS,OAAO;AAAA,sBAE5F,OAAO;AAAA,kDAC+B,KAAK,SAAS,OAAO;AAAA,YAC3D,KAAK,MAAM;AAAA,MACX,CAAC,MAAM,UAAU;AAAA,gCACG,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AO,CAAC;AAAA,GAjJf,MAkJX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GApJf,MAqJX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAvJf,MAwJX;AAIA;AAAA,EADC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GA3JnB,MA4JX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,iBAAiB,CAAC;AAAA,GA/J5D,MAgKX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAnK/B,MAoKX;AApKW,QAAN;AAAA,EADN,cAAc,UAAU;AAAA,GACZ;","names":[]}
|
package/dist/cms-theme.css
CHANGED
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
stays dark there too. */
|
|
19
19
|
--st-cms-band-dark-bg: var(--st-color-text-strong);
|
|
20
20
|
--st-cms-band-dark-color: var(--st-color-on-solid);
|
|
21
|
+
|
|
22
|
+
/* Fixed brand colours for highlight surfaces (steps' last card, flow's accent node, bento "dark"
|
|
23
|
+
cards). They do not swap in the dark theme: navy and cyan read well on both page surfaces.
|
|
24
|
+
--st-cms-on-dark is the light text placed on them. */
|
|
25
|
+
--st-cms-navy: #011d41;
|
|
26
|
+
--st-cms-highlight: #49cce0;
|
|
27
|
+
--st-cms-on-dark: #ffffff;
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
:root.dark {
|
|
@@ -3,9 +3,8 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A long-form article section: centered title/subtitle, an optional featured image with caption,
|
|
6
|
-
* then Markdown body text.
|
|
7
|
-
* `content
|
|
8
|
-
* block works without a fetch); `content-src` wins when both are set.
|
|
6
|
+
* then Markdown body text. The body comes from `content-src` (a Markdown URL) or an inline
|
|
7
|
+
* `content` string (so the block works without a fetch); `content-src` wins when both are set.
|
|
9
8
|
*
|
|
10
9
|
* @cssprop --st-content-block-padding - Overrides the block's padding.
|
|
11
10
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ContentBlock
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-4AFOKKSU.js";
|
|
4
|
+
import "../chunk-QLA4BH2B.js";
|
|
5
|
+
import "../chunk-UAIUBPDN.js";
|
|
5
6
|
import "../chunk-FZ36KL73.js";
|
|
6
7
|
import "../chunk-KMU6ABQF.js";
|
|
7
8
|
import "../chunk-EUXUH3YW.js";
|
package/dist/dropdown/index.d.ts
CHANGED
|
@@ -3,23 +3,20 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A labeled trigger + slotted dropdown panel — nav menus (typically holding an `st-menu-grid`),
|
|
6
|
-
* action menus, anything "click a trigger, show content under it".
|
|
7
|
-
* React `Dropdown` (`SankhyaCMS/SankhyaUI/src/components/Dropdown`): same markup
|
|
6
|
+
* action menus, anything "click a trigger, show content under it". Markup
|
|
8
7
|
* (`.menu` > `.menu-title` + `.menu-dropdown`), sizes, 0.3s slide/fade, and behavior —
|
|
9
8
|
*
|
|
10
|
-
* - only one dropdown is open at a time (
|
|
11
|
-
*
|
|
9
|
+
* - only one dropdown is open at a time (a shared provider is built in, so no provider element
|
|
10
|
+
* is needed);
|
|
12
11
|
* - a mousedown outside, Escape, or a click inside the panel closes it;
|
|
13
12
|
* - an `href` trigger toggles the panel when it has content, and is a plain link when it doesn't;
|
|
14
13
|
* - `inline` opens the panel in the flow, the source's `.touch-device` layout.
|
|
15
14
|
*
|
|
16
|
-
* Colors and the panel's surface come from the suite theme
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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`).
|
|
15
|
+
* Colors and the panel's surface come from the suite theme. The panel is never 100vw wide at
|
|
16
|
+
* <=768px (it would overflow the screen from wherever the trigger sits; use `inline` in headers
|
|
17
|
+
* instead), and slotted children are not clipped with `overflow: hidden` (that would cut off their
|
|
18
|
+
* focus rings). Other attributes: `align`, `active`, `disabled`, `inline`, the `dropdown-toggle`
|
|
19
|
+
* event, and `mega` plus `open-on-hover` for a mega menu (see `st-mega-menu`).
|
|
23
20
|
*
|
|
24
21
|
* @cssprop --st-mega-menu-max-width - Maximum width of a `mega` panel (default `1400px`).
|
|
25
22
|
* @cssprop --st-mega-menu-inset - Minimum space between a `mega` panel and the header's sides (default `1rem`).
|
package/dist/dropdown/index.js
CHANGED
|
@@ -29,10 +29,10 @@ interface FeatureItemData {
|
|
|
29
29
|
href?: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* A titled grid of feature tiles.
|
|
33
|
-
* `
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* A titled grid of feature tiles. Tiles come from the `items` property, from slotted
|
|
33
|
+
* `st-feature-item` elements, or both (slotted first). `columns` sets the grid width (default 2;
|
|
34
|
+
* one column below 768px). `inverted` is passed on to the `items` tiles; slotted tiles need their
|
|
35
|
+
* own `inverted` attribute.
|
|
36
36
|
*
|
|
37
37
|
* @cssprop --st-features-section-padding - Overrides the section's padding.
|
|
38
38
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FeatureItem,
|
|
3
3
|
FeaturesSection
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-7NIWQWTA.js";
|
|
5
|
+
import "../chunk-3OEEOBHB.js";
|
|
6
|
+
import "../chunk-QLA4BH2B.js";
|
|
7
|
+
import "../chunk-UAIUBPDN.js";
|
|
7
8
|
import "../chunk-FZ36KL73.js";
|
|
8
9
|
import "../chunk-KMU6ABQF.js";
|
|
9
10
|
import "../chunk-EUXUH3YW.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface FlowNode {
|
|
5
|
+
label: string;
|
|
6
|
+
caption?: string;
|
|
7
|
+
/** `solid` (default, primary fill), `outline` (dashed accent border) or `accent` (cyan fill). */
|
|
8
|
+
variant?: 'solid' | 'outline' | 'accent';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A left-to-right process or architecture flow: boxes joined by arrows. Boxes come in three looks
|
|
12
|
+
* (`solid`, `outline`, `accent`); the arrows are decorative (`aria-hidden`), and the list is exposed
|
|
13
|
+
* as an ordered list. Below 600px the row stacks vertically and the arrows point down.
|
|
14
|
+
* `inverted` puts the flow on the dark band (`--st-cms-band-dark-bg`).
|
|
15
|
+
*
|
|
16
|
+
* @cssprop --st-flow-padding - Overrides the block's padding.
|
|
17
|
+
* @csspart flow - The ordered list of nodes.
|
|
18
|
+
* @csspart node - Each step's box (a `li`'s child).
|
|
19
|
+
* @csspart label - The box's label.
|
|
20
|
+
* @csspart caption - The box's caption.
|
|
21
|
+
* @csspart arrow - The arrow between two boxes.
|
|
22
|
+
*/
|
|
23
|
+
declare class Flow extends LitElement {
|
|
24
|
+
static styles: lit.CSSResult;
|
|
25
|
+
/** The boxes, in order. */
|
|
26
|
+
nodes: FlowNode[];
|
|
27
|
+
/** Accessible name for the list of steps. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** Puts the flow on the dark band (`--st-cms-band-dark-bg`), which stays dark in the dark theme. */
|
|
30
|
+
inverted: boolean;
|
|
31
|
+
private arrow;
|
|
32
|
+
render(): lit.TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { Flow, type FlowNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/header/index.d.ts
CHANGED
|
@@ -4,18 +4,13 @@ import { LitElement } from 'lit';
|
|
|
4
4
|
/**
|
|
5
5
|
* The app-shell header bar — brand (image + title, or title alone) on the left, a `slot="menu"`
|
|
6
6
|
* for primary nav (e.g. `st-dropdown`/`st-menu-grid` mega-menus, or plain links) taking the
|
|
7
|
-
* middle, and a `slot="utility"` for account/app-switcher/theme controls on the right.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `imageSrc` logo with no text fallback, but none of this suite's apps has a logo image today, so
|
|
11
|
-
* `title` is the primary brand prop here and `brand-image-url` is optional, mirroring
|
|
12
|
-
* `st-app-header`'s own brand/title split (this component's slotted-menu/utility shape is a
|
|
13
|
-
* deliberately different, more generic surface than `st-app-header`'s fixed nav-links/user-menu
|
|
14
|
-
* props — pick whichever fits a given app's header).
|
|
7
|
+
* middle, and a `slot="utility"` for account/app-switcher/theme controls on the right. `title` is
|
|
8
|
+
* the primary brand prop; `brand-image-url` is optional. For a fixed nav-links/user-menu header,
|
|
9
|
+
* use `st-app-header` instead.
|
|
15
10
|
*
|
|
16
|
-
* Layout
|
|
17
|
-
* controls sit after a vertical divider, and below `BREAKPOINT_TABLET` (900px
|
|
18
|
-
*
|
|
11
|
+
* Layout: the menu starts 4rem after the brand, the utility
|
|
12
|
+
* controls sit after a vertical divider, and below `BREAKPOINT_TABLET` (900px) `menu`/`utility`
|
|
13
|
+
* collapse behind a hamburger toggle into a full-screen layer under the
|
|
19
14
|
* toggle (closes on Escape or a click inside it), where the menu's `st-dropdown`s are switched to
|
|
20
15
|
* `inline` so they open in the flow — the same two slotted elements just get repositioned by CSS
|
|
21
16
|
* (`.mobile-panel`'s `display: contents` at desktop width vs. a real fixed-position box below
|
|
@@ -26,9 +21,7 @@ import { LitElement } from 'lit';
|
|
|
26
21
|
* "🇮🇳 India Edition"); unlike `menu`/`utility` it stays in the bar at every width.
|
|
27
22
|
*
|
|
28
23
|
* Also carries an optional built-in language switcher (`languages`/`currentLanguageCode`, fires
|
|
29
|
-
* `language-change`)
|
|
30
|
-
* rebuilt, since the source `Header`'s reference story shows an equivalent flag/language `Select`
|
|
31
|
-
* as a first-class header utility. Hidden entirely when `languages` has fewer than two entries.
|
|
24
|
+
* `language-change`). Hidden entirely when `languages` has fewer than two entries.
|
|
32
25
|
* This component has no translation logic itself; the consuming app owns what a language `code`
|
|
33
26
|
* means and which content it re-renders in response.
|
|
34
27
|
*
|
|
@@ -106,7 +99,7 @@ declare class Header extends LitElement {
|
|
|
106
99
|
* own `inline` setting is left alone. */
|
|
107
100
|
private inlinedDropdowns;
|
|
108
101
|
/** While the hamburger layout is on, the dropdowns in the header open in the flow of the
|
|
109
|
-
* full-screen panel instead of floating over it (
|
|
102
|
+
* full-screen panel instead of floating over it (the touch-device layout). */
|
|
110
103
|
private syncInlineDropdowns;
|
|
111
104
|
private onBrandExtraSlotChange;
|
|
112
105
|
private onUtilitySlotChange;
|
package/dist/header/index.js
CHANGED
package/dist/hero/index.d.ts
CHANGED
|
@@ -3,18 +3,25 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Full-width hero banner: background image with a darkening overlay, optional eyebrow, title,
|
|
6
|
-
* optional subtitle and up to two call-to-action links.
|
|
7
|
-
*
|
|
6
|
+
* optional subtitle and up to two call-to-action links. The entrance animation is CSS keyframes
|
|
7
|
+
* (skipped under `prefers-reduced-motion`).
|
|
8
8
|
*
|
|
9
9
|
* `size`, `content-position` and `overlay="gradient"` give the large editorial layout (copy on the
|
|
10
10
|
* lower left over a gradient that darkens towards it) used by enterprise marketing heroes; the
|
|
11
11
|
* defaults keep the original centered banner. Put several heroes in an `st-carousel` with
|
|
12
12
|
* `indicator-style="tabs"` for a tabbed hero carousel.
|
|
13
13
|
*
|
|
14
|
+
* `badge` is a pill above the title; `highlights` is a row of check-marked points under the buttons.
|
|
15
|
+
* `layout="split"` swaps the background for a two-column layout: copy on one side, `image-src` as an
|
|
16
|
+
* `<img>` (alt from `image-alt`) on the other, on normal page colours with no overlay.
|
|
17
|
+
*
|
|
14
18
|
* @fires action - Cancelable, before navigating. Detail `{ href, kind }`, `kind` being `primary` or `secondary`.
|
|
15
19
|
* @cssprop --st-hero-text-color - Text colour over the image.
|
|
16
20
|
* @cssprop --st-hero-min-height - Minimum height when `size` is `large` (default `640px`).
|
|
17
21
|
* @csspart eyebrow - The small label above the title.
|
|
22
|
+
* @csspart badge - The pill above the title.
|
|
23
|
+
* @csspart highlights - The row of check-marked points.
|
|
24
|
+
* @csspart image - The image in `layout="split"`.
|
|
18
25
|
* @csspart secondary-action - The outlined second button.
|
|
19
26
|
*/
|
|
20
27
|
declare class Hero extends LitElement {
|
|
@@ -33,6 +40,14 @@ declare class Hero extends LitElement {
|
|
|
33
40
|
/** Label of an outlined second button next to the primary one. */
|
|
34
41
|
secondaryActionLabel: string;
|
|
35
42
|
secondaryHref: string;
|
|
43
|
+
/** Small pill above the title (e.g. "New", "Now available"). */
|
|
44
|
+
badge: string;
|
|
45
|
+
/** Check-marked points shown in a row under the buttons. */
|
|
46
|
+
highlights: string[];
|
|
47
|
+
/** `background` (default) puts `image-src` behind the copy; `split` puts copy and image side by side. */
|
|
48
|
+
layout: 'background' | 'split';
|
|
49
|
+
/** Alt text of the image in `layout="split"`. Empty marks it as decorative. */
|
|
50
|
+
imageAlt: string;
|
|
36
51
|
/** `auto` sizes to the content; `large` is a tall editorial hero (`--st-hero-min-height`); `full` fills the viewport. */
|
|
37
52
|
size: 'auto' | 'large' | 'full';
|
|
38
53
|
/** `center` keeps the copy in the middle; `bottom` puts it in the lower part of the hero, on the page container. */
|
|
@@ -50,7 +65,7 @@ declare class Hero extends LitElement {
|
|
|
50
65
|
/** Fired by `st-hero` / `st-promo-banner` when the call-to-action is activated (source: `onAction`). */
|
|
51
66
|
interface HeroActionEventDetail {
|
|
52
67
|
href: string;
|
|
53
|
-
/** Which
|
|
68
|
+
/** Which button was activated. Unset for a primary button; `st-promo-banner` sets `secondary` on its second button. */
|
|
54
69
|
kind?: 'primary' | 'secondary';
|
|
55
70
|
}
|
|
56
71
|
|
package/dist/hero/index.js
CHANGED
|
@@ -2,10 +2,8 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A small, icon-only action button
|
|
6
|
-
*
|
|
7
|
-
* has no iconify dependency, so the icon is default-slotted content instead, same convention as
|
|
8
|
-
* `st-dropdown`/`st-menu-grid-item`'s `slot="icon"`).
|
|
5
|
+
* A small, icon-only action button. The icon is default-slotted content (the package has no icon
|
|
6
|
+
* library dependency), the same convention as `st-dropdown`/`st-menu-grid-item`'s `slot="icon"`.
|
|
9
7
|
*
|
|
10
8
|
* Fires a plain native `click` — no custom event, since a caller just wants an ordinary button.
|
|
11
9
|
*/
|