@bpmn-io/properties-panel 1.3.0 → 1.4.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.
@@ -421,6 +421,14 @@
421
421
  border-radius: 3px;
422
422
  }
423
423
 
424
+ .bio-properties-panel-description pre code {
425
+ width: 100%;
426
+ display: block;
427
+ overflow-x: auto;
428
+ padding: 4px 6px;
429
+ font-family: var(--font-family-monospace);
430
+ }
431
+
424
432
  .bio-properties-panel-description ul {
425
433
  padding: 0;
426
434
  margin: 0 0 0 12px;
@@ -455,7 +463,7 @@ textarea.bio-properties-panel-input,
455
463
  width: 100%;
456
464
  }
457
465
 
458
- textarea.bio-properties-panel-input.auto-resize {
466
+ textarea.bio-properties-panel-input {
459
467
  min-height: 28px;
460
468
  }
461
469
 
package/dist/index.esm.js CHANGED
@@ -2159,6 +2159,16 @@ function Select(props) {
2159
2159
  value: localValue,
2160
2160
  disabled: disabled,
2161
2161
  children: options.map((option, idx) => {
2162
+ if (option.children) {
2163
+ return jsx("optgroup", {
2164
+ label: option.label,
2165
+ children: option.children.map((child, idx) => jsx("option", {
2166
+ value: child.value,
2167
+ disabled: child.disabled,
2168
+ children: child.label
2169
+ }, idx))
2170
+ }, idx);
2171
+ }
2162
2172
  return jsx("option", {
2163
2173
  value: option.value,
2164
2174
  disabled: option.disabled,
@@ -2288,13 +2298,15 @@ function prefixId$3(id) {
2288
2298
 
2289
2299
  function resizeToContents(element) {
2290
2300
  element.style.height = 'auto';
2291
- element.style.height = Math.min(element.scrollHeight + 2, 150) + 'px';
2301
+
2302
+ // a 2px pixel offset is required to prevent scrollbar from
2303
+ // appearing on OS with a full length scroll bar (Windows/Linux)
2304
+ element.style.height = `${element.scrollHeight + 2}px`;
2292
2305
  }
2293
2306
  function TextArea(props) {
2294
2307
  const {
2295
2308
  id,
2296
2309
  label,
2297
- rows = 2,
2298
2310
  debounce,
2299
2311
  onInput,
2300
2312
  value = '',
@@ -2302,7 +2314,8 @@ function TextArea(props) {
2302
2314
  monospace,
2303
2315
  onFocus,
2304
2316
  onBlur,
2305
- autoResize
2317
+ autoResize,
2318
+ rows = autoResize ? 1 : 2
2306
2319
  } = props;
2307
2320
  const [localValue, setLocalValue] = useState(value);
2308
2321
  const ref = useShowEntryEvent(id);