@jigs.design/catalog 0.3.4 → 0.3.5
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/dist/shadcn.css +68 -0
- package/dist/styles.css +147 -6
- package/package.json +6 -5
package/dist/shadcn.css
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The default catalog in a shadcn/ui app's theme. Import it after
|
|
3
|
+
* `@jigs.design/catalog/styles.css`: it maps the catalog's tokens onto
|
|
4
|
+
* shadcn's variables, so a jig takes the app's colors, radius and font, and
|
|
5
|
+
* its dark mode with them (a `.dark` ancestor, or `color-scheme`).
|
|
6
|
+
*
|
|
7
|
+
* The tokens are set on the catalog's own elements, not on `:root`, so each
|
|
8
|
+
* `var()` reads the value of the nearest element that sets it, as shadcn's
|
|
9
|
+
* `.dark` does. Named chart hues keep their own colors, so "red" stays red;
|
|
10
|
+
* only the default series color, blue, takes `--chart-1`.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
:where([class^="pk-"], [class*=" pk-"]) {
|
|
14
|
+
--pk-font-sans: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
15
|
+
--pk-font-mono: var(--font-mono, ui-monospace, monospace);
|
|
16
|
+
|
|
17
|
+
--pk-text-prose: var(--foreground);
|
|
18
|
+
--pk-text-primary: var(--foreground);
|
|
19
|
+
--pk-text-emphasis: var(--foreground);
|
|
20
|
+
--pk-text-secondary: var(--muted-foreground);
|
|
21
|
+
--pk-text-tertiary: var(--muted-foreground);
|
|
22
|
+
--pk-text-danger: var(--destructive);
|
|
23
|
+
|
|
24
|
+
--pk-surface: var(--background);
|
|
25
|
+
--pk-surface-secondary: var(--muted);
|
|
26
|
+
--pk-surface-tertiary: var(--accent);
|
|
27
|
+
--pk-surface-elevated: var(--card);
|
|
28
|
+
--pk-surface-elevated-secondary: var(--muted);
|
|
29
|
+
|
|
30
|
+
--pk-border: var(--border);
|
|
31
|
+
--pk-border-subtle: var(--border);
|
|
32
|
+
--pk-border-strong: var(--input);
|
|
33
|
+
|
|
34
|
+
--pk-radius-sm: calc(var(--radius) - 4px);
|
|
35
|
+
--pk-radius-md: calc(var(--radius) - 2px);
|
|
36
|
+
--pk-radius-lg: var(--radius);
|
|
37
|
+
--pk-radius-xl: calc(var(--radius) + 4px);
|
|
38
|
+
|
|
39
|
+
--pk-color-primary: var(--primary);
|
|
40
|
+
--pk-color-primary-on: var(--primary-foreground);
|
|
41
|
+
--pk-color-primary-soft: var(--accent);
|
|
42
|
+
--pk-color-primary-text: var(--primary);
|
|
43
|
+
--pk-color-primary-border: var(--border);
|
|
44
|
+
|
|
45
|
+
--pk-color-secondary: var(--secondary);
|
|
46
|
+
--pk-color-secondary-on: var(--secondary-foreground);
|
|
47
|
+
--pk-color-secondary-soft: var(--muted);
|
|
48
|
+
--pk-color-secondary-text: var(--muted-foreground);
|
|
49
|
+
--pk-color-secondary-border: var(--border);
|
|
50
|
+
|
|
51
|
+
--pk-color-danger: var(--destructive);
|
|
52
|
+
--pk-color-danger-text: var(--destructive);
|
|
53
|
+
--pk-color-danger-soft: color-mix(
|
|
54
|
+
in oklab,
|
|
55
|
+
var(--destructive) 12%,
|
|
56
|
+
transparent
|
|
57
|
+
);
|
|
58
|
+
--pk-color-danger-border: color-mix(
|
|
59
|
+
in oklab,
|
|
60
|
+
var(--destructive) 40%,
|
|
61
|
+
transparent
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
--pk-chart-blue: var(--chart-1);
|
|
65
|
+
|
|
66
|
+
--pk-ring: var(--ring);
|
|
67
|
+
--pk-ring-soft: color-mix(in oklab, var(--ring) 30%, transparent);
|
|
68
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Styles for the default catalog's React registry.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Styles for the default catalog's React registry. Every class starts with
|
|
3
|
+
* `pk-` and every token with `--pk-`. Spacing props arrive as inline styles
|
|
4
|
+
* in steps of 4px; everything else is a class here.
|
|
5
|
+
*
|
|
6
|
+
* Light and dark: each color token has a light value on `:root`, and both
|
|
7
|
+
* values as `light-dark(light, dark)` under `@supports`. The catalog declares
|
|
8
|
+
* no color scheme of its own: it follows the page's `color-scheme`, and a
|
|
9
|
+
* `.dark` or `[data-theme="dark"]` ancestor (`.light`, `[data-theme="light"]`
|
|
10
|
+
* for the other way), the nearest one winning. A page that does nothing
|
|
11
|
+
* stays light. Override a token on `:root` or on an ancestor of the view;
|
|
12
|
+
* the tokens stay unregistered custom properties, so `light-dark()` resolves
|
|
13
|
+
* where each is used, against that element's scheme.
|
|
5
14
|
*/
|
|
6
15
|
|
|
7
16
|
:root {
|
|
@@ -151,7 +160,7 @@
|
|
|
151
160
|
--pk-chart-red: #e02e2a;
|
|
152
161
|
--pk-chart-yellow: #f5b800;
|
|
153
162
|
--pk-chart-pink: #e04c9a;
|
|
154
|
-
/* Text inside a chart-colored or gray fill: 4.5:1 or more on each */
|
|
163
|
+
/* Text inside a chart-colored or gray fill: 4.5:1 or more on each, in both schemes */
|
|
155
164
|
--pk-chart-ink: #000000;
|
|
156
165
|
|
|
157
166
|
/* Depth and focus */
|
|
@@ -161,6 +170,134 @@
|
|
|
161
170
|
--pk-ring-soft: rgb(2 133 255 / 0.16);
|
|
162
171
|
}
|
|
163
172
|
|
|
173
|
+
/*
|
|
174
|
+
* Each color token again, as its light value and its dark one, where
|
|
175
|
+
* `light-dark()` works. Without it a browser keeps the light values above:
|
|
176
|
+
* a custom property is never invalid when declared, so a second
|
|
177
|
+
* declaration on `:root` would win and leave every use of it unset.
|
|
178
|
+
*/
|
|
179
|
+
@supports (color: light-dark(#000, #fff)) {
|
|
180
|
+
:root {
|
|
181
|
+
--pk-text-prose: light-dark(#2b2b2b, #dcdcdc);
|
|
182
|
+
--pk-text-primary: light-dark(#0d0d0d, #f3f3f3);
|
|
183
|
+
--pk-text-emphasis: light-dark(#000000, #ffffff);
|
|
184
|
+
--pk-text-secondary: light-dark(#5d5d5d, #afafaf);
|
|
185
|
+
--pk-text-tertiary: light-dark(#8f8f8f, #8a8a8a);
|
|
186
|
+
--pk-text-success: light-dark(#008635, #40c870);
|
|
187
|
+
--pk-text-warning: light-dark(#b25e00, #f0a43c);
|
|
188
|
+
--pk-text-danger: light-dark(#d0251f, #ff6b63);
|
|
189
|
+
--pk-text-link: light-dark(#0169cc, #5aa9ff);
|
|
190
|
+
--pk-surface: light-dark(#ffffff, #1b1b1b);
|
|
191
|
+
--pk-surface-secondary: light-dark(#f9f9f9, #232323);
|
|
192
|
+
--pk-surface-tertiary: light-dark(#f3f3f3, #2b2b2b);
|
|
193
|
+
--pk-surface-elevated: light-dark(#ffffff, #242424);
|
|
194
|
+
--pk-surface-elevated-secondary: light-dark(#f7f7f8, #2c2c2c);
|
|
195
|
+
--pk-border: light-dark(rgb(13 13 13 / 0.1), rgb(255 255 255 / 0.12));
|
|
196
|
+
--pk-border-subtle: light-dark(
|
|
197
|
+
rgb(13 13 13 / 0.06),
|
|
198
|
+
rgb(255 255 255 / 0.07)
|
|
199
|
+
);
|
|
200
|
+
--pk-border-strong: light-dark(
|
|
201
|
+
rgb(13 13 13 / 0.18),
|
|
202
|
+
rgb(255 255 255 / 0.2)
|
|
203
|
+
);
|
|
204
|
+
--pk-color-primary: light-dark(#0d0d0d, #f3f3f3);
|
|
205
|
+
--pk-color-primary-on: light-dark(#ffffff, #0d0d0d);
|
|
206
|
+
--pk-color-primary-soft: light-dark(#f0f0f0, rgb(255 255 255 / 0.1));
|
|
207
|
+
--pk-color-primary-text: light-dark(#0d0d0d, #f3f3f3);
|
|
208
|
+
--pk-color-primary-border: light-dark(
|
|
209
|
+
rgb(13 13 13 / 0.18),
|
|
210
|
+
rgb(255 255 255 / 0.22)
|
|
211
|
+
);
|
|
212
|
+
--pk-color-secondary: light-dark(#ececec, #3a3a3a);
|
|
213
|
+
--pk-color-secondary-on: light-dark(#0d0d0d, #f3f3f3);
|
|
214
|
+
--pk-color-secondary-soft: light-dark(#f3f3f3, rgb(255 255 255 / 0.07));
|
|
215
|
+
--pk-color-secondary-text: light-dark(#5d5d5d, #b4b4b4);
|
|
216
|
+
--pk-color-secondary-border: light-dark(
|
|
217
|
+
rgb(13 13 13 / 0.14),
|
|
218
|
+
rgb(255 255 255 / 0.16)
|
|
219
|
+
);
|
|
220
|
+
--pk-color-info: light-dark(#0285ff, #0285ff);
|
|
221
|
+
--pk-color-info-on: light-dark(#ffffff, #ffffff);
|
|
222
|
+
--pk-color-info-soft: light-dark(#e8f3ff, rgb(2 133 255 / 0.2));
|
|
223
|
+
--pk-color-info-text: light-dark(#0169cc, #6cb2ff);
|
|
224
|
+
--pk-color-info-border: light-dark(
|
|
225
|
+
rgb(2 133 255 / 0.4),
|
|
226
|
+
rgb(2 133 255 / 0.5)
|
|
227
|
+
);
|
|
228
|
+
--pk-color-discovery: light-dark(#924ff7, #924ff7);
|
|
229
|
+
--pk-color-discovery-on: light-dark(#ffffff, #ffffff);
|
|
230
|
+
--pk-color-discovery-soft: light-dark(#f3ecfe, rgb(146 79 247 / 0.24));
|
|
231
|
+
--pk-color-discovery-text: light-dark(#7434d9, #c09bff);
|
|
232
|
+
--pk-color-discovery-border: light-dark(
|
|
233
|
+
rgb(146 79 247 / 0.4),
|
|
234
|
+
rgb(146 79 247 / 0.55)
|
|
235
|
+
);
|
|
236
|
+
--pk-color-success: light-dark(#00a240, #00a240);
|
|
237
|
+
--pk-color-success-on: light-dark(#ffffff, #ffffff);
|
|
238
|
+
--pk-color-success-soft: light-dark(#e6f6ec, rgb(0 162 64 / 0.2));
|
|
239
|
+
--pk-color-success-text: light-dark(#008635, #4cd07e);
|
|
240
|
+
--pk-color-success-border: light-dark(
|
|
241
|
+
rgb(0 162 64 / 0.4),
|
|
242
|
+
rgb(0 162 64 / 0.5)
|
|
243
|
+
);
|
|
244
|
+
--pk-color-caution: light-dark(#e25507, #e25507);
|
|
245
|
+
--pk-color-caution-on: light-dark(#ffffff, #ffffff);
|
|
246
|
+
--pk-color-caution-soft: light-dark(#fdefe7, rgb(226 85 7 / 0.22));
|
|
247
|
+
--pk-color-caution-text: light-dark(#b84300, #ff8f52);
|
|
248
|
+
--pk-color-caution-border: light-dark(
|
|
249
|
+
rgb(226 85 7 / 0.4),
|
|
250
|
+
rgb(226 85 7 / 0.55)
|
|
251
|
+
);
|
|
252
|
+
--pk-color-warning: light-dark(#f5a300, #f5a300);
|
|
253
|
+
--pk-color-warning-on: light-dark(#2b1d00, #2b1d00);
|
|
254
|
+
--pk-color-warning-soft: light-dark(#fef5df, rgb(245 163 0 / 0.18));
|
|
255
|
+
--pk-color-warning-text: light-dark(#9a5a00, #f7b84a);
|
|
256
|
+
--pk-color-warning-border: light-dark(
|
|
257
|
+
rgb(245 163 0 / 0.5),
|
|
258
|
+
rgb(245 163 0 / 0.5)
|
|
259
|
+
);
|
|
260
|
+
--pk-color-danger: light-dark(#e02e2a, #e02e2a);
|
|
261
|
+
--pk-color-danger-on: light-dark(#ffffff, #ffffff);
|
|
262
|
+
--pk-color-danger-soft: light-dark(#fdecec, rgb(224 46 42 / 0.22));
|
|
263
|
+
--pk-color-danger-text: light-dark(#c7221f, #ff7a73);
|
|
264
|
+
--pk-color-danger-border: light-dark(
|
|
265
|
+
rgb(224 46 42 / 0.4),
|
|
266
|
+
rgb(224 46 42 / 0.55)
|
|
267
|
+
);
|
|
268
|
+
--pk-chart-blue: light-dark(#0285ff, #3d9bff);
|
|
269
|
+
--pk-chart-purple: light-dark(#924ff7, #a77bff);
|
|
270
|
+
--pk-chart-orange: light-dark(#fb6a22, #ff8448);
|
|
271
|
+
--pk-chart-green: light-dark(#04b84c, #2ec866);
|
|
272
|
+
--pk-chart-red: light-dark(#e02e2a, #f2554f);
|
|
273
|
+
--pk-chart-yellow: light-dark(#f5b800, #f5c400);
|
|
274
|
+
--pk-chart-pink: light-dark(#e04c9a, #f06cb0);
|
|
275
|
+
--pk-shadow-sm: 0 1px 2px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.3));
|
|
276
|
+
--pk-shadow-md:
|
|
277
|
+
0 1px 2px light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.3)),
|
|
278
|
+
0 4px 16px light-dark(rgb(0 0 0 / 0.06), rgb(0 0 0 / 0.4));
|
|
279
|
+
--pk-ring: light-dark(rgb(2 133 255 / 0.55), rgb(90 169 255 / 0.6));
|
|
280
|
+
--pk-ring-soft: light-dark(rgb(2 133 255 / 0.16), rgb(90 169 255 / 0.22));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/*
|
|
285
|
+
* The host's dark-mode signal, for hosts that set a class or attribute and
|
|
286
|
+
* not `color-scheme`. `@scope` makes the nearest signal win, so a light
|
|
287
|
+
* island in a dark page stays light; a browser without it falls back to the
|
|
288
|
+
* page's `color-scheme`.
|
|
289
|
+
*/
|
|
290
|
+
@scope (:where(.dark, [data-theme="dark"])) {
|
|
291
|
+
:where([class^="pk-"], [class*=" pk-"]) {
|
|
292
|
+
color-scheme: dark;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
@scope (:where(.light, [data-theme="light"])) {
|
|
296
|
+
:where([class^="pk-"], [class*=" pk-"]) {
|
|
297
|
+
color-scheme: light;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
164
301
|
/* ---------- Base ---------- */
|
|
165
302
|
|
|
166
303
|
:where([class^="pk-"], [class*=" pk-"]) {
|
|
@@ -614,7 +751,11 @@
|
|
|
614
751
|
.pk-link {
|
|
615
752
|
color: var(--pk-text-link);
|
|
616
753
|
text-decoration: underline;
|
|
617
|
-
text-decoration-color:
|
|
754
|
+
text-decoration-color: color-mix(
|
|
755
|
+
in srgb,
|
|
756
|
+
var(--pk-text-link) 35%,
|
|
757
|
+
transparent
|
|
758
|
+
);
|
|
618
759
|
text-underline-offset: 2px;
|
|
619
760
|
}
|
|
620
761
|
.pk-link:hover {
|
|
@@ -791,7 +932,7 @@
|
|
|
791
932
|
border-color: transparent;
|
|
792
933
|
}
|
|
793
934
|
.pk-field--solid {
|
|
794
|
-
background:
|
|
935
|
+
background: var(--pk-color-secondary);
|
|
795
936
|
border-color: transparent;
|
|
796
937
|
}
|
|
797
938
|
.pk-field--ghost {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigs.design/catalog",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "The default catalog, modeled on ChatKit widgets, and a React registry for it.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"types": "./dist/react/index.d.ts",
|
|
27
27
|
"import": "./dist/react/index.js"
|
|
28
28
|
},
|
|
29
|
+
"./shadcn.css": "./dist/shadcn.css",
|
|
29
30
|
"./styles.css": "./dist/styles.css"
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
@@ -34,14 +35,14 @@
|
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"lucide-react": "1.57.0",
|
|
36
37
|
"recharts": "3.10.1",
|
|
37
|
-
"@jigs.design/host": "0.3.
|
|
38
|
-
"@jigs.design/react": "0.3.
|
|
38
|
+
"@jigs.design/host": "0.3.5",
|
|
39
|
+
"@jigs.design/react": "0.3.5"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"react": "^18.0.0 || ^19.0.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@jigs.design/prompt": "0.3.
|
|
45
|
-
"@jigs.design/server": "0.3.
|
|
45
|
+
"@jigs.design/prompt": "0.3.5",
|
|
46
|
+
"@jigs.design/server": "0.3.5"
|
|
46
47
|
}
|
|
47
48
|
}
|