@konopskidev/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/LICENSE +21 -0
- package/README.md +182 -2
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +101 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +14 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment.js +102 -0
- package/dist/components/ui/attachment.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +51 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +29 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +72 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble.js +73 -0
- package/dist/components/ui/bubble.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +40 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +22 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +61 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +111 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +26 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +76 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +132 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +21 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/code-block.d.ts +27 -0
- package/dist/components/ui/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block.js +123 -0
- package/dist/components/ui/code-block.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +174 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +90 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +125 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +98 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +12 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +16 -0
- package/dist/components/ui/direction.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +78 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +130 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +60 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +112 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +32 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +79 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +11 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +25 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +121 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +20 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/marker.js +41 -0
- package/dist/components/ui/marker.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/message-scroller.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +61 -0
- package/dist/components/ui/message-scroller.js.map +1 -0
- package/dist/components/ui/message.d.ts +11 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/message.js +50 -0
- package/dist/components/ui/message.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +9 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +39 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +81 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +81 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +23 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/questionnaire.d.ts +20 -0
- package/dist/components/ui/questionnaire.d.ts.map +1 -0
- package/dist/components/ui/questionnaire.js +172 -0
- package/dist/components/ui/questionnaire.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +27 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +102 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +380 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +13 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +8 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +40 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +14 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +35 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +22 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +67 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +48 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +37 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +11 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +53 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +37 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +38 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/trace.d.ts +19 -0
- package/dist/components/ui/trace.d.ts.map +1 -0
- package/dist/components/ui/trace.js +76 -0
- package/dist/components/ui/trace.js.map +1 -0
- package/dist/hooks/use-highlighted-code.d.ts +3 -0
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +22 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +67 -0
- package/dist/lib/get-placeholder.d.ts +6 -0
- package/dist/lib/get-placeholder.d.ts.map +1 -0
- package/dist/lib/get-placeholder.js +12 -0
- package/dist/lib/get-placeholder.js.map +1 -0
- package/dist/lib/highlighter.d.ts +10 -0
- package/dist/lib/highlighter.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +1 -0
- package/package.json +150 -4
- package/src/styles/base.css +70 -0
- package/src/styles/globals.css +33 -0
- package/src/styles/prose.css +105 -0
- package/src/styles/theme.css +108 -0
- package/src/styles/tokens.css +129 -0
- package/src/styles/utilities.css +57 -0
- package/src/styles/variants.css +649 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Long-form prose
|
|
3
|
+
* ===============
|
|
4
|
+
*
|
|
5
|
+
* Long-form typography needs descendant selectors, so it is a component class
|
|
6
|
+
* rather than a utility. Specificity stays low so a converter can override.
|
|
7
|
+
*
|
|
8
|
+
* `font-serif` is set here, unlike on the site where `<body>` supplied it: a
|
|
9
|
+
* library cannot assume anything about the app shell around it.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer components {
|
|
13
|
+
.prose-article {
|
|
14
|
+
@apply font-serif text-base leading-[1.75];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Descendant, not child: rich-text renderers wrap their output in their own
|
|
19
|
+
* container, so paragraphs are never direct children of this class.
|
|
20
|
+
*/
|
|
21
|
+
.prose-article p {
|
|
22
|
+
@apply mb-[1.15em];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.prose-article p:last-child {
|
|
26
|
+
@apply mb-0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Size and face come from the global heading scale; prose only owns the
|
|
31
|
+
* rhythm between blocks, so the two cannot drift apart.
|
|
32
|
+
*/
|
|
33
|
+
.prose-article h2 {
|
|
34
|
+
@apply mt-[2.2em] mb-[0.6em] scroll-mt-24;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.prose-article h3 {
|
|
38
|
+
@apply mt-[1.8em] mb-[0.5em] scroll-mt-24;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.prose-article h4 {
|
|
42
|
+
@apply mt-[1.6em] mb-[0.4em] scroll-mt-24;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.prose-article strong {
|
|
46
|
+
@apply font-semibold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Always underlined: primary-on-body text is 2.04:1 against the surrounding
|
|
51
|
+
* copy, so colour alone cannot mark these as links (WCAG 1.4.1).
|
|
52
|
+
*/
|
|
53
|
+
.prose-article a {
|
|
54
|
+
@apply text-primary underline underline-offset-4;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.prose-article ul,
|
|
58
|
+
.prose-article ol {
|
|
59
|
+
@apply my-[1.15em] pl-6;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.prose-article ul {
|
|
63
|
+
@apply list-disc;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.prose-article ol {
|
|
67
|
+
@apply list-decimal;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.prose-article li {
|
|
71
|
+
@apply mb-[0.4em];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* Inline code only. Highlighted blocks also render a <code> element (inside
|
|
76
|
+
* their own wrapper), so this must not match every code descendant.
|
|
77
|
+
*/
|
|
78
|
+
.prose-article :is(p, li, td, blockquote) > code {
|
|
79
|
+
@apply rounded-sm border border-border bg-code px-[0.35em] py-[0.1em] font-mono text-[0.85em];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.prose-article hr {
|
|
83
|
+
@apply my-10 border-border;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.prose-article img {
|
|
87
|
+
@apply border border-border;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.prose-article figure {
|
|
91
|
+
@apply my-8;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.prose-article figcaption {
|
|
95
|
+
@apply mt-2 text-sm text-muted-foreground;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.prose-article blockquote {
|
|
99
|
+
@apply my-[1.4em] border-l-2 border-primary/40 pl-5 text-muted-foreground italic;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.prose-article blockquote p:last-child {
|
|
103
|
+
@apply mb-0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* konopskidev theme
|
|
3
|
+
* =================
|
|
4
|
+
*
|
|
5
|
+
* Maps the raw tokens in `tokens.css` onto Tailwind utilities.
|
|
6
|
+
*
|
|
7
|
+
* `inline` keeps the `var()` reference at the use site, so `.dark` overrides of
|
|
8
|
+
* the tokens flow through every utility without redeclaring anything here.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Dark mode is the `.dark` class on an ancestor; `&:is(.dark *)` is the only
|
|
12
|
+
form that actually matches every element inside it. */
|
|
13
|
+
@custom-variant dark (&:is(.dark *));
|
|
14
|
+
|
|
15
|
+
@theme inline {
|
|
16
|
+
/*
|
|
17
|
+
* Type. The `--font-*` variables are set by the consuming app — konopskidev
|
|
18
|
+
* sets them with `next/font`, anything else can set them however it likes.
|
|
19
|
+
* The fallbacks matter: the site's original `var(--font-lato)` had none, so
|
|
20
|
+
* outside a `next/font` app the whole stack was invalid.
|
|
21
|
+
*/
|
|
22
|
+
--font-sans: var(--font-lato, 'Lato'), ui-sans-serif, system-ui, sans-serif;
|
|
23
|
+
--font-display: var(--font-playfair, 'Playfair Display'), ui-serif, Georgia, serif;
|
|
24
|
+
--font-serif: var(--font-lora, 'Lora'), ui-serif, Georgia, serif;
|
|
25
|
+
--font-mono: var(--font-jetbrains, 'JetBrains Mono'), ui-monospace, monospace;
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* Type scale. Body copy is 1rem (the browser default) and every heading step
|
|
29
|
+
* is a visible jump above it. The base heading rules and the `text-*`
|
|
30
|
+
* utilities both read these, so a heading size is declared exactly once.
|
|
31
|
+
*/
|
|
32
|
+
--text-display: clamp(2.25rem, 6vw, 3.5rem);
|
|
33
|
+
--text-display--line-height: 1.08;
|
|
34
|
+
--text-lead: 1.25rem;
|
|
35
|
+
--text-lead--line-height: 1.6;
|
|
36
|
+
--text-h1: clamp(2rem, 4.8vw, 2.75rem);
|
|
37
|
+
--text-h1--line-height: 1.12;
|
|
38
|
+
--text-h2: 1.75rem;
|
|
39
|
+
--text-h2--line-height: 1.2;
|
|
40
|
+
--text-h3: 1.375rem;
|
|
41
|
+
--text-h3--line-height: 1.3;
|
|
42
|
+
--text-h4: 1.125rem;
|
|
43
|
+
--text-h4--line-height: 1.4;
|
|
44
|
+
--text-h5: 1rem;
|
|
45
|
+
--text-h5--line-height: 1.5;
|
|
46
|
+
--text-h6: 0.875rem;
|
|
47
|
+
--text-h6--line-height: 1.5;
|
|
48
|
+
|
|
49
|
+
/* surfaces & text */
|
|
50
|
+
--color-background: var(--background);
|
|
51
|
+
--color-foreground: var(--foreground);
|
|
52
|
+
--color-card: var(--card);
|
|
53
|
+
--color-card-foreground: var(--card-foreground);
|
|
54
|
+
--color-popover: var(--popover);
|
|
55
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
56
|
+
--color-primary: var(--primary);
|
|
57
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
58
|
+
--color-secondary: var(--secondary);
|
|
59
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
60
|
+
--color-muted: var(--muted);
|
|
61
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
62
|
+
--color-accent: var(--accent);
|
|
63
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
64
|
+
--color-destructive: var(--destructive);
|
|
65
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
66
|
+
--color-border: var(--border);
|
|
67
|
+
--color-input: var(--input);
|
|
68
|
+
--color-ring: var(--ring);
|
|
69
|
+
|
|
70
|
+
/* code */
|
|
71
|
+
--color-code: var(--code);
|
|
72
|
+
--color-tok-fg: var(--tok-fg);
|
|
73
|
+
--color-tok-comment: var(--tok-comment);
|
|
74
|
+
--color-tok-punct: var(--tok-punct);
|
|
75
|
+
--color-tok-keyword: var(--tok-keyword);
|
|
76
|
+
--color-tok-string: var(--tok-string);
|
|
77
|
+
--color-tok-number: var(--tok-number);
|
|
78
|
+
--color-tok-function: var(--tok-function);
|
|
79
|
+
--color-tok-type: var(--tok-type);
|
|
80
|
+
|
|
81
|
+
/* charts */
|
|
82
|
+
--color-chart-1: var(--chart-1);
|
|
83
|
+
--color-chart-2: var(--chart-2);
|
|
84
|
+
--color-chart-3: var(--chart-3);
|
|
85
|
+
--color-chart-4: var(--chart-4);
|
|
86
|
+
--color-chart-5: var(--chart-5);
|
|
87
|
+
|
|
88
|
+
/* sidebar */
|
|
89
|
+
--color-sidebar: var(--sidebar);
|
|
90
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
91
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
92
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
93
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
94
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
95
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
96
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
97
|
+
|
|
98
|
+
/* layout */
|
|
99
|
+
--container-page: 67.5rem; /* 1080px */
|
|
100
|
+
--container-article: 42.5rem; /* 680px */
|
|
101
|
+
--container-toc: 13.75rem; /* 220px */
|
|
102
|
+
|
|
103
|
+
/* radius */
|
|
104
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
105
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
106
|
+
--radius-lg: var(--radius);
|
|
107
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
108
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* konopskidev tokens
|
|
3
|
+
* ==================
|
|
4
|
+
*
|
|
5
|
+
* Every value here is copied verbatim from konopskidev's
|
|
6
|
+
* `src/app/(website)/index.css`, so a component rendered from this package looks
|
|
7
|
+
* exactly like the same component on the site.
|
|
8
|
+
*
|
|
9
|
+
* Rules, inherited from the source file and worth keeping:
|
|
10
|
+
*
|
|
11
|
+
* 1. Values live unlayered so `.dark` can override them. Wrapping them in a
|
|
12
|
+
* layer would make the override lose against `@theme inline` utilities.
|
|
13
|
+
* 2. Tokens are referenced, never redefined, by `theme.css`. A colour is
|
|
14
|
+
* declared exactly once, here.
|
|
15
|
+
* 3. Dark mode is the `.dark` class on an ancestor (usually `<html>`), set by
|
|
16
|
+
* the consuming app.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--radius: 0.5rem;
|
|
21
|
+
|
|
22
|
+
--background: #fbfbfa;
|
|
23
|
+
--foreground: #1d2329;
|
|
24
|
+
|
|
25
|
+
--card: #ffffff;
|
|
26
|
+
--card-foreground: #1d2329;
|
|
27
|
+
--popover: #ffffff;
|
|
28
|
+
--popover-foreground: #1d2329;
|
|
29
|
+
|
|
30
|
+
--primary: #1f4fa3;
|
|
31
|
+
--primary-foreground: #ffffff;
|
|
32
|
+
--secondary: #f2f3f4;
|
|
33
|
+
--secondary-foreground: #1d2329;
|
|
34
|
+
--muted: #f2f3f4;
|
|
35
|
+
--muted-foreground: #5d6670;
|
|
36
|
+
--accent: #f2f3f4;
|
|
37
|
+
--accent-foreground: #1d2329;
|
|
38
|
+
--destructive: #b4362f;
|
|
39
|
+
--destructive-foreground: #ffffff;
|
|
40
|
+
|
|
41
|
+
--border: #e1e4e7;
|
|
42
|
+
--input: #d8dce0;
|
|
43
|
+
--ring: #1f4fa3;
|
|
44
|
+
|
|
45
|
+
--code: #f4f5f6;
|
|
46
|
+
--tok-fg: #1d2329;
|
|
47
|
+
--tok-comment: #666e77;
|
|
48
|
+
--tok-punct: #5d6670;
|
|
49
|
+
--tok-keyword: #1f4fa3;
|
|
50
|
+
--tok-string: #1f7a4d;
|
|
51
|
+
--tok-number: #a25d09;
|
|
52
|
+
--tok-function: #7a3fb0;
|
|
53
|
+
--tok-type: #0b6e99;
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* The site never charted anything, so the chart palette is derived from the
|
|
57
|
+
* syntax palette above: a chart, a code block and a diff then share one
|
|
58
|
+
* categorical colour language instead of introducing a second one.
|
|
59
|
+
*/
|
|
60
|
+
--chart-1: var(--tok-keyword);
|
|
61
|
+
--chart-2: var(--tok-string);
|
|
62
|
+
--chart-3: var(--tok-number);
|
|
63
|
+
--chart-4: var(--tok-function);
|
|
64
|
+
--chart-5: var(--tok-type);
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* Sidebar surfaces. Defined by reference so they follow the theme for free;
|
|
68
|
+
* `var()` inside a custom property resolves where it is used, not here.
|
|
69
|
+
*/
|
|
70
|
+
--sidebar: var(--card);
|
|
71
|
+
--sidebar-foreground: var(--foreground);
|
|
72
|
+
--sidebar-primary: var(--primary);
|
|
73
|
+
--sidebar-primary-foreground: var(--primary-foreground);
|
|
74
|
+
--sidebar-accent: var(--accent);
|
|
75
|
+
--sidebar-accent-foreground: var(--accent-foreground);
|
|
76
|
+
--sidebar-border: var(--border);
|
|
77
|
+
--sidebar-ring: var(--ring);
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Stacking scale. konopskidev's Dialog referenced `--z-index-modal` without
|
|
81
|
+
* it ever being defined, which silently disabled its z-index; the scale is
|
|
82
|
+
* declared here so every floating surface has somewhere to sit.
|
|
83
|
+
*/
|
|
84
|
+
--z-index-dropdown: 40;
|
|
85
|
+
--z-index-overlay: 50;
|
|
86
|
+
--z-index-modal: 50;
|
|
87
|
+
--z-index-popover: 60;
|
|
88
|
+
--z-index-toast: 70;
|
|
89
|
+
--z-index-tooltip: 80;
|
|
90
|
+
|
|
91
|
+
color-scheme: light;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.dark {
|
|
95
|
+
--background: #14181c;
|
|
96
|
+
--foreground: #e6e9ec;
|
|
97
|
+
|
|
98
|
+
--card: #171c21;
|
|
99
|
+
--card-foreground: #e6e9ec;
|
|
100
|
+
--popover: #171c21;
|
|
101
|
+
--popover-foreground: #e6e9ec;
|
|
102
|
+
|
|
103
|
+
--primary: #7aa7ee;
|
|
104
|
+
--primary-foreground: #14181c;
|
|
105
|
+
--secondary: #1c2227;
|
|
106
|
+
--secondary-foreground: #e6e9ec;
|
|
107
|
+
--muted: #1c2227;
|
|
108
|
+
--muted-foreground: #98a2ac;
|
|
109
|
+
--accent: #232a31;
|
|
110
|
+
--accent-foreground: #e6e9ec;
|
|
111
|
+
--destructive: #e07b73;
|
|
112
|
+
--destructive-foreground: #14181c;
|
|
113
|
+
|
|
114
|
+
--border: #2b333a;
|
|
115
|
+
--input: #333c44;
|
|
116
|
+
--ring: #7aa7ee;
|
|
117
|
+
|
|
118
|
+
--code: #1b2126;
|
|
119
|
+
--tok-fg: #e6e9ec;
|
|
120
|
+
--tok-comment: #848e97;
|
|
121
|
+
--tok-punct: #98a2ac;
|
|
122
|
+
--tok-keyword: #7aa7ee;
|
|
123
|
+
--tok-string: #7fd1a6;
|
|
124
|
+
--tok-number: #e0a04a;
|
|
125
|
+
--tok-function: #c4a1f0;
|
|
126
|
+
--tok-type: #6fc3e0;
|
|
127
|
+
|
|
128
|
+
color-scheme: dark;
|
|
129
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* konopskidev primitives
|
|
3
|
+
* ======================
|
|
4
|
+
*
|
|
5
|
+
* Single-purpose, variant-composable utilities. These are the vocabulary the
|
|
6
|
+
* site is written in, so they ship with the components rather than being
|
|
7
|
+
* re-invented per app.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@utility container-page {
|
|
11
|
+
@apply mx-auto w-full max-w-page px-6;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@utility container-prose {
|
|
15
|
+
@apply w-full max-w-article;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@utility stack {
|
|
19
|
+
@apply flex flex-col gap-4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@utility stack-tight {
|
|
23
|
+
@apply flex flex-col gap-2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@utility stack-loose {
|
|
27
|
+
@apply flex flex-col gap-8;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@utility eyebrow {
|
|
31
|
+
@apply font-sans text-xs font-medium tracking-[0.08em] text-muted-foreground uppercase;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Page and section headings are the h1 / h2 steps of the scale, set bolder. */
|
|
35
|
+
@utility page-title {
|
|
36
|
+
@apply font-display text-h1 font-bold;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@utility section-title {
|
|
40
|
+
@apply font-display text-h2 font-semibold;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@utility card {
|
|
44
|
+
@apply rounded-sm border border-border bg-card text-card-foreground;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* The house focus treatment: an outline, not a ring. It sits outside the box,
|
|
49
|
+
* never shifts layout, and is visible on every surface the tokens allow.
|
|
50
|
+
*/
|
|
51
|
+
@utility focus-ring {
|
|
52
|
+
@apply focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@utility container-grid {
|
|
56
|
+
@apply grid gap-6 md:grid-cols-2;
|
|
57
|
+
}
|