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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ preference.
and sizing.

`tailwind.css` exposes utilities such as `bg-background`, `text-foreground-muted`,
`border-rule`, `bg-accent-clay`, `font-sans`, `text-body`, `text-signal`, `rounded-tight`,
`duration-quick`, `ease-edit`, and `size-control-compact`. `text-signal` is the compact
`border-rule`, `bg-accent-clay`, `font-sans`, `text-body`, `text-signal`,
`rounded-tight`, `duration-quick`, `ease-edit`, `ease-reveal`, and
`size-control-compact`. `text-signal` is the compact
typography role; use `text-brand-signal` when the semantic gold signal color is intended.

## React UI
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@protocol-works/design-tokens",
"version": "0.2.1",
"version": "0.2.2",
"description": "Shared [protocol]works brand, theme, typography, motion, and geometry tokens.",
"type": "module",
"workspaces": [
Expand Down
1 change: 1 addition & 0 deletions tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

/* Motion */
--ease-edit: var(--pw-ease-edit);
--ease-reveal: var(--pw-ease-reveal);
--ease-cut: var(--pw-ease-cut);
--transition-duration-quick: var(--pw-duration-quick);
--transition-duration-medium: var(--pw-duration-medium);
Expand Down
9 changes: 9 additions & 0 deletions test/contracts.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ test("keeps light and dark themes explicit", () => {
assert.match(tokensCss, /--pw-color-accent:\s*#c06a6a/);
});

test("defines the semantic reveal motion curve", () => {
assert.match(
tokensCss,
/--pw-ease-reveal:\s*cubic-bezier\(0\.16, 1, 0\.3, 1\)/,
);
});

test("generates the public Tailwind utility vocabulary", async () => {
const compiler = await compile(`${tailwindCss}\n@tailwind utilities;`);
const output = compiler.build([
Expand All @@ -61,6 +68,7 @@ test("generates the public Tailwind utility vocabulary", async () => {
"border-hairline",
"duration-quick",
"ease-edit",
"ease-reveal",
"size-hit-target",
"size-control-compact",
"size-control-default",
Expand All @@ -82,6 +90,7 @@ test("generates the public Tailwind utility vocabulary", async () => {
"border-hairline",
"duration-quick",
"ease-edit",
"ease-reveal",
"size-hit-target",
"size-control-compact",
"size-control-default",
Expand Down
1 change: 1 addition & 0 deletions tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

/* Motion */
--pw-ease-edit: cubic-bezier(0.2, 0.7, 0.2, 1);
--pw-ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
--pw-ease-cut: linear;
--pw-duration-quick: 150ms;
--pw-duration-medium: 280ms;
Expand Down
Loading