@jungherz-de/notionkit-elements 1.12.0 → 1.14.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/CHANGELOG.md +30 -0
- package/README.md +11 -11
- package/SKILL.md +113 -54
- package/dist/components/nk-gallery-view.js +114 -0
- package/dist/components/nk-page-cover.js +2 -0
- package/dist/components/nk-page.js +17 -9
- package/dist/notionkit-elements.esm.js +131 -13
- package/dist/notionkit-elements.js +131 -12
- package/dist/notionkit-elements.min.js +1 -1
- package/package.json +3 -3
- package/src/components/data/nk-gallery-view.js +111 -0
- package/src/components/page/nk-page-cover.js +2 -0
- package/src/components/page/nk-page.js +17 -9
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ All notable changes to NotionKit Elements are documented here. The format follow
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.14.0] – 2026-09-25
|
|
8
|
+
|
|
9
|
+
Built against NotionKit CSS 1.14.0 (peer `>= 1.14.0`). The gallery view – 88 elements now – for LearnHub's course catalog.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`<nk-gallery-view>`**, the fifth view of `<nk-database>`: the rows as cards with a picture on top, in a grid that fills the row – Notion's gallery. `cover-key` names the row field with the picture's URL (default: `cover`); a row without one shows the cover gradient, and `no-cover` leaves the pictures out. The picture stands in 2:1, cropped to fill; `fit` shows it whole, for logos. `size` small, medium or large sets the card size – columns from 180, 260 or 340px, one card per row on a phone. Cards show the title and the `meta-keys` (default: the select and date columns); a click, Enter or Space fires `nk-select { row, id, value }` like a row of the table, and `new-row` adds a dashed card that fires `nk-action { action: 'new-row' }`. Standalone it takes `columns` and `rows`, inside `<nk-database>` the database pushes the data.
|
|
13
|
+
- Demo: the project database has a Gallery tab, each project with one of the four covers; `#gallery` opens it, a card opens in the side peek, and the app still matches the class demo at 0.00 %.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **A `<button slot="action">` of `<nk-banner>` stands at the banner's right edge again** (NotionKit 1.14.0). On a page with `class="nk-body"`, NotionKit's scoped button reset won over the `::slotted()` margin – the outer tree wins – so after a short text the action sat right behind it. Since 1.11.0 the docs write the action as a button; a span was never affected. A test now checks it on an `nk-body` page.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Peer `@jungherz-de/notionkit >= 1.14.0`.
|
|
20
|
+
|
|
21
|
+
## [1.13.0] – 2026-09-25
|
|
22
|
+
|
|
23
|
+
Built against NotionKit CSS 1.13.0 (peer `>= 1.13.0`). LearnHub moved from 1.5.1 to 1.11 and sent back three findings about fixed sizes; this release answers them.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- **`<nk-page>` with a cover but no icon keeps its top padding.** It set `covered` for every cover, so the page dropped its padding for an icon that was not there, and the title – or tags and a deadline – sat right on the picture. `covered` now needs an icon too, from the attribute or from `slot="icon"`, and follows an icon that arrives later.
|
|
27
|
+
- **`<nk-input>`, `<nk-select>`, `<nk-textarea>` and `<nk-copy-field>` stay inside a narrow `<nk-panel>`** (NotionKit 1.13.0). The 210px floor ran past a 200px tile; inside a panel it gives way now, while a field row keeps it. The fix reaches the shadow roots through a custom property, so `wide` and `<nk-field stacked>` are no longer needed for it.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- **Cover heights you can set**: `--nk-cover-height` (200px) for `<nk-page-cover>` and the page's own cover, `--nk-panel-cover-height` (64px) for `<nk-panel cover>` – on `:root`, or on one element: `<nk-page-cover style="--nk-cover-height: clamp(200px, 30vh, 300px)">`. Until now the band's height sat in the shadow root, out of reach.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Peer `@jungherz-de/notionkit >= 1.13.0`.
|
|
34
|
+
|
|
7
35
|
## [1.12.0] – 2026-09-25
|
|
8
36
|
|
|
9
37
|
Built against NotionKit CSS 1.12.0 (peer `>= 1.12.0`). Auxdesk moved from 1.5.1 to 1.11 and sent back eight findings; this release answers all of them.
|
|
@@ -639,6 +667,8 @@ built and tested against NotionKit CSS 1.1.1 (peer range `>= 1.0.0`).
|
|
|
639
667
|
import, never in the core bundle – shadow-less, adding `nk-block-host` to
|
|
640
668
|
itself so the foundation's editor adapter rules apply.
|
|
641
669
|
|
|
670
|
+
[1.14.0]: https://github.com/JUNGHERZ/NotionKit-Elements/releases/tag/v1.14.0
|
|
671
|
+
[1.13.0]: https://github.com/JUNGHERZ/NotionKit-Elements/releases/tag/v1.13.0
|
|
642
672
|
[1.12.0]: https://github.com/JUNGHERZ/NotionKit-Elements/releases/tag/v1.12.0
|
|
643
673
|
[1.11.1]: https://github.com/JUNGHERZ/NotionKit-Elements/releases/tag/v1.11.1
|
|
644
674
|
[1.11.0]: https://github.com/JUNGHERZ/NotionKit-Elements/releases/tag/v1.11.0
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<h1 align="center">🧩 NotionKit Elements</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="https://www.npmjs.com/package/@jungherz-de/notionkit-elements"><img src="https://img.shields.io/badge/version-1.
|
|
4
|
+
<a href="https://www.npmjs.com/package/@jungherz-de/notionkit-elements"><img src="https://img.shields.io/badge/version-1.14.0-2383e2?style=flat-square" alt="Version"></a>
|
|
5
5
|
<a href="#"><img src="https://img.shields.io/badge/vanilla_JS-no_dependencies-448361?style=flat-square" alt="Vanilla JS"></a>
|
|
6
|
-
<a href="#"><img src="https://img.shields.io/badge/elements-
|
|
6
|
+
<a href="#"><img src="https://img.shields.io/badge/elements-88-529cca?style=flat-square" alt="88 Elements"></a>
|
|
7
7
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-9065b0?style=flat-square" alt="MIT License"></a>
|
|
8
|
-
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/changelog-v1.
|
|
8
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/changelog-v1.14.0-lightgrey?style=flat-square" alt="Changelog"></a>
|
|
9
9
|
<a href="https://www.npmjs.com/package/@jungherz-de/notionkit-elements"><img src="https://img.shields.io/badge/npm-%40jungherz--de%2Fnotionkit--elements-cb3837?style=flat-square&logo=npm" alt="npm"></a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<strong>Drop-in Web Components for <a href="https://github.com/JUNGHERZ/NotionKit">NotionKit CSS</a></strong><br>
|
|
14
|
-
|
|
14
|
+
88 vanilla JavaScript custom elements wrapping NotionKit's calm, document-centric workspace look.<br>
|
|
15
15
|
Shadow DOM · Native form participation · Pixel parity with the class markup · Zero dependencies.
|
|
16
16
|
</p>
|
|
17
17
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
## ✨ What is NotionKit Elements?
|
|
30
30
|
|
|
31
|
-
NotionKit Elements is the companion library to [NotionKit CSS](https://github.com/JUNGHERZ/NotionKit). It provides **
|
|
31
|
+
NotionKit Elements is the companion library to [NotionKit CSS](https://github.com/JUNGHERZ/NotionKit). It provides **88 Web Components** – from buttons, form controls and the date picker over the sidebar, page tree and page shell with its properties to the settings modal, the bottom sheet, the side peek, dialogs, tooltips, ⌘K palette, database views – a calendar and a gallery among them – with Notion’s toolbar and AI thread – that encapsulate the class markup of the foundation into simple, declarative custom elements.
|
|
32
32
|
|
|
33
33
|
It is the **app layer** of the NotionKit family – three layers, one design language: [NotionKit](https://notionkit.jungherz.com) is the pure-CSS foundation, NotionKit Elements wraps it into web components for application UIs, and [NotionKit Web](https://notionkit-web.jungherz.com) is the Astro template for complete websites on top of the same foundation. The word stem stays the same across the layers: `.nk-callout` becomes `<nk-callout>`, a modifier class becomes an attribute, a state class becomes a boolean attribute.
|
|
34
34
|
|
|
@@ -56,10 +56,10 @@ It is the **app layer** of the NotionKit family – three layers, one design lan
|
|
|
56
56
|
|---|---|
|
|
57
57
|
| 🎯 **Pixel parity** | Every element renders identically to its class markup – verified by a Playwright pixel test in light and dark; the reference app differs by 0.00 % from the class version |
|
|
58
58
|
| 🔌 **Shadow DOM** | Each root adopts the NotionKit *components* sheet via `adoptedStyleSheets`; tokens are inherited from the document, so one `:root { --nk-accent: … }` re-brands everything |
|
|
59
|
-
| 🧩 **
|
|
59
|
+
| 🧩 **88 Elements** | Forms with copy field, image picker and date picker, content blocks with bookmarks, app shell & tree with the ☰ drawer and the collapsing sidebar, page shell with properties, panels, avatars and steps, overlays (modal, sheet, dialog, resizable side peek, tooltip, ⌘K palette, menus that float in and become sheets on a phone, popover, emoji picker, toast), database table, board, list, calendar & gallery with toolbar and filter pills, comments, AI thread |
|
|
60
60
|
| 🎛️ **Form participation** | Input, textarea, select, switch, check, radio, slider, segmented and model card work natively with `<form>` via `ElementInternals`; radios group across shadow roots |
|
|
61
61
|
| 🌗 **Theme sync** | One observer mirrors `data-theme` on `<html>` into every element |
|
|
62
|
-
| 🪶 **Lightweight** |
|
|
62
|
+
| 🪶 **Lightweight** | 277 KB minified / 55 KB gzipped (IIFE, foundation sheet included), no external dependencies |
|
|
63
63
|
| 📦 **Four bundle shapes** | IIFE, minified IIFE, ESM, and per-component ESM entries on a stable `base.js`, which import NotionKit's sheet instead of carrying a copy |
|
|
64
64
|
| 🤖 **AI-ready** | `SKILL.md` with copy-paste markup, six app skeletons and the rules – an agent given only that file built a working app in the release test |
|
|
65
65
|
|
|
@@ -71,8 +71,8 @@ It is the **app layer** of the NotionKit family – three layers, one design lan
|
|
|
71
71
|
<!DOCTYPE html>
|
|
72
72
|
<html lang="en" data-theme="light">
|
|
73
73
|
<head>
|
|
74
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
75
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
74
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
75
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
76
76
|
</head>
|
|
77
77
|
<body class="nk-body">
|
|
78
78
|
<nk-field label="Display name" desc="Shown next to your comments">
|
|
@@ -102,7 +102,7 @@ The per-component files import NotionKit's sheet as `@jungherz-de/notionkit/noti
|
|
|
102
102
|
|
|
103
103
|
Do not mix the full bundle with the per-component files: each brings its own `NkElement`. With the bundle, take `componentsSheet` and `NkElement` from the bundle (`NotionKitElements.componentsSheet` from the `<script>` build).
|
|
104
104
|
|
|
105
|
-
Two prerequisites, always: `notionkit.css` on the document (the peer dependency, `>= 1.
|
|
105
|
+
Two prerequisites, always: `notionkit.css` on the document (the peer dependency, `>= 1.14.0`; 1.14.0 brings the gallery view and a banner action that stands at the right edge again, 1.13.0 keeps fields inside narrow panels, leaves a page without icon its padding under the cover and makes cover heights tokens, 1.12.0 brings a tag or button beside a panel's title, lists and grids without outer margin, text values, steps with states in any order and in a row, scrolling tabs, a cap for full pages and buttons per table row, 1.11.0 keeps a floating menu inside an open modal or dialog in place and inside the window and brings the banner's action as a button, fields that share a row and tooltips of several lines, 1.10.1 lets a disabled button show its tooltip, 1.10.0 brings the collapsing sidebar, the resizable side peek, the dialog and the tooltip, 1.9.0 the date picker and the calendar view, 1.8.0 the side peek, the bookmark, the copy field and pictures on the profile row, 1.7.0 the sheet, menus that float in and become sheets on a phone, the sidebar drawer, the database toolbar with filter pills and the steps, 1.7.1 minified files that carry all of it, 1.6.0 page properties, page options, list view, panels, prose and the avatar, 1.5.1 the safe areas, 1.5.0 the Notion-2025 tokens, the nine tag colours and the filled inputs; from 1.5.0 on, Elements and the foundation share one version number – the elements are built and tested against the same release) and `class="nk-body"` on `<body>`. The elements ship no visual CSS of their own – every rule comes from the foundation. The bundle injects the design tokens once as `@layer notionkit-defaults`, so any plain `:root { --nk-accent: … }` of yours re-brands every element in both themes.
|
|
106
106
|
|
|
107
107
|
## Elements
|
|
108
108
|
|
|
@@ -113,7 +113,7 @@ Two prerequisites, always: `notionkit.css` on the document (the peer dependency,
|
|
|
113
113
|
| App shell & navigation | `nk-app` `nk-sidebar` `nk-workspace-switcher` `nk-section-label` `nk-tree` `nk-tree-item` `nk-topbar` `nk-breadcrumb` `nk-theme-toggle` `nk-tab-bar` `nk-tab-bar-item` |
|
|
114
114
|
| Page shell & blocks | `nk-page` `nk-page-cover` `nk-page-title` `nk-page-actions` `nk-props` `nk-prop` `nk-panels` `nk-panel` `nk-avatar` `nk-block-host` `nk-banner` `nk-empty` `nk-skeleton` `nk-synced` `nk-tabs` `nk-tab` `nk-segmented` `nk-steps` `nk-stats` `nk-stat` `nk-avatar-group` `nk-mention` `nk-template-btn` `nk-model-card` `nk-profile-row` `nk-danger-zone` `nk-member-list` `nk-member-row` |
|
|
115
115
|
| Overlays | `nk-modal` `nk-sheet` `nk-dialog` `nk-peek` `nk-tooltip` `nk-settings-pane` `nk-settings-user` `nk-cmdk` `nk-menu` `nk-menu-item` `nk-pop` `nk-emoji-picker` `nk-toast` |
|
|
116
|
-
| Data & collaboration | `nk-database` `nk-table-view` `nk-board-view` `nk-list-view` `nk-calendar-view` `nk-filter-bar` `nk-comments` `nk-comment` `nk-ai-thread` `nk-ai-msg` `nk-ai-input-row` (+ the exported `renderPropertyCell()`) |
|
|
116
|
+
| Data & collaboration | `nk-database` `nk-table-view` `nk-board-view` `nk-list-view` `nk-calendar-view` `nk-gallery-view` `nk-filter-bar` `nk-comments` `nk-comment` `nk-ai-thread` `nk-ai-msg` `nk-ai-input-row` (+ the exported `renderPropertyCell()`) |
|
|
117
117
|
|
|
118
118
|
Static content goes in through attributes and slots, dynamic data through properties (`tree.data`, `database.rows`, `palette.commands`). Interactions fire custom events with fixed names: `nk-select`, `nk-change`, `nk-view-change`, `nk-command`, `nk-toggle`, `nk-submit`, `nk-action`. No fetching, no two-way binding – the elements render what they get.
|
|
119
119
|
|
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: notionkit-elements
|
|
3
|
-
description: NotionKit Elements is a vanilla-JS Web Components library (v1.
|
|
3
|
+
description: NotionKit Elements is a vanilla-JS Web Components library (v1.14.0) wrapping NotionKit CSS v1.14.0 – the calm, document-centric design system in the Notion idiom. 88 custom elements with the `nk-` prefix, Shadow DOM, automatic light/dark sync via data-theme on <html>, and form-associated controls. Use this reference whenever generating HTML that uses <nk-*> tags to get attributes, slots, events and composition right.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# NotionKit Elements – AI Component Reference
|
|
@@ -21,8 +21,8 @@ description: NotionKit Elements is a vanilla-JS Web Components library (v1.12.0)
|
|
|
21
21
|
<head>
|
|
22
22
|
<meta charset="UTF-8">
|
|
23
23
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
24
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
25
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
24
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
25
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
26
26
|
</head>
|
|
27
27
|
<body class="nk-body">
|
|
28
28
|
<nk-btn variant="primary">Save</nk-btn>
|
|
@@ -74,7 +74,7 @@ Never mix the full bundle with the per-component files – each brings its own `
|
|
|
74
74
|
| Attributes are live | Every documented attribute re-renders when changed after connect (`stat.setAttribute('value', '129')`, `el.open = true`); properties reflect to attributes where a setter is listed. |
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
# 3. Element Catalog (
|
|
77
|
+
# 3. Element Catalog (88 elements)
|
|
78
78
|
|
|
79
79
|
## Forms & controls (wave 1)
|
|
80
80
|
|
|
@@ -142,7 +142,7 @@ A native `<input>` inside the shadow root, wired into the surrounding form throu
|
|
|
142
142
|
<input class="nk-input" name="name" value="Ada Lovelace" placeholder="Display name">
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
**Small screens:** Minimum width 210px; use `wide` to fill the row.
|
|
145
|
+
**Small screens:** Minimum width 210px – inside a panel never wider than the tile; use `wide` to fill the row.
|
|
146
146
|
|
|
147
147
|
### 3.3 `<nk-copy-field>` – Copy field
|
|
148
148
|
|
|
@@ -177,7 +177,7 @@ A value to take along – a link, an address, a key – as tall as an input, wit
|
|
|
177
177
|
<div style="max-width:340px;margin-top:10px"><div class="nk-copy-field mono"><span class="cf-value">••••••••••••••••••••••••</span><button class="cf-btn">Show</button><button class="cf-btn">Copy</button></div></div>
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
**Small screens:** Keeps to its column: the value is cut, never the actions.
|
|
180
|
+
**Small screens:** Keeps to its column – inside a panel even below its 210px: the value is cut, never the actions.
|
|
181
181
|
|
|
182
182
|
### 3.4 `<nk-image-picker>` – Image picker
|
|
183
183
|
|
|
@@ -1274,7 +1274,7 @@ One destination of `nk-tab-bar`: an icon over a short label. A tap emits `nk-sel
|
|
|
1274
1274
|
|
|
1275
1275
|
### 3.36 `<nk-page>` – Page
|
|
1276
1276
|
|
|
1277
|
-
The document column: a scrolling wrapper, an optional cover, the 760px page with 64px side padding, and the page icon (rendered here because its slotted twin is keyed on the parent). `narrow` drops the scroll wrapper for pages that are the document itself.
|
|
1277
|
+
The document column: a scrolling wrapper, an optional cover, the 760px page with 64px side padding, and the page icon (rendered here because its slotted twin is keyed on the parent). `narrow` drops the scroll wrapper for pages that are the document itself. With a cover the icon overlaps its bottom edge; a cover without an icon leaves the page its top padding, so the title never touches the picture.
|
|
1278
1278
|
|
|
1279
1279
|
```html
|
|
1280
1280
|
<div style="display:flex;flex-direction:column;height:100%"><nk-page icon="🚀" cover>
|
|
@@ -1312,7 +1312,7 @@ The document column: a scrolling wrapper, an optional cover, the 760px page with
|
|
|
1312
1312
|
|
|
1313
1313
|
### 3.37 `<nk-page-cover>` – Page cover
|
|
1314
1314
|
|
|
1315
|
-
The 200px cover
|
|
1315
|
+
The cover band, as tall as the token `--nk-cover-height` (200px) – on `:root`, or on the element for one cover: `style="--nk-cover-height: clamp(200px, 30vh, 300px)"` comes close to Notion’s 30vh. Without `src` it shows the token gradient; with `src` a picture – an `<img>` inside the band, cropped rather than stretched. `position` moves the crop, as Notion’s “Reposition” does.
|
|
1316
1316
|
|
|
1317
1317
|
```html
|
|
1318
1318
|
<nk-page-cover src="/covers/meadow.svg"></nk-page-cover>
|
|
@@ -1332,7 +1332,7 @@ The 200px cover band. Without `src` it shows the token gradient; with `src` a pi
|
|
|
1332
1332
|
<div class="nk-cover"><img src="/covers/meadow.svg" alt=""></div>
|
|
1333
1333
|
```
|
|
1334
1334
|
|
|
1335
|
-
**Small screens:** Unchanged.
|
|
1335
|
+
**Small screens:** Unchanged; lower `--nk-cover-height` if the band eats too much of a short screen.
|
|
1336
1336
|
|
|
1337
1337
|
### 3.38 `<nk-page-title>` – Page title
|
|
1338
1338
|
|
|
@@ -1479,7 +1479,7 @@ A grid of `nk-panel`s: columns of at least 200px that share the row. The panels
|
|
|
1479
1479
|
|
|
1480
1480
|
### 3.43 `<nk-panel>` – Panel
|
|
1481
1481
|
|
|
1482
|
-
A neutral surface for content that belongs together – the cards on Notion’s Home, the boxes in its settings. `title` is the heading (never a tooltip); the content goes in as `<p>`s and blocks. `cover` without a value draws the gradient band, with a URL a picture; `icon` overlaps the cover as on a page – a page tile. With `href` the panel is a link. `slot="end"` sits at the right edge of the title – a state as a tag, a button – as Notion’s settings boxes show a connection, and moves under the title where both do not fit.
|
|
1482
|
+
A neutral surface for content that belongs together – the cards on Notion’s Home, the boxes in its settings. `title` is the heading (never a tooltip); the content goes in as `<p>`s and blocks. `cover` without a value draws the gradient band, with a URL a picture; `icon` overlaps the cover as on a page – a page tile. With `href` the panel is a link. `slot="end"` sits at the right edge of the title – a state as a tag, a button – as Notion’s settings boxes show a connection, and moves under the title where both do not fit. The cover is `--nk-panel-cover-height` tall (64px) – set it on `:root` or on one panel. Inputs, selects and copy fields inside never run past the panel’s edge, however narrow the tile.
|
|
1483
1483
|
|
|
1484
1484
|
```html
|
|
1485
1485
|
<div style="max-width:360px;display:grid;gap:12px"><nk-panel href="#" cover icon="🚀" title="NotionKit MVP"><p>2 min ago</p></nk-panel>
|
|
@@ -2606,10 +2606,10 @@ The view switcher with Notion’s toolbar: child views (`nk-table-view`, `nk-boa
|
|
|
2606
2606
|
{ key: 'effort', label: 'Effort (h)', type: 'number', icon: '#', locale: 'en', format: { minimumFractionDigits: 1 } },
|
|
2607
2607
|
];
|
|
2608
2608
|
db.rows = [
|
|
2609
|
-
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6 },
|
|
2610
|
-
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5 },
|
|
2611
|
-
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5 },
|
|
2612
|
-
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8 },
|
|
2609
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2610
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2611
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2612
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, cover: '/covers/tide.svg' },
|
|
2613
2613
|
];
|
|
2614
2614
|
}</script>
|
|
2615
2615
|
```
|
|
@@ -2667,10 +2667,10 @@ Renders `columns` × `rows` as the NotionKit table. Cells are polymorphic (`text
|
|
|
2667
2667
|
{ key: 'actions', type: 'actions', actions: [{ action: 'open', label: 'Open' }, { action: 'archive', label: 'Archive', danger: true }] },
|
|
2668
2668
|
];
|
|
2669
2669
|
db.rows = [
|
|
2670
|
-
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6 },
|
|
2671
|
-
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5 },
|
|
2672
|
-
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5 },
|
|
2673
|
-
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, actions: ['open'] },
|
|
2670
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2671
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2672
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2673
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, actions: ['open'], cover: '/covers/tide.svg' },
|
|
2674
2674
|
];
|
|
2675
2675
|
}</script>
|
|
2676
2676
|
```
|
|
@@ -2727,10 +2727,10 @@ Groups rows by a select column (`group-by`, default: the first select column) in
|
|
|
2727
2727
|
{ key: 'effort', label: 'Effort (h)', type: 'number', icon: '#', locale: 'en', format: { minimumFractionDigits: 1 } },
|
|
2728
2728
|
];
|
|
2729
2729
|
db.rows = [
|
|
2730
|
-
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6 },
|
|
2731
|
-
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5 },
|
|
2732
|
-
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5 },
|
|
2733
|
-
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8 },
|
|
2730
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2731
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2732
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2733
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, cover: '/covers/tide.svg' },
|
|
2734
2734
|
];
|
|
2735
2735
|
}</script>
|
|
2736
2736
|
```
|
|
@@ -2779,10 +2779,10 @@ The third database view: one line per row – icon and title, the `meta-keys` on
|
|
|
2779
2779
|
{ key: 'effort', label: 'Effort (h)', type: 'number', icon: '#', locale: 'en', format: { minimumFractionDigits: 1 } },
|
|
2780
2780
|
];
|
|
2781
2781
|
db.rows = [
|
|
2782
|
-
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6 },
|
|
2783
|
-
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5 },
|
|
2784
|
-
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5 },
|
|
2785
|
-
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8 },
|
|
2782
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2783
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2784
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2785
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, cover: '/covers/tide.svg' },
|
|
2786
2786
|
];
|
|
2787
2787
|
}</script>
|
|
2788
2788
|
```
|
|
@@ -2832,10 +2832,10 @@ The fourth database view (NotionKit 1.9.0): a month, the rows as cards on their
|
|
|
2832
2832
|
{ key: 'effort', label: 'Effort (h)', type: 'number', icon: '#', locale: 'en', format: { minimumFractionDigits: 1 } },
|
|
2833
2833
|
];
|
|
2834
2834
|
db.rows = [
|
|
2835
|
-
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6 },
|
|
2836
|
-
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5 },
|
|
2837
|
-
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5 },
|
|
2838
|
-
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8 },
|
|
2835
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2836
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2837
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2838
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, cover: '/covers/tide.svg' },
|
|
2839
2839
|
];
|
|
2840
2840
|
}</script>
|
|
2841
2841
|
```
|
|
@@ -2880,7 +2880,65 @@ The fourth database view (NotionKit 1.9.0): a month, the rows as cards on their
|
|
|
2880
2880
|
|
|
2881
2881
|
**Small screens:** Keeps seven columns; the days get lower (64px) and the cards smaller.
|
|
2882
2882
|
|
|
2883
|
-
### 3.82 `<nk-
|
|
2883
|
+
### 3.82 `<nk-gallery-view>` – Gallery view
|
|
2884
|
+
|
|
2885
|
+
The fifth database view: the rows as cards with a picture on top, in a grid that fills the row – Notion’s gallery, for a course catalog or a reading list. `cover-key` names the row field with the picture’s URL (default: `cover`); a row without one shows the cover gradient, `no-cover` leaves the pictures out. The picture stands in 2:1, cropped to fill; `fit` shows it whole, for logos. `size` small, medium or large sets the card size – columns from 180, 260 or 340px. Cards show the title and the `meta-keys` (default: the select and date columns) and fire `nk-select` on a click, Enter or Space; `new-row` adds the add card.
|
|
2886
|
+
|
|
2887
|
+
```html
|
|
2888
|
+
<nk-gallery-view meta-keys="status,due" new-row></nk-gallery-view>
|
|
2889
|
+
<script>{
|
|
2890
|
+
const db = document.currentScript.previousElementSibling;
|
|
2891
|
+
db.columns = [
|
|
2892
|
+
{ key: 'name', label: 'Name', type: 'text', icon: '📄', title: true },
|
|
2893
|
+
{ key: 'status', label: 'Status', type: 'select', icon: '◉', options: [
|
|
2894
|
+
{ value: 'planned', label: 'Planned', color: 'orange' }, { value: 'progress', label: 'In progress', color: 'blue' }, { value: 'done', label: 'Done', color: 'green' } ] },
|
|
2895
|
+
{ key: 'owner', label: 'Owner', type: 'person', icon: '👤' },
|
|
2896
|
+
{ key: 'due', label: 'Due', type: 'date', icon: '📅' },
|
|
2897
|
+
{ key: 'progress', label: 'Progress', type: 'progress', icon: '▰' },
|
|
2898
|
+
{ key: 'effort', label: 'Effort (h)', type: 'number', icon: '#', locale: 'en', format: { minimumFractionDigits: 1 } },
|
|
2899
|
+
];
|
|
2900
|
+
db.rows = [
|
|
2901
|
+
{ id: 1, icon: '🧭', name: 'App shell & sidebar', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '08.05.2026', progress: 100, effort: 6, cover: '/covers/aurora.svg' },
|
|
2902
|
+
{ id: 2, icon: '📄', name: 'Page shell & typography', status: 'done', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '10.05.2026', progress: 100, effort: 4.5, cover: '/covers/dunes.svg' },
|
|
2903
|
+
{ id: 3, icon: '🗃️', name: 'Database table view', status: 'progress', owner: { name: 'Marcel', initials: 'MK', color: 'purple' }, due: '20.05.2026', progress: 65, effort: 12.5, cover: '/covers/meadow.svg' },
|
|
2904
|
+
{ id: 4, icon: '▤', name: 'Board view & drag-and-drop', status: 'planned', due: '02.06.2026', progress: 0, effort: 8, cover: '/covers/tide.svg' },
|
|
2905
|
+
];
|
|
2906
|
+
}</script>
|
|
2907
|
+
```
|
|
2908
|
+
|
|
2909
|
+
| Attribute | Type | Default | Description |
|
|
2910
|
+
|---|---|---|---|
|
|
2911
|
+
| `name` | string | – | View name. |
|
|
2912
|
+
| `label` | string | – | Tab label. |
|
|
2913
|
+
| `cover-key` | string | `cover` | Row field with the picture’s URL. |
|
|
2914
|
+
| `no-cover` | boolean | – | Cards without pictures. |
|
|
2915
|
+
| `size` | small | medium | large | `medium` | Card size. |
|
|
2916
|
+
| `fit` | boolean | – | Show a picture whole instead of cropped. |
|
|
2917
|
+
| `title-key` | string | – | Title column. |
|
|
2918
|
+
| `meta-keys` | list | – | Comma-separated columns under the title. |
|
|
2919
|
+
| `new-row` | boolean | – | Show the add card. |
|
|
2920
|
+
| `new-row-label` | string | `+ New page` | Its text. |
|
|
2921
|
+
|
|
2922
|
+
**Events:** `nk-select` `{ row, id, value }` – Card clicked, Enter or Space. · `nk-action` `{ action: 'new-row' }` – Add card clicked.
|
|
2923
|
+
|
|
2924
|
+
**Properties:** `columns`, `rows`, `data` · **Methods:** `refresh()`
|
|
2925
|
+
|
|
2926
|
+
**Replaces:** `.nk-gallery`, `.small`, `.large`, `.fit`, `.nk-card`, `.nk-cover`, `.card-title`, `.card-meta`, `.nk-new-row`
|
|
2927
|
+
|
|
2928
|
+
```html
|
|
2929
|
+
<!-- equivalent class markup -->
|
|
2930
|
+
<div class="nk-gallery" role="list">
|
|
2931
|
+
<div class="nk-card" role="listitem" tabindex="0"><div class="nk-cover"><img src="/covers/aurora.svg" alt=""></div><div class="card-title">🧭 App shell & sidebar</div><div class="card-meta"><span><span class="nk-tag green">Done</span></span><span>📅 08.05.2026</span></div></div>
|
|
2932
|
+
<div class="nk-card" role="listitem" tabindex="0"><div class="nk-cover"><img src="/covers/dunes.svg" alt=""></div><div class="card-title">📄 Page shell & typography</div><div class="card-meta"><span><span class="nk-tag green">Done</span></span><span>📅 10.05.2026</span></div></div>
|
|
2933
|
+
<div class="nk-card" role="listitem" tabindex="0"><div class="nk-cover"><img src="/covers/meadow.svg" alt=""></div><div class="card-title">🗃️ Database table view</div><div class="card-meta"><span><span class="nk-tag blue">In progress</span></span><span>📅 20.05.2026</span></div></div>
|
|
2934
|
+
<div class="nk-card" role="listitem" tabindex="0"><div class="nk-cover"><img src="/covers/tide.svg" alt=""></div><div class="card-title">▤ Board view & drag-and-drop</div><div class="card-meta"><span><span class="nk-tag orange">Planned</span></span><span>📅 02.06.2026</span></div></div>
|
|
2935
|
+
<div class="nk-new-row" role="button" tabindex="0">+ New page</div>
|
|
2936
|
+
</div>
|
|
2937
|
+
```
|
|
2938
|
+
|
|
2939
|
+
**Small screens:** The grid drops columns by itself – one card per row on a phone, no breakpoint involved.
|
|
2940
|
+
|
|
2941
|
+
### 3.83 `<nk-filter-bar>` – Filter bar
|
|
2884
2942
|
|
|
2885
2943
|
The filters in effect as NotionKit’s filter pills – `.active` with an accent tint, a × to remove each, a quiet `add` pill at the end – with no inline style. In `slot="filters"` of `nk-database` the row sits under the toolbar. A pill’s label fires `nk-action { action: "edit" }`, the add pill `{ action: "add" }`, each with the clicked button as `anchor` for `menu.show(anchor)`. `bar.apply(rows)` keeps rows where every filter matches by strict equality (`row[key] === value`, so use the option value) – or differs with `op: "is-not"` – and the search text appears in any string field (a person’s `name`); the data logic stays yours. Its own Filter and Sort tools and the search field are there for a bar without a database toolbar. It keeps its own copy of `filters`: the array you pass is never changed, a removed pill is reported in `nk-change`.
|
|
2886
2944
|
|
|
@@ -2916,7 +2974,7 @@ The filters in effect as NotionKit’s filter pills – `.active` with an accent
|
|
|
2916
2974
|
|
|
2917
2975
|
**Small screens:** The pills wrap onto further rows.
|
|
2918
2976
|
|
|
2919
|
-
### 3.
|
|
2977
|
+
### 3.84 `<nk-comments>` – Comment thread
|
|
2920
2978
|
|
|
2921
2979
|
A left-ruled thread of `nk-comment`s with an input row. Enter or the button fires `nk-submit { text }`; appending the new comment is yours.
|
|
2922
2980
|
|
|
@@ -2953,7 +3011,7 @@ A left-ruled thread of `nk-comment`s with an input row. Enter or the button fire
|
|
|
2953
3011
|
|
|
2954
3012
|
**Small screens:** Unchanged.
|
|
2955
3013
|
|
|
2956
|
-
### 3.
|
|
3014
|
+
### 3.85 `<nk-comment>` – Comment
|
|
2957
3015
|
|
|
2958
3016
|
One comment: avatar (initials + `color`), bold author, time, body. `slot="head"` adds content after the name.
|
|
2959
3017
|
|
|
@@ -2979,7 +3037,7 @@ One comment: avatar (initials + `color`), bold author, time, body. `slot="head"`
|
|
|
2979
3037
|
|
|
2980
3038
|
**Small screens:** Unchanged.
|
|
2981
3039
|
|
|
2982
|
-
### 3.
|
|
3040
|
+
### 3.86 `<nk-ai-thread>` – AI thread
|
|
2983
3041
|
|
|
2984
3042
|
The conversation column: `nk-ai-msg` children (`role="user"` gets the gradient avatar), followed by an `nk-ai-input-row`. Action buttons in `slot="actions"` fire `nk-action { action, value }` – both carry the button’s `value` (or its text).
|
|
2985
3043
|
|
|
@@ -3012,7 +3070,7 @@ _No attributes._
|
|
|
3012
3070
|
|
|
3013
3071
|
**Small screens:** Unchanged.
|
|
3014
3072
|
|
|
3015
|
-
### 3.
|
|
3073
|
+
### 3.87 `<nk-ai-msg>` – AI message
|
|
3016
3074
|
|
|
3017
3075
|
One message. `role="user"` flips the avatar to the gradient; `badge` is the grey suffix after the name (“· AI”); plain `<button slot="actions">`s form the action row.
|
|
3018
3076
|
|
|
@@ -3042,7 +3100,7 @@ One message. `role="user"` flips the avatar to the gradient; `badge` is the grey
|
|
|
3042
3100
|
|
|
3043
3101
|
**Small screens:** Unchanged.
|
|
3044
3102
|
|
|
3045
|
-
### 3.
|
|
3103
|
+
### 3.88 `<nk-ai-input-row>` – AI input row
|
|
3046
3104
|
|
|
3047
3105
|
The prompt field with ✨ and a send button. Enter or the button fires `nk-submit { text }` and clears the field.
|
|
3048
3106
|
|
|
@@ -3084,8 +3142,8 @@ Eight skeletons, one per app shape, mirroring the NotionKit CSS SKILL.md. Copy o
|
|
|
3084
3142
|
<html lang="en" data-theme="light">
|
|
3085
3143
|
<head>
|
|
3086
3144
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3087
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3088
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3145
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3146
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3089
3147
|
</head>
|
|
3090
3148
|
<body class="nk-body">
|
|
3091
3149
|
<nk-app>
|
|
@@ -3166,8 +3224,8 @@ Rules of the shell: `nk-sidebar`, `nk-topbar` and `nk-page` are `display: conten
|
|
|
3166
3224
|
<html lang="en" data-theme="light">
|
|
3167
3225
|
<head>
|
|
3168
3226
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3169
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3170
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3227
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3228
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3171
3229
|
</head>
|
|
3172
3230
|
<body class="nk-body">
|
|
3173
3231
|
<nk-app>
|
|
@@ -3274,8 +3332,8 @@ Data contract: `columns` describe the properties (`type`: text | select | multi-
|
|
|
3274
3332
|
<html lang="en" data-theme="light">
|
|
3275
3333
|
<head>
|
|
3276
3334
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3277
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3278
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3335
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3336
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3279
3337
|
</head>
|
|
3280
3338
|
<body class="nk-body">
|
|
3281
3339
|
<nk-app>
|
|
@@ -3334,8 +3392,8 @@ Data contract: `columns` describe the properties (`type`: text | select | multi-
|
|
|
3334
3392
|
<html lang="en" data-theme="light">
|
|
3335
3393
|
<head>
|
|
3336
3394
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3337
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3338
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3395
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3396
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3339
3397
|
</head>
|
|
3340
3398
|
<body class="nk-body">
|
|
3341
3399
|
<!-- your app -->
|
|
@@ -3412,8 +3470,8 @@ The open/close contract is one attribute: `settings.open = true`, `settings.show
|
|
|
3412
3470
|
<html lang="en" data-theme="light">
|
|
3413
3471
|
<head>
|
|
3414
3472
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3415
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3416
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3473
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3474
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3417
3475
|
</head>
|
|
3418
3476
|
<body class="nk-body">
|
|
3419
3477
|
<div class="nk-page" style="padding-top:48px">
|
|
@@ -3459,8 +3517,8 @@ The open/close contract is one attribute: `settings.open = true`, `settings.show
|
|
|
3459
3517
|
<html lang="en" data-theme="light">
|
|
3460
3518
|
<head>
|
|
3461
3519
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3462
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3463
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3520
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3521
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3464
3522
|
</head>
|
|
3465
3523
|
<body class="nk-body">
|
|
3466
3524
|
<nk-page narrow icon="📘" cover>
|
|
@@ -3504,8 +3562,8 @@ Note `narrow`: the page is the document, so there is no inner scroll wrapper –
|
|
|
3504
3562
|
<html lang="en" data-theme="light">
|
|
3505
3563
|
<head>
|
|
3506
3564
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3507
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3508
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3565
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3566
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3509
3567
|
</head>
|
|
3510
3568
|
<body class="nk-body">
|
|
3511
3569
|
<nk-app>
|
|
@@ -3559,8 +3617,8 @@ Note `narrow`: the page is the document, so there is no inner scroll wrapper –
|
|
|
3559
3617
|
<html lang="en" data-theme="light">
|
|
3560
3618
|
<head>
|
|
3561
3619
|
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3562
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
3563
|
-
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.
|
|
3620
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.14.0/notionkit.min.css">
|
|
3621
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.14.0/dist/notionkit-elements.min.js"></script>
|
|
3564
3622
|
</head>
|
|
3565
3623
|
<body class="nk-body">
|
|
3566
3624
|
<!-- A narrow column, centred: layout is yours, so it is inline. -->
|
|
@@ -3734,6 +3792,7 @@ Form controls additionally re-dispatch a native, bubbling `change` event, so `fo
|
|
|
3734
3792
|
| `<nk-board-view>` | data | `name`, `label`, `group-by`, `title-key` | – | `nk-select`, `nk-change`, `nk-action` |
|
|
3735
3793
|
| `<nk-list-view>` | data | `name`, `label`, `title-key`, `meta-keys` | – | `nk-select`, `nk-action` |
|
|
3736
3794
|
| `<nk-calendar-view>` | data | `name`, `label`, `date-key`, `title-key` | – | `nk-select`, `nk-month` |
|
|
3795
|
+
| `<nk-gallery-view>` | data | `name`, `label`, `cover-key`, `no-cover` | – | `nk-select`, `nk-action` |
|
|
3737
3796
|
| `<nk-filter-bar>` | data | `add`, `add-label`, `no-filter`, `no-sort` | `(default)` | `nk-change`, `nk-action` |
|
|
3738
3797
|
| `<nk-comments>` | data | `placeholder`, `send-label`, `no-input`, `disabled` | `(default)` | `nk-submit` |
|
|
3739
3798
|
| `<nk-comment>` | data | `author`, `time`, `avatar`, `color` | `(default)`, `head`, `avatar` | – |
|
|
@@ -3759,10 +3818,10 @@ Form controls additionally re-dispatch a native, bubbling `change` event, so `fo
|
|
|
3759
3818
|
| Theme sync | one `MutationObserver` on `<html>[data-theme]`, a `Set` of instances, `.nk-wrapper[data-theme]` inside each root |
|
|
3760
3819
|
| Components | `src/components/{forms,content,shell,page,overlays,data}/nk-*.js`, one tag per file, `customElements.define` at the bottom |
|
|
3761
3820
|
| Build | Rollup: IIFE, minified IIFE, ESM, and per-component ESM entries on a stable `dist/components/base.js` that import NotionKit's sheet (`@jungherz-de/notionkit/notionkit-styles.js`) instead of inlining it; the full bundles inline it and export `componentsSheet` |
|
|
3762
|
-
| Peer | `@jungherz-de/notionkit >= 1.
|
|
3821
|
+
| Peer | `@jungherz-de/notionkit >= 1.14.0` – from 1.5.0 on the elements and the foundation share one version number; the bundle embeds that release's stylesheet, so keep them in step |
|
|
3763
3822
|
|
|
3764
3823
|
Lifecycle: construct (attach shadow, adopt sheets) → first connect (wrapper + `render()`) → every connect (`setupEvents()`, theme registration, light-DOM observer) → `attributeChangedCallback` → `onAttributeChanged` → disconnect (`teardownEvents()`, unregister).
|
|
3765
3824
|
|
|
3766
3825
|
|
|
3767
3826
|
---
|
|
3768
|
-
*NotionKit Elements v1.
|
|
3827
|
+
*NotionKit Elements v1.14.0 · wrapping NotionKit CSS v1.14.0 · MIT · Jungherz GmbH*
|