@jungherz-de/notionkit-elements 1.0.0 β 1.1.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 +73 -20
- package/dist/components/nk-ai-input-row.js +1 -1
- package/dist/components/nk-ai-msg.js +1 -1
- package/dist/components/nk-ai-thread.js +1 -1
- package/dist/components/nk-app.js +1 -1
- package/dist/components/nk-avatar-group.js +1 -1
- package/dist/components/nk-banner.js +1 -1
- package/dist/components/nk-block-host.js +1 -1
- package/dist/components/nk-board-view.js +1 -1
- package/dist/components/nk-breadcrumb.js +1 -1
- package/dist/components/nk-btn.js +1 -1
- package/dist/components/nk-callout.js +1 -1
- package/dist/components/nk-check.js +1 -1
- package/dist/components/nk-cmdk.js +1 -1
- package/dist/components/nk-code.js +1 -1
- package/dist/components/nk-comment.js +1 -1
- package/dist/components/nk-comments.js +1 -1
- package/dist/components/nk-danger-zone.js +1 -1
- package/dist/components/nk-database.js +1 -1
- package/dist/components/nk-divider.js +1 -1
- package/dist/components/nk-emoji-picker.js +1 -1
- package/dist/components/nk-empty.js +1 -1
- package/dist/components/nk-field.js +1 -1
- package/dist/components/nk-filter-bar.js +1 -1
- package/dist/components/nk-heading.js +1 -1
- package/dist/components/nk-input.js +2 -2
- package/dist/components/nk-kbd.js +1 -1
- package/dist/components/nk-member-list.js +1 -1
- package/dist/components/nk-member-row.js +1 -1
- package/dist/components/nk-mention.js +1 -1
- package/dist/components/nk-menu-item.js +1 -1
- package/dist/components/nk-menu.js +1 -1
- package/dist/components/nk-modal.js +1 -1
- package/dist/components/nk-model-card.js +1 -1
- package/dist/components/nk-page-actions.js +1 -1
- package/dist/components/nk-page-cover.js +1 -1
- package/dist/components/nk-page-title.js +1 -1
- package/dist/components/nk-page.js +1 -1
- package/dist/components/nk-pop.js +1 -1
- package/dist/components/nk-profile-row.js +1 -1
- package/dist/components/nk-progress.js +1 -1
- package/dist/components/nk-quote.js +1 -1
- package/dist/components/nk-radio.js +1 -1
- package/dist/components/nk-section-label.js +1 -1
- package/dist/components/nk-segmented.js +1 -1
- package/dist/components/nk-select.js +2 -2
- package/dist/components/nk-settings-pane.js +1 -1
- package/dist/components/nk-settings-user.js +1 -1
- package/dist/components/nk-sidebar.js +1 -1
- package/dist/components/nk-skeleton.js +1 -1
- package/dist/components/nk-slider.js +1 -1
- package/dist/components/nk-stat.js +1 -1
- package/dist/components/nk-stats.js +1 -1
- package/dist/components/nk-switch.js +1 -1
- package/dist/components/nk-synced.js +1 -1
- package/dist/components/nk-tab-bar-item.js +83 -0
- package/dist/components/nk-tab-bar.js +83 -0
- package/dist/components/nk-tab.js +1 -1
- package/dist/components/nk-table-view.js +1 -1
- package/dist/components/nk-tabs.js +1 -1
- package/dist/components/nk-tag.js +1 -1
- package/dist/components/nk-template-btn.js +1 -1
- package/dist/components/nk-textarea.js +2 -2
- package/dist/components/nk-theme-toggle.js +1 -1
- package/dist/components/nk-toast.js +1 -1
- package/dist/components/nk-todo.js +1 -1
- package/dist/components/nk-toggle.js +1 -1
- package/dist/components/nk-topbar.js +1 -1
- package/dist/components/nk-tree-item.js +1 -1
- package/dist/components/nk-tree.js +1 -1
- package/dist/components/nk-workspace-switcher.js +1 -1
- package/dist/components/shared/base-BavgHsS-.js +347 -0
- package/dist/notionkit-elements.esm.js +197 -7
- package/dist/notionkit-elements.js +198 -6
- package/dist/notionkit-elements.min.js +1 -1
- package/package.json +3 -3
- package/src/base.js +31 -1
- package/src/components/forms/nk-input.js +1 -1
- package/src/components/forms/nk-select.js +1 -1
- package/src/components/forms/nk-textarea.js +1 -1
- package/src/components/shell/nk-tab-bar-item.js +82 -0
- package/src/components/shell/nk-tab-bar.js +82 -0
- package/src/index.js +2 -0
- package/dist/components/shared/base-6gEcoatG.js +0 -317
package/README.md
CHANGED
|
@@ -1,18 +1,69 @@
|
|
|
1
|
+
<h1 align="center">π§© NotionKit Elements</h1>
|
|
2
|
+
|
|
1
3
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
3
|
-
<a href="
|
|
4
|
-
<a href="
|
|
5
|
-
<img src="https://img.shields.io/badge/license-MIT-
|
|
4
|
+
<a href="https://www.npmjs.com/package/@jungherz-de/notionkit-elements"><img src="https://img.shields.io/badge/version-1.1.0-2383e2?style=flat-square" alt="Version"></a>
|
|
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-70-529cca?style=flat-square" alt="70 Elements"></a>
|
|
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.1.0-lightgrey?style=flat-square" alt="Changelog"></a>
|
|
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>
|
|
6
10
|
</p>
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<strong>Drop-in Web Components for <a href="https://github.com/JUNGHERZ/NotionKit">NotionKit CSS</a></strong><br>
|
|
14
|
+
70 vanilla JavaScript custom elements wrapping NotionKit's calm, document-centric workspace look.<br>
|
|
15
|
+
Shadow DOM · Native form participation · Pixel parity with the class markup · Zero dependencies.
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://notionkit-elements.jungherz.com/">π Live Demo</a> ·
|
|
20
|
+
<a href="https://notionkit-elements.jungherz.com/docs.html">π Documentation</a> ·
|
|
21
|
+
<a href="https://notionkit-elements.jungherz.com/showcase.html">π¨ Showcase</a> ·
|
|
22
|
+
<a href="https://notionkit.jungherz.com/">π NotionKit CSS</a> ·
|
|
23
|
+
<a href="https://notionkit-web.jungherz.com/">π NotionKit Web</a> ·
|
|
24
|
+
<a href="SKILL.md">π€ SKILL.md</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## β¨ What is NotionKit Elements?
|
|
30
|
+
|
|
31
|
+
NotionKit Elements is the companion library to [NotionKit CSS](https://github.com/JUNGHERZ/NotionKit). It provides **70 Web Components** β from buttons and form controls over the sidebar, page tree and page shell to the settings modal, βK palette, database views and AI thread β that encapsulate the class markup of the foundation into simple, declarative custom elements.
|
|
9
32
|
|
|
10
|
-
|
|
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.
|
|
11
34
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
35
|
+
```html
|
|
36
|
+
<!-- Before: 6 elements, 6 classes -->
|
|
37
|
+
<div class="nk-field">
|
|
38
|
+
<div>
|
|
39
|
+
<div class="f-label">Email notifications</div>
|
|
40
|
+
<div class="f-desc">Shown next to your comments.</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="f-control"><button class="nk-switch" role="switch" aria-checked="true"></button></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- After: 2 elements, 0 classes -->
|
|
46
|
+
<nk-field label="Email notifications" desc="Shown next to your comments.">
|
|
47
|
+
<nk-switch checked></nk-switch>
|
|
48
|
+
</nk-field>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## π― Why NotionKit Elements?
|
|
54
|
+
|
|
55
|
+
| Feature | Details |
|
|
56
|
+
|---|---|
|
|
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
|
+
| π **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
|
+
| π§© **70 Elements** | Forms, content blocks, app shell & tree, page shell, overlays (modal, βK palette, menus, popover, emoji picker, toast), database table & board, comments, AI thread |
|
|
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
|
+
| π **Theme sync** | One observer mirrors `data-theme` on `<html>` into every element |
|
|
62
|
+
| πͺΆ **Lightweight** | 167 KB minified / 33 KB gzipped (IIFE, foundation sheet included), no external dependencies |
|
|
63
|
+
| π¦ **Four bundle shapes** | IIFE, minified IIFE, ESM, and per-component ESM entries with a shared chunk |
|
|
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
|
+
|
|
66
|
+
---
|
|
16
67
|
|
|
17
68
|
## Quick start
|
|
18
69
|
|
|
@@ -20,8 +71,8 @@ Vanilla-JS Web Components for the [NotionKit](https://notionkit.jungherz.com) CS
|
|
|
20
71
|
<!DOCTYPE html>
|
|
21
72
|
<html lang="en" data-theme="light">
|
|
22
73
|
<head>
|
|
23
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit@1.
|
|
24
|
-
<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.2.0/notionkit.min.css">
|
|
75
|
+
<script src="https://cdn.jsdelivr.net/npm/@jungherz-de/notionkit-elements@1.1.0/dist/notionkit-elements.min.js"></script>
|
|
25
76
|
</head>
|
|
26
77
|
<body class="nk-body">
|
|
27
78
|
<nk-field label="Display name" desc="Shown next to your comments">
|
|
@@ -42,7 +93,7 @@ import '@jungherz-de/notionkit-elements'; // everyt
|
|
|
42
93
|
import '@jungherz-de/notionkit-elements/components/nk-btn.js'; // or one element (shared code is one extra chunk)
|
|
43
94
|
```
|
|
44
95
|
|
|
45
|
-
Two prerequisites, always: `notionkit.css` on the document (the peer dependency, `>= 1.
|
|
96
|
+
Two prerequisites, always: `notionkit.css` on the document (the peer dependency, `>= 1.2.0`; 1.2.0 brings the `.nk-tab-bar` rules and is what the elements are built and tested against) 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.
|
|
46
97
|
|
|
47
98
|
## Elements
|
|
48
99
|
|
|
@@ -50,7 +101,7 @@ Two prerequisites, always: `notionkit.css` on the document (the peer dependency,
|
|
|
50
101
|
|---|---|
|
|
51
102
|
| Forms & controls | `nk-btn` `nk-input` `nk-textarea` `nk-select` `nk-switch` `nk-check` `nk-radio` `nk-slider` `nk-field` |
|
|
52
103
|
| Content | `nk-tag` `nk-progress` `nk-callout` `nk-divider` `nk-heading` `nk-toggle` `nk-todo` `nk-kbd` `nk-code` `nk-quote` |
|
|
53
|
-
| 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` |
|
|
104
|
+
| 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` |
|
|
54
105
|
| Page shell & blocks | `nk-page` `nk-page-cover` `nk-page-title` `nk-page-actions` `nk-block-host` `nk-banner` `nk-empty` `nk-skeleton` `nk-synced` `nk-tabs` `nk-tab` `nk-segmented` `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` |
|
|
55
106
|
| Overlays | `nk-modal` `nk-settings-pane` `nk-settings-user` `nk-cmdk` `nk-menu` `nk-menu-item` `nk-pop` `nk-emoji-picker` `nk-toast` |
|
|
56
107
|
| Data & collaboration | `nk-database` `nk-table-view` `nk-board-view` `nk-filter-bar` `nk-comments` `nk-comment` `nk-ai-thread` `nk-ai-msg` `nk-ai-input-row` (+ the exported `renderPropertyCell()`) |
|
|
@@ -81,10 +132,12 @@ npm run check:coverage && npm run check:versions
|
|
|
81
132
|
|
|
82
133
|
## The NotionKit family
|
|
83
134
|
|
|
84
|
-
| Layer |
|
|
85
|
-
|
|
86
|
-
| **NotionKit** β CSS foundation | [
|
|
87
|
-
| **NotionKit Elements** β this package |
|
|
88
|
-
| NotionKit Web β Astro template |
|
|
135
|
+
| Layer | Repository | Website |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| **NotionKit** β CSS foundation | [`JUNGHERZ/NotionKit`](https://github.com/JUNGHERZ/NotionKit) | [notionkit.jungherz.com](https://notionkit.jungherz.com) |
|
|
138
|
+
| **NotionKit Elements** β Web Components (this package) | [`JUNGHERZ/NotionKit-Elements`](https://github.com/JUNGHERZ/NotionKit-Elements) | [notionkit-elements.jungherz.com](https://notionkit-elements.jungherz.com) |
|
|
139
|
+
| **NotionKit Web** β Astro template for complete websites | [`JUNGHERZ/NotionKit-Web`](https://github.com/JUNGHERZ/NotionKit-Web) | [notionkit-web.jungherz.com](https://notionkit-web.jungherz.com) |
|
|
140
|
+
|
|
141
|
+
npm: [`@jungherz-de/notionkit`](https://www.npmjs.com/package/@jungherz-de/notionkit) Β· [`@jungherz-de/notionkit-elements`](https://www.npmjs.com/package/@jungherz-de/notionkit-elements)
|
|
89
142
|
|
|
90
|
-
MIT Β· Jungherz GmbH
|
|
143
|
+
MIT Β· [Jungherz GmbH](https://www.jungherz.com)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-ai-input-row placeholder="Ask Mona something β¦"></nk-ai-input-row>
|
|
4
4
|
// β <div class="nk-ai-input-row"><span>β¨</span><input><button class="nk-ai-send">β</button></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-ai-msg role="user" name="You" avatar="MK">Summarise the open tasks.</nk-ai-msg>
|
|
4
4
|
// <nk-ai-msg role="assistant" name="Mona" badge="Β· AI" avatar="β¨">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-banner variant="info">βΉοΈ <span>Text</span><span slot="action">Open</span></nk-banner>
|
|
4
4
|
// β <div class="nk-banner info">β¦<span class="b-action">Open</span></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-block-host handle><p>Editable content lives here.</p></nk-block-host>
|
|
4
4
|
// β <div class="nk-block-host"><span class="nk-block-handle">β Ώ</span>β¦</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
import { t as tagFor, r as renderPropertyCell } from './shared/property-cell-Dn91uFkf.js';
|
|
3
3
|
|
|
4
4
|
// <nk-board-view name="board" label="β€ Board" group-by="status" new-row></nk-board-view>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-btn variant="primary" small>Save</nk-btn> β <button class="nk-btn primary small">
|
|
4
4
|
// <nk-btn href="/docs" variant="secondary">Docs</nk-btn> β <a class="nk-btn secondary">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-check name="mail" value="weekly" checked>Weekly digest</nk-check>
|
|
4
4
|
// β <label class="nk-check"><input type="checkbox"> Weekly digest</label>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
import { l as lockScroll, i as inertOutside, u as unlockScroll } from './shared/focus-DXrK9oLe.js';
|
|
3
3
|
|
|
4
4
|
// Subsequence scoring for the command palette: every query character must
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// Minimal HTML highlighter emitting the .tag / .attr hooks .nk-code styles.
|
|
4
4
|
// Mirrors tools/highlight.mjs in the NotionKit foundation β no third-party
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-comment author="Sara Lindt" time="1 hr ago" avatar="SL" color="#448361">The board view feels close.</nk-comment>
|
|
4
4
|
// β <div class="nk-comment"><span class="mini-avatar">SL</span><div><div class="c-head"><b>Sara Lindt</b> Β· 1 hr ago</div><div class="c-body">β¦</div></div></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-empty icon="ποΈ" title="No entries yet" desc="Create the first one."><nk-btn variant="primary" small>οΌ New</nk-btn></nk-empty>
|
|
4
4
|
// β <div class="nk-empty"><div class="e-icon">ποΈ</div><div class="e-title">β¦</div><div class="e-desc">β¦</div>β¦</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-filter-bar search placeholder="Search rows β¦"></nk-filter-bar>
|
|
4
4
|
// bar.filters = [{ key: 'status', label: 'Status: Done', value: 'done' }];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-heading level="2">Section</nk-heading> β <h2 class="nk-heading">
|
|
4
4
|
// The heading level is real markup (h1βh4), so the outline stays honest.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-input name="title" value="β¦" placeholder="β¦" wide></nk-input> β <input class="nk-input wide">
|
|
4
4
|
// Takes part in the surrounding <form> through ElementInternals.
|
|
@@ -21,7 +21,7 @@ class NkInput extends NkFormElement {
|
|
|
21
21
|
|
|
22
22
|
_forward(attr) {
|
|
23
23
|
if (BOOLEANS.includes(attr)) {
|
|
24
|
-
this._input[attr === 'readonly' ? 'readOnly' : attr] = this.getBoolAttr(attr);
|
|
24
|
+
this._input[attr === 'readonly' ? 'readOnly' : attr] = this.getBoolAttr(attr) || (attr === 'disabled' && !!this._formDisabled);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const v = this.getAttribute(attr);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-member-list><nk-member-row β¦></nk-member-row>β¦</nk-member-list>
|
|
4
4
|
// β <div class="nk-member-list">β¦</div>; the last row gets `last` (no border).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-mention type="person"><span slot="avatar" class="mini-avatar" style="background:#448361">SL</span>Sara Lindt</nk-mention>
|
|
4
4
|
// <nk-mention type="page">π Onboarding</nk-mention> <nk-mention type="date">π
May 20</nk-mention>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-menu-item icon="βοΈ" shortcut="βE" value="rename">Rename</nk-menu-item>
|
|
4
4
|
// <nk-menu-item type="separator"></nk-menu-item> <nk-menu-item type="label">Danger</nk-menu-item>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
import { l as lockScroll, i as inertOutside, f as firstFocusable, u as unlockScroll } from './shared/focus-DXrK9oLe.js';
|
|
3
3
|
|
|
4
4
|
// <nk-modal id="settings">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-model-card name="model" value="gpt" title="Mona Pro" desc="Best for long documents" selected></nk-model-card>
|
|
4
4
|
// β <div class="nk-model-card selected"><div class="m-radio"></div><div><div class="m-name">β¦</div><div class="m-desc">β¦</div></div></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-page-actions><span>π€ Ada</span><span>π
12 May</span><span>π·οΈ <nk-tag color="purple">Design</nk-tag></span></nk-page-actions>
|
|
4
4
|
// β <div class="nk-page-meta">β¦</div> β the meta row under the title
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-page-cover slot="cover"></nk-page-cover> β the token gradient
|
|
4
4
|
// <nk-page-cover slot="cover" src="cover.jpg"></nk-page-cover> β an image
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-page-title>NotionKit MVP</nk-page-title> β <h1 class="nk-page-title">
|
|
4
4
|
// <nk-page-title editable placeholder="Untitled">β¦</nk-page-title>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-profile-row avatar="MK"><nk-btn variant="secondary" small>Change photo</nk-btn></nk-profile-row>
|
|
4
4
|
// β <div class="nk-profile-row"><div class="big-avatar">MK</div>β¦</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-quote cite="Ada Lovelace">The Analytical Engine weavesβ¦</nk-quote>
|
|
4
4
|
// .q-cite has no ::slotted() twin, so the citation is rendered here.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-radio name="style" value="concise" checked>Concise</nk-radio>
|
|
4
4
|
// β <label class="nk-check"><input type="radio"> Concise</label>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-select name="role" value="editor">
|
|
4
4
|
// <option value="viewer">Viewer</option>
|
|
@@ -27,7 +27,7 @@ class NkSelect extends NkFormElement {
|
|
|
27
27
|
name ? this._select.setAttribute('name', name) : this._select.removeAttribute('name');
|
|
28
28
|
const label = this.getAttribute('aria-label');
|
|
29
29
|
label ? this._select.setAttribute('aria-label', label) : this._select.removeAttribute('aria-label');
|
|
30
|
-
this._select.disabled = this.getBoolAttr('disabled');
|
|
30
|
+
this._select.disabled = this.getBoolAttr('disabled') || !!this._formDisabled;
|
|
31
31
|
this._select.required = this.getBoolAttr('required');
|
|
32
32
|
this._select.classList.toggle('compact', this.getBoolAttr('compact'));
|
|
33
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-settings-pane name="profile" label="My profile" icon="π€" group="Account" title="My profile" active>β¦</nk-settings-pane>
|
|
4
4
|
// β <section class="nk-settings-pane active"><h2>My profile</h2>β¦</section>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-settings-user slot="user" name="Marcel Karas" mail="marcel@β¦" avatar="MK"></nk-settings-user>
|
|
4
4
|
// β <div class="nk-settings-user"><div class="avatar">MK</div><div class="u-text"><div class="name">β¦</div><div class="mail">β¦</div></div></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NkFormElement } from './shared/base-
|
|
1
|
+
import { a as NkFormElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-slider name="size" min="12" max="18" value="14" show-value></nk-slider>
|
|
4
4
|
// β <input type="range" class="nk-slider"> <div class="nk-slider-value">14</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NkElement } from './shared/base-
|
|
1
|
+
import { N as NkElement } from './shared/base-BavgHsS-.js';
|
|
2
2
|
|
|
3
3
|
// <nk-stat label="Active pages" value="128" delta="β² 12 this week" trend="up"></nk-stat>
|
|
4
4
|
// β <div class="nk-stat"><div class="s-label">β¦</div><div class="s-value">β¦</div><div class="s-delta up">β¦</div></div>
|