@fluid-topics/ft-file-drop 2.1.19 → 2.1.21
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,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable, } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
import { FtChipCssVariables } from "@fluid-topics/ft-chip/build/ft-chip.styles";
|
|
4
4
|
export const FtFileDropCssVariables = {
|
|
5
5
|
zIndex: FtCssVariableFactory.create("--ft-file-drop-z-index", "", "NUMBER", "10"),
|
package/build/match-accept.js
CHANGED
|
@@ -2,11 +2,11 @@ export function matchAccept(accept, filename, filetype) {
|
|
|
2
2
|
if (accept.length == 0) {
|
|
3
3
|
return true;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
const pattern = accept.replace(/[.+?^${}()|[\]\\]/g, "\\$&")
|
|
6
6
|
.replace(/\*/g, ".*")
|
|
7
7
|
.replace(/,/g, "|");
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const regex = new RegExp(pattern);
|
|
9
|
+
const extension = filename.includes(".") ? "." + filename.split(".").pop() : undefined;
|
|
10
10
|
if (extension && regex.test(extension)) {
|
|
11
11
|
return true;
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-drop",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21",
|
|
4
4
|
"description": "Container that accepts dropping files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "2.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-chip": "2.1.21",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.1.21",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "a0f619df74c0665183d73df09e75b1eddc2a2a1f"
|
|
27
27
|
}
|