@team-monolith/cds 1.80.2 → 1.80.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css, useTheme } from "@emotion/react";
|
|
4
|
-
import { AlertDialog, AlertDialogActions, AlertDialogContent, AlertDialogTitle } from "./AlertDialog";
|
|
4
|
+
import { AlertDialog, AlertDialogActions, AlertDialogContent, AlertDialogTitle, } from "./AlertDialog";
|
|
5
5
|
import { AlertFillIcon } from "../icons";
|
|
6
6
|
import { Button } from "./Button";
|
|
7
7
|
export function FileTypeAlertDialog(props) {
|
|
@@ -15,7 +15,7 @@ import styled from "@emotion/styled";
|
|
|
15
15
|
import { FileTypeAlertDialog } from "../../../components/FileTypeAlertDialog";
|
|
16
16
|
const fileTypeMap = {
|
|
17
17
|
image: { accept: "image/*", typeStr: "이미지 파일" },
|
|
18
|
-
pdf: { accept: ".pdf", typeStr: "
|
|
18
|
+
pdf: { accept: ".pdf", typeStr: "PDF 파일" },
|
|
19
19
|
file: {},
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -39,8 +39,8 @@ export function FileSelectInput(props) {
|
|
|
39
39
|
return;
|
|
40
40
|
if (accept) {
|
|
41
41
|
// 특정 파일 타입에 대해서 검사하므로 복수개의 accept는 고려하지 않음
|
|
42
|
-
const isTypeValid = accept.startsWith(
|
|
43
|
-
? accept.slice(1) === ((_b = file.name.split(
|
|
42
|
+
const isTypeValid = accept.startsWith(".")
|
|
43
|
+
? accept.slice(1) === ((_b = file.name.split(".").pop()) === null || _b === void 0 ? void 0 : _b.toLowerCase())
|
|
44
44
|
: file.type.match(accept);
|
|
45
45
|
if (!isTypeValid) {
|
|
46
46
|
event.target.value = "";
|