@inceptionbg/iui 2.0.29 → 2.0.32

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 (81) hide show
  1. package/dist/NoAccessPage-BHCAfL2g.js +2 -0
  2. package/dist/{NoAccessPage-DTPU8bP2.js.map → NoAccessPage-BHCAfL2g.js.map} +1 -1
  3. package/dist/NotFoundPage-BD3WL_BG.js +2 -0
  4. package/dist/{NotFoundPage-PZunMooy.js.map → NotFoundPage-BD3WL_BG.js.map} +1 -1
  5. package/dist/index.d.ts +16 -5
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/iui.css +1 -1
  9. package/package.json +8 -12
  10. package/rollup.config.js +5 -29
  11. package/src/components/Accordions/Accordions.tsx +1 -2
  12. package/src/components/Dashboard/DashboardWidget.tsx +1 -1
  13. package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +1 -2
  14. package/src/components/Dialog/Dialog.tsx +20 -11
  15. package/src/components/Header/Components/Notifications.tsx +5 -3
  16. package/src/components/Inputs/DateInput/DateInput.tsx +1 -1
  17. package/src/components/Inputs/InputWrapper.tsx +1 -1
  18. package/src/components/Inputs/PasswordInput.tsx +1 -2
  19. package/src/components/Inputs/SearchInput.tsx +1 -1
  20. package/src/components/Inputs/Selects/components/CustomSelectComponents.tsx +1 -1
  21. package/src/components/Loader/Loader.tsx +7 -0
  22. package/src/components/Pullover/Pullover.tsx +1 -1
  23. package/src/components/Sidebar/SidebarItem.tsx +1 -1
  24. package/src/components/Table/components/columns/TableColumnsEdit.tsx +1 -1
  25. package/src/components/Table/components/edit/TableEditRow.tsx +1 -1
  26. package/src/components/Table/components/filters/TableFilters.tsx +1 -1
  27. package/src/components/Table/components/items/TableItemActions.tsx +1 -1
  28. package/src/components/Table/components/print/TablePrint.tsx +1 -1
  29. package/src/components/Table/components/select/TableSelect.tsx +1 -1
  30. package/src/components/Table/components/sort/TableSort.tsx +5 -3
  31. package/src/components/Table/components/templates/TableTemplates.tsx +1 -1
  32. package/src/components/Table/components/templates/TemplatesPullover.tsx +1 -1
  33. package/src/components/Tree/TreeItem.tsx +1 -1
  34. package/src/components/Wrappers/PageLayout.tsx +1 -2
  35. package/src/hooks/useLocalPopoverControl.ts +49 -19
  36. package/src/styles/components/_button.scss +1 -1
  37. package/src/styles/components/_inputCheckbox.scss +0 -57
  38. package/src/styles/components/_loader.scss +9 -0
  39. package/dist/NoAccessPage-DTPU8bP2.js +0 -2
  40. package/dist/NotFoundPage-PZunMooy.js +0 -2
  41. package/dist/icons/index.d.ts +0 -55
  42. package/dist/icons/index.js +0 -1
  43. package/src/assets/icons/index.ts +0 -26
  44. package/src/assets/icons/light/faArrowDownShortWide.ts +0 -15
  45. package/src/assets/icons/light/faArrowDownWideShort.ts +0 -15
  46. package/src/assets/icons/light/faArrowLeft.ts +0 -15
  47. package/src/assets/icons/light/faArrowRight.ts +0 -15
  48. package/src/assets/icons/light/faArrowUpArrowDown.ts +0 -15
  49. package/src/assets/icons/light/faArrowUpRightFromSquare.ts +0 -15
  50. package/src/assets/icons/light/faArrowsToLine.ts +0 -15
  51. package/src/assets/icons/light/faArrowsUpDown.ts +0 -15
  52. package/src/assets/icons/light/faBell.ts +0 -15
  53. package/src/assets/icons/light/faBookmark.ts +0 -15
  54. package/src/assets/icons/light/faBookmarkSlash.ts +0 -15
  55. package/src/assets/icons/light/faCalendarPlus.ts +0 -15
  56. package/src/assets/icons/light/faCheck.ts +0 -15
  57. package/src/assets/icons/light/faChevronDown.ts +0 -15
  58. package/src/assets/icons/light/faChevronRight.ts +0 -15
  59. package/src/assets/icons/light/faCircleCheck.ts +0 -15
  60. package/src/assets/icons/light/faCircleInfo.ts +0 -15
  61. package/src/assets/icons/light/faCircleXmark.ts +0 -15
  62. package/src/assets/icons/light/faClipboardCheck.ts +0 -15
  63. package/src/assets/icons/light/faClockRotateLeft.ts +0 -15
  64. package/src/assets/icons/light/faEllipsisVertical.ts +0 -15
  65. package/src/assets/icons/light/faEnvelope.ts +0 -15
  66. package/src/assets/icons/light/faEye.ts +0 -15
  67. package/src/assets/icons/light/faEyeSlash.ts +0 -15
  68. package/src/assets/icons/light/faFilter.ts +0 -15
  69. package/src/assets/icons/light/faGear.ts +0 -15
  70. package/src/assets/icons/light/faHouse.ts +0 -15
  71. package/src/assets/icons/light/faIdBadge.ts +0 -15
  72. package/src/assets/icons/light/faLineColumns.ts +0 -15
  73. package/src/assets/icons/light/faLink.ts +0 -15
  74. package/src/assets/icons/light/faMagnifyingGlass.ts +0 -15
  75. package/src/assets/icons/light/faPen.ts +0 -15
  76. package/src/assets/icons/light/faPrint.ts +0 -15
  77. package/src/assets/icons/light/faQuestion.ts +0 -15
  78. package/src/assets/icons/light/faRotateRight.ts +0 -15
  79. package/src/assets/icons/light/faTrashCan.ts +0 -15
  80. package/src/assets/icons/light/faTriangleExclamation.ts +0 -15
  81. package/src/assets/icons/light/faXmark.ts +0 -15
@@ -1,8 +1,8 @@
1
1
  import type { FC } from 'react';
2
2
  import type { ITableFilterItem } from '../../../../types/ITable';
3
3
  import { useMemo, useState } from 'react';
4
+ import { faFilter } from '@inceptionbg/icons';
4
5
  import { useTranslation } from 'react-i18next';
5
- import { faFilter } from '../../../../assets/icons/light/faFilter';
6
6
  import { faFilterCircleXmark } from '../../../../assets/icons/regular/faFilterCircleXmark';
7
7
  import { usePopupControl } from '../../../../hooks/usePopupControl';
8
8
  import {
@@ -1,6 +1,6 @@
1
1
  import type { ITableDataItem } from '../../../../types/ITable';
2
2
  import { type FC } from 'react';
3
- import { faEllipsisVertical, faPen, faTrashCan } from '../../../../assets/icons';
3
+ import { faEllipsisVertical, faPen, faTrashCan } from '@inceptionbg/icons';
4
4
  import { useIsMenuOpen } from '../../../../hooks/useIsMenuOpen';
5
5
  import { IconButton } from '../../../Button/IconButton';
6
6
  import { Menu } from '../../../Menu/Menu';
@@ -1,9 +1,9 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IPrintData } from '../../../../types/ITable';
3
3
  import { useEffect, useMemo } from 'react';
4
+ import { faPrint } from '@inceptionbg/icons';
4
5
  import clsx from 'clsx';
5
6
  import { useTranslation } from 'react-i18next';
6
- import { faPrint } from '../../../../assets/icons';
7
7
  import { faFileArrowDown } from '../../../../assets/icons/regular/faFileArrowDown';
8
8
  import { useHideZendesk } from '../../../../hooks/useZendesk';
9
9
  import { formatDate, getCurrentDateFormatted } from '../../../../utils/dateUtils';
@@ -1,7 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  import { useState } from 'react';
3
+ import { faClipboardCheck } from '@inceptionbg/icons';
3
4
  import { useTranslation } from 'react-i18next';
4
- import { faClipboardCheck } from '../../../../assets/icons/light/faClipboardCheck';
5
5
  import { NotificationBadge } from '../../../Badge/NotificationBadge';
6
6
  import { IconButton } from '../../../Button/IconButton';
7
7
  import { Menu } from '../../../Menu/Menu';
@@ -1,9 +1,11 @@
1
1
  import type { FC } from 'react';
2
2
  import { useEffect, useState } from 'react';
3
+ import {
4
+ faArrowDownShortWide,
5
+ faArrowDownWideShort,
6
+ faArrowUpArrowDown,
7
+ } from '@inceptionbg/icons';
3
8
  import { useTranslation } from 'react-i18next';
4
- import { faArrowDownShortWide } from '../../../../assets/icons/light/faArrowDownShortWide';
5
- import { faArrowDownWideShort } from '../../../../assets/icons/light/faArrowDownWideShort';
6
- import { faArrowUpArrowDown } from '../../../../assets/icons/light/faArrowUpArrowDown';
7
9
  import { IconButton } from '../../../Button/IconButton';
8
10
  import { Menu } from '../../../Menu/Menu';
9
11
  import { Tooltip } from '../../../Tooltip/Tooltip';
@@ -1,8 +1,8 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IReportTemplate } from '../../../../types/ITable';
3
3
  import { useEffect } from 'react';
4
+ import { faBookmark } from '@inceptionbg/icons';
4
5
  import { useTranslation } from 'react-i18next';
5
- import { faBookmark } from '../../../../assets/icons';
6
6
  import { setTemplateData } from '../../../../utils/tableUtils';
7
7
  import { IconButton } from '../../../Button/IconButton';
8
8
  import { useTableContext } from '../../contexts/TableContext';
@@ -1,7 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  import type { IReportTemplate, ITableTemplateData } from '../../../../types/ITable';
3
+ import { faBookmark, faBookmarkSlash, faTrashCan } from '@inceptionbg/icons';
3
4
  import { useTranslation } from 'react-i18next';
4
- import { faBookmark, faBookmarkSlash, faTrashCan } from '../../../../assets/icons';
5
5
  import { usePopupControl } from '../../../../hooks/usePopupControl';
6
6
  import { List } from '../../../List/List';
7
7
  import { Pullover } from '../../../Pullover/Pullover';
@@ -1,8 +1,8 @@
1
1
  import type { FC } from 'react';
2
2
  import type { ITreeItem } from '../../types/ITree';
3
3
  import { useState } from 'react';
4
+ import { faChevronRight } from '@inceptionbg/icons';
4
5
  import clsx from 'clsx';
5
- import { faChevronRight } from '../../assets/icons';
6
6
  import { IconButton } from '../Button/IconButton';
7
7
  import { Collapse } from '../Helper/Collapse';
8
8
 
@@ -2,11 +2,10 @@ import type { FC, ReactNode } from 'react';
2
2
  import type { IHeaderAction } from '../../types/IHeader';
3
3
  import type { IMenuItem } from '../../types/IMenu';
4
4
  import { useLayoutEffect, useState } from 'react';
5
+ import { faArrowLeft, faEllipsisVertical, faQuestion } from '@inceptionbg/icons';
5
6
  import clsx from 'clsx';
6
7
  import { Trans } from 'react-i18next';
7
8
  import { Link, useNavigate } from 'react-router';
8
- import { faEllipsisVertical, faQuestion } from '../../assets/icons';
9
- import { faArrowLeft } from '../../assets/icons/regular/faArrowLeft';
10
9
  import { usePopupControl } from '../../hooks/usePopupControl';
11
10
  import { Button } from '../Button/Button';
12
11
  import { IconButton } from '../Button/IconButton';
@@ -1,32 +1,62 @@
1
- import type { ILocalPopupControl } from '../types/IPopup';
2
- import { useCallback, useImperativeHandle, useRef } from 'react';
1
+ import type {
2
+ DeclarativeDialogProps,
3
+ ImperativeDialogProps,
4
+ } from '../components/Dialog/Dialog';
5
+ import { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
3
6
 
4
- interface Props {
5
- control: ILocalPopupControl;
6
- onCloseCallback?: () => void;
7
- }
7
+ type Props = ImperativeDialogProps | DeclarativeDialogProps;
8
8
 
9
- export const useLocalPopoverControl = ({ control, onCloseCallback }: Props) => {
9
+ export const useLocalPopoverControl = (props: Props) => {
10
+ const { control, onCloseCallback, isOpen: propsIsOpen, onClose } = props;
10
11
  const elementRef = useRef<HTMLDivElement>(null);
12
+ const timeoutRef = useRef<NodeJS.Timeout | null>(null);
11
13
 
12
- const handleOpen = useCallback(() => control.setIsOpen(true), [control]);
14
+ // Determine the operation mode
15
+ const isImperative = !!control;
16
+ const shouldBeOpen = isImperative ? control.isOpen : propsIsOpen;
13
17
 
14
- const handleClose = useCallback(() => {
15
- elementRef.current?.classList.add('closing');
16
- setTimeout(() => {
17
- onCloseCallback?.();
18
+ const [isMounted, setIsMounted] = useState(shouldBeOpen);
19
+
20
+ // 3. Handle State Synchronization and Animation
21
+ useEffect(() => {
22
+ if (shouldBeOpen && !isMounted) {
23
+ timeoutRef.current && clearTimeout(timeoutRef.current);
24
+ elementRef.current?.classList.remove('closing');
25
+ setIsMounted(true);
26
+ } else if (!shouldBeOpen && isMounted) {
27
+ elementRef.current?.classList.add('closing');
28
+ timeoutRef.current = setTimeout(() => {
29
+ setIsMounted(false);
30
+ onCloseCallback?.();
31
+ onClose?.();
32
+ }, 200);
33
+ }
34
+
35
+ return () => {
36
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
37
+ };
38
+ }, [shouldBeOpen, isMounted, onClose, onCloseCallback]);
39
+
40
+ const handleCloseRequest = useCallback(() => {
41
+ if (isImperative) {
18
42
  control.setIsOpen(false);
19
- }, 200);
20
- }, [control, onCloseCallback]);
43
+ } else {
44
+ onClose();
45
+ }
46
+ }, [isImperative, control, onClose]);
47
+
48
+ const handleOpenRequest = useCallback(() => {
49
+ if (isImperative) control.setIsOpen(true);
50
+ }, [isImperative, control]);
21
51
 
22
52
  useImperativeHandle(control?.controlRef, () => ({
23
- onOpen: handleOpen,
24
- onClose: handleClose,
53
+ onOpen: handleOpenRequest,
54
+ onClose: handleCloseRequest,
25
55
  }));
26
56
 
27
57
  return {
28
- isOpen: control?.isOpen,
29
- onClose: handleClose,
30
- elementRef: elementRef,
58
+ isOpen: isMounted,
59
+ onClose: handleCloseRequest,
60
+ elementRef,
31
61
  };
32
62
  };
@@ -83,7 +83,7 @@ $btn-colors: (primary, neutral, danger);
83
83
 
84
84
  ///// Icon Button /////
85
85
 
86
- .iui-icon-btn {
86
+ .iui-btn.iui-icon-btn {
87
87
  @each $size, $vars in buttonMaps.$icon-button-sizes {
88
88
  &.#{$size} {
89
89
  min-height: map.get($vars, size);
@@ -46,60 +46,3 @@
46
46
  }
47
47
  }
48
48
  }
49
-
50
- // Radio group
51
- .radio-group {
52
- display: flex;
53
- width: fit-content;
54
- &.column {
55
- flex-direction: column;
56
- }
57
- &.row {
58
- align-items: center;
59
- flex-direction: row;
60
- }
61
- }
62
-
63
- // Radio
64
- .iui-radio {
65
- display: inline-flex;
66
- user-select: none;
67
- padding: 8px;
68
- font-size: var(--fs-m);
69
- width: fit-content;
70
- gap: 8px;
71
- .icon {
72
- position: relative;
73
- height: 20px;
74
- width: 20px;
75
- border-radius: 20px;
76
- border: 2px solid #d0d5dd;
77
- min-width: 20px;
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- .dot {
82
- height: 8px;
83
- width: 8px;
84
- border-radius: 8px;
85
- background-color: var(--background);
86
- transform: scale(0);
87
- transition: transform 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
88
- }
89
- &.selected {
90
- background-color: var(--primary);
91
- border-color: var(--primary);
92
- .dot {
93
- transform: scale(1);
94
- }
95
- }
96
- }
97
- .radio-content {
98
- p {
99
- line-height: 20px;
100
- }
101
- .label {
102
- font-weight: 500;
103
- }
104
- }
105
- }
@@ -24,6 +24,15 @@
24
24
  justify-content: center;
25
25
  align-items: center;
26
26
  z-index: 1000;
27
+ }
28
+ .simple-loader {
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ }
33
+
34
+ .loader,
35
+ .simple-loader {
27
36
  .spinner {
28
37
  display: inline-block;
29
38
  width: 50px;
@@ -1,2 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTranslation as r}from"react-i18next";import{Link as a}from"react-router";import{Button as c}from"./index.js";import"@fortawesome/react-fontawesome";import"@hello-pangea/dnd";import"clsx";import"dayjs";import"react-toastify";import"react";import"react-dom";import"react-calendar";import"react-select";import"react-select-async-paginate";import"react-select/async-creatable";const o=()=>{const{t:o}=r();return e("div",{className:"full-screen-page",children:[e("div",{id:"content",children:[t("h1",{children:o("NoAccessPage")}),t("p",{className:"subtitle",children:o("NoAccessPageInfo")})]}),t("p",{id:"img",className:"img-403",children:"403"}),t("div",{id:"actions",children:t(a,{to:"/",children:t(c,{label:o("ReturnToHomepage")})})})]})};export{o as default};
2
- //# sourceMappingURL=NoAccessPage-DTPU8bP2.js.map