@deepnoid/ui 0.1.190 → 0.1.192
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/.turbo/turbo-build.log +171 -168
- package/dist/{chunk-DT632UOW.mjs → chunk-HA7PFE74.mjs} +14 -38
- package/dist/{chunk-3CRSSRCH.mjs → chunk-Q22PRT24.mjs} +3 -1
- package/dist/components/breadcrumb/breadcrumb.mjs +1 -1
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/button/button.mjs +1 -1
- package/dist/components/button/icon-button.mjs +1 -1
- package/dist/components/button/index.mjs +1 -1
- package/dist/components/chip/chip.mjs +1 -1
- package/dist/components/chip/index.mjs +1 -1
- package/dist/components/fileUpload/fileUpload.d.mts +2 -1
- package/dist/components/fileUpload/fileUpload.d.ts +2 -1
- package/dist/components/fileUpload/fileUpload.js +43 -429
- package/dist/components/fileUpload/fileUpload.mjs +2 -2
- package/dist/components/fileUpload/index.js +43 -429
- package/dist/components/fileUpload/index.mjs +2 -2
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input/input.mjs +1 -1
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/list/listItem.mjs +3 -3
- package/dist/components/modal/index.mjs +4 -4
- package/dist/components/modal/modal.mjs +4 -4
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/pagination.mjs +1 -1
- package/dist/components/picker/datePicker.mjs +3 -3
- package/dist/components/picker/index.mjs +3 -3
- package/dist/components/picker/timePicker.mjs +1 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/select/select.mjs +1 -1
- package/dist/components/starRating/index.mjs +1 -1
- package/dist/components/starRating/starRating.mjs +1 -1
- package/dist/components/table/index.mjs +1 -1
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.mjs +1 -1
- package/dist/components/textarea/index.js +3 -1
- package/dist/components/textarea/index.mjs +1 -1
- package/dist/components/textarea/textarea.d.mts +3 -0
- package/dist/components/textarea/textarea.d.ts +3 -0
- package/dist/components/textarea/textarea.js +3 -1
- package/dist/components/textarea/textarea.mjs +1 -1
- package/dist/components/timePicker/calendar.mjs +1 -1
- package/dist/components/toast/index.mjs +1 -1
- package/dist/components/toast/toast.mjs +1 -1
- package/dist/components/toast/use-toast.mjs +1 -1
- package/dist/index.js +17 -36
- package/dist/index.mjs +29 -29
- package/package.json +1 -1
- package/dist/{chunk-TKQLMBX2.mjs → chunk-2A3APCWC.mjs} +3 -3
- package/dist/{chunk-TMAW2WW6.mjs → chunk-FVN5YYBG.mjs} +3 -3
- package/dist/{chunk-6OV6Z7TP.mjs → chunk-H5STWOFE.mjs} +3 -3
|
@@ -8,9 +8,6 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
button_default
|
|
10
10
|
} from "./chunk-EVYQQTKB.mjs";
|
|
11
|
-
import {
|
|
12
|
-
icon_button_default
|
|
13
|
-
} from "./chunk-RAXJBS4Q.mjs";
|
|
14
11
|
|
|
15
12
|
// src/components/fileUpload/fileUpload.tsx
|
|
16
13
|
import { useRef, useState, useEffect } from "react";
|
|
@@ -18,6 +15,7 @@ import { tv } from "tailwind-variants";
|
|
|
18
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
16
|
function FileUpload({
|
|
20
17
|
buttonText,
|
|
18
|
+
cancelText,
|
|
21
19
|
maxSizeMB = 10,
|
|
22
20
|
placeholder,
|
|
23
21
|
errorMessage,
|
|
@@ -118,46 +116,24 @@ function FileUpload({
|
|
|
118
116
|
setMessage(errorMessage);
|
|
119
117
|
}
|
|
120
118
|
}, [errorMessage]);
|
|
121
|
-
const shouldShowCloseButton = hasUploadedFile;
|
|
122
119
|
return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
123
120
|
/* @__PURE__ */ jsxs("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
input_default,
|
|
127
|
-
{
|
|
128
|
-
name,
|
|
129
|
-
readOnly: true,
|
|
130
|
-
variant: "outline",
|
|
131
|
-
full: true,
|
|
132
|
-
placeholder,
|
|
133
|
-
value: displayFileName,
|
|
134
|
-
errorMessage: message && (message == null ? void 0 : message.length) > 0 ? message : void 0
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
shouldShowCloseButton && /* @__PURE__ */ jsx(
|
|
138
|
-
icon_button_default,
|
|
139
|
-
{
|
|
140
|
-
name: "close",
|
|
141
|
-
size: "sm",
|
|
142
|
-
variant: "ghost",
|
|
143
|
-
color: "neutral",
|
|
144
|
-
onClick: handleCancelUpload,
|
|
145
|
-
classNames: { base: slots.cancelButton() },
|
|
146
|
-
"aria-label": "cancel"
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
] }),
|
|
150
|
-
/* @__PURE__ */ jsx(
|
|
151
|
-
button_default,
|
|
121
|
+
/* @__PURE__ */ jsx("div", { className: slots.inputWrapper(), children: /* @__PURE__ */ jsx(
|
|
122
|
+
input_default,
|
|
152
123
|
{
|
|
153
|
-
|
|
124
|
+
name,
|
|
125
|
+
readOnly: true,
|
|
154
126
|
variant: "outline",
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
127
|
+
full: true,
|
|
128
|
+
placeholder,
|
|
129
|
+
value: displayFileName,
|
|
130
|
+
errorMessage: message && (message == null ? void 0 : message.length) > 0 ? message : void 0
|
|
159
131
|
}
|
|
160
|
-
),
|
|
132
|
+
) }),
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-[10px]", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, isLoading: isUploading, children: buttonText }),
|
|
135
|
+
cancelText && hasUploadedFile && !isUploading && /* @__PURE__ */ jsx(button_default, { type: "button", variant: "soft", color: "danger", onClick: handleCancelUpload, children: cancelText })
|
|
136
|
+
] }),
|
|
161
137
|
/* @__PURE__ */ jsx("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
|
|
162
138
|
] }),
|
|
163
139
|
showProgress && currentFile && hasUploadedFile && uploadProgress < 100 && /* @__PURE__ */ jsx(progress_default, { value: uploadProgress }),
|
|
@@ -89,6 +89,7 @@ var Textarea = forwardRef((originalProps, ref) => {
|
|
|
89
89
|
{
|
|
90
90
|
className: clsx(
|
|
91
91
|
slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
|
|
92
|
+
slots.maxLength({ class: classNames == null ? void 0 : classNames.maxLength }),
|
|
92
93
|
textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
|
|
93
94
|
),
|
|
94
95
|
children: [
|
|
@@ -145,7 +146,8 @@ var textareaStyle = tv({
|
|
|
145
146
|
"[&>textarea]:!text-body-foreground",
|
|
146
147
|
"[&>textarea]:placeholder:!text-body-foreground"
|
|
147
148
|
],
|
|
148
|
-
readonly: []
|
|
149
|
+
readonly: [],
|
|
150
|
+
maxLength: ["ml-auto"]
|
|
149
151
|
},
|
|
150
152
|
variants: {
|
|
151
153
|
variant: {
|
|
@@ -12,8 +12,8 @@ import "../../chunk-LXHUO6VM.mjs";
|
|
|
12
12
|
import "../../chunk-SZL743JC.mjs";
|
|
13
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
14
|
import "../../chunk-4GZGDIYK.mjs";
|
|
15
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
16
15
|
import "../../chunk-E3G5QXSH.mjs";
|
|
16
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
17
17
|
import "../../chunk-U4DJHAM5.mjs";
|
|
18
18
|
import "../../chunk-27Y6K5NK.mjs";
|
|
19
19
|
import "../../chunk-AC6TWLRT.mjs";
|
|
@@ -13,8 +13,8 @@ import "../../chunk-LXHUO6VM.mjs";
|
|
|
13
13
|
import "../../chunk-SZL743JC.mjs";
|
|
14
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
15
|
import "../../chunk-4GZGDIYK.mjs";
|
|
16
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
17
16
|
import "../../chunk-E3G5QXSH.mjs";
|
|
17
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
18
18
|
import "../../chunk-U4DJHAM5.mjs";
|
|
19
19
|
import "../../chunk-27Y6K5NK.mjs";
|
|
20
20
|
import "../../chunk-AC6TWLRT.mjs";
|
|
@@ -7,8 +7,8 @@ import "../../chunk-LXHUO6VM.mjs";
|
|
|
7
7
|
import "../../chunk-SZL743JC.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-4GZGDIYK.mjs";
|
|
10
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
11
10
|
import "../../chunk-E3G5QXSH.mjs";
|
|
11
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
12
12
|
import "../../chunk-U4DJHAM5.mjs";
|
|
13
13
|
import "../../chunk-AC6TWLRT.mjs";
|
|
14
14
|
export {
|
|
@@ -7,8 +7,8 @@ import "../../chunk-LXHUO6VM.mjs";
|
|
|
7
7
|
import "../../chunk-SZL743JC.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-4GZGDIYK.mjs";
|
|
10
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
11
10
|
import "../../chunk-E3G5QXSH.mjs";
|
|
11
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
12
12
|
import "../../chunk-U4DJHAM5.mjs";
|
|
13
13
|
import "../../chunk-AC6TWLRT.mjs";
|
|
14
14
|
export {
|
|
@@ -17,8 +17,8 @@ import "../../chunk-LXHUO6VM.mjs";
|
|
|
17
17
|
import "../../chunk-SZL743JC.mjs";
|
|
18
18
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
19
19
|
import "../../chunk-4GZGDIYK.mjs";
|
|
20
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
21
20
|
import "../../chunk-E3G5QXSH.mjs";
|
|
21
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
22
22
|
import "../../chunk-U4DJHAM5.mjs";
|
|
23
23
|
import "../../chunk-27Y6K5NK.mjs";
|
|
24
24
|
import "../../chunk-AC6TWLRT.mjs";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../../chunk-5UBZ32FO.mjs";
|
|
5
5
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
6
6
|
import "../../chunk-4GZGDIYK.mjs";
|
|
7
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
8
7
|
import "../../chunk-E3G5QXSH.mjs";
|
|
8
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
9
9
|
import "../../chunk-U4DJHAM5.mjs";
|
|
10
10
|
import "../../chunk-AC6TWLRT.mjs";
|
|
11
11
|
export {
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
} from "../../chunk-5UBZ32FO.mjs";
|
|
6
6
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
7
7
|
import "../../chunk-4GZGDIYK.mjs";
|
|
8
|
-
import "../../chunk-QDTDQPMC.mjs";
|
|
9
8
|
import "../../chunk-E3G5QXSH.mjs";
|
|
9
|
+
import "../../chunk-QDTDQPMC.mjs";
|
|
10
10
|
import "../../chunk-U4DJHAM5.mjs";
|
|
11
11
|
import "../../chunk-AC6TWLRT.mjs";
|
|
12
12
|
export {
|
|
@@ -10,6 +10,7 @@ type DefaultFile = {
|
|
|
10
10
|
};
|
|
11
11
|
type FileUploadProps = {
|
|
12
12
|
buttonText: string;
|
|
13
|
+
cancelText?: string;
|
|
13
14
|
maxSizeMB?: number;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
errorMessage?: string;
|
|
@@ -24,7 +25,7 @@ type FileUploadProps = {
|
|
|
24
25
|
classNames?: SlotsToClasses<FileUploadSlots>;
|
|
25
26
|
defaultFile?: DefaultFile;
|
|
26
27
|
};
|
|
27
|
-
declare function FileUpload({ buttonText, maxSizeMB, placeholder, errorMessage, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, onCancelUpload, helperMessage, showProgress, name, classNames, defaultFile, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function FileUpload({ buttonText, cancelText, maxSizeMB, placeholder, errorMessage, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, onCancelUpload, helperMessage, showProgress, name, classNames, defaultFile, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
28
29
|
declare namespace FileUpload {
|
|
29
30
|
var displayName: string;
|
|
30
31
|
}
|
|
@@ -10,6 +10,7 @@ type DefaultFile = {
|
|
|
10
10
|
};
|
|
11
11
|
type FileUploadProps = {
|
|
12
12
|
buttonText: string;
|
|
13
|
+
cancelText?: string;
|
|
13
14
|
maxSizeMB?: number;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
errorMessage?: string;
|
|
@@ -24,7 +25,7 @@ type FileUploadProps = {
|
|
|
24
25
|
classNames?: SlotsToClasses<FileUploadSlots>;
|
|
25
26
|
defaultFile?: DefaultFile;
|
|
26
27
|
};
|
|
27
|
-
declare function FileUpload({ buttonText, maxSizeMB, placeholder, errorMessage, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, onCancelUpload, helperMessage, showProgress, name, classNames, defaultFile, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function FileUpload({ buttonText, cancelText, maxSizeMB, placeholder, errorMessage, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, onCancelUpload, helperMessage, showProgress, name, classNames, defaultFile, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
28
29
|
declare namespace FileUpload {
|
|
29
30
|
var displayName: string;
|
|
30
31
|
}
|