@scaleflex/widget-drag-drop 4.0.6 → 4.1.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 scaleflex
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 scaleflex
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- # @scaleflex/widget-drag-drop
2
-
3
- [![Plugins][plugins-image]](#plugins)
4
- [![Website][filerobot-image]][sfx-url]
5
- [![Version][filerobot-version]][version-url]
6
- [![Scaleflex team][made-by-image]][sfx-url]
7
- [![License][license-image]][license-url]
8
- [![CodeSandbox][codeSandbox-image]][codeSandbox-url]
9
-
10
-
11
- <div align='center'>
12
- <img title="Scaleflex Widget logo" alt="Scaleflex Widget logo" src="https://assets.scaleflex.com/Corporate+Branding/%5B2025%5D+ALL+LOGOS+%2B+ICONS/SCALEFLEX/VXP+logo/Horizontal+White/VXP+logo+WHITE.png?vh=663932" width="140"/>
13
- </div>
14
-
15
- Drag drop container. On Drop it opens [Scaleflex Media Asset Widget](https://www.npmjs.com/package/@scaleflex/widget-core) as a modal.
16
-
17
- ## Usage
18
-
19
- ### NPM
20
-
21
- ```bash
22
- npm install --save @scaleflex/widget-drag-drop
23
- ```
24
- ### YARN
25
-
26
- ```bash
27
- yarn add @scaleflex/widget-drag-drop
28
- ```
29
- then
30
-
31
- ```js
32
- import DragDrop from '@scaleflex/widget-drag-drop'
33
- ...
34
- ...
35
- ...
36
- scaleflexWidget.use(DragDrop, propertiesObject)
37
- ```
38
-
39
- ### CDN
40
-
41
- The plugin from CDN is found inside `Scaleflex` global object `Scaleflex.DragDrop`
42
-
43
- ```js
44
- const DragDrop = window.ScaleflexWidget.DragDrop
45
- ...
46
- ...
47
- ...
48
- scaleflexWidget.use(DragDrop, propertiesObject)
49
- ```
50
- <!-- TODO(docs): add properties -->
51
-
52
-
53
- <!-- Variables -->
54
-
55
- [npm-url]: https://www.npmjs.com/package/@scaleflex/widget-drag-drop
56
- [license-url]: https://opensource.org/licenses/MIT
57
- [sfx-url]: https://www.scaleflex.com/
58
- [version-url]: https://www.npmjs.com/package/@scaleflex/widget-drag-drop
59
- [codeSandbox-url]: https://codesandbox.io/p/sandbox/scalelfex-widget-v4-sandbox-dtp6l3?file=%2Fsrc%2Findex.js
60
-
61
-
62
- [npm-image]: https://img.shields.io/npm/v/@telus/remark-config.svg?style=for-the-badge&logo=npm
63
- [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
64
- [made-by-image]: https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg?style=for-the-badge
65
- [plugins-image]: https://img.shields.io/static/v1?label=Scaleflex&message=Plugins&color=yellow&style=for-the-badge
66
- [filerobot-image]: https://img.shields.io/static/v1?label=Scaleflex&message=website&color=orange&style=for-the-badge
67
- [filerobot-version]: https://img.shields.io/npm/v/@scaleflex/widget-drag-drop?label=Version&style=for-the-badge&logo=npm
68
- [codeSandbox-image]: https://img.shields.io/badge/CodeSandbox-black?style=for-the-badge&logo=CodeSandbox
1
+ # @scaleflex/widget-drag-drop
2
+
3
+ [![Plugins][plugins-image]](#plugins)
4
+ [![Website][filerobot-image]][sfx-url]
5
+ [![Version][filerobot-version]][version-url]
6
+ [![Scaleflex team][made-by-image]][sfx-url]
7
+ [![License][license-image]][license-url]
8
+ [![CodeSandbox][codeSandbox-image]][codeSandbox-url]
9
+
10
+
11
+ <div align='center'>
12
+ <img title="Scaleflex Widget logo" alt="Scaleflex Widget logo" src="https://assets.scaleflex.com/Corporate+Branding/%5B2025%5D+ALL+LOGOS+%2B+ICONS/SCALEFLEX/VXP+logo/Horizontal+White/VXP+logo+WHITE.png?vh=663932" width="140"/>
13
+ </div>
14
+
15
+ Drag drop container. On Drop it opens [Scaleflex Media Asset Widget](https://www.npmjs.com/package/@scaleflex/widget-core) as a modal.
16
+
17
+ ## Usage
18
+
19
+ ### NPM
20
+
21
+ ```bash
22
+ npm install --save @scaleflex/widget-drag-drop
23
+ ```
24
+ ### YARN
25
+
26
+ ```bash
27
+ yarn add @scaleflex/widget-drag-drop
28
+ ```
29
+ then
30
+
31
+ ```js
32
+ import DragDrop from '@scaleflex/widget-drag-drop'
33
+ ...
34
+ ...
35
+ ...
36
+ scaleflexWidget.use(DragDrop, propertiesObject)
37
+ ```
38
+
39
+ ### CDN
40
+
41
+ The plugin from CDN is found inside `Scaleflex` global object `Scaleflex.DragDrop`
42
+
43
+ ```js
44
+ const DragDrop = window.ScaleflexWidget.DragDrop
45
+ ...
46
+ ...
47
+ ...
48
+ scaleflexWidget.use(DragDrop, propertiesObject)
49
+ ```
50
+ <!-- TODO(docs): add properties -->
51
+
52
+
53
+ <!-- Variables -->
54
+
55
+ [npm-url]: https://www.npmjs.com/package/@scaleflex/widget-drag-drop
56
+ [license-url]: https://opensource.org/licenses/MIT
57
+ [sfx-url]: https://www.scaleflex.com/
58
+ [version-url]: https://www.npmjs.com/package/@scaleflex/widget-drag-drop
59
+ [codeSandbox-url]: https://codesandbox.io/p/sandbox/scalelfex-widget-v4-sandbox-dtp6l3?file=%2Fsrc%2Findex.js
60
+
61
+
62
+ [npm-image]: https://img.shields.io/npm/v/@telus/remark-config.svg?style=for-the-badge&logo=npm
63
+ [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
64
+ [made-by-image]: https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg?style=for-the-badge
65
+ [plugins-image]: https://img.shields.io/static/v1?label=Scaleflex&message=Plugins&color=yellow&style=for-the-badge
66
+ [filerobot-image]: https://img.shields.io/static/v1?label=Scaleflex&message=website&color=orange&style=for-the-badge
67
+ [filerobot-version]: https://img.shields.io/npm/v/@scaleflex/widget-drag-drop?label=Version&style=for-the-badge&logo=npm
68
+ [codeSandbox-image]: https://img.shields.io/badge/CodeSandbox-black?style=for-the-badge&logo=CodeSandbox
package/dist/style.css CHANGED
@@ -7,31 +7,39 @@
7
7
  background-color: #F9FBFC;
8
8
  cursor: pointer;
9
9
  font-family: "Roboto", sans-serif, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
10
- max-width: 100%; }
11
- .filerobot-DragDrop-container:hover, .filerobot-DragDrop-container:active {
12
- background-color: #F3F7FA; }
13
- .filerobot-DragDrop-container::-moz-focus-inner {
14
- border: 0; }
10
+ max-width: 100%;
11
+ }
12
+ .filerobot-DragDrop-container:hover, .filerobot-DragDrop-container:active {
13
+ background-color: #F3F7FA;
14
+ }
15
+ .filerobot-DragDrop-container::-moz-focus-inner {
16
+ border: 0;
17
+ }
15
18
 
16
19
  .filerobot-DragDrop-inner {
17
20
  margin: 0;
18
21
  text-align: center;
19
- line-height: 1.4; }
22
+ line-height: 1.4;
23
+ }
20
24
 
21
25
  .filerobot-DragDrop-arrow {
22
26
  width: 60px;
23
27
  height: 60px;
24
- fill: #e0e0e0;
25
- margin-bottom: 17px; }
28
+ fill: rgb(223.5, 223.5, 223.5);
29
+ margin-bottom: 17px;
30
+ }
26
31
 
27
32
  .filerobot-DragDrop--isDragDropSupported {
28
- border: 1px dashed #DFE7ED; }
33
+ border: 1px dashed #DFE7ED;
34
+ }
29
35
 
30
36
  .filerobot-DragDrop--isDraggingOver {
31
37
  border: 1px dashed #5282DB;
32
- background: #F3F7FA; }
33
- .filerobot-DragDrop--isDraggingOver .filerobot-DragDrop-arrow {
34
- fill: #939393; }
38
+ background: #F3F7FA;
39
+ }
40
+ .filerobot-DragDrop--isDraggingOver .filerobot-DragDrop-arrow {
41
+ fill: #939393;
42
+ }
35
43
 
36
44
  .filerobot-DragDrop-label {
37
45
  display: block;
@@ -39,29 +47,38 @@
39
47
  line-height: 20px;
40
48
  margin-bottom: 5px;
41
49
  font-weight: 400;
42
- color: #768A9F; }
43
- @media only screen and (min-width: 1601px) {
44
- .filerobot-DragDrop-label {
45
- font-size: 16px;
46
- line-height: 22px; } }
50
+ color: #768A9F;
51
+ }
52
+ @media only screen and (min-width: 1601px) {
53
+ .filerobot-DragDrop-label {
54
+ font-size: 16px;
55
+ line-height: 22px;
56
+ }
57
+ }
47
58
 
48
59
  .filerobot-DragDrop-title {
49
60
  display: block;
50
61
  font-size: 24px;
51
62
  line-height: 28px;
52
- margin-bottom: 16px; }
53
- @media only screen and (min-width: 1601px) {
54
- .filerobot-DragDrop-title {
55
- font-size: 32px;
56
- line-height: 36px;
57
- margin-bottom: 28px; } }
58
- .filerobot-DragDrop-title span {
59
- color: #6879EB; }
63
+ margin-bottom: 16px;
64
+ }
65
+ @media only screen and (min-width: 1601px) {
66
+ .filerobot-DragDrop-title {
67
+ font-size: 32px;
68
+ line-height: 36px;
69
+ margin-bottom: 28px;
70
+ }
71
+ }
72
+ .filerobot-DragDrop-title span {
73
+ color: #6879EB;
74
+ }
60
75
 
61
76
  .filerobot-DragDrop-browse {
62
77
  color: #5282DB;
63
- cursor: pointer; }
78
+ cursor: pointer;
79
+ }
64
80
 
65
81
  .filerobot-DragDrop-note {
66
82
  font-size: 0.8em;
67
- color: #adadad; }
83
+ color: rgb(172.5, 172.5, 172.5);
84
+ }
package/lib/index.js CHANGED
@@ -36,9 +36,9 @@ import DragDropArea from './DragDropArea';
36
36
  // import { version } from '../package.json'
37
37
  // import packageInfo from '../package.json'
38
38
 
39
- /**
40
- * Drag & Drop plugin
41
- *
39
+ /**
40
+ * Drag & Drop plugin
41
+ *
42
42
  */
43
43
  var DragDrop = /*#__PURE__*/function (_Plugin) {
44
44
  // static VERSION = packageInfo.version
package/lib/style.scss CHANGED
@@ -1,90 +1,90 @@
1
- // packages/@scaleflex/widget-drag-drop/src/index.jsx
2
- @import '@scaleflex/widget-core/lib/_utils.scss';
3
- @import '@scaleflex/widget-core/lib/_variables.scss';
4
-
5
- .filerobot-DragDrop-container {
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- border-radius: 4px;
10
- background-color: $background-light-hover;
11
- cursor: pointer;
12
- font-family: $font-family-base;
13
- max-width: 100%;
14
-
15
- &:hover, &:active {
16
- background-color: $background-light-active;
17
- }
18
-
19
- // firefox fix: removes thin dotted outline
20
- &::-moz-focus-inner {
21
- border: 0;
22
- }
23
- }
24
-
25
- .filerobot-DragDrop-inner {
26
- margin: 0;
27
- text-align: center;
28
- line-height: 1.4;
29
- }
30
-
31
- .filerobot-DragDrop-arrow {
32
- width: 60px;
33
- height: 60px;
34
- fill: lighten($gray-500, 30%);
35
- margin-bottom: 17px;
36
- }
37
-
38
- .filerobot-DragDrop--isDragDropSupported {
39
- border: 1px dashed $border;
40
- }
41
-
42
- .filerobot-DragDrop--isDraggingOver {
43
- border: 1px dashed $blue;
44
- background: $background-light-active;
45
-
46
- .filerobot-DragDrop-arrow {
47
- fill: $gray-500;
48
- }
49
- }
50
-
51
- .filerobot-DragDrop-label {
52
- display: block;
53
- font-size: 14px;
54
- line-height: 20px;
55
- margin-bottom: 5px;
56
- font-weight: 400;
57
- color: #768A9F;
58
-
59
- @media #{$screen-xxl} {
60
- font-size: 16px;
61
- line-height: 22px;
62
- }
63
- }
64
-
65
- .filerobot-DragDrop-title {
66
- display: block;
67
- font-size: 24px;
68
- line-height: 28px;
69
- margin-bottom: 16px;
70
-
71
- @media #{$screen-xxl} {
72
- font-size: 32px;
73
- line-height: 36px;
74
- margin-bottom: 28px;
75
- }
76
-
77
- span {
78
- color: #6879EB;
79
- }
80
- }
81
-
82
- .filerobot-DragDrop-browse {
83
- color: $blue;
84
- cursor: pointer;
85
- }
86
-
87
- .filerobot-DragDrop-note {
88
- font-size: 0.8em;
89
- color: lighten($gray-500, 10%);
90
- }
1
+ // packages/@scaleflex/widget-drag-drop/src/index.jsx
2
+ @import '@scaleflex/widget-core/lib/_utils.scss';
3
+ @import '@scaleflex/widget-core/lib/_variables.scss';
4
+
5
+ .filerobot-DragDrop-container {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ border-radius: 4px;
10
+ background-color: $background-light-hover;
11
+ cursor: pointer;
12
+ font-family: $font-family-base;
13
+ max-width: 100%;
14
+
15
+ &:hover, &:active {
16
+ background-color: $background-light-active;
17
+ }
18
+
19
+ // firefox fix: removes thin dotted outline
20
+ &::-moz-focus-inner {
21
+ border: 0;
22
+ }
23
+ }
24
+
25
+ .filerobot-DragDrop-inner {
26
+ margin: 0;
27
+ text-align: center;
28
+ line-height: 1.4;
29
+ }
30
+
31
+ .filerobot-DragDrop-arrow {
32
+ width: 60px;
33
+ height: 60px;
34
+ fill: lighten($gray-500, 30%);
35
+ margin-bottom: 17px;
36
+ }
37
+
38
+ .filerobot-DragDrop--isDragDropSupported {
39
+ border: 1px dashed $border;
40
+ }
41
+
42
+ .filerobot-DragDrop--isDraggingOver {
43
+ border: 1px dashed $blue;
44
+ background: $background-light-active;
45
+
46
+ .filerobot-DragDrop-arrow {
47
+ fill: $gray-500;
48
+ }
49
+ }
50
+
51
+ .filerobot-DragDrop-label {
52
+ display: block;
53
+ font-size: 14px;
54
+ line-height: 20px;
55
+ margin-bottom: 5px;
56
+ font-weight: 400;
57
+ color: #768A9F;
58
+
59
+ @media #{$screen-xxl} {
60
+ font-size: 16px;
61
+ line-height: 22px;
62
+ }
63
+ }
64
+
65
+ .filerobot-DragDrop-title {
66
+ display: block;
67
+ font-size: 24px;
68
+ line-height: 28px;
69
+ margin-bottom: 16px;
70
+
71
+ @media #{$screen-xxl} {
72
+ font-size: 32px;
73
+ line-height: 36px;
74
+ margin-bottom: 28px;
75
+ }
76
+
77
+ span {
78
+ color: #6879EB;
79
+ }
80
+ }
81
+
82
+ .filerobot-DragDrop-browse {
83
+ color: $blue;
84
+ cursor: pointer;
85
+ }
86
+
87
+ .filerobot-DragDrop-note {
88
+ font-size: 0.8em;
89
+ color: lighten($gray-500, 10%);
90
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scaleflex/widget-drag-drop",
3
3
  "description": "Droppable zone UI for Filrobot filerobot. Drag and drop files into it to upload.",
4
- "version": "4.0.6",
4
+ "version": "4.1.0",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
7
7
  "style": "dist/style.min.css",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@scaleflex/icons": "^3.0.0-beta.11",
19
19
  "@scaleflex/ui": "^3.0.0-beta.11",
20
- "@scaleflex/widget-utils": "^4.0.6"
20
+ "@scaleflex/widget-utils": "^4.1.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "react": "^19.0.0",
@@ -30,5 +30,5 @@
30
30
  "react-dom": ">=19.0.0",
31
31
  "react-redux": "^8.1.1"
32
32
  },
33
- "gitHead": "17ad9b9abc2add9c8b52ab56e3a72108bee20a7a"
33
+ "gitHead": "471120d67066617a0d8824eae11b07d1f2259473"
34
34
  }
package/types/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- import Filerobot = require("@scaleflex/widget-core");
2
- import DragDropLocale = require("./generatedLocale");
3
-
4
- declare module DragDrop {
5
- interface DragDropOptions extends Filerobot.PluginOptions {
6
- replaceTargetContent?: boolean;
7
- target?: Filerobot.PluginTarget;
8
- inputName?: string;
9
- width?: string | number;
10
- height?: string | number;
11
- note?: string;
12
- hint?: string;
13
- locale?: DragDropLocale;
14
- labelSize?: number | string;
15
- hideNote?: boolean;
16
- iconSize?: number | string;
17
- }
18
- }
19
-
20
- declare class DragDrop extends Filerobot.Plugin<DragDrop.DragDropOptions> {}
21
-
22
- export = DragDrop;
1
+ import Filerobot = require("@scaleflex/widget-core");
2
+ import DragDropLocale = require("./generatedLocale");
3
+
4
+ declare module DragDrop {
5
+ interface DragDropOptions extends Filerobot.PluginOptions {
6
+ replaceTargetContent?: boolean;
7
+ target?: Filerobot.PluginTarget;
8
+ inputName?: string;
9
+ width?: string | number;
10
+ height?: string | number;
11
+ note?: string;
12
+ hint?: string;
13
+ locale?: DragDropLocale;
14
+ labelSize?: number | string;
15
+ hideNote?: boolean;
16
+ iconSize?: number | string;
17
+ }
18
+ }
19
+
20
+ declare class DragDrop extends Filerobot.Plugin<DragDrop.DragDropOptions> {}
21
+
22
+ export = DragDrop;