@happyvertical/smrt-ui 0.57.45 → 0.57.46

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"}
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.46",
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.46",
180
180
  "esm-env": "^1.2.2"
181
181
  },
182
182
  "peerDependencies": {