@octaviaflow/core 3.1.0-beta.97 → 3.1.0-beta.99

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
@@ -6254,6 +6254,7 @@ var ConditionBuilder = forwardRef29(function ConditionBuilder2({
6254
6254
  ConditionBuilder.displayName = "ConditionBuilder";
6255
6255
 
6256
6256
  // src/components/OrgSwitcher/OrgSwitcher.tsx
6257
+ import { CheckmarkIcon as CheckmarkIcon3, ChevronDownIcon as ChevronDownIcon2, SearchIcon as SearchIcon5 } from "@octaviaflow/icons";
6257
6258
  import {
6258
6259
  useEffect as useEffect10,
6259
6260
  useId as useId13,
@@ -6261,8 +6262,6 @@ import {
6261
6262
  useRef as useRef12,
6262
6263
  useState as useState18
6263
6264
  } from "react";
6264
- import { CheckmarkIcon as CheckmarkIcon3, ChevronDownIcon as ChevronDownIcon2, SearchIcon as SearchIcon5 } from "@octaviaflow/icons";
6265
- import styles from "./OrgSwitcher.module.scss";
6266
6265
  import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs35 } from "react/jsx-runtime";
6267
6266
  var initialsFrom = (name) => name.split(/\s+/).filter(Boolean).map((w) => w[0]).join("").slice(0, 2).toUpperCase();
6268
6267
  function OrgRow({
@@ -6283,8 +6282,8 @@ function OrgRow({
6283
6282
  disabled: disabled || isCurrent,
6284
6283
  onClick: onSelect,
6285
6284
  className: cn(
6286
- styles["ods-org-switcher__row"],
6287
- isCurrent && styles["ods-org-switcher__row--current"]
6285
+ "ods-org-switcher__row",
6286
+ isCurrent && "ods-org-switcher__row--current"
6288
6287
  ),
6289
6288
  children: [
6290
6289
  /* @__PURE__ */ jsx35(
@@ -6296,12 +6295,12 @@ function OrgRow({
6296
6295
  alt: org.name
6297
6296
  }
6298
6297
  ),
6299
- /* @__PURE__ */ jsxs35("span", { className: styles["ods-org-switcher__row-text"], children: [
6300
- /* @__PURE__ */ jsx35("span", { className: styles["ods-org-switcher__row-name"], children: org.name }),
6301
- meta2 && /* @__PURE__ */ jsx35("span", { className: styles["ods-org-switcher__row-meta"], children: meta2 })
6298
+ /* @__PURE__ */ jsxs35("span", { className: "ods-org-switcher__row-text", children: [
6299
+ /* @__PURE__ */ jsx35("span", { className: "ods-org-switcher__row-name", children: org.name }),
6300
+ meta2 && /* @__PURE__ */ jsx35("span", { className: "ods-org-switcher__row-meta", children: meta2 })
6302
6301
  ] }),
6303
6302
  isSwitching && /* @__PURE__ */ jsx35(Spinner, { size: "sm", label: `Switching to ${org.name}` }),
6304
- isCurrent && !isSwitching && /* @__PURE__ */ jsx35(CheckmarkIcon3, { size: "sm", "aria-hidden": "true", className: styles["ods-org-switcher__tick"] })
6303
+ isCurrent && !isSwitching && /* @__PURE__ */ jsx35(CheckmarkIcon3, { size: "sm", "aria-hidden": "true", className: "ods-org-switcher__tick" })
6305
6304
  ]
6306
6305
  }
6307
6306
  );
@@ -6370,12 +6369,12 @@ function OrgSwitcher({
6370
6369
  },
6371
6370
  org.id
6372
6371
  )),
6373
- orgs.length === 0 && /* @__PURE__ */ jsx35("p", { className: styles["ods-org-switcher__empty"], children: "No organizations match." }),
6372
+ orgs.length === 0 && /* @__PURE__ */ jsx35("p", { className: "ods-org-switcher__empty", children: "No organizations match." }),
6374
6373
  onCreate && /* @__PURE__ */ jsx35(
6375
6374
  "button",
6376
6375
  {
6377
6376
  type: "button",
6378
- className: styles["ods-org-switcher__create"],
6377
+ className: "ods-org-switcher__create",
6379
6378
  onClick: () => {
6380
6379
  setOpen(false);
6381
6380
  onCreate();
@@ -6390,9 +6389,9 @@ function OrgSwitcher({
6390
6389
  "div",
6391
6390
  {
6392
6391
  ref: rootRef,
6393
- className: cn(styles["ods-org-switcher"], styles["ods-org-switcher--inline"], className),
6392
+ className: cn("ods-org-switcher", "ods-org-switcher--inline", className),
6394
6393
  ...rest,
6395
- children: /* @__PURE__ */ jsx35("div", { role: "listbox", "aria-label": ariaLabel, className: styles["ods-org-switcher__list"], children: renderRows(organizations) })
6394
+ children: /* @__PURE__ */ jsx35("div", { role: "listbox", "aria-label": ariaLabel, className: "ods-org-switcher__list", children: renderRows(organizations) })
6396
6395
  }
6397
6396
  );
6398
6397
  }
@@ -6401,9 +6400,9 @@ function OrgSwitcher({
6401
6400
  "div",
6402
6401
  {
6403
6402
  ref: rootRef,
6404
- className: cn(styles["ods-org-switcher"], styles["ods-org-switcher--rail"], className),
6403
+ className: cn("ods-org-switcher", "ods-org-switcher--rail", className),
6405
6404
  ...rest,
6406
- children: /* @__PURE__ */ jsx35("div", { role: "listbox", "aria-label": ariaLabel, className: styles["ods-org-switcher__rail"], children: organizations.map((org) => {
6405
+ children: /* @__PURE__ */ jsx35("div", { role: "listbox", "aria-label": ariaLabel, className: "ods-org-switcher__rail", children: organizations.map((org) => {
6407
6406
  const isCurrent = org.id === currentOrgId;
6408
6407
  return /* @__PURE__ */ jsx35(
6409
6408
  "button",
@@ -6416,8 +6415,8 @@ function OrgSwitcher({
6416
6415
  disabled: busy || isCurrent,
6417
6416
  onClick: () => select(org.id),
6418
6417
  className: cn(
6419
- styles["ods-org-switcher__rail-item"],
6420
- isCurrent && styles["ods-org-switcher__rail-item--current"]
6418
+ "ods-org-switcher__rail-item",
6419
+ isCurrent && "ods-org-switcher__rail-item--current"
6421
6420
  ),
6422
6421
  children: switchingOrgId === org.id ? /* @__PURE__ */ jsx35(Spinner, { size: "sm", label: `Switching to ${org.name}` }) : /* @__PURE__ */ jsx35(
6423
6422
  Avatar,
@@ -6439,7 +6438,7 @@ function OrgSwitcher({
6439
6438
  "div",
6440
6439
  {
6441
6440
  ref: rootRef,
6442
- className: cn(styles["ods-org-switcher"], className),
6441
+ className: cn("ods-org-switcher", className),
6443
6442
  ...rest,
6444
6443
  children: [
6445
6444
  /* @__PURE__ */ jsxs35(
@@ -6447,9 +6446,9 @@ function OrgSwitcher({
6447
6446
  {
6448
6447
  type: "button",
6449
6448
  className: cn(
6450
- styles["ods-org-switcher__trigger"],
6451
- size === "sm" && styles["ods-org-switcher__trigger--sm"],
6452
- lead && styles["ods-org-switcher__trigger--lead"]
6449
+ "ods-org-switcher__trigger",
6450
+ size === "sm" && "ods-org-switcher__trigger--sm",
6451
+ lead && "ods-org-switcher__trigger--lead"
6453
6452
  ),
6454
6453
  "aria-label": ariaLabel,
6455
6454
  "aria-haspopup": "listbox",
@@ -6467,23 +6466,23 @@ function OrgSwitcher({
6467
6466
  alt: current?.name ?? "Organization"
6468
6467
  }
6469
6468
  ),
6470
- /* @__PURE__ */ jsx35("span", { className: styles["ods-org-switcher__trigger-name"], children: current?.name ?? "Select organization" }),
6469
+ /* @__PURE__ */ jsx35("span", { className: "ods-org-switcher__trigger-name", children: current?.name ?? "Select organization" }),
6471
6470
  /* @__PURE__ */ jsx35(
6472
6471
  ChevronDownIcon2,
6473
6472
  {
6474
6473
  size: "sm",
6475
6474
  "aria-hidden": "true",
6476
6475
  className: cn(
6477
- styles["ods-org-switcher__chev"],
6478
- open && styles["ods-org-switcher__chev--open"]
6476
+ "ods-org-switcher__chev",
6477
+ open && "ods-org-switcher__chev--open"
6479
6478
  )
6480
6479
  }
6481
6480
  )
6482
6481
  ]
6483
6482
  }
6484
6483
  ),
6485
- open && /* @__PURE__ */ jsxs35("div", { className: styles["ods-org-switcher__panel"], "data-ods-floating": "", children: [
6486
- variant === "search" && /* @__PURE__ */ jsxs35("div", { className: styles["ods-org-switcher__search"], children: [
6484
+ open && /* @__PURE__ */ jsxs35("div", { className: "ods-org-switcher__panel", "data-ods-floating": "", children: [
6485
+ variant === "search" && /* @__PURE__ */ jsxs35("div", { className: "ods-org-switcher__search", children: [
6487
6486
  /* @__PURE__ */ jsx35(SearchIcon5, { size: "sm", "aria-hidden": "true" }),
6488
6487
  /* @__PURE__ */ jsx35(
6489
6488
  "input",
@@ -6494,7 +6493,7 @@ function OrgSwitcher({
6494
6493
  placeholder: "Find an organization",
6495
6494
  "aria-label": "Find an organization",
6496
6495
  onChange: (e) => setQuery(e.target.value),
6497
- className: styles["ods-org-switcher__search-input"]
6496
+ className: "ods-org-switcher__search-input"
6498
6497
  }
6499
6498
  )
6500
6499
  ] }),
@@ -6504,7 +6503,7 @@ function OrgSwitcher({
6504
6503
  id: listboxId,
6505
6504
  role: "listbox",
6506
6505
  "aria-label": ariaLabel,
6507
- className: styles["ods-org-switcher__list"],
6506
+ className: "ods-org-switcher__list",
6508
6507
  children: renderRows(filtered)
6509
6508
  }
6510
6509
  )