@sankhyatronics/sankhya-cms 0.1.3 → 0.1.5
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 +2255 -1328
- package/dist/bento-grid/index.d.ts +5 -1
- package/dist/bento-grid/index.js +1 -1
- package/dist/{chunk-OEX5FDMR.js → chunk-2JGWWXEI.js} +4 -2
- package/dist/chunk-2JGWWXEI.js.map +1 -0
- package/dist/{chunk-PKTRYUGP.js → chunk-5KHI36M5.js} +7 -2
- package/dist/chunk-5KHI36M5.js.map +1 -0
- package/dist/{chunk-FWIG6GEZ.js → chunk-5MTPMXAQ.js} +171 -5
- package/dist/chunk-5MTPMXAQ.js.map +1 -0
- package/dist/{chunk-USNFT4DU.js → chunk-6H262SG6.js} +8 -6
- package/dist/chunk-6H262SG6.js.map +1 -0
- package/dist/{chunk-E52WO7R7.js → chunk-BQTDFQ4V.js} +5 -3
- package/dist/chunk-BQTDFQ4V.js.map +1 -0
- package/dist/{chunk-74MILER4.js → chunk-EMVHNAID.js} +5 -3
- package/dist/chunk-EMVHNAID.js.map +1 -0
- package/dist/{chunk-3ERKQNZT.js → chunk-HGJT24UG.js} +7 -5
- package/dist/chunk-HGJT24UG.js.map +1 -0
- package/dist/chunk-HGTC3LCW.js +607 -0
- package/dist/chunk-HGTC3LCW.js.map +1 -0
- package/dist/{chunk-5DNVCMOO.js → chunk-IDBEZY2O.js} +8 -6
- package/dist/chunk-IDBEZY2O.js.map +1 -0
- package/dist/{chunk-TH5NZXA7.js → chunk-KHPJ5FAJ.js} +80 -4
- package/dist/chunk-KHPJ5FAJ.js.map +1 -0
- package/dist/{chunk-2VZFHTBC.js → chunk-MW43OS47.js} +5 -3
- package/dist/chunk-MW43OS47.js.map +1 -0
- package/dist/{chunk-N63TVWK3.js → chunk-NN3OCPDV.js} +23 -19
- package/dist/chunk-NN3OCPDV.js.map +1 -0
- package/dist/{chunk-3TCP25JG.js → chunk-PB7ZPPLP.js} +9 -1
- package/dist/chunk-PB7ZPPLP.js.map +1 -0
- package/dist/{chunk-5UFRGZWG.js → chunk-TLHG33MM.js} +2 -2
- package/dist/{chunk-IMACP7HN.js → chunk-UVNBZD7R.js} +5 -3
- package/dist/chunk-UVNBZD7R.js.map +1 -0
- package/dist/{chunk-5REZSZCK.js → chunk-VRRBMOUP.js} +5 -3
- package/dist/chunk-VRRBMOUP.js.map +1 -0
- package/dist/cms-theme.css +11 -0
- package/dist/content-block/index.d.ts +2 -0
- package/dist/content-block/index.js +1 -1
- package/dist/cookie-consent/index.d.ts +2 -0
- package/dist/cookie-consent/index.js +1 -1
- package/dist/dropdown/index.d.ts +30 -2
- package/dist/dropdown/index.js +2 -1
- package/dist/feature-split/index.d.ts +5 -1
- package/dist/feature-split/index.js +1 -1
- package/dist/features-section/index.d.ts +2 -0
- package/dist/features-section/index.js +1 -1
- package/dist/header/index.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +42 -34
- package/dist/items-accordion/index.d.ts +5 -1
- package/dist/items-accordion/index.js +1 -1
- package/dist/mega-menu/index.d.ts +142 -0
- package/dist/mega-menu/index.js +14 -0
- package/dist/mega-menu/index.js.map +1 -0
- package/dist/menu-item/index.d.ts +3 -0
- package/dist/menu-item/index.js +2 -1
- package/dist/promo-banner/index.d.ts +3 -0
- 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 +1 -0
- package/dist/section/index.js +1 -1
- package/dist/select/index.js +2 -2
- package/dist/shared/icons.d.ts +3 -1
- package/dist/shared/icons.js +3 -1
- package/dist/stats/index.d.ts +6 -1
- package/dist/stats/index.js +1 -1
- package/dist/testimonials/index.d.ts +1 -0
- package/dist/testimonials/index.js +2 -2
- package/package.json +18 -23
- package/LICENSE +0 -21
- package/dist/chunk-2VZFHTBC.js.map +0 -1
- package/dist/chunk-3ERKQNZT.js.map +0 -1
- package/dist/chunk-3TCP25JG.js.map +0 -1
- package/dist/chunk-5DNVCMOO.js.map +0 -1
- package/dist/chunk-5REZSZCK.js.map +0 -1
- package/dist/chunk-74MILER4.js.map +0 -1
- package/dist/chunk-E52WO7R7.js.map +0 -1
- package/dist/chunk-FWIG6GEZ.js.map +0 -1
- package/dist/chunk-IMACP7HN.js.map +0 -1
- package/dist/chunk-N63TVWK3.js.map +0 -1
- package/dist/chunk-OEX5FDMR.js.map +0 -1
- package/dist/chunk-PKTRYUGP.js.map +0 -1
- package/dist/chunk-TH5NZXA7.js.map +0 -1
- package/dist/chunk-USNFT4DU.js.map +0 -1
- /package/dist/{chunk-5UFRGZWG.js.map → chunk-TLHG33MM.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/content-block/ContentBlock.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\r\nimport { sectionSubtitleStyles, sectionTitleStyles, sectionHeaderStyles } from '../shared/section-styles';\r\nimport '../markdown';\r\n\r\n/**\r\n * A long-form article section: centered title/subtitle, an optional featured image with caption,\r\n * then Markdown body text. Ports `SankhyaUI`'s React `ContentBlock`. The body comes from\r\n * `content-src` (a Markdown URL, as in the source) or an inline `content` string (added so the\r\n * block works without a fetch); `content-src` wins when both are set.\r\n *\r\n * @cssprop --st-content-block-padding - Overrides the block's padding.\r\n */\r\n@customElement('st-content-block')\r\nexport class ContentBlock extends LitElement {\r\n static styles = css`\r\n ${controlBaseStyles}\r\n\r\n :host {\r\n display: block;\r\n ${fontFamilyStyles}\r\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\r\n padding; override with --st-content-block-padding instead. */\r\n padding: var(--st-content-block-padding, var(--st-space-24)) !important;\r\n background: var(--st-color-surface);\r\n color: var(--st-color-text-strong);\r\n }\r\n\r\n :host([inverted]) {\r\n background: var(--st-color-text-strong);\r\n color: var(--st-color-on-solid);\r\n }\r\n\r\n .container {\r\n max-width: var(--st-cms-container-max);\r\n padding: 0 var(--st-space-48);\r\n margin: 0 auto;\r\n }\r\n\r\n .header {\r\n ${sectionHeaderStyles}\r\n }\r\n\r\n .title {\r\n ${sectionTitleStyles}\r\n line-height: 1.1;\r\n }\r\n\r\n .subtitle {\r\n ${sectionSubtitleStyles}\r\n }\r\n\r\n :host([inverted]) .title,\r\n :host([inverted]) .subtitle {\r\n color: inherit;\r\n }\r\n\r\n .featured-image {\r\n margin: 0 0 var(--st-space-48);\r\n border-radius: var(--st-radius-lg);\r\n overflow: hidden;\r\n }\r\n\r\n .featured-image img {\r\n width: 100%;\r\n height: auto;\r\n display: block;\r\n }\r\n\r\n figcaption {\r\n padding: var(--st-space-12);\r\n text-align: center;\r\n color: var(--st-color-text-muted);\r\n font-size: var(--st-text-xs);\r\n }\r\n\r\n st-markdown {\r\n color: var(--st-color-text);\r\n font-size: var(--st-text-xl);\r\n }\r\n\r\n :host([inverted]) st-markdown {\r\n color: inherit;\r\n }\r\n\r\n @media (max-width: 768px) {\r\n :host {\r\n padding: var(--st-content-block-padding, var(--st-space-48) var(--st-space-24)) !important;\r\n }\r\n\r\n .container {\r\n padding: 0;\r\n }\r\n }\r\n `;\r\n\r\n @property({ type: String })\r\n title = '';\r\n\r\n @property({ type: String })\r\n subtitle = '';\r\n\r\n /** URL of a Markdown file. */\r\n @property({ type: String, attribute: 'content-src' })\r\n contentSrc = '';\r\n\r\n /** Inline Markdown, used when `content-src` is not set. */\r\n @property({ type: String })\r\n content = '';\r\n\r\n @property({ type: String, attribute: 'image-src' })\r\n imageSrc = '';\r\n\r\n @property({ type: String, attribute: 'image-alt' })\r\n imageAlt = '';\r\n\r\n @property({ type: String, attribute: 'image-caption' })\r\n imageCaption = '';\r\n\r\n @property({ type: Boolean, reflect: true })\r\n inverted = false;\r\n\r\n render() {\r\n return html`\r\n <section class=\"container\" part=\"container\">\r\n <div class=\"header\" part=\"header\">\r\n ${this.title ? html`<div class=\"title\" part=\"title\">${this.title}</div>` : nothing}\r\n ${this.subtitle ? html`<div class=\"subtitle\" part=\"subtitle\">${this.subtitle}</div>` : nothing}\r\n </div>\r\n ${this.imageSrc\r\n ? html`\r\n <figure class=\"featured-image\" part=\"image\">\r\n <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />\r\n ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}\r\n </figure>\r\n `\r\n : nothing}\r\n <st-markdown part=\"body\" .src=${this.contentSrc} .content=${this.content}></st-markdown>\r\n </section>\r\n `;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAejC,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AAmFL,iBAAQ;AAGR,oBAAW;AAIX,sBAAa;AAIb,mBAAU;AAGV,oBAAW;AAGX,oBAAW;AAGX,wBAAe;AAGf,oBAAW;AAAA;AAAA,EAEX,SAAS;AACP,WAAO;AAAA;AAAA;AAAA,YAGC,KAAK,QAAQ,uCAAuC,KAAK,KAAK,WAAW,OAAO;AAAA,YAChF,KAAK,WAAW,6CAA6C,KAAK,QAAQ,WAAW,OAAO;AAAA;AAAA,UAE9F,KAAK,WACH;AAAA;AAAA,2BAEe,KAAK,QAAQ,QAAQ,KAAK,YAAY,KAAK,KAAK;AAAA,kBACzD,KAAK,eAAe,mBAAmB,KAAK,YAAY,kBAAkB,OAAO;AAAA;AAAA,gBAGvF,OAAO;AAAA,wCACqB,KAAK,UAAU,aAAa,KAAK,OAAO;AAAA;AAAA;AAAA,EAG9E;AACF;AA/Ha,aACJ,SAAS;AAAA,MACZ,iBAAiB;AAAA;AAAA;AAAA;AAAA,QAIf,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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roes a shadow host's
|
|
78
|
+
padding; override with --st-feature-split-padding instead. */
|
|
79
|
+
padding: var(--st-feature-split-padding, var(--st-space-24)) !important;
|
|
78
80
|
background: var(--st-color-page);
|
|
79
81
|
${fontFamilyStyles}
|
|
80
82
|
}
|
|
@@ -213,7 +215,7 @@ FeatureSplit.styles = css`
|
|
|
213
215
|
|
|
214
216
|
@media (max-width: 768px) {
|
|
215
217
|
:host {
|
|
216
|
-
padding: var(--st-space-48) var(--st-space-24);
|
|
218
|
+
padding: var(--st-feature-split-padding, var(--st-space-48) var(--st-space-24)) !important;
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
.container {
|
|
@@ -263,4 +265,4 @@ FeatureSplit = __decorateClass([
|
|
|
263
265
|
export {
|
|
264
266
|
FeatureSplit
|
|
265
267
|
};
|
|
266
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-VRRBMOUP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/feature-split/FeatureSplit.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport 'iconify-icon';\r\n\r\nimport { controlBaseStyles, ctaButtonStyles, fontFamilyStyles } from '../shared/styles';\r\nimport '../markdown';\r\nimport {\r\n cardTitleStyles,\r\n iconTileStyles,\r\n reducedMotionStyles,\r\n sectionTitleStyles,\r\n} from '../shared/section-styles';\r\nimport type { FeatureSplitActionEventDetail } from './FeatureSplitEvents';\r\n\r\nexport interface FeatureSplitItem {\r\n /** Iconify icon name, e.g. `mdi:check`. */\r\n icon?: string;\r\n title: string;\r\n /** Markdown. */\r\n description: string;\r\n}\r\n\r\nexport type FeatureSplitImagePosition = 'left' | 'right' | 'top';\r\n\r\n/**\r\n * A title/markdown-subtitle/feature-list block beside (or under) an image.\r\n *\r\n * @cssprop --st-feature-split-padding - Overrides the block's padding.\r\n */\r\n@customElement('st-feature-split')\r\nexport class FeatureSplit extends LitElement {\r\n static styles = css`\r\n ${controlBaseStyles}\r\n\r\n :host {\r\n display: block;\r\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\r\n padding; override with --st-feature-split-padding instead. */\r\n padding: var(--st-feature-split-padding, var(--st-space-24)) !important;\r\n background: var(--st-color-page);\r\n ${fontFamilyStyles}\r\n }\r\n\r\n :host([inverted]) {\r\n background: var(--st-color-text-strong);\r\n }\r\n\r\n .container {\r\n max-width: var(--st-cms-container-max);\r\n margin: 0 auto;\r\n display: grid;\r\n grid-template-columns: 1fr 1fr;\r\n gap: var(--st-space-48);\r\n align-items: center;\r\n }\r\n\r\n :host([image-position='left']) .container {\r\n direction: rtl;\r\n }\r\n\r\n :host([image-position='left']) .content {\r\n direction: ltr;\r\n }\r\n\r\n :host([image-position='top']) .container {\r\n grid-template-columns: 1fr;\r\n text-align: center;\r\n }\r\n\r\n :host([image-position='top']) .content {\r\n align-items: center;\r\n }\r\n\r\n :host([image-position='top']) .image-wrapper {\r\n order: -1;\r\n max-width: 800px;\r\n margin: 0 auto;\r\n }\r\n\r\n .content {\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--st-space-32);\r\n }\r\n\r\n .title {\r\n ${sectionTitleStyles}\r\n margin: 0;\r\n }\r\n\r\n .subtitle {\r\n color: var(--st-color-text-muted);\r\n font-size: var(--st-text-base);\r\n line-height: 1.6;\r\n }\r\n\r\n .list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--st-space-24);\r\n margin-top: var(--st-space-16);\r\n }\r\n\r\n .item {\r\n display: flex;\r\n gap: var(--st-space-16);\r\n align-items: flex-start;\r\n text-align: left;\r\n }\r\n\r\n .icon {\r\n ${iconTileStyles}\r\n width: var(--st-space-48);\r\n height: var(--st-space-48);\r\n font-size: 24px;\r\n }\r\n\r\n .item-title {\r\n ${cardTitleStyles}\r\n }\r\n\r\n .item-description {\r\n color: var(--st-color-text-muted);\r\n font-size: var(--st-text-sm);\r\n line-height: 1.5;\r\n }\r\n\r\n .action {\r\n ${ctaButtonStyles}\r\n justify-self: start;\r\n padding: var(--st-space-16);\r\n border-radius: var(--st-radius-lg);\r\n }\r\n\r\n .image-wrapper {\r\n width: 100%;\r\n height: 100%;\r\n min-height: 400px;\r\n border-radius: var(--st-space-24);\r\n overflow: hidden;\r\n box-shadow: 0 20px 40px -12px var(--st-shadow-color-md);\r\n }\r\n\r\n .image {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n transition: transform 0.5s ease;\r\n }\r\n\r\n .image:hover {\r\n transform: scale(1.02);\r\n }\r\n\r\n :host([inverted]) .title,\r\n :host([inverted]) .item-title {\r\n color: var(--st-color-on-solid);\r\n }\r\n\r\n :host([inverted]) .subtitle,\r\n :host([inverted]) .item-description {\r\n color: var(--st-color-border);\r\n }\r\n\r\n :host([inverted]) .icon {\r\n background: var(--st-color-text);\r\n color: var(--st-color-border);\r\n }\r\n\r\n @media (max-width: 1024px) {\r\n .container {\r\n gap: var(--st-space-40);\r\n }\r\n }\r\n\r\n @media (max-width: 768px) {\r\n :host {\r\n padding: var(--st-feature-split-padding, var(--st-space-48) var(--st-space-24)) !important;\r\n }\r\n\r\n .container {\r\n grid-template-columns: 1fr;\r\n direction: ltr !important;\r\n }\r\n\r\n .image-wrapper {\r\n min-height: 300px;\r\n order: -1;\r\n }\r\n }\r\n\r\n ${reducedMotionStyles}\r\n `;\r\n\r\n @property({ type: Boolean, reflect: true })\r\n inverted = false;\r\n\r\n @property({ type: String })\r\n title = '';\r\n\r\n /** Markdown. */\r\n @property({ type: String })\r\n subtitle = '';\r\n\r\n @property({ attribute: false })\r\n items: FeatureSplitItem[] = [];\r\n\r\n @property({ type: String, attribute: 'image-src' })\r\n imageSrc = '';\r\n\r\n @property({ type: String, attribute: 'image-alt' })\r\n imageAlt = '';\r\n\r\n @property({ type: String, attribute: 'image-position', reflect: true })\r\n imagePosition: FeatureSplitImagePosition = 'right';\r\n\r\n @property({ type: String, attribute: 'action-label' })\r\n actionLabel = '';\r\n\r\n @property({ type: String })\r\n href = '';\r\n\r\n private onAction() {\r\n const event = new CustomEvent<FeatureSplitActionEventDetail>('feature-split-action', {\r\n detail: { href: this.href },\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n });\r\n if (this.dispatchEvent(event)) window.location.href = this.href;\r\n }\r\n\r\n render() {\r\n return html`\r\n <div class=\"container\" part=\"container\">\r\n <div class=\"content\" part=\"content\">\r\n <h2 class=\"title\" part=\"title\">${this.title}</h2>\r\n ${this.subtitle\r\n ? html`<div class=\"subtitle\" part=\"subtitle\"><st-markdown .content=${this.subtitle}></st-markdown></div>`\r\n : nothing}\r\n ${this.items.length > 0\r\n ? html`<div class=\"list\" part=\"list\">\r\n ${this.items.map(\r\n (item) => html`\r\n <div class=\"item\" part=\"item\">\r\n ${item.icon\r\n ? html`<div class=\"icon\" part=\"icon\"><iconify-icon icon=${item.icon}></iconify-icon></div>`\r\n : nothing}\r\n <div>\r\n <h3 class=\"item-title\" part=\"item-title\">${item.title}</h3>\r\n <div class=\"item-description\" part=\"item-description\">\r\n <st-markdown .content=${item.description}></st-markdown>\r\n </div>\r\n </div>\r\n </div>\r\n `,\r\n )}\r\n </div>`\r\n : nothing}\r\n ${this.actionLabel && this.href\r\n ? html`<button class=\"action\" part=\"action\" type=\"button\" @click=${this.onAction}>${this.actionLabel}</button>`\r\n : nothing}\r\n </div>\r\n <div class=\"image-wrapper\" part=\"image-wrapper\">\r\n <img class=\"image\" part=\"image\" src=${this.imageSrc} alt=${this.imageAlt || this.title} />\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AACxC,OAAO;AA4BA,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AAqKL,oBAAW;AAGX,iBAAQ;AAIR,oBAAW;AAGX,iBAA4B,CAAC;AAG7B,oBAAW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E,MAAM,QAAQ,WAAW,kBAAkB,SAAS,KAAK,CAAC;AAAA,GAvL3D,aAwLX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,eAAe,CAAC;AAAA,GA1L1C,aA2LX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA7Lf,aA8LX;AA9LW,eAAN;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB;","names":[]}
|
package/dist/cms-theme.css
CHANGED
|
@@ -12,4 +12,15 @@
|
|
|
12
12
|
--st-cms-text-lg: 1.125rem;
|
|
13
13
|
--st-cms-section-padding: 4rem;
|
|
14
14
|
--st-cms-container-max: 1200px;
|
|
15
|
+
|
|
16
|
+
/* A dark band (st-section background="dark", st-stats inverted) and the text on it. Kept apart
|
|
17
|
+
from --st-color-text-strong / --st-color-on-solid, which swap in the dark theme, so the band
|
|
18
|
+
stays dark there too. */
|
|
19
|
+
--st-cms-band-dark-bg: var(--st-color-text-strong);
|
|
20
|
+
--st-cms-band-dark-color: var(--st-color-on-solid);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root.dark {
|
|
24
|
+
--st-cms-band-dark-bg: var(--st-neutral-100);
|
|
25
|
+
--st-cms-band-dark-color: var(--st-neutral-950);
|
|
15
26
|
}
|
|
@@ -6,6 +6,8 @@ import { LitElement } from 'lit';
|
|
|
6
6
|
* then Markdown body text. Ports `SankhyaUI`'s React `ContentBlock`. The body comes from
|
|
7
7
|
* `content-src` (a Markdown URL, as in the source) or an inline `content` string (added so the
|
|
8
8
|
* block works without a fetch); `content-src` wins when both are set.
|
|
9
|
+
*
|
|
10
|
+
* @cssprop --st-content-block-padding - Overrides the block's padding.
|
|
9
11
|
*/
|
|
10
12
|
declare class ContentBlock extends LitElement {
|
|
11
13
|
static styles: lit.CSSResult;
|
|
@@ -7,6 +7,8 @@ import { LitElement, nothing } from 'lit';
|
|
|
7
7
|
* `sankhya_ui_cookie_consent`; storage errors are ignored) and renders nothing once a choice
|
|
8
8
|
* exists. Fires `cookie-consent-accept` / `cookie-consent-refuse` (detail `{ status }`). The
|
|
9
9
|
* default slot replaces the message text.
|
|
10
|
+
*
|
|
11
|
+
* @cssprop --st-cookie-consent-padding - Overrides the bar's padding.
|
|
10
12
|
*/
|
|
11
13
|
declare class CookieConsent extends LitElement {
|
|
12
14
|
static styles: lit.CSSResult;
|
package/dist/dropdown/index.d.ts
CHANGED
|
@@ -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;
|
package/dist/dropdown/index.js
CHANGED
|
@@ -9,7 +9,11 @@ interface FeatureSplitItem {
|
|
|
9
9
|
description: string;
|
|
10
10
|
}
|
|
11
11
|
type FeatureSplitImagePosition = 'left' | 'right' | 'top';
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* A title/markdown-subtitle/feature-list block beside (or under) an image.
|
|
14
|
+
*
|
|
15
|
+
* @cssprop --st-feature-split-padding - Overrides the block's padding.
|
|
16
|
+
*/
|
|
13
17
|
declare class FeatureSplit extends LitElement {
|
|
14
18
|
static styles: lit.CSSResult;
|
|
15
19
|
inverted: boolean;
|
|
@@ -33,6 +33,8 @@ interface FeatureItemData {
|
|
|
33
33
|
* `items` property, from slotted `st-feature-item` elements (the source's `children`), or both
|
|
34
34
|
* (slotted first). `columns` sets the grid width (default 2; one column below 768px). `inverted`
|
|
35
35
|
* is passed on to the `items` tiles; slotted tiles need their own `inverted` attribute.
|
|
36
|
+
*
|
|
37
|
+
* @cssprop --st-features-section-padding - Overrides the section's padding.
|
|
36
38
|
*/
|
|
37
39
|
declare class FeaturesSection extends LitElement {
|
|
38
40
|
static styles: lit.CSSResult;
|
package/dist/header/index.js
CHANGED
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,72 +1,77 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
Stats
|
|
3
|
+
} from "./chunk-6H262SG6.js";
|
|
4
4
|
import {
|
|
5
5
|
Testimonials
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IDBEZY2O.js";
|
|
7
|
+
import {
|
|
8
|
+
MenuGrid
|
|
9
|
+
} from "./chunk-VYON56QO.js";
|
|
7
10
|
import {
|
|
8
11
|
MenuGridItem
|
|
9
12
|
} from "./chunk-4HKSA5UT.js";
|
|
13
|
+
import {
|
|
14
|
+
MenuItem
|
|
15
|
+
} from "./chunk-KHPJ5FAJ.js";
|
|
10
16
|
import {
|
|
11
17
|
PromoBanner
|
|
12
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HGJT24UG.js";
|
|
13
19
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
20
|
+
Section
|
|
21
|
+
} from "./chunk-NN3OCPDV.js";
|
|
16
22
|
import {
|
|
17
23
|
Select
|
|
18
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TLHG33MM.js";
|
|
19
25
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
FeatureItem,
|
|
27
|
+
FeaturesSection
|
|
28
|
+
} from "./chunk-BQTDFQ4V.js";
|
|
22
29
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
30
|
+
Header
|
|
31
|
+
} from "./chunk-5KHI36M5.js";
|
|
25
32
|
import {
|
|
26
33
|
FeatureSplit
|
|
27
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VRRBMOUP.js";
|
|
28
35
|
import {
|
|
29
36
|
Hero
|
|
30
37
|
} from "./chunk-K4ZICRZL.js";
|
|
31
|
-
import {
|
|
32
|
-
Header
|
|
33
|
-
} from "./chunk-PKTRYUGP.js";
|
|
34
|
-
import "./chunk-3TCP25JG.js";
|
|
35
38
|
import {
|
|
36
39
|
IconButton
|
|
37
40
|
} from "./chunk-XXPBFHWR.js";
|
|
38
41
|
import {
|
|
39
42
|
ItemsAccordion
|
|
40
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-EMVHNAID.js";
|
|
41
44
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} from "./chunk-OEX5FDMR.js";
|
|
45
|
+
MegaMenu,
|
|
46
|
+
MegaMenuColumn,
|
|
47
|
+
MegaMenuFeature
|
|
48
|
+
} from "./chunk-HGTC3LCW.js";
|
|
47
49
|
import {
|
|
48
50
|
Carousel
|
|
49
51
|
} from "./chunk-47RPYNFG.js";
|
|
50
52
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
CookieConsent
|
|
55
|
-
} from "./chunk-2VZFHTBC.js";
|
|
56
|
-
import {
|
|
57
|
-
Dropdown
|
|
58
|
-
} from "./chunk-FWIG6GEZ.js";
|
|
59
|
-
import {
|
|
60
|
-
FeatureItem,
|
|
61
|
-
FeaturesSection
|
|
62
|
-
} from "./chunk-E52WO7R7.js";
|
|
53
|
+
BentoGrid
|
|
54
|
+
} from "./chunk-2JGWWXEI.js";
|
|
63
55
|
import {
|
|
64
56
|
Card
|
|
65
57
|
} from "./chunk-7PSYCTEN.js";
|
|
58
|
+
import {
|
|
59
|
+
ContentBlock
|
|
60
|
+
} from "./chunk-UVNBZD7R.js";
|
|
66
61
|
import {
|
|
67
62
|
Markdown
|
|
68
63
|
} from "./chunk-3JU3R22O.js";
|
|
69
64
|
import "./chunk-3VE6VFJ4.js";
|
|
65
|
+
import {
|
|
66
|
+
CookieConsent
|
|
67
|
+
} from "./chunk-MW43OS47.js";
|
|
68
|
+
import {
|
|
69
|
+
Dropdown
|
|
70
|
+
} from "./chunk-5MTPMXAQ.js";
|
|
71
|
+
import "./chunk-PB7ZPPLP.js";
|
|
72
|
+
import {
|
|
73
|
+
Footer
|
|
74
|
+
} from "./chunk-CDC4P77V.js";
|
|
70
75
|
import "./chunk-RHAOQ6K4.js";
|
|
71
76
|
import "./chunk-EUXUH3YW.js";
|
|
72
77
|
export {
|
|
@@ -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,
|
|
@@ -6,7 +6,11 @@ interface AccordionItem {
|
|
|
6
6
|
title: string;
|
|
7
7
|
content: string;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* A vertical list of collapsible title/content rows; one open at a time unless `allow-multiple`.
|
|
11
|
+
*
|
|
12
|
+
* @cssprop --st-items-accordion-padding - Overrides the block's padding.
|
|
13
|
+
*/
|
|
10
14
|
declare class ItemsAccordion extends LitElement {
|
|
11
15
|
static styles: lit.CSSResult;
|
|
12
16
|
title: string;
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
* @cssprop --st-mega-menu-column-padding - Overrides the padding of a `card`/`accent` column.
|
|
63
|
+
*/
|
|
64
|
+
declare class MegaMenuColumn extends LitElement {
|
|
65
|
+
static styles: lit.CSSResult;
|
|
66
|
+
heading: string;
|
|
67
|
+
/** Makes the heading a link (e.g. to the section's overview page). */
|
|
68
|
+
href: string;
|
|
69
|
+
description: string;
|
|
70
|
+
/** `plain` (default), `card` (tinted tile) or `accent` (solid accent tile, light text). */
|
|
71
|
+
variant: 'plain' | 'card' | 'accent';
|
|
72
|
+
/** Text of a pill button at the bottom of the column; needs `cta-href`. */
|
|
73
|
+
ctaLabel: string;
|
|
74
|
+
ctaHref: string;
|
|
75
|
+
private select;
|
|
76
|
+
private renderHeading;
|
|
77
|
+
private renderCta;
|
|
78
|
+
render(): lit.TemplateResult<1>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A promo card for the featured column of an `st-mega-menu` (`slot="featured"`). The whole card
|
|
83
|
+
* is one link. Two looks, after okta.com:
|
|
84
|
+
*
|
|
85
|
+
* - `story` (default): a rounded image on top, then the description and an underlined
|
|
86
|
+
* call-to-action line — a customer story or announcement.
|
|
87
|
+
* - `overlay`: a tile with light text over `image-url` (darkened), or over an accent gradient when
|
|
88
|
+
* there is no image — an optional `logo-url` top left, the title and description at the bottom.
|
|
89
|
+
*
|
|
90
|
+
* An `http(s)` `href` opens in a new tab unless `target` says otherwise. Any other `href` fires a
|
|
91
|
+
* *cancelable* `mega-menu-select` event (detail: `{ href }`) first; a host doing client-side
|
|
92
|
+
* routing calls `event.preventDefault()` on it.
|
|
93
|
+
*
|
|
94
|
+
* @fires mega-menu-select - The card was clicked (cancelable; detail `{ href }`).
|
|
95
|
+
* @csspart card - The card link.
|
|
96
|
+
* @csspart image - The image (`story`).
|
|
97
|
+
* @csspart logo - The logo (`overlay`).
|
|
98
|
+
* @csspart eyebrow - The small label above the title.
|
|
99
|
+
* @csspart title - The title.
|
|
100
|
+
* @csspart description - The description.
|
|
101
|
+
* @csspart cta - The call-to-action line.
|
|
102
|
+
* @cssprop --st-mega-menu-feature-from - Start colour of the `overlay` gradient (default: the accent colour).
|
|
103
|
+
* @cssprop --st-mega-menu-feature-to - End colour of the `overlay` gradient.
|
|
104
|
+
*/
|
|
105
|
+
declare class MegaMenuFeature extends LitElement {
|
|
106
|
+
/** `focus()` on the element focuses its link, so `st-dropdown` can arrow-key to it. */
|
|
107
|
+
static shadowRootOptions: {
|
|
108
|
+
delegatesFocus: boolean;
|
|
109
|
+
clonable?: boolean;
|
|
110
|
+
customElementRegistry?: CustomElementRegistry | null;
|
|
111
|
+
mode: ShadowRootMode;
|
|
112
|
+
serializable?: boolean;
|
|
113
|
+
slotAssignment?: SlotAssignmentMode;
|
|
114
|
+
};
|
|
115
|
+
static styles: lit.CSSResult;
|
|
116
|
+
/** `story` (default) or `overlay` — see the element description. */
|
|
117
|
+
variant: 'story' | 'overlay';
|
|
118
|
+
title: string;
|
|
119
|
+
description: string;
|
|
120
|
+
/** Small label above the title, e.g. "New" or "Report". */
|
|
121
|
+
eyebrow: string;
|
|
122
|
+
href: string;
|
|
123
|
+
/** `target` for the link. Defaults to `_blank` for an `http(s)` `href`, `_self` otherwise. */
|
|
124
|
+
target: string;
|
|
125
|
+
/** Image on top (`story`) or behind the text (`overlay`). */
|
|
126
|
+
imageUrl: string;
|
|
127
|
+
imageAlt: string;
|
|
128
|
+
/** Logo at the top of an `overlay` card. */
|
|
129
|
+
logoUrl: string;
|
|
130
|
+
logoAlt: string;
|
|
131
|
+
/** Call-to-action text at the bottom of the card; empty hides it. */
|
|
132
|
+
ctaLabel: string;
|
|
133
|
+
private get isExternal();
|
|
134
|
+
private onClick;
|
|
135
|
+
render(): lit.TemplateResult<1>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface MegaMenuSelectEventDetail {
|
|
139
|
+
href: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { MegaMenu, MegaMenuColumn, MegaMenuFeature, type MegaMenuSelectEventDetail };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MegaMenu,
|
|
3
|
+
MegaMenuColumn,
|
|
4
|
+
MegaMenuFeature
|
|
5
|
+
} from "../chunk-HGTC3LCW.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;
|
package/dist/menu-item/index.js
CHANGED
|
@@ -5,6 +5,9 @@ import { LitElement } from 'lit';
|
|
|
5
5
|
* Rounded call-to-action banner (title, subtitle, one outlined button) on a dark panel or a
|
|
6
6
|
* background image. Port of `SankhyaUI`'s React `PromoBanner`; the button fires an `action` event
|
|
7
7
|
* (detail `{ href }`, empty unless set) in place of `onAction`.
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --st-promo-banner-margin - Overrides the banner's margin.
|
|
10
|
+
* @cssprop --st-promo-banner-padding - Overrides the banner's padding.
|
|
8
11
|
*/
|
|
9
12
|
declare class PromoBanner extends LitElement {
|
|
10
13
|
static styles: lit.CSSResult;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/schema/index.js
CHANGED
|
@@ -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",
|