@noya-app/noya-designsystem 0.1.84 → 0.1.86

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.mjs CHANGED
@@ -18871,28 +18871,32 @@ function ToastContent3({ toast }) {
18871
18871
  index_parts_exports3.Root,
18872
18872
  {
18873
18873
  toast,
18874
- className: "n-px-2 n-py-2.5 n-grid n-grid-cols-[auto_max-content] n-gap-x-2.5 n-items-center n-rounded n-text-sm n-bg-popover-background n-shadow-popover n-text-text-muted"
18874
+ className: "n-relative n-flex n-items-start n-gap-2 n-rounded n-text-sm n-bg-popover-background n-shadow-popover n-text-text-muted n-px-3 n-py-2.5 n-pr-10"
18875
18875
  },
18876
- toast.data?.title && /* @__PURE__ */ React123.createElement(
18876
+ /* @__PURE__ */ React123.createElement("div", { className: "n-flex n-flex-col n-gap-0.5 n-min-w-0" }, toast.data?.title && /* @__PURE__ */ React123.createElement(
18877
18877
  index_parts_exports3.Title,
18878
18878
  {
18879
- className: `n-mb-[5px] ${textStyles.label} n-font-bold n-text-text`
18879
+ className: `${textStyles.label} n-font-bold n-text-text`
18880
18880
  },
18881
18881
  toast.data.title
18882
- ),
18883
- /* @__PURE__ */ React123.createElement(
18882
+ ), /* @__PURE__ */ React123.createElement(
18884
18883
  index_parts_exports3.Description,
18885
18884
  {
18886
18885
  className: `${textStyles.small} n-text-text-muted`
18887
18886
  },
18888
18887
  toast.data?.content
18889
- ),
18890
- toast.data?.action && /* @__PURE__ */ React123.createElement(index_parts_exports3.Action, { render: /* @__PURE__ */ React123.createElement("span", null) }, toast.data.action),
18888
+ ), toast.data?.action && /* @__PURE__ */ React123.createElement(index_parts_exports3.Action, { render: /* @__PURE__ */ React123.createElement("span", { className: "n-mt-1" }) }, toast.data.action)),
18891
18889
  /* @__PURE__ */ React123.createElement(
18892
18890
  index_parts_exports3.Close,
18893
18891
  {
18894
18892
  "aria-label": "Close",
18895
- render: /* @__PURE__ */ React123.createElement(IconButton, { iconName: "Cross1Icon" })
18893
+ render: /* @__PURE__ */ React123.createElement(
18894
+ IconButton,
18895
+ {
18896
+ className: "!n-absolute n-top-2 n-right-2",
18897
+ iconName: "Cross1Icon"
18898
+ }
18899
+ )
18896
18900
  }
18897
18901
  )
18898
18902
  );
@@ -21353,6 +21357,7 @@ function Popover({
21353
21357
  className,
21354
21358
  portalContainer,
21355
21359
  style: style2,
21360
+ initialFocus,
21356
21361
  shouldCloseOnInteractOutside
21357
21362
  }) {
21358
21363
  const defaultId = useId2();
@@ -21410,6 +21415,7 @@ function Popover({
21410
21415
  index_parts_exports5.Popup,
21411
21416
  {
21412
21417
  ref: popupRef,
21418
+ initialFocus,
21413
21419
  style: style2,
21414
21420
  className: cx(
21415
21421
  popoverStyle.base,
@@ -21824,6 +21830,7 @@ function InputFieldRoot({
21824
21830
  {
21825
21831
  open: true,
21826
21832
  trigger: rootElement,
21833
+ initialFocus: false,
21827
21834
  sideOffset,
21828
21835
  showArrow: false
21829
21836
  },
@@ -41762,7 +41769,8 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
41762
41769
  rightTabItems,
41763
41770
  rightTabValue,
41764
41771
  onChangeRightTab,
41765
- onChangeLeftTab
41772
+ onChangeLeftTab,
41773
+ compactDrawerMenu
41766
41774
  }) {
41767
41775
  const [{ leftSidebarCollapsed, rightSidebarCollapsed }, setLayoutState] = useState76({
41768
41776
  leftSidebarCollapsed: true,
@@ -41806,6 +41814,7 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
41806
41814
  [allTabItems]
41807
41815
  );
41808
41816
  const hasTabs = allSelectableTabItems.length > 0;
41817
+ const compactTabItem = compactDrawerMenu && allSelectableTabItems.length === 1 ? allSelectableTabItems[0] : void 0;
41809
41818
  const leftSelectableTabItems = useMemo151(
41810
41819
  () => (leftTabItems ?? []).filter(isSelectableMenuItem),
41811
41820
  [leftTabItems]
@@ -41859,7 +41868,7 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
41859
41868
  id: EDITOR_PANEL_GROUP_ID,
41860
41869
  className: "n-flex n-flex-col n-flex-1 n-relative focus:n-outline-none"
41861
41870
  },
41862
- hasTabs && /* @__PURE__ */ React311.createElement(React311.Fragment, null, /* @__PURE__ */ React311.createElement(
41871
+ hasTabs && !compactTabItem && /* @__PURE__ */ React311.createElement(React311.Fragment, null, /* @__PURE__ */ React311.createElement(
41863
41872
  "div",
41864
41873
  {
41865
41874
  className: "n-flex n-flex-row n-items-center n-gap-1 n-px-2 n-py-1.5 n-bg-sidebar-background n-flex-none",
@@ -41876,6 +41885,22 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
41876
41885
  }
41877
41886
  )
41878
41887
  ), /* @__PURE__ */ React311.createElement(Divider, null)),
41888
+ compactTabItem && /* @__PURE__ */ React311.createElement("div", { className: "n-absolute n-top-0 n-left-0 n-h-[calc(var(--n-toolbar-height)+1px)] n-w-[calc(var(--n-toolbar-height)+1px)] n-bg-sidebar-background n-border-r n-border-b n-border-divider-strong n-z-10 n-flex n-items-center n-justify-center" }, /* @__PURE__ */ React311.createElement(
41889
+ Button,
41890
+ {
41891
+ "aria-label": typeof compactTabItem.title === "string" ? compactTabItem.title : "Toggle sidebar",
41892
+ variant: "none",
41893
+ className: "n-rounded",
41894
+ style: {
41895
+ width: "var(--n-input-height)",
41896
+ height: "var(--n-input-height)"
41897
+ },
41898
+ icon: compactTabItem.icon,
41899
+ tooltip: compactTabItem.tooltip ?? compactTabItem.title,
41900
+ active: activeTabValue === compactTabItem.value,
41901
+ onClick: () => handleSelectTab(compactTabItem.value)
41902
+ }
41903
+ )),
41879
41904
  /* @__PURE__ */ React311.createElement("div", { className: "n-flex-1 n-flex n-flex-col n-relative n-min-h-0" }, isDrawerOpen && /* @__PURE__ */ React311.createElement("div", { className: "n-absolute n-inset-0 n-z-20 n-flex n-flex-col" }, /* @__PURE__ */ React311.createElement("div", { className: "n-flex-none n-max-h-[50vh] n-overflow-auto n-bg-sidebar-background n-border-b n-border-divider-strong n-shadow-lg" }, activeDrawerPanel), /* @__PURE__ */ React311.createElement(
41880
41905
  "div",
41881
41906
  {
@@ -42670,6 +42695,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
42670
42695
  sideType = "auto",
42671
42696
  sideTypeBreakpoint = 800,
42672
42697
  detectSize = "container",
42698
+ compactDrawerMenu,
42673
42699
  leftOptions: {
42674
42700
  visible: leftVisible = true,
42675
42701
  minSize: leftMinSize = 200,
@@ -42900,6 +42926,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
42900
42926
  autoSavePrefix,
42901
42927
  leftSidebarRef,
42902
42928
  rightSidebarRef,
42929
+ compactDrawerMenu,
42903
42930
  onLeftSidebarStateChange,
42904
42931
  onRightSidebarStateChange,
42905
42932
  shouldAutoSave