@konstructio/ui 0.0.12-alpha.4 → 0.0.12-alpha.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.
@@ -7,7 +7,6 @@ const r = e(
7
7
  "border",
8
8
  "border-zinc-200",
9
9
  "bg-transparent",
10
- "text-base",
11
10
  "text-zinc-700",
12
11
  "transition-colors",
13
12
  "placeholder:text-muted-foreground",
@@ -132,7 +132,7 @@ const _ = u(
132
132
  ...d
133
133
  }, x) => {
134
134
  const v = b(), { theme: O } = N();
135
- return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
135
+ return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5 w-full", children: [
136
136
  r ? /* @__PURE__ */ a(
137
137
  "label",
138
138
  {
@@ -1,5 +1,5 @@
1
1
  import { c as r } from "../../index-BNmRGtA6.js";
2
- const t = r(
2
+ const o = r(
3
3
  [
4
4
  "bg-transparent",
5
5
  "border",
@@ -15,8 +15,6 @@ const t = r(
15
15
  "py-1",
16
16
  "rounded-md",
17
17
  "shadow-sm",
18
- "text-base",
19
- "text-zinc-700",
20
18
  "transition-colors",
21
19
  "w-full"
22
20
  ],
@@ -39,5 +37,5 @@ const t = r(
39
37
  }
40
38
  );
41
39
  export {
42
- t as inputVariants
40
+ o as inputVariants
43
41
  };
@@ -1,33 +1,44 @@
1
- import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as v, useId as N, useState as T, useCallback as j } from "react";
3
- import { cn as A } from "../../utils/index.js";
4
- import { textAreaVariants as I } from "./TextArea.variants.js";
5
- import { useTheme as V } from "../../contexts/theme.hook.js";
6
- const S = v(
7
- ({ initialValue: m, label: t, name: o, placeholder: l, rows: c = 3, theme: i, onChange: e }, u) => {
8
- const r = N(), { theme: d } = V(), s = o ? `${r}-name` : r, [f, n] = T(m ?? ""), x = j(
9
- (p) => {
10
- n(p.target.value), e == null || e();
1
+ import { jsxs as N, jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as T, useId as j, useState as v, useCallback as A } from "react";
3
+ import { cn as I } from "../../utils/index.js";
4
+ import { textAreaVariants as V } from "./TextArea.variants.js";
5
+ import { useTheme as b } from "../../contexts/theme.hook.js";
6
+ const $ = T(
7
+ ({
8
+ initialValue: o,
9
+ label: t,
10
+ name: l,
11
+ placeholder: c,
12
+ rows: i = 3,
13
+ theme: u,
14
+ onChange: e,
15
+ className: d
16
+ }, f) => {
17
+ const r = j(), { theme: x } = b(), s = l ? `${r}-name` : r, [n, p] = v(o ?? ""), h = A(
18
+ (a) => {
19
+ p(a.target.value), e == null || e(a);
11
20
  },
12
21
  [e]
13
22
  );
14
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
15
- t ? /* @__PURE__ */ a("label", { htmlFor: s, className: "cursor-pointer", children: t }) : null,
16
- /* @__PURE__ */ a(
23
+ return /* @__PURE__ */ N("div", { className: "flex flex-col gap-2", children: [
24
+ t ? /* @__PURE__ */ m("label", { htmlFor: s, className: "cursor-pointer", children: t }) : null,
25
+ /* @__PURE__ */ m(
17
26
  "textarea",
18
27
  {
19
28
  id: s,
20
- ref: u,
21
- className: A(I({ theme: i ?? d })),
22
- rows: c,
23
- placeholder: l,
24
- value: f,
25
- onChange: x
29
+ ref: f,
30
+ className: I(
31
+ V({ className: d, theme: u ?? x })
32
+ ),
33
+ rows: i,
34
+ placeholder: c,
35
+ value: n,
36
+ onChange: h
26
37
  }
27
38
  )
28
39
  ] });
29
40
  }
30
41
  );
31
42
  export {
32
- S as TextArea
43
+ $ as TextArea
33
44
  };
@@ -13,7 +13,6 @@ const i = e(
13
13
  "resize-none",
14
14
  "rounded-md",
15
15
  "shadow-sm",
16
- "text-base",
17
16
  "w-full"
18
17
  ],
19
18
  {
package/dist/index.d.ts CHANGED
@@ -162,7 +162,7 @@ declare type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
162
162
  export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
163
163
 
164
164
  declare interface InputProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
165
- label?: string;
165
+ label?: string | ReactNode;
166
166
  labelClassName?: string;
167
167
  error?: string;
168
168
  onClickIcon?: () => void;
@@ -491,10 +491,9 @@ export declare const TextArea: FC<TextAreaProps>;
491
491
 
492
492
  declare interface TextAreaProps extends InputHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
493
493
  rows?: number;
494
- label?: string;
494
+ label?: string | ReactNode;
495
495
  name?: string;
496
496
  initialValue?: string;
497
- onChange?: () => void;
498
497
  }
499
498
 
500
499
  declare const textAreaVariants: (props?: ({
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.0.12-alpha.3",
5
+ "version": "0.0.12-alpha.4",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.0.12-alpha.4",
5
+ "version": "0.0.12-alpha.5",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",