@code-sherpas/pharos-tokens 1.1.1 → 1.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 +2 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +1 -0
- package/dist/tokens.json +1 -0
- package/package.json +1 -1
- package/src/layout.tokens.json +5 -0
package/README.md
CHANGED
|
@@ -64,13 +64,7 @@ const cardRadius = tokens.radius['2xl'];
|
|
|
64
64
|
|
|
65
65
|
Every token path is typed, so a renamed or removed token fails your compilation. The declarations need neither `resolveJsonModule` nor `skipLibCheck`, and compile with `moduleResolution` `bundler`, `node16` and `nodenext`.
|
|
66
66
|
|
|
67
|
-
### Option C —
|
|
68
|
-
|
|
69
|
-
```ts
|
|
70
|
-
import { PharosColorPrimary600, PharosRadius2xl } from '@code-sherpas/pharos-tokens/tokens.js';
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Option D — DTCG source (custom pipelines)
|
|
67
|
+
### Option C — DTCG source (custom pipelines)
|
|
74
68
|
|
|
75
69
|
For your own transforms (iOS, Android, Figma, etc.):
|
|
76
70
|
|
|
@@ -99,7 +93,7 @@ See [the rules for consumers](https://app.notion.com/p/4071751eee1081b2b000e212c
|
|
|
99
93
|
| Duration | `duration.{fast,normal,slow}` | Transitions. |
|
|
100
94
|
| Easing | `easing.{in,out,in-out}` | Cubic-bezier curves. |
|
|
101
95
|
| Width | `width.panel` | Widths by role. `panel`: Sheet and SidePanel (24rem). |
|
|
102
|
-
| Breakpoint | `breakpoint.panel`
|
|
96
|
+
| Breakpoint | `breakpoint.{compact,panel}` | By role (D32), read in JS. `compact`: a phone, < 40rem. |
|
|
103
97
|
|
|
104
98
|
## Contributing
|
|
105
99
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
--pharos-color-accent-terracotta-800: oklch(42.00% 0.1020 42.5); /** Press step of a terracotta fill (#79371A). */
|
|
54
54
|
--pharos-color-accent-terracotta-900: oklch(33.00% 0.0770 42.5); /** Deep text on a terracotta tint (#552612). */
|
|
55
55
|
--pharos-width-panel: 24rem; /** Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)). */
|
|
56
|
+
--pharos-breakpoint-compact: 40rem; /** The compact width, a phone's: below it the viewport is compact, the only test for 'phone' in Pharos (Material 3's compact window); a Dialog fills the screen below it. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
56
57
|
--pharos-breakpoint-panel: 64rem; /** Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
57
58
|
--pharos-radius-none: 0; /** Square corners. */
|
|
58
59
|
--pharos-radius-sm: 0.125rem; /** 2px — small marks, code chips. */
|
package/dist/tokens.d.ts
CHANGED
|
@@ -126,6 +126,8 @@ export const PharosColorAccentTerracottaBg: string;
|
|
|
126
126
|
export const PharosColorAccentTerracottaOn: string;
|
|
127
127
|
/** Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)). */
|
|
128
128
|
export const PharosWidthPanel: string;
|
|
129
|
+
/** The compact width, a phone's: below it the viewport is compact, the only test for 'phone' in Pharos (Material 3's compact window); a Dialog fills the screen below it. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
130
|
+
export const PharosBreakpointCompact: string;
|
|
129
131
|
/** Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media. */
|
|
130
132
|
export const PharosBreakpointPanel: string;
|
|
131
133
|
/** Square corners. */
|
package/dist/tokens.js
CHANGED
|
@@ -65,6 +65,7 @@ export const PharosColorAccentTerracottaFg = "oklch(51.60% 0.1261 40.7)"; // Acc
|
|
|
65
65
|
export const PharosColorAccentTerracottaBg = "oklch(96.50% 0.0160 42.5)"; // Tint surface for warm-accent blocks on white (→ terracotta-50).
|
|
66
66
|
export const PharosColorAccentTerracottaOn = "oklch(100% 0 0)"; // Text on a solid terracotta mark (use on 700 for small text).
|
|
67
67
|
export const PharosWidthPanel = "24rem"; // Width of an edge-docked panel: Sheet, and SidePanel inline or modal. Cap it at the viewport (min(var(--pharos-width-panel), 100vw)).
|
|
68
|
+
export const PharosBreakpointCompact = "40rem"; // The compact width, a phone's: below it the viewport is compact, the only test for 'phone' in Pharos (Material 3's compact window); a Dialog fills the screen below it. Read it in JS (matchMedia) — a custom property does not work inside @media.
|
|
68
69
|
export const PharosBreakpointPanel = "64rem"; // Viewport width from which a SidePanel sits inline beside the content and narrows it; below it, the panel opens as a modal Sheet. Read it in JS (matchMedia) — a custom property does not work inside @media.
|
|
69
70
|
export const PharosRadiusNone = "0"; // Square corners.
|
|
70
71
|
export const PharosRadiusSm = "0.125rem"; // 2px — small marks, code chips.
|
package/dist/tokens.json
CHANGED
package/package.json
CHANGED
package/src/layout.tokens.json
CHANGED
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
"breakpoint": {
|
|
10
|
+
"compact": {
|
|
11
|
+
"$value": "40rem",
|
|
12
|
+
"$type": "dimension",
|
|
13
|
+
"$description": "The compact width, a phone's: below it the viewport is compact, the only test for 'phone' in Pharos (Material 3's compact window); a Dialog fills the screen below it. Read it in JS (matchMedia) — a custom property does not work inside @media."
|
|
14
|
+
},
|
|
10
15
|
"panel": {
|
|
11
16
|
"$value": "64rem",
|
|
12
17
|
"$type": "dimension",
|