@ceed/ads 1.11.1 → 1.12.0

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.
@@ -29,5 +29,10 @@ declare const Uploader: React.MemoExoticComponent<(props: {
29
29
  */
30
30
  maxFileTotalSize: number;
31
31
  uploaded?: UserUpload[] | undefined;
32
+ /**
33
+ * 모든 안내 메세지/에러 메세지보다 해당 메세지가 우선적으로 보여진다.
34
+ * 기본 안내 메세지 및 에러 메세지를 사용하려면 해당 필드를 비워야 한다.
35
+ */
36
+ helperText?: string | undefined;
32
37
  }) => React.JSX.Element>;
33
38
  export { Uploader };
package/dist/index.cjs CHANGED
@@ -5227,7 +5227,9 @@ var Uploader = import_react43.default.memo(
5227
5227
  onChange,
5228
5228
  label,
5229
5229
  disabled,
5230
- onDelete
5230
+ onDelete,
5231
+ error: errorProp,
5232
+ helperText: helperTextProp
5231
5233
  } = props;
5232
5234
  const dropZoneRef = (0, import_react43.useRef)(null);
5233
5235
  const inputRef = (0, import_react43.useRef)(null);
@@ -5246,6 +5248,9 @@ var Uploader = import_react43.default.memo(
5246
5248
  [accepts]
5247
5249
  );
5248
5250
  const helperText = (0, import_react43.useMemo)(() => {
5251
+ if (helperTextProp) {
5252
+ return helperTextProp;
5253
+ }
5249
5254
  const [allAcceptedTypes, acceptedTypes] = [
5250
5255
  accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5251
5256
  const [type] = accept2.split("/");
@@ -5271,8 +5276,8 @@ var Uploader = import_react43.default.memo(
5271
5276
  helperTexts.push(`Up to ${maxCount} ${maxCount === 1 ? "file" : "files"}`);
5272
5277
  }
5273
5278
  return helperTexts.join(", ");
5274
- }, [accepts, maxFileTotalSize, maxCount]);
5275
- const error = (0, import_react43.useMemo)(() => !!errorText || props.error, [props.error, errorText]);
5279
+ }, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
5280
+ const error = (0, import_react43.useMemo)(() => !!errorText || errorProp, [errorProp, errorText]);
5276
5281
  const showDropZone = (0, import_react43.useMemo)(
5277
5282
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
5278
5283
  [files, maxCount, uploaded]
package/dist/index.js CHANGED
@@ -5164,7 +5164,9 @@ var Uploader = React40.memo(
5164
5164
  onChange,
5165
5165
  label,
5166
5166
  disabled,
5167
- onDelete
5167
+ onDelete,
5168
+ error: errorProp,
5169
+ helperText: helperTextProp
5168
5170
  } = props;
5169
5171
  const dropZoneRef = useRef8(null);
5170
5172
  const inputRef = useRef8(null);
@@ -5183,6 +5185,9 @@ var Uploader = React40.memo(
5183
5185
  [accepts]
5184
5186
  );
5185
5187
  const helperText = useMemo14(() => {
5188
+ if (helperTextProp) {
5189
+ return helperTextProp;
5190
+ }
5186
5191
  const [allAcceptedTypes, acceptedTypes] = [
5187
5192
  accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
5188
5193
  const [type] = accept2.split("/");
@@ -5208,8 +5213,8 @@ var Uploader = React40.memo(
5208
5213
  helperTexts.push(`Up to ${maxCount} ${maxCount === 1 ? "file" : "files"}`);
5209
5214
  }
5210
5215
  return helperTexts.join(", ");
5211
- }, [accepts, maxFileTotalSize, maxCount]);
5212
- const error = useMemo14(() => !!errorText || props.error, [props.error, errorText]);
5216
+ }, [accepts, maxFileTotalSize, maxCount, helperTextProp]);
5217
+ const error = useMemo14(() => !!errorText || errorProp, [errorProp, errorText]);
5213
5218
  const showDropZone = useMemo14(
5214
5219
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
5215
5220
  [files, maxCount, uploaded]