bank20baht-ui 0.7.2 → 0.7.3

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.
@@ -367,6 +367,12 @@
367
367
  flex-direction: column;
368
368
  gap: var(--baht-space-1);
369
369
  flex: 1 1 200px;
370
+ /* An `option.width` fraction (below) counts padding+border in that
371
+ percentage, like every other sized box in this file — without this,
372
+ the browser default (content-box) adds padding on top of the
373
+ flex-basis, inflating the rendered card past its intended share of
374
+ the row. */
375
+ box-sizing: border-box;
370
376
  border: var(--baht-border-default);
371
377
  border-radius: var(--baht-radius-md);
372
378
  padding: var(--baht-space-3) var(--baht-space-4);
@@ -389,18 +395,26 @@
389
395
  }
390
396
  /* `option.width` — same fractions as `field.width`, against the card row's
391
397
  own gap (`--baht-space-3`) instead of the form grid's `--baht-field-gap`,
392
- overriding the default `flex: 1 1 200px` auto-wrap. */
398
+ overriding the default `flex: 1 1 200px` auto-wrap. `min-width: 0`
399
+ overrides the flex item default of `auto` (= its content's min-content
400
+ width), which otherwise floors the card at its label's natural width and
401
+ silently defeats a basis smaller than that (e.g. long labels forcing 3
402
+ per row instead of the requested 4) — the label wraps instead. */
393
403
  .baht-option-card--w-1-4 {
394
404
  flex: 0 0 calc(25% - var(--baht-space-3) * 3 / 4);
405
+ min-width: 0;
395
406
  }
396
407
  .baht-option-card--w-1-2 {
397
408
  flex: 0 0 calc(50% - var(--baht-space-3) / 2);
409
+ min-width: 0;
398
410
  }
399
411
  .baht-option-card--w-3-4 {
400
412
  flex: 0 0 calc(75% - var(--baht-space-3) / 4);
413
+ min-width: 0;
401
414
  }
402
415
  .baht-option-card--w-full {
403
416
  flex: 0 0 100%;
417
+ min-width: 0;
404
418
  }
405
419
  /* Selection reads from the card's own border/wash (above), not a radio
406
420
  bullet — visually hidden rather than `display: none` so the input stays
package/dist/tokens.css CHANGED
@@ -813,6 +813,12 @@
813
813
  flex-direction: column;
814
814
  gap: var(--baht-space-1);
815
815
  flex: 1 1 200px;
816
+ /* An `option.width` fraction (below) counts padding+border in that
817
+ percentage, like every other sized box in this file — without this,
818
+ the browser default (content-box) adds padding on top of the
819
+ flex-basis, inflating the rendered card past its intended share of
820
+ the row. */
821
+ box-sizing: border-box;
816
822
  border: var(--baht-border-default);
817
823
  border-radius: var(--baht-radius-md);
818
824
  padding: var(--baht-space-3) var(--baht-space-4);
@@ -835,18 +841,26 @@
835
841
  }
836
842
  /* `option.width` — same fractions as `field.width`, against the card row's
837
843
  own gap (`--baht-space-3`) instead of the form grid's `--baht-field-gap`,
838
- overriding the default `flex: 1 1 200px` auto-wrap. */
844
+ overriding the default `flex: 1 1 200px` auto-wrap. `min-width: 0`
845
+ overrides the flex item default of `auto` (= its content's min-content
846
+ width), which otherwise floors the card at its label's natural width and
847
+ silently defeats a basis smaller than that (e.g. long labels forcing 3
848
+ per row instead of the requested 4) — the label wraps instead. */
839
849
  .baht-option-card--w-1-4 {
840
850
  flex: 0 0 calc(25% - var(--baht-space-3) * 3 / 4);
851
+ min-width: 0;
841
852
  }
842
853
  .baht-option-card--w-1-2 {
843
854
  flex: 0 0 calc(50% - var(--baht-space-3) / 2);
855
+ min-width: 0;
844
856
  }
845
857
  .baht-option-card--w-3-4 {
846
858
  flex: 0 0 calc(75% - var(--baht-space-3) / 4);
859
+ min-width: 0;
847
860
  }
848
861
  .baht-option-card--w-full {
849
862
  flex: 0 0 100%;
863
+ min-width: 0;
850
864
  }
851
865
  /* Selection reads from the card's own border/wash (above), not a radio
852
866
  bullet — visually hidden rather than `display: none` so the input stays
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "bank20baht-ui",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bank20baht-ui",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "description": "JSON-driven form + workflow engine. Send JSON in, get an interactive form out.",
6
6
  "license": "MIT",