kanto-ds 1.7.0 → 1.9.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/README.md +26 -14
- package/dist/AGENTS.md +157 -0
- package/dist/cdn/kanto.min.js +4743 -932
- package/dist/chunks/block-Cci-Kff_.js +69 -0
- package/dist/chunks/block-Cci-Kff_.js.map +1 -0
- package/dist/chunks/defaults-yhaR6U65.js +70 -0
- package/dist/chunks/{defaults-Cpeg13O5.js.map → defaults-yhaR6U65.js.map} +1 -1
- package/dist/chunks/heading-DsnZsfg-.js +21 -0
- package/dist/chunks/heading-DsnZsfg-.js.map +1 -0
- package/dist/chunks/{index-TWJzttLX.js → index-1ZFgagWW.js} +37 -12
- package/dist/chunks/index-1ZFgagWW.js.map +1 -0
- package/dist/chunks/indicator-B_Rs8F92.js +49 -0
- package/dist/chunks/indicator-B_Rs8F92.js.map +1 -0
- package/dist/chunks/{kt-calendar-CtwOby1R.js → kt-calendar-SK8eapuy.js} +3 -3
- package/dist/chunks/{kt-calendar-CtwOby1R.js.map → kt-calendar-SK8eapuy.js.map} +1 -1
- package/dist/chunks/kt-color-picker-BoezCAmx.js +365 -0
- package/dist/chunks/kt-color-picker-BoezCAmx.js.map +1 -0
- package/dist/chunks/{kt-element-T0VbIBNp.js → kt-element-DvWtPQ1Y.js} +2 -2
- package/dist/chunks/{kt-element-T0VbIBNp.js.map → kt-element-DvWtPQ1Y.js.map} +1 -1
- package/dist/chunks/motion-ChVUUO7O.js +28 -0
- package/dist/chunks/motion-ChVUUO7O.js.map +1 -0
- package/dist/chunks/numbers-QyecMiSJ.js +9 -0
- package/dist/chunks/numbers-QyecMiSJ.js.map +1 -0
- package/dist/chunks/{segmented-field-BBXR4XFL.js → segmented-field-T_Zo6lc1.js} +2 -2
- package/dist/chunks/{segmented-field-BBXR4XFL.js.map → segmented-field-T_Zo6lc1.js.map} +1 -1
- package/dist/chunks/{typed-date-CPAUNHzr.js → typed-date-CaU0kXoY.js} +2 -2
- package/dist/chunks/{typed-date-CPAUNHzr.js.map → typed-date-CaU0kXoY.js.map} +1 -1
- package/dist/components/blocks/kt-auth-form/kt-auth-form.d.ts +143 -0
- package/dist/components/blocks/kt-auth-form/kt-auth-form.js +368 -0
- package/dist/components/blocks/kt-auth-form/kt-auth-form.js.map +1 -0
- package/dist/components/blocks/kt-blog-post/kt-blog-post.d.ts +75 -0
- package/dist/components/blocks/kt-blog-post/kt-blog-post.js +285 -0
- package/dist/components/blocks/kt-blog-post/kt-blog-post.js.map +1 -0
- package/dist/components/blocks/kt-cta/kt-cta.d.ts +51 -0
- package/dist/components/blocks/kt-cta/kt-cta.js +126 -0
- package/dist/components/blocks/kt-cta/kt-cta.js.map +1 -0
- package/dist/components/blocks/kt-empty-page/kt-empty-page.d.ts +75 -0
- package/dist/components/blocks/kt-empty-page/kt-empty-page.js +245 -0
- package/dist/components/blocks/kt-empty-page/kt-empty-page.js.map +1 -0
- package/dist/components/blocks/kt-error-page/kt-error-page.d.ts +65 -0
- package/dist/components/blocks/kt-error-page/kt-error-page.js +177 -0
- package/dist/components/blocks/kt-error-page/kt-error-page.js.map +1 -0
- package/dist/components/blocks/kt-faq/kt-faq.d.ts +61 -0
- package/dist/components/blocks/kt-faq/kt-faq.js +129 -0
- package/dist/components/blocks/kt-faq/kt-faq.js.map +1 -0
- package/dist/components/blocks/kt-feature-grid/kt-feature-grid.d.ts +59 -0
- package/dist/components/blocks/kt-feature-grid/kt-feature-grid.js +166 -0
- package/dist/components/blocks/kt-feature-grid/kt-feature-grid.js.map +1 -0
- package/dist/components/blocks/kt-hero/kt-hero.d.ts +51 -0
- package/dist/components/blocks/kt-hero/kt-hero.js +138 -0
- package/dist/components/blocks/kt-hero/kt-hero.js.map +1 -0
- package/dist/components/blocks/kt-logo-cloud/kt-logo-cloud.d.ts +46 -0
- package/dist/components/blocks/kt-logo-cloud/kt-logo-cloud.js +100 -0
- package/dist/components/blocks/kt-logo-cloud/kt-logo-cloud.js.map +1 -0
- package/dist/components/blocks/kt-newsletter/kt-newsletter.d.ts +85 -0
- package/dist/components/blocks/kt-newsletter/kt-newsletter.js +247 -0
- package/dist/components/blocks/kt-newsletter/kt-newsletter.js.map +1 -0
- package/dist/components/blocks/kt-post-grid/kt-post-grid.d.ts +73 -0
- package/dist/components/blocks/kt-post-grid/kt-post-grid.js +249 -0
- package/dist/components/blocks/kt-post-grid/kt-post-grid.js.map +1 -0
- package/dist/components/blocks/kt-pricing-table/kt-pricing-table.d.ts +102 -0
- package/dist/components/blocks/kt-pricing-table/kt-pricing-table.js +307 -0
- package/dist/components/blocks/kt-pricing-table/kt-pricing-table.js.map +1 -0
- package/dist/components/blocks/kt-settings-section/kt-settings-section.d.ts +52 -0
- package/dist/components/blocks/kt-settings-section/kt-settings-section.js +158 -0
- package/dist/components/blocks/kt-settings-section/kt-settings-section.js.map +1 -0
- package/dist/components/blocks/kt-testimonials/kt-testimonials.d.ts +56 -0
- package/dist/components/blocks/kt-testimonials/kt-testimonials.js +161 -0
- package/dist/components/blocks/kt-testimonials/kt-testimonials.js.map +1 -0
- package/dist/components/core/kt-avatar/kt-avatar.js +2 -2
- package/dist/components/core/kt-avatar-group/kt-avatar-group.d.ts +42 -0
- package/dist/components/core/kt-avatar-group/kt-avatar-group.js +97 -0
- package/dist/components/core/kt-avatar-group/kt-avatar-group.js.map +1 -0
- package/dist/components/core/kt-badge/kt-badge.js +2 -2
- package/dist/components/core/kt-button/flights.d.ts +27 -0
- package/dist/components/core/kt-button/kt-button.d.ts +52 -1
- package/dist/components/core/kt-button/kt-button.js +353 -77
- package/dist/components/core/kt-button/kt-button.js.map +1 -1
- package/dist/components/core/kt-button/morph.d.ts +27 -0
- package/dist/components/core/kt-card/kt-card.js +1 -1
- package/dist/components/core/kt-code/kt-code.d.ts +2 -1
- package/dist/components/core/kt-code/kt-code.js +52 -37
- package/dist/components/core/kt-code/kt-code.js.map +1 -1
- package/dist/components/core/kt-copy-button/kt-copy-button.d.ts +47 -0
- package/dist/components/core/kt-copy-button/kt-copy-button.js +74 -0
- package/dist/components/core/kt-copy-button/kt-copy-button.js.map +1 -0
- package/dist/components/core/kt-icon/kt-icon.js +2 -2
- package/dist/components/core/kt-kbd/kt-kbd.js +1 -1
- package/dist/components/core/kt-split-button/kt-split-button.js +2 -2
- package/dist/components/data/kt-chart/kt-chart.js +2 -2
- package/dist/components/data/kt-chat-message/kt-chat-message.d.ts +60 -0
- package/dist/components/data/kt-chat-message/kt-chat-message.js +204 -0
- package/dist/components/data/kt-chat-message/kt-chat-message.js.map +1 -0
- package/dist/components/data/kt-description-list/kt-description-list.d.ts +56 -0
- package/dist/components/data/kt-description-list/kt-description-list.js +120 -0
- package/dist/components/data/kt-description-list/kt-description-list.js.map +1 -0
- package/dist/components/data/kt-meter/kt-meter.js +8 -6
- package/dist/components/data/kt-meter/kt-meter.js.map +1 -1
- package/dist/components/data/kt-pagination/kt-pagination.js +2 -2
- package/dist/components/data/kt-stat/kt-stat.d.ts +3 -1
- package/dist/components/data/kt-stat/kt-stat.js +31 -16
- package/dist/components/data/kt-stat/kt-stat.js.map +1 -1
- package/dist/components/data/kt-table/kt-table.js +2 -2
- package/dist/components/data/kt-timeline/kt-timeline.js +2 -2
- package/dist/components/data/kt-timeline/kt-timeline.js.map +1 -1
- package/dist/components/data/kt-tree/kt-tree.d.ts +69 -0
- package/dist/components/data/kt-tree/kt-tree.js +208 -0
- package/dist/components/data/kt-tree/kt-tree.js.map +1 -0
- package/dist/components/feedback/kt-alert/kt-alert.js +2 -2
- package/dist/components/feedback/kt-empty-state/kt-empty-state.js +1 -1
- package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +1 -1
- package/dist/components/feedback/kt-skeleton/kt-skeleton.js +1 -1
- package/dist/components/feedback/kt-toast/kt-toast.js +2 -2
- package/dist/components/feedback/kt-toast-container/kt-toast-container.d.ts +8 -1
- package/dist/components/feedback/kt-toast-container/kt-toast-container.js +65 -26
- package/dist/components/feedback/kt-toast-container/kt-toast-container.js.map +1 -1
- package/dist/components/feedback/kt-tooltip/kt-tooltip.js +1 -1
- package/dist/components/forms/kt-calendar/kt-calendar.js +3 -3
- package/dist/components/forms/kt-checkbox/kt-checkbox.d.ts +2 -0
- package/dist/components/forms/kt-checkbox/kt-checkbox.js +19 -8
- package/dist/components/forms/kt-checkbox/kt-checkbox.js.map +1 -1
- package/dist/components/forms/kt-color-picker/kt-color-picker.d.ts +66 -0
- package/dist/components/forms/kt-color-picker/kt-color-picker.js +14 -0
- package/dist/components/forms/kt-color-picker/kt-color-picker.js.map +1 -0
- package/dist/components/forms/kt-date-input/kt-date-input.js +5 -5
- package/dist/components/forms/kt-date-picker/kt-date-picker.js +4 -4
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +2 -2
- package/dist/components/forms/kt-form/kt-form.js +2 -2
- package/dist/components/forms/kt-input/kt-input.js +2 -2
- package/dist/components/forms/kt-input-menu/kt-input-menu.js +2 -2
- package/dist/components/forms/kt-label-input/kt-label-input.js +1 -1
- package/dist/components/forms/kt-multi-select/kt-multi-select.js +2 -2
- package/dist/components/forms/kt-number-input/kt-number-input.d.ts +92 -0
- package/dist/components/forms/kt-number-input/kt-number-input.js +366 -0
- package/dist/components/forms/kt-number-input/kt-number-input.js.map +1 -0
- package/dist/components/forms/kt-otp-input/kt-otp-input.d.ts +74 -0
- package/dist/components/forms/kt-otp-input/kt-otp-input.js +232 -0
- package/dist/components/forms/kt-otp-input/kt-otp-input.js.map +1 -0
- package/dist/components/forms/kt-prompt-input/kt-prompt-input.d.ts +74 -0
- package/dist/components/forms/kt-prompt-input/kt-prompt-input.js +213 -0
- package/dist/components/forms/kt-prompt-input/kt-prompt-input.js.map +1 -0
- package/dist/components/forms/kt-radio-group/kt-radio-group.js +2 -2
- package/dist/components/forms/kt-select/kt-select.js +2 -2
- package/dist/components/forms/kt-slider/kt-slider.d.ts +69 -0
- package/dist/components/forms/kt-slider/kt-slider.js +252 -0
- package/dist/components/forms/kt-slider/kt-slider.js.map +1 -0
- package/dist/components/forms/kt-textarea/kt-textarea.js +2 -2
- package/dist/components/forms/kt-time-input/kt-time-input.js +3 -3
- package/dist/components/forms/kt-toggle/kt-toggle.js +1 -1
- package/dist/components/navigation/kt-app-shell/kt-app-shell.d.ts +85 -0
- package/dist/components/navigation/kt-app-shell/kt-app-shell.js +220 -0
- package/dist/components/navigation/kt-app-shell/kt-app-shell.js.map +1 -0
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +2 -2
- package/dist/components/navigation/kt-footer/kt-footer.d.ts +82 -0
- package/dist/components/navigation/kt-footer/kt-footer.js +220 -0
- package/dist/components/navigation/kt-footer/kt-footer.js.map +1 -0
- package/dist/components/navigation/kt-header/kt-header.js +2 -2
- package/dist/components/navigation/kt-page-header/kt-page-header.js +2 -2
- package/dist/components/navigation/kt-page-header/kt-page-header.js.map +1 -1
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.d.ts +1 -0
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +81 -44
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js.map +1 -1
- package/dist/components/navigation/kt-steps/kt-steps.d.ts +68 -0
- package/dist/components/navigation/kt-steps/kt-steps.js +286 -0
- package/dist/components/navigation/kt-steps/kt-steps.js.map +1 -0
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +3 -3
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js.map +1 -1
- package/dist/components/navigation/kt-tabs/kt-tabs.d.ts +1 -0
- package/dist/components/navigation/kt-tabs/kt-tabs.js +92 -64
- package/dist/components/navigation/kt-tabs/kt-tabs.js.map +1 -1
- package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +1 -1
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +2 -2
- package/dist/components/navigation/kt-user-menu/kt-user-menu.d.ts +86 -0
- package/dist/components/navigation/kt-user-menu/kt-user-menu.js +298 -0
- package/dist/components/navigation/kt-user-menu/kt-user-menu.js.map +1 -0
- package/dist/components/overlays/kt-accordion/kt-accordion.d.ts +47 -0
- package/dist/components/overlays/kt-accordion/kt-accordion.js +80 -0
- package/dist/components/overlays/kt-accordion/kt-accordion.js.map +1 -0
- package/dist/components/overlays/kt-collapsible/kt-collapsible.d.ts +17 -1
- package/dist/components/overlays/kt-collapsible/kt-collapsible.js +87 -32
- package/dist/components/overlays/kt-collapsible/kt-collapsible.js.map +1 -1
- package/dist/components/overlays/kt-command-palette/kt-command-palette.d.ts +87 -0
- package/dist/components/overlays/kt-command-palette/kt-command-palette.js +370 -0
- package/dist/components/overlays/kt-command-palette/kt-command-palette.js.map +1 -0
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +2 -2
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js +2 -2
- package/dist/components/overlays/kt-modal/kt-modal.js +2 -2
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js +2 -2
- package/dist/components/overlays/kt-tour/kt-tour.d.ts +77 -0
- package/dist/components/overlays/kt-tour/kt-tour.js +200 -0
- package/dist/components/overlays/kt-tour/kt-tour.js.map +1 -0
- package/dist/custom-elements.json +16427 -8061
- package/dist/docs/kt-accordion.md +49 -0
- package/dist/docs/kt-app-shell.md +89 -0
- package/dist/docs/kt-auth-form.md +111 -0
- package/dist/docs/kt-avatar-group.md +49 -0
- package/dist/docs/kt-blog-post.md +77 -0
- package/dist/docs/kt-button.md +21 -0
- package/dist/docs/kt-chat-message.md +68 -0
- package/dist/docs/kt-color-picker.md +67 -0
- package/dist/docs/kt-command-palette.md +99 -0
- package/dist/docs/kt-copy-button.md +50 -0
- package/dist/docs/kt-cta.md +45 -0
- package/dist/docs/kt-description-list.md +58 -0
- package/dist/docs/kt-empty-page.md +92 -0
- package/dist/docs/kt-error-page.md +64 -0
- package/dist/docs/kt-faq.md +54 -0
- package/dist/docs/kt-feature-grid.md +53 -0
- package/dist/docs/kt-footer.md +115 -0
- package/dist/docs/kt-hero.md +53 -0
- package/dist/docs/kt-logo-cloud.md +41 -0
- package/dist/docs/kt-newsletter.md +69 -0
- package/dist/docs/kt-number-input.md +77 -0
- package/dist/docs/kt-otp-input.md +68 -0
- package/dist/docs/kt-post-grid.md +66 -0
- package/dist/docs/kt-pricing-table.md +101 -0
- package/dist/docs/kt-prompt-input.md +86 -0
- package/dist/docs/kt-settings-section.md +65 -0
- package/dist/docs/kt-slider.md +76 -0
- package/dist/docs/kt-steps.md +79 -0
- package/dist/docs/kt-testimonials.md +52 -0
- package/dist/docs/kt-tour.md +75 -0
- package/dist/docs/kt-tree.md +83 -0
- package/dist/docs/kt-user-menu.md +77 -0
- package/dist/icons/defaults.d.ts +2 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +56 -0
- package/dist/index.js +225 -284
- package/dist/index.js.map +1 -1
- package/dist/internal/block.d.ts +23 -0
- package/dist/internal/command-search.d.ts +27 -0
- package/dist/internal/heading.d.ts +8 -0
- package/dist/internal/indicator.d.ts +34 -0
- package/dist/internal/motion.d.ts +25 -0
- package/dist/internal/numbers.d.ts +2 -0
- package/dist/internal/strings.d.ts +36 -0
- package/dist/react/index.d.ts +165 -0
- package/dist/react/index.js +420 -171
- package/dist/react/index.js.map +1 -1
- package/dist/react/jsx.d.ts +128 -1
- package/dist/strings/index.js +1 -1
- package/dist/tokens/base.css +35 -2
- package/dist/vscode.css-custom-data.json +165 -19
- package/dist/vscode.html-custom-data.json +1023 -149
- package/dist/vue/index.d.ts +62 -0
- package/dist/vue/index.js +39 -8
- package/dist/vue/index.js.map +1 -1
- package/dist/web-types.json +3238 -836
- package/package.json +128 -3
- package/dist/chunks/defaults-Cpeg13O5.js +0 -68
- package/dist/chunks/index-TWJzttLX.js.map +0 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { css as d, nothing as c, html as p } from "lit";
|
|
2
|
+
import { property as i, state as m } from "lit/decorators.js";
|
|
3
|
+
import { K as h, d as g } from "../../../chunks/kt-element-DvWtPQ1Y.js";
|
|
4
|
+
import { b as y, a as u, c as f } from "../../../chunks/block-Cci-Kff_.js";
|
|
5
|
+
import { h as v } from "../../../chunks/slots-BPbIdxAJ.js";
|
|
6
|
+
import "../../overlays/kt-accordion/kt-accordion.js";
|
|
7
|
+
import "../../overlays/kt-collapsible/kt-collapsible.js";
|
|
8
|
+
var b = Object.defineProperty, e = (r, s, o, k) => {
|
|
9
|
+
for (var a = void 0, l = r.length - 1, n; l >= 0; l--)
|
|
10
|
+
(n = r[l]) && (a = n(s, o, a) || a);
|
|
11
|
+
return a && b(s, o, a), a;
|
|
12
|
+
};
|
|
13
|
+
class t extends h {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.heading = "", this.lead = "", this.align = "center", this.items = [], this.multiple = !1, this.openFirst = !1, this.layout = "stacked", this.headingLevel = 2, this.hasNote = !1, this.headingId = y("kt-faq");
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.styles = [
|
|
19
|
+
h.styles,
|
|
20
|
+
u,
|
|
21
|
+
d`
|
|
22
|
+
.head {
|
|
23
|
+
display: grid;
|
|
24
|
+
gap: var(--gap-card);
|
|
25
|
+
align-content: start;
|
|
26
|
+
}
|
|
27
|
+
:host([align='center']) .head {
|
|
28
|
+
justify-items: center;
|
|
29
|
+
text-align: center;
|
|
30
|
+
}
|
|
31
|
+
.note {
|
|
32
|
+
color: var(--text-muted);
|
|
33
|
+
font: var(--font-normal-regular);
|
|
34
|
+
}
|
|
35
|
+
.note.empty {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
.questions {
|
|
39
|
+
width: 100%;
|
|
40
|
+
max-width: 760px;
|
|
41
|
+
margin-inline: auto;
|
|
42
|
+
text-align: start;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Split: the head at the start, held while the questions scroll. */
|
|
46
|
+
@container (min-width: 880px) {
|
|
47
|
+
:host([layout='split']) .block {
|
|
48
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
|
|
49
|
+
align-items: start;
|
|
50
|
+
gap: calc(var(--gap-card) * 3);
|
|
51
|
+
}
|
|
52
|
+
:host([layout='split']) .head {
|
|
53
|
+
position: sticky;
|
|
54
|
+
top: var(--kt-faq-sticky-top, 24px);
|
|
55
|
+
justify-items: start;
|
|
56
|
+
text-align: start;
|
|
57
|
+
}
|
|
58
|
+
:host([layout='split']) .block-head {
|
|
59
|
+
justify-items: start;
|
|
60
|
+
margin-inline: 0;
|
|
61
|
+
text-align: start;
|
|
62
|
+
}
|
|
63
|
+
:host([layout='split']) .questions {
|
|
64
|
+
max-width: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
firstUpdated() {
|
|
71
|
+
this.readNote();
|
|
72
|
+
}
|
|
73
|
+
readNote() {
|
|
74
|
+
this.hasNote = v(this.shadowRoot?.querySelector('slot[name="note"]'));
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return p`<section
|
|
78
|
+
part="base"
|
|
79
|
+
class="block"
|
|
80
|
+
aria-labelledby=${this.heading ? this.headingId : c}
|
|
81
|
+
>
|
|
82
|
+
<div class="head">
|
|
83
|
+
${f({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}
|
|
84
|
+
<div class=${this.hasNote ? "note" : "note empty"}>
|
|
85
|
+
<slot name="note" @slotchange=${this.readNote}></slot>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<kt-accordion class="questions" ?multiple=${this.multiple}>
|
|
89
|
+
${this.items.map(
|
|
90
|
+
(s, o) => p`<kt-collapsible heading=${s.question} ?open=${this.openFirst && o === 0}
|
|
91
|
+
>${s.answer}</kt-collapsible
|
|
92
|
+
>`
|
|
93
|
+
)}
|
|
94
|
+
</kt-accordion>
|
|
95
|
+
</section>`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
e([
|
|
99
|
+
i({ type: String })
|
|
100
|
+
], t.prototype, "heading");
|
|
101
|
+
e([
|
|
102
|
+
i({ type: String })
|
|
103
|
+
], t.prototype, "lead");
|
|
104
|
+
e([
|
|
105
|
+
i({ type: String, reflect: !0 })
|
|
106
|
+
], t.prototype, "align");
|
|
107
|
+
e([
|
|
108
|
+
i({ attribute: !1 })
|
|
109
|
+
], t.prototype, "items");
|
|
110
|
+
e([
|
|
111
|
+
i({ type: Boolean, reflect: !0 })
|
|
112
|
+
], t.prototype, "multiple");
|
|
113
|
+
e([
|
|
114
|
+
i({ type: Boolean, attribute: "open-first" })
|
|
115
|
+
], t.prototype, "openFirst");
|
|
116
|
+
e([
|
|
117
|
+
i({ type: String, reflect: !0 })
|
|
118
|
+
], t.prototype, "layout");
|
|
119
|
+
e([
|
|
120
|
+
i({ type: Number, attribute: "heading-level" })
|
|
121
|
+
], t.prototype, "headingLevel");
|
|
122
|
+
e([
|
|
123
|
+
m()
|
|
124
|
+
], t.prototype, "hasNote");
|
|
125
|
+
g("kt-faq", t);
|
|
126
|
+
export {
|
|
127
|
+
t as KtFaq
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=kt-faq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kt-faq.js","sources":["../../../../src/components/blocks/kt-faq/kt-faq.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { blockHead, blockId, blockStyles } from '#internal/block';\nimport { hasAssignedContent } from '#internal/slots';\nimport '../../overlays/kt-accordion/kt-accordion.js';\nimport '../../overlays/kt-collapsible/kt-collapsible.js';\n\nexport interface KtFaqItem {\n readonly question: string;\n readonly answer: string;\n}\n\nexport type KtFaqLayout = 'stacked' | 'split';\n\n/**\n * The questions people ask before they sign up, answered: an accordion under a\n * heading, one answer open at a time.\n *\n * The questions are data: `faq.items = [{ question, answer }]`. `multiple`\n * lets each open on its own; `open-first` opens the first. `stacked` puts the\n * head over the questions; `split` beside them, where the block is wide\n * enough.\n *\n * @element kt-faq\n *\n * @slot note - Under the head: where to ask what is not answered.\n *\n * @csspart base - The section.\n *\n * @example\n * ```html\n * <kt-faq heading=\"Questions\" layout=\"split\">\n * <span slot=\"note\">Something else? <a href=\"/contact\">Ask us</a>.</span>\n * </kt-faq>\n * <script>\n * faq.items = [{ question: 'Can I cancel any time?', answer: 'Yes, from Settings.' }];\n * </script>\n * ```\n */\nexport class KtFaq extends KtElement {\n static override styles = [\n KtElement.styles,\n blockStyles,\n css`\n .head {\n display: grid;\n gap: var(--gap-card);\n align-content: start;\n }\n :host([align='center']) .head {\n justify-items: center;\n text-align: center;\n }\n .note {\n color: var(--text-muted);\n font: var(--font-normal-regular);\n }\n .note.empty {\n display: none;\n }\n .questions {\n width: 100%;\n max-width: 760px;\n margin-inline: auto;\n text-align: start;\n }\n\n /* Split: the head at the start, held while the questions scroll. */\n @container (min-width: 880px) {\n :host([layout='split']) .block {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);\n align-items: start;\n gap: calc(var(--gap-card) * 3);\n }\n :host([layout='split']) .head {\n position: sticky;\n top: var(--kt-faq-sticky-top, 24px);\n justify-items: start;\n text-align: start;\n }\n :host([layout='split']) .block-head {\n justify-items: start;\n margin-inline: 0;\n text-align: start;\n }\n :host([layout='split']) .questions {\n max-width: none;\n }\n }\n `,\n ];\n\n @property({ type: String })\n heading = '';\n\n @property({ type: String })\n lead = '';\n\n /** `center` or `start`: the head, when stacked. */\n @property({ type: String, reflect: true })\n align: 'center' | 'start' = 'center';\n\n /** The questions and their answers, in order. */\n @property({ attribute: false })\n items: readonly KtFaqItem[] = [];\n\n /** Each answer opens and closes on its own, rather than one at a time. */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /** Opens the first answer. */\n @property({ type: Boolean, attribute: 'open-first' })\n openFirst = false;\n\n /** `stacked`: the head over the questions. `split`: beside them, where there is room. */\n @property({ type: String, reflect: true })\n layout: KtFaqLayout = 'stacked';\n\n /** The heading's level. */\n @property({ type: Number, attribute: 'heading-level' })\n headingLevel = 2;\n\n @state() private hasNote = false;\n\n private readonly headingId = blockId('kt-faq');\n\n override firstUpdated(): void {\n this.readNote();\n }\n\n private readNote(): void {\n this.hasNote = hasAssignedContent(this.shadowRoot?.querySelector('slot[name=\"note\"]'));\n }\n\n override render(): TemplateResult {\n return html`<section\n part=\"base\"\n class=\"block\"\n aria-labelledby=${this.heading ? this.headingId : nothing}\n >\n <div class=\"head\">\n ${blockHead({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}\n <div class=${this.hasNote ? 'note' : 'note empty'}>\n <slot name=\"note\" @slotchange=${this.readNote}></slot>\n </div>\n </div>\n <kt-accordion class=\"questions\" ?multiple=${this.multiple}>\n ${this.items.map(\n (item, index) =>\n html`<kt-collapsible heading=${item.question} ?open=${this.openFirst && index === 0}\n >${item.answer}</kt-collapsible\n >`,\n )}\n </kt-accordion>\n </section>`;\n }\n}\n\ndefineElement('kt-faq', KtFaq);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kt-faq': KtFaq;\n }\n}\n"],"names":["KtFaq","KtElement","blockId","blockStyles","css","hasAssignedContent","html","nothing","blockHead","item","index","__decorateClass","property","state","defineElement"],"mappings":";;;;;;;;;;;;AAwCO,MAAMA,UAAcC,EAAU;AAAA,EAA9B,cAAA;AAAA,UAAA,GAAA,SAAA,GAsDL,KAAA,UAAU,IAGV,KAAA,OAAO,IAIP,KAAA,QAA4B,UAI5B,KAAA,QAA8B,CAAA,GAI9B,KAAA,WAAW,IAIX,KAAA,YAAY,IAIZ,KAAA,SAAsB,WAItB,KAAA,eAAe,GAEN,KAAQ,UAAU,IAE3B,KAAiB,YAAYC,EAAQ,QAAQ;AAAA,EAAA;AAAA,EApF7C,OAAA;AAAA,SAAgB,SAAS;AAAA,MACvBD,EAAU;AAAA,MACVE;AAAA,MACAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EA+CF;AAAA,EAoCS,eAAqB;AAC5B,SAAK,SAAA;AAAA,EACP;AAAA,EAEQ,WAAiB;AACvB,SAAK,UAAUC,EAAmB,KAAK,YAAY,cAAc,mBAAmB,CAAC;AAAA,EACvF;AAAA,EAES,SAAyB;AAChC,WAAOC;AAAA;AAAA;AAAA,wBAGa,KAAK,UAAU,KAAK,YAAYC,CAAO;AAAA;AAAA;AAAA,UAGrDC,EAAU,EAAE,OAAO,KAAK,SAAS,MAAM,KAAK,MAAM,OAAO,KAAK,cAAc,IAAI,KAAK,UAAA,CAAW,CAAC;AAAA,qBACtF,KAAK,UAAU,SAAS,YAAY;AAAA,0CACf,KAAK,QAAQ;AAAA;AAAA;AAAA,kDAGL,KAAK,QAAQ;AAAA,UACrD,KAAK,MAAM;AAAA,MACX,CAACC,GAAMC,MACLJ,4BAA+BG,EAAK,QAAQ,UAAU,KAAK,aAAaC,MAAU,CAAC;AAAA,iBAC9ED,EAAK,MAAM;AAAA;AAAA,IAAA,CAEnB;AAAA;AAAA;AAAA,EAGP;AACF;AA/DEE,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GArDfZ,EAsDX,WAAA,SAAA;AAGAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAxDfZ,EAyDX,WAAA,MAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA5D9BZ,EA6DX,WAAA,OAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GAhEnBZ,EAiEX,WAAA,OAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GApE/BZ,EAqEX,WAAA,UAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,cAAc;AAAA,GAxEzCZ,EAyEX,WAAA,WAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA5E9BZ,EA6EX,WAAA,QAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,GAhF3CZ,EAiFX,WAAA,cAAA;AAEiBW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAnFIb,EAmFM,WAAA,SAAA;AAoCnBc,EAAc,UAAUd,CAAK;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { KtElement } from '#internal/kt-element';
|
|
3
|
+
import '../../core/kt-icon/kt-icon.js';
|
|
4
|
+
export interface KtFeature {
|
|
5
|
+
/** An icon's name, drawn in a tinted square over the title. */
|
|
6
|
+
readonly icon?: string;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
/** Makes the title a link: where to read more. */
|
|
10
|
+
readonly href?: string;
|
|
11
|
+
}
|
|
12
|
+
export type KtFeatureGridVariant = 'plain' | 'card';
|
|
13
|
+
/**
|
|
14
|
+
* What the product does, a feature at a time: an icon, a title and a line,
|
|
15
|
+
* in a grid.
|
|
16
|
+
*
|
|
17
|
+
* The features are data: `grid.features = [{ icon, title, description, href }]`,
|
|
18
|
+
* drawn as a list. `columns` sets how many per row where there is room — a
|
|
19
|
+
* narrow grid is one column; `card` puts each feature on a card.
|
|
20
|
+
*
|
|
21
|
+
* @element kt-feature-grid
|
|
22
|
+
*
|
|
23
|
+
* @csspart base - The section.
|
|
24
|
+
* @csspart list - The `<ul>`.
|
|
25
|
+
* @csspart feature - One feature.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```html
|
|
29
|
+
* <kt-feature-grid heading="Why teams switch" lead="Less chasing, more paid."></kt-feature-grid>
|
|
30
|
+
* <script>
|
|
31
|
+
* grid.features = [
|
|
32
|
+
* { icon: 'send', title: 'Sent in a second', description: 'From the quote, in one click.' },
|
|
33
|
+
* ];
|
|
34
|
+
* </script>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class KtFeatureGrid extends KtElement {
|
|
38
|
+
static styles: import("lit").CSSResultGroup[];
|
|
39
|
+
heading: string;
|
|
40
|
+
lead: string;
|
|
41
|
+
/** `center` or `start`: the head over the grid. */
|
|
42
|
+
align: 'center' | 'start';
|
|
43
|
+
/** The features, drawn in order. */
|
|
44
|
+
features: readonly KtFeature[];
|
|
45
|
+
/** Features per row, where there is room: 2, 3 or 4. */
|
|
46
|
+
columns: 2 | 3 | 4;
|
|
47
|
+
/** `plain`, or `card`: each feature on a card. */
|
|
48
|
+
variant: KtFeatureGridVariant;
|
|
49
|
+
/** The heading's level; the features' titles sit one under. */
|
|
50
|
+
headingLevel: number;
|
|
51
|
+
private readonly headingId;
|
|
52
|
+
private feature;
|
|
53
|
+
render(): TemplateResult;
|
|
54
|
+
}
|
|
55
|
+
declare global {
|
|
56
|
+
interface HTMLElementTagNameMap {
|
|
57
|
+
'kt-feature-grid': KtFeatureGrid;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { css as h, html as o, nothing as c } from "lit";
|
|
2
|
+
import { property as r } from "lit/decorators.js";
|
|
3
|
+
import { K as p, d as u } from "../../../chunks/kt-element-DvWtPQ1Y.js";
|
|
4
|
+
import { b as m, a as f, c as g } from "../../../chunks/block-Cci-Kff_.js";
|
|
5
|
+
import { h as v } from "../../../chunks/heading-DsnZsfg-.js";
|
|
6
|
+
import "../../core/kt-icon/kt-icon.js";
|
|
7
|
+
var b = Object.defineProperty, a = (n, t, s, y) => {
|
|
8
|
+
for (var i = void 0, l = n.length - 1, d; l >= 0; l--)
|
|
9
|
+
(d = n[l]) && (i = d(t, s, i) || i);
|
|
10
|
+
return i && b(t, s, i), i;
|
|
11
|
+
};
|
|
12
|
+
class e extends p {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.heading = "", this.lead = "", this.align = "center", this.features = [], this.columns = 3, this.variant = "plain", this.headingLevel = 2, this.headingId = m("kt-feature-grid");
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.styles = [
|
|
18
|
+
p.styles,
|
|
19
|
+
f,
|
|
20
|
+
h`
|
|
21
|
+
:host {
|
|
22
|
+
--kt-feature-columns: 3;
|
|
23
|
+
}
|
|
24
|
+
:host([columns='2']) {
|
|
25
|
+
--kt-feature-columns: 2;
|
|
26
|
+
}
|
|
27
|
+
:host([columns='4']) {
|
|
28
|
+
--kt-feature-columns: 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.list {
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: repeat(var(--kt-feature-columns), minmax(0, 1fr));
|
|
34
|
+
gap: calc(var(--gap-card) * 2) calc(var(--gap-card) * 1.5);
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
list-style: none;
|
|
38
|
+
}
|
|
39
|
+
/* Two columns before one: four or three would be cramped. */
|
|
40
|
+
@container (max-width: 760px) {
|
|
41
|
+
.list {
|
|
42
|
+
grid-template-columns: repeat(min(2, var(--kt-feature-columns)), minmax(0, 1fr));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
@container (max-width: 480px) {
|
|
46
|
+
.list {
|
|
47
|
+
grid-template-columns: minmax(0, 1fr);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.feature {
|
|
52
|
+
position: relative;
|
|
53
|
+
display: grid;
|
|
54
|
+
align-content: start;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
text-align: start;
|
|
58
|
+
}
|
|
59
|
+
:host([variant='card']) .feature {
|
|
60
|
+
padding: var(--padding-card);
|
|
61
|
+
border: var(--border-width) solid var(--border-subtle);
|
|
62
|
+
border-radius: var(--border-radius-card);
|
|
63
|
+
transition: border-color var(--duration-instant);
|
|
64
|
+
}
|
|
65
|
+
:host([variant='card']) .feature:has(a):hover {
|
|
66
|
+
border-color: var(--color-primary-base);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon {
|
|
70
|
+
display: grid;
|
|
71
|
+
place-items: center;
|
|
72
|
+
width: 40px;
|
|
73
|
+
height: 40px;
|
|
74
|
+
margin-bottom: 4px;
|
|
75
|
+
color: var(--color-primary-text);
|
|
76
|
+
background-color: var(--color-primary-soft);
|
|
77
|
+
border-radius: var(--border-radius);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.title {
|
|
81
|
+
margin: 0;
|
|
82
|
+
color: var(--text-body);
|
|
83
|
+
font: var(--font-title-h6);
|
|
84
|
+
}
|
|
85
|
+
.title a {
|
|
86
|
+
color: inherit;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
}
|
|
89
|
+
/* The whole feature answers the link. */
|
|
90
|
+
.title a::after {
|
|
91
|
+
position: absolute;
|
|
92
|
+
inset: 0;
|
|
93
|
+
border-radius: inherit;
|
|
94
|
+
content: '';
|
|
95
|
+
}
|
|
96
|
+
.title a:hover {
|
|
97
|
+
color: var(--color-primary-text);
|
|
98
|
+
}
|
|
99
|
+
.feature:has(a:focus-visible) {
|
|
100
|
+
border-radius: var(--border-radius-card);
|
|
101
|
+
outline: var(--outline-width) solid var(--color-primary-base);
|
|
102
|
+
outline-offset: 4px;
|
|
103
|
+
}
|
|
104
|
+
.title a:focus-visible {
|
|
105
|
+
outline: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.description {
|
|
109
|
+
margin: 0;
|
|
110
|
+
color: var(--text-muted);
|
|
111
|
+
font: var(--font-normal-regular);
|
|
112
|
+
line-height: 1.6;
|
|
113
|
+
text-wrap: pretty;
|
|
114
|
+
}
|
|
115
|
+
`
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
feature(t) {
|
|
119
|
+
const s = t.href ? o`<a href=${t.href}>${t.title}</a>` : o`${t.title}`;
|
|
120
|
+
return o`<li part="feature" class="feature">
|
|
121
|
+
${t.icon ? o`<span class="icon" aria-hidden="true"
|
|
122
|
+
><kt-icon name=${t.icon} size="20"></kt-icon
|
|
123
|
+
></span>` : c}
|
|
124
|
+
${v(this.headingLevel + 1, s, "title", 3)}
|
|
125
|
+
<p class="description">${t.description}</p>
|
|
126
|
+
</li>`;
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
return o`<section
|
|
130
|
+
part="base"
|
|
131
|
+
class="block"
|
|
132
|
+
aria-labelledby=${this.heading ? this.headingId : c}
|
|
133
|
+
>
|
|
134
|
+
${g({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}
|
|
135
|
+
<ul part="list" class="list" role="list">
|
|
136
|
+
${this.features.map((t) => this.feature(t))}
|
|
137
|
+
</ul>
|
|
138
|
+
</section>`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
a([
|
|
142
|
+
r({ type: String })
|
|
143
|
+
], e.prototype, "heading");
|
|
144
|
+
a([
|
|
145
|
+
r({ type: String })
|
|
146
|
+
], e.prototype, "lead");
|
|
147
|
+
a([
|
|
148
|
+
r({ type: String, reflect: !0 })
|
|
149
|
+
], e.prototype, "align");
|
|
150
|
+
a([
|
|
151
|
+
r({ attribute: !1 })
|
|
152
|
+
], e.prototype, "features");
|
|
153
|
+
a([
|
|
154
|
+
r({ type: Number, reflect: !0 })
|
|
155
|
+
], e.prototype, "columns");
|
|
156
|
+
a([
|
|
157
|
+
r({ type: String, reflect: !0 })
|
|
158
|
+
], e.prototype, "variant");
|
|
159
|
+
a([
|
|
160
|
+
r({ type: Number, attribute: "heading-level" })
|
|
161
|
+
], e.prototype, "headingLevel");
|
|
162
|
+
u("kt-feature-grid", e);
|
|
163
|
+
export {
|
|
164
|
+
e as KtFeatureGrid
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=kt-feature-grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kt-feature-grid.js","sources":["../../../../src/components/blocks/kt-feature-grid/kt-feature-grid.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { blockHead, blockId, blockStyles } from '#internal/block';\nimport { heading } from '#internal/heading';\nimport '../../core/kt-icon/kt-icon.js';\n\nexport interface KtFeature {\n /** An icon's name, drawn in a tinted square over the title. */\n readonly icon?: string;\n readonly title: string;\n readonly description: string;\n /** Makes the title a link: where to read more. */\n readonly href?: string;\n}\n\nexport type KtFeatureGridVariant = 'plain' | 'card';\n\n/**\n * What the product does, a feature at a time: an icon, a title and a line,\n * in a grid.\n *\n * The features are data: `grid.features = [{ icon, title, description, href }]`,\n * drawn as a list. `columns` sets how many per row where there is room — a\n * narrow grid is one column; `card` puts each feature on a card.\n *\n * @element kt-feature-grid\n *\n * @csspart base - The section.\n * @csspart list - The `<ul>`.\n * @csspart feature - One feature.\n *\n * @example\n * ```html\n * <kt-feature-grid heading=\"Why teams switch\" lead=\"Less chasing, more paid.\"></kt-feature-grid>\n * <script>\n * grid.features = [\n * { icon: 'send', title: 'Sent in a second', description: 'From the quote, in one click.' },\n * ];\n * </script>\n * ```\n */\nexport class KtFeatureGrid extends KtElement {\n static override styles = [\n KtElement.styles,\n blockStyles,\n css`\n :host {\n --kt-feature-columns: 3;\n }\n :host([columns='2']) {\n --kt-feature-columns: 2;\n }\n :host([columns='4']) {\n --kt-feature-columns: 4;\n }\n\n .list {\n display: grid;\n grid-template-columns: repeat(var(--kt-feature-columns), minmax(0, 1fr));\n gap: calc(var(--gap-card) * 2) calc(var(--gap-card) * 1.5);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n /* Two columns before one: four or three would be cramped. */\n @container (max-width: 760px) {\n .list {\n grid-template-columns: repeat(min(2, var(--kt-feature-columns)), minmax(0, 1fr));\n }\n }\n @container (max-width: 480px) {\n .list {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n\n .feature {\n position: relative;\n display: grid;\n align-content: start;\n gap: 8px;\n min-width: 0;\n text-align: start;\n }\n :host([variant='card']) .feature {\n padding: var(--padding-card);\n border: var(--border-width) solid var(--border-subtle);\n border-radius: var(--border-radius-card);\n transition: border-color var(--duration-instant);\n }\n :host([variant='card']) .feature:has(a):hover {\n border-color: var(--color-primary-base);\n }\n\n .icon {\n display: grid;\n place-items: center;\n width: 40px;\n height: 40px;\n margin-bottom: 4px;\n color: var(--color-primary-text);\n background-color: var(--color-primary-soft);\n border-radius: var(--border-radius);\n }\n\n .title {\n margin: 0;\n color: var(--text-body);\n font: var(--font-title-h6);\n }\n .title a {\n color: inherit;\n text-decoration: none;\n }\n /* The whole feature answers the link. */\n .title a::after {\n position: absolute;\n inset: 0;\n border-radius: inherit;\n content: '';\n }\n .title a:hover {\n color: var(--color-primary-text);\n }\n .feature:has(a:focus-visible) {\n border-radius: var(--border-radius-card);\n outline: var(--outline-width) solid var(--color-primary-base);\n outline-offset: 4px;\n }\n .title a:focus-visible {\n outline: none;\n }\n\n .description {\n margin: 0;\n color: var(--text-muted);\n font: var(--font-normal-regular);\n line-height: 1.6;\n text-wrap: pretty;\n }\n `,\n ];\n\n @property({ type: String })\n heading = '';\n\n @property({ type: String })\n lead = '';\n\n /** `center` or `start`: the head over the grid. */\n @property({ type: String, reflect: true })\n align: 'center' | 'start' = 'center';\n\n /** The features, drawn in order. */\n @property({ attribute: false })\n features: readonly KtFeature[] = [];\n\n /** Features per row, where there is room: 2, 3 or 4. */\n @property({ type: Number, reflect: true })\n columns: 2 | 3 | 4 = 3;\n\n /** `plain`, or `card`: each feature on a card. */\n @property({ type: String, reflect: true })\n variant: KtFeatureGridVariant = 'plain';\n\n /** The heading's level; the features' titles sit one under. */\n @property({ type: Number, attribute: 'heading-level' })\n headingLevel = 2;\n\n private readonly headingId = blockId('kt-feature-grid');\n\n private feature(feature: KtFeature): TemplateResult {\n const title = feature.href\n ? html`<a href=${feature.href}>${feature.title}</a>`\n : html`${feature.title}`;\n return html`<li part=\"feature\" class=\"feature\">\n ${\n feature.icon\n ? html`<span class=\"icon\" aria-hidden=\"true\"\n ><kt-icon name=${feature.icon} size=\"20\"></kt-icon\n ></span>`\n : nothing\n }\n ${heading(this.headingLevel + 1, title, 'title', 3)}\n <p class=\"description\">${feature.description}</p>\n </li>`;\n }\n\n override render(): TemplateResult {\n return html`<section\n part=\"base\"\n class=\"block\"\n aria-labelledby=${this.heading ? this.headingId : nothing}\n >\n ${blockHead({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}\n <ul part=\"list\" class=\"list\" role=\"list\">\n ${this.features.map((feature) => this.feature(feature))}\n </ul>\n </section>`;\n }\n}\n\ndefineElement('kt-feature-grid', KtFeatureGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kt-feature-grid': KtFeatureGrid;\n }\n}\n"],"names":["KtFeatureGrid","KtElement","blockId","blockStyles","css","feature","title","html","nothing","heading","blockHead","__decorateClass","property","defineElement"],"mappings":";;;;;;;;;;;AA0CO,MAAMA,UAAsBC,EAAU;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA,GAuGL,KAAA,UAAU,IAGV,KAAA,OAAO,IAIP,KAAA,QAA4B,UAI5B,KAAA,WAAiC,CAAA,GAIjC,KAAA,UAAqB,GAIrB,KAAA,UAAgC,SAIhC,KAAA,eAAe,GAEf,KAAiB,YAAYC,EAAQ,iBAAiB;AAAA,EAAA;AAAA,EA/HtD,OAAA;AAAA,SAAgB,SAAS;AAAA,MACvBD,EAAU;AAAA,MACVE;AAAA,MACAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EAgGF;AAAA,EA8BQ,QAAQC,GAAoC;AAClD,UAAMC,IAAQD,EAAQ,OAClBE,YAAeF,EAAQ,IAAI,IAAIA,EAAQ,KAAK,SAC5CE,IAAOF,EAAQ,KAAK;AACxB,WAAOE;AAAA,QAEHF,EAAQ,OACJE;AAAA,+BACmBF,EAAQ,IAAI;AAAA,wBAE/BG,CACN;AAAA,QACEC,EAAQ,KAAK,eAAe,GAAGH,GAAO,SAAS,CAAC,CAAC;AAAA,+BAC1BD,EAAQ,WAAW;AAAA;AAAA,EAEhD;AAAA,EAES,SAAyB;AAChC,WAAOE;AAAA;AAAA;AAAA,wBAGa,KAAK,UAAU,KAAK,YAAYC,CAAO;AAAA;AAAA,QAEvDE,EAAU,EAAE,OAAO,KAAK,SAAS,MAAM,KAAK,MAAM,OAAO,KAAK,cAAc,IAAI,KAAK,UAAA,CAAW,CAAC;AAAA;AAAA,UAE/F,KAAK,SAAS,IAAI,CAACL,MAAY,KAAK,QAAQA,CAAO,CAAC,CAAC;AAAA;AAAA;AAAA,EAG7D;AACF;AAxDEM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAtGfZ,EAuGX,WAAA,SAAA;AAGAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAzGfZ,EA0GX,WAAA,MAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA7G9BZ,EA8GX,WAAA,OAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GAjHnBZ,EAkHX,WAAA,UAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArH9BZ,EAsHX,WAAA,SAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAzH9BZ,EA0HX,WAAA,SAAA;AAIAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,GA7H3CZ,EA8HX,WAAA,cAAA;AAmCFa,EAAc,mBAAmBb,CAAa;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { KtElement } from '#internal/kt-element';
|
|
3
|
+
export type KtHeroLayout = 'stacked' | 'split';
|
|
4
|
+
/**
|
|
5
|
+
* The top of a page: what the product is, in a heading and a line, and the
|
|
6
|
+
* way in.
|
|
7
|
+
*
|
|
8
|
+
* `stacked`, the default, puts the media under the words — a screenshot, a
|
|
9
|
+
* live demo; `split` sets it beside them once the hero is wide enough.
|
|
10
|
+
* `align` centres the words or keeps them at the start.
|
|
11
|
+
*
|
|
12
|
+
* @element kt-hero
|
|
13
|
+
*
|
|
14
|
+
* @slot announcement - Above the heading: what is new, as a link.
|
|
15
|
+
* @slot actions - Under the lead: the buttons.
|
|
16
|
+
* @slot note - Under the actions: what it costs, what it needs.
|
|
17
|
+
* @slot media - A screenshot, an illustration, a live demo.
|
|
18
|
+
*
|
|
19
|
+
* @csspart base - The section.
|
|
20
|
+
* @csspart media - The media's box.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <kt-hero heading="Invoices that pay themselves" lead="Send, chase and reconcile, in one place.">
|
|
25
|
+
* <kt-button slot="actions" size="large">Start free</kt-button>
|
|
26
|
+
* <img slot="media" src="/screenshot.png" alt="The invoices screen" />
|
|
27
|
+
* </kt-hero>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class KtHero extends KtElement {
|
|
31
|
+
static styles: import("lit").CSSResultGroup[];
|
|
32
|
+
heading: string;
|
|
33
|
+
lead: string;
|
|
34
|
+
/** `center` or `start`. */
|
|
35
|
+
align: 'center' | 'start';
|
|
36
|
+
/** `stacked`: the media under the words. `split`: beside them, where there is room. */
|
|
37
|
+
layout: KtHeroLayout;
|
|
38
|
+
/** The heading's level: 1, since a hero opens its page. */
|
|
39
|
+
headingLevel: number;
|
|
40
|
+
private filled;
|
|
41
|
+
private readonly headingId;
|
|
42
|
+
firstUpdated(): void;
|
|
43
|
+
private readSlots;
|
|
44
|
+
private region;
|
|
45
|
+
render(): TemplateResult;
|
|
46
|
+
}
|
|
47
|
+
declare global {
|
|
48
|
+
interface HTMLElementTagNameMap {
|
|
49
|
+
'kt-hero': KtHero;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { css as p, html as n } from "lit";
|
|
2
|
+
import { property as r, state as c } from "lit/decorators.js";
|
|
3
|
+
import { K as h, d as m } from "../../../chunks/kt-element-DvWtPQ1Y.js";
|
|
4
|
+
import { b as g, a as f, c as y } from "../../../chunks/block-Cci-Kff_.js";
|
|
5
|
+
import { h as u } from "../../../chunks/slots-BPbIdxAJ.js";
|
|
6
|
+
var v = Object.defineProperty, s = (o, t, e, b) => {
|
|
7
|
+
for (var a = void 0, l = o.length - 1, d; l >= 0; l--)
|
|
8
|
+
(d = o[l]) && (a = d(t, e, a) || a);
|
|
9
|
+
return a && v(t, e, a), a;
|
|
10
|
+
};
|
|
11
|
+
class i extends h {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.heading = "", this.lead = "", this.align = "center", this.layout = "stacked", this.headingLevel = 1, this.filled = /* @__PURE__ */ new Set(), this.headingId = g("kt-hero"), this.readSlots = () => {
|
|
14
|
+
const t = /* @__PURE__ */ new Set();
|
|
15
|
+
for (const e of this.shadowRoot?.querySelectorAll("slot") ?? [])
|
|
16
|
+
u(e) && t.add(e.name);
|
|
17
|
+
this.filled = t;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.styles = [
|
|
22
|
+
h.styles,
|
|
23
|
+
f,
|
|
24
|
+
p`
|
|
25
|
+
.hero {
|
|
26
|
+
display: grid;
|
|
27
|
+
gap: calc(var(--gap-card) * 2.5);
|
|
28
|
+
padding-block: var(--kt-block-padding, calc(var(--padding-card) * 4));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.words {
|
|
32
|
+
display: grid;
|
|
33
|
+
gap: var(--gap-card);
|
|
34
|
+
}
|
|
35
|
+
:host([align='center']) .words {
|
|
36
|
+
justify-items: center;
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
|
39
|
+
.block-head {
|
|
40
|
+
max-width: 820px;
|
|
41
|
+
}
|
|
42
|
+
.block-heading {
|
|
43
|
+
font: 600 clamp(36px, 6cqi, 72px) / 1.04 var(--font-family-display);
|
|
44
|
+
letter-spacing: -0.035em;
|
|
45
|
+
}
|
|
46
|
+
.block-lead {
|
|
47
|
+
font-size: calc(19px * var(--text-scale, 1));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.actions,
|
|
51
|
+
.announcement {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
gap: var(--gap-button);
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
:host([align='center']) .actions {
|
|
58
|
+
justify-content: center;
|
|
59
|
+
}
|
|
60
|
+
.note {
|
|
61
|
+
color: var(--text-muted);
|
|
62
|
+
font: var(--font-normal-regular);
|
|
63
|
+
}
|
|
64
|
+
.empty {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.media {
|
|
69
|
+
min-width: 0;
|
|
70
|
+
}
|
|
71
|
+
.media ::slotted(img) {
|
|
72
|
+
display: block;
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
height: auto;
|
|
75
|
+
border-radius: var(--border-radius-card);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Split: the words and the media side by side, where they fit. */
|
|
79
|
+
@container (min-width: 880px) {
|
|
80
|
+
:host([layout='split']) .hero {
|
|
81
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
|
|
82
|
+
align-items: center;
|
|
83
|
+
}
|
|
84
|
+
:host([layout='split']) .words {
|
|
85
|
+
justify-items: start;
|
|
86
|
+
text-align: start;
|
|
87
|
+
}
|
|
88
|
+
:host([layout='split']) .actions {
|
|
89
|
+
justify-content: flex-start;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
firstUpdated() {
|
|
96
|
+
this.readSlots();
|
|
97
|
+
}
|
|
98
|
+
region(t, e = t) {
|
|
99
|
+
return n`<div class=${this.filled.has(t) ? e : `${e} empty`}>
|
|
100
|
+
<slot name=${t} @slotchange=${this.readSlots}></slot>
|
|
101
|
+
</div>`;
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
return n`<section part="base" class="hero" aria-labelledby=${this.headingId}>
|
|
105
|
+
<div class="words">
|
|
106
|
+
${this.region("announcement")}
|
|
107
|
+
${y({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}
|
|
108
|
+
${this.region("actions")} ${this.region("note")}
|
|
109
|
+
</div>
|
|
110
|
+
<div part="media" class=${this.filled.has("media") ? "media" : "media empty"}>
|
|
111
|
+
<slot name="media" @slotchange=${this.readSlots}></slot>
|
|
112
|
+
</div>
|
|
113
|
+
</section>`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
s([
|
|
117
|
+
r({ type: String })
|
|
118
|
+
], i.prototype, "heading");
|
|
119
|
+
s([
|
|
120
|
+
r({ type: String })
|
|
121
|
+
], i.prototype, "lead");
|
|
122
|
+
s([
|
|
123
|
+
r({ type: String, reflect: !0 })
|
|
124
|
+
], i.prototype, "align");
|
|
125
|
+
s([
|
|
126
|
+
r({ type: String, reflect: !0 })
|
|
127
|
+
], i.prototype, "layout");
|
|
128
|
+
s([
|
|
129
|
+
r({ type: Number, attribute: "heading-level" })
|
|
130
|
+
], i.prototype, "headingLevel");
|
|
131
|
+
s([
|
|
132
|
+
c()
|
|
133
|
+
], i.prototype, "filled");
|
|
134
|
+
m("kt-hero", i);
|
|
135
|
+
export {
|
|
136
|
+
i as KtHero
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=kt-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kt-hero.js","sources":["../../../../src/components/blocks/kt-hero/kt-hero.ts"],"sourcesContent":["import { css, html, type TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { KtElement, defineElement } from '#internal/kt-element';\nimport { blockHead, blockId, blockStyles } from '#internal/block';\nimport { hasAssignedContent } from '#internal/slots';\n\nexport type KtHeroLayout = 'stacked' | 'split';\n\n/**\n * The top of a page: what the product is, in a heading and a line, and the\n * way in.\n *\n * `stacked`, the default, puts the media under the words — a screenshot, a\n * live demo; `split` sets it beside them once the hero is wide enough.\n * `align` centres the words or keeps them at the start.\n *\n * @element kt-hero\n *\n * @slot announcement - Above the heading: what is new, as a link.\n * @slot actions - Under the lead: the buttons.\n * @slot note - Under the actions: what it costs, what it needs.\n * @slot media - A screenshot, an illustration, a live demo.\n *\n * @csspart base - The section.\n * @csspart media - The media's box.\n *\n * @example\n * ```html\n * <kt-hero heading=\"Invoices that pay themselves\" lead=\"Send, chase and reconcile, in one place.\">\n * <kt-button slot=\"actions\" size=\"large\">Start free</kt-button>\n * <img slot=\"media\" src=\"/screenshot.png\" alt=\"The invoices screen\" />\n * </kt-hero>\n * ```\n */\nexport class KtHero extends KtElement {\n static override styles = [\n KtElement.styles,\n blockStyles,\n css`\n .hero {\n display: grid;\n gap: calc(var(--gap-card) * 2.5);\n padding-block: var(--kt-block-padding, calc(var(--padding-card) * 4));\n }\n\n .words {\n display: grid;\n gap: var(--gap-card);\n }\n :host([align='center']) .words {\n justify-items: center;\n text-align: center;\n }\n .block-head {\n max-width: 820px;\n }\n .block-heading {\n font: 600 clamp(36px, 6cqi, 72px) / 1.04 var(--font-family-display);\n letter-spacing: -0.035em;\n }\n .block-lead {\n font-size: calc(19px * var(--text-scale, 1));\n }\n\n .actions,\n .announcement {\n display: flex;\n flex-wrap: wrap;\n gap: var(--gap-button);\n align-items: center;\n }\n :host([align='center']) .actions {\n justify-content: center;\n }\n .note {\n color: var(--text-muted);\n font: var(--font-normal-regular);\n }\n .empty {\n display: none;\n }\n\n .media {\n min-width: 0;\n }\n .media ::slotted(img) {\n display: block;\n max-width: 100%;\n height: auto;\n border-radius: var(--border-radius-card);\n }\n\n /* Split: the words and the media side by side, where they fit. */\n @container (min-width: 880px) {\n :host([layout='split']) .hero {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);\n align-items: center;\n }\n :host([layout='split']) .words {\n justify-items: start;\n text-align: start;\n }\n :host([layout='split']) .actions {\n justify-content: flex-start;\n }\n }\n `,\n ];\n\n @property({ type: String })\n heading = '';\n\n @property({ type: String })\n lead = '';\n\n /** `center` or `start`. */\n @property({ type: String, reflect: true })\n align: 'center' | 'start' = 'center';\n\n /** `stacked`: the media under the words. `split`: beside them, where there is room. */\n @property({ type: String, reflect: true })\n layout: KtHeroLayout = 'stacked';\n\n /** The heading's level: 1, since a hero opens its page. */\n @property({ type: Number, attribute: 'heading-level' })\n headingLevel = 1;\n\n @state() private filled = new Set<string>();\n\n private readonly headingId = blockId('kt-hero');\n\n override firstUpdated(): void {\n this.readSlots();\n }\n\n private readSlots = (): void => {\n const filled = new Set<string>();\n for (const slot of this.shadowRoot?.querySelectorAll('slot') ?? []) {\n if (hasAssignedContent(slot)) filled.add(slot.name);\n }\n this.filled = filled;\n };\n\n private region(name: string, className = name): TemplateResult {\n return html`<div class=${this.filled.has(name) ? className : `${className} empty`}>\n <slot name=${name} @slotchange=${this.readSlots}></slot>\n </div>`;\n }\n\n override render(): TemplateResult {\n return html`<section part=\"base\" class=\"hero\" aria-labelledby=${this.headingId}>\n <div class=\"words\">\n ${this.region('announcement')}\n ${blockHead({ title: this.heading, lead: this.lead, level: this.headingLevel, id: this.headingId })}\n ${this.region('actions')} ${this.region('note')}\n </div>\n <div part=\"media\" class=${this.filled.has('media') ? 'media' : 'media empty'}>\n <slot name=\"media\" @slotchange=${this.readSlots}></slot>\n </div>\n </section>`;\n }\n}\n\ndefineElement('kt-hero', KtHero);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kt-hero': KtHero;\n }\n}\n"],"names":["KtHero","KtElement","blockId","filled","slot","hasAssignedContent","blockStyles","css","name","className","html","blockHead","__decorateClass","property","state","defineElement"],"mappings":";;;;;;;;;;AAkCO,MAAMA,UAAeC,EAAU;AAAA,EAA/B,cAAA;AAAA,UAAA,GAAA,SAAA,GA4EL,KAAA,UAAU,IAGV,KAAA,OAAO,IAIP,KAAA,QAA4B,UAI5B,KAAA,SAAuB,WAIvB,KAAA,eAAe,GAEN,KAAQ,6BAAa,IAAA,GAE9B,KAAiB,YAAYC,EAAQ,SAAS,GAM9C,KAAQ,YAAY,MAAY;AAC9B,YAAMC,wBAAa,IAAA;AACnB,iBAAWC,KAAQ,KAAK,YAAY,iBAAiB,MAAM,KAAK;AAC9D,QAAIC,EAAmBD,CAAI,KAAGD,EAAO,IAAIC,EAAK,IAAI;AAEpD,WAAK,SAASD;AAAA,IAChB;AAAA,EAAA;AAAA,EA1GA,OAAA;AAAA,SAAgB,SAAS;AAAA,MACvBF,EAAU;AAAA,MACVK;AAAA,MACAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EAqEF;AAAA,EAwBS,eAAqB;AAC5B,SAAK,UAAA;AAAA,EACP;AAAA,EAUQ,OAAOC,GAAcC,IAAYD,GAAsB;AAC7D,WAAOE,eAAkB,KAAK,OAAO,IAAIF,CAAI,IAAIC,IAAY,GAAGA,CAAS,QAAQ;AAAA,mBAClED,CAAI,gBAAgB,KAAK,SAAS;AAAA;AAAA,EAEnD;AAAA,EAES,SAAyB;AAChC,WAAOE,sDAAyD,KAAK,SAAS;AAAA;AAAA,UAExE,KAAK,OAAO,cAAc,CAAC;AAAA,UAC3BC,EAAU,EAAE,OAAO,KAAK,SAAS,MAAM,KAAK,MAAM,OAAO,KAAK,cAAc,IAAI,KAAK,UAAA,CAAW,CAAC;AAAA,UACjG,KAAK,OAAO,SAAS,CAAC,IAAI,KAAK,OAAO,MAAM,CAAC;AAAA;AAAA,gCAEvB,KAAK,OAAO,IAAI,OAAO,IAAI,UAAU,aAAa;AAAA,yCACzC,KAAK,SAAS;AAAA;AAAA;AAAA,EAGrD;AACF;AAnDEC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA3Efb,EA4EX,WAAA,SAAA;AAGAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA9Efb,EA+EX,WAAA,MAAA;AAIAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAlF9Bb,EAmFX,WAAA,OAAA;AAIAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAtF9Bb,EAuFX,WAAA,QAAA;AAIAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,GA1F3Cb,EA2FX,WAAA,cAAA;AAEiBY,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA7FId,EA6FM,WAAA,QAAA;AAoCnBe,EAAc,WAAWf,CAAM;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { KtElement } from '#internal/kt-element';
|
|
3
|
+
/**
|
|
4
|
+
* Who uses it, in their logos: a line of marks under a caption — "Trusted by
|
|
5
|
+
* finance teams at".
|
|
6
|
+
*
|
|
7
|
+
* The logos are the default slot: images or inline SVGs, each with its
|
|
8
|
+
* company's name as `alt` or `aria-label`. They are drawn at one height, grey
|
|
9
|
+
* until hovered, so no brand shouts over another; `colour` keeps their
|
|
10
|
+
* colours.
|
|
11
|
+
*
|
|
12
|
+
* @element kt-logo-cloud
|
|
13
|
+
*
|
|
14
|
+
* @slot - The logos.
|
|
15
|
+
*
|
|
16
|
+
* @csspart base - The section.
|
|
17
|
+
* @csspart logos - The row of logos.
|
|
18
|
+
*
|
|
19
|
+
* @cssproperty --kt-logo-height - The logos' height. 28px.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <kt-logo-cloud heading="Trusted by finance teams at">
|
|
24
|
+
* <img src="/logos/northwind.svg" alt="Northwind" />
|
|
25
|
+
* <img src="/logos/kiln.svg" alt="Kiln" />
|
|
26
|
+
* </kt-logo-cloud>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class KtLogoCloud extends KtElement {
|
|
30
|
+
static styles: import("lit").CSSResultGroup[];
|
|
31
|
+
/** The caption over the logos: "Trusted by finance teams at". */
|
|
32
|
+
heading: string;
|
|
33
|
+
/** `center` or `start`. */
|
|
34
|
+
align: 'center' | 'start';
|
|
35
|
+
/** Keeps the logos' colours, rather than grey until hovered. */
|
|
36
|
+
colour: boolean;
|
|
37
|
+
/** The caption's level: a heading, set small. */
|
|
38
|
+
headingLevel: number;
|
|
39
|
+
private readonly headingId;
|
|
40
|
+
render(): TemplateResult;
|
|
41
|
+
}
|
|
42
|
+
declare global {
|
|
43
|
+
interface HTMLElementTagNameMap {
|
|
44
|
+
'kt-logo-cloud': KtLogoCloud;
|
|
45
|
+
}
|
|
46
|
+
}
|