qstd 0.3.4 → 0.3.5
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 +24 -0
- package/dist/block/fns.d.ts.map +1 -1
- package/dist/react/index.cjs +10 -4
- package/dist/react/index.js +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,30 @@ A single npm package providing:
|
|
|
20
20
|
pnpm add qstd
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
## ⚠️ Required: Panda CSS Preset Setup
|
|
24
|
+
|
|
25
|
+
**If you're using the Block component, you MUST configure the qstd preset in your `panda.config.ts`:**
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// panda.config.ts
|
|
29
|
+
import { defineConfig } from "@pandacss/dev";
|
|
30
|
+
import qstdPreset from "qstd/preset";
|
|
31
|
+
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
presets: ["@pandacss/dev/presets", qstdPreset], // ← REQUIRED
|
|
34
|
+
include: ["./src/**/*.{ts,tsx}"],
|
|
35
|
+
outdir: "styled-system",
|
|
36
|
+
jsxFramework: "react", // ← REQUIRED for Block component
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Without this setup:**
|
|
41
|
+
- Props like `grid`, `flex`, `cols`, `rows` will output broken CSS (e.g., `grid_true` instead of `display: grid`)
|
|
42
|
+
- Boolean utilities (`alignI`, `justifyC`, etc.) won't transform correctly
|
|
43
|
+
- You'll see raw prop values in your HTML class names instead of actual styles
|
|
44
|
+
|
|
45
|
+
After adding the preset, run `pnpm panda codegen` to regenerate your styled-system.
|
|
46
|
+
|
|
23
47
|
## Prerequisites
|
|
24
48
|
|
|
25
49
|
### TypeScript Configuration (Required)
|
package/dist/block/fns.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fns.d.ts","sourceRoot":"","sources":["../../src/block/fns.tsx"],"names":[],"mappings":"AAAA,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmG7B,CAAC;AAqGF,eAAO,MAAM,QAAQ,GACnB,SAAS,UAAU,CAAC,OAAO,aAAa,CAAC,EACzC,UAAU,kBAAkB;;;CAgC7B,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,EACnC,KAAK,CAAC,EACN,MAAM,SAAS,MAAM,EAAE,KACtB,OAAO,CAAC,CAAC,CAkBX,CAAC"}
|
package/dist/react/index.cjs
CHANGED
|
@@ -1056,8 +1056,10 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1056
1056
|
custom,
|
|
1057
1057
|
...rest
|
|
1058
1058
|
} = anyProps;
|
|
1059
|
-
const
|
|
1060
|
-
const
|
|
1059
|
+
const asTag = anyProps.as;
|
|
1060
|
+
const effectiveEl = asTag && asTag in tags ? asTag : extract.el;
|
|
1061
|
+
const StdComp = tags[effectiveEl] || tags.div;
|
|
1062
|
+
const MotionComp = motionTags[effectiveEl] || motionTags.div;
|
|
1061
1063
|
const hasMotionProps = _motion !== void 0 || layout !== void 0 || initial !== void 0 || animate !== void 0 || exit !== void 0 || whileHover !== void 0 || whileTap !== void 0 || whileFocus !== void 0 || variants !== void 0 || transition !== void 0 || custom !== void 0;
|
|
1062
1064
|
const comp = hasMotionProps ? MotionComp : StdComp;
|
|
1063
1065
|
const motionProps = hasMotionProps ? {
|
|
@@ -1072,12 +1074,16 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1072
1074
|
custom,
|
|
1073
1075
|
transition: _motion ?? transition
|
|
1074
1076
|
} : void 0;
|
|
1075
|
-
const
|
|
1077
|
+
const propsToOmit = [
|
|
1076
1078
|
"loadingPosition",
|
|
1077
1079
|
"loadingIcon",
|
|
1078
1080
|
"isLoading",
|
|
1079
1081
|
"children"
|
|
1080
|
-
]
|
|
1082
|
+
];
|
|
1083
|
+
if (asTag && asTag in tags) {
|
|
1084
|
+
propsToOmit.push("as");
|
|
1085
|
+
}
|
|
1086
|
+
const remaining = omit(rest, propsToOmit);
|
|
1081
1087
|
const cursor = anyProps.isLoading ? "not-allowed" : "pointer";
|
|
1082
1088
|
const btnClassName = extract.is === "btn" ? css({ display: "flex", alignI: "center", cursor }) : "";
|
|
1083
1089
|
const linkClassName = extract.isLink ? css({
|
package/dist/react/index.js
CHANGED
|
@@ -1033,8 +1033,10 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1033
1033
|
custom,
|
|
1034
1034
|
...rest
|
|
1035
1035
|
} = anyProps;
|
|
1036
|
-
const
|
|
1037
|
-
const
|
|
1036
|
+
const asTag = anyProps.as;
|
|
1037
|
+
const effectiveEl = asTag && asTag in tags ? asTag : extract.el;
|
|
1038
|
+
const StdComp = tags[effectiveEl] || tags.div;
|
|
1039
|
+
const MotionComp = motionTags[effectiveEl] || motionTags.div;
|
|
1038
1040
|
const hasMotionProps = _motion !== void 0 || layout !== void 0 || initial !== void 0 || animate !== void 0 || exit !== void 0 || whileHover !== void 0 || whileTap !== void 0 || whileFocus !== void 0 || variants !== void 0 || transition !== void 0 || custom !== void 0;
|
|
1039
1041
|
const comp = hasMotionProps ? MotionComp : StdComp;
|
|
1040
1042
|
const motionProps = hasMotionProps ? {
|
|
@@ -1049,12 +1051,16 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1049
1051
|
custom,
|
|
1050
1052
|
transition: _motion ?? transition
|
|
1051
1053
|
} : void 0;
|
|
1052
|
-
const
|
|
1054
|
+
const propsToOmit = [
|
|
1053
1055
|
"loadingPosition",
|
|
1054
1056
|
"loadingIcon",
|
|
1055
1057
|
"isLoading",
|
|
1056
1058
|
"children"
|
|
1057
|
-
]
|
|
1059
|
+
];
|
|
1060
|
+
if (asTag && asTag in tags) {
|
|
1061
|
+
propsToOmit.push("as");
|
|
1062
|
+
}
|
|
1063
|
+
const remaining = omit(rest, propsToOmit);
|
|
1058
1064
|
const cursor = anyProps.isLoading ? "not-allowed" : "pointer";
|
|
1059
1065
|
const btnClassName = extract.is === "btn" ? css({ display: "flex", alignI: "center", cursor }) : "";
|
|
1060
1066
|
const linkClassName = extract.isLink ? css({
|