@dillingerstaffing/strand-ui 0.10.0 → 0.11.0

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/HTML_REFERENCE.md CHANGED
@@ -407,7 +407,7 @@ All container components (Grid, Stack, Card, Container) enforce boundary integri
407
407
  </div>
408
408
  ```
409
409
 
410
- **Sizes:** `--sm` (text-xl, 25px) | default (text-3xl, 39px) | `--lg` (text-4xl, 49px). Label stays xs across all sizes.
410
+ **Sizes:** `--sm` (text-xl, 25px) | default (text-3xl, 39px) | `--lg` (text-4xl, 49px) | `--xl` (fluid 72-112px, primary instrument readout). Label stays xs across all sizes.
411
411
 
412
412
  > **The DataReadout pattern** is uniquely Strand: monospace overline + large light-weight value + tabular numerals. See [DESIGN_LANGUAGE.md 11.2: Data Display (L918-L955)](./DESIGN_LANGUAGE.md#L918).
413
413
 
@@ -900,15 +900,19 @@ Named CSS classes for common compositions. Each implements one or more productio
900
900
  Production: `section-boundary`.
901
901
 
902
902
  ```html
903
- <div class="strand-card strand-card--elevated strand-card--pad-md">
904
- <div class="strand-card-section">
905
- <span class="strand-overline">Section Label</span>
906
- </div>
907
- <!-- section content -->
903
+ <!-- Single label -->
904
+ <div class="strand-card-section">
905
+ <span class="strand-overline">Section Label</span>
906
+ </div>
907
+
908
+ <!-- Distributed header (label + secondary) -->
909
+ <div class="strand-card-section">
910
+ <span class="strand-overline">7-Day Forecast</span>
911
+ <span class="strand-overline" style="color: var(--strand-gray-400)">Ethiopian Yirgacheffe</span>
908
912
  </div>
909
913
  ```
910
914
 
911
- Multiple sections stack. Last section omits trailing border via `:last-child`.
915
+ Children distribute on the inline axis (space-between). Single child sits at the start. Multiple sections stack; last omits trailing border via `:last-child`.
912
916
 
913
917
  ### Key-Value Row
914
918
 
@@ -5,8 +5,8 @@ export interface DataReadoutProps extends Omit<JSX.HTMLAttributes<HTMLDivElement
5
5
  label: string;
6
6
  /** The large displayed value */
7
7
  value: string | number;
8
- /** Size variant: sm (compact), md (default), lg (hero) */
9
- size?: "sm" | "md" | "lg";
8
+ /** Size variant: sm (compact), md (default), lg (hero), xl (primary instrument) */
9
+ size?: "sm" | "md" | "lg" | "xl";
10
10
  }
11
11
  export declare const DataReadout: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<DataReadoutProps> & {
12
12
  ref?: import("preact").Ref<HTMLDivElement> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"DataReadout.d.ts","sourceRoot":"","sources":["../../../src/components/DataReadout/DataReadout.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAGlC,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzD,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW;;EAiBvB,CAAC"}
1
+ {"version":3,"file":"DataReadout.d.ts","sourceRoot":"","sources":["../../../src/components/DataReadout/DataReadout.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAGlC,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzD,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,mFAAmF;IACnF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,WAAW;;EAiBvB,CAAC"}
@@ -763,6 +763,10 @@
763
763
  font-size: var(--strand-text-4xl);
764
764
  }
765
765
 
766
+ .strand-data-readout--xl .strand-data-readout__value {
767
+ font-size: clamp(4.5rem, 10vw, 7rem);
768
+ }
769
+
766
770
 
767
771
  /* Dialog */
768
772
  /*! Strand UI | MIT License | dillingerstaffing.com */
@@ -2687,6 +2691,9 @@
2687
2691
  Derivation: section-boundary production (DL 11.10).
2688
2692
  OVERLINE + border-bottom + margin-bottom + padding-bottom */
2689
2693
  .strand-card-section {
2694
+ display: flex;
2695
+ justify-content: space-between;
2696
+ align-items: center;
2690
2697
  margin-bottom: var(--strand-space-3);
2691
2698
  padding-bottom: var(--strand-space-2);
2692
2699
  border-bottom: 1px solid var(--strand-gray-200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dillingerstaffing/strand-ui",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Strand UI - Preact/React component library built on the Strand Design Language",
5
5
  "author": "Dillinger Staffing <engineering@dillingerstaffing.com> (https://dillingerstaffing.com)",
6
6
  "license": "MIT",
@@ -60,7 +60,7 @@
60
60
  }
61
61
  },
62
62
  "dependencies": {
63
- "@dillingerstaffing/strand": "^0.10.0"
63
+ "@dillingerstaffing/strand": "^0.11.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@testing-library/preact": "^3.2.0",
@@ -37,3 +37,7 @@
37
37
  .strand-data-readout--lg .strand-data-readout__value {
38
38
  font-size: var(--strand-text-4xl);
39
39
  }
40
+
41
+ .strand-data-readout--xl .strand-data-readout__value {
42
+ font-size: clamp(4.5rem, 10vw, 7rem);
43
+ }
@@ -111,6 +111,14 @@ describe("DataReadout", () => {
111
111
  expect(readout?.className).toContain("strand-data-readout--lg");
112
112
  });
113
113
 
114
+ it("applies xl size modifier class", () => {
115
+ const { container } = render(
116
+ <DataReadout label="Remaining" value="284g" size="xl" />,
117
+ );
118
+ const readout = container.querySelector(".strand-data-readout");
119
+ expect(readout?.className).toContain("strand-data-readout--xl");
120
+ });
121
+
114
122
  it("does not apply size modifier for md (default)", () => {
115
123
  const { container } = render(
116
124
  <DataReadout label="Metric" value="100" size="md" />,
@@ -9,8 +9,8 @@ export interface DataReadoutProps
9
9
  label: string;
10
10
  /** The large displayed value */
11
11
  value: string | number;
12
- /** Size variant: sm (compact), md (default), lg (hero) */
13
- size?: "sm" | "md" | "lg";
12
+ /** Size variant: sm (compact), md (default), lg (hero), xl (primary instrument) */
13
+ size?: "sm" | "md" | "lg" | "xl";
14
14
  }
15
15
 
16
16
  export const DataReadout = forwardRef<HTMLDivElement, DataReadoutProps>(
package/src/static.css CHANGED
@@ -118,6 +118,9 @@
118
118
  Derivation: section-boundary production (DL 11.10).
119
119
  OVERLINE + border-bottom + margin-bottom + padding-bottom */
120
120
  .strand-card-section {
121
+ display: flex;
122
+ justify-content: space-between;
123
+ align-items: center;
121
124
  margin-bottom: var(--strand-space-3);
122
125
  padding-bottom: var(--strand-space-2);
123
126
  border-bottom: 1px solid var(--strand-gray-200);