Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,20 @@ find the full documentation for it [in our repository](https://github.com/change

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

## npm Trusted Publishing

The release workflow uses GitHub Actions OIDC. In the npm settings for each
published `@precursor/*` package, configure a GitHub Actions trusted publisher
for owner `danieldelcore`, repository `precursor`, and workflow `release.yml`.
Allow direct npm publishing and leave the environment field blank. In the
repository's Actions settings, allow GitHub Actions to create pull requests.

Once the release PR is merged, the workflow publishes the updated packages.
Use the Release workflow's manual dispatch on `master` to retry a release.

For new packages such as `@precursor/divider`, `@precursor/bleed`, and `@precursor/popup`, an npm
maintainer must publish an initial version before the package can be configured
for Trusted Publishing. Use a bootstrap version below the planned release
version and a separate dist-tag so the version selected by Changesets remains
available for the first CI release.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected].1/schema.json",
"$schema": "https://unpkg.com/@changesets/config@4.1.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"access": "public",
Expand Down
37 changes: 37 additions & 0 deletions .changeset/four-theme-slots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@precursor/badge': patch
'@precursor/bleed': minor
'@precursor/blockquote': patch
'@precursor/button': patch
'@precursor/checkbox': patch
'@precursor/code': patch
'@precursor/divider': minor
'@precursor/grid': patch
'@precursor/heading': minor
'@precursor/inline': patch
'@precursor/input': patch
'@precursor/keyboard': patch
'@precursor/label': patch
'@precursor/lozenge': patch
'@precursor/message': patch
'@precursor/modal': patch
'@precursor/panel': patch
'@precursor/radio': patch
'@precursor/range': patch
'@precursor/select': patch
'@precursor/skeleton': patch
'@precursor/spinner': patch
'@precursor/stack': patch
'@precursor/tabs': patch
'@precursor/text': minor
'@precursor/textarea': patch
'@precursor/theme': major
'@precursor/toggle': patch
'@precursor/tokens': major
---

Generate theme variants at build time with Style Dictionary. Select color, spacing, shape, and typography through ThemeProvider's `selection` prop. For synchronous SSR, prepare `initialTheme` with `loadTheme`. The color slot has independent light and dark palettes. The separate `colorMode` setting defaults to `auto` and follows the browser preference before hydration.

Grid, Stack, Inline, Text, and Heading now use the generated tokens. Divider and Bleed are available as new primitives. The component catalog uses the new token contract through the existing exports.

Use `--spacing-gap-*` for margins and gaps and `--spacing-inset-*` for padding. The previous step spacing tokens are removed. Use `--spacing-inline` between inline elements. Squish remains available as `--spacing-inset-squish`.
5 changes: 5 additions & 0 deletions .changeset/full-width-grid-rows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@precursor/grid': patch
---

Span each Row across the parent Grid and align its columns with the parent tracks. A single child fills the row by default.
10 changes: 10 additions & 0 deletions .changeset/native-overlays-and-variants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@precursor/button': minor
'@precursor/checkbox': minor
'@precursor/modal': minor
'@precursor/popup': minor
'@precursor/tabs': minor
'@precursor/tokens': minor
---

Add pill tabs, a monospace typography theme, and a themed checkbox with native form behavior. Add Popup using the native Popover API and support popover targets on Button. Modal now uses the native modal dialog API for focus and dismissal.
35 changes: 35 additions & 0 deletions .changeset/static-precursor-styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
'@precursor/avatar': major
'@precursor/badge': major
'@precursor/blockquote': major
'@precursor/button': major
'@precursor/checkbox': major
'@precursor/code': major
'@precursor/emoji': major
'@precursor/grid': major
'@precursor/heading': major
'@precursor/image': major
'@precursor/inline': major
'@precursor/input': major
'@precursor/keyboard': major
'@precursor/label': major
'@precursor/list': major
'@precursor/lozenge': major
'@precursor/message': major
'@precursor/modal': major
'@precursor/overlay': major
'@precursor/panel': major
'@precursor/radio': major
'@precursor/range': major
'@precursor/select': major
'@precursor/skeleton': major
'@precursor/spinner': major
'@precursor/stack': major
'@precursor/tabs': major
'@precursor/text': major
'@precursor/textarea': major
'@precursor/theme': major
'@precursor/toggle': major
---

Require React 19 and ship styles compiled by Trousers 4. Browser-aware bundlers load the styles with each component. For server-rendered apps, include the generated CSS in the client bundle. Render a ThemeProvider around styled components to supply the default or a custom theme.
37 changes: 37 additions & 0 deletions .changeset/trousers-named-insets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@precursor/avatar': patch
'@precursor/badge': patch
'@precursor/bleed': patch
'@precursor/blockquote': patch
'@precursor/button': patch
'@precursor/checkbox': patch
'@precursor/code': patch
'@precursor/divider': patch
'@precursor/grid': patch
'@precursor/heading': patch
'@precursor/image': patch
'@precursor/inline': patch
'@precursor/input': patch
'@precursor/keyboard': patch
'@precursor/label': patch
'@precursor/list': patch
'@precursor/lozenge': patch
'@precursor/message': patch
'@precursor/modal': patch
'@precursor/panel': patch
'@precursor/popup': patch
'@precursor/radio': patch
'@precursor/range': patch
'@precursor/select': patch
'@precursor/skeleton': patch
'@precursor/spinner': patch
'@precursor/stack': patch
'@precursor/tabs': patch
'@precursor/text': patch
'@precursor/textarea': patch
'@precursor/theme': patch
'@precursor/toggle': patch
'@precursor/tokens': minor
---

Update the Trousers runtime and compiler to 4.1.0. Add a large inset token and use Trousers named inset variants in the Storybook layout examples.
7 changes: 7 additions & 0 deletions .changeset/workspace-package-exports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@precursor/copy-to-clipboard': patch
'@precursor/tokens': patch
'@precursor/types': patch
---

Publish JavaScript and types for both ESM and CommonJS consumers. Remove a trailing semicolon from the default font-family token so it can be applied as an inline style.
37 changes: 0 additions & 37 deletions .eslintrc.js

This file was deleted.

42 changes: 21 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ name: Release

on:
push:
branches:
- master
branches: [master]
workflow_dispatch:

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
name: Release
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@master
- uses: actions/checkout@v7
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 12.x
uses: actions/setup-node@master
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version: 12.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
node-version-file: .node-version
- run: npm install --global [email protected]
- run: corepack enable
- run: yarn install --immutable
- uses: changesets/[email protected]
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
version-script: yarn version:packages
publish-script: yarn release
27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

25 changes: 11 additions & 14 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@ on:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
validate:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
node-version-file: .node-version
- run: npm install --global [email protected]
- run: corepack enable
- run: yarn install --immutable
- run: yarn validate
env:
CI: true
- run: yarn storybook build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ lib
dist
.site
.DS_Store
.vscode
**/.vscode/*
!/.vscode/settings.json
!/.vscode/extensions.json
storybook-static
tsconfig.tsbuildinfo
.yarn/install-state.gz
/packages/theming/tokens/theme-registry.generated.ts
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
12 changes: 12 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"singleQuote": true,
"tabWidth": 4,
"printWidth": 80,
"ignorePatterns": [
"**/dist/**",
"storybook-static/**",
"coverage/**",
"**/CHANGELOG.md"
]
}
9 changes: 9 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "jsx-a11y"],
"ignorePatterns": ["**/dist/**", "storybook-static/**", "coverage/**"],
"rules": {
"react/rules-of-hooks": "error",
"react/exhaustive-deps": "error"
}
}
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

Empty file removed .storybook/addons.js
Empty file.
6 changes: 0 additions & 6 deletions .storybook/config.js

This file was deleted.

Loading