@bigbinary/neeto-rules-frontend 2.7.9 → 2.7.10

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.
@@ -107,6 +107,17 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
107
107
  return null;
108
108
  };
109
109
 
110
+ var DEFAULT_LONG_TEXT_ROWS = 8;
111
+
112
+ // Atoms puts leading-none on option labels, which suits short options but
113
+ // leaves panel options — full sentences that regularly wrap — with no leading
114
+ // at all on their second line.
115
+ var PANEL_OPTION_LABEL_CLASSES = "[&_label]:leading-normal";
116
+
117
+ // A vertical RadioGroup also defaults to an 8px gap, too tight to scan once the
118
+ // options wrap. Checkbox lists space themselves and only need the label fix.
119
+ var PANEL_RADIO_GROUP_CLASSES = "data-[orientation=vertical]:gap-3 ".concat(PANEL_OPTION_LABEL_CLASSES);
120
+
110
121
  var Body = function Body(_ref) {
111
122
  var children = _ref.children,
112
123
  className = _ref.className;
@@ -437,8 +448,9 @@ var ActionPanel = function ActionPanel() {
437
448
  variant: "h5",
438
449
  children: [label, "..."]
439
450
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
451
+ color: "muted",
440
452
  "data-testid": "action-description",
441
- variant: "body1",
453
+ variant: "body3",
442
454
  children: t("neetoRules.form.addActionDescription")
443
455
  })]
444
456
  })
@@ -464,6 +476,7 @@ var ActionPanel = function ActionPanel() {
464
476
  })]
465
477
  }), neetoCist.isNotEmpty(searchedOptions) ? /*#__PURE__*/jsxRuntime.jsx(formik$1.RadioGroup, {
466
478
  ref: ref,
479
+ className: PANEL_RADIO_GROUP_CLASSES,
467
480
  name: "".concat(name, ".name"),
468
481
  orientation: "vertical",
469
482
  value: selectedField === null || selectedField === void 0 ? void 0 : selectedField.value,
@@ -493,8 +506,6 @@ var ActionPanel = function ActionPanel() {
493
506
  });
494
507
  };
495
508
 
496
- var DEFAULT_LONG_TEXT_ROWS = 8;
497
-
498
509
  var Target$k = function Target(_ref) {
499
510
  var _errors$actions, _touched$actions, _selectedField$separa;
500
511
  var index = _ref.index,
@@ -2074,7 +2085,7 @@ var MultiSelectCheckbox$1 = function MultiSelectCheckbox(_ref2) {
2074
2085
  };
2075
2086
  var defaultLabel = (selectedField === null || selectedField === void 0 ? void 0 : selectedField.placeholder) || t("neetoRules.labels.selectValues");
2076
2087
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
2077
- className: "space-y-3",
2088
+ className: classNames("space-y-3", PANEL_OPTION_LABEL_CLASSES),
2078
2089
  children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
2079
2090
  required: required,
2080
2091
  children: defaultLabel
@@ -3136,8 +3147,9 @@ var ActionSubItemPanel = function ActionSubItemPanel() {
3136
3147
  children: header
3137
3148
  })]
3138
3149
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
3150
+ color: "muted",
3139
3151
  "data-testid": "action-sub-item-description",
3140
- variant: "body1",
3152
+ variant: "body3",
3141
3153
  children: t("neetoRules.form.addActionSubItemDescription")
3142
3154
  })]
3143
3155
  })
@@ -3520,7 +3532,7 @@ var MultiSelectCheckbox = function MultiSelectCheckbox(_ref2) {
3520
3532
  };
3521
3533
  var defaultLabel = t("neetoRules.labels.selectValues");
3522
3534
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
3523
- className: "space-y-3",
3535
+ className: classNames("space-y-3", PANEL_OPTION_LABEL_CLASSES),
3524
3536
  children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
3525
3537
  required: required,
3526
3538
  children: defaultLabel
@@ -3777,6 +3789,7 @@ var RadioField = function RadioField(_ref2) {
3777
3789
  }), neetoCist.isNotEmpty(searchedOptions) ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.RadioGroup, _objectSpread$4(_objectSpread$4({
3778
3790
  ref: ref,
3779
3791
  required: required,
3792
+ className: PANEL_RADIO_GROUP_CLASSES,
3780
3793
  label: showLabel && t("neetoRules.labels.selectValue"),
3781
3794
  orientation: "vertical",
3782
3795
  value: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value,
@@ -4034,8 +4047,9 @@ var FieldPanel = function FieldPanel() {
4034
4047
  variant: "h5",
4035
4048
  children: [index ? logicalOperatorLabel : conditionLabel, "..."]
4036
4049
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
4050
+ color: "muted",
4037
4051
  "data-testid": "condition-description",
4038
- variant: "body1",
4052
+ variant: "body3",
4039
4053
  children: t("neetoRules.form.addConditionDescription")
4040
4054
  })]
4041
4055
  })
@@ -4278,8 +4292,9 @@ var VerbAndValuePanel = function VerbAndValuePanel() {
4278
4292
  children: [index ? logicalOperatorLabel : conditionLabel, " ", fieldLabel, "..."]
4279
4293
  })]
4280
4294
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
4295
+ color: "muted",
4281
4296
  "data-testid": "condition-verb-and-value-description",
4282
- variant: "body1",
4297
+ variant: "body3",
4283
4298
  children: t("neetoRules.form.addConditionVerbAndValueDescription")
4284
4299
  })]
4285
4300
  })
@@ -4365,7 +4380,8 @@ var DelayPanel = function DelayPanel() {
4365
4380
  variant: "h5",
4366
4381
  children: t("neetoRules.common.addDelay")
4367
4382
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
4368
- variant: "body1",
4383
+ color: "muted",
4384
+ variant: "body3",
4369
4385
  children: t("neetoRules.helpText.addDelay")
4370
4386
  })]
4371
4387
  })
@@ -4618,8 +4634,9 @@ var EventsPanel = function EventsPanel() {
4618
4634
  variant: "h5",
4619
4635
  children: [t("neetoRules.common.when"), "..."]
4620
4636
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
4637
+ color: "muted",
4621
4638
  "data-testid": "event-description",
4622
- variant: "body1",
4639
+ variant: "body3",
4623
4640
  children: t("neetoRules.form.addEventDescription")
4624
4641
  })]
4625
4642
  })
@@ -4641,8 +4658,9 @@ var EventsPanel = function EventsPanel() {
4641
4658
  }
4642
4659
  })
4643
4660
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
4644
- className: "space-y-3",
4661
+ className: classNames("space-y-3", PANEL_OPTION_LABEL_CLASSES),
4645
4662
  children: [neetoCist.isNotEmpty(searchedOptions) ? singleSelect ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.RadioGroup, {
4663
+ className: PANEL_RADIO_GROUP_CLASSES,
4646
4664
  orientation: "vertical",
4647
4665
  value: (eventNames === null || eventNames === void 0 ? void 0 : eventNames[0]) || "",
4648
4666
  onValueChange: handleRadioChange,
@@ -4777,14 +4795,16 @@ var PerformerPanel = function PerformerPanel() {
4777
4795
  children: [t("neetoRules.form.actionTriggeredBy"), "..."]
4778
4796
  })]
4779
4797
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
4798
+ color: "muted",
4780
4799
  "data-testid": "performer-description",
4781
- variant: "body1",
4800
+ variant: "body3",
4782
4801
  children: t("neetoRules.form.addPerformerDescription")
4783
4802
  })]
4784
4803
  })
4785
4804
  }), /*#__PURE__*/jsxRuntime.jsx(Panel.Body, {
4786
4805
  children: /*#__PURE__*/jsxRuntime.jsx(formik$1.RadioGroup, {
4787
4806
  ref: ref,
4807
+ className: PANEL_RADIO_GROUP_CLASSES,
4788
4808
  disabled: isMenuDisabled,
4789
4809
  name: "".concat(performerName, ".value"),
4790
4810
  orientation: "vertical",
@@ -5383,4 +5403,4 @@ exports.getSlackChannelErrors = getSlackChannelErrors;
5383
5403
  exports.getValidationSchema = getValidationSchema;
5384
5404
  exports.getVerbOptions = getVerbOptions;
5385
5405
  exports.usePollRuleName = usePollRuleName;
5386
- //# sourceMappingURL=index-BHLJ3lzS.js.map
5406
+ //# sourceMappingURL=index-jjFVJckW.js.map