@intellectif/lk-react 23.2.0 → 23.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @intellectif/lk-react
2
2
 
3
+ ## 23.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#111](https://github.com/intellectif/learning-kit/pull/111) [`1742365`](https://github.com/intellectif/learning-kit/commit/1742365ab3a9a16cb279c6a4aae05b0bf82a1b9f) Thanks [@diego28e](https://github.com/diego28e)! - **Readable on any page**: every surface the skin paints now sets the text on it, so AI help, a grade and a question set's passage no longer take the host page's text colour.
8
+
9
+ **Action required:** none. Only the skin changes. On a page whose text colour follows the theme, these surfaces change by a shade at most.
10
+
11
+ - `<ThemeProvider>` applies the dark tokens when the system prefers dark. On a page that stays light, a surface that painted the theme's background but left the text to the page drew black on near-black, about 1.1:1. That hit the feedback on a draft, a written response's grade, a group's passage in `<ActivitySequence>`, and the AI hints and explanation in a gap select. A dark page under the light theme gave the reverse.
12
+ - `.lk-ai-panel`, `.lk-ai-hint`, `.lk-stimulus`, `.lk-wr-outcome` and the SDK's audio transport (`.lk-media[data-controls="minimal"]`) now set `color: var(--lk-color-text)` beside their background, as the multiple-choice, dictation and read-aloud cards already did.
13
+
14
+ - [#109](https://github.com/intellectif/learning-kit/pull/109) [`a2de425`](https://github.com/intellectif/learning-kit/commit/a2de425279b5a05a7fff9bad366fddfd86bd3262) Thanks [@diego28e](https://github.com/diego28e)! - **Written response fits its column**: the answer box no longer runs past the form's edge on a page without a `box-sizing` reset.
15
+
16
+ **Action required:** none. Only the skin changes: no markup, prop or string. A page with a global `* { box-sizing: border-box }` reset sees no change.
17
+
18
+ - `.lk-wr-textarea` is `width: 100%` with padding and a border, and nothing made it `border-box`, so the padding and border sat outside the 100%: in a 680 px form the box measured 714 px. It is now `box-sizing: border-box`, as the answer fields of the other activity components already were.
19
+ - Media in a `<WrittenResponse>`, a `<GapSelect>` or a `<StimulusPanel>` ran 2 px past its frame the same way: every embedded player, and an image or video wider than the column. `.lk-media-el` is now `border-box` too; media in the other components already was.
20
+ - An end-to-end test measures both in a browser, the answer box in light and in dark.
21
+
3
22
  ## 23.2.0
4
23
 
5
24
  ### Minor Changes
@@ -49,7 +49,11 @@
49
49
  margin: 0 0 var(--lk-spacing-lg);
50
50
  }
51
51
 
52
+ /* Border-box of its own: a written response, a gap select and a stimulus
53
+ panel do not make what they hold border-box, and the border would sit
54
+ outside the 100% and past the frame's edge. */
52
55
  .lk-media-el {
56
+ box-sizing: border-box;
53
57
  display: block;
54
58
  max-width: 100%;
55
59
  height: auto;
@@ -111,11 +115,14 @@
111
115
  cursor: default;
112
116
  }
113
117
 
114
- /* ── Shared stimulus (an item group's passage / recording / image) ──── */
118
+ /* ── Shared stimulus (an item group's passage / recording / image) ────
119
+ It paints its own surface, so it sets its own text: the pager around it
120
+ has no card, and the passage would take the host page's colour. */
115
121
  .lk-stimulus {
116
122
  margin: 0 0 var(--lk-spacing-lg);
117
123
  padding: var(--lk-spacing-md) var(--lk-spacing-lg);
118
124
  background: var(--lk-color-surface-raised);
125
+ color: var(--lk-color-text);
119
126
  border: 1px solid var(--lk-color-border);
120
127
  border-radius: var(--lk-radius-base);
121
128
  }
@@ -578,7 +585,10 @@
578
585
  line-height: 1.6;
579
586
  }
580
587
 
588
+ /* `.lk-wr` makes nothing it holds border-box, so the answer box does: the
589
+ padding and border then sit inside the 100%, not past the form's edge. */
581
590
  .lk-wr-textarea {
591
+ box-sizing: border-box;
582
592
  width: 100%;
583
593
  padding: var(--lk-spacing-sm) var(--lk-spacing-md);
584
594
  border: 1px solid var(--lk-color-border);
@@ -659,6 +669,7 @@
659
669
  border: 1px solid var(--lk-color-border);
660
670
  border-radius: var(--lk-radius-base);
661
671
  background: var(--lk-color-surface);
672
+ color: var(--lk-color-text);
662
673
  }
663
674
 
664
675
  .lk-wr-outcome[data-passed="true"] {
@@ -735,6 +746,7 @@
735
746
  margin: 0 0 var(--lk-spacing-md);
736
747
  padding: var(--lk-spacing-sm) var(--lk-spacing-md);
737
748
  background: var(--lk-color-surface-raised);
749
+ color: var(--lk-color-text);
738
750
  border: 1px solid var(--lk-color-border);
739
751
  border-radius: var(--lk-radius-base);
740
752
  }
@@ -3382,12 +3394,17 @@
3382
3394
  cursor: progress;
3383
3395
  }
3384
3396
 
3397
+ /* A panel or a hint paints its own surface, so it sets the text on it as
3398
+ well. A component with no card of its own, a written response or a gap
3399
+ select, would otherwise draw the host page's text colour on the theme's
3400
+ surface: black on the dark surface when the page stays light. */
3385
3401
  .lk-ai-panel {
3386
3402
  align-self: stretch;
3387
3403
  padding: var(--lk-spacing-sm) var(--lk-spacing-md);
3388
3404
  border: 1px dashed var(--lk-color-border);
3389
3405
  border-radius: var(--lk-radius-base);
3390
3406
  background: var(--lk-color-surface);
3407
+ color: var(--lk-color-text);
3391
3408
  }
3392
3409
 
3393
3410
  .lk-ai-heading {
@@ -3423,6 +3440,7 @@
3423
3440
  padding: var(--lk-spacing-xs) var(--lk-spacing-sm);
3424
3441
  border-inline-start: 3px dashed var(--lk-color-primary);
3425
3442
  background: var(--lk-color-surface);
3443
+ color: var(--lk-color-text);
3426
3444
  }
3427
3445
 
3428
3446
  .lk-ai-hint-label {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellectif/lk-react",
3
- "version": "23.2.0",
3
+ "version": "23.2.1",
4
4
  "description": "Accessible React 19 components for every lk-core activity — from multiple choice and dictation to read-aloud with pronunciation feedback and interactive video — with a resumable exam/review pager, theming, and xAPI delivery.",
5
5
  "keywords": [
6
6
  "react",