@edifice.io/react 2.2.8-develop-b2school.20250602164507 → 2.2.8-develop.20250605102441

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 (99) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/Button/Button.js +1 -1
  3. package/dist/components/Button/IconButton.js +1 -1
  4. package/dist/components/Combobox/Combobox.d.ts +5 -60
  5. package/dist/components/Combobox/Combobox.js +7 -18
  6. package/dist/components/Combobox/ComboboxTrigger.d.ts +3 -34
  7. package/dist/components/Combobox/ComboboxTrigger.js +8 -33
  8. package/dist/components/Dropdown/Dropdown.d.ts +2 -10
  9. package/dist/components/Dropdown/Dropdown.js +3 -5
  10. package/dist/components/Dropdown/DropdownItem.d.ts +1 -5
  11. package/dist/components/Dropdown/DropdownItem.js +1 -4
  12. package/dist/components/Dropdown/DropdownTrigger.js +1 -5
  13. package/dist/components/Input/Input.d.ts +0 -4
  14. package/dist/components/Input/Input.js +5 -21
  15. package/dist/components/Layout/components/Header.js +1 -1
  16. package/dist/components/List/List.d.ts +1 -16
  17. package/dist/components/List/List.js +26 -30
  18. package/dist/components/Modal/ModalHeader.js +2 -2
  19. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  20. package/dist/components/SearchBar/SearchBar.js +1 -3
  21. package/dist/components/Tabs/components/Tabs.d.ts +1 -1
  22. package/dist/components/Tabs/components/TabsItem.d.ts +5 -1
  23. package/dist/components/Tabs/components/TabsItem.js +6 -1
  24. package/dist/components/Toolbar/Toolbar.d.ts +0 -4
  25. package/dist/components/Toolbar/Toolbar.js +3 -8
  26. package/dist/components/Tree/components/Tree.js +2 -1
  27. package/dist/components/Tree/hooks/useTree.d.ts +1 -0
  28. package/dist/components/Tree/hooks/useTree.js +25 -2
  29. package/dist/components/Tree/types/index.d.ts +4 -0
  30. package/dist/editor.js +24 -28
  31. package/dist/hooks/index.d.ts +0 -1
  32. package/dist/hooks/useCheckable/useCheckable.js +3 -10
  33. package/dist/hooks/useConversation/useConversation.d.ts +1 -1
  34. package/dist/hooks/useConversation/useConversation.js +17 -13
  35. package/dist/hooks/useDate/useDate.d.ts +0 -1
  36. package/dist/hooks/useDate/useDate.js +27 -33
  37. package/dist/hooks/useDropdown/useDropdown.d.ts +1 -2
  38. package/dist/hooks/useDropdown/useDropdown.js +3 -5
  39. package/dist/hooks/useDropzone/useDropzone.js +1 -1
  40. package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +3 -12
  41. package/dist/icons.js +216 -236
  42. package/dist/index.d.ts +0 -1
  43. package/dist/index.js +20 -50
  44. package/dist/modals.js +14 -16
  45. package/dist/modules/editor/components/Editor/Editor.d.ts +1 -8
  46. package/dist/modules/editor/components/Editor/Editor.js +3 -7
  47. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +1 -1
  48. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +1 -1
  49. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +2 -2
  50. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +2 -2
  51. package/dist/modules/editor/components/NodeView/index.d.ts +1 -2
  52. package/dist/modules/editor/components/Renderer/index.d.ts +1 -2
  53. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +33 -12
  54. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +28 -11
  55. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +2 -6
  56. package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
  57. package/dist/modules/icons/components/index.d.ts +0 -10
  58. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +5 -9
  59. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +4 -5
  60. package/dist/modules/modals/index.d.ts +0 -1
  61. package/dist/modules/multimedia/index.d.ts +0 -1
  62. package/dist/multimedia.js +1 -3
  63. package/package.json +6 -6
  64. package/dist/hooks/useWorkspaceFolders/index.d.ts +0 -3
  65. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +0 -54
  66. package/dist/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.d.ts +0 -13
  67. package/dist/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js +0 -51
  68. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +0 -2
  69. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +0 -10
  70. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +0 -8
  71. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +0 -28
  72. package/dist/modules/icons/components/IconFolderAdd.d.ts +0 -7
  73. package/dist/modules/icons/components/IconFolderAdd.js +0 -13
  74. package/dist/modules/icons/components/IconFolderDelete.d.ts +0 -7
  75. package/dist/modules/icons/components/IconFolderDelete.js +0 -12
  76. package/dist/modules/icons/components/IconGlobe2.d.ts +0 -7
  77. package/dist/modules/icons/components/IconGlobe2.js +0 -16
  78. package/dist/modules/icons/components/IconGroupAvatar.d.ts +0 -7
  79. package/dist/modules/icons/components/IconGroupAvatar.js +0 -12
  80. package/dist/modules/icons/components/IconMailRecall.d.ts +0 -7
  81. package/dist/modules/icons/components/IconMailRecall.js +0 -13
  82. package/dist/modules/icons/components/IconQuestionMark.d.ts +0 -7
  83. package/dist/modules/icons/components/IconQuestionMark.js +0 -13
  84. package/dist/modules/icons/components/IconReadMail.d.ts +0 -7
  85. package/dist/modules/icons/components/IconReadMail.js +0 -16
  86. package/dist/modules/icons/components/IconSignature.d.ts +0 -7
  87. package/dist/modules/icons/components/IconSignature.js +0 -13
  88. package/dist/modules/icons/components/IconUndoAll.d.ts +0 -7
  89. package/dist/modules/icons/components/IconUndoAll.js +0 -14
  90. package/dist/modules/icons/components/IconUnreadMail.d.ts +0 -7
  91. package/dist/modules/icons/components/IconUnreadMail.js +0 -16
  92. package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +0 -47
  93. package/dist/modules/modals/ConfirmModal/ConfirmModal.js +0 -37
  94. package/dist/modules/modals/ConfirmModal/index.d.ts +0 -1
  95. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +0 -8
  96. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +0 -55
  97. package/dist/modules/multimedia/WorkspaceFolders/components/NewFolderForm.d.ts +0 -16
  98. package/dist/modules/multimedia/WorkspaceFolders/components/NewFolderForm.js +0 -39
  99. package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +0 -1
@@ -25,7 +25,7 @@ export interface ButtonProps extends React.ComponentPropsWithRef<'button'> {
25
25
  /**
26
26
  * Does it has a text ?
27
27
  */
28
- children?: ReactNode;
28
+ children: ReactNode;
29
29
  /**
30
30
  * Display Icon Component to the left
31
31
  */
@@ -19,7 +19,7 @@ const Button = /* @__PURE__ */ forwardRef(({
19
19
  const classes = clsx("btn", {
20
20
  [`btn-filled btn-${color}`]: variant === "filled",
21
21
  [`btn-${variant}-${color}`]: variant === "outline" || variant === "ghost",
22
- "btn-icon btn-sm": !children,
22
+ "btn-icon": !children,
23
23
  "btn-loading": isLoading,
24
24
  "btn-lg": size === "lg",
25
25
  "btn-sm": size === "sm"
@@ -11,7 +11,7 @@ const IconButton = /* @__PURE__ */ forwardRef(({
11
11
  ...restProps,
12
12
  className: clsx("btn-icon btn-sm", className)
13
13
  };
14
- return /* @__PURE__ */ jsx(Button, { ref, ...buttonProps, leftIcon: icon });
14
+ return /* @__PURE__ */ jsx(Button, { ref, ...buttonProps, children: icon });
15
15
  });
16
16
  export {
17
17
  IconButton as default
@@ -1,23 +1,13 @@
1
- import { ChangeEvent, KeyboardEvent, ReactNode } from 'react';
1
+ import { ChangeEvent } from 'react';
2
2
  export interface ComboboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ onSearchResultsChange: (model: (string | number)[]) => void;
3
4
  onSearchInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
4
5
  options: OptionListItemType[];
5
6
  value: string;
6
7
  isLoading: boolean;
7
8
  noResult: boolean;
8
- onFocus?: (event: ChangeEvent<HTMLInputElement>) => void;
9
- onBlur?: (event: ChangeEvent<HTMLInputElement>) => void;
10
- onSearchResultsChange?: (model: (string | number)[]) => void;
11
- onSearchInputKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;
12
9
  searchMinLength?: number;
13
10
  placeholder?: string;
14
- variant?: 'outline' | 'ghost';
15
- renderInputGroup?: ReactNode;
16
- renderList?: (items: OptionListItemType[]) => ReactNode;
17
- renderListItem?: (item: OptionListItemType) => ReactNode;
18
- renderSelectedItems?: ReactNode;
19
- renderNoResult?: ReactNode;
20
- hasDefault?: boolean;
21
11
  }
22
12
  export interface OptionListItemType {
23
13
  /**
@@ -27,60 +17,15 @@ export interface OptionListItemType {
27
17
  /**
28
18
  * Label
29
19
  */
30
- label?: string;
20
+ label: string;
31
21
  /**
32
22
  * Add an icon
33
23
  */
34
24
  icon?: any;
35
- /**
36
- * Display Separator or not
37
- */
38
- withSeparator?: boolean;
39
- /**
40
- * Disable option
41
- */
42
- disabled?: boolean;
43
25
  }
44
- /**
45
- * A component that combines an input field with a dropdown list of selectable options.
46
- *
47
- * @component
48
- * @example
49
- * ```tsx
50
- * <Combobox
51
- * onSearchResultsChange={(values) => console.log(values)}
52
- * onSearchInputChange={(e) => console.log(e.target.value)}
53
- * options={[{ value: '1', label: 'Option 1' }]}
54
- * value=""
55
- * isLoading={false}
56
- * noResult={false}
57
- * />
58
- * ```
59
- *
60
- * @param props - The component props
61
- * @param props.onFocus - Callback fired when the input is focused
62
- * @param props.onBlur - Callback fired when the input is blured
63
- * @param props.onSearchResultsChange - Callback fired when the selected values change
64
- * @param props.onSearchInputChange - Callback fired when the search input value changes
65
- * @param props.options - Array of options to display in the dropdown
66
- * @param props.value - Current value of the search input
67
- * @param props.isLoading - Whether the component is in a loading state
68
- * @param props.noResult - Whether to show a "no results" message
69
- * @param props.searchMinLength - Minimum number of characters required to trigger search
70
- * @param props.placeholder - Placeholder text for the input field
71
- * @param props.variant - Visual variant of the input ('outline' or 'ghost')
72
- * @param props.renderInputGroup - Custom render function for the input group
73
- * @param props.renderList - Custom render function for the dropdown list
74
- * @param props.renderListItem - Custom render function for each option item
75
- * @param props.renderSelectedItems - Custom render function for selected items
76
- * @param props.renderNoResult - Custom render function for no results message
77
- * @param props.hasDefault - Whether to show default options
78
- *
79
- * @extends {React.InputHTMLAttributes<HTMLInputElement>}
80
- */
81
26
  declare const Combobox: {
82
- ({ onFocus, onBlur, onSearchResultsChange, onSearchInputChange, onSearchInputKeyUp, options, value, isLoading, noResult, searchMinLength, placeholder, variant, renderInputGroup, renderList, renderListItem, renderSelectedItems, renderNoResult, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
83
- Trigger: ({ placeholder, value, searchMinLength, onFocus, onBlur, handleSearchInputChange, handleSearchInputKeyUp, renderInputGroup, variant, renderSelectedItems, hasDefault, }: import('./ComboboxTrigger').ComboboxTriggerProps) => import("react/jsx-runtime").JSX.Element;
27
+ ({ onSearchResultsChange, onSearchInputChange, options, value, isLoading, noResult, searchMinLength, placeholder, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
28
+ Trigger: ({ placeholder, value, searchMinLength, handleSearchInputChange, }: import('./ComboboxTrigger').ComboboxTriggerProps) => import("react/jsx-runtime").JSX.Element;
84
29
  displayName: string;
85
30
  };
86
31
  export default Combobox;
@@ -5,43 +5,32 @@ import ComboboxTrigger from "./ComboboxTrigger.js";
5
5
  import Dropdown from "../Dropdown/Dropdown.js";
6
6
  import Loading from "../Loading/Loading.js";
7
7
  const Combobox = ({
8
- onFocus,
9
- onBlur,
10
8
  onSearchResultsChange,
11
9
  onSearchInputChange,
12
- onSearchInputKeyUp,
13
10
  options,
14
11
  value,
15
12
  isLoading,
16
13
  noResult,
17
14
  searchMinLength,
18
- placeholder,
19
- variant = "outline",
20
- renderInputGroup,
21
- renderList,
22
- renderListItem,
23
- renderSelectedItems,
24
- renderNoResult
15
+ placeholder
25
16
  }) => {
26
17
  const {
27
18
  t
28
19
  } = useTranslation(), [localValue, setLocalValue] = useState([]);
29
20
  useEffect(() => {
30
- onSearchResultsChange == null || onSearchResultsChange(localValue);
21
+ onSearchResultsChange(localValue);
31
22
  }, [localValue]);
32
23
  const handleOptionClick = (value2) => {
33
24
  setLocalValue([value2]);
34
25
  }, renderContent = () => isLoading ? /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center p-4", children: [
35
26
  /* @__PURE__ */ jsx(Loading, { isLoading }),
36
27
  /* @__PURE__ */ jsx("span", { className: "ps-4", children: t("explorer.search.pending") })
37
- ] }) : noResult ? renderNoResult || /* @__PURE__ */ jsx("div", { className: "p-4", children: t("portal.no.result") }) : renderList ? renderList(options) : options.map((option, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
38
- /* @__PURE__ */ jsx(Dropdown.Item, { type: "select", icon: option.icon, onClick: () => handleOptionClick(option.value), disabled: option.disabled, children: renderListItem ? renderListItem(option) : option.label }),
39
- (option.withSeparator || option.withSeparator === void 0) && index < options.length - 1 && /* @__PURE__ */ jsx(Dropdown.Separator, {})
28
+ ] }) : noResult ? /* @__PURE__ */ jsx("div", { className: "p-4", children: t("portal.no.result") }) : options.map((option, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
29
+ /* @__PURE__ */ jsx(Dropdown.Item, { type: "select", icon: option.icon, onClick: () => handleOptionClick(option.value), children: option.label }),
30
+ index < options.length - 1 && /* @__PURE__ */ jsx(Dropdown.Separator, {})
40
31
  ] }, index));
41
- return /* @__PURE__ */ jsxs(Dropdown, { block: !0, focusOnVisible: !1, openOnSpace: !1, children: [
42
- /* @__PURE__ */ jsx(Combobox.Trigger, { placeholder, searchMinLength, handleSearchInputChange: onSearchInputChange, handleSearchInputKeyUp: (event) => {
43
- onSearchInputKeyUp == null || onSearchInputKeyUp(event);
44
- }, value, variant, renderInputGroup, renderSelectedItems, hasDefault: !!options.length, onFocus, onBlur }),
32
+ return /* @__PURE__ */ jsxs(Dropdown, { block: !0, children: [
33
+ /* @__PURE__ */ jsx(Combobox.Trigger, { placeholder, searchMinLength, handleSearchInputChange: onSearchInputChange, value }),
45
34
  /* @__PURE__ */ jsx(Dropdown.Menu, { children: renderContent() })
46
35
  ] });
47
36
  };
@@ -1,40 +1,9 @@
1
- import { ChangeEvent, KeyboardEvent, ReactNode } from 'react';
2
- export interface ComboboxTriggerProps extends React.ComponentPropsWithRef<'input'> {
1
+ import { ChangeEvent } from 'react';
2
+ export interface ComboboxTriggerProps extends React.ComponentPropsWithRef<'button'> {
3
3
  handleSearchInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
4
- handleSearchInputKeyUp: (event: KeyboardEvent<HTMLInputElement>) => void;
5
4
  value: string;
6
5
  searchMinLength?: number;
7
6
  placeholder?: string;
8
- renderInputGroup?: React.ReactNode;
9
- variant?: 'outline' | 'ghost';
10
- renderSelectedItems?: ReactNode;
11
- hasDefault: boolean;
12
- onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
13
- onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
14
7
  }
15
- /**
16
- * A trigger component for the Combobox that handles user input and displays selected items.
17
- *
18
- * @component
19
- * @example
20
- * ```tsx
21
- * <ComboboxTrigger
22
- * value={searchValue}
23
- * handleSearchInputChange={(e) => setSearchValue(e.target.value)}
24
- * placeholder="Search..."
25
- * />
26
- * ```
27
- *
28
- * @param {object} props - Component props
29
- * @param {string} [props.placeholder] - Placeholder text for the search input
30
- * @param {string} [props.value=''] - Current value of the search input
31
- * @param {number} [props.searchMinLength=3] - Minimum number of characters required before showing dropdown
32
- * @param {(event: ChangeEvent<HTMLInputElement>) => void} props.handleSearchInputChange - Handler for input change events
33
- * @param {ReactNode} [props.renderInputGroup] - Optional content to render in the input group (e.g., icons)
34
- * @param {'outline' | 'ghost'} [props.variant='outline'] - Visual variant of the input
35
- * @param {ReactNode} [props.renderSelectedItems] - Optional content to render selected items
36
- *
37
- * @returns {JSX.Element} A form control containing an input field with optional input group and selected items
38
- */
39
- declare const ComboboxTrigger: ({ placeholder, value, searchMinLength, onFocus, onBlur, handleSearchInputChange, handleSearchInputKeyUp, renderInputGroup, variant, renderSelectedItems, hasDefault, }: ComboboxTriggerProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const ComboboxTrigger: ({ placeholder, value, searchMinLength, handleSearchInputChange, }: ComboboxTriggerProps) => import("react/jsx-runtime").JSX.Element;
40
9
  export default ComboboxTrigger;
@@ -1,6 +1,5 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from "react";
3
- import clsx from "clsx";
4
3
  import { useDropdownContext } from "../Dropdown/DropdownContext.js";
5
4
  import Input from "../Input/Input.js";
6
5
  import FormControl from "../Form/FormControl.js";
@@ -8,47 +7,23 @@ const ComboboxTrigger = ({
8
7
  placeholder,
9
8
  value = "",
10
9
  searchMinLength = 3,
11
- onFocus,
12
- onBlur,
13
- handleSearchInputChange,
14
- handleSearchInputKeyUp,
15
- renderInputGroup,
16
- variant = "outline",
17
- renderSelectedItems,
18
- hasDefault
10
+ handleSearchInputChange
19
11
  }) => {
20
12
  const {
21
13
  triggerProps,
22
14
  itemProps,
23
15
  setVisible
24
- } = useDropdownContext(), containerProps = {
16
+ } = useDropdownContext(), inputProps = {
25
17
  ...triggerProps,
26
- className: clsx("d-flex combobox-trigger", renderInputGroup ? "input-group flex-nowrap align-items-start" : "flex-wrap align-items-center", triggerProps.className),
27
- onClick: (event) => {
28
- event.stopPropagation();
29
- }
30
- }, inputProps = {
31
18
  role: "combobox",
32
- onChange: (event) => {
33
- handleSearchInputChange(event), setVisible(event.target.value.length >= searchMinLength);
19
+ onClick: () => {
20
+ value.length >= searchMinLength && setVisible(!0);
34
21
  },
35
- onClick: (event) => {
36
- const input = event.target;
37
- setVisible(input.value.length >= searchMinLength || hasDefault), input.focus();
38
- },
39
- onKeyUp: (event) => {
40
- handleSearchInputKeyUp == null || handleSearchInputKeyUp(event);
41
- }
42
- }, classNameVariant = variant === "ghost" ? " border-0" : "", classNameInput = clsx(classNameVariant, renderSelectedItems ? "flex-fill w-auto " : "");
22
+ onChange: handleSearchInputChange
23
+ };
43
24
  return useEffect(() => {
44
25
  setVisible(value.length >= searchMinLength);
45
- }, [value, searchMinLength]), /* @__PURE__ */ jsxs(FormControl, { id: "search", ...containerProps, children: [
46
- !!renderInputGroup && /* @__PURE__ */ jsx("label", { className: "input-group-text pe-0" + classNameVariant, htmlFor: triggerProps.id, children: renderInputGroup }),
47
- /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center flex-wrap flex-fill", children: [
48
- renderSelectedItems,
49
- /* @__PURE__ */ jsx(Input, { ...inputProps, className: classNameInput, onFocus, onBlur, noValidationIcon: !0, placeholder, size: "md", type: "search", onKeyDown: itemProps.onMenuItemKeyDown })
50
- ] })
51
- ] });
26
+ }, [setVisible, value, searchMinLength]), /* @__PURE__ */ jsx(FormControl, { className: "d-flex align-items-center", id: "search", children: /* @__PURE__ */ jsx(Input, { ...inputProps, className: "max-w-512", noValidationIcon: !0, placeholder, size: "md", type: "search", onKeyDown: itemProps.onMenuItemKeyDown }) });
52
27
  };
53
28
  export {
54
29
  ComboboxTrigger as default
@@ -32,14 +32,6 @@ export interface DropdownProps {
32
32
  * Whether the trigger is hovered or not.
33
33
  */
34
34
  isTriggerHovered?: boolean;
35
- /**
36
- * Whether to focus the first element when the dropdown is opened.
37
- */
38
- focusOnVisible?: boolean;
39
- /**
40
- * Whether to open the dropdown on space key press.
41
- */
42
- openOnSpace?: boolean;
43
35
  }
44
36
  export type DropdownMenuOptions = {
45
37
  /**
@@ -65,13 +57,13 @@ export type DropdownMenuOptions = {
65
57
  type: 'divider';
66
58
  };
67
59
  declare const Dropdown: {
68
- ({ children, block, overflow, noWrap, placement, extraTriggerKeyDownHandler, onToggle, isTriggerHovered, focusOnVisible, openOnSpace, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
60
+ ({ children, block, overflow, noWrap, placement, extraTriggerKeyDownHandler, onToggle, isTriggerHovered, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
69
61
  displayName: string;
70
62
  } & {
71
63
  Trigger: import('react').ForwardRefExoticComponent<Omit<import('./DropdownTrigger').DropdownTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
72
64
  Menu: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
73
65
  Item: {
74
- ({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element;
66
+ ({ type, icon, onClick, children, className, minWidth, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element;
75
67
  displayName: string;
76
68
  };
77
69
  Separator: {
@@ -1,7 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useMemo, useEffect } from "react";
3
3
  import clsx from "clsx";
4
- import useDropdown from "../../hooks/useDropdown/useDropdown.js";
5
4
  import DropdownCheckboxItem from "./DropdownCheckboxItem.js";
6
5
  import { DropdownContext } from "./DropdownContext.js";
7
6
  import DropdownItem from "./DropdownItem.js";
@@ -10,6 +9,7 @@ import DropdownMenuGroup from "./DropdownMenuGroup.js";
10
9
  import DropdownRadioItem from "./DropdownRadioItem.js";
11
10
  import DropdownSeparator from "./DropdownSeparator.js";
12
11
  import DropdownTrigger from "./DropdownTrigger.js";
12
+ import useDropdown from "../../hooks/useDropdown/useDropdown.js";
13
13
  import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
14
14
  const Root = ({
15
15
  children,
@@ -19,9 +19,7 @@ const Root = ({
19
19
  placement = "bottom-start",
20
20
  extraTriggerKeyDownHandler,
21
21
  onToggle,
22
- isTriggerHovered = !1,
23
- focusOnVisible = !0,
24
- openOnSpace = !0
22
+ isTriggerHovered = !1
25
23
  }) => {
26
24
  const {
27
25
  visible,
@@ -31,7 +29,7 @@ const Root = ({
31
29
  itemProps,
32
30
  itemRefs,
33
31
  setVisible
34
- } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered, focusOnVisible, openOnSpace), ref = useClickOutside(() => {
32
+ } = useDropdown(placement, extraTriggerKeyDownHandler, isTriggerHovered), ref = useClickOutside(() => {
35
33
  setVisible(!1);
36
34
  }), value = useMemo(() => ({
37
35
  visible,
@@ -25,13 +25,9 @@ export interface DropdownItemProps {
25
25
  * Set minimum width in pixels
26
26
  */
27
27
  minWidth?: number;
28
- /**
29
- * Disabled status
30
- */
31
- disabled?: boolean;
32
28
  }
33
29
  declare const DropdownItem: {
34
- ({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
30
+ ({ type, icon, onClick, children, className, minWidth, ...restProps }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
35
31
  displayName: string;
36
32
  };
37
33
  export default DropdownItem;
@@ -9,7 +9,6 @@ const DropdownItem = ({
9
9
  children,
10
10
  className,
11
11
  minWidth,
12
- disabled,
13
12
  ...restProps
14
13
  }) => {
15
14
  const {
@@ -21,11 +20,9 @@ const DropdownItem = ({
21
20
  onMenuItemMouseEnter,
22
21
  onMenuItemClick
23
22
  } = itemProps, handleOnClick = (event) => {
24
- disabled || (onClick == null || onClick(event), type === "action" && (onMenuItemClick(), event.stopPropagation()));
23
+ onClick == null || onClick(event), type === "action" && (onMenuItemClick(), event.stopPropagation());
25
24
  }, id = useId(), dropdownItem = clsx("dropdown-item", {
26
25
  focus: isFocused === id
27
- }, {
28
- "text-gray-600": disabled
29
26
  }, className), style = {
30
27
  ...minWidth && {
31
28
  minWidth: `${minWidth}px`
@@ -3,7 +3,6 @@ import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
4
  import SvgIconRafterUp from "../../modules/icons/components/IconRafterUp.js";
5
5
  import { useDropdownContext } from "./DropdownContext.js";
6
- import Badge from "../Badge/Badge.js";
7
6
  const DropdownTrigger = /* @__PURE__ */ forwardRef(({
8
7
  label,
9
8
  icon,
@@ -47,10 +46,7 @@ const DropdownTrigger = /* @__PURE__ */ forwardRef(({
47
46
  return /* @__PURE__ */ jsxs("button", { ref: forwardRef2, type: "button", disabled, ...mergedProps, children: [
48
47
  icon,
49
48
  label,
50
- badgeContent ? /* @__PURE__ */ jsx(Badge, { variant: {
51
- level: "info",
52
- type: "notification"
53
- }, children: badgeContent }) : !hideCarret && /* @__PURE__ */ jsx(SvgIconRafterUp, { width: 16, height: 16, className: "dropdown-toggle-caret" })
49
+ badgeContent ? /* @__PURE__ */ jsx("span", { className: "badge text-bg-secondary rounded-pill", children: badgeContent }) : !hideCarret && /* @__PURE__ */ jsx(SvgIconRafterUp, { width: 16, height: 16, className: "dropdown-toggle-caret" })
54
50
  ] });
55
51
  });
56
52
  export {
@@ -25,10 +25,6 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, O
25
25
  * Optional class for styling purpose
26
26
  */
27
27
  className?: string;
28
- /**
29
- * Show count of characters
30
- */
31
- showCounter?: boolean;
32
28
  }
33
29
  /**
34
30
  * Input Form Component
@@ -1,5 +1,5 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { forwardRef, useState } from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
4
  import { useFormControl } from "../Form/FormContext.js";
5
5
  const Input = /* @__PURE__ */ forwardRef(({
@@ -8,39 +8,23 @@ const Input = /* @__PURE__ */ forwardRef(({
8
8
  size = "md",
9
9
  type = "text",
10
10
  className,
11
- showCounter,
12
11
  ...restProps
13
12
  }, ref) => {
14
- var _a;
15
13
  const {
16
14
  id,
17
15
  isRequired,
18
16
  isReadOnly,
19
17
  status
20
- } = useFormControl(), [currentLength, setCurrentLength] = useState(((_a = restProps.value) == null ? void 0 : _a.toString().length) || 0), classes = clsx({
18
+ } = useFormControl(), classes = clsx({
21
19
  "form-control": !isReadOnly,
22
20
  "form-control-lg": size === "lg",
23
21
  "form-control-sm": size === "sm",
24
22
  "is-invalid": status === "invalid",
25
23
  "is-valid": status === "valid",
26
24
  "form-control-plaintext": isReadOnly,
27
- "no-validation-icon": noValidationIcon,
28
- "pe-64": showCounter && !status
25
+ "no-validation-icon": noValidationIcon
29
26
  }, className);
30
- return /* @__PURE__ */ jsxs(Fragment, { children: [
31
- /* @__PURE__ */ jsx("input", { ref, id, className: classes, type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: (e) => {
32
- var _a2;
33
- setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
34
- } }),
35
- showCounter && !status && /* @__PURE__ */ jsxs("span", { className: clsx("caption text-end float-end mt-n32 py-2 px-12 ", {
36
- "text-danger": currentLength === restProps.maxLength,
37
- "text-gray-700": currentLength !== restProps.maxLength
38
- }), children: [
39
- currentLength,
40
- " / ",
41
- restProps.maxLength
42
- ] })
43
- ] });
27
+ return /* @__PURE__ */ jsx("input", { ref, id, className: classes, type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps });
44
28
  });
45
29
  export {
46
30
  Input as default
@@ -54,7 +54,7 @@ const Header = ({
54
54
  parsedContent,
55
55
  parsedHeadline,
56
56
  error
57
- } = useHelp(hasOldHelpEnableWorkflow), classes = clsx("header d-print-none", {
57
+ } = useHelp(hasOldHelpEnableWorkflow), classes = clsx("header", {
58
58
  "no-2d": is1d,
59
59
  "no-1d": !is1d
60
60
  }), {
@@ -5,10 +5,6 @@ export type ListProps<T> = {
5
5
  * Toolbar data items
6
6
  */
7
7
  items?: ToolbarItem[];
8
- /**
9
- * Checkable list
10
- */
11
- isCheckable?: boolean;
12
8
  /**
13
9
  * Generic data
14
10
  */
@@ -21,18 +17,7 @@ export type ListProps<T> = {
21
17
  * Callback to get selected ids
22
18
  */
23
19
  onSelectedItems?: (selectedIds: string[]) => void;
24
- /**
25
- * Custom class name
26
- */
27
- className?: string;
28
- /**
29
- * Toolbar options
30
- */
31
- toolbarOptions?: {
32
- shouldHideLabelsOnMobile?: boolean;
33
- sticky?: boolean;
34
- };
35
20
  };
36
21
  export declare const List: <T extends {
37
22
  _id: string;
38
- }>({ items, isCheckable, data, renderNode, onSelectedItems, className, toolbarOptions, }: ListProps<T>) => import("react/jsx-runtime").JSX.Element;
23
+ }>({ items, data, renderNode, onSelectedItems, }: ListProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,15 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useMediaQuery } from "@uidotdev/usehooks";
2
3
  import clsx from "clsx";
3
4
  import { useEffect, Fragment as Fragment$1 } from "react";
4
5
  import { useCheckable } from "../../hooks/useCheckable/useCheckable.js";
5
- import useBreakpoint from "../../hooks/useBreakpoint/useBreakpoint.js";
6
6
  import Checkbox from "../Checkbox/Checkbox.js";
7
7
  import { Toolbar } from "../Toolbar/Toolbar.js";
8
8
  const List = ({
9
9
  items,
10
- isCheckable = !1,
11
10
  data,
12
11
  renderNode,
13
- onSelectedItems,
14
- className,
15
- toolbarOptions
12
+ onSelectedItems
16
13
  }) => {
17
14
  const {
18
15
  selectedItems,
@@ -20,32 +17,31 @@ const List = ({
20
17
  isIndeterminate,
21
18
  handleOnSelectAllItems,
22
19
  handleOnSelectItem
23
- } = useCheckable(data), {
24
- lg
25
- } = useBreakpoint();
26
- useEffect(() => {
20
+ } = useCheckable(data), isDesktopDevice = useMediaQuery("only screen and (min-width: 1024px)");
21
+ return useEffect(() => {
27
22
  selectedItems && (onSelectedItems == null || onSelectedItems(selectedItems));
28
- }, [onSelectedItems, selectedItems]);
29
- const toolbarClassName = clsx("list-header d-flex align-items-center gap-8 px-12 bg-white border-bottom", className, {
30
- "sticky-top": toolbarOptions == null ? void 0 : toolbarOptions.sticky
31
- });
32
- return /* @__PURE__ */ jsxs(Fragment, { children: [
33
- (items || isCheckable) && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: toolbarClassName, children: /* @__PURE__ */ jsxs(Fragment, { children: [
34
- /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-8 py-12", children: [
35
- /* @__PURE__ */ jsx(Checkbox, { checked: allItemsSelected, indeterminate: isIndeterminate, onChange: () => handleOnSelectAllItems(allItemsSelected) }),
36
- /* @__PURE__ */ jsxs("span", { children: [
37
- "(",
38
- selectedItems.length,
39
- ")"
40
- ] })
41
- ] }),
42
- items && /* @__PURE__ */ jsx(Toolbar, { items, shouldHideLabelsOnMobile: toolbarOptions == null ? void 0 : toolbarOptions.shouldHideLabelsOnMobile, isBlock: !0, align: "left", variant: "no-shadow", className: clsx("gap-4 py-4", {
43
- "px-0 ms-auto": !lg
44
- }) })
45
- ] }) }) }),
46
- /* @__PURE__ */ jsx("div", { children: data == null ? void 0 : data.map((node) => {
47
- const checked = selectedItems.includes(node._id);
48
- return /* @__PURE__ */ jsx(Fragment$1, { children: renderNode(node, /* @__PURE__ */ jsx(Checkbox, { checked, onChange: () => handleOnSelectItem(node._id), onClick: (event) => event.stopPropagation() }), checked) }, node._id);
23
+ }, [onSelectedItems, selectedItems]), /* @__PURE__ */ jsxs(Fragment, { children: [
24
+ items && /* @__PURE__ */ jsxs(Fragment, { children: [
25
+ /* @__PURE__ */ jsx("div", { className: clsx("d-flex align-items-center gap-8", {
26
+ "px-12": items
27
+ }), children: /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-8", children: [
29
+ /* @__PURE__ */ jsx(Checkbox, { checked: allItemsSelected, indeterminate: isIndeterminate, onChange: () => handleOnSelectAllItems(allItemsSelected) }),
30
+ /* @__PURE__ */ jsxs("span", { children: [
31
+ "(",
32
+ selectedItems.length,
33
+ ")"
34
+ ] })
35
+ ] }),
36
+ /* @__PURE__ */ jsx(Toolbar, { items, isBlock: !0, align: "left", variant: "no-shadow", className: clsx("gap-4 py-4", {
37
+ "px-0 ms-auto": !isDesktopDevice
38
+ }) })
39
+ ] }) }),
40
+ /* @__PURE__ */ jsx("div", { className: "border-top" })
41
+ ] }),
42
+ /* @__PURE__ */ jsx("div", { className: "mt-8", children: data == null ? void 0 : data.map((node) => {
43
+ const checkbox = /* @__PURE__ */ jsx(Checkbox, { checked: selectedItems.includes(node._id), onChange: () => handleOnSelectItem(node._id) }), checked = selectedItems.includes(node._id);
44
+ return /* @__PURE__ */ jsx(Fragment$1, { children: renderNode(node, checkbox, checked) }, node._id);
49
45
  }) })
50
46
  ] });
51
47
  };
@@ -17,8 +17,8 @@ const ModalHeader = (props) => {
17
17
  return useEffect(() => {
18
18
  var _a;
19
19
  focusId || (_a = closeButtonRef.current) == null || _a.focus();
20
- }, [focusId]), /* @__PURE__ */ jsxs("div", { className: "modal-header align-self-center", children: [
21
- /* @__PURE__ */ jsx("h2", { id: ariaLabelId, className: "modal-title text-center", tabIndex: -1, children }),
20
+ }, [focusId]), /* @__PURE__ */ jsxs("div", { className: "modal-header", children: [
21
+ /* @__PURE__ */ jsx("h2", { id: ariaLabelId, className: "modal-title", tabIndex: -1, children }),
22
22
  /* @__PURE__ */ jsx(IconButton, { ref: closeButtonRef, "aria-label": t("close"), color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconClose, {}), type: "button", variant: "ghost", title: t("close"), onClick: onModalClose, className: "btn-close" })
23
23
  ] });
24
24
  };
@@ -1,6 +1,6 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { Size } from '../../types';
3
- export interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
3
+ export interface BaseProps {
4
4
  /**
5
5
  * String or Template literal with React i18next namespace
6
6
  */
@@ -24,12 +24,10 @@ const SearchBar = ({
24
24
  "ps-48": isVariant
25
25
  }), handleClick = () => {
26
26
  onClick == null || onClick();
27
- }, handleKeyDown = (e) => {
28
- e.key === "Enter" && (e.preventDefault(), handleClick());
29
27
  };
30
28
  return /* @__PURE__ */ jsxs(FormControl, { id: "search-bar", className: searchbar, children: [
31
29
  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, {}) }),
32
- /* @__PURE__ */ jsx(FormControl.Input, { type: "search", placeholder: t(placeholder), size, noValidationIcon: !0, className: input, onChange, disabled, onKeyDown: handleKeyDown, ...restProps }),
30
+ /* @__PURE__ */ jsx(FormControl.Input, { type: "search", placeholder: t(placeholder), size, noValidationIcon: !0, className: input, onChange, disabled, ...restProps }),
33
31
  !isVariant && /* @__PURE__ */ jsx(SearchButton, { type: "submit", "aria-label": t("search"), icon: /* @__PURE__ */ jsx(SvgIconSearch, {}), className: "border-start-0", onClick: handleClick })
34
32
  ] });
35
33
  };
@@ -24,7 +24,7 @@ export interface TabsProps {
24
24
  export declare const Tabs: {
25
25
  ({ defaultId, items, onChange, children }: TabsProps): import("react/jsx-runtime").JSX.Element;
26
26
  Item: {
27
- ({ icon, label, id, order, }: TabsItemProps & {
27
+ ({ icon, badge, label, id, order, }: TabsItemProps & {
28
28
  order: number;
29
29
  }): import("react/jsx-runtime").JSX.Element;
30
30
  displayName: string;