@nation-a/ui 0.8.0 → 0.8.1
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/index.cjs +22 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -13
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +60 -28
- package/dist/styled-system/tokens/index.mjs +192 -0
- package/dist/styled-system/tokens/tokens.d.ts +2 -2
- package/dist/types/theme/tokens/index.d.ts +119 -47
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4681,7 +4681,7 @@ const textRecipe = cva({
|
|
|
4681
4681
|
}
|
|
4682
4682
|
});
|
|
4683
4683
|
const Text = React.forwardRef((props, ref) => {
|
|
4684
|
-
const { variant = "body.md", font
|
|
4684
|
+
const { variant = "body.md", font, children, ...rest } = props;
|
|
4685
4685
|
const textType = (variant == null ? void 0 : variant.split(".")[0]) || "body";
|
|
4686
4686
|
const componentMap = {
|
|
4687
4687
|
display: styled("h1", textRecipe),
|
|
@@ -4691,7 +4691,7 @@ const Text = React.forwardRef((props, ref) => {
|
|
|
4691
4691
|
label: styled("span", textRecipe)
|
|
4692
4692
|
};
|
|
4693
4693
|
const TextComponent = componentMap[textType];
|
|
4694
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ref,
|
|
4694
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ref, variant, font, ...rest, children });
|
|
4695
4695
|
});
|
|
4696
4696
|
Text.displayName = "Text";
|
|
4697
4697
|
const shouldForwardProp = (prop, variantKeys, options = {}) => {
|
|
@@ -8949,7 +8949,15 @@ function createProxy() {
|
|
|
8949
8949
|
});
|
|
8950
8950
|
}
|
|
8951
8951
|
var defineTokens = /* @__PURE__ */ createProxy();
|
|
8952
|
-
const globalCss = defineGlobalStyles({
|
|
8952
|
+
const globalCss = defineGlobalStyles({
|
|
8953
|
+
"html, body": {
|
|
8954
|
+
margin: 0,
|
|
8955
|
+
padding: 0,
|
|
8956
|
+
maxWidth: "100vw",
|
|
8957
|
+
color: "content.neutral.default",
|
|
8958
|
+
backgroundColor: "surface.base"
|
|
8959
|
+
}
|
|
8960
|
+
});
|
|
8953
8961
|
const keyframes = defineKeyframes({
|
|
8954
8962
|
"fade-in": {
|
|
8955
8963
|
from: { opacity: "0" },
|
|
@@ -9198,29 +9206,30 @@ const zIndex = defineTokens.zIndex({
|
|
|
9198
9206
|
}
|
|
9199
9207
|
});
|
|
9200
9208
|
const tokens = defineTokens({
|
|
9201
|
-
animations,
|
|
9202
|
-
blurs,
|
|
9203
|
-
borders,
|
|
9204
9209
|
// colors,
|
|
9205
|
-
durations,
|
|
9206
|
-
easings,
|
|
9207
9210
|
// fonts,
|
|
9208
9211
|
// fontSizes,
|
|
9209
9212
|
// fontWeights,
|
|
9210
9213
|
// letterSpacings,
|
|
9211
9214
|
// lineHeights,
|
|
9212
9215
|
// radii,
|
|
9216
|
+
animations,
|
|
9217
|
+
blurs,
|
|
9218
|
+
borders,
|
|
9219
|
+
durations,
|
|
9220
|
+
easings,
|
|
9213
9221
|
sizes,
|
|
9214
|
-
// spacing,
|
|
9215
9222
|
zIndex,
|
|
9216
|
-
...g.primitive
|
|
9223
|
+
...g.primitive,
|
|
9224
|
+
spacing: {
|
|
9225
|
+
...spacing,
|
|
9226
|
+
...g.primitive.spacing
|
|
9227
|
+
}
|
|
9217
9228
|
});
|
|
9218
9229
|
const preset = definePreset({
|
|
9219
9230
|
name: "@nation-a/theme",
|
|
9220
9231
|
conditions,
|
|
9221
|
-
globalCss
|
|
9222
|
-
...globalCss
|
|
9223
|
-
},
|
|
9232
|
+
globalCss,
|
|
9224
9233
|
theme: {
|
|
9225
9234
|
extend: {
|
|
9226
9235
|
breakpoints,
|