@bpmn-io/form-js-viewer 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.
@@ -274,6 +274,12 @@
274
274
  background-color: var(--color-grey-225-10-90);
275
275
  }
276
276
 
277
+ .fjs-container .fjs-taglist .fjs-taglist-tags {
278
+ display: flex;
279
+ flex-wrap: wrap;
280
+ gap: 5px;
281
+ }
282
+
277
283
  .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-label {
278
284
  padding: 2px 6px 2px 8px;
279
285
  }
@@ -285,6 +291,8 @@
285
291
  text-align: center;
286
292
  line-height: 28px;
287
293
  background-color: var(--color-grey-225-10-80);
294
+ border: none;
295
+ padding: 1px 0;
288
296
  color: var(--color-black);
289
297
  }
290
298
 
@@ -292,14 +300,20 @@
292
300
  opacity: 0.6;
293
301
  }
294
302
 
295
- .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:hover {
303
+ .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:hover,
304
+ .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:focus-visible {
296
305
  background-color: var(--color-grey-225-10-75);
297
306
  }
298
307
 
299
- .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:hover > svg {
308
+ .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:hover > svg,
309
+ .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:focus-visible > svg {
300
310
  opacity: 1;
301
311
  }
302
312
 
313
+ .fjs-container .fjs-taglist .fjs-taglist-tag .fjs-taglist-tag-remove:focus-visible {
314
+ outline: none;
315
+ }
316
+
303
317
  .fjs-container .fjs-taglist .fjs-taglist-input {
304
318
  border: none;
305
319
  background-color: transparent;
@@ -319,7 +333,8 @@
319
333
  .fjs-container .fjs-dropdownlist {
320
334
  position: absolute;
321
335
  user-select: none;
322
- overflow-y: auto;
336
+ overflow-y: scroll;
337
+ max-height: 120px;
323
338
  scroll-behavior: smooth;
324
339
  width: 100%;
325
340
  border-radius: 3px;
package/dist/index.cjs CHANGED
@@ -1898,6 +1898,18 @@ function Taglist(props) {
1898
1898
  break;
1899
1899
  }
1900
1900
  };
1901
+ const onTagRemoveClick = (event, value) => {
1902
+ const {
1903
+ target
1904
+ } = event;
1905
+ deselectValue(value);
1906
+
1907
+ // restore focus if there is no next sibling to focus
1908
+ const nextTag = target.closest('.fjs-taglist-tag').nextSibling;
1909
+ if (!nextTag) {
1910
+ searchbarRef.current.focus();
1911
+ }
1912
+ };
1901
1913
  return jsxRuntime.jsxs("div", {
1902
1914
  class: formFieldClasses(type$3, {
1903
1915
  errors,
@@ -1910,19 +1922,24 @@ function Taglist(props) {
1910
1922
  class: classNames__default['default']('fjs-taglist', {
1911
1923
  'disabled': disabled
1912
1924
  }),
1913
- children: [!disabled && loadState === LOAD_STATES.LOADED && values.map(v => {
1914
- return jsxRuntime.jsxs("div", {
1915
- class: "fjs-taglist-tag",
1916
- onMouseDown: e => e.preventDefault(),
1917
- children: [jsxRuntime.jsx("span", {
1918
- class: "fjs-taglist-tag-label",
1919
- children: valueToOptionMap[v] ? valueToOptionMap[v].label : `unexpected value{${v}}`
1920
- }), jsxRuntime.jsx("span", {
1921
- class: "fjs-taglist-tag-remove",
1922
- onMouseDown: () => deselectValue(v),
1923
- children: jsxRuntime.jsx(CloseIcon, {})
1924
- })]
1925
- });
1925
+ children: [!disabled && loadState === LOAD_STATES.LOADED && jsxRuntime.jsx("div", {
1926
+ class: "fjs-taglist-tags",
1927
+ children: values.map(v => {
1928
+ return jsxRuntime.jsxs("div", {
1929
+ class: "fjs-taglist-tag",
1930
+ onMouseDown: e => e.preventDefault(),
1931
+ children: [jsxRuntime.jsx("span", {
1932
+ class: "fjs-taglist-tag-label",
1933
+ children: valueToOptionMap[v] ? valueToOptionMap[v].label : `unexpected value{${v}}`
1934
+ }), jsxRuntime.jsx("button", {
1935
+ type: "button",
1936
+ title: "Remove tag",
1937
+ class: "fjs-taglist-tag-remove",
1938
+ onClick: event => onTagRemoveClick(event, v),
1939
+ children: jsxRuntime.jsx(CloseIcon, {})
1940
+ })]
1941
+ });
1942
+ })
1926
1943
  }), jsxRuntime.jsx("input", {
1927
1944
  disabled: disabled,
1928
1945
  class: "fjs-taglist-input",