@code-sherpas/pharos-react 0.2.2 → 0.3.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/RULES.md +10 -2
- package/dist/components/Button.d.ts +8 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/PharosHello.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -1717
- package/dist/index.js.map +1 -1
- package/dist/lib/cn.d.ts +13 -0
- package/dist/lib/cn.d.ts.map +1 -1
- package/dist/styles.css +1 -2
- package/package.json +5 -6
package/RULES.md
CHANGED
|
@@ -38,8 +38,16 @@ canonical one — do not alias.
|
|
|
38
38
|
import '@code-sherpas/pharos-react/styles.css';
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
This loads the compiled
|
|
42
|
-
|
|
41
|
+
This loads the compiled CSS Modules output of every component (hashed class
|
|
42
|
+
names that the React components reference at runtime). Without it,
|
|
43
|
+
components render unstyled.
|
|
44
|
+
|
|
45
|
+
**You do not need Tailwind, PostCSS, or any other CSS framework to consume
|
|
46
|
+
pharos-react** (Decision D9). The published bundle is pure CSS — no
|
|
47
|
+
`@layer` directives, no preflight, no global resets, no class-name
|
|
48
|
+
collisions with your own utilities. It works the same in Next.js + Tailwind
|
|
49
|
+
v3, Next.js + Tailwind v4, Vite + plain CSS, Astro, Remix, or any other
|
|
50
|
+
React stack.
|
|
43
51
|
|
|
44
52
|
## 4. `pharos-tokens` is a peer dependency
|
|
45
53
|
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Maps the two public variant axes (`intent`, `size`) to the per-class names
|
|
5
|
+
* inside `Button.module.css`. CVA stays as the typed-variants mechanism
|
|
6
|
+
* (Decision D9 keeps the authoring DX) but each value points at a hashed
|
|
7
|
+
* CSS Modules class instead of a Tailwind utility string. The base class
|
|
8
|
+
* carries layout, typography and the focus-visible ring — every variant
|
|
9
|
+
* stacks on top of it.
|
|
10
|
+
*/
|
|
3
11
|
declare const buttonVariants: (props?: ({
|
|
4
12
|
intent?: "primary" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
13
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc;;;8EAwBlB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,kBAAkB;CAAG;AAE9F,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAS,EACT,MAAM,EACN,IAAI,EACJ,IAAe,EACf,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,8FAmBb;yBA3Be,MAAM;;;AA+BtB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PharosHello.d.ts","sourceRoot":"","sources":["../../src/components/PharosHello.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PharosHello.d.ts","sourceRoot":"","sources":["../../src/components/PharosHello.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAc,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,2CAMnF"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC"}
|