@konstructio/ui 0.0.12-alpha.3 → 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.
- package/dist/{Modal-ByNiP7eb.js → Modal-B-E9uaA6.js} +353 -345
- package/dist/components/Autocomplete/Autocomplete.variants.js +0 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +2 -4
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.js +31 -20
- package/dist/components/TextArea/TextArea.variants.js +0 -1
- package/dist/components/index.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/package.json +2 -4
- package/package.json +1 -2
|
@@ -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
|
|
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
|
-
|
|
40
|
+
o as inputVariants
|
|
43
41
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
2
3
|
import "../../index-D7QNmo_D.js";
|
|
3
|
-
import { M as d } from "../../Modal-
|
|
4
|
+
import { M as d } from "../../Modal-B-E9uaA6.js";
|
|
4
5
|
import "./components/Header/Header.js";
|
|
5
6
|
import "./components/Body/Body.js";
|
|
6
7
|
import "./components/Footer/Footer.js";
|
|
7
|
-
import "./hooks/useModal.js";
|
|
8
8
|
export {
|
|
9
9
|
d as Modal
|
|
10
10
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../../index-CbTU3cnP.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { W as
|
|
4
|
+
import { W as s } from "../../../../Modal-B-E9uaA6.js";
|
|
5
5
|
import "../../../../Combination-b348x__d.js";
|
|
6
6
|
import "../../../../utils/index.js";
|
|
7
7
|
import "./Wrapper.variants.js";
|
|
8
|
-
import "../../hooks/useModal.js";
|
|
9
8
|
import "../../../../x-DU-Zw-L_.js";
|
|
10
9
|
import "../../../../contexts/theme.hook.js";
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
s as Wrapper
|
|
13
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Body as e } from "./Body/Body.js";
|
|
2
2
|
import { Footer as t } from "./Footer/Footer.js";
|
|
3
3
|
import { Header as m } from "./Header/Header.js";
|
|
4
|
-
import { W as a } from "../../../Modal-
|
|
4
|
+
import { W as a } from "../../../Modal-B-E9uaA6.js";
|
|
5
5
|
export {
|
|
6
6
|
e as Body,
|
|
7
7
|
t as Footer,
|
|
@@ -1,33 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { textAreaVariants as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
const
|
|
7
|
-
({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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__ */
|
|
15
|
-
t ? /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
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:
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
43
|
+
$ as TextArea
|
|
33
44
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Card as n } from "./Card/Card.js";
|
|
|
7
7
|
import { Checkbox as l } from "./Checkbox/Checkbox.js";
|
|
8
8
|
import { Dropdown as c } from "./Dropdown/Dropdown.js";
|
|
9
9
|
import { Input as N } from "./Input/Input.js";
|
|
10
|
-
import { M as S } from "../Modal-
|
|
10
|
+
import { M as S } from "../Modal-B-E9uaA6.js";
|
|
11
11
|
import { NumberInput as s } from "./NumberInput/NumberInput.js";
|
|
12
12
|
import { ProgressBar as C } from "./ProgressBar/ProgressBar.js";
|
|
13
13
|
import { Radio as B } from "./Radio/Radio.js";
|
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;
|
|
@@ -211,6 +211,8 @@ declare type ModalChildProps = {
|
|
|
211
211
|
declare interface ModalProps extends PropsWithChildren, VariantProps<typeof modalVariants> {
|
|
212
212
|
className?: string;
|
|
213
213
|
buttonCloseClassName?: string;
|
|
214
|
+
isOpen?: boolean;
|
|
215
|
+
onClose?: () => void;
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
declare const modalVariants: (props?: ({
|
|
@@ -489,10 +491,9 @@ export declare const TextArea: FC<TextAreaProps>;
|
|
|
489
491
|
|
|
490
492
|
declare interface TextAreaProps extends InputHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
|
|
491
493
|
rows?: number;
|
|
492
|
-
label?: string;
|
|
494
|
+
label?: string | ReactNode;
|
|
493
495
|
name?: string;
|
|
494
496
|
initialValue?: string;
|
|
495
|
-
onChange?: () => void;
|
|
496
497
|
}
|
|
497
498
|
|
|
498
499
|
declare const textAreaVariants: (props?: ({
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Card as n } from "./components/Card/Card.js";
|
|
|
7
7
|
import { Checkbox as l } from "./components/Checkbox/Checkbox.js";
|
|
8
8
|
import { Dropdown as s } from "./components/Dropdown/Dropdown.js";
|
|
9
9
|
import { Input as h } from "./components/Input/Input.js";
|
|
10
|
-
import { M as C } from "./Modal-
|
|
10
|
+
import { M as C } from "./Modal-B-E9uaA6.js";
|
|
11
11
|
import { NumberInput as R } from "./components/NumberInput/NumberInput.js";
|
|
12
12
|
import { ProgressBar as b } from "./components/ProgressBar/ProgressBar.js";
|
|
13
13
|
import { Radio as B } from "./components/Radio/Radio.js";
|
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.
|
|
5
|
+
"version": "0.0.12-alpha.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@radix-ui/react-alert-dialog": "^1.1.6",
|
|
59
59
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
60
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
60
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
61
61
|
"@radix-ui/react-slider": "^1.2.3",
|
|
62
62
|
"@radix-ui/react-slot": "^1.1.2",
|
|
63
63
|
"@radix-ui/react-switch": "^1.1.3",
|
|
64
64
|
"@radix-ui/react-toast": "^1.2.6",
|
|
65
65
|
"@radix-ui/react-visually-hidden": "^1.1.2",
|
|
66
|
-
"@radix-ui/react-dialog": "^1.1.6",
|
|
67
66
|
"class-variance-authority": "^0.7.1",
|
|
68
67
|
"clsx": "^2.1.1",
|
|
69
68
|
"cmdk": "^1.0.4",
|
|
@@ -132,7 +131,6 @@
|
|
|
132
131
|
"eslint-plugin-storybook": "^0.9.0",
|
|
133
132
|
"glob": "^11.0.1",
|
|
134
133
|
"husky": "^9.1.7",
|
|
135
|
-
"jest": "^29.7.0",
|
|
136
134
|
"jest-axe": "^9.0.0",
|
|
137
135
|
"jsdom": "^26.0.0",
|
|
138
136
|
"lodash": "^4.17.21",
|
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.
|
|
5
|
+
"version": "0.0.12-alpha.5",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -131,7 +131,6 @@
|
|
|
131
131
|
"eslint-plugin-storybook": "^0.9.0",
|
|
132
132
|
"glob": "^11.0.1",
|
|
133
133
|
"husky": "^9.1.7",
|
|
134
|
-
"jest": "^29.7.0",
|
|
135
134
|
"jest-axe": "^9.0.0",
|
|
136
135
|
"jsdom": "^26.0.0",
|
|
137
136
|
"lodash": "^4.17.21",
|