@nextlyhq/ui 0.0.2-alpha.72 → 0.0.2-alpha.74

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/theme.css CHANGED
@@ -279,29 +279,8 @@
279
279
  * Perfect Fourth Scale (1.333 ratio) - WCAG 2.2 AA Compliant
280
280
  * ============================================ */
281
281
 
282
- /* Font Families live in the non-inline @theme block below. */
283
-
284
- /* Type Scale - Base Size: 16px (1rem) */
285
- --text-xs: 0.75rem;
286
- /* 12px */
287
- --text-sm: 0.875rem;
288
- /* 14px */
289
- --text-base: 1rem;
290
- /* 16px - body text (WCAG minimum) */
291
- --text-lg: 1.125rem;
292
- /* 18px */
293
- --text-xl: 1.25rem;
294
- /* 20px */
295
- --text-2xl: 1.5rem;
296
- /* 24px */
297
- --text-3xl: 1.875rem;
298
- /* 30px */
299
- --text-4xl: 2.25rem;
300
- /* 36px */
301
- --text-5xl: 3rem;
302
- /* 48px */
303
- --text-6xl: 3.75rem;
304
- /* 60px */
282
+ /* Font families, the type scale and the spacing scale live in the
283
+ * non-inline @theme blocks below. */
305
284
 
306
285
  /* Line Heights (Leading) */
307
286
  --leading-none: 1;
@@ -331,57 +310,6 @@
331
310
  --tracking-widest: 0.1em;
332
311
  /* +1.6px at 16px */
333
312
 
334
- /* ============================================
335
- * SPACING & LAYOUT (Tailwind v4.1)
336
- * 8px Grid System - Industry Standard
337
- * ============================================ */
338
-
339
- /* Spacing Scale (8px base unit) */
340
- --space-0: 0rem;
341
- /* 0px */
342
- --space-px: 0.0625rem;
343
- /* 1px - for fine borders */
344
- --space-0-5: 0.125rem;
345
- /* 2px */
346
- --space-1: 0.25rem;
347
- /* 4px - icon padding, tiny gaps */
348
- --space-1-5: 0.375rem;
349
- /* 6px */
350
- --space-2: 0.5rem;
351
- /* 8px - tight spacing, inline elements */
352
- --space-2-5: 0.625rem;
353
- /* 10px */
354
- --space-3: 0.75rem;
355
- /* 12px - between related elements */
356
- --space-3-5: 0.875rem;
357
- /* 14px */
358
- --space-4: 1rem;
359
- /* 16px - standard element spacing */
360
- --space-5: 1.25rem;
361
- /* 20px */
362
- --space-6: 1.5rem;
363
- /* 24px - between form fields */
364
- --space-7: 1.75rem;
365
- /* 28px */
366
- --space-8: 2rem;
367
- /* 32px - between sections */
368
- --space-9: 2.25rem;
369
- /* 36px */
370
- --space-10: 2.5rem;
371
- /* 40px */
372
- --space-11: 2.75rem;
373
- /* 44px - minimum touch target */
374
- --space-12: 3rem;
375
- /* 48px - between major sections */
376
- --space-14: 3.5rem;
377
- /* 56px */
378
- --space-16: 4rem;
379
- /* 64px - page margins */
380
- --space-20: 5rem;
381
- /* 80px */
382
- --space-24: 6rem;
383
- /* 96px - large section breaks */
384
-
385
313
  /* ============================================
386
314
  * BORDER RADIUS (Tailwind v4.1)
387
315
  *
@@ -562,20 +490,119 @@
562
490
  }
563
491
 
564
492
  /* ============================================
565
- * RESPONSIVE TYPOGRAPHY (Desktop)
566
- * Scale up larger text sizes on desktop screens
567
- * Must be outside @theme block due to Tailwind v4.1 restrictions
493
+ * TYPE SCALE & SPACING SCALE (Tailwind v4.1)
494
+ *
495
+ * Deliberately a STATIC, non-inline `@theme`: every token here is emitted as a
496
+ * real custom property on `:root` whether or not a Tailwind utility uses it.
497
+ * Stylesheets that are not compiled against this theme read these through
498
+ * `var()` -- the page-builder editor's (`@nextlyhq/builder/styles.css`, pulled
499
+ * in by `@nextlyhq/plugin-page-builder/styles/editor.css`) does, for
500
+ * `--text-xs`, `--text-sm`, `--text-lg` and `--space-*` -- and a `var()` in
501
+ * such a sheet makes Tailwind emit nothing. Under `@theme inline` a token is
502
+ * emitted only where CSS Tailwind compiles reads it with `var()`, and a plain
503
+ * `@theme` drops the ones no utility uses, so either way the admin's build
504
+ * left these out and the editor's text fell back to the browser's 16px and its
505
+ * spacing to nothing. `static` keeps them all.
506
+ *
507
+ * Non-inline also makes the `text-*` utilities read `var(--text-*)` rather
508
+ * than a copied value, so they follow a token redeclared on a scope, as the
509
+ * font utilities above do. `--space-*` is not a Tailwind namespace (spacing
510
+ * utilities use `--spacing`), so it adds no utilities; it exists for `var()`.
511
+ * `packages/admin/src/styles/__tests__/editor-token-emission.test.ts` holds
512
+ * the admin's built stylesheet to emitting every token the editor reads.
513
+ * ============================================ */
514
+ @theme static {
515
+ /* Type Scale - Base Size: 16px (1rem) */
516
+ --text-xs: 0.75rem;
517
+ /* 12px */
518
+ --text-sm: 0.875rem;
519
+ /* 14px */
520
+ --text-base: 1rem;
521
+ /* 16px - body text (WCAG minimum) */
522
+ --text-lg: 1.125rem;
523
+ /* 18px */
524
+ --text-xl: 1.25rem;
525
+ /* 20px */
526
+ --text-2xl: 1.5rem;
527
+ /* 24px */
528
+ --text-3xl: 1.875rem;
529
+ /* 30px */
530
+ --text-4xl: 2.25rem;
531
+ /* 36px */
532
+ --text-5xl: 3rem;
533
+ /* 48px */
534
+ --text-6xl: 3.75rem;
535
+ /* 60px */
536
+
537
+ /* Spacing Scale (8px base unit) */
538
+ --space-0: 0rem;
539
+ /* 0px */
540
+ --space-px: 0.0625rem;
541
+ /* 1px - for fine borders */
542
+ --space-0-5: 0.125rem;
543
+ /* 2px */
544
+ --space-1: 0.25rem;
545
+ /* 4px - icon padding, tiny gaps */
546
+ --space-1-5: 0.375rem;
547
+ /* 6px */
548
+ --space-2: 0.5rem;
549
+ /* 8px - tight spacing, inline elements */
550
+ --space-2-5: 0.625rem;
551
+ /* 10px */
552
+ --space-3: 0.75rem;
553
+ /* 12px - between related elements */
554
+ --space-3-5: 0.875rem;
555
+ /* 14px */
556
+ --space-4: 1rem;
557
+ /* 16px - standard element spacing */
558
+ --space-5: 1.25rem;
559
+ /* 20px */
560
+ --space-6: 1.5rem;
561
+ /* 24px - between form fields */
562
+ --space-7: 1.75rem;
563
+ /* 28px */
564
+ --space-8: 2rem;
565
+ /* 32px - between sections */
566
+ --space-9: 2.25rem;
567
+ /* 36px */
568
+ --space-10: 2.5rem;
569
+ /* 40px */
570
+ --space-11: 2.75rem;
571
+ /* 44px - minimum touch target */
572
+ --space-12: 3rem;
573
+ /* 48px - between major sections */
574
+ --space-14: 3.5rem;
575
+ /* 56px */
576
+ --space-16: 4rem;
577
+ /* 64px - page margins */
578
+ --space-20: 5rem;
579
+ /* 80px */
580
+ --space-24: 6rem;
581
+ /* 96px - large section breaks */
582
+ }
583
+
584
+ /* ============================================
585
+ * LARGER HEADING SIZES
586
+ *
587
+ * Tailwind lifts an `@theme` out of an enclosing `@media`: these declarations
588
+ * are not limited to wide screens. They replace the `--text-2xl` to
589
+ * `--text-5xl` values of the type scale above at EVERY width, and the built
590
+ * stylesheet declares only these. Because that scale is non-inline, the
591
+ * `text-2xl` to `text-5xl` utilities read `var(--text-*)` and so render at
592
+ * these sizes. The block is `static` like the scale: a token's options come
593
+ * from its last declaration, and without it the sizes no utility uses would
594
+ * be dropped from the build again.
568
595
  * ============================================ */
569
596
  @media (min-width: 768px) {
570
- @theme {
597
+ @theme static {
571
598
  --text-2xl: 1.75rem;
572
- /* 28px on desktop (from 24px) */
599
+ /* 28px (the scale above says 24px) */
573
600
  --text-3xl: 2.25rem;
574
- /* 36px on desktop (from 30px) */
601
+ /* 36px (the scale above says 30px) */
575
602
  --text-4xl: 3rem;
576
- /* 48px on desktop (from 36px) */
603
+ /* 48px (the scale above says 36px) */
577
604
  --text-5xl: 4rem;
578
- /* 64px on desktop (from 48px) */
605
+ /* 64px (the scale above says 48px) */
579
606
  }
580
607
  }
581
608
 
@@ -772,6 +799,17 @@
772
799
  --nx-success-solid: oklch(0.53 0.17 149.2);
773
800
  --nx-success-foreground: oklch(1 0 0);
774
801
  /* white */
802
+ /* A success toast's surface and text, which the Toaster hands to its toasts.
803
+ * The surface is the toast library's own pale green; the text is darkened
804
+ * from the library's green, which read at 4.26:1 on it, to about 5.2:1. */
805
+ --nx-toast-success-bg: oklch(0.9788 0.0221 160.24);
806
+ --nx-toast-success-text: oklch(0.5048 0.1506 146.87);
807
+ /* A warning toast's surface and text, the same way: the library's own pale
808
+ * amber surface, and its amber text, which read at 3.07:1 on it, darkened
809
+ * to about 5.1:1. */
810
+ --nx-toast-warning-bg: oklch(0.9904 0.0167 96.37);
811
+ --nx-toast-warning-text: oklch(0.54 0.13 60);
812
+
775
813
  /* Darkened from amber-500 so it reads as text on white at WCAG 4.5:1 (was
776
814
  * 2.15:1); its light shades still tint badge/alert surfaces. */
777
815
  --nx-warning: oklch(0.529 0.1646 70.11);
@@ -869,25 +907,22 @@
869
907
  /* Chart colors for data visualization.
870
908
  *
871
909
  * Held to the 3:1 non-text minimum against --nx-card, the surface a widget
872
- * draws on, because a chart mark is a graphical object required to read the
873
- * chart. The light ramp sits on near-white, so the mid steps that serve dark
874
- * mode do not reach it: slots 2 and 4 measured 2.21:1 and 2.15:1 at cyan-500
875
- * and amber-500, and moved down the ramp rather than being re-hued. Dark mode
876
- * keeps the lighter steps, where they measure 9.0:1 and 9.3:1 -- the two modes
877
- * need different steps of the same ramp, not one shared value. A bar is drawn
878
- * over its track (--nx-muted) and a tooltip on --nx-popover, both darker than
879
- * the card, so every slot is held there too; slot 3 moved down a step for
880
- * them, as 2 and 4 did for the card: at green-600 it measured 3.02:1 on the
881
- * track. */
910
+ * draws on, and against a bar's track (--nx-muted) and the tooltip
911
+ * (--nx-popover), because a chart mark is a graphical object required to
912
+ * read the chart. Each pair of slots also stays apart for a reader with
913
+ * protanopia, deuteranopia or tritanopia: the slots step in LIGHTNESS as
914
+ * well as hue, since a lightness step survives every kind of colour-vision
915
+ * deficiency where a hue step alone does not. Slot 4 is the darkest for that
916
+ * reason, below the green and the red it would otherwise match. Solved as
917
+ * the nearest values to the cyan, green, amber and red they started from
918
+ * that pass both; `chart-palette-colour-vision.test.ts` holds the margins.
919
+ * The two modes need different values, since the light ones sit on
920
+ * near-white and the dark ones on near-black. */
882
921
  --nx-chart-1: var(--nx-primary);
883
- --nx-chart-2: oklch(0.6089 0.1109 221.72);
884
- /* cyan-600 */
885
- --nx-chart-3: oklch(0.527 0.154 150.069);
886
- /* green-700 */
887
- --nx-chart-4: oklch(0.5553 0.1455 49);
888
- /* amber-700 */
889
- --nx-chart-5: oklch(0.6368 0.2078 25.33);
890
- /* red-500 */
922
+ --nx-chart-2: oklch(0.6179 0.1124 221.32);
923
+ --nx-chart-3: oklch(0.5485 0.1626 143.34);
924
+ --nx-chart-4: oklch(0.4489 0.1281 44.12);
925
+ --nx-chart-5: oklch(0.6286 0.2113 21.48);
891
926
 
892
927
  /* Design tokens */
893
928
  /* The one corner knob. Every tier below derives from it, so this single
@@ -1066,6 +1101,12 @@
1066
1101
  --nx-success-solid: oklch(0.5225 0.1921 149.58);
1067
1102
  --nx-success-foreground: oklch(1 0 0);
1068
1103
  /* white */
1104
+ /* The toast library's own dark success surface and text, kept: about 12.3:1. */
1105
+ --nx-toast-success-bg: oklch(0.2107 0.0498 157.43);
1106
+ --nx-toast-success-text: oklch(0.8635 0.1699 157.75);
1107
+ /* The toast library's own dark warning surface and text, kept: about 11.2:1. */
1108
+ --nx-toast-warning-bg: oklch(0.2277 0.0509 113.29);
1109
+ --nx-toast-warning-text: oklch(0.8642 0.1416 92.19);
1069
1110
  --nx-warning: oklch(0.7686 0.1646 70.11);
1070
1111
  /* amber-500 */
1071
1112
  --nx-warning-foreground: oklch(0.2079 0.0399 265.73);
@@ -1127,21 +1168,15 @@
1127
1168
 
1128
1169
  /* Chart colors for data visualization.
1129
1170
  *
1130
- * NOT the same as light mode, and slots 2 and 4 are where they differ: the
1131
- * light ramp sits on near-white and needs the deeper steps to stay legible,
1132
- * while here the lighter ones do that job. Slots 3 and 5 already differed or
1133
- * already cleared the minimum in both, so they carry one value each. */
1171
+ * NOT the same as light mode: here the slots sit on near-black and need the
1172
+ * lighter values to stay legible. Held to the same minimums as light mode,
1173
+ * against the same three surfaces and the same three colour-vision
1174
+ * deficiencies, by `chart-palette-colour-vision.test.ts`. */
1134
1175
  --nx-chart-1: var(--nx-primary);
1135
- /* A cyan of its own rather than a step of the Tailwind ramp -- deliberately
1136
- unnamed here, because naming a step it is not is the annotation this
1137
- file's own comment guard exists to refuse. */
1138
- --nx-chart-2: oklch(0.7399 0.1277 209.34);
1139
- --nx-chart-3: oklch(0.7229 0.1921 149.58);
1140
- /* green-500 */
1141
- --nx-chart-4: oklch(0.7686 0.1646 70.11);
1142
- /* amber-500 */
1143
- --nx-chart-5: oklch(0.6368 0.2078 25.33);
1144
- /* red-500 */
1176
+ --nx-chart-2: oklch(0.7717 0.1304 210.71);
1177
+ --nx-chart-3: oklch(0.7031 0.1315 159.76);
1178
+ --nx-chart-4: oklch(0.7676 0.1653 69.92);
1179
+ --nx-chart-5: oklch(0.6348 0.2057 27.82);
1145
1180
 
1146
1181
  /* Sidebar specific colors - dark mode */
1147
1182
  --nx-sidebar-background: oklch(0.18 0 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextlyhq/ui",
3
- "version": "0.0.2-alpha.72",
3
+ "version": "0.0.2-alpha.74",
4
4
  "description": "Nextly UI — Reusable React component library for Nextly plugins and custom admin UIs",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -83,13 +83,13 @@
83
83
  },
84
84
  "peerDependencies": {
85
85
  "lucide-react": ">=0.400.0",
86
- "react": "^18.0.0 || ^19.0.0",
87
- "react-dom": "^18.0.0 || ^19.0.0"
86
+ "react": "^19.3.0",
87
+ "react-dom": "^19.3.0"
88
88
  },
89
89
  "devDependencies": {
90
- "@nextlyhq/admin-css": "0.0.2-alpha.72",
91
- "@nextlyhq/module-specifiers": "0.0.2-alpha.72",
92
- "@nextlyhq/tsconfig": "0.0.2-alpha.72",
90
+ "@nextlyhq/admin-css": "0.0.2-alpha.74",
91
+ "@nextlyhq/module-specifiers": "0.0.2-alpha.74",
92
+ "@nextlyhq/tsconfig": "0.0.2-alpha.74",
93
93
  "@tailwindcss/cli": "^4.3.2",
94
94
  "@testing-library/react": "^16.3.0",
95
95
  "@types/culori": "^4.0.1",