@octaviaflow/core 3.1.0-beta.77 → 3.1.0-beta.79

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.cjs CHANGED
@@ -6279,6 +6279,7 @@ var Select = (0, import_react39.forwardRef)(function Select2({
6279
6279
  import_framer_motion8.motion.div,
6280
6280
  {
6281
6281
  ref: dropdownRef,
6282
+ "data-ods-floating": "",
6282
6283
  className: "ods-select__dropdown",
6283
6284
  style: {
6284
6285
  position: "fixed",
@@ -10477,6 +10478,7 @@ function Combobox({
10477
10478
  "div",
10478
10479
  {
10479
10480
  ref: panelRef,
10481
+ "data-ods-floating": "",
10480
10482
  className: "ods-combobox__panel",
10481
10483
  role: "presentation",
10482
10484
  style: {
@@ -11936,7 +11938,11 @@ var DialogContent = (0, import_react70.forwardRef)(function DialogContent2({
11936
11938
  isOpen: open,
11937
11939
  onClose,
11938
11940
  isDismissable: closeOnOverlayClick,
11939
- isKeyboardDismissDisabled: !closeOnEsc
11941
+ isKeyboardDismissDisabled: !closeOnEsc,
11942
+ // Floating layers (Select/Combobox/DropdownMenu/DatePicker dropdowns)
11943
+ // portal to <body>, OUTSIDE the dialog subtree — without this, picking
11944
+ // an option counted as an outside click and closed the dialog.
11945
+ shouldCloseOnInteractOutside: (element) => !(element instanceof Element && element.closest("[data-ods-floating]"))
11940
11946
  },
11941
11947
  overlayRef
11942
11948
  );
@@ -12767,76 +12773,82 @@ var ContextMenu = (0, import_react75.forwardRef)(
12767
12773
  );
12768
12774
  }
12769
12775
  const portalTarget = container ?? document.body;
12770
- const panel = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_framer_motion17.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12771
- import_framer_motion17.motion.div,
12776
+ const panel = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12777
+ import_framer_motion17.AnimatePresence,
12772
12778
  {
12773
- ...rest,
12774
- ref: (el) => {
12775
- panelRef.current = el;
12776
- if (typeof ref === "function") ref(el);
12777
- else if (ref) {
12778
- ref.current = el;
12779
- }
12780
- },
12781
- id: baseId,
12782
- role: "menu",
12783
- "aria-label": ariaLabel,
12784
- tabIndex: -1,
12785
- className: cn("ods-ctxmenu", className),
12786
- style: {
12787
- top: adjustedPosition.y,
12788
- left: adjustedPosition.x
12789
- },
12790
- initial: reducedMotion ? void 0 : { opacity: 0, scale: 0.96 },
12791
- animate: reducedMotion ? void 0 : { opacity: 1, scale: 1 },
12792
- exit: reducedMotion ? void 0 : { opacity: 0, scale: 0.96 },
12793
- transition: { duration: 0.12 },
12794
- onKeyDown: handleKeyDown,
12795
- onContextMenu: (e) => e.preventDefault(),
12796
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { className: "ods-ctxmenu__list", children: items.map((item, i) => {
12797
- if (item.separator) {
12798
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12799
- "li",
12800
- {
12801
- role: "separator",
12802
- className: "ods-ctxmenu__separator"
12803
- },
12804
- `sep-${i}`
12805
- );
12806
- }
12807
- const isActive2 = i === activeIndex;
12808
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
12809
- "li",
12810
- {
12811
- role: "menuitem",
12812
- "aria-disabled": item.disabled || void 0,
12813
- tabIndex: -1,
12814
- className: cn(
12815
- "ods-ctxmenu__item",
12816
- isActive2 && "ods-ctxmenu__item--active",
12817
- item.danger && "ods-ctxmenu__item--danger",
12818
- item.disabled && "ods-ctxmenu__item--disabled"
12819
- ),
12820
- onMouseEnter: () => !item.disabled && setActiveIndex(i),
12821
- onClick: () => handleItemClick(item),
12822
- children: [
12823
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12824
- "span",
12825
- {
12826
- className: "ods-ctxmenu__icon",
12827
- "aria-hidden": "true",
12828
- children: item.icon
12829
- }
12830
- ),
12831
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ods-ctxmenu__label", children: item.label }),
12832
- item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("kbd", { className: "ods-ctxmenu__shortcut", children: item.shortcut })
12833
- ]
12779
+ "data-ods-floating": "",
12780
+ children: open && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12781
+ import_framer_motion17.motion.div,
12782
+ {
12783
+ ...rest,
12784
+ ref: (el) => {
12785
+ panelRef.current = el;
12786
+ if (typeof ref === "function") ref(el);
12787
+ else if (ref) {
12788
+ ref.current = el;
12789
+ }
12834
12790
  },
12835
- `${item.label}-${i}`
12836
- );
12837
- }) })
12791
+ id: baseId,
12792
+ role: "menu",
12793
+ "aria-label": ariaLabel,
12794
+ tabIndex: -1,
12795
+ className: cn("ods-ctxmenu", className),
12796
+ style: {
12797
+ top: adjustedPosition.y,
12798
+ left: adjustedPosition.x
12799
+ },
12800
+ initial: reducedMotion ? void 0 : { opacity: 0, scale: 0.96 },
12801
+ animate: reducedMotion ? void 0 : { opacity: 1, scale: 1 },
12802
+ exit: reducedMotion ? void 0 : { opacity: 0, scale: 0.96 },
12803
+ transition: { duration: 0.12 },
12804
+ onKeyDown: handleKeyDown,
12805
+ onContextMenu: (e) => e.preventDefault(),
12806
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { className: "ods-ctxmenu__list", children: items.map((item, i) => {
12807
+ if (item.separator) {
12808
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12809
+ "li",
12810
+ {
12811
+ role: "separator",
12812
+ className: "ods-ctxmenu__separator"
12813
+ },
12814
+ `sep-${i}`
12815
+ );
12816
+ }
12817
+ const isActive2 = i === activeIndex;
12818
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
12819
+ "li",
12820
+ {
12821
+ role: "menuitem",
12822
+ "aria-disabled": item.disabled || void 0,
12823
+ tabIndex: -1,
12824
+ className: cn(
12825
+ "ods-ctxmenu__item",
12826
+ isActive2 && "ods-ctxmenu__item--active",
12827
+ item.danger && "ods-ctxmenu__item--danger",
12828
+ item.disabled && "ods-ctxmenu__item--disabled"
12829
+ ),
12830
+ onMouseEnter: () => !item.disabled && setActiveIndex(i),
12831
+ onClick: () => handleItemClick(item),
12832
+ children: [
12833
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12834
+ "span",
12835
+ {
12836
+ className: "ods-ctxmenu__icon",
12837
+ "aria-hidden": "true",
12838
+ children: item.icon
12839
+ }
12840
+ ),
12841
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ods-ctxmenu__label", children: item.label }),
12842
+ item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("kbd", { className: "ods-ctxmenu__shortcut", children: item.shortcut })
12843
+ ]
12844
+ },
12845
+ `${item.label}-${i}`
12846
+ );
12847
+ }) })
12848
+ }
12849
+ )
12838
12850
  }
12839
- ) });
12851
+ );
12840
12852
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
12841
12853
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12842
12854
  "span",
@@ -15727,6 +15739,7 @@ var DatePicker = (0, import_react80.forwardRef)(
15727
15739
  "div",
15728
15740
  {
15729
15741
  ref: popoverRef,
15742
+ "data-ods-floating": "",
15730
15743
  className: "ods-datepicker__popover",
15731
15744
  role: "dialog",
15732
15745
  "aria-modal": "false",
@@ -16210,6 +16223,7 @@ function MenuPopup({
16210
16223
  const portalContent = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_framer_motion19.AnimatePresence, { children: state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
16211
16224
  import_framer_motion19.motion.ul,
16212
16225
  {
16226
+ "data-ods-floating": "",
16213
16227
  ...(() => {
16214
16228
  const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safe } = menuProps;
16215
16229
  return safe;
@@ -24798,7 +24812,9 @@ function OnboardingUseCaseStep({
24798
24812
  onContinue,
24799
24813
  onSkip,
24800
24814
  onBack,
24801
- title = "What do you want to automate?"
24815
+ title = "What do you want to automate?",
24816
+ showWorkspaceField = true,
24817
+ submitLabel = "Create workspace"
24802
24818
  }) {
24803
24819
  const [useCases, setUseCases] = (0, import_react118.useState)(defaults?.useCases ?? []);
24804
24820
  const [hearAbout, setHearAbout] = (0, import_react118.useState)(defaults?.hearAbout);
@@ -24817,8 +24833,8 @@ function OnboardingUseCaseStep({
24817
24833
  onContinue({
24818
24834
  useCases,
24819
24835
  hearAbout,
24820
- workspaceName,
24821
- ...companyDomain && linkDomain && { linkedDomain: companyDomain }
24836
+ ...showWorkspaceField && { workspaceName },
24837
+ ...showWorkspaceField && companyDomain && linkDomain && { linkedDomain: companyDomain }
24822
24838
  })
24823
24839
  );
24824
24840
  };
@@ -24844,7 +24860,7 @@ function OnboardingUseCaseStep({
24844
24860
  onChange: setHearAbout
24845
24861
  }
24846
24862
  ),
24847
- orgMatch ?? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "ods-onboarding__workspace", children: [
24863
+ showWorkspaceField && (orgMatch ?? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "ods-onboarding__workspace", children: [
24848
24864
  /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
24849
24865
  Input,
24850
24866
  {
@@ -24871,11 +24887,11 @@ function OnboardingUseCaseStep({
24871
24887
  )
24872
24888
  }
24873
24889
  )
24874
- ] }),
24890
+ ] })),
24875
24891
  /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "ods-onboarding__actions", children: [
24876
24892
  onBack && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "ghost", onClick: onBack, disabled: busy, children: "Back" }),
24877
24893
  onSkip && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "ghost", onClick: onSkip, disabled: busy, children: "Skip for now" }),
24878
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { type: "submit", variant: "primary", loading: busy, children: "Create workspace" })
24894
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { type: "submit", variant: "primary", loading: busy, children: submitLabel })
24879
24895
  ] })
24880
24896
  ] });
24881
24897
  }
@@ -32352,6 +32368,7 @@ var MultiSelect = (0, import_react139.forwardRef)(
32352
32368
  import_framer_motion28.motion.div,
32353
32369
  {
32354
32370
  ref: dropdownRef,
32371
+ "data-ods-floating": "",
32355
32372
  className: "ods-multiselect__dropdown",
32356
32373
  style: {
32357
32374
  position: "fixed",