@edifice.io/react 2.2.11-develop-enabling.20250707100621 → 2.2.11-develop-pedago.20250707105307

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.
Files changed (42) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/Dropdown/Dropdown.d.ts +10 -4
  3. package/dist/components/Dropdown/Dropdown.js +24 -8
  4. package/dist/components/Layout/Layout.d.ts +3 -1
  5. package/dist/components/Layout/Layout.js +3 -1
  6. package/dist/components/SearchBar/SearchBar.d.ts +9 -33
  7. package/dist/components/SearchBar/SearchBar.js +4 -30
  8. package/dist/components/Tabs/components/Tabs.d.ts +11 -3
  9. package/dist/components/Tabs/components/Tabs.js +4 -2
  10. package/dist/components/Tabs/components/TabsList.d.ts +7 -1
  11. package/dist/components/Tabs/components/TabsList.js +5 -2
  12. package/dist/components/Tabs/components/TabsPanel.d.ts +5 -1
  13. package/dist/components/Tabs/components/TabsPanel.js +7 -3
  14. package/dist/hooks/useDropdown/useDropdown.d.ts +2 -0
  15. package/dist/hooks/useDropdown/useDropdown.js +2 -0
  16. package/dist/hooks/useLibraryUrl/useLibraryUrl.d.ts +1 -1
  17. package/dist/hooks/useLibraryUrl/useLibraryUrl.js +2 -2
  18. package/dist/icons.js +190 -198
  19. package/dist/index.js +12 -10
  20. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +1 -1
  21. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +1 -1
  22. package/dist/modules/icons/components/apps/IconNabook.js +4 -3
  23. package/dist/modules/icons/components/index.d.ts +0 -4
  24. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +4 -7
  25. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +12 -25
  26. package/dist/modules/modals/OnboardingModal/index.d.ts +0 -1
  27. package/dist/modules/modals/OnboardingModal/useOnboardingModal.d.ts +1 -1
  28. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +2 -2
  29. package/dist/modules/multimedia/FileCard/FileCard.d.ts +1 -1
  30. package/dist/modules/multimedia/FileCard/FileCard.js +5 -2
  31. package/dist/modules/multimedia/index.d.ts +1 -0
  32. package/dist/multimedia.js +12 -10
  33. package/package.json +6 -6
  34. package/dist/modules/icons/components/IconLibrary.d.ts +0 -7
  35. package/dist/modules/icons/components/IconLibrary.js +0 -12
  36. package/dist/modules/icons/components/IconNotification.d.ts +0 -7
  37. package/dist/modules/icons/components/IconNotification.js +0 -12
  38. package/dist/modules/icons/components/IconStar.d.ts +0 -7
  39. package/dist/modules/icons/components/IconStar.js +0 -13
  40. package/dist/modules/icons/components/IconStarFavorite.d.ts +0 -7
  41. package/dist/modules/icons/components/IconStarFull.d.ts +0 -7
  42. package/dist/modules/icons/components/IconStarFull.js +0 -13
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { LoadingIcon, LoadingPosition } from '../Loading';
3
3
  export type ButtonRef = HTMLButtonElement;
4
4
  export type ButtonTypes = 'button' | 'submit' | 'reset';
5
- export type ButtonColors = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'black';
5
+ export type ButtonColors = 'primary' | 'secondary' | 'tertiary' | 'danger';
6
6
  export type ButtonVariants = 'filled' | 'outline' | 'ghost';
7
7
  export type ButtonSizes = 'sm' | 'md' | 'lg';
8
8
  export interface ButtonProps extends React.ComponentPropsWithRef<'button'> {
@@ -1,6 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Placement } from '@floating-ui/react';
3
3
  import { default as DropdownCheckboxItem } from './DropdownCheckboxItem';
4
+ export interface DropdownApi {
5
+ visible: boolean;
6
+ isFocused: string | null;
7
+ menuRef: React.MutableRefObject<HTMLUListElement | null>;
8
+ triggerRef: React.MutableRefObject<HTMLButtonElement | null>;
9
+ setVisible: (visible: boolean) => void;
10
+ openDropdown: () => void;
11
+ closeDropdown: () => void;
12
+ }
4
13
  export interface DropdownProps {
5
14
  /** Children Props */
6
15
  children: ReactNode | ((...props: any) => ReactNode);
@@ -68,10 +77,7 @@ export type DropdownMenuOptions = {
68
77
  */
69
78
  type: 'divider';
70
79
  };
71
- declare const Dropdown: {
72
- ({ children, block, overflow, noWrap, placement, extraTriggerKeyDownHandler, onToggle, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
73
- displayName: string;
74
- } & {
80
+ declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<DropdownApi>> & {
75
81
  Trigger: import('react').ForwardRefExoticComponent<Omit<import('./DropdownTrigger').DropdownTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
76
82
  Menu: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
77
83
  Item: {
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useMemo, useEffect } from "react";
2
+ import { forwardRef, useImperativeHandle, useMemo, useEffect } from "react";
3
3
  import clsx from "clsx";
4
4
  import useDropdown from "../../hooks/useDropdown/useDropdown.js";
5
5
  import DropdownCheckboxItem from "./DropdownCheckboxItem.js";
@@ -11,7 +11,7 @@ import DropdownRadioItem from "./DropdownRadioItem.js";
11
11
  import DropdownSeparator from "./DropdownSeparator.js";
12
12
  import DropdownTrigger from "./DropdownTrigger.js";
13
13
  import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
14
- const Root = ({
14
+ const Root = /* @__PURE__ */ forwardRef(({
15
15
  children,
16
16
  block,
17
17
  overflow = !0,
@@ -23,7 +23,7 @@ const Root = ({
23
23
  focusOnVisible = !0,
24
24
  openOnSpace = !0,
25
25
  focusOnMouseEnter = !0
26
- }) => {
26
+ }, refDropdown) => {
27
27
  const {
28
28
  visible,
29
29
  isFocused,
@@ -31,8 +31,22 @@ const Root = ({
31
31
  menuProps,
32
32
  itemProps,
33
33
  itemRefs,
34
- setVisible
35
- } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter), ref = useClickOutside(() => {
34
+ setVisible,
35
+ menuRef,
36
+ triggerRef,
37
+ closeDropdown,
38
+ openDropdown
39
+ } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered, focusOnVisible, openOnSpace, focusOnMouseEnter);
40
+ useImperativeHandle(refDropdown, () => ({
41
+ visible,
42
+ setVisible,
43
+ isFocused,
44
+ menuRef,
45
+ triggerRef,
46
+ closeDropdown,
47
+ openDropdown
48
+ }));
49
+ const ref = useClickOutside(() => {
36
50
  setVisible(!1);
37
51
  }), value = useMemo(() => ({
38
52
  visible,
@@ -42,8 +56,10 @@ const Root = ({
42
56
  itemProps,
43
57
  itemRefs,
44
58
  block,
45
- setVisible
46
- }), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible]), dropdown = clsx("dropdown", {
59
+ setVisible,
60
+ openDropdown,
61
+ closeDropdown
62
+ }), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible, openDropdown, closeDropdown]), dropdown = clsx("dropdown", {
47
63
  "w-100": block,
48
64
  "dropdown-nowrap": noWrap,
49
65
  overflow
@@ -51,7 +67,7 @@ const Root = ({
51
67
  return useEffect(() => {
52
68
  onToggle == null || onToggle(visible);
53
69
  }, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
54
- }, Dropdown = /* @__PURE__ */ Object.assign(Root, {
70
+ }), Dropdown = /* @__PURE__ */ Object.assign(Root, {
55
71
  Trigger: DropdownTrigger,
56
72
  Menu: DropdownMenu,
57
73
  Item: DropdownItem,
@@ -4,9 +4,11 @@ export interface LayoutProps extends ComponentPropsWithoutRef<any> {
4
4
  children: ReactNode;
5
5
  /** Full screen mode without header component */
6
6
  headless?: boolean;
7
+ /** Control white background - defaults to true */
8
+ whiteBg?: boolean;
7
9
  }
8
10
  export declare const Layout: {
9
- ({ children, headless, ...restProps }: LayoutProps): import("react/jsx-runtime").JSX.Element;
11
+ ({ children, headless, whiteBg, ...restProps }: LayoutProps): import("react/jsx-runtime").JSX.Element;
10
12
  displayName: string;
11
13
  };
12
14
  export default Layout;
@@ -12,6 +12,7 @@ import Button from "../Button/Button.js";
12
12
  const Layout = ({
13
13
  children,
14
14
  headless = !1,
15
+ whiteBg = !0,
15
16
  ...restProps
16
17
  }) => {
17
18
  const {
@@ -24,7 +25,8 @@ const Layout = ({
24
25
  handleCloseCookiesConsent
25
26
  } = useCookiesConsent();
26
27
  useZendeskGuide(), useCantoo();
27
- const classes = clsx("d-flex flex-column bg-white", {
28
+ const classes = clsx("d-flex flex-column", {
29
+ "bg-white": whiteBg,
28
30
  "container-fluid": !headless,
29
31
  "rounded-4 border": (theme == null ? void 0 : theme.is1d) && !headless,
30
32
  "mt-24": (theme == null ? void 0 : theme.is1d) && !headless
@@ -1,19 +1,16 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { Size } from '../../types';
3
- /**
4
- * Base props shared by both SearchBar variants
5
- */
6
3
  export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
7
4
  /**
8
- * String or template literal key for i18next translation
5
+ * String or Template literal with React i18next namespace
9
6
  */
10
7
  placeholder?: string;
11
8
  /**
12
- * Control SearchBar size (excluding 'sm')
9
+ * Control SearchBar size
13
10
  */
14
11
  size?: Exclude<Size, 'sm'>;
15
12
  /**
16
- * Disable the input
13
+ * Disabled status
17
14
  */
18
15
  disabled?: boolean;
19
16
  /**
@@ -22,58 +19,37 @@ export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>,
22
19
  buttonDisabled?: boolean;
23
20
  /**
24
21
  * Optional class for styling purpose
25
- * Optional class for custom styling
26
22
  */
27
23
  className?: string;
28
24
  /**
29
- * onChange handler for input changes
25
+ * ChangeEvent Handler
30
26
  */
31
27
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
32
- /**
33
- * Current value of the input
34
- */
35
- value?: string;
36
- /**
37
- * Show a clear (reset) button when value is present
38
- */
39
- clearable?: boolean;
40
28
  }
41
- /**
42
- * Default SearchBar with a submit button
43
- */
44
29
  type DefaultSearchBar = {
45
30
  /**
46
- * Use false to render the default SearchBar (with a button)
31
+ * Switch between button or dynamic search bar
47
32
  */
48
33
  isVariant: false;
49
34
  /**
50
- * Callback when clicking the search button
35
+ * Handle Search with Default SearchBar
51
36
  */
52
37
  onClick: () => void;
53
38
  };
54
- /**
55
- * Dynamic SearchBar with icon and no submit button
56
- */
57
39
  type DynamicSearchBar = {
58
40
  /**
59
- * Use true to render the dynamic SearchBar (with an icon inside input)
41
+ * Switch between button or dynamic search bar
60
42
  */
61
43
  isVariant: true;
62
44
  /**
63
- * onClick must be undefined for dynamic variant
45
+ * Handle Search with Default SearchBar
64
46
  */
65
47
  onClick?: undefined;
66
48
  };
67
- /**
68
- * Props for the SearchBar component
69
- */
70
49
  export type Props = DefaultSearchBar | DynamicSearchBar;
71
50
  export type SearchBarProps = BaseProps & Props;
72
- /**
73
- * SearchBar component to handle dynamic or static search input
74
- */
75
51
  declare const SearchBar: {
76
- ({ isVariant, size, placeholder, className, disabled, buttonDisabled, onChange, onClick, value, clearable, ...restProps }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
52
+ ({ isVariant, size, placeholder, className, disabled, buttonDisabled, onChange, onClick, ...restProps }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
77
53
  displayName: string;
78
54
  };
79
55
  export default SearchBar;
@@ -1,7 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { useTranslation } from "react-i18next";
4
- import SvgIconClose from "../../modules/icons/components/IconClose.js";
5
4
  import SvgIconSearch from "../../modules/icons/components/IconSearch.js";
6
5
  import FormControl from "../Form/FormControl.js";
7
6
  import SearchButton from "../Button/SearchButton.js";
@@ -14,8 +13,6 @@ const SearchBar = ({
14
13
  buttonDisabled,
15
14
  onChange,
16
15
  onClick,
17
- value,
18
- clearable = !1,
19
16
  ...restProps
20
17
  }) => {
21
18
  const {
@@ -25,38 +22,15 @@ const SearchBar = ({
25
22
  "position-relative": isVariant
26
23
  }), input = clsx({
27
24
  "border-end-0": !isVariant,
28
- "ps-48": isVariant,
29
- "searchbar-hide-native-clear": isVariant && clearable
25
+ "ps-48": isVariant
30
26
  }), handleClick = () => {
31
27
  onClick == null || onClick();
32
- }, handleClear = () => {
33
- const event = {
34
- target: {
35
- value: ""
36
- }
37
- };
38
- onChange == null || onChange(event);
28
+ }, handleKeyDown = (e) => {
29
+ e.key === "Enter" && (e.preventDefault(), handleClick());
39
30
  };
40
31
  return /* @__PURE__ */ jsxs(FormControl, { id: "search-bar", className: searchbar, children: [
41
32
  isVariant && /* @__PURE__ */ jsx("div", { className: "position-absolute z-1 top-50 start-0 translate-middle-y border-0 ps-12 bg-transparent", children: /* @__PURE__ */ jsx(SvgIconSearch, {}) }),
42
- /* @__PURE__ */ jsx(
43
- FormControl.Input,
44
- {
45
- type: "search",
46
- placeholder: t(placeholder),
47
- size,
48
- noValidationIcon: !0,
49
- className: input,
50
- onChange,
51
- value,
52
- disabled,
53
- ...restProps
54
- }
55
- ),
56
- isVariant && clearable && value && onChange && /* @__PURE__ */ jsx("button", { type: "button", onClick: handleClear, className: "position-absolute end-0 top-50 translate-middle-y pe-12 bg-transparent border-0", "aria-label": t("clear"), children: /* @__PURE__ */ jsx(SvgIconClose, { className: "color-gray", style: {
57
- width: 12,
58
- height: 12
59
- } }) }),
33
+ /* @__PURE__ */ jsx(FormControl.Input, { type: "search", placeholder: t(placeholder), size, noValidationIcon: !0, className: input, onChange, disabled, onKeyDown: handleKeyDown, ...restProps }),
60
34
  !isVariant && /* @__PURE__ */ jsx(SearchButton, { type: "submit", "aria-label": t("search"), icon: /* @__PURE__ */ jsx(SvgIconSearch, {}), className: "border-start-0", onClick: handleClick, disabled: buttonDisabled })
61
35
  ] });
62
36
  };
@@ -17,12 +17,20 @@ export interface TabsProps {
17
17
  * Children Props
18
18
  */
19
19
  children?: (...props: any) => ReactNode;
20
+ /**
21
+ * Whether tabs should take full available width
22
+ */
23
+ fullWidth?: boolean;
24
+ /**
25
+ * Whether tabs should take full available height
26
+ */
27
+ fullHeight?: boolean;
20
28
  }
21
29
  /**
22
30
  * Tab Content displayed one at a time when a Tab Item is selected
23
31
  */
24
32
  export declare const Tabs: {
25
- ({ defaultId, items, onChange, children }: TabsProps): import("react/jsx-runtime").JSX.Element;
33
+ ({ defaultId, items, fullWidth, fullHeight, onChange, children, }: TabsProps): import("react/jsx-runtime").JSX.Element;
26
34
  Item: {
27
35
  ({ icon, badge, label, id, order, }: TabsItemProps & {
28
36
  order: number;
@@ -30,11 +38,11 @@ export declare const Tabs: {
30
38
  displayName: string;
31
39
  };
32
40
  Panel: {
33
- ({ children, currentItem }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
41
+ ({ children, currentItem, fullHeight }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
34
42
  displayName: string;
35
43
  };
36
44
  List: {
37
- (props: import('react').ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
45
+ (props: import('./TabsList').TabsListProps): import("react/jsx-runtime").JSX.Element;
38
46
  displayName: string;
39
47
  };
40
48
  displayName: string;
@@ -8,6 +8,8 @@ import TabsPanel from "./TabsPanel.js";
8
8
  const Tabs = ({
9
9
  defaultId,
10
10
  items,
11
+ fullWidth = !1,
12
+ fullHeight = !1,
11
13
  onChange,
12
14
  children
13
15
  }) => {
@@ -32,8 +34,8 @@ const Tabs = ({
32
34
  onKeyDown
33
35
  }), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab);
34
36
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: typeof children == "function" ? children(currentItem) : /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsx(Tabs.List, {}),
36
- /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, children: currentItem == null ? void 0 : currentItem.content })
37
+ /* @__PURE__ */ jsx(Tabs.List, { fullWidth }),
38
+ /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, fullHeight, children: currentItem == null ? void 0 : currentItem.content })
37
39
  ] }) });
38
40
  };
39
41
  Tabs.Item = TabsItem;
@@ -1,6 +1,12 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
+ export interface TabsListProps extends ComponentPropsWithoutRef<'div'> {
3
+ /**
4
+ * Whether tabs should take full available width
5
+ */
6
+ fullWidth?: boolean;
7
+ }
2
8
  declare const TabsList: {
3
- (props: ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
9
+ (props: TabsListProps): import("react/jsx-runtime").JSX.Element;
4
10
  displayName: string;
5
11
  };
6
12
  export default TabsList;
@@ -9,10 +9,13 @@ const TabsList = (props) => {
9
9
  tabUnderlineWidth
10
10
  } = useTabsContext(), {
11
11
  className,
12
+ fullWidth,
12
13
  ...restProps
13
- } = props, tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
14
+ } = props, ulClasses = clsx("nav nav-tabs flex-nowrap", {
15
+ "w-100": fullWidth
16
+ }), tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
14
17
  return /* @__PURE__ */ jsxs("div", { className: tabslist, ...restProps, children: [
15
- /* @__PURE__ */ jsx("ul", { className: "nav nav-tabs flex-nowrap", role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
18
+ /* @__PURE__ */ jsx("ul", { className: ulClasses, role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
16
19
  /* @__PURE__ */ jsx("span", { className: "nav-slide", style: {
17
20
  left: tabUnderlineLeft,
18
21
  width: tabUnderlineWidth
@@ -9,9 +9,13 @@ export interface TabsPanelProps {
9
9
  * Current Item
10
10
  */
11
11
  currentItem: TabsItemProps | undefined;
12
+ /**
13
+ * Whether tabs should take full available height
14
+ */
15
+ fullHeight?: boolean;
12
16
  }
13
17
  declare const TabsPanel: {
14
- ({ children, currentItem }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
18
+ ({ children, currentItem, fullHeight }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
15
19
  displayName: string;
16
20
  };
17
21
  export default TabsPanel;
@@ -1,13 +1,17 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useTabsContext } from "../context/TabsContext.js";
3
+ import clsx from "clsx";
3
4
  const TabsPanel = ({
4
5
  children,
5
- currentItem
6
+ currentItem,
7
+ fullHeight
6
8
  }) => {
7
9
  const {
8
10
  activeTab
9
- } = useTabsContext();
10
- return /* @__PURE__ */ jsx("div", { className: "tab-content d-flex flex-fill w-100", children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
11
+ } = useTabsContext(), contentClasses = clsx("tab-content d-flex flex-fill w-100", {
12
+ "position-relative h-100": fullHeight
13
+ });
14
+ return /* @__PURE__ */ jsx("div", { className: contentClasses, children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
11
15
  };
12
16
  export {
13
17
  TabsPanel as default
@@ -28,6 +28,8 @@ export interface UseDropdownProps {
28
28
  itemProps: Record<string, any>;
29
29
  setVisible: Dispatch<SetStateAction<boolean>>;
30
30
  openOnSpace?: boolean;
31
+ openDropdown: () => void;
32
+ closeDropdown: () => void;
31
33
  }
32
34
  declare const useDropdown: (placement: Placement | undefined, extraTriggerKeyDownHandler?: (event: React.KeyboardEvent<HTMLButtonElement>) => void, isTriggerHovered?: boolean, focusOnVisible?: boolean, openOnSpace?: boolean, focusOnMouseEnter?: boolean) => UseDropdownProps;
33
35
  export default useDropdown;
@@ -159,6 +159,8 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
159
159
  onMenuItemClick: closeDropdown,
160
160
  onMenuItemKeyDown
161
161
  },
162
+ openDropdown,
163
+ closeDropdown,
162
164
  setVisible
163
165
  };
164
166
  };
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @returns the Library URL as a string. Returns null if no library was found in user apps.
5
5
  */
6
- declare const useLibraryUrl: (appCodeName?: string) => string | null;
6
+ declare const useLibraryUrl: () => string | null;
7
7
  export default useLibraryUrl;
@@ -1,11 +1,11 @@
1
1
  import { libraryMaps } from "@edifice.io/utilities";
2
2
  import { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
3
- const useLibraryUrl = (appCodeName) => {
3
+ const useLibraryUrl = () => {
4
4
  var _a;
5
5
  const {
6
6
  user,
7
7
  appCode
8
- } = useEdificeClient(), appName = libraryMaps[appCodeName ?? appCode], libraryApp = user == null ? void 0 : user.apps.find((app) => app.isExternal && app.address.includes("library"));
8
+ } = useEdificeClient(), appName = libraryMaps[appCode], libraryApp = user == null ? void 0 : user.apps.find((app) => app.isExternal && app.address.includes("library"));
9
9
  if (!libraryApp)
10
10
  return null;
11
11
  const libraryUrlSplit = (_a = libraryApp.address) == null ? void 0 : _a.split("?");