@apliteni/apliteni-ui 0.12.0 → 0.23.2

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.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/react/dist/index.css +19 -0
  3. package/react/dist/index.d.ts +43 -2
  4. package/react/dist/index.js +98 -6
  5. package/src/assets/icons.js +5 -26
  6. package/src/components/account-nav.js +1 -1
  7. package/src/components/confirm.js +27 -28
  8. package/src/components/drawer.js +27 -28
  9. package/src/components/dropdown.js +26 -23
  10. package/src/components/index.js +9 -13
  11. package/src/components/loading.js +126 -0
  12. package/src/components/nav.js +7 -20
  13. package/src/components/overlay.js +7 -16
  14. package/src/components/shell.js +10 -9
  15. package/src/components/success.js +8 -17
  16. package/src/components/topbar.js +8 -12
  17. package/src/index.css +6 -1
  18. package/src/index.js +1 -0
  19. package/src/inline.js +4 -0
  20. package/src/styles/badge.css +1 -1
  21. package/src/styles/base.css +5 -18
  22. package/src/styles/button.css +18 -5
  23. package/src/styles/callout.css +37 -26
  24. package/src/styles/card.css +1 -1
  25. package/src/styles/code.css +7 -1
  26. package/src/styles/confirm.css +10 -13
  27. package/src/styles/drawer.css +9 -6
  28. package/src/styles/dropdown.css +14 -7
  29. package/src/styles/empty.css +1 -1
  30. package/src/styles/feedback.css +25 -16
  31. package/src/styles/footer.css +15 -6
  32. package/src/styles/input.css +28 -2
  33. package/src/styles/layout.css +14 -10
  34. package/src/styles/loading.css +129 -0
  35. package/src/styles/motion.css +21 -39
  36. package/src/styles/nav.css +14 -12
  37. package/src/styles/reduced-motion.css +21 -0
  38. package/src/styles/success.css +8 -8
  39. package/src/styles/table.css +20 -17
  40. package/src/styles/topbar.css +27 -12
  41. package/src/tokens/accents.css +10 -14
  42. package/src/tokens/tokens.css +95 -22
@@ -41,6 +41,14 @@
41
41
  --space-12: 48px;
42
42
  --space-16: 64px;
43
43
 
44
+ /* -- Measure ------------------------------------------------------------
45
+ * --container is the page, gutter to gutter; --measure is the reading column
46
+ * INSIDE a track, beside a sidebar. Different axes, never interchangeable.
47
+ * Below --measure are --panel-* and --prose-*, at the end of this file (#208).
48
+ * why: docs/specification.md#widths */
49
+ --container: 1120px;
50
+ --measure: 860px;
51
+
44
52
  /* -- Typography --------------------------------------------------------- */
45
53
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
46
54
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
@@ -79,6 +87,12 @@
79
87
  * without brand.generated.css. Delays are the kit's own (not a brand
80
88
  * concern). The reusable effect layer lives in styles/motion.css. */
81
89
  --ease: var(--easing-ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));
90
+ --ease-out: var(--easing-ease-out, cubic-bezier(0, 0, 0.2, 1));
91
+ --ease-in: var(--easing-ease-in, cubic-bezier(0.4, 0, 1, 1));
92
+ --ease-sharp: var(--easing-sharp, cubic-bezier(0.4, 0, 0.6, 1));
93
+ --ease-spring: var(--easing-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
94
+
95
+ --dur-instant: var(--duration-instant, 0.08s); /* 80ms — press, tick */
82
96
  --dur-fast: var(--duration-fast, 0.15s); /* 150ms — hover, press */
83
97
  --dur-med: var(--duration-normal, 0.25s); /* 250ms — panels, dropdowns */
84
98
  --dur-slow: var(--duration-slow, 0.4s); /* 400ms — enters, reveals */
@@ -109,7 +123,7 @@
109
123
  the shape light Nebula and light Ocean already ship and which dark Nebula
110
124
  held until #157 lifted the accent onto the old --purple-mid. Left alone,
111
125
  the two tokens would resolve to one colour and the ramp would carry a
112
- duplicate step. #bd8cff is the value docs/adr/0006 reasons about and
126
+ duplicate step. #bd8cff is the value docs/specification.md#colour-and-contrast reasons about and
113
127
  rejects as the accent; it becomes the ramp's top step instead. Light
114
128
  Nebula's ramp does not move. See issue #157. */
115
129
  --purple-light: #b479ff;
@@ -142,31 +156,38 @@
142
156
  --dim: #c6c2d6;
143
157
  --muted: #948fa8;
144
158
 
159
+ /* The paint of a control that is off. NOT an opacity: `opacity` is a group
160
+ property, so it fades a label and the box under it toward the ground
161
+ TOGETHER and the pair a reader is left with is whatever that composite
162
+ lands on — a disabled primary button measured 1.48:1 that way, white on a
163
+ faded accent. These three composite predictably instead: the ink is read on
164
+ the surface beside it, and both are opaque. They are aliases, not new
165
+ colours — the ramp gains nothing to keep in sync. A disabled control drops
166
+ its accent, which is most of what makes it read as inert; the ink going
167
+ quiet is the rest. Held by stories/guidelines/accessibility-floor.test.js.
168
+ why: docs/specification.md#colour-and-contrast */
169
+ --disabled-ink: var(--muted);
170
+ --disabled-surface: var(--surface-2);
171
+ --disabled-border: var(--border);
172
+
145
173
  /* Lifted from #9b5dff, which cleared the flat surfaces and failed on its own
146
174
  wash over a card. This value was already in the ramp as --purple-mid, so no
147
175
  new colour entered it; the ramp then moved up a step above so --accent is
148
176
  --purple-light, which is how every other Nebula and Ocean cell is written.
149
- --glow-purple and --ring follow it down the file. Held by
177
+ --glow-purple follows it down the file; --ring is written as var(--accent)
178
+ and so follows it by reference. Held by
150
179
  stories/accent-contrast.test.js. See issue #157.
151
- why: docs/adr/0006-the-accent-is-measured-against-its-own-wash.md */
180
+ why: docs/specification.md#colour-and-contrast */
152
181
  --accent: #b479ff;
153
182
  --accent-strong: #7c3aed; /* button bg — white text clears WCAG AA at 5.70:1 */
154
183
  --accent-contrast: #ffffff;
155
184
  --ink: #e9e7f0;
156
185
 
157
186
  /* Ink that reads on a SIGNAL colour once that colour becomes a fill — the
158
- glyph in a success circle, the glyph on a toast's status circle.
159
- In dark every signal is a bright hue, so one near-black ink clears all
160
- five: 15.87 on --green, 7.35 on --pink, 13.40 on --amber, 11.75 on --cyan
161
- and 6.29 on --muted. Danger keeps a token of its own only because LIGHT
162
- still needs it: there the signals are deepened to read as ink on white,
163
- which parks them mid-luminance, and --pink is the one that comes out ahead
164
- against white (5.78) rather than against near-black (3.39).
165
- Dark danger was white until now, which was correct while --pink was
166
- #e35b8f. Issue #131 lightened it to #e97ca5 to clear AA as INK on its own
167
- glow, and that carried the fill up past the point where white could read on
168
- it — 2.66 on the toast's status circle, under the 3:1 of WCAG 1.4.11. The
169
- ten status x theme icon pairs are gated in stories/signal-contrast.test.js. */
187
+ glyph in a success circle, the glyph on a toast's status circle. One
188
+ near-black ink clears all five in dark; danger keeps a token of its own
189
+ because LIGHT still needs one.
190
+ why: docs/specification.md#colour-and-contrast */
170
191
  --signal-contrast: #0c0c0c;
171
192
  --danger-contrast: var(--signal-contrast);
172
193
 
@@ -214,12 +235,13 @@
214
235
  /* Resting elevation for a card. Dark cards are borderless — the surface does
215
236
  the grouping on its own — so they cast nothing. */
216
237
  --shadow-card: none;
217
- /* The accent's own rgb at a fixed alpha, so it moves whenever --accent moves
218
- otherwise a token points at a colour the accent no longer is. At this alpha
219
- the band sits under the 3:1 WCAG 1.4.11 asks of a focus indicator, before
220
- this change and after it; nothing here closes that. See issue #157 and the
221
- ADR's closing section. */
222
- --ring: 0 0 0 3px rgba(180, 121, 255, 0.35);
238
+ /* THE ONLY --ring in the kit light and every data-accent sub-theme declare
239
+ an --accent and inherit this line. Opaque because a translucent ring is a
240
+ glow: the eight rgba() literals this replaced all missed the 3:1 of WCAG
241
+ 1.4.11, at 1.35:1 worst. Held at 4.22:1 worst by
242
+ stories/guidelines/accessibility-floor.test.js. See issue #218.
243
+ why: docs/specification.md#the-focus-ring */
244
+ --ring: 0 0 0 3px var(--accent);
223
245
 
224
246
  /* The ink a cast shadow is made of, and the specular white that reads as
225
247
  gloss on a raised surface. Effects mix these instead of writing rgba(). */
@@ -273,6 +295,13 @@
273
295
  --dim: #3a404b;
274
296
  --muted: #5c6270;
275
297
 
298
+ /* Same three aliases as dark, same reasoning. Light moves the disabled
299
+ surface AWAY from white for the same reason dark moves it away from the
300
+ card: a control that is off should sink, not rise. */
301
+ --disabled-ink: var(--muted);
302
+ --disabled-surface: var(--surface-2);
303
+ --disabled-border: var(--border);
304
+
276
305
  --accent: #6a2dcc;
277
306
  --accent-strong: #6a2dcc; /* already dark enough for white text */
278
307
  --accent-contrast: #ffffff;
@@ -335,7 +364,7 @@
335
364
  /* A white card on a white page needs its own, flatter-than-sm elevation:
336
365
  a hairline contact shadow plus a wide soft one (see card.css). */
337
366
  --shadow-card: 0 1px 2px rgba(20, 25, 45, 0.04), 0 4px 14px rgba(20, 25, 45, 0.05);
338
- --ring: 0 0 0 3px rgba(106, 45, 204, 0.25);
367
+ /* No --ring here. :root's is var(--accent), and light re-points --accent. */
339
368
 
340
369
  --shadow-ink: #1e1e32;
341
370
  --sheen: #ffffff;
@@ -345,3 +374,47 @@
345
374
  --grad-from: var(--purple-light);
346
375
  --grad-to: var(--cyan);
347
376
  }
377
+
378
+ /* ============================================================================
379
+ * WIDTHS BELOW THE PAGE — the box, and the line
380
+ *
381
+ * --container is the page and --measure the reading column inside it (both
382
+ * above). Underneath them the kit has two scales and one rule for choosing
383
+ * between them: THE UNIT SAYS WHICH SCALE YOU ARE ON.
384
+ *
385
+ * a box that holds a COMPONENT -> --panel-* (px)
386
+ * a box that holds a LINE -> --prose-* (ch)
387
+ *
388
+ * Both are theme-invariant, which is why they sit outside the palette blocks.
389
+ * why: docs/specification.md#boxes-below-the-page
390
+ * ========================================================================== */
391
+ :root {
392
+ /* -- Panel widths -------------------------------------------------------
393
+ * Not a new scale: the drawer has shipped sm/md/lg at exactly these three
394
+ * values since it was written, and confirm, the auth card and the toast each
395
+ * wrote one of them out again on their own. --panel-md answers the question
396
+ * #208 asked — the two 420s were three (--confirm-w, --drawer-w md and
397
+ * .ui-auth__card), and they are one measure now. */
398
+ --panel-sm: 320px;
399
+ --panel-md: 420px;
400
+ --panel-lg: 560px;
401
+
402
+ /* -- Prose measures -----------------------------------------------------
403
+ * ch resolves against the font-size of the element it is DECLARED on, so a
404
+ * step goes on the paragraph itself — never on a wrapper holding two type
405
+ * sizes, where the same token would mean two different widths.
406
+ *
407
+ * The four steps are the reading band (44–72ch), named for what is being
408
+ * read rather than sized s/m/l, so the choice is made by the writer:
409
+ * caption one or two sentences under a glyph, centred
410
+ * lede the line under a title
411
+ * body a left-aligned column of copy
412
+ * dense reference prose set below 13px, where the band runs wider
413
+ * --prose-display is NOT a measure. It is where a display headline rags, and
414
+ * it is far under the band on purpose. */
415
+ --prose-display: 14ch;
416
+ --prose-caption: 44ch;
417
+ --prose-lede: 54ch;
418
+ --prose-body: 62ch;
419
+ --prose-dense: 72ch;
420
+ }