@poly-x/react 0.1.0-alpha.12 → 0.1.0-alpha.13
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/dist/styles.css +30 -0
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -10,8 +10,33 @@
|
|
|
10
10
|
* (`:root`, a wrapper div, …) — that is the supported theming surface. Dark mode
|
|
11
11
|
* follows the OS by default and defers to an explicit `.dark` / `[data-theme]`
|
|
12
12
|
* on a host ancestor when one is present.
|
|
13
|
+
*
|
|
14
|
+
* ---------------------------------------------------------------------------
|
|
15
|
+
* Cascade: everything here lives in the `polyx` layer, and that is load-bearing.
|
|
16
|
+
*
|
|
17
|
+
* Unlayered CSS beats layered CSS outright — not by specificity, but by rank; no
|
|
18
|
+
* import order or selector weight changes it. Shipping these rules unlayered
|
|
19
|
+
* therefore beat every Tailwind utility a host wrote (Tailwind emits utilities
|
|
20
|
+
* into `@layer utilities`), so `className`/`triggerClassName` silently did
|
|
21
|
+
* nothing and hosts were pushed toward `!important`. Layering hands that control
|
|
22
|
+
* back: a host's utilities and unlayered CSS both outrank us now.
|
|
23
|
+
*
|
|
24
|
+
* The statement below fixes where `polyx` sits. It must land AFTER `base` —
|
|
25
|
+
* Tailwind's preflight puts `*, ::before, ::after { border: 0 solid }` there, and
|
|
26
|
+
* that would erase our own borders if we ranked lower — and BEFORE `utilities`,
|
|
27
|
+
* so host utilities still win. Naming Tailwind's layers costs nothing when the
|
|
28
|
+
* host doesn't use Tailwind: the names simply resolve to empty layers.
|
|
29
|
+
*
|
|
30
|
+
* Layer order is set by first declaration, so this only holds if our stylesheet
|
|
31
|
+
* is imported BEFORE the host's Tailwind entry. Import it later and `polyx` is
|
|
32
|
+
* appended last, which puts us back to outranking utilities — no worse than the
|
|
33
|
+
* unlayered behaviour, but not the fix either. Import us first.
|
|
13
34
|
*/
|
|
14
35
|
|
|
36
|
+
@layer theme, base, polyx, components, utilities;
|
|
37
|
+
|
|
38
|
+
@layer polyx {
|
|
39
|
+
|
|
15
40
|
.polyx-signin {
|
|
16
41
|
/* Colors */
|
|
17
42
|
--polyx-brand: #4f46e5;
|
|
@@ -683,3 +708,8 @@
|
|
|
683
708
|
height: 1rem;
|
|
684
709
|
color: var(--polyx-muted-fg);
|
|
685
710
|
}
|
|
711
|
+
|
|
712
|
+
/* Closes `@layer polyx` — opened at the top of the file. The rules above are left
|
|
713
|
+
unindented deliberately: wrapping the sheet in a layer is a cascade change, not a
|
|
714
|
+
reformat, and re-indenting 600 lines would bury it in the diff. */
|
|
715
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poly-x/react",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.13",
|
|
4
4
|
"description": "PolyX SDK for React SPAs - provider, hooks, drop-in auth UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"module": "./dist/index.mjs",
|
|
28
28
|
"types": "./dist/index.d.cts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@poly-x/core": "0.1.0-alpha.
|
|
30
|
+
"@poly-x/core": "0.1.0-alpha.13"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18",
|