@flytedan/flytebot-design-system 0.36.0 → 0.37.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.
package/dist/index.js CHANGED
@@ -3493,6 +3493,7 @@ function MultiSelectPanel({
3493
3493
  }, [mode2]);
3494
3494
  const doResolve = () => {
3495
3495
  if (!field.resolve) return;
3496
+ if (pasteLoading) return;
3496
3497
  const tokens = Array.from(new Set(pasteText.split(/[\n,]/).map((t) => t.trim()).filter(Boolean)));
3497
3498
  if (!tokens.length) return;
3498
3499
  setPasteLoading(true);
@@ -3575,7 +3576,8 @@ function MultiSelectPanel({
3575
3576
  rows: 4,
3576
3577
  placeholder: field.pastePlaceholder || field.placeholder || "Paste names, one per line or comma-separated",
3577
3578
  value: pasteText,
3578
- disabled: pasteLoading,
3579
+ readOnly: pasteLoading,
3580
+ "aria-busy": pasteLoading || void 0,
3579
3581
  onChange: (e) => setPasteText(e.target.value),
3580
3582
  onKeyDown: (e) => {
3581
3583
  if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
@@ -3786,6 +3788,16 @@ function RangePanel({
3786
3788
  setDraft(next);
3787
3789
  publish();
3788
3790
  };
3791
+ const doneClick = (e) => {
3792
+ if (doneDisabled) {
3793
+ e.preventDefault();
3794
+ return;
3795
+ }
3796
+ onClose();
3797
+ };
3798
+ const doneKeyDown = (e) => {
3799
+ if (doneDisabled && (e.key === "Enter" || e.key === " ")) e.preventDefault();
3800
+ };
3789
3801
  return /* @__PURE__ */ jsx45(
3790
3802
  Popover,
3791
3803
  {
@@ -3796,7 +3808,7 @@ function RangePanel({
3796
3808
  offset: 6,
3797
3809
  width: PANEL_WIDTH.range,
3798
3810
  label: field.label,
3799
- footer: /* @__PURE__ */ jsx45(Button, { size: "sm", variant: "secondary", onClick: onClose, disabled: doneDisabled, children: "Done" }),
3811
+ footer: /* @__PURE__ */ jsx45(Button, { size: "sm", variant: "secondary", "aria-disabled": doneDisabled, onClick: doneClick, onKeyDown: doneKeyDown, children: "Done" }),
3800
3812
  children: /* @__PURE__ */ jsxs39("span", { className: "fd-stack fd-gap-sm", children: [
3801
3813
  /* @__PURE__ */ jsx45("span", { ref: minWrapRef, children: /* @__PURE__ */ jsx45(
3802
3814
  NumberInput,
@@ -3918,6 +3930,9 @@ function DatePanel({
3918
3930
  }
3919
3931
  onClose();
3920
3932
  };
3933
+ const doneKeyDown = (e) => {
3934
+ if (doneDisabled && (e.key === "Enter" || e.key === " ")) e.preventDefault();
3935
+ };
3921
3936
  return /* @__PURE__ */ jsx45(
3922
3937
  Popover,
3923
3938
  {
@@ -3928,7 +3943,7 @@ function DatePanel({
3928
3943
  offset: 6,
3929
3944
  width: PANEL_WIDTH.date,
3930
3945
  label: field.label,
3931
- footer: /* @__PURE__ */ jsx45(Button, { size: "sm", variant: "secondary", onClick: confirm, disabled: doneDisabled, children: "Done" }),
3946
+ footer: /* @__PURE__ */ jsx45(Button, { size: "sm", variant: "secondary", "aria-disabled": doneDisabled, onClick: confirm, onKeyDown: doneKeyDown, children: "Done" }),
3932
3947
  children: /* @__PURE__ */ jsxs39("span", { className: "fd-stack fd-gap-sm", children: [
3933
3948
  /* @__PURE__ */ jsx45(
3934
3949
  SegmentedControl,