@kolkrabbi/kol-theme 0.3.0 → 0.5.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 CHANGED
@@ -19,6 +19,8 @@ In a Vite + Tailwind v4 app, import the barrel after Tailwind:
19
19
 
20
20
  Cascade order is load-bearing — `kol-theme` must come after Tailwind so its component classes and tokens resolve correctly. Individual files are also reachable (`@kolkrabbi/kol-theme/kol-color.css`, etc.) if you need finer control.
21
21
 
22
+ All KOL rule CSS lives in the `components` cascade layer, so your Tailwind utility classes always win over KOL chrome (`<Input className="hidden sm:block">` behaves as written). Your own unlayered CSS wins over everything KOL ships.
23
+
22
24
  ## Fonts
23
25
 
24
26
  The typography CSS references the brand fonts at absolute paths (`/fonts/Right-Grotesk/…`, `/fonts/jetbrains-mono/…`). **The package does not ship the font files** — your app must serve them from `/fonts/` (e.g. drop them in your `public/` dir). The showcase in this repo does exactly that. Without them, type falls back to system fonts.
@@ -267,20 +267,23 @@
267
267
  * ───────────────────────────────────────────────────────────────────── */
268
268
  .kol-seg {
269
269
  display: flex;
270
- height: 26px;
271
270
  border: 1px solid var(--kol-fg-04);
272
271
  border-radius: var(--kol-radius-sm);
273
272
  overflow: hidden;
274
273
  }
275
274
 
276
- .kol-seg--sm { height: 16px; }
275
+ /* Sizes mirror .kol-btn-{sm,md,lg} exactly: cell padding per size (below) +
276
+ * mono type (12/14/16) applied on the cell in JSX. Height is padding-driven,
277
+ * so a strip matches a Button of the same size. md is the base. */
278
+ .kol-seg--sm .kol-seg-cell { padding: 4px 12px; }
279
+ .kol-seg--lg .kol-seg-cell { padding: 8px 20px; }
277
280
 
278
281
  .kol-seg-cell {
279
282
  flex: 1;
280
283
  display: inline-flex;
281
284
  align-items: center;
282
285
  justify-content: center;
283
- padding: 0 10px;
286
+ padding: 6px 16px; /* md — .kol-btn-md */
284
287
  background: transparent;
285
288
  border: none;
286
289
  cursor: pointer;
@@ -45,6 +45,17 @@
45
45
  scrollbar-width: none;
46
46
  border: 1px solid var(--kol-fg-08);
47
47
  border-radius: 4px;
48
+ /* Scroll affordance: with the scrollbar hidden, a clipped table reads as
49
+ * cut-off data on narrow viewports. Edge shadows appear only on the
50
+ * scrollable side (surface-colored covers ride the content and mask them
51
+ * at the extremes). */
52
+ background:
53
+ linear-gradient(to right, var(--kol-surface-primary) 40%, transparent) left / 32px 100%,
54
+ linear-gradient(to left, var(--kol-surface-primary) 40%, transparent) right / 32px 100%,
55
+ linear-gradient(to right, var(--kol-fg-16), transparent) left / 14px 100%,
56
+ linear-gradient(to left, var(--kol-fg-16), transparent) right / 14px 100%;
57
+ background-repeat: no-repeat;
58
+ background-attachment: local, local, scroll, scroll;
48
59
  }
49
60
 
50
61
  .kol-table-wrapper::-webkit-scrollbar { display: none; }
package/kol-theme.css CHANGED
@@ -25,19 +25,25 @@
25
25
  * (NEW) → kol-utilities.css (curated slice of _new-css/utilities.css)
26
26
  */
27
27
 
28
- @import "./kol-base-tokens.css";
29
- @import "./kol-color.css";
30
- @import "./kol-opacity.css";
31
- @import "./kol-opaque.css";
32
- @import "./kol-typography.css";
33
- @import "./kol-typography-mono.css";
34
- @import "./kol-type-mono-classes.css";
35
- @import "./kol-utilities.css";
36
- @import "./kol-components-atoms.css";
37
- @import "./kol-components-molecules.css";
38
- @import "./kol-components-organisms.css";
28
+ /* Everything KOL ships lives in the `components` cascade layer. Tailwind v4
29
+ * declares `@layer theme, base, components, utilities` — layering here means
30
+ * consumer utility classes (a later layer) can always override KOL chrome,
31
+ * while KOL still beats preflight (`base`). Unlayered consumer CSS wins over
32
+ * all of it, as it should. */
33
+ @import "./kol-base-tokens.css" layer(components);
34
+ @import "./kol-color.css" layer(components);
35
+ @import "./kol-opacity.css" layer(components);
36
+ @import "./kol-opaque.css" layer(components);
37
+ @import "./kol-typography.css" layer(components);
38
+ @import "./kol-typography-mono.css" layer(components);
39
+ @import "./kol-type-mono-classes.css" layer(components);
40
+ @import "./kol-utilities.css" layer(components);
41
+ @import "./kol-components-atoms.css" layer(components);
42
+ @import "./kol-components-molecules.css" layer(components);
43
+ @import "./kol-components-organisms.css" layer(components);
39
44
 
40
45
  /* Theme-level design tokens */
46
+ @layer components {
41
47
  :root {
42
48
  /* Spacing scale (4px base) */
43
49
  --kol-spacing-1: 0.25rem; /* 4px */
@@ -108,3 +114,4 @@
108
114
  --kol-shadow-xl: 0 20px 25px rgba(255, 255, 255, 0.1);
109
115
  --kol-shadow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.04);
110
116
  }
117
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-theme",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "KOL (Kolkrabbi) design-system tokens + base CSS — brand-neutral. The canonical token/cascade layer every other KOL package and consumer builds on.",
5
5
  "license": "MIT",
6
6
  "type": "module",