@bpmn-io/form-js-playground 0.10.0-alpha.0 → 0.10.0-alpha.1

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,4 +1,36 @@
1
- .fjs-pgl-root {
1
+ /**
2
+ * file-drop.css
3
+ */
4
+ .drop-overlay {
5
+ position: fixed;
6
+ top: 0;
7
+ left: 0;
8
+ bottom: 0;
9
+ right: 0;
10
+
11
+ padding: 50px;
12
+
13
+ background: rgba(255, 255, 255, .9);
14
+
15
+ z-index: 1000;
16
+ }
17
+
18
+ .drop-overlay .box {
19
+ text-align: center;
20
+ border: dashed 4px #CCC;
21
+ height: 100%;
22
+ width: 100%;
23
+ display: table;
24
+ }
25
+
26
+ .drop-overlay .label {
27
+ font-size: 26px;
28
+ color: #888;
29
+ margin: auto;
30
+
31
+ display: table-cell;
32
+ vertical-align: middle;
33
+ }.fjs-pgl-root {
2
34
  --color-button-hover: var(--color-grey-225-10-95);
3
35
 
4
36
  --color-section-border: var(--color-grey-225-10-55);
@@ -226,36 +258,3 @@
226
258
  width: 100%;
227
259
  height: 100%;
228
260
  }
229
- /**
230
- * file-drop.css
231
- */
232
- .drop-overlay {
233
- position: fixed;
234
- top: 0;
235
- left: 0;
236
- bottom: 0;
237
- right: 0;
238
-
239
- padding: 50px;
240
-
241
- background: rgba(255, 255, 255, .9);
242
-
243
- z-index: 1000;
244
- }
245
-
246
- .drop-overlay .box {
247
- text-align: center;
248
- border: dashed 4px #CCC;
249
- height: 100%;
250
- width: 100%;
251
- display: table;
252
- }
253
-
254
- .drop-overlay .label {
255
- font-size: 26px;
256
- color: #888;
257
- margin: auto;
258
-
259
- display: table-cell;
260
- vertical-align: middle;
261
- }
@@ -4008,6 +4008,18 @@
4008
4008
  break;
4009
4009
  }
4010
4010
  };
4011
+ const onTagRemoveClick = (event, value) => {
4012
+ const {
4013
+ target
4014
+ } = event;
4015
+ deselectValue(value);
4016
+
4017
+ // restore focus if there is no next sibling to focus
4018
+ const nextTag = target.closest('.fjs-taglist-tag').nextSibling;
4019
+ if (!nextTag) {
4020
+ searchbarRef.current.focus();
4021
+ }
4022
+ };
4011
4023
  return e$1("div", {
4012
4024
  class: formFieldClasses(type$3, {
4013
4025
  errors,
@@ -4020,19 +4032,24 @@
4020
4032
  class: classNames('fjs-taglist', {
4021
4033
  'disabled': disabled
4022
4034
  }),
4023
- children: [!disabled && loadState === LOAD_STATES.LOADED && values.map(v => {
4024
- return e$1("div", {
4025
- class: "fjs-taglist-tag",
4026
- onMouseDown: e => e.preventDefault(),
4027
- children: [e$1("span", {
4028
- class: "fjs-taglist-tag-label",
4029
- children: valueToOptionMap[v] ? valueToOptionMap[v].label : `unexpected value{${v}}`
4030
- }), e$1("span", {
4031
- class: "fjs-taglist-tag-remove",
4032
- onMouseDown: () => deselectValue(v),
4033
- children: e$1(CloseIcon, {})
4034
- })]
4035
- });
4035
+ children: [!disabled && loadState === LOAD_STATES.LOADED && e$1("div", {
4036
+ class: "fjs-taglist-tags",
4037
+ children: values.map(v => {
4038
+ return e$1("div", {
4039
+ class: "fjs-taglist-tag",
4040
+ onMouseDown: e => e.preventDefault(),
4041
+ children: [e$1("span", {
4042
+ class: "fjs-taglist-tag-label",
4043
+ children: valueToOptionMap[v] ? valueToOptionMap[v].label : `unexpected value{${v}}`
4044
+ }), e$1("button", {
4045
+ type: "button",
4046
+ title: "Remove tag",
4047
+ class: "fjs-taglist-tag-remove",
4048
+ onClick: event => onTagRemoveClick(event, v),
4049
+ children: e$1(CloseIcon, {})
4050
+ })]
4051
+ });
4052
+ })
4036
4053
  }), e$1("input", {
4037
4054
  disabled: disabled,
4038
4055
  class: "fjs-taglist-input",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-playground",
3
- "version": "0.10.0-alpha.0",
3
+ "version": "0.10.0-alpha.1",
4
4
  "description": "A form-js playground",
5
5
  "files": [
6
6
  "dist"
@@ -44,8 +44,8 @@
44
44
  "url": "https://github.com/bpmn-io"
45
45
  },
46
46
  "dependencies": {
47
- "@bpmn-io/form-js-editor": "^0.10.0-alpha.0",
48
- "@bpmn-io/form-js-viewer": "^0.10.0-alpha.0",
47
+ "@bpmn-io/form-js-editor": "^0.10.0-alpha.1",
48
+ "@bpmn-io/form-js-viewer": "^0.10.0-alpha.1",
49
49
  "@codemirror/lang-json": "^6.0.0",
50
50
  "@codemirror/lint": "^6.0.0",
51
51
  "@codemirror/state": "^6.1.1",
@@ -67,5 +67,5 @@
67
67
  "rollup-plugin-css-only": "^3.1.0",
68
68
  "style-loader": "^3.3.0"
69
69
  },
70
- "gitHead": "ac7ce2105fc1c982d1da45d4f863c8999d9d736e"
70
+ "gitHead": "9bc2d1e01db3a1a38122632fb94f70d1e085243b"
71
71
  }