@dimasbaguspm/versaur 0.0.2 → 0.0.3

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.
@@ -12,3 +12,6 @@ export declare const UnderlineCapitalize: Story;
12
12
  export declare const ClampEllipsis: Story;
13
13
  export declare const ColorVariants: Story;
14
14
  export declare const AsVariants: Story;
15
+ export declare const FontSizeVariants: Story;
16
+ export declare const FontWeightVariants: Story;
17
+ export declare const CustomFontSizeWeight: Story;
@@ -25,6 +25,16 @@ export interface TextProps extends HTMLAttributes<HTMLElement> {
25
25
  clamp?: 1 | 2 | 3 | 4 | 5 | 'none';
26
26
  /** Ellipsis (truncate) */
27
27
  ellipsis?: boolean;
28
+ /** Tailwind font size utility (e.g., 'xs', 'sm', 'base', 'lg', 'xl', etc.)
29
+ * If set, overrides the default font size from the `as` prop and design system
30
+ * See: https://tailwindcss.com/docs/font-size
31
+ */
32
+ fontSize?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | undefined;
33
+ /** Tailwind font weight utility (e.g., 'thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black')
34
+ * If set, overrides the default font weight from the `as` prop and design system
35
+ * See: https://tailwindcss.com/docs/font-weight
36
+ */
37
+ fontWeight?: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black' | undefined;
28
38
  /** Text content */
29
39
  children: ReactNode;
30
40
  }
package/dist/index.js CHANGED
@@ -6264,11 +6264,13 @@ const ts = ({
6264
6264
  italic: a = !1,
6265
6265
  clamp: i = "none",
6266
6266
  ellipsis: l = !1,
6267
- className: c,
6268
- children: d,
6269
- ...f
6270
- }, g) => {
6271
- const m = [
6267
+ fontSize: c,
6268
+ fontWeight: d,
6269
+ className: f,
6270
+ children: g,
6271
+ ...b
6272
+ }, m) => {
6273
+ const w = [
6272
6274
  "h1",
6273
6275
  "h2",
6274
6276
  "h3",
@@ -6278,11 +6280,11 @@ const ts = ({
6278
6280
  "p",
6279
6281
  "span",
6280
6282
  "label"
6281
- ].includes(e) ? e : "span";
6283
+ ].includes(e) ? e : "span", C = c ? `text-${c}` : "", R = d ? `font-${d}` : "";
6282
6284
  return /* @__PURE__ */ n.jsx(
6283
6285
  e,
6284
6286
  {
6285
- ref: g,
6287
+ ref: m,
6286
6288
  className: p(
6287
6289
  os({
6288
6290
  color: r,
@@ -6293,12 +6295,14 @@ const ts = ({
6293
6295
  clamp: i,
6294
6296
  ellipsis: l,
6295
6297
  // @ts-expect-error - `as` is not a valid variant
6296
- as: m
6298
+ as: w
6297
6299
  }),
6298
- c
6300
+ C,
6301
+ R,
6302
+ f
6299
6303
  ),
6300
- ...f,
6301
- children: d
6304
+ ...b,
6305
+ children: g
6302
6306
  }
6303
6307
  );
6304
6308
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "React UI library with Tailwind CSS",
5
5
  "author": "Dimas Bagus Prayogo Mukti<dimas.bagus.pm@gmail.com>",
6
6
  "license": "MIT",