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,50 @@
|
|
|
1
|
+
# `<kt-copy-button>`
|
|
2
|
+
|
|
3
|
+
Copies a value to the clipboard and says it did: an API key, an install
|
|
4
|
+
command, a share link.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-copy-button value="npm install kanto-ds"></kt-copy-button>
|
|
8
|
+
<kt-copy-button value="sk_live_51H8…" icon-only label="Copy the API key"></kt-copy-button>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Copying
|
|
12
|
+
|
|
13
|
+
A click — or `copy()` from script — writes `value` to the clipboard. It is
|
|
14
|
+
built on `kt-button`'s `run()`:
|
|
15
|
+
|
|
16
|
+
- on success the tick comes in and the label reads "Copied" for two seconds,
|
|
17
|
+
announced to a screen reader; `kt-copy` fires with the value;
|
|
18
|
+
- if the browser refuses the clipboard — no permission, an insecure origin —
|
|
19
|
+
the button shakes, `copy()` rejects, and nothing is said to have been copied.
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
`icon-only` draws the icon alone, named by `label`. `label` and `copied-label`
|
|
24
|
+
replace the translated "Copy" and "Copied" — "Copy the key", "Key copied".
|
|
25
|
+
`variant` and `size` are the button's own, `secondary` and `medium` by default.
|
|
26
|
+
|
|
27
|
+
## Accessibility
|
|
28
|
+
|
|
29
|
+
A real button, named by its words or, icon-only, by `label`. The confirmation
|
|
30
|
+
is announced through the button's status, so a person who cannot see the tick
|
|
31
|
+
still hears that it worked.
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
| Property | Attribute | Type | Default |
|
|
36
|
+
| ------------- | -------------- | -------------------------------- | ------------- |
|
|
37
|
+
| `value` | `value` | `string` | `''` |
|
|
38
|
+
| `label` | `label` | `string` | `''` |
|
|
39
|
+
| `copiedLabel` | `copied-label` | `string` | `''` |
|
|
40
|
+
| `iconOnly` | `icon-only` | `boolean` | `false` |
|
|
41
|
+
| `variant` | `variant` | `KtButtonVariant` | `'secondary'` |
|
|
42
|
+
| `size` | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` |
|
|
43
|
+
|
|
44
|
+
| Method | Description |
|
|
45
|
+
| -------- | --------------------------------------------------------- |
|
|
46
|
+
| `copy()` | Copies `value`; resolves once copied, rejects if refused. |
|
|
47
|
+
|
|
48
|
+
| Event | Detail |
|
|
49
|
+
| --------- | ------------------- |
|
|
50
|
+
| `kt-copy` | `{ value: string }` |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# `<kt-cta>`
|
|
2
|
+
|
|
3
|
+
The ask at the end of a page: a heading, a line, and the button that acts on
|
|
4
|
+
them.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-cta heading="Start sending invoices" lead="Your first invoice goes out in two minutes.">
|
|
8
|
+
<kt-button slot="actions" size="large">Start free</kt-button>
|
|
9
|
+
<kt-button slot="actions" size="large" variant="secondary">Talk to sales</kt-button>
|
|
10
|
+
<span slot="note">Free for three months. No card needed.</span>
|
|
11
|
+
</kt-cta>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Variants and layout
|
|
15
|
+
|
|
16
|
+
| `variant` | What it does |
|
|
17
|
+
| --------- | ----------------------------------------------------- |
|
|
18
|
+
| `panel` | The default: on a tinted panel, the page's last word. |
|
|
19
|
+
| `plain` | On the page, for a call to action between sections. |
|
|
20
|
+
|
|
21
|
+
`stacked`, the default layout, puts the actions under the words; `inline`
|
|
22
|
+
sets them at the end, beside the words, once the block is 720px wide — under
|
|
23
|
+
them below. `align` centres the words, the default, or keeps them at the
|
|
24
|
+
`start`. An empty slot takes no room.
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
A section named by its heading, an `<h2>` by default (`heading-level`). Say
|
|
29
|
+
what the button does — Start free, not Click here.
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
| Property | Attribute | Type | Default |
|
|
34
|
+
| -------------- | --------------- | ----------------------- | ----------- |
|
|
35
|
+
| `heading` | `heading` | `string` | `''` |
|
|
36
|
+
| `lead` | `lead` | `string` | `''` |
|
|
37
|
+
| `variant` | `variant` | `'panel' \| 'plain'` | `'panel'` |
|
|
38
|
+
| `layout` | `layout` | `'stacked' \| 'inline'` | `'stacked'` |
|
|
39
|
+
| `align` | `align` | `'center' \| 'start'` | `'center'` |
|
|
40
|
+
| `headingLevel` | `heading-level` | `number` | `2` |
|
|
41
|
+
|
|
42
|
+
| Slot | What goes in it |
|
|
43
|
+
| --------- | ----------------------------------------- |
|
|
44
|
+
| `actions` | The buttons. |
|
|
45
|
+
| `note` | Under them: what it costs, what it needs. |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# `<kt-description-list>`
|
|
2
|
+
|
|
3
|
+
Terms and their details — an invoice's number, customer and amount; a person's
|
|
4
|
+
email and role — the body of a detail page.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-description-list label="Invoice" bordered></kt-description-list>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
document.querySelector('kt-description-list').items = [
|
|
11
|
+
{ term: 'Invoice', detail: 'INV-2041' },
|
|
12
|
+
{ term: 'Customer', detail: 'Acme Corp' },
|
|
13
|
+
{ term: 'Amount', detail: '$1,200' },
|
|
14
|
+
{ term: 'Purchase order', detail: '' },
|
|
15
|
+
];
|
|
16
|
+
</script>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Items
|
|
20
|
+
|
|
21
|
+
`items` is a list of `{ term, detail }`, drawn as a real `<dl>`: each term and
|
|
22
|
+
its detail grouped in a `<div>`, as the HTML specification allows. An empty
|
|
23
|
+
detail shows a dash, so a missing value reads as missing rather than as a gap
|
|
24
|
+
someone forgot to fill.
|
|
25
|
+
|
|
26
|
+
## Layout
|
|
27
|
+
|
|
28
|
+
| `layout` | What it is |
|
|
29
|
+
| ------------ | ----------------------------------------------------------------------------------------- |
|
|
30
|
+
| `horizontal` | The default: each term beside its detail, in a column `--kt-description-term-width` wide. |
|
|
31
|
+
| `stacked` | Each term over its detail; `columns` (1–4) sets them side by side. |
|
|
32
|
+
|
|
33
|
+
Both follow the list's **own width**: below 480px a horizontal list stacks and
|
|
34
|
+
a stacked one drops to a single column, in a narrow panel as on a phone.
|
|
35
|
+
`bordered` draws a rule under each item.
|
|
36
|
+
|
|
37
|
+
## Accessibility
|
|
38
|
+
|
|
39
|
+
A description list is announced as such, with the number of its items; name it
|
|
40
|
+
with `label` when the page has more than one. Terms are muted and details full
|
|
41
|
+
strength, so the eye reads the values while a screen reader reads both.
|
|
42
|
+
|
|
43
|
+
## API
|
|
44
|
+
|
|
45
|
+
| Property | Attribute | Type | Default |
|
|
46
|
+
| ---------- | ---------- | --------------------------- | -------------- |
|
|
47
|
+
| `items` | — | `KtDescriptionItem[]` | `[]` |
|
|
48
|
+
| `layout` | `layout` | `'horizontal' \| 'stacked'` | `'horizontal'` |
|
|
49
|
+
| `columns` | `columns` | `number` (1–4) | `1` |
|
|
50
|
+
| `bordered` | `bordered` | `boolean` | `false` |
|
|
51
|
+
| `label` | `label` | `string` | `''` |
|
|
52
|
+
|
|
53
|
+
| Part | Description |
|
|
54
|
+
| -------- | ----------------------- |
|
|
55
|
+
| `list` | The `<dl>` |
|
|
56
|
+
| `item` | One term and its detail |
|
|
57
|
+
| `term` | The `<dt>` |
|
|
58
|
+
| `detail` | The `<dd>` |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# `<kt-empty-page>`
|
|
2
|
+
|
|
3
|
+
The page a new account lands on, before there is anything in it: a welcome,
|
|
4
|
+
and the first steps that fill it — what is done, what is next, and the way to
|
|
5
|
+
each.
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<kt-empty-page id="welcome" heading="Welcome, Ada" lead="Three steps and you are sending invoices.">
|
|
9
|
+
<a slot="actions" href="/app">Skip for now</a>
|
|
10
|
+
</kt-empty-page>
|
|
11
|
+
<script>
|
|
12
|
+
welcome.steps = [
|
|
13
|
+
{
|
|
14
|
+
id: 'company',
|
|
15
|
+
title: 'Add your company',
|
|
16
|
+
description: 'Name, address and logo.',
|
|
17
|
+
done: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'customer',
|
|
21
|
+
title: 'Add a customer',
|
|
22
|
+
description: 'Who you bill.',
|
|
23
|
+
action: 'Add customer',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'invoice',
|
|
27
|
+
title: 'Send your first invoice',
|
|
28
|
+
action: 'New invoice',
|
|
29
|
+
href: '/invoices/new',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
welcome.addEventListener('kt-step', (e) => open(e.detail.id));
|
|
33
|
+
</script>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For a list or a panel with nothing in it, `kt-empty-state`; this is the whole
|
|
37
|
+
page, the first time.
|
|
38
|
+
|
|
39
|
+
## Steps
|
|
40
|
+
|
|
41
|
+
| Field | What it is |
|
|
42
|
+
| ------------- | --------------------------------------------------------------- |
|
|
43
|
+
| `id` | What `kt-step` carries. |
|
|
44
|
+
| `title` | The step, said as something to do. |
|
|
45
|
+
| `description` | Optional: what it needs, or why. |
|
|
46
|
+
| `action` | Optional: the button's words. Start by default. |
|
|
47
|
+
| `href` | Optional: makes the action a link; without it, `kt-step` fires. |
|
|
48
|
+
| `done` | The step is taken: ticked, struck through, no action. |
|
|
49
|
+
|
|
50
|
+
The steps are numbered in order, with how far along it is over them — 1 of 3
|
|
51
|
+
done. The first step not done is the next one: its action is the primary
|
|
52
|
+
button, the others are secondary. On a narrow screen the action goes under its
|
|
53
|
+
step's words.
|
|
54
|
+
|
|
55
|
+
## Slots
|
|
56
|
+
|
|
57
|
+
| Slot | What goes in it |
|
|
58
|
+
| --------- | ------------------------------------------ |
|
|
59
|
+
| `media` | Over the heading: an illustration, a logo. |
|
|
60
|
+
| `actions` | Under the steps: Skip for now, the docs. |
|
|
61
|
+
|
|
62
|
+
## Words
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
welcome.texts = {
|
|
66
|
+
progress: (done, total) => `${done} sur ${total} faits`,
|
|
67
|
+
done: 'Fait :',
|
|
68
|
+
start: 'Commencer',
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Accessibility
|
|
73
|
+
|
|
74
|
+
A section named by its heading — an `<h1>`, since it is the page;
|
|
75
|
+
`heading-level` changes it. The steps are an ordered list, each title one
|
|
76
|
+
level under. A done step's title is read with "Done:" before it, since the
|
|
77
|
+
tick and the line through are only seen. The progress bar is named with the
|
|
78
|
+
same words it shows.
|
|
79
|
+
|
|
80
|
+
## API
|
|
81
|
+
|
|
82
|
+
| Property | Attribute | Type | Default |
|
|
83
|
+
| -------------- | --------------- | --------------------------- | ------- |
|
|
84
|
+
| `heading` | `heading` | `string` | `''` |
|
|
85
|
+
| `lead` | `lead` | `string` | `''` |
|
|
86
|
+
| `steps` | — | `KtFirstStep[]` | `[]` |
|
|
87
|
+
| `headingLevel` | `heading-level` | `number` | `1` |
|
|
88
|
+
| `texts` | — | `Partial<KtEmptyPageTexts>` | `{}` |
|
|
89
|
+
|
|
90
|
+
| Event | Detail |
|
|
91
|
+
| --------- | -------- |
|
|
92
|
+
| `kt-step` | `{ id }` |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `<kt-error-page>`
|
|
2
|
+
|
|
3
|
+
The page a person lands on when the one they wanted is not there: not found,
|
|
4
|
+
broken, or down for maintenance — said plainly, with the way on.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-error-page fill home-href="/app"></kt-error-page>
|
|
8
|
+
<kt-error-page kind="error">
|
|
9
|
+
<span>Request id: 7f3a9c</span>
|
|
10
|
+
</kt-error-page>
|
|
11
|
+
<kt-error-page kind="maintenance"></kt-error-page>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Kinds
|
|
15
|
+
|
|
16
|
+
| `kind` | Code | Says | Offers |
|
|
17
|
+
| ------------- | ---- | -------------------- | ----------------------- |
|
|
18
|
+
| `not-found` | 404 | Page not found | Go home |
|
|
19
|
+
| `error` | 500 | Something went wrong | Try again, then Go home |
|
|
20
|
+
| `maintenance` | 503 | Back in a moment | Nothing it cannot do |
|
|
21
|
+
|
|
22
|
+
`code` shows another code — 410, 403. `home-href` is where Go home leads, `/`
|
|
23
|
+
by default. Try again fires `kt-retry`; cancel it to retry your own way —
|
|
24
|
+
refetch the data, re-render the route — otherwise the page reloads.
|
|
25
|
+
|
|
26
|
+
The `actions` slot replaces the buttons — a search field, a link to the status
|
|
27
|
+
page — and the default slot goes under them, for a contact line or a request
|
|
28
|
+
id to quote to support.
|
|
29
|
+
|
|
30
|
+
## Layout and words
|
|
31
|
+
|
|
32
|
+
`fill` makes it take its container's height and centre itself in it, as a page
|
|
33
|
+
on its own. Every word is in `texts`, English until given others;
|
|
34
|
+
`heading-level` sets the heading's level, 1 by default.
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
page.texts = { notFoundHeading: 'Page introuvable', goHome: "Retour à l'accueil" };
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Accessibility
|
|
41
|
+
|
|
42
|
+
The heading says what happened; the large code is decoration to a screen
|
|
43
|
+
reader, which hears the heading instead. Go home is a link, since it goes
|
|
44
|
+
somewhere; Try again is a button, since it does something.
|
|
45
|
+
|
|
46
|
+
## API
|
|
47
|
+
|
|
48
|
+
| Property | Attribute | Type | Default |
|
|
49
|
+
| -------------- | --------------- | --------------------------- | ------------- |
|
|
50
|
+
| `kind` | `kind` | `KtErrorPageKind` | `'not-found'` |
|
|
51
|
+
| `code` | `code` | `string` | `''` |
|
|
52
|
+
| `homeHref` | `home-href` | `string` | `'/'` |
|
|
53
|
+
| `headingLevel` | `heading-level` | `number` | `1` |
|
|
54
|
+
| `fill` | `fill` | `boolean` | `false` |
|
|
55
|
+
| `texts` | — | `Partial<KtErrorPageTexts>` | `{}` |
|
|
56
|
+
|
|
57
|
+
| Event | Detail |
|
|
58
|
+
| ---------- | -------------------------------------------- |
|
|
59
|
+
| `kt-retry` | — Cancelable; uncancelled, the page reloads. |
|
|
60
|
+
|
|
61
|
+
| Slot | Where |
|
|
62
|
+
| --------- | --------------------------------- |
|
|
63
|
+
| `actions` | Replaces the buttons |
|
|
64
|
+
| _default_ | Under them: contact, a request id |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# `<kt-faq>`
|
|
2
|
+
|
|
3
|
+
The questions people ask before they sign up, answered: an accordion under a
|
|
4
|
+
heading, one answer open at a time.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-faq id="faq" heading="Questions" layout="split">
|
|
8
|
+
<span slot="note">Something else? <a href="/contact">Ask us</a>.</span>
|
|
9
|
+
</kt-faq>
|
|
10
|
+
<script>
|
|
11
|
+
faq.items = [
|
|
12
|
+
{
|
|
13
|
+
question: 'Can I cancel any time?',
|
|
14
|
+
answer: 'Yes, from Settings. You keep every invoice you sent.',
|
|
15
|
+
},
|
|
16
|
+
{ question: 'Do you take card payments?', answer: 'Cards, bank transfers and direct debits.' },
|
|
17
|
+
];
|
|
18
|
+
</script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Questions
|
|
22
|
+
|
|
23
|
+
Each item is a `question` and its `answer`, drawn as a
|
|
24
|
+
`kt-collapsible` in a `kt-accordion`: opening one
|
|
25
|
+
folds the one that was open. `multiple` lets each open on its own;
|
|
26
|
+
`open-first` opens the first.
|
|
27
|
+
|
|
28
|
+
## Layout
|
|
29
|
+
|
|
30
|
+
`stacked`, the default, puts the head over the questions; `split` sets it at
|
|
31
|
+
the start, beside them, once the block is 880px wide — and holds it there
|
|
32
|
+
while the questions scroll (`--kt-faq-sticky-top`, 24px, clears a sticky
|
|
33
|
+
header). The `note` slot sits under the head: where to ask what is not
|
|
34
|
+
answered.
|
|
35
|
+
|
|
36
|
+
## Accessibility
|
|
37
|
+
|
|
38
|
+
A section named by its heading, an `<h2>` by default (`heading-level`). Each
|
|
39
|
+
question is a `<details>` summary — a real control, announced as expanded or
|
|
40
|
+
collapsed — and the arrows move between them. Find-in-page opens the answer
|
|
41
|
+
that holds a match.
|
|
42
|
+
|
|
43
|
+
## API
|
|
44
|
+
|
|
45
|
+
| Property | Attribute | Type | Default |
|
|
46
|
+
| -------------- | --------------- | ---------------------- | ----------- |
|
|
47
|
+
| `heading` | `heading` | `string` | `''` |
|
|
48
|
+
| `lead` | `lead` | `string` | `''` |
|
|
49
|
+
| `items` | — | `KtFaqItem[]` | `[]` |
|
|
50
|
+
| `multiple` | `multiple` | `boolean` | `false` |
|
|
51
|
+
| `openFirst` | `open-first` | `boolean` | `false` |
|
|
52
|
+
| `layout` | `layout` | `'stacked' \| 'split'` | `'stacked'` |
|
|
53
|
+
| `align` | `align` | `'center' \| 'start'` | `'center'` |
|
|
54
|
+
| `headingLevel` | `heading-level` | `number` | `2` |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# `<kt-feature-grid>`
|
|
2
|
+
|
|
3
|
+
What the product does, a feature at a time: an icon, a title and a line, in a
|
|
4
|
+
grid.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-feature-grid
|
|
8
|
+
id="why"
|
|
9
|
+
heading="Why teams switch"
|
|
10
|
+
lead="Less chasing, more paid."
|
|
11
|
+
></kt-feature-grid>
|
|
12
|
+
<script>
|
|
13
|
+
why.features = [
|
|
14
|
+
{ icon: 'send', title: 'Sent in a second', description: 'From the quote, in one click.' },
|
|
15
|
+
{ icon: 'refresh-cw', title: 'Chased for you', description: 'Polite reminders, on schedule.' },
|
|
16
|
+
{ icon: 'check', title: 'Reconciled', description: 'Matched to the bank.', href: '/bank' },
|
|
17
|
+
];
|
|
18
|
+
</script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
| Field | What it is |
|
|
24
|
+
| ------------- | ---------------------------------------------------------------- |
|
|
25
|
+
| `title` | The feature's name. |
|
|
26
|
+
| `description` | A line on what it does for the reader. |
|
|
27
|
+
| `icon` | Optional: an icon's name, in a tinted square. |
|
|
28
|
+
| `href` | Optional: makes the title a link — the whole feature answers it. |
|
|
29
|
+
|
|
30
|
+
## Layout
|
|
31
|
+
|
|
32
|
+
`columns` sets how many features per row — 2, 3 (the default) or 4 — where
|
|
33
|
+
there is room: under 760px the grid has two columns at most, under 480px one.
|
|
34
|
+
It follows the grid's own width. `variant="card"` puts each feature on a
|
|
35
|
+
card.
|
|
36
|
+
|
|
37
|
+
## Accessibility
|
|
38
|
+
|
|
39
|
+
A section named by its heading, an `<h2>` by default (`heading-level`). The
|
|
40
|
+
features are a list; each title sits one level under the heading. Icons are
|
|
41
|
+
decoration and hidden from assistive tech.
|
|
42
|
+
|
|
43
|
+
## API
|
|
44
|
+
|
|
45
|
+
| Property | Attribute | Type | Default |
|
|
46
|
+
| -------------- | --------------- | --------------------- | ---------- |
|
|
47
|
+
| `heading` | `heading` | `string` | `''` |
|
|
48
|
+
| `lead` | `lead` | `string` | `''` |
|
|
49
|
+
| `features` | — | `KtFeature[]` | `[]` |
|
|
50
|
+
| `columns` | `columns` | `2 \| 3 \| 4` | `3` |
|
|
51
|
+
| `variant` | `variant` | `'plain' \| 'card'` | `'plain'` |
|
|
52
|
+
| `align` | `align` | `'center' \| 'start'` | `'center'` |
|
|
53
|
+
| `headingLevel` | `heading-level` | `number` | `2` |
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# `<kt-footer>`
|
|
2
|
+
|
|
3
|
+
The site footer: a contentinfo landmark holding the brand and a word about the
|
|
4
|
+
product, columns of links, actions, and a legal line under them.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-footer label="Site">
|
|
8
|
+
<a slot="brand" href="/">ACME</a>
|
|
9
|
+
Invoicing for small teams.
|
|
10
|
+
<kt-button slot="actions" size="small" variant="secondary" icon="mail">Contact us</kt-button>
|
|
11
|
+
<span slot="legal">© 2026 Acme. All rights reserved.</span>
|
|
12
|
+
</kt-footer>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
document.querySelector('kt-footer').columns = [
|
|
16
|
+
{
|
|
17
|
+
heading: 'Product',
|
|
18
|
+
links: [
|
|
19
|
+
{ label: 'Features', href: '/features' },
|
|
20
|
+
{ label: 'Pricing', href: '/pricing' },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
heading: 'Company',
|
|
25
|
+
links: [
|
|
26
|
+
{ label: 'About', href: '/about' },
|
|
27
|
+
{ label: 'GitHub', href: 'https://github.com/acme', external: true },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Columns
|
|
35
|
+
|
|
36
|
+
The links are data, set as a property: `columns` is a list of
|
|
37
|
+
`{ heading, links }`, and each link is `{ label, href, external? }`. Every
|
|
38
|
+
column is laid out, named and marked the same way, so a footer cannot drift
|
|
39
|
+
into a mix of styles.
|
|
40
|
+
|
|
41
|
+
An `external` link — one that leaves the site — gets the external-link icon,
|
|
42
|
+
hidden from screen readers, and `rel="noopener"`. It opens where the reader
|
|
43
|
+
is, as every other link does.
|
|
44
|
+
|
|
45
|
+
The headings are `<h2>` by default, since a footer sits under the page's `h1`.
|
|
46
|
+
Set `heading-level` to 3–6 when the footer sits deeper in the outline.
|
|
47
|
+
|
|
48
|
+
## Variants
|
|
49
|
+
|
|
50
|
+
| `variant` | What it is |
|
|
51
|
+
| --------- | ------------------------------------------------------------------ |
|
|
52
|
+
| `columns` | The default: the brand on one side, a column per heading opposite. |
|
|
53
|
+
| `simple` | One row: the brand, then every link run together. No headings. |
|
|
54
|
+
|
|
55
|
+
`simple` is for a page that needs a footer rather than a site map: an app's
|
|
56
|
+
settings, a sign-in screen, a single-page product.
|
|
57
|
+
|
|
58
|
+
## Slots
|
|
59
|
+
|
|
60
|
+
| Slot | Where |
|
|
61
|
+
| --------- | ----------------------------------------------------------------------------- |
|
|
62
|
+
| `brand` | Logo or wordmark. |
|
|
63
|
+
| _default_ | A word under the brand: what the product is. Hidden in `simple`. |
|
|
64
|
+
| `actions` | Under it: social links, a newsletter form, a contact button. |
|
|
65
|
+
| `legal` | The bottom line — copyright, terms, privacy. Its row is left out while empty. |
|
|
66
|
+
|
|
67
|
+
## Layout
|
|
68
|
+
|
|
69
|
+
The footer lays itself out from **its own width**, not the viewport's: side by
|
|
70
|
+
side once it is 720px wide, stacked below that — in a narrow panel as on a
|
|
71
|
+
phone. `--kt-footer-max-width` keeps the content to a column on a wide page
|
|
72
|
+
while the background and the rule run edge to edge.
|
|
73
|
+
|
|
74
|
+
```css
|
|
75
|
+
kt-footer {
|
|
76
|
+
--kt-footer-max-width: 1200px;
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Set `--kt-footer-padding-inline: 0` to line the footer up with the content of
|
|
81
|
+
a page that already has its own margins.
|
|
82
|
+
|
|
83
|
+
`bordered`, on by default, draws a rule along the top; turn it off where the
|
|
84
|
+
footer sits on a surface of its own.
|
|
85
|
+
|
|
86
|
+
## Accessibility
|
|
87
|
+
|
|
88
|
+
A `<footer role="contentinfo">`, named by `label` when the page has more than
|
|
89
|
+
one. Put it outside `<main>` — beside it, at the end of the page — since a
|
|
90
|
+
contentinfo landmark must not sit inside another. The columns are one `<nav>`
|
|
91
|
+
with the same name, a heading over each list. Links keep the theme's focus ring
|
|
92
|
+
and read 4.5:1 in both themes.
|
|
93
|
+
|
|
94
|
+
## API
|
|
95
|
+
|
|
96
|
+
| Property | Attribute | Type | Default |
|
|
97
|
+
| -------------- | --------------- | ----------------------- | ----------- |
|
|
98
|
+
| `columns` | — | `KtFooterColumn[]` | `[]` |
|
|
99
|
+
| `variant` | `variant` | `'columns' \| 'simple'` | `'columns'` |
|
|
100
|
+
| `bordered` | `bordered` | `boolean` | `true` |
|
|
101
|
+
| `headingLevel` | `heading-level` | `number` (2–6) | `2` |
|
|
102
|
+
| `label` | `label` | `string` | `''` |
|
|
103
|
+
|
|
104
|
+
| Part | Description |
|
|
105
|
+
| --------- | ----------------------------------- |
|
|
106
|
+
| `base` | The `<footer>` |
|
|
107
|
+
| `brand` | The brand, its text and the actions |
|
|
108
|
+
| `columns` | The navigation holding the columns |
|
|
109
|
+
| `column` | One column |
|
|
110
|
+
| `bottom` | The legal row |
|
|
111
|
+
|
|
112
|
+
| CSS property | Default |
|
|
113
|
+
| ---------------------------- | --------------------- |
|
|
114
|
+
| `--kt-footer-max-width` | `none` |
|
|
115
|
+
| `--kt-footer-padding-inline` | `var(--padding-card)` |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# `<kt-hero>`
|
|
2
|
+
|
|
3
|
+
The top of a page: what the product is, in a heading and a line, and the way
|
|
4
|
+
in.
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<kt-hero heading="Invoices that pay themselves" lead="Send, chase and reconcile, in one place.">
|
|
8
|
+
<a slot="announcement" href="/changelog">New: recurring invoices</a>
|
|
9
|
+
<kt-button slot="actions" size="large">Start free</kt-button>
|
|
10
|
+
<kt-button slot="actions" size="large" variant="secondary">Book a demo</kt-button>
|
|
11
|
+
<span slot="note">Free for three months. No card needed.</span>
|
|
12
|
+
<img slot="media" src="/screenshot.png" alt="The invoices screen" />
|
|
13
|
+
</kt-hero>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Layout
|
|
17
|
+
|
|
18
|
+
| `layout` | What it does |
|
|
19
|
+
| --------- | ------------------------------------------------------------------------- |
|
|
20
|
+
| `stacked` | The default: the media under the words — a screenshot, a live demo. |
|
|
21
|
+
| `split` | The media beside the words once the hero is 880px wide; under them below. |
|
|
22
|
+
|
|
23
|
+
`align` centres the words — the default — or keeps them at the `start`. The
|
|
24
|
+
layout follows the hero's own width, so it holds in a preview as on a page.
|
|
25
|
+
An empty slot takes no room.
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Slot | Where |
|
|
30
|
+
| -------------- | ----------------------------------------------------- |
|
|
31
|
+
| `announcement` | Above the heading: what is new, as a link or a badge. |
|
|
32
|
+
| `actions` | Under the lead: the buttons. |
|
|
33
|
+
| `note` | Under the actions: what it costs, what it needs. |
|
|
34
|
+
| `media` | A screenshot, an illustration, a live demo. |
|
|
35
|
+
|
|
36
|
+
## Accessibility
|
|
37
|
+
|
|
38
|
+
A section named by its heading — an `<h1>`, since a hero opens its page;
|
|
39
|
+
`heading-level` changes it. An image in `media` needs its own `alt`.
|
|
40
|
+
|
|
41
|
+
## API
|
|
42
|
+
|
|
43
|
+
| Property | Attribute | Type | Default |
|
|
44
|
+
| -------------- | --------------- | ---------------------- | ----------- |
|
|
45
|
+
| `heading` | `heading` | `string` | `''` |
|
|
46
|
+
| `lead` | `lead` | `string` | `''` |
|
|
47
|
+
| `align` | `align` | `'center' \| 'start'` | `'center'` |
|
|
48
|
+
| `layout` | `layout` | `'stacked' \| 'split'` | `'stacked'` |
|
|
49
|
+
| `headingLevel` | `heading-level` | `number` | `1` |
|
|
50
|
+
|
|
51
|
+
| CSS property | What it sets |
|
|
52
|
+
| -------------------- | ------------------------------------------- |
|
|
53
|
+
| `--kt-block-padding` | The room above and below, as in every block |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `<kt-logo-cloud>`
|
|
2
|
+
|
|
3
|
+
Who uses it, in their logos: a line of marks under a caption.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<kt-logo-cloud heading="Trusted by finance teams at">
|
|
7
|
+
<img src="/logos/northwind.svg" alt="Northwind" />
|
|
8
|
+
<img src="/logos/kiln.svg" alt="Kiln" />
|
|
9
|
+
<svg role="img" aria-label="Sato Ceramics" viewBox="0 0 120 28">…</svg>
|
|
10
|
+
</kt-logo-cloud>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Logos
|
|
14
|
+
|
|
15
|
+
The logos are the default slot: images or inline SVGs. They are drawn at one
|
|
16
|
+
height — `--kt-logo-height`, 28px — and up to 160px wide, grey until hovered,
|
|
17
|
+
so no brand shouts over another. `colour` keeps their colours. An inline SVG
|
|
18
|
+
drawn in `currentColor` takes the muted text colour.
|
|
19
|
+
|
|
20
|
+
They wrap onto as many lines as they need, centred, or at the `start` with
|
|
21
|
+
`align="start"`.
|
|
22
|
+
|
|
23
|
+
## Accessibility
|
|
24
|
+
|
|
25
|
+
A section named by its caption — a heading, an `<h2>` by default
|
|
26
|
+
(`heading-level`), set small. Each logo needs its company's name: `alt` on an
|
|
27
|
+
image, `role="img"` and `aria-label` on an SVG. A logo that links to a case
|
|
28
|
+
study goes in an `<a>` with that name.
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
| Property | Attribute | Type | Default |
|
|
33
|
+
| -------------- | --------------- | --------------------- | ---------- |
|
|
34
|
+
| `heading` | `heading` | `string` | `''` |
|
|
35
|
+
| `colour` | `colour` | `boolean` | `false` |
|
|
36
|
+
| `align` | `align` | `'center' \| 'start'` | `'center'` |
|
|
37
|
+
| `headingLevel` | `heading-level` | `number` | `2` |
|
|
38
|
+
|
|
39
|
+
| CSS property | Default |
|
|
40
|
+
| ------------------ | ------- |
|
|
41
|
+
| `--kt-logo-height` | `28px` |
|