@kolkrabbi/kol-theme 0.30.2 → 0.31.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/kol-components-molecules.css +61 -0
- package/kol-components-organisms.css +8 -24
- package/kol-type-roles.css +12 -5
- package/package.json +1 -1
|
@@ -22,6 +22,67 @@
|
|
|
22
22
|
z-index: 110;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/* ── Dropdown — .kol-dd-* ─────────────────────────────────────────────────
|
|
26
|
+
* IMPLEMENTED 2026-08-09. Dropdown.jsx stamped these classes and the docs
|
|
27
|
+
* page recorded their contract (2026-07-08 chrome law) — but no stylesheet
|
|
28
|
+
* ever carried them, so triggers rendered gapless bare buttons at whatever
|
|
29
|
+
* width a resize listener guessed. The trigger IS button chrome (kol-btn
|
|
30
|
+
* rules own fill/focus); these add ONLY trigger layout + the open/panel
|
|
31
|
+
* fusion. No hover, no clicked state (2026-07-15 ruling) — rest and open. */
|
|
32
|
+
.kol-dd-trigger {
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
gap: var(--kol-spacing-1);
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
/* REST AND OPEN ARE THE ONLY STATES (2026-07-15 ruling, re-called 2026-08-09).
|
|
38
|
+
* The trigger wears button chrome, and button chrome hovers — so every
|
|
39
|
+
* kol-btn variant hover is PINNED BACK TO REST here. This sheet loads after
|
|
40
|
+
* atoms in the same layer, so the tie resolves to these rules. */
|
|
41
|
+
.kol-dd-trigger.kol-btn-primary:hover {
|
|
42
|
+
background: var(--kol-surface-secondary);
|
|
43
|
+
color: var(--kol-surface-on-primary);
|
|
44
|
+
}
|
|
45
|
+
.kol-dd-trigger.kol-btn-outline:hover {
|
|
46
|
+
background: transparent;
|
|
47
|
+
color: var(--kol-surface-on-primary);
|
|
48
|
+
border-color: var(--kol-oq-16);
|
|
49
|
+
}
|
|
50
|
+
/* ONE PIECE MEANS ONE WIDTH (2026-08-09 user call — "they are connected").
|
|
51
|
+
* The trigger reserves the widest option's width by stacking every label in
|
|
52
|
+
* one grid cell (hidden ghosts), so the panel — pinned to the trigger by
|
|
53
|
+
* matchReferenceWidth — is exactly as wide as the trigger at every value. */
|
|
54
|
+
.kol-dd-label { display: inline-grid; min-width: 0; }
|
|
55
|
+
.kol-dd-label > span { grid-area: 1 / 1; white-space: nowrap; }
|
|
56
|
+
.kol-dd-ghost { visibility: hidden; }
|
|
57
|
+
.kol-dd-caret {
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
transition: rotate var(--kol-transition-base);
|
|
60
|
+
}
|
|
61
|
+
.kol-dd-trigger[data-state="open"] .kol-dd-caret { rotate: 180deg; }
|
|
62
|
+
/* grey — the opaque oq-12 fill, dropdown-only (never a kol-btn-* variant) */
|
|
63
|
+
.kol-dd-trigger--grey {
|
|
64
|
+
background: var(--kol-oq-12);
|
|
65
|
+
color: var(--kol-surface-on-primary);
|
|
66
|
+
border: 1px solid transparent;
|
|
67
|
+
}
|
|
68
|
+
/* open/panel fusion — the open trigger and its panel read as ONE piece:
|
|
69
|
+
* trigger squares its bottom corners, panel squares its top, and the fill
|
|
70
|
+
* continues (panel offset is -1 in Dropdown.jsx for the same reason). */
|
|
71
|
+
.kol-dd-trigger--open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
|
72
|
+
.kol-dd-panel {
|
|
73
|
+
border-radius: 0 0 var(--kol-radius-sm) var(--kol-radius-sm);
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
.kol-dd-panel--primary { background: var(--kol-surface-secondary); }
|
|
77
|
+
.kol-dd-panel--grey { background: var(--kol-oq-12); }
|
|
78
|
+
.kol-dd-panel--outline {
|
|
79
|
+
background: var(--kol-surface-primary);
|
|
80
|
+
border: 1px solid var(--kol-oq-16);
|
|
81
|
+
border-top: none; /* the trigger's bottom edge is the divider (docs page) */
|
|
82
|
+
}
|
|
83
|
+
.kol-dd-div { border-top: 1px solid var(--kol-fg-08); }
|
|
84
|
+
.kol-dd-list { padding: var(--kol-spacing-1); }
|
|
85
|
+
|
|
25
86
|
/* Popover — default chrome for floating-ui-positioned panels.
|
|
26
87
|
* Used by molecules/Popover.jsx PopoverPanel. */
|
|
27
88
|
.kol-popover {
|
|
@@ -164,29 +164,17 @@
|
|
|
164
164
|
.kol-table-pill-dark { background-color: var(--kol-surface-on-primary); color: var(--kol-surface-primary); }
|
|
165
165
|
|
|
166
166
|
.kol-table-token {
|
|
167
|
+
/* THE LOOK LIVES IN ONE PLACE (2026-08-09) — the shared chip recipe in
|
|
168
|
+
* kol-type-roles.css (`.kol-prose code, .kol-doc-code-inline,
|
|
169
|
+
* .kol-table-token`): font, size, weight, colour, fill, padding, radius.
|
|
170
|
+
* This rule keeps only the CELL mechanics the prose chip must not have. */
|
|
167
171
|
display: inline-flex;
|
|
168
172
|
align-items: center;
|
|
169
|
-
padding: 2px 4px;
|
|
170
173
|
/* No outer margin: spacing is the CONTAINER's job. The margin here
|
|
171
174
|
* double-spaced against every flex row's own gap, which is the ragged
|
|
172
175
|
* rhythm the metadata rows showed. */
|
|
173
|
-
/* Radius is the shared chip radius, not a literal (2026-08-01). This one
|
|
174
|
-
* value was the last thing making a table token and a prose inline code chip
|
|
175
|
-
* read as two different objects — see the inline-code block in
|
|
176
|
-
* kol-type-roles.css, which owns the shared fill/radius/colour answer. */
|
|
177
|
-
border-radius: var(--kol-radius-sm);
|
|
178
|
-
font-family: var(--kol-font-family-mono);
|
|
179
|
-
font-size: 0.75rem;
|
|
180
|
-
font-weight: 400;
|
|
181
176
|
line-height: 1;
|
|
182
177
|
white-space: nowrap;
|
|
183
|
-
/* Carries its OWN fill as of 2026-08-01. The look lived only in the
|
|
184
|
-
* `.kol-table code` descendant rule below, so a token chip rendered right
|
|
185
|
-
* inside a table and completely unstyled anywhere else — which is why the
|
|
186
|
-
* component pages hand-rolled a Tailwind lookalike. One concept, two
|
|
187
|
-
* spellings: exactly the drift `.text-fg-*` vs `--kol-fg-*` taught. */
|
|
188
|
-
color: var(--kol-fg-80);
|
|
189
|
-
background-color: var(--kol-fg-08);
|
|
190
178
|
}
|
|
191
179
|
|
|
192
180
|
.kol-table-wrapper.kol-table--simple { border: none; border-radius: 0; }
|
|
@@ -207,14 +195,10 @@
|
|
|
207
195
|
.kol-table th:last-child,
|
|
208
196
|
.kol-table td:last-child { border-right: none; }
|
|
209
197
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
padding: 2px 5px;
|
|
215
|
-
background-color: var(--kol-fg-08);
|
|
216
|
-
border-radius: 3px;
|
|
217
|
-
}
|
|
198
|
+
/* `.kol-table code` — the THIRD spelling of the inline chip, found and folded
|
|
199
|
+
* 2026-08-09 (an off-scale font size and a bare radius literal). A bare
|
|
200
|
+
* <code> in a cell now takes the ONE recipe in kol-type-roles.css beside
|
|
201
|
+
* .kol-doc-code-inline and .kol-table-token. */
|
|
218
202
|
|
|
219
203
|
.kol-table a {
|
|
220
204
|
color: var(--kol-link);
|
package/kol-type-roles.css
CHANGED
|
@@ -117,16 +117,23 @@
|
|
|
117
117
|
* The two chips had drifted on every value that makes them look alike: fg-04
|
|
118
118
|
* against fg-08, radius-sm against a bare literal, no colour against fg-80.
|
|
119
119
|
* Same concept, two spellings — the `.text-fg-*` vs `--kol-fg-*` lesson again.
|
|
120
|
-
*
|
|
121
|
-
*
|
|
120
|
+
* ONE RECIPE NOW, size and padding included (user ruling 2026-08-09: "it's
|
|
121
|
+
* basically the same style, so why are they so different"). The earlier
|
|
122
|
+
* size-and-padding-stay-per-role line — relative-in-prose vs fixed-in-chrome
|
|
123
|
+
* — is reversed: the chip is CHROME wherever it appears, and it takes the
|
|
124
|
+
* chrome numbers (the table token's shipped values, not the prose em). Only
|
|
125
|
+
* wrap behaviour stays per context: prose chips wrap mid-phrase, the table
|
|
126
|
+
* token stays single-line — that lives in the organisms sheet. */
|
|
122
127
|
.kol-prose code,
|
|
123
|
-
.kol-doc-code-inline
|
|
128
|
+
.kol-doc-code-inline,
|
|
129
|
+
.kol-table-token,
|
|
130
|
+
.kol-table code {
|
|
124
131
|
font-family: var(--kol-font-family-mono);
|
|
125
|
-
font-size: 0.
|
|
132
|
+
font-size: 0.75rem;
|
|
126
133
|
font-weight: 400;
|
|
127
134
|
color: var(--kol-fg-80);
|
|
128
135
|
background: var(--kol-fg-08);
|
|
129
|
-
padding:
|
|
136
|
+
padding: 2px var(--kol-spacing-1);
|
|
130
137
|
border-radius: var(--kol-radius-sm);
|
|
131
138
|
}
|
|
132
139
|
/* code inside pre stays stripped (rule preserved from the prose sheet) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.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",
|