@happyvertical/smrt-ui 0.57.45 → 0.57.47

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/AGENTS.md CHANGED
@@ -49,7 +49,7 @@ components are exempt — they *are* the primitives.
49
49
  | `./feedback` | `Alert`, `ToastViewport`, `Modal`, `Drawer`/`Sheet`, `ConfirmDialog`, `LoadingOverlay`, `Progress`, `Meter`, `Spinner`, phone surfaces `PhoneSheet` / `WorkingStrip` and the `swipeDismiss` action |
50
50
  | `./data` | `CollectionToolbar`, `CollectionList`/`ContentList`, `DataTable` (footer rows and column `summaries`: [agents/data-table.md](agents/data-table.md)) and their types — a **component barrel**: it re-exports `.svelte` files, so a plain Node `import()` of it throws `ERR_UNKNOWN_FILE_EXTENSION` |
51
51
  | `./data-surface` | **Svelte-free**: registry contracts and shared protocol limits (`DATA_SURFACE_MAX_REQUEST_BYTES`, `DATA_SURFACE_IDENTIFIER_MAX_LENGTH`, …). Server adapters must import these from here, not from `./data` — a server entry that reaches the barrel breaks the `smrt` CLI's plain-Node `.smrt/register.js` load (issue #2924) |
52
- | `./display` | `DocumentViewer` (touch PDF/image viewer reading through an injected `fetch`; pdf.js is an optional peer loaded lazily by `createPdfJsOpener()`), `CurrencyDisplay`, `DateDisplay`, `StatusBadge`, `Icon`; also re-exported from `.` |
52
+ | `./display` | `DocumentViewer` (touch PDF/image viewer reading through an injected `fetch`; pdf.js is an optional peer loaded lazily by `createPdfJsOpener()`), `CurrencyDisplay`, `DateDisplay`, `StatusBadge` (`case: 'capitalize' | 'as-is'`, default capitalize, controls the CSS text-transform), `Icon`; also re-exported from `.` |
53
53
  | `./layout` | `Container`, `Grid`, `Header`, `Footer`, `PageHeader`, `EmptyState`, … |
54
54
  | `./charts` | Pure `Chart` renderer (`bar`, `line`, `table`, `pie`, `stat`), structural `ChartData`, and minor-unit number formatting; `./charts/format` is Svelte-free |
55
55
  | `./calendar` | `CalendarView` (time-zone-aware month/week grids + phone agenda) and its Svelte-free date model (`toEntries`, `layoutMonth`, `layoutWeek`, `dateKeyInZone`, …); deprecated `Calendar`, `DayView` |
@@ -24,6 +24,8 @@ export interface Props
24
24
  variant?: 'filled' | 'outline';
25
25
  /** Optional custom label (defaults to status value) */
26
26
  label?: string;
27
+ /** `'capitalize'` (default) title-cases the label via CSS; `'as-is'` leaves it untouched. */
28
+ case?: 'capitalize' | 'as-is';
27
29
  }
28
30
 
29
31
  const {
@@ -33,6 +35,7 @@ const {
33
35
  size = 'md',
34
36
  variant = 'filled',
35
37
  label,
38
+ case: textCase = 'capitalize',
36
39
  ...rest
37
40
  }: Props = $props();
38
41
 
@@ -255,6 +258,7 @@ const displayLabel = $derived(label ?? status.replace(/_/g, ' '));
255
258
  class:sm={size === 'sm'}
256
259
  class:lg={size === 'lg'}
257
260
  class:outline={variant === 'outline'}
261
+ class:as-is={textCase === 'as-is'}
258
262
  style:--smrt-badge-bg={colors.bg}
259
263
  style:--smrt-badge-text={colors.text} data-smrt-component="StatusBadge"
260
264
  >
@@ -277,6 +281,9 @@ const displayLabel = $derived(label ?? status.replace(/_/g, ' '));
277
281
  color: var(--smrt-badge-text);
278
282
  line-height: 1.25;
279
283
  }
284
+ .status-badge.as-is {
285
+ text-transform: none;
286
+ }
280
287
 
281
288
  .status-badge.sm {
282
289
  padding: 0.125rem 0.5rem;
@@ -20,6 +20,8 @@ export interface Props extends Omit<HTMLAttributes<HTMLSpanElement>, 'class' | '
20
20
  variant?: 'filled' | 'outline';
21
21
  /** Optional custom label (defaults to status value) */
22
22
  label?: string;
23
+ /** `'capitalize'` (default) title-cases the label via CSS; `'as-is'` leaves it untouched. */
24
+ case?: 'capitalize' | 'as-is';
23
25
  }
24
26
  declare const StatusBadge: import("svelte").Component<Props, {}, "">;
25
27
  type StatusBadge = ReturnType<typeof StatusBadge>;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/display/StatusBadge.svelte.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGzD,sCAAsC;AACtC,MAAM,WAAW,KACf,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnE,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,wDAAwD;IACxD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,qBAAqB;IACrB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+OD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"StatusBadge.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/display/StatusBadge.svelte.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGzD,sCAAsC;AACtC,MAAM,WAAW,KACf,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnE,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,wDAAwD;IACxD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,qBAAqB;IACrB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;CAC/B;AAgPD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -421,7 +421,12 @@ Modern Google Material Design 3 with refined colors and typography.
421
421
 
422
422
  ### Glass
423
423
 
424
- Apple-inspired glass morphism with backdrop blur effects.
424
+ Apple-inspired glass morphism with backdrop blur effects. The light primary
425
+ is `#0066cc`, not Apple's `#007aff`: `primary` is text on ghost buttons and
426
+ links, and `#007aff` was 3.6:1 on the light background (#4567). Every preset
427
+ is pinned by `__tests__/primary-text-contrast.test.ts`; Glass dark, Studio
428
+ light and SMRT light still sit below AA on some surfaces and are pinned at
429
+ their current ratios there (#4575).
425
430
 
426
431
  - **Colors**: Translucent surfaces, system colors, layered depth
427
432
  - **Effects**: Backdrop blur, saturation boost, frosted glass
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/glass/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAIV,KAAK,EAEN,MAAM,aAAa,CAAC;AA2XrB;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KA2DxB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/glass/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAIV,KAAK,EAEN,MAAM,aAAa,CAAC;AA+XrB;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KA2DxB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -12,10 +12,14 @@ import { appleEasing, borderRadiusScale, darkInsetHighlight, durationScale, hair
12
12
  * Translucent whites with subtle color tints
13
13
  */
14
14
  const lightColors = {
15
- // Primary - Apple system blue
16
- primary: '#007aff',
15
+ // Primary - Apple system blue, darkened for text. `#007aff` is only 3.6:1
16
+ // on `background` and 4.0:1 on white, so ghost buttons and links (which
17
+ // draw their text in `primary`) failed WCAG AA 4.5:1 on every light Glass
18
+ // surface; `#0066cc` clears it on all of them (5.0:1 on `#f2f2f7`) while
19
+ // `onPrimary` white stays 5.6:1 on filled controls (#4567).
20
+ primary: '#0066cc',
17
21
  onPrimary: '#ffffff',
18
- primaryContainer: 'rgba(0, 122, 255, 0.15)',
22
+ primaryContainer: 'rgba(0, 102, 204, 0.15)',
19
23
  onPrimaryContainer: '#003d80',
20
24
  // Secondary - System gray
21
25
  secondary: '#6c757d',
@@ -145,7 +149,7 @@ const darkColors = {
145
149
  // Inverse
146
150
  inverseSurface: '#f2f2f7',
147
151
  inverseOnSurface: '#000000',
148
- inversePrimary: '#007aff',
152
+ inversePrimary: '#0066cc',
149
153
  // Effects
150
154
  shadow: 'rgba(0, 0, 0, 0.4)',
151
155
  scrim: 'rgba(0, 0, 0, 0.6)',
@@ -15,9 +15,9 @@
15
15
  --smrt-theme-name: Glass;
16
16
  --smrt-color-scheme: light;
17
17
  --smrt-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
18
- --smrt-color-primary: #007aff;
18
+ --smrt-color-primary: #0066cc;
19
19
  --smrt-color-on-primary: #ffffff;
20
- --smrt-color-primary-container: rgba(0, 122, 255, 0.15);
20
+ --smrt-color-primary-container: rgba(0, 102, 204, 0.15);
21
21
  --smrt-color-on-primary-container: #003d80;
22
22
  --smrt-color-secondary: #6c757d;
23
23
  --smrt-color-on-secondary: #ffffff;
@@ -335,7 +335,7 @@
335
335
  --smrt-color-outline-variant: rgba(84, 84, 88, 0.35);
336
336
  --smrt-color-inverse-surface: #f2f2f7;
337
337
  --smrt-color-inverse-on-surface: #000000;
338
- --smrt-color-inverse-primary: #007aff;
338
+ --smrt-color-inverse-primary: #0066cc;
339
339
  --smrt-color-shadow: rgba(0, 0, 0, 0.4);
340
340
  --smrt-color-scrim: rgba(0, 0, 0, 0.6);
341
341
  --smrt-color-glass-backdrop: rgba(29, 29, 38, 0.72);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-ui",
3
- "version": "0.57.45",
3
+ "version": "0.57.47",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
6
6
  "type": "module",
@@ -176,7 +176,7 @@
176
176
  "access": "public"
177
177
  },
178
178
  "dependencies": {
179
- "@happyvertical/smrt-types": "0.57.45",
179
+ "@happyvertical/smrt-types": "0.57.47",
180
180
  "esm-env": "^1.2.2"
181
181
  },
182
182
  "peerDependencies": {
@@ -196,7 +196,7 @@
196
196
  }
197
197
  },
198
198
  "devDependencies": {
199
- "@happyvertical/speech": "^0.111.0",
199
+ "@happyvertical/speech": "^0.111.3",
200
200
  "@sveltejs/package": "^2.5.8",
201
201
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
202
202
  "@testing-library/jest-dom": "^7.0.1",