@kujoforall/paper-ui 0.0.0-stage → 0.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/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +252 -2
- package/dist/components/editor/block-text.d.ts +8 -0
- package/dist/components/editor/block-text.d.ts.map +1 -0
- package/dist/components/editor/block-text.js +213 -0
- package/dist/components/editor/block-text.js.map +1 -0
- package/dist/components/editor/blocks.d.ts +33 -0
- package/dist/components/editor/blocks.d.ts.map +1 -0
- package/dist/components/editor/blocks.js +187 -0
- package/dist/components/editor/blocks.js.map +1 -0
- package/dist/components/editor/document-editor.d.ts +27 -0
- package/dist/components/editor/document-editor.d.ts.map +1 -0
- package/dist/components/editor/document-editor.js +40 -0
- package/dist/components/editor/document-editor.js.map +1 -0
- package/dist/components/editor/document-view.d.ts +22 -0
- package/dist/components/editor/document-view.d.ts.map +1 -0
- package/dist/components/editor/document-view.js +105 -0
- package/dist/components/editor/document-view.js.map +1 -0
- package/dist/components/editor/editor-state.d.ts +100 -0
- package/dist/components/editor/editor-state.d.ts.map +1 -0
- package/dist/components/editor/editor-state.js +192 -0
- package/dist/components/editor/editor-state.js.map +1 -0
- package/dist/components/editor/extensions/spoiler.d.ts +8 -0
- package/dist/components/editor/extensions/spoiler.d.ts.map +1 -0
- package/dist/components/editor/extensions/spoiler.js +36 -0
- package/dist/components/editor/extensions/spoiler.js.map +1 -0
- package/dist/components/editor/index.d.ts +9 -0
- package/dist/components/editor/index.d.ts.map +1 -0
- package/dist/components/editor/index.js +9 -0
- package/dist/components/editor/index.js.map +1 -0
- package/dist/components/editor/kinds.d.ts +99 -0
- package/dist/components/editor/kinds.d.ts.map +1 -0
- package/dist/components/editor/kinds.js +74 -0
- package/dist/components/editor/kinds.js.map +1 -0
- package/dist/components/sketch/rough.d.ts +38 -0
- package/dist/components/sketch/rough.d.ts.map +1 -0
- package/dist/components/sketch/rough.js +57 -0
- package/dist/components/sketch/rough.js.map +1 -0
- package/dist/components/ui/accent-picker.d.ts +2 -0
- package/dist/components/ui/accent-picker.d.ts.map +1 -0
- package/dist/components/ui/accent-picker.js +44 -0
- package/dist/components/ui/accent-picker.js.map +1 -0
- package/dist/components/ui/address-field.d.ts +10 -0
- package/dist/components/ui/address-field.d.ts.map +1 -0
- package/dist/components/ui/address-field.js +24 -0
- package/dist/components/ui/address-field.js.map +1 -0
- package/dist/components/ui/app-shell.d.ts +25 -0
- package/dist/components/ui/app-shell.d.ts.map +1 -0
- package/dist/components/ui/app-shell.js +69 -0
- package/dist/components/ui/app-shell.js.map +1 -0
- package/dist/components/ui/badge.d.ts +19 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +62 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumbs.d.ts +10 -0
- package/dist/components/ui/breadcrumbs.d.ts.map +1 -0
- package/dist/components/ui/breadcrumbs.js +9 -0
- package/dist/components/ui/breadcrumbs.js.map +1 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +45 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +5 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +64 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/callout.d.ts +13 -0
- package/dist/components/ui/callout.d.ts.map +1 -0
- package/dist/components/ui/callout.js +27 -0
- package/dist/components/ui/callout.js.map +1 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +27 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +10 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command-menu.d.ts +15 -0
- package/dist/components/ui/command-menu.d.ts.map +1 -0
- package/dist/components/ui/command-menu.js +24 -0
- package/dist/components/ui/command-menu.js.map +1 -0
- package/dist/components/ui/date-picker.d.ts +35 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +56 -0
- package/dist/components/ui/date-picker.js.map +1 -0
- package/dist/components/ui/date-time-picker.d.ts +19 -0
- package/dist/components/ui/date-time-picker.d.ts.map +1 -0
- package/dist/components/ui/date-time-picker.js +32 -0
- package/dist/components/ui/date-time-picker.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +33 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +20 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +56 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/editable-text.d.ts +17 -0
- package/dist/components/ui/editable-text.d.ts.map +1 -0
- package/dist/components/ui/editable-text.js +68 -0
- package/dist/components/ui/editable-text.js.map +1 -0
- package/dist/components/ui/field-button.d.ts +14 -0
- package/dist/components/ui/field-button.d.ts.map +1 -0
- package/dist/components/ui/field-button.js +16 -0
- package/dist/components/ui/field-button.js.map +1 -0
- package/dist/components/ui/file-preview.d.ts +5 -0
- package/dist/components/ui/file-preview.d.ts.map +1 -0
- package/dist/components/ui/file-preview.js +66 -0
- package/dist/components/ui/file-preview.js.map +1 -0
- package/dist/components/ui/file-uploader.d.ts +39 -0
- package/dist/components/ui/file-uploader.d.ts.map +1 -0
- package/dist/components/ui/file-uploader.js +110 -0
- package/dist/components/ui/file-uploader.js.map +1 -0
- package/dist/components/ui/handle-row.d.ts +15 -0
- package/dist/components/ui/handle-row.d.ts.map +1 -0
- package/dist/components/ui/handle-row.js +41 -0
- package/dist/components/ui/handle-row.js.map +1 -0
- package/dist/components/ui/image-block.d.ts +31 -0
- package/dist/components/ui/image-block.d.ts.map +1 -0
- package/dist/components/ui/image-block.js +103 -0
- package/dist/components/ui/image-block.js.map +1 -0
- package/dist/components/ui/image-card.d.ts +17 -0
- package/dist/components/ui/image-card.d.ts.map +1 -0
- package/dist/components/ui/image-card.js +38 -0
- package/dist/components/ui/image-card.js.map +1 -0
- package/dist/components/ui/image-viewer.d.ts +31 -0
- package/dist/components/ui/image-viewer.d.ts.map +1 -0
- package/dist/components/ui/image-viewer.js +81 -0
- package/dist/components/ui/image-viewer.js.map +1 -0
- package/dist/components/ui/image.d.ts +11 -0
- package/dist/components/ui/image.d.ts.map +1 -0
- package/dist/components/ui/image.js +32 -0
- package/dist/components/ui/image.js.map +1 -0
- package/dist/components/ui/index.d.ts +49 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +49 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/input.d.ts +16 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +32 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/link-block.d.ts +13 -0
- package/dist/components/ui/link-block.d.ts.map +1 -0
- package/dist/components/ui/link-block.js +21 -0
- package/dist/components/ui/link-block.js.map +1 -0
- package/dist/components/ui/mac-card.d.ts +15 -0
- package/dist/components/ui/mac-card.d.ts.map +1 -0
- package/dist/components/ui/mac-card.js +9 -0
- package/dist/components/ui/mac-card.js.map +1 -0
- package/dist/components/ui/nav-tree.d.ts +16 -0
- package/dist/components/ui/nav-tree.d.ts.map +1 -0
- package/dist/components/ui/nav-tree.js +34 -0
- package/dist/components/ui/nav-tree.js.map +1 -0
- package/dist/components/ui/page.d.ts +12 -0
- package/dist/components/ui/page.d.ts.map +1 -0
- package/dist/components/ui/page.js +15 -0
- package/dist/components/ui/page.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +18 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/property.d.ts +15 -0
- package/dist/components/ui/property.d.ts.map +1 -0
- package/dist/components/ui/property.js +34 -0
- package/dist/components/ui/property.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +13 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +10 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select-menu.d.ts +10 -0
- package/dist/components/ui/select-menu.d.ts.map +1 -0
- package/dist/components/ui/select-menu.js +10 -0
- package/dist/components/ui/select-menu.js.map +1 -0
- package/dist/components/ui/select.d.ts +11 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +31 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/selection-bar.d.ts +12 -0
- package/dist/components/ui/selection-bar.d.ts.map +1 -0
- package/dist/components/ui/selection-bar.js +15 -0
- package/dist/components/ui/selection-bar.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +12 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/spotlight.d.ts +23 -0
- package/dist/components/ui/spotlight.d.ts.map +1 -0
- package/dist/components/ui/spotlight.js +107 -0
- package/dist/components/ui/spotlight.js.map +1 -0
- package/dist/components/ui/stat-tile.d.ts +8 -0
- package/dist/components/ui/stat-tile.d.ts.map +1 -0
- package/dist/components/ui/stat-tile.js +9 -0
- package/dist/components/ui/stat-tile.js.map +1 -0
- package/dist/components/ui/step-dialog.d.ts +20 -0
- package/dist/components/ui/step-dialog.d.ts.map +1 -0
- package/dist/components/ui/step-dialog.js +36 -0
- package/dist/components/ui/step-dialog.js.map +1 -0
- package/dist/components/ui/table.d.ts +8 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +23 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/theme-toggle.d.ts +2 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.js +49 -0
- package/dist/components/ui/theme-toggle.js.map +1 -0
- package/dist/components/ui/time-picker.d.ts +21 -0
- package/dist/components/ui/time-picker.d.ts.map +1 -0
- package/dist/components/ui/time-picker.js +63 -0
- package/dist/components/ui/time-picker.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +15 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +21 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/typography.d.ts +34 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/components/ui/typography.js +72 -0
- package/dist/components/ui/typography.js.map +1 -0
- package/dist/components/ui/video-block.d.ts +14 -0
- package/dist/components/ui/video-block.d.ts.map +1 -0
- package/dist/components/ui/video-block.js +18 -0
- package/dist/components/ui/video-block.js.map +1 -0
- package/dist/hooks/use-save-queue.d.ts +13 -0
- package/dist/hooks/use-save-queue.d.ts.map +1 -0
- package/dist/hooks/use-save-queue.js +45 -0
- package/dist/hooks/use-save-queue.js.map +1 -0
- package/dist/hooks/use-selection.d.ts +10 -0
- package/dist/hooks/use-selection.d.ts.map +1 -0
- package/dist/hooks/use-selection.js +43 -0
- package/dist/hooks/use-selection.js.map +1 -0
- package/dist/hooks/use-shared-transition.d.ts +3 -0
- package/dist/hooks/use-shared-transition.d.ts.map +1 -0
- package/dist/hooks/use-shared-transition.js +38 -0
- package/dist/hooks/use-shared-transition.js.map +1 -0
- package/dist/hooks/use-upload-queue.d.ts +22 -0
- package/dist/hooks/use-upload-queue.d.ts.map +1 -0
- package/dist/hooks/use-upload-queue.js +78 -0
- package/dist/hooks/use-upload-queue.js.map +1 -0
- package/dist/lib/accent.d.ts +5 -0
- package/dist/lib/accent.d.ts.map +1 -0
- package/dist/lib/accent.js +10 -0
- package/dist/lib/accent.js.map +1 -0
- package/dist/lib/bento.d.ts +17 -0
- package/dist/lib/bento.d.ts.map +1 -0
- package/dist/lib/bento.js +92 -0
- package/dist/lib/bento.js.map +1 -0
- package/dist/lib/dates.d.ts +14 -0
- package/dist/lib/dates.d.ts.map +1 -0
- package/dist/lib/dates.js +34 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/document.d.ts +79 -0
- package/dist/lib/document.d.ts.map +1 -0
- package/dist/lib/document.js +11 -0
- package/dist/lib/document.js.map +1 -0
- package/dist/lib/embed.d.ts +14 -0
- package/dist/lib/embed.d.ts.map +1 -0
- package/dist/lib/embed.js +63 -0
- package/dist/lib/embed.js.map +1 -0
- package/dist/lib/files.d.ts +23 -0
- package/dist/lib/files.d.ts.map +1 -0
- package/dist/lib/files.js +69 -0
- package/dist/lib/files.js.map +1 -0
- package/dist/lib/justified.d.ts +50 -0
- package/dist/lib/justified.d.ts.map +1 -0
- package/dist/lib/justified.js +78 -0
- package/dist/lib/justified.js.map +1 -0
- package/dist/lib/rich-text-dom.d.ts +14 -0
- package/dist/lib/rich-text-dom.d.ts.map +1 -0
- package/dist/lib/rich-text-dom.js +143 -0
- package/dist/lib/rich-text-dom.js.map +1 -0
- package/dist/lib/rich-text.d.ts +15 -0
- package/dist/lib/rich-text.d.ts.map +1 -0
- package/dist/lib/rich-text.js +35 -0
- package/dist/lib/rich-text.js.map +1 -0
- package/dist/lib/spotlight.d.ts +22 -0
- package/dist/lib/spotlight.d.ts.map +1 -0
- package/dist/lib/spotlight.js +66 -0
- package/dist/lib/spotlight.js.map +1 -0
- package/dist/lib/tree.d.ts +17 -0
- package/dist/lib/tree.d.ts.map +1 -0
- package/dist/lib/tree.js +35 -0
- package/dist/lib/tree.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles/notion.css +526 -0
- package/package.json +106 -5
- package/src/components/editor/block-text.tsx +230 -0
- package/src/components/editor/blocks.tsx +368 -0
- package/src/components/editor/document-editor.tsx +101 -0
- package/src/components/editor/document-view.tsx +192 -0
- package/src/components/editor/editor-state.tsx +270 -0
- package/src/components/editor/extensions/spoiler.tsx +76 -0
- package/src/components/editor/index.ts +9 -0
- package/src/components/editor/kinds.ts +158 -0
- package/src/components/sketch/rough.tsx +90 -0
- package/src/components/ui/accent-picker.tsx +72 -0
- package/src/components/ui/address-field.tsx +57 -0
- package/src/components/ui/app-shell.tsx +138 -0
- package/src/components/ui/badge.tsx +81 -0
- package/src/components/ui/breadcrumbs.tsx +25 -0
- package/src/components/ui/button.tsx +73 -0
- package/src/components/ui/calendar.tsx +100 -0
- package/src/components/ui/callout.tsx +62 -0
- package/src/components/ui/card.tsx +90 -0
- package/src/components/ui/checkbox.tsx +32 -0
- package/src/components/ui/command-menu.tsx +72 -0
- package/src/components/ui/date-picker.tsx +170 -0
- package/src/components/ui/date-time-picker.tsx +117 -0
- package/src/components/ui/dialog.tsx +124 -0
- package/src/components/ui/dropdown-menu.tsx +183 -0
- package/src/components/ui/editable-text.tsx +109 -0
- package/src/components/ui/field-button.tsx +68 -0
- package/src/components/ui/file-preview.tsx +80 -0
- package/src/components/ui/file-uploader.tsx +376 -0
- package/src/components/ui/handle-row.tsx +116 -0
- package/src/components/ui/image-block.tsx +238 -0
- package/src/components/ui/image-card.tsx +102 -0
- package/src/components/ui/image-viewer.tsx +187 -0
- package/src/components/ui/image.tsx +96 -0
- package/src/components/ui/index.ts +83 -0
- package/src/components/ui/input.tsx +99 -0
- package/src/components/ui/link-block.tsx +82 -0
- package/src/components/ui/mac-card.tsx +46 -0
- package/src/components/ui/nav-tree.tsx +86 -0
- package/src/components/ui/page.tsx +25 -0
- package/src/components/ui/popover.tsx +42 -0
- package/src/components/ui/progress.tsx +36 -0
- package/src/components/ui/property.tsx +64 -0
- package/src/components/ui/segmented.tsx +42 -0
- package/src/components/ui/select-menu.tsx +46 -0
- package/src/components/ui/select.tsx +124 -0
- package/src/components/ui/selection-bar.tsx +50 -0
- package/src/components/ui/separator.tsx +30 -0
- package/src/components/ui/spotlight.tsx +222 -0
- package/src/components/ui/stat-tile.tsx +25 -0
- package/src/components/ui/step-dialog.tsx +104 -0
- package/src/components/ui/table.tsx +42 -0
- package/src/components/ui/theme-toggle.tsx +101 -0
- package/src/components/ui/time-picker.tsx +173 -0
- package/src/components/ui/tooltip.tsx +64 -0
- package/src/components/ui/typography.tsx +168 -0
- package/src/components/ui/video-block.tsx +60 -0
- package/src/hooks/use-save-queue.ts +66 -0
- package/src/hooks/use-selection.ts +44 -0
- package/src/hooks/use-shared-transition.ts +40 -0
- package/src/hooks/use-upload-queue.ts +111 -0
- package/src/lib/accent.ts +11 -0
- package/src/lib/bento.ts +87 -0
- package/src/lib/dates.ts +39 -0
- package/src/lib/document.ts +55 -0
- package/src/lib/embed.ts +62 -0
- package/src/lib/files.ts +73 -0
- package/src/lib/justified.ts +106 -0
- package/src/lib/rich-text-dom.ts +136 -0
- package/src/lib/rich-text.ts +50 -0
- package/src/lib/spotlight.ts +78 -0
- package/src/lib/tree.ts +41 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/notion.css +526 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/* The kit's stylesheet. An app imports Tailwind first, then this:
|
|
2
|
+
|
|
3
|
+
@import "tailwindcss";
|
|
4
|
+
@import "@kujoforall/paper-ui/styles.css";
|
|
5
|
+
|
|
6
|
+
It does not import Tailwind itself, so an app never gets two copies.
|
|
7
|
+
@source points Tailwind at the kit's own files, here and in the published
|
|
8
|
+
package alike, so the classes the components use are generated without the
|
|
9
|
+
app having to know where the kit lives. */
|
|
10
|
+
@source "..";
|
|
11
|
+
|
|
12
|
+
/* Class-based dark mode (Tailwind v4 needs this declared explicitly). */
|
|
13
|
+
@custom-variant dark (&:is(.dark *));
|
|
14
|
+
|
|
15
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
16
|
+
1. SOURCE OF TRUTH
|
|
17
|
+
Every value in the system lives here. Change these 40 lines and the
|
|
18
|
+
entire component set re-skins. Nothing below hardcodes a colour.
|
|
19
|
+
|
|
20
|
+
The governing rule: ONE INK, MANY ALPHAS. Secondary text, borders,
|
|
21
|
+
hover tints and dividers are all the same warm near-black at
|
|
22
|
+
different opacities — never separate greys. That is why nothing in
|
|
23
|
+
a Notion UI ever clashes.
|
|
24
|
+
══════════════════════════════════════════════════════════════════════ */
|
|
25
|
+
|
|
26
|
+
:root {
|
|
27
|
+
color-scheme: light;
|
|
28
|
+
|
|
29
|
+
/* ── Surfaces ─────────────────────────────────────────────────── */
|
|
30
|
+
/* Each surface is its neutral with a wash of the accent mixed in. The
|
|
31
|
+
wash is nothing until a colour theme is chosen (data-accent on <html>,
|
|
32
|
+
below), so the default is the plain paper in the comments. A chosen
|
|
33
|
+
theme tints the page, the sidebar and the menus together. */
|
|
34
|
+
--wash: 0%;
|
|
35
|
+
--surface: color-mix(in oklab, var(--accent) var(--wash), #ffffff);
|
|
36
|
+
--surface-sunken: color-mix(in oklab, var(--accent) calc(var(--wash) * 2.2), #f7f6f3); /* warm, not grey — sidebars, wells */
|
|
37
|
+
--surface-raised: color-mix(in oklab, var(--accent) calc(var(--wash) * 0.5), #ffffff); /* cards sitting on sunken */
|
|
38
|
+
--surface-overlay: color-mix(in oklab, var(--accent) calc(var(--wash) * 0.5), #ffffff); /* menus, dialogs */
|
|
39
|
+
|
|
40
|
+
/* ── Ink: #37352f, a warm brown-black. Never pure #000. ───────── */
|
|
41
|
+
--ink: #37352f;
|
|
42
|
+
--ink-secondary: rgb(55 53 47 / 0.65);
|
|
43
|
+
--ink-tertiary: rgb(55 53 47 / 0.5);
|
|
44
|
+
--ink-disabled: rgb(55 53 47 / 0.35);
|
|
45
|
+
--ink-inverse: #ffffff;
|
|
46
|
+
|
|
47
|
+
/* ── Lines & tints, derived from the same ink ─────────────────── */
|
|
48
|
+
--hairline: rgb(55 53 47 / 0.09); /* dividers whisper */
|
|
49
|
+
--hairline-strong: rgb(55 53 47 / 0.16); /* input borders */
|
|
50
|
+
--tint-hover: rgb(55 53 47 / 0.055); /* hover is a TINT, */
|
|
51
|
+
--tint-active: rgb(55 53 47 / 0.08); /* never a border */
|
|
52
|
+
|
|
53
|
+
/* ── Accent: used only for interactive affordance ─────────────── */
|
|
54
|
+
/* One colour per accent theme; the rest are mixed from it, so adding a theme
|
|
55
|
+
is one line here and one in `.dark`. */
|
|
56
|
+
--accent: #2383e2;
|
|
57
|
+
--accent-hover: color-mix(in oklab, var(--accent) 86%, black);
|
|
58
|
+
--accent-tint: color-mix(in srgb, var(--accent) 11%, transparent);
|
|
59
|
+
--accent-ink: #ffffff;
|
|
60
|
+
/* Accent for words: pulled toward the ink so it reads as text, not as a link. */
|
|
61
|
+
--accent-text: color-mix(in oklab, var(--accent) 78%, #37352f);
|
|
62
|
+
|
|
63
|
+
--danger: #d44c47;
|
|
64
|
+
--danger-hover: #be3f3a;
|
|
65
|
+
--danger-tint: rgb(212 76 71 / 0.1);
|
|
66
|
+
|
|
67
|
+
--focus-ring: color-mix(in srgb, var(--accent) 40%, transparent);
|
|
68
|
+
|
|
69
|
+
/* ── Layered shadows ──────────────────────────────────────────────
|
|
70
|
+
The 1px ambient ring in slot one is the whole trick. It keeps a
|
|
71
|
+
white popover crisp against a white page; without it, soft
|
|
72
|
+
shadows alone read as mush. */
|
|
73
|
+
--shadow-xs: 0 0 0 1px rgb(15 15 15 / 0.05);
|
|
74
|
+
--shadow-sm:
|
|
75
|
+
0 0 0 1px rgb(15 15 15 / 0.05), 0 1px 2px rgb(15 15 15 / 0.07);
|
|
76
|
+
--shadow-md:
|
|
77
|
+
0 0 0 1px rgb(15 15 15 / 0.05), 0 2px 4px rgb(15 15 15 / 0.06),
|
|
78
|
+
0 4px 8px rgb(15 15 15 / 0.06);
|
|
79
|
+
--shadow-popover:
|
|
80
|
+
0 0 0 1px rgb(15 15 15 / 0.05), 0 3px 6px rgb(15 15 15 / 0.1),
|
|
81
|
+
0 9px 24px rgb(15 15 15 / 0.2);
|
|
82
|
+
--shadow-dialog:
|
|
83
|
+
0 0 0 1px rgb(15 15 15 / 0.05), 0 8px 16px rgb(15 15 15 / 0.12),
|
|
84
|
+
0 24px 48px rgb(15 15 15 / 0.22);
|
|
85
|
+
--shadow-inset: inset 0 0 0 1px rgb(55 53 47 / 0.16);
|
|
86
|
+
|
|
87
|
+
/* ── The nine. Desaturated on purpose: twenty tags on one page
|
|
88
|
+
must not fight each other. Each is a bg + a same-hue ink. ── */
|
|
89
|
+
--tag-gray-bg: #f1f1ef;
|
|
90
|
+
--tag-gray-ink: #787774;
|
|
91
|
+
--tag-brown-bg: #f4eeee;
|
|
92
|
+
--tag-brown-ink: #9f6b53;
|
|
93
|
+
--tag-orange-bg: #fbecdd;
|
|
94
|
+
--tag-orange-ink: #d9730d;
|
|
95
|
+
--tag-yellow-bg: #fbf3db;
|
|
96
|
+
--tag-yellow-ink: #cb912f;
|
|
97
|
+
--tag-green-bg: #edf3ec;
|
|
98
|
+
--tag-green-ink: #448361;
|
|
99
|
+
--tag-blue-bg: #e7f3f8;
|
|
100
|
+
--tag-blue-ink: #337ea9;
|
|
101
|
+
--tag-purple-bg: #f6f3f9;
|
|
102
|
+
--tag-purple-ink: #9065b0;
|
|
103
|
+
--tag-pink-bg: #faf1f5;
|
|
104
|
+
--tag-pink-ink: #c14c8a;
|
|
105
|
+
--tag-red-bg: #fdebec;
|
|
106
|
+
--tag-red-ink: #d44c47;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dark {
|
|
110
|
+
color-scheme: dark;
|
|
111
|
+
|
|
112
|
+
--surface: color-mix(in oklab, var(--accent) var(--wash), #191919);
|
|
113
|
+
--surface-sunken: color-mix(in oklab, var(--accent) calc(var(--wash) * 1.6), #202020);
|
|
114
|
+
--surface-raised: color-mix(in oklab, var(--accent) calc(var(--wash) * 1.6), #202020);
|
|
115
|
+
--surface-overlay: color-mix(in oklab, var(--accent) calc(var(--wash) * 1.6), #252525);
|
|
116
|
+
|
|
117
|
+
/* Dark-mode ink is white at 81% — pure white vibrates on dark. */
|
|
118
|
+
--ink: rgb(255 255 255 / 0.81);
|
|
119
|
+
--ink-secondary: rgb(255 255 255 / 0.56);
|
|
120
|
+
--ink-tertiary: rgb(255 255 255 / 0.42);
|
|
121
|
+
--ink-disabled: rgb(255 255 255 / 0.28);
|
|
122
|
+
--ink-inverse: #191919;
|
|
123
|
+
|
|
124
|
+
--hairline: rgb(255 255 255 / 0.094);
|
|
125
|
+
--hairline-strong: rgb(255 255 255 / 0.16);
|
|
126
|
+
--tint-hover: rgb(255 255 255 / 0.055);
|
|
127
|
+
--tint-active: rgb(255 255 255 / 0.09);
|
|
128
|
+
|
|
129
|
+
--accent: #2383e2;
|
|
130
|
+
--accent-hover: color-mix(in oklab, var(--accent) 86%, white);
|
|
131
|
+
--accent-tint: color-mix(in srgb, var(--accent) 18%, transparent);
|
|
132
|
+
--accent-ink: #ffffff;
|
|
133
|
+
--accent-text: color-mix(in oklab, var(--accent) 62%, white);
|
|
134
|
+
|
|
135
|
+
--danger: #ff7369;
|
|
136
|
+
--danger-hover: #ff8b83;
|
|
137
|
+
--danger-tint: rgb(255 115 105 / 0.14);
|
|
138
|
+
|
|
139
|
+
--focus-ring: color-mix(in srgb, var(--accent) 50%, transparent);
|
|
140
|
+
|
|
141
|
+
/* Dark needs a lighter ring and a heavier drop: on a dark canvas
|
|
142
|
+
the ring does the separating and the blur does the lifting. */
|
|
143
|
+
--shadow-xs: 0 0 0 1px rgb(255 255 255 / 0.07);
|
|
144
|
+
--shadow-sm:
|
|
145
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 1px 2px rgb(0 0 0 / 0.3);
|
|
146
|
+
--shadow-md:
|
|
147
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 2px 4px rgb(0 0 0 / 0.3),
|
|
148
|
+
0 4px 8px rgb(0 0 0 / 0.26);
|
|
149
|
+
--shadow-popover:
|
|
150
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 3px 6px rgb(0 0 0 / 0.36),
|
|
151
|
+
0 9px 24px rgb(0 0 0 / 0.44);
|
|
152
|
+
--shadow-dialog:
|
|
153
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 8px 16px rgb(0 0 0 / 0.4),
|
|
154
|
+
0 24px 48px rgb(0 0 0 / 0.5);
|
|
155
|
+
--shadow-inset: inset 0 0 0 1px rgb(255 255 255 / 0.16);
|
|
156
|
+
|
|
157
|
+
--tag-gray-bg: #2f2f2f;
|
|
158
|
+
--tag-gray-ink: #9b9b9b;
|
|
159
|
+
--tag-brown-bg: #4a3228;
|
|
160
|
+
--tag-brown-ink: #ba856f;
|
|
161
|
+
--tag-orange-bg: #5c3b23;
|
|
162
|
+
--tag-orange-ink: #c77d48;
|
|
163
|
+
--tag-yellow-bg: #564328;
|
|
164
|
+
--tag-yellow-ink: #ca9849;
|
|
165
|
+
--tag-green-bg: #243d30;
|
|
166
|
+
--tag-green-ink: #529e72;
|
|
167
|
+
--tag-blue-bg: #143a4e;
|
|
168
|
+
--tag-blue-ink: #5e87c9;
|
|
169
|
+
--tag-purple-bg: #3c2d49;
|
|
170
|
+
--tag-purple-ink: #9d68d3;
|
|
171
|
+
--tag-pink-bg: #4e2c3c;
|
|
172
|
+
--tag-pink-ink: #d15796;
|
|
173
|
+
--tag-red-bg: #522e2a;
|
|
174
|
+
--tag-red-ink: #ff7369;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* ── Accent themes. Chosen in the sidebar, set as data-accent on <html>. The hues
|
|
178
|
+
are the tag inks, so an accent never clashes with a badge beside it. ──────── */
|
|
179
|
+
/* A chosen theme also washes every surface with its colour: the background
|
|
180
|
+
matches the accent. Stronger in dark, where the same share of colour reads
|
|
181
|
+
as less. With no data-accent the page is plain paper with the blue accent.
|
|
182
|
+
Mind that in dark mode surface-raised and surface-sunken are one colour:
|
|
183
|
+
draw one on the other and it vanishes; use a tint instead. */
|
|
184
|
+
[data-accent] { --wash: 5%; }
|
|
185
|
+
.dark[data-accent] { --wash: 9%; }
|
|
186
|
+
[data-accent="blue"] { --accent: #2383e2; }
|
|
187
|
+
[data-accent="green"] { --accent: #448361; }
|
|
188
|
+
[data-accent="purple"] { --accent: #9065b0; }
|
|
189
|
+
[data-accent="pink"] { --accent: #c14c8a; }
|
|
190
|
+
[data-accent="orange"] { --accent: #d9730d; }
|
|
191
|
+
[data-accent="red"] { --accent: #d44c47; }
|
|
192
|
+
[data-accent="brown"] { --accent: #9f6b53; }
|
|
193
|
+
.dark [data-accent="blue"] { --accent: #2383e2; }
|
|
194
|
+
.dark [data-accent="green"] { --accent: #529e72; }
|
|
195
|
+
.dark [data-accent="purple"] { --accent: #9d68d3; }
|
|
196
|
+
.dark [data-accent="pink"] { --accent: #d15796; }
|
|
197
|
+
.dark [data-accent="orange"] { --accent: #c77d48; }
|
|
198
|
+
.dark [data-accent="red"] { --accent: #e5645b; }
|
|
199
|
+
.dark [data-accent="brown"] { --accent: #ba856f; }
|
|
200
|
+
.dark[data-accent="green"] { --accent: #529e72; }
|
|
201
|
+
.dark[data-accent="purple"] { --accent: #9d68d3; }
|
|
202
|
+
.dark[data-accent="pink"] { --accent: #d15796; }
|
|
203
|
+
.dark[data-accent="orange"] { --accent: #c77d48; }
|
|
204
|
+
.dark[data-accent="red"] { --accent: #e5645b; }
|
|
205
|
+
.dark[data-accent="brown"] { --accent: #ba856f; }
|
|
206
|
+
|
|
207
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
208
|
+
2. TAILWIND THEME
|
|
209
|
+
`inline` makes utilities emit var() references, so one class works in
|
|
210
|
+
both themes. Everything above becomes bg-surface, text-ink-secondary,
|
|
211
|
+
border-hairline, shadow-popover, bg-tag-blue-bg …
|
|
212
|
+
══════════════════════════════════════════════════════════════════════ */
|
|
213
|
+
|
|
214
|
+
@theme inline {
|
|
215
|
+
--color-surface: var(--surface);
|
|
216
|
+
--color-surface-sunken: var(--surface-sunken);
|
|
217
|
+
--color-surface-raised: var(--surface-raised);
|
|
218
|
+
--color-surface-overlay: var(--surface-overlay);
|
|
219
|
+
|
|
220
|
+
--color-ink: var(--ink);
|
|
221
|
+
--color-ink-secondary: var(--ink-secondary);
|
|
222
|
+
--color-ink-tertiary: var(--ink-tertiary);
|
|
223
|
+
--color-ink-disabled: var(--ink-disabled);
|
|
224
|
+
--color-ink-inverse: var(--ink-inverse);
|
|
225
|
+
|
|
226
|
+
--color-hairline: var(--hairline);
|
|
227
|
+
--color-hairline-strong: var(--hairline-strong);
|
|
228
|
+
--color-tint-hover: var(--tint-hover);
|
|
229
|
+
--color-tint-active: var(--tint-active);
|
|
230
|
+
|
|
231
|
+
--color-accent: var(--accent);
|
|
232
|
+
--color-accent-hover: var(--accent-hover);
|
|
233
|
+
--color-accent-tint: var(--accent-tint);
|
|
234
|
+
--color-accent-ink: var(--accent-ink);
|
|
235
|
+
--color-accent-text: var(--accent-text);
|
|
236
|
+
--color-danger: var(--danger);
|
|
237
|
+
--color-danger-hover: var(--danger-hover);
|
|
238
|
+
--color-danger-tint: var(--danger-tint);
|
|
239
|
+
|
|
240
|
+
--color-tag-gray-bg: var(--tag-gray-bg);
|
|
241
|
+
--color-tag-gray-ink: var(--tag-gray-ink);
|
|
242
|
+
--color-tag-brown-bg: var(--tag-brown-bg);
|
|
243
|
+
--color-tag-brown-ink: var(--tag-brown-ink);
|
|
244
|
+
--color-tag-orange-bg: var(--tag-orange-bg);
|
|
245
|
+
--color-tag-orange-ink: var(--tag-orange-ink);
|
|
246
|
+
--color-tag-yellow-bg: var(--tag-yellow-bg);
|
|
247
|
+
--color-tag-yellow-ink: var(--tag-yellow-ink);
|
|
248
|
+
--color-tag-green-bg: var(--tag-green-bg);
|
|
249
|
+
--color-tag-green-ink: var(--tag-green-ink);
|
|
250
|
+
--color-tag-blue-bg: var(--tag-blue-bg);
|
|
251
|
+
--color-tag-blue-ink: var(--tag-blue-ink);
|
|
252
|
+
--color-tag-purple-bg: var(--tag-purple-bg);
|
|
253
|
+
--color-tag-purple-ink: var(--tag-purple-ink);
|
|
254
|
+
--color-tag-pink-bg: var(--tag-pink-bg);
|
|
255
|
+
--color-tag-pink-ink: var(--tag-pink-ink);
|
|
256
|
+
--color-tag-red-bg: var(--tag-red-bg);
|
|
257
|
+
--color-tag-red-ink: var(--tag-red-ink);
|
|
258
|
+
|
|
259
|
+
--shadow-xs: var(--shadow-xs);
|
|
260
|
+
--shadow-sm: var(--shadow-sm);
|
|
261
|
+
--shadow-md: var(--shadow-md);
|
|
262
|
+
--shadow-popover: var(--shadow-popover);
|
|
263
|
+
--shadow-dialog: var(--shadow-dialog);
|
|
264
|
+
--inset-shadow-field: var(--shadow-inset);
|
|
265
|
+
|
|
266
|
+
/* ── Families: a system stack, so text renders native everywhere
|
|
267
|
+
and ships zero webfont bytes. Serif + mono are first-class,
|
|
268
|
+
exactly as Notion treats its three document fonts. ────────── */
|
|
269
|
+
--font-sans:
|
|
270
|
+
ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
|
|
271
|
+
"Apple Color Emoji", Arial, sans-serif;
|
|
272
|
+
--font-serif: Lyon-Text, Georgia, ui-serif, "Times New Roman", serif;
|
|
273
|
+
/* Handwriting, for sketches only. Load Caveat yourself (next/font sets
|
|
274
|
+
--font-caveat; a <link> works too) or the fallbacks apply. */
|
|
275
|
+
--font-hand: var(--font-caveat, "Caveat"), "Comic Sans MS", "Chalkboard SE", cursive;
|
|
276
|
+
--font-mono:
|
|
277
|
+
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
|
278
|
+
"Liberation Mono", monospace;
|
|
279
|
+
|
|
280
|
+
/* ── Type scale. The negative tracking on large sizes is what
|
|
281
|
+
separates "designed" from "default browser". Headings sit
|
|
282
|
+
at 1.3; body opens up to 1.5 for long-form reading. ──────── */
|
|
283
|
+
/* A page's name: the largest thing on it, tight enough to read as one
|
|
284
|
+
shape, and scaled to the window. */
|
|
285
|
+
--text-display: clamp(2.5rem, 1.6rem + 3.2vw, 3.75rem);
|
|
286
|
+
--text-display--line-height: 1.05;
|
|
287
|
+
--text-display--letter-spacing: -0.035em;
|
|
288
|
+
--text-display--font-weight: 700;
|
|
289
|
+
|
|
290
|
+
--text-title: 2.5rem;
|
|
291
|
+
--text-title--line-height: 1.2;
|
|
292
|
+
--text-title--letter-spacing: -0.022em;
|
|
293
|
+
--text-title--font-weight: 700;
|
|
294
|
+
|
|
295
|
+
--text-h1: 1.875rem;
|
|
296
|
+
--text-h1--line-height: 1.3;
|
|
297
|
+
--text-h1--letter-spacing: -0.018em;
|
|
298
|
+
--text-h1--font-weight: 600;
|
|
299
|
+
|
|
300
|
+
--text-h2: 1.5rem;
|
|
301
|
+
--text-h2--line-height: 1.3;
|
|
302
|
+
--text-h2--letter-spacing: -0.014em;
|
|
303
|
+
--text-h2--font-weight: 600;
|
|
304
|
+
|
|
305
|
+
--text-h3: 1.25rem;
|
|
306
|
+
--text-h3--line-height: 1.3;
|
|
307
|
+
--text-h3--letter-spacing: -0.01em;
|
|
308
|
+
--text-h3--font-weight: 600;
|
|
309
|
+
|
|
310
|
+
--text-body: 1rem;
|
|
311
|
+
--text-body--line-height: 1.5;
|
|
312
|
+
--text-body--letter-spacing: -0.003em;
|
|
313
|
+
|
|
314
|
+
--text-sm: 0.875rem;
|
|
315
|
+
--text-sm--line-height: 1.5;
|
|
316
|
+
|
|
317
|
+
--text-caption: 0.75rem;
|
|
318
|
+
--text-caption--line-height: 1.4;
|
|
319
|
+
|
|
320
|
+
/* ── Radii: small and restrained. Notion never goes pill. ─────── */
|
|
321
|
+
--radius-control: 4px;
|
|
322
|
+
--radius-surface: 8px;
|
|
323
|
+
--radius-overlay: 10px;
|
|
324
|
+
|
|
325
|
+
/* ── Content measure: a hard reading column regardless of
|
|
326
|
+
viewport. Long lines are the #1 killer of "clean". ───────── */
|
|
327
|
+
--spacing-measure: 44rem; /* ~708px, Notion's page width */
|
|
328
|
+
|
|
329
|
+
--ease-out-notion: cubic-bezier(0.22, 1, 0.36, 1);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
333
|
+
3. BASE
|
|
334
|
+
══════════════════════════════════════════════════════════════════════ */
|
|
335
|
+
|
|
336
|
+
@layer base {
|
|
337
|
+
* {
|
|
338
|
+
border-color: var(--hairline);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
html {
|
|
342
|
+
-webkit-tap-highlight-color: transparent;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
body {
|
|
346
|
+
background-color: var(--surface);
|
|
347
|
+
color: var(--ink);
|
|
348
|
+
font-family: var(--font-sans);
|
|
349
|
+
font-size: var(--text-body);
|
|
350
|
+
line-height: 1.5;
|
|
351
|
+
letter-spacing: -0.003em;
|
|
352
|
+
-webkit-font-smoothing: antialiased;
|
|
353
|
+
-moz-osx-font-smoothing: grayscale;
|
|
354
|
+
text-rendering: optimizeLegibility;
|
|
355
|
+
/* A long URL or product code wraps instead of pushing its container wider. */
|
|
356
|
+
overflow-wrap: break-word;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* One focus treatment for the whole system: a soft accent halo,
|
|
360
|
+
never the default browser outline. */
|
|
361
|
+
:focus-visible {
|
|
362
|
+
outline: 2px solid var(--focus-ring);
|
|
363
|
+
outline-offset: 1px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
::selection {
|
|
367
|
+
background-color: var(--accent-tint);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
::placeholder {
|
|
371
|
+
color: var(--ink-tertiary);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
376
|
+
4. UTILITIES
|
|
377
|
+
══════════════════════════════════════════════════════════════════════ */
|
|
378
|
+
|
|
379
|
+
/* Hover-reveal: Notion's core interaction move. The control is present
|
|
380
|
+
and accessible but invisible until the row is hovered or it takes
|
|
381
|
+
keyboard focus. Put `group` on the row, `affordance` on the control. */
|
|
382
|
+
@utility affordance {
|
|
383
|
+
opacity: 0;
|
|
384
|
+
transition: opacity 120ms var(--ease-out-notion);
|
|
385
|
+
|
|
386
|
+
@variant group-hover {
|
|
387
|
+
opacity: 1;
|
|
388
|
+
}
|
|
389
|
+
@variant focus-visible {
|
|
390
|
+
opacity: 1;
|
|
391
|
+
}
|
|
392
|
+
@variant focus-within {
|
|
393
|
+
opacity: 1;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* The reading column. */
|
|
398
|
+
@utility measure {
|
|
399
|
+
width: 100%;
|
|
400
|
+
max-width: var(--spacing-measure);
|
|
401
|
+
margin-inline: auto;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
405
|
+
5. MOTION
|
|
406
|
+
Fast and flat. 120–140ms fades for overlays, a 2% scale on dialogs,
|
|
407
|
+
and nothing else. No springs, no bounce, no stagger. Motion here is
|
|
408
|
+
for continuity — telling you where a surface came from — not for
|
|
409
|
+
delight. Anything over 200ms starts to feel like latency.
|
|
410
|
+
══════════════════════════════════════════════════════════════════════ */
|
|
411
|
+
|
|
412
|
+
@theme {
|
|
413
|
+
--animate-fade-in: fade-in 120ms var(--ease-out-notion);
|
|
414
|
+
--animate-fade-out: fade-out 100ms ease-in;
|
|
415
|
+
--animate-scale-in: scale-in 140ms var(--ease-out-notion);
|
|
416
|
+
--animate-scale-out: scale-out 100ms ease-in;
|
|
417
|
+
--animate-slide-in: slide-in 130ms var(--ease-out-notion);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@keyframes fade-in {
|
|
421
|
+
from {
|
|
422
|
+
opacity: 0;
|
|
423
|
+
}
|
|
424
|
+
to {
|
|
425
|
+
opacity: 1;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
@keyframes fade-out {
|
|
430
|
+
from {
|
|
431
|
+
opacity: 1;
|
|
432
|
+
}
|
|
433
|
+
to {
|
|
434
|
+
opacity: 0;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Scale only. The dialog is centred with the `translate` property, which composes
|
|
439
|
+
with `transform`; translating here as well would move it twice while this runs. */
|
|
440
|
+
@keyframes scale-in {
|
|
441
|
+
from {
|
|
442
|
+
opacity: 0;
|
|
443
|
+
transform: scale(0.98);
|
|
444
|
+
}
|
|
445
|
+
to {
|
|
446
|
+
opacity: 1;
|
|
447
|
+
transform: scale(1);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
@keyframes scale-out {
|
|
452
|
+
from {
|
|
453
|
+
opacity: 1;
|
|
454
|
+
transform: scale(1);
|
|
455
|
+
}
|
|
456
|
+
to {
|
|
457
|
+
opacity: 0;
|
|
458
|
+
transform: scale(0.98);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
@keyframes slide-in {
|
|
463
|
+
from {
|
|
464
|
+
opacity: 0;
|
|
465
|
+
transform: scale(0.97) translateY(-2px);
|
|
466
|
+
}
|
|
467
|
+
to {
|
|
468
|
+
opacity: 1;
|
|
469
|
+
transform: scale(1) translateY(0);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* Stepping from one thing to the next in a sequence: a carousel's pictures, a
|
|
474
|
+
multi-step dialog's panes. The new one arrives from the side it was on.
|
|
475
|
+
Set --from to -1 for the previous one and 1 for the next. */
|
|
476
|
+
@theme {
|
|
477
|
+
--animate-step-in: step-in 180ms var(--ease-out-notion);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
@keyframes step-in {
|
|
481
|
+
from {
|
|
482
|
+
opacity: 0;
|
|
483
|
+
transform: translateX(calc(var(--from, 1) * 28px));
|
|
484
|
+
}
|
|
485
|
+
to {
|
|
486
|
+
opacity: 1;
|
|
487
|
+
transform: translateX(0);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* Growing one element out of another with View Transitions: a thumbnail into
|
|
492
|
+
a full view and back. The two carry the name "shared" (one at a time; see
|
|
493
|
+
hooks/use-shared-transition); the rest of the page cross-fades underneath.
|
|
494
|
+
240ms is past the 200ms rule on purpose: a shorter move across a large
|
|
495
|
+
screen reads as a jump. */
|
|
496
|
+
::view-transition-group(shared) {
|
|
497
|
+
animation-duration: 240ms;
|
|
498
|
+
animation-timing-function: var(--ease-out-notion);
|
|
499
|
+
}
|
|
500
|
+
/* A thumbnail crops its picture and the full view does not, so the two
|
|
501
|
+
snapshots differ in shape. Both are made to fill the moving box, cropped,
|
|
502
|
+
and no distortion shows between them. */
|
|
503
|
+
::view-transition-old(shared),
|
|
504
|
+
::view-transition-new(shared) {
|
|
505
|
+
height: 100%;
|
|
506
|
+
object-fit: cover;
|
|
507
|
+
}
|
|
508
|
+
::view-transition-old(root),
|
|
509
|
+
::view-transition-new(root) {
|
|
510
|
+
animation-duration: 180ms;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
@media (prefers-reduced-motion: reduce) {
|
|
514
|
+
::view-transition-group(*),
|
|
515
|
+
::view-transition-old(*),
|
|
516
|
+
::view-transition-new(*) {
|
|
517
|
+
animation: none !important;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
*,
|
|
521
|
+
*::before,
|
|
522
|
+
*::after {
|
|
523
|
+
animation-duration: 0.01ms !important;
|
|
524
|
+
transition-duration: 0.01ms !important;
|
|
525
|
+
}
|
|
526
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,107 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@kujoforall/paper-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A quiet, Notion-flavoured React component kit: one ink, nine pastels, layered shadows, typographic hierarchy.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/nandanjp/notion-ui.git"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src/components",
|
|
14
|
+
"src/lib",
|
|
15
|
+
"src/hooks",
|
|
16
|
+
"src/styles",
|
|
17
|
+
"README.md",
|
|
18
|
+
"CHANGELOG.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": [
|
|
22
|
+
"**/*.css"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/components/ui/index.d.ts",
|
|
27
|
+
"default": "./dist/components/ui/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./editor": {
|
|
30
|
+
"types": "./dist/components/editor/index.d.ts",
|
|
31
|
+
"default": "./dist/components/editor/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./sketch": {
|
|
34
|
+
"types": "./dist/components/sketch/rough.d.ts",
|
|
35
|
+
"default": "./dist/components/sketch/rough.js"
|
|
36
|
+
},
|
|
37
|
+
"./hooks/*": {
|
|
38
|
+
"types": "./dist/hooks/*.d.ts",
|
|
39
|
+
"default": "./dist/hooks/*.js"
|
|
40
|
+
},
|
|
41
|
+
"./lib/*": {
|
|
42
|
+
"types": "./dist/lib/*.d.ts",
|
|
43
|
+
"default": "./dist/lib/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./styles.css": "./dist/styles/notion.css",
|
|
46
|
+
"./package.json": "./package.json"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"dev": "vite",
|
|
53
|
+
"build": "npm run build:lib",
|
|
54
|
+
"build:lib": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/finish-build.mjs --verbose",
|
|
55
|
+
"dev:lib": "node scripts/watch-lib.mjs",
|
|
56
|
+
"build:site": "vite build",
|
|
57
|
+
"preview": "vite preview",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"smoke": "node scripts/smoke.mjs",
|
|
61
|
+
"prepublishOnly": "npm run build:lib",
|
|
62
|
+
"release": "changeset publish",
|
|
63
|
+
"changeset": "changeset"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"react": "^19.0.0",
|
|
67
|
+
"react-dom": "^19.0.0",
|
|
68
|
+
"tailwindcss": "^4.0.0"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
72
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
73
|
+
"@radix-ui/react-popover": "^1.3.1",
|
|
74
|
+
"@radix-ui/react-select": "^2.4.1",
|
|
75
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
76
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
77
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
78
|
+
"class-variance-authority": "^0.7.1",
|
|
79
|
+
"clsx": "^2.1.1",
|
|
80
|
+
"framer-motion": "^12.0.0",
|
|
81
|
+
"lucide-react": "^0.475.0",
|
|
82
|
+
"react-day-picker": "^10.0.2",
|
|
83
|
+
"roughjs": "^4.6.6",
|
|
84
|
+
"tailwind-merge": "^3.0.1"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@changesets/cli": "^2.31.1",
|
|
88
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
89
|
+
"@testing-library/jest-dom": "^8.0.0",
|
|
90
|
+
"@testing-library/react": "^16.3.3",
|
|
91
|
+
"@testing-library/user-event": "^14.6.14",
|
|
92
|
+
"@types/react": "^19.0.0",
|
|
93
|
+
"@types/react-dom": "^19.0.0",
|
|
94
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
95
|
+
"jsdom": "^31.0.1",
|
|
96
|
+
"react": "^19.0.0",
|
|
97
|
+
"react-dom": "^19.0.0",
|
|
98
|
+
"tailwindcss": "^4.0.0",
|
|
99
|
+
"typescript": "^5.7.0",
|
|
100
|
+
"vite": "^6.0.0",
|
|
101
|
+
"vitest": "^5.1.2"
|
|
102
|
+
},
|
|
103
|
+
"allowScripts": {
|
|
104
|
+
"esbuild@0.25.12": true,
|
|
105
|
+
"fsevents@2.3.3": true
|
|
106
|
+
}
|
|
107
|
+
}
|