bpmn-js 18.25.0 → 18.25.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.
@@ -31,8 +31,12 @@
31
31
  --breadcrumbs-font-family: var(--bjs-font-family);
32
32
  --breadcrumbs-item-color: var(--color-blue-205-100-50);
33
33
  --breadcrumbs-arrow-color: var(--color-black);
34
+ --breadcrumbs-background-color: var(--color-grey-225-10-97);
35
+ --breadcrumbs-border-color: var(--color-grey-225-10-75);
36
+ --breadcrumbs-focus-outline-color: var(--color-blue-205-100-50);
34
37
  --drilldown-fill-color: var(--color-white);
35
38
  --drilldown-background-color: var(--color-blue-205-100-50);
39
+ --drilldown-focus-outline-color: var(--color-blue-205-100-50);
36
40
  }
37
41
 
38
42
  .bjs-breadcrumbs {
@@ -40,13 +44,17 @@
40
44
  display: none;
41
45
  flex-wrap: wrap;
42
46
  align-items: center;
43
- top: 30px;
44
- left: 30px;
45
- padding: 0px;
47
+ top: 20px;
48
+ left: 20px;
49
+ padding: 5px 10px;
46
50
  margin: 0px;
47
51
  font-family: var(--breadcrumbs-font-family);
48
52
  font-size: 16px;
49
53
  line-height: normal;
54
+ background-color: var(--breadcrumbs-background-color);
55
+ border: solid 1px var(--breadcrumbs-border-color);
56
+ border-radius: 2px;
57
+ row-gap: 5px;
50
58
  }
51
59
 
52
60
  .bjs-breadcrumbs-shown .bjs-breadcrumbs {
@@ -63,18 +71,18 @@
63
71
 
64
72
  .bjs-breadcrumbs li {
65
73
  display: inline-flex;
66
- padding-bottom: 5px;
67
74
  align-items: center;
68
75
  }
69
76
 
70
- .bjs-breadcrumbs li a {
77
+ .bjs-breadcrumbs a.bjs-crumb {
71
78
  cursor: pointer;
72
79
  color: var(--breadcrumbs-item-color);
80
+ text-decoration: none;
73
81
  }
74
82
 
75
- .bjs-breadcrumbs li:last-of-type a {
76
- color: inherit;
77
- cursor: default;
83
+ .bjs-breadcrumbs a.bjs-crumb:focus-visible {
84
+ outline: solid 1px var(--breadcrumbs-focus-outline-color);
85
+ outline-offset: 1px;
78
86
  }
79
87
 
80
88
  .bjs-breadcrumbs li:not(:first-child)::before {
@@ -102,12 +110,16 @@
102
110
  cursor: pointer;
103
111
  border: none;
104
112
  border-radius: 2px;
105
- outline: none;
106
113
 
107
114
  fill: var(--drilldown-fill-color);
108
115
  background-color: var(--drilldown-background-color);
109
116
  }
110
117
 
118
+ .bjs-drilldown:focus-visible {
119
+ outline: solid 1px var(--drilldown-focus-outline-color);
120
+ outline-offset: 1px;
121
+ }
122
+
111
123
  .bjs-drilldown-empty {
112
124
  display: none;
113
125
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v18.25.0
2
+ * bpmn-js - bpmn-modeler v18.25.1
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -23831,14 +23831,7 @@
23831
23831
  return [];
23832
23832
  }
23833
23833
 
23834
- var title = escapeHTML(parent.name || parent.id);
23835
- var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
23836
-
23837
- link.addEventListener('click', function() {
23838
- canvas.setRootElement(parentPlane);
23839
- });
23840
-
23841
- return link;
23834
+ return [ { parent: parent, parentPlane: parentPlane } ];
23842
23835
  });
23843
23836
 
23844
23837
  breadcrumbs.innerHTML = '';
@@ -23848,8 +23841,39 @@
23848
23841
 
23849
23842
  containerClasses.toggle(OPEN_CLASS, visible);
23850
23843
 
23851
- path.forEach(function(element) {
23852
- breadcrumbs.appendChild(element);
23844
+ path.forEach(function(entry, index) {
23845
+ var parent = entry.parent,
23846
+ parentPlane = entry.parentPlane,
23847
+ title = escapeHTML(parent.name || parent.id);
23848
+
23849
+ // the last crumb represents the current plane; render it as
23850
+ // plain, non-interactive text
23851
+ var isCurrent = index === path.length - 1;
23852
+
23853
+ var crumb;
23854
+
23855
+ if (isCurrent) {
23856
+ crumb = domify(
23857
+ '<li><span class="bjs-crumb" title="' + title + '">' + title + '</span></li>'
23858
+ );
23859
+ } else {
23860
+
23861
+ // render navigable crumbs as local links so they are focusable
23862
+ // and keyboard-operable
23863
+ var href = '#' + escapeHTML(parent.id);
23864
+
23865
+ crumb = domify(
23866
+ '<li><a class="bjs-crumb" href="' + href + '" title="' + title + '">' + title + '</a></li>'
23867
+ );
23868
+
23869
+ crumb.addEventListener('click', function(event) {
23870
+ event.preventDefault();
23871
+
23872
+ canvas.setRootElement(parentPlane);
23873
+ });
23874
+ }
23875
+
23876
+ breadcrumbs.appendChild(crumb);
23853
23877
  });
23854
23878
  }
23855
23879