@bpmn-io/properties-panel 3.20.0 → 3.20.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.
@@ -1334,6 +1334,31 @@ textarea.bio-properties-panel-input {
1334
1334
  text-transform: capitalize;
1335
1335
  }
1336
1336
 
1337
+ .bio-properties-panel-popup .bio-properties-panel-popup__close {
1338
+ margin: -12px;
1339
+ margin-left: 12px;
1340
+ width: 40px;
1341
+ height: 40px;
1342
+ border: none;
1343
+ background-color: var(--popup-header-background-color);
1344
+ }
1345
+
1346
+ .bio-properties-panel-popup .bio-properties-panel-popup__close:hover,
1347
+ .bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
1348
+ background-color: var(--popup-background-color);
1349
+ }
1350
+
1351
+ .bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
1352
+ outline-offset: -2px;
1353
+ }
1354
+
1355
+ .bio-properties-panel-popup .bio-properties-panel-popup__close svg {
1356
+ width: 16px;
1357
+ height: 16px;
1358
+ fill: currentColor;
1359
+ margin-top: 2px;
1360
+ }
1361
+
1337
1362
  .bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
1338
1363
  margin-left: -4px;
1339
1364
  }
package/dist/index.esm.js CHANGED
@@ -152,6 +152,21 @@ PopupIcon.defaultProps = {
152
152
  height: "16",
153
153
  viewBox: "0 0 32 32"
154
154
  };
155
+ var CloseIcon = function CloseIcon(props) {
156
+ return jsx("svg", {
157
+ ...props,
158
+ children: jsx("path", {
159
+ fillRule: "evenodd",
160
+ d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
161
+ fill: "currentColor"
162
+ })
163
+ });
164
+ };
165
+ CloseIcon.defaultProps = {
166
+ xmlns: "http://www.w3.org/2000/svg",
167
+ width: "16",
168
+ height: "16"
169
+ };
155
170
 
156
171
  function Header(props) {
157
172
  const {
@@ -896,7 +911,8 @@ const CodeEditor$1 = forwardRef((props, ref) => {
896
911
  tooltipContainer,
897
912
  enableGutters,
898
913
  hostLanguage,
899
- singleLine
914
+ singleLine,
915
+ lineWrap: true
900
916
  });
901
917
  setEditor(editor);
902
918
  return () => {
@@ -933,7 +949,7 @@ const CodeEditor$1 = forwardRef((props, ref) => {
933
949
  title: "Open pop-up editor",
934
950
  class: "bio-properties-panel-open-feel-popup",
935
951
  onClick: () => onPopupOpen('feelers'),
936
- children: jsx(ExternalLinkIcon, {})
952
+ children: jsx(PopupIcon, {})
937
953
  })]
938
954
  });
939
955
  });
@@ -1303,6 +1319,9 @@ function Title(props) {
1303
1319
  draggable,
1304
1320
  emit = () => {},
1305
1321
  title,
1322
+ showCloseButton = false,
1323
+ closeButtonTooltip = 'Close popup',
1324
+ onClose,
1306
1325
  ...rest
1307
1326
  } = props;
1308
1327
 
@@ -1373,7 +1392,12 @@ function Title(props) {
1373
1392
  }), jsx("div", {
1374
1393
  class: "bio-properties-panel-popup__title",
1375
1394
  children: title
1376
- }), children]
1395
+ }), children, showCloseButton && jsx("button", {
1396
+ title: closeButtonTooltip,
1397
+ class: "bio-properties-panel-popup__close",
1398
+ onClick: onClose,
1399
+ children: jsx(CloseIcon, {})
1400
+ })]
1377
1401
  });
1378
1402
  }
1379
1403
  function Body(props) {
@@ -1591,6 +1615,9 @@ function FeelPopupComponent(props) {
1591
1615
  children: [jsxs(Popup.Title, {
1592
1616
  title: title,
1593
1617
  emit: emit,
1618
+ showCloseButton: true,
1619
+ closeButtonTooltip: "Save and close",
1620
+ onClose: onClose,
1594
1621
  draggable: true,
1595
1622
  children: [type === 'feel' && jsxs("a", {
1596
1623
  href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
@@ -1632,14 +1659,6 @@ function FeelPopupComponent(props) {
1632
1659
  tooltipContainer: tooltipContainer
1633
1660
  })]
1634
1661
  })
1635
- }), jsx(Popup.Footer, {
1636
- children: jsx("button", {
1637
- type: "button",
1638
- onClick: () => onClose(),
1639
- title: "Close pop-up editor",
1640
- class: "bio-properties-panel-feel-popup__close-btn",
1641
- children: "Close"
1642
- })
1643
1662
  })]
1644
1663
  });
1645
1664
  }
@@ -4286,5 +4305,5 @@ var index = {
4286
4305
  feelPopup: ['type', FeelPopupModule]
4287
4306
  };
4288
4307
 
4289
- export { ArrowIcon, CheckboxEntry, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, HelpIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, Placeholder, Popup, PopupIcon, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$5 as isCheckboxEntryEdited, isEdited$6 as isFeelEntryEdited, isEdited$7 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$8 as isToggleSwitchEntryEdited, useDescriptionContext, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
4308
+ export { ArrowIcon, CheckboxEntry, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, HelpIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, Placeholder, Popup, PopupIcon, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$5 as isCheckboxEntryEdited, isEdited$6 as isFeelEntryEdited, isEdited$7 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$8 as isToggleSwitchEntryEdited, useDescriptionContext, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
4290
4309
  //# sourceMappingURL=index.esm.js.map