@castui/cast-ui 0.1.0 → 0.2.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/README.md CHANGED
@@ -68,6 +68,8 @@ cast-ui/
68
68
  preview-head.html Google Fonts <link> tags
69
69
  .github/workflows/
70
70
  chromatic.yml Visual regression testing on push
71
+ adoption.yml Zeroheight adoption tracking on push to main
72
+ publish.yml Publish to npm on push to main
71
73
  dist/ Build output (gitignored)
72
74
  tsconfig.json Development TypeScript config
73
75
  tsconfig.build.json Library build config (excludes stories)
@@ -113,6 +115,7 @@ Opens at `http://localhost:6006`. Use the paintbrush icon in the toolbar to swit
113
115
  | `npm run build-storybook` | Build static Storybook (auto-runs `build:tokens`) |
114
116
  | `npm run build` | Full library build: tokens + TypeScript compilation to `dist/` |
115
117
  | `npm publish` | Publish to npm (auto-runs `build` via `prepublishOnly`) |
118
+ | `npm run zh:track-package` | Register/update package info with Zeroheight (runs automatically via CI) |
116
119
 
117
120
  ## Themes
118
121
 
@@ -297,15 +300,111 @@ The build script (`src/tokens/build.ts`) reads Figma-exported JSON from `design-
297
300
  5. Export the component and its types from `src/index.ts`
298
301
  6. If the component needs new design tokens, add them to all four `*.tokens.json` files and update `src/theme/types.ts`
299
302
 
303
+ ## Adoption Tracking
304
+
305
+ Design system adoption is measured via [Zeroheight](https://zeroheight.com/). There are two sides to the setup: **this design system repo** and the **consumer app repos** that install it.
306
+
307
+ ### This repo (design system)
308
+
309
+ The only command relevant here is `track-package`. It registers `@castui/cast-ui` and its current version with Zeroheight so the dashboard knows what the latest release is.
310
+
311
+ This runs automatically on every push to `main` via the GitHub Actions workflow at `.github/workflows/adoption.yml`. You can also run it locally:
312
+
313
+ ```bash
314
+ npm run zh:track-package
315
+ ```
316
+
317
+ ### Consumer app repos
318
+
319
+ The adoption CLI is designed to be run **in the repositories that consume this design system**. These are the commands consumers (or their CI pipelines) should run:
320
+
321
+ | Command | What it measures |
322
+ |---------|-----------------|
323
+ | `npx @zeroheight/adoption-cli analyze --component-usage` | Which Cast UI components are imported and how their props are used |
324
+ | `npx @zeroheight/adoption-cli analyze --color-usage` | Hardcoded color values (`#hex`, `rgb()`, etc.) that should be replaced with theme tokens |
325
+ | `npx @zeroheight/adoption-cli monitor-repo` | Which version of `@castui/cast-ui` the consumer app is on |
326
+
327
+ **How color tracking works:** The `--color-usage` flag scans for *non-token* color values — raw hex, rgb, or hsl strings that a developer hardcoded instead of using `theme.semantic.color.*`. A high count means developers are bypassing the design system; a count trending to zero means strong token adoption. Running this in the design system repo itself correctly returns zero results because components only reference theme tokens, never hardcoded colours.
328
+
329
+ ### Consumer CI example
330
+
331
+ Consumer teams can automate adoption reporting by adding a workflow to their repos:
332
+
333
+ ```yaml
334
+ # .github/workflows/design-system-adoption.yml
335
+ name: "Design System Adoption"
336
+
337
+ on:
338
+ push:
339
+ branches: [main]
340
+
341
+ jobs:
342
+ adoption:
343
+ runs-on: ubuntu-latest
344
+ steps:
345
+ - uses: actions/checkout@v5
346
+ - uses: actions/setup-node@v6
347
+ with:
348
+ node-version: 20
349
+ - run: npm ci
350
+ - name: Report adoption to Zeroheight
351
+ env:
352
+ ZEROHEIGHT_CLIENT_ID: ${{ secrets.ZEROHEIGHT_CLIENT_ID }}
353
+ ZEROHEIGHT_ACCESS_TOKEN: ${{ secrets.ZEROHEIGHT_ACCESS_TOKEN }}
354
+ run: |
355
+ npx @zeroheight/adoption-cli analyze --component-usage --interactive false -r "${{ github.repository }}"
356
+ npx @zeroheight/adoption-cli analyze --color-usage --interactive false -r "${{ github.repository }}"
357
+ npx @zeroheight/adoption-cli monitor-repo --interactive false
358
+ ```
359
+
360
+ ### Required secrets
361
+
362
+ All Zeroheight CLI commands in CI require two repository secrets:
363
+
364
+ | Secret | Description |
365
+ |--------|-------------|
366
+ | `ZEROHEIGHT_CLIENT_ID` | OAuth client ID from your Zeroheight account |
367
+ | `ZEROHEIGHT_ACCESS_TOKEN` | Access token from your Zeroheight account |
368
+
369
+ Generate these at **Zeroheight > Account Settings > Access Tokens**.
370
+
300
371
  ## npm Publishing
301
372
 
302
- The package is configured for public npm publishing:
373
+ The publish workflow (`.github/workflows/publish.yml`) runs on every push to `main`. It **automatically checks** whether the `version` in `package.json` has changed compared to what's already on npm. If the version is the same, the workflow skips silently — no build, no publish. If the version is new, it builds and publishes.
374
+
375
+ This means merging a PR to `main` does **not** automatically publish to npm. Only PRs that include a version bump in `package.json` will trigger a release.
376
+
377
+ **To publish a new version:**
378
+
379
+ 1. Create a feature branch and make your changes
380
+ 2. Update the `version` field in `package.json` (e.g. `0.1.0` → `0.1.1`)
381
+ 3. Push the branch and open a PR to `main`
382
+ 4. Chromatic runs and creates status checks on the PR
383
+ 5. Review and accept any visual changes in the Chromatic UI
384
+ 6. Once Chromatic checks pass, merge the PR
385
+ 7. The publish workflow detects the new version, builds tokens + TypeScript, and publishes to npm
386
+
387
+ **If you don't bump the version:** The PR merges normally, Chromatic still runs, but the publish step is skipped. Your code is on `main` but no new npm version is created. This is useful for documentation changes, CI updates, or batching multiple changes before a release.
388
+
389
+ **If Chromatic changes are rejected:** Fix the code on your feature branch, push again. Chromatic re-runs with the new changes. Repeat until the visuals are right, then accept and merge.
390
+
391
+ **Version numbering guide:**
392
+
393
+ | Change type | Bump | Example |
394
+ |-------------|------|---------|
395
+ | Bug fix or minor tweak | Patch | `0.1.0` → `0.1.1` |
396
+ | New component or feature | Minor | `0.1.0` → `0.2.0` |
397
+ | Breaking API change | Major | `0.1.0` → `1.0.0` |
398
+
399
+ **Package details:**
303
400
 
304
401
  - **Entry point:** `dist/index.js` (CJS) with `dist/index.d.ts` type declarations
305
402
  - **Included files:** `dist/`, `README.md`, `LICENSE`
306
403
  - **Peer dependencies:** `react` (>=18), `react-native` (>=0.72)
307
404
  - **License:** MIT
308
405
 
406
+ You can still publish manually if needed:
407
+
309
408
  ```bash
310
409
  npm login
311
410
  npm publish
@@ -326,8 +425,34 @@ When adding new top-level files or directories, you must add a `!path` entry to
326
425
  | Workflow | Trigger | Purpose |
327
426
  |----------|---------|---------|
328
427
  | Chromatic (`.github/workflows/chromatic.yml`) | Every push | Visual regression testing via Storybook snapshots |
428
+ | Adoption Tracking (`.github/workflows/adoption.yml`) | Push to `main` | Registers package version with Zeroheight |
429
+ | Publish to npm (`.github/workflows/publish.yml`) | Push to `main` | Builds and publishes package to npm |
430
+
431
+ **Required secrets:**
432
+
433
+ | Secret | Used by |
434
+ |--------|---------|
435
+ | `CHROMATIC_PROJECT_TOKEN` | Chromatic workflow |
436
+ | `ZEROHEIGHT_CLIENT_ID` | Adoption Tracking workflow |
437
+ | `ZEROHEIGHT_ACCESS_TOKEN` | Adoption Tracking workflow |
438
+
439
+ The Publish workflow authenticates to npm via **OpenID Connect (OIDC)** using npm's Trusted Publishers feature — no `NPM_TOKEN` secret is needed. The trust relationship is configured at [npmjs.com](https://www.npmjs.com/) under **Package Settings → Trusted Publishers**. The `--provenance` flag attaches a verified build attestation to each published version.
440
+
441
+ ### Branch Protection
442
+
443
+ Branch protection on `main` ensures that **no code is merged without passing Chromatic visual checks**. This is what prevents unreviewed visual changes from being published to npm.
444
+
445
+ **To set up (one-time, on GitHub):**
446
+
447
+ 1. Go to **Settings → Branches** in your repository
448
+ 2. Click **Add branch protection rule**
449
+ 3. Set **Branch name pattern** to `main`
450
+ 4. Enable **Require a pull request before merging**
451
+ 5. Enable **Require status checks to pass before merging**
452
+ 6. Search for and add **Run Chromatic** (GitHub Actions) and **UI Tests** (any source) as required checks
453
+ 7. Click **Save changes**
329
454
 
330
- **Required secrets:** `CHROMATIC_PROJECT_TOKEN` (repository secret).
455
+ Once enabled, you can no longer push directly to `main`. All changes go through feature branches and PRs, with Chromatic as a mandatory gate.
331
456
 
332
457
  ## Dependencies
333
458
 
@@ -2,17 +2,19 @@ import React from 'react';
2
2
  import { type ViewProps } from 'react-native';
3
3
  export interface CardProps extends Omit<ViewProps, 'style'> {
4
4
  /** Card title text. */
5
- heading?: string;
6
- /** Card body text. */
5
+ title: string;
6
+ /** Optional subtitle displayed below the title. */
7
+ subtitle?: string;
8
+ /** Optional body text. */
7
9
  body?: string;
8
- /** Override card content with arbitrary children. */
9
- children?: React.ReactNode;
10
+ /** Optional actions row (e.g. Button components). */
11
+ actions?: React.ReactNode;
10
12
  }
11
13
  /**
12
- * Themed container for grouping related content.
14
+ * Card container for grouping related content.
13
15
  *
14
- * Renders as a React Native `View` – works identically on iOS, Android,
15
- * and Web (via React Native Web).
16
+ * Renders as a React Native `View` with `Text` children – works identically
17
+ * on iOS, Android, and Web (via React Native Web).
16
18
  */
17
- export declare function Card({ heading, body, children, ...viewProps }: CardProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function Card({ title, subtitle, body, actions, ...viewProps }: CardProps): import("react/jsx-runtime").JSX.Element;
18
20
  //# sourceMappingURL=Card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IACzD,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,EAAE,SAAS,2CAqDxE"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IACzD,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAMD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,GAAG,SAAS,EACb,EAAE,SAAS,2CAsEX"}
@@ -5,49 +5,60 @@ import { useTheme } from '../../theme';
5
5
  // Component
6
6
  // ---------------------------------------------------------------------------
7
7
  /**
8
- * Themed container for grouping related content.
8
+ * Card container for grouping related content.
9
9
  *
10
- * Renders as a React Native `View` – works identically on iOS, Android,
11
- * and Web (via React Native Web).
10
+ * Renders as a React Native `View` with `Text` children – works identically
11
+ * on iOS, Android, and Web (via React Native Web).
12
12
  */
13
- export function Card({ heading, body, children, ...viewProps }) {
13
+ export function Card({ title, subtitle, body, actions, ...viewProps }) {
14
14
  const theme = useTheme();
15
15
  const ct = theme.component.card;
16
- // --- container styles ------------------------------------------------------
16
+ const sem = theme.semantic;
17
+ // --- build styles ----------------------------------------------------------
17
18
  const containerStyle = {
18
19
  padding: ct.padding,
19
20
  gap: ct.gap,
20
- backgroundColor: ct.background,
21
21
  borderRadius: ct.cornerRadius,
22
+ backgroundColor: ct.background,
22
23
  borderWidth: ct.strokeWidth,
23
24
  borderColor: ct.stroke,
24
- // Elevation / shadow
25
- ...(ct.elevation > 0 && {
26
- // iOS shadows
27
- shadowColor: '#000',
28
- shadowOffset: { width: 0, height: ct.elevation },
29
- shadowOpacity: 0.08 * ct.elevation,
30
- shadowRadius: ct.elevation * 2,
31
- // Android elevation
32
- elevation: ct.elevation,
33
- }),
25
+ elevation: ct.elevation,
26
+ // Web shadow for elevation (React Native Web doesn't map elevation to CSS)
27
+ ...(ct.elevation > 0
28
+ ? { boxShadow: '0 1px 3px rgba(0,0,0,0.12)' }
29
+ : {}),
34
30
  };
35
- // --- typography styles -----------------------------------------------------
36
31
  const headingFontFamily = ct.headingFontFamily === 'system-ui' ? undefined : ct.headingFontFamily;
37
- const bodyFontFamily = ct.bodyFontFamily === 'system-ui' ? undefined : ct.bodyFontFamily;
38
- const headingStyle = {
32
+ const titleStyle = {
39
33
  fontSize: ct.headingSize,
40
34
  fontWeight: String(ct.headingWeight),
41
- color: theme.semantic.color.onSurface,
35
+ lineHeight: ct.headingSize * sem.lineHeight.body,
36
+ letterSpacing: sem.letterSpacing.heading,
37
+ color: sem.color.onSurface,
42
38
  ...(headingFontFamily ? { fontFamily: headingFontFamily } : {}),
43
39
  };
40
+ const subtitleFontFamily = sem.fontFamily.interface === 'system-ui' ? undefined : sem.fontFamily.interface;
41
+ const subtitleStyle = {
42
+ fontSize: sem.fontSize.small,
43
+ fontWeight: String(sem.fontWeight.body),
44
+ lineHeight: sem.fontSize.small * sem.lineHeight.body,
45
+ letterSpacing: sem.letterSpacing.body,
46
+ color: sem.color.onSurfaceMuted,
47
+ ...(subtitleFontFamily ? { fontFamily: subtitleFontFamily } : {}),
48
+ };
49
+ const bodyFontFamily = ct.bodyFontFamily === 'system-ui' ? undefined : ct.bodyFontFamily;
44
50
  const bodyStyle = {
45
51
  fontSize: ct.bodySize,
46
52
  fontWeight: String(ct.bodyWeight),
47
- color: theme.semantic.color.onSurfaceMuted,
48
- lineHeight: ct.bodySize * theme.semantic.lineHeight.body,
53
+ lineHeight: ct.bodySize * sem.lineHeight.body,
54
+ letterSpacing: sem.letterSpacing.body,
55
+ color: sem.color.onSurfaceMuted,
49
56
  ...(bodyFontFamily ? { fontFamily: bodyFontFamily } : {}),
50
57
  };
51
- return (_jsxs(View, { ...viewProps, style: containerStyle, children: [heading != null && _jsx(Text, { style: headingStyle, children: heading }), body != null && _jsx(Text, { style: bodyStyle, children: body }), children] }));
58
+ const actionsStyle = {
59
+ flexDirection: 'row',
60
+ gap: ct.gap,
61
+ };
62
+ return (_jsxs(View, { ...viewProps, style: containerStyle, accessibilityRole: "summary", children: [_jsx(Text, { style: titleStyle, children: title }), subtitle ? _jsx(Text, { style: subtitleStyle, children: subtitle }) : null, body ? _jsx(Text, { style: bodyStyle, children: body }) : null, actions ? _jsx(View, { style: actionsStyle, children: actions }) : null] }));
52
63
  }
53
64
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,IAAI,EACJ,IAAI,GAIL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAevC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAa;IACvE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IAEhC,8EAA8E;IAC9E,MAAM,cAAc,GAAc;QAChC,OAAO,EAAE,EAAE,CAAC,OAAO;QACnB,GAAG,EAAE,EAAE,CAAC,GAAG;QACX,eAAe,EAAE,EAAE,CAAC,UAAU;QAC9B,YAAY,EAAE,EAAE,CAAC,YAAY;QAC7B,WAAW,EAAE,EAAE,CAAC,WAAW;QAC3B,WAAW,EAAE,EAAE,CAAC,MAAM;QACtB,qBAAqB;QACrB,GAAG,CAAC,EAAE,CAAC,SAAS,GAAG,CAAC,IAAI;YACtB,cAAc;YACd,WAAW,EAAE,MAAM;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE;YAChD,aAAa,EAA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CAA4B;QAC5D,UAAU,EAAE,EAAE,CAAC,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI;QAC7C,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI;QACrC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,cAAc;QAC/B,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC;IAEF,MAAM,YAAY,GAAc;QAC9B,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,EAAE,CAAC,GAAG;KACZ,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,OAAK,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAC,SAAS,aACrE,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,YAAG,KAAK,GAAQ,EACtC,QAAQ,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,aAAa,YAAG,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,EAC/D,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,YAAG,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,EACnD,OAAO,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,YAAG,OAAO,GAAQ,CAAC,CAAC,CAAC,IAAI,IACxD,CACR,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export { CastThemeProvider, useTheme } from './theme';
2
2
  export type { CastThemeProviderProps } from './theme';
3
- export type { CastTheme, ThemeName, SemanticTokens, ComponentTokens, ButtonTokens, } from './theme';
3
+ export type { CastTheme, ThemeName, SemanticTokens, ComponentTokens, ButtonTokens, CardTokens, } from './theme';
4
4
  export { THEME_FONT_FAMILIES, googleFontsUrl } from './theme';
5
5
  export { whiteLabel, consumer, corporate, luxury, } from './tokens/generated';
6
6
  export { Button } from './components/Button/Button';
7
7
  export type { ButtonProps, ButtonVariant } from './components/Button/Button';
8
+ export { Card } from './components/Card/Card';
9
+ export type { CardProps } from './components/Card/Card';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,GACP,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,GACP,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -8,4 +8,5 @@ export { THEME_FONT_FAMILIES, googleFontsUrl } from './theme';
8
8
  export { whiteLabel, consumer, corporate, luxury, } from './tokens/generated';
9
9
  // Components
10
10
  export { Button } from './components/Button/Button';
11
+ export { Card } from './components/Card/Card';
11
12
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAStD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,gBAAgB;AAChB,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,GACP,MAAM,oBAAoB,CAAC;AAE5B,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUtD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,gBAAgB;AAChB,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,GACP,MAAM,oBAAoB,CAAC;AAE5B,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castui/cast-ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A cross-platform design system for React Native (iOS, Android, Web) with multi-theme support.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,7 +17,8 @@
17
17
  "build-storybook": "STORYBOOK_DISABLE_TELEMETRY=1 storybook build",
18
18
  "build": "npm run build:tokens && tsc --project tsconfig.build.json",
19
19
  "prepublishOnly": "npm run build",
20
- "test": "echo \"Error: no test specified\" && exit 1"
20
+ "test": "echo \"Error: no test specified\" && exit 1",
21
+ "zh:track-package": "zh-adoption track-package"
21
22
  },
22
23
  "repository": {
23
24
  "type": "git",
@@ -32,7 +33,7 @@
32
33
  "cross-platform",
33
34
  "ui-components"
34
35
  ],
35
- "author": "Connagh <connagh@live.com>",
36
+ "author": "Connagh <connagh@users.noreply.github.com>",
36
37
  "license": "MIT",
37
38
  "type": "commonjs",
38
39
  "bugs": {