@cyber-harbour/ui 1.0.78 → 2.0.0

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/README.md CHANGED
@@ -1,73 +1,73 @@
1
- # Getting Started with Cyber Harbor UI Kit
1
+ # Початок роботи з Cyber Harbor UI Kit
2
2
 
3
- ## Development
3
+ ## Розробка
4
4
 
5
- ### Installation
5
+ ### Встановлення
6
6
 
7
7
  ```bash
8
8
  npm install
9
9
  ```
10
10
 
11
- ### Building the Library
11
+ ### Збірка бібліотеки
12
12
 
13
- The library is built using tsup, which provides optimized builds for both ESM and CommonJS formats.
13
+ Бібліотека збирається за допомогою tsup, що забезпечує оптимізовані збірки для форматів ESM та CommonJS.
14
14
 
15
15
  ```bash
16
- # Development with watch mode
16
+ # Розробка з режимом відстеження
17
17
  npm run dev
18
18
 
19
- # Production build
19
+ # Продакшн збірка
20
20
  npm run build
21
21
 
22
- # Build without minification
22
+ # Збірка без мінімізації
23
23
  npm run build:dev
24
24
 
25
- # Type checking without build
25
+ # Перевірка типів без збірки
26
26
  npm run type-check
27
27
  ```
28
28
 
29
- ### Build Output
29
+ ### Результат збірки
30
30
 
31
- When building the library, the following is generated in the `dist` folder:
31
+ При збірці бібліотеки в папці `dist` генерується наступне:
32
32
 
33
- - ESM modules (`.mjs` files)
34
- - CommonJS modules (`.js` files)
35
- - TypeScript declaration files (`.d.ts` and `.d.mts`)
33
+ - ESM модулі (`.mjs` файли)
34
+ - CommonJS модулі (`.js` файли)
35
+ - TypeScript файли декларацій (`.d.ts` та `.d.mts`)
36
36
  - Source maps
37
37
 
38
38
  ### Storybook
39
39
 
40
- You can run Storybook to develop and test components:
40
+ Ви можете запустити Storybook для розробки та тестування компонентів:
41
41
 
42
42
  ```bash
43
43
  npm run storybook
44
44
  ```
45
45
 
46
- To build Storybook:
46
+ Для збірки Storybook:
47
47
 
48
48
  ```bash
49
49
  npm run build-storybook
50
50
  ```
51
51
 
52
- ## Build Optimizations
52
+ ## Оптимізації збірки
53
53
 
54
- The project uses various optimizations for efficient building:
54
+ Проект використовує різні оптимізації для ефективної збірки:
55
55
 
56
- ### Production Mode
56
+ ### Продакшн режим
57
57
 
58
- - Minification of the output files
59
- - Tree shaking to remove unused code
60
- - Console logs removal
61
- - Source maps for debugging
58
+ - Мінімізація вихідних файлів
59
+ - Tree shaking для видалення невикористаного коду
60
+ - Видалення console logs
61
+ - Source maps для налагодження
62
62
 
63
- ### Development Mode
63
+ ### Режим розробки
64
64
 
65
- - Watch mode for auto-rebuilding on changes
66
- - Inline source maps for easier debugging
67
- - No minification for faster builds
68
- - No type generation for speed
65
+ - Режим відстеження для автоматичної перебудови при змінах
66
+ - Вбудовані source maps для легшого налагодження
67
+ - Без мінімізації для швидшої збірки
68
+ - Без генерації типів для швидкості
69
69
 
70
- ## UI Library Switch Tool
70
+ ## Інструмент перемикання UI бібліотеки
71
71
 
72
72
  Цей інструмент дозволяє легко перемикатися між локальною версією UI бібліотеки та версією з NPM.
73
73
 
@@ -142,3 +142,113 @@ projects/
142
142
  - `dotenv` - для читання змінних середовища (опційно)
143
143
 
144
144
  Ці пакети автоматично встановлюються разом з UI бібліотекою.
145
+
146
+ ### Усунення несправностей
147
+
148
+ Відсутній лінк на бібліотеку після першого завантаження. Запустіть
149
+
150
+ ```bash
151
+ npm link
152
+ ```
153
+
154
+ ---
155
+
156
+ # 🔹 Інструкція інтеграції UI-kit у Next.js з Tailwind
157
+
158
+ Цей UI-kit побудований на **TailwindCSS** і постачається з власною конфігурацією (`tailwind.config.js`).
159
+ Щоб уникнути конфліктів і дозволити кастомізацію у проєкті, потрібно **мерджити** конфіг UI-kit із конфігом Next.js.
160
+
161
+ ---
162
+
163
+ ## 1. Встановіть залежності
164
+
165
+ У вашому Next.js-проєкті мають бути встановлені:
166
+
167
+ ```bash
168
+ pnpm add tailwindcss postcss autoprefixer
169
+ ```
170
+
171
+ ---
172
+
173
+ ## 2. Створіть `tailwind.config.js` у Next.js
174
+
175
+ У корені вашого Next.js-проєкту створіть файл `tailwind.config.js` і підключіть конфіг із UI-kit.
176
+ Ми будемо мерджити конфіги за допомогою `lodash.merge`:
177
+
178
+ ```bash
179
+ pnpm add lodash.merge
180
+ ```
181
+
182
+ **`tailwind.config.js`**
183
+
184
+ ```js
185
+ const merge = require('lodash.merge');
186
+ const uiKitConfig = require('ui-kit/tailwind.config.js'); // шлях до UI-kit пакета
187
+
188
+ module.exports = merge({}, uiKitConfig, {
189
+ content: [
190
+ './pages/**/*.{js,ts,jsx,tsx}',
191
+ './components/**/*.{js,ts,tsx}',
192
+ './app/**/*.{js,ts,jsx,tsx}', // якщо використовуєте app router
193
+ './node_modules/ui-kit/**/*.{js,ts,tsx}', // важливо: UI-kit компоненти
194
+ ],
195
+ theme: {
196
+ extend: {
197
+ colors: {
198
+ accent: '#f59e0b', // локальні кольори вашого проєкту
199
+ },
200
+ },
201
+ },
202
+ });
203
+ ```
204
+
205
+ ---
206
+
207
+ ## 3. Підключіть Tailwind у глобальні стилі
208
+
209
+ У вашому Next.js проєкті додайте у `globals.css` (або `app/globals.css`):
210
+
211
+ ```css
212
+ @tailwind base;
213
+ @tailwind components;
214
+ @tailwind utilities;
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 4. Використання компонентів із UI-kit
220
+
221
+ Тепер ви можете імпортувати і використовувати компоненти з UI-kit у будь-яких файлах вашого Next.js-проєкту:
222
+
223
+ ```tsx
224
+ import { Button } from 'ui-kit';
225
+
226
+ export default function Page() {
227
+ return (
228
+ <div className="p-6">
229
+ <Button variant="primary">Клікни мене</Button>
230
+ </div>
231
+ );
232
+ }
233
+ ```
234
+
235
+ ---
236
+
237
+ ## 5. Кастомізація теми
238
+
239
+ Якщо потрібно змінити кольори, spacing чи інші токени —
240
+ додавайте їх у секцію `theme.extend` вашого `tailwind.config.js`.
241
+
242
+ ⚡️ Вони автоматично поєднаються з токенами з UI-kit.
243
+
244
+ ---
245
+
246
+ ✅ У результаті:
247
+
248
+ - UI-kit і Next.js використовують одну базу токенів
249
+ - ви можете кастомізувати тему локально у проєкті
250
+ - конфліктів у Tailwind-конфігах не буде
251
+
252
+ ---
253
+
254
+ Хочеш, я під це ще складу **готовий приклад `README.md`** для твого UI-kit (з секціями Install / Setup / Usage), щоб воно виглядало як справжня документація пакета?
package/dist/index.d.mts CHANGED
@@ -1,16 +1,13 @@
1
- import * as react from 'react';
2
- import react__default, { SVGProps, CSSProperties as CSSProperties$1, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
- import * as styled_components from 'styled-components';
4
1
  import { CSSProperties, DefaultTheme } from 'styled-components';
5
2
  export { ServerStyleSheet, StyleSheetManager } from 'styled-components';
6
3
  import * as styled_components_dist_types from 'styled-components/dist/types';
7
4
  import { DefaultTheme as DefaultTheme$1 } from 'styled-components/dist/types';
5
+ import * as react from 'react';
6
+ import react__default, { SVGProps, CSSProperties as CSSProperties$1, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
8
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
8
  import { PopoverPosition, PopoverAlign } from 'react-tiny-popover';
10
9
  import { IContentLoaderProps } from 'react-content-loader';
11
10
 
12
- declare const GlobalStyle: react.NamedExoticComponent<styled_components.ExecutionProps & object>;
13
-
14
11
  interface ThemeProviderProps {
15
12
  children: any;
16
13
  mode?: 'light' | 'LIGHT' | 'dark' | 'DARK';
@@ -814,19 +811,10 @@ interface RotateRightIconProps extends SVGProps<SVGSVGElement> {
814
811
  }
815
812
  declare const RotateRightIcon: ({ fill, ...props }: RotateRightIconProps) => react_jsx_runtime.JSX.Element;
816
813
 
817
- interface BurgerMenuIconProps extends SVGProps<SVGSVGElement> {
818
- fill?: string;
819
- }
820
- declare const BurgerMenuIcon: ({ fill, ...props }: BurgerMenuIconProps) => react_jsx_runtime.JSX.Element;
821
-
822
- interface ClockIconProps extends SVGProps<SVGSVGElement> {
823
- fill?: string;
824
- }
825
- declare const ClockIcon: ({ fill, ...props }: ClockIconProps) => react_jsx_runtime.JSX.Element;
826
-
827
814
  interface SidebarProps {
828
815
  defaultCollapsed?: boolean;
829
816
  children: any;
817
+ canGrow: boolean;
830
818
  }
831
819
  declare const Sidebar: react__default.ForwardRefExoticComponent<SidebarProps & {
832
820
  m?: string | number;
@@ -856,6 +844,7 @@ declare const Sidebar: react__default.ForwardRefExoticComponent<SidebarProps & {
856
844
  interface SidebarContext {
857
845
  collapsed: boolean;
858
846
  setCollapsed: React.Dispatch<React.SetStateAction<boolean>>;
847
+ canGrow: boolean;
859
848
  }
860
849
  declare const SidebarContext: react.Context<SidebarContext>;
861
850
 
@@ -863,8 +852,6 @@ interface SidebarItemBase {
863
852
  active?: boolean;
864
853
  icon?: React.ComponentType<SVGProps<SVGSVGElement>>;
865
854
  label?: string;
866
- height?: number;
867
- iconSize?: number;
868
855
  }
869
856
  interface SidebarItemAnchor {
870
857
  href: string;
@@ -876,19 +863,17 @@ interface SidebarItemButton {
876
863
  onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
877
864
  }
878
865
  type SidebarItemProps = SidebarItemBase & (SidebarItemAnchor | SidebarItemButton);
879
- declare const SidebarItem: ({ active, icon: Icon, label, height, iconSize, ...props }: SidebarItemProps) => react_jsx_runtime.JSX.Element;
866
+ declare const SidebarItem: ({ active, icon: Icon, label, ...props }: SidebarItemProps) => react_jsx_runtime.JSX.Element;
880
867
 
881
868
  declare const SidebarDelimeter: () => react_jsx_runtime.JSX.Element;
882
869
 
883
- type SectionRole = 'header' | 'footer' | 'content';
884
870
  interface SidebarSectionProps {
885
871
  grow?: number;
886
872
  shrink?: number;
887
873
  basis?: CSSProperties['flexBasis'];
888
874
  items: React.ReactElement[];
889
- role: SectionRole;
890
875
  }
891
- declare const SidebarSection: ({ grow, shrink, basis, items, role }: SidebarSectionProps) => react_jsx_runtime.JSX.Element;
876
+ declare const SidebarSection: ({ grow, shrink, basis, items }: SidebarSectionProps) => react_jsx_runtime.JSX.Element;
892
877
 
893
878
  type TypographyProps = FabricComponent<{
894
879
  style?: CSSProperties$1;
@@ -1026,7 +1011,7 @@ declare const ListMenuSection: ({ title, items }: ListMenuSectionProps) => react
1026
1011
  interface HeaderProps {
1027
1012
  children?: any;
1028
1013
  }
1029
- declare const Header: react.ForwardRefExoticComponent<HeaderProps & react.RefAttributes<HTMLHeadElement>>;
1014
+ declare const Header: ({ children }: HeaderProps) => react_jsx_runtime.JSX.Element;
1030
1015
 
1031
1016
  declare const HeaderDelimeter: () => react_jsx_runtime.JSX.Element;
1032
1017
 
@@ -1090,9 +1075,9 @@ interface ContextMenuProps {
1090
1075
  }
1091
1076
  declare const ContextMenu: ({ isOpen, onClickOutside, onClick, anchor, size, disabled, fullWidth, className, positions, align, children, hasBorder, maxHeight, matchAnchorWidth, anchorIcon, }: ContextMenuProps) => react_jsx_runtime.JSX.Element;
1092
1077
 
1093
- interface StyledProps$1 {
1078
+ interface StyledProps {
1094
1079
  }
1095
- declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps$1>> & string;
1080
+ declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
1096
1081
 
1097
1082
  declare const useContextMenuControl: () => {
1098
1083
  isOpen: boolean;
@@ -1629,30 +1614,24 @@ declare const ModalHeader: styled_components_dist_types.IStyledComponentBase<"we
1629
1614
  declare const ModalBody: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1630
1615
  declare const ModalFooter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1631
1616
 
1632
- interface PageLayoutProps {
1633
- children?: any;
1634
- className?: string;
1617
+ interface TailwindExampleProps {
1618
+ variant?: 'primary' | 'secondary' | 'success' | 'danger';
1619
+ children: react__default.ReactNode;
1635
1620
  }
1636
- declare const PageLayout: ({ children, className }: PageLayoutProps) => react_jsx_runtime.JSX.Element;
1637
- declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1621
+ declare const TailwindExample: react__default.FC<TailwindExampleProps>;
1638
1622
 
1639
- interface ContentProps {
1640
- children: any;
1641
- className?: string;
1642
- }
1643
- declare const PageContent: ({ children, className }: ContentProps) => react_jsx_runtime.JSX.Element;
1644
- declare const StyledMain: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
1645
-
1646
- interface SubNavProps {
1623
+ interface PageLayoutProps {
1624
+ header?: any;
1625
+ sidebar?: any;
1647
1626
  children?: any;
1648
1627
  className?: string;
1649
- top?: number;
1650
1628
  }
1651
- declare const SubNav: ({ children, className, top }: SubNavProps) => react_jsx_runtime.JSX.Element;
1652
- type StyledProps = {
1653
- $top: number;
1654
- };
1655
- declare const Styled: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
1629
+ declare const PageLayout: ({ children, header, sidebar, className }: PageLayoutProps) => react_jsx_runtime.JSX.Element;
1630
+ interface StyledContainerProps {
1631
+ $withHeader?: boolean;
1632
+ $withSidebar?: boolean;
1633
+ }
1634
+ declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledContainerProps>> & string;
1656
1635
 
1657
1636
  type ContainerProps = {
1658
1637
  children: any;
@@ -1835,4 +1814,4 @@ declare const FullscreenCard: react.ForwardRefExoticComponent<FullscreenCardProp
1835
1814
  } | undefined;
1836
1815
  } & react.RefAttributes<unknown>>;
1837
1816
 
1838
- export { type Action, Alert, AlertIcon, AndroidIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BreakpointProvider, BugReportIcon, BurgerMenuIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContentLoader, type ContentLoaderProps, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlashIcon, FlexContainer, FlexItem, FolderAlertIcon, FolderInfoIcon, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, IosIcon, Label, type LabelSize, type LabelSizeStyle, Line, LinerProgress, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MicrosoftIcon, Modal, ModalBody, ModalFooter, ModalHeader, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, Overlay, type OverlayProps, PageContent, PageLayout, Pagination, type PaginationProps, PassportIcon, PasswordFinderIcon, PencilIcon, PhonebookIcon, PlaneIcon, PlusIcon, PointIcon, PrintIcon, Profiler2Icon, ProfilerIcon, RelationIcon, RelationPointsIcon, type RenderCellProps, type RenderHeaderCellProps, RotateLeftIcon, RotateRightIcon, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, Styled, StyledContainer, type StyledFabricComponent, StyledMain, SubNav, SunIcon, Switch, type SwitchState, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Tooltip, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UserInCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, createStyledComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getResponsiveProps, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useBreakpoint, useContextMenuControl, useTheme };
1817
+ export { type Action, Alert, AlertIcon, AndroidIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BreakpointProvider, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContentLoader, type ContentLoaderProps, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlashIcon, FlexContainer, FlexItem, FolderAlertIcon, FolderInfoIcon, FullscreenCard, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, IosIcon, Label, type LabelSize, type LabelSizeStyle, Line, LinerProgress, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MicrosoftIcon, Modal, ModalBody, ModalFooter, ModalHeader, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, Overlay, type OverlayProps, PageLayout, Pagination, type PaginationProps, PassportIcon, PasswordFinderIcon, PencilIcon, PhonebookIcon, PlaneIcon, PlusIcon, PointIcon, PrintIcon, Profiler2Icon, ProfilerIcon, RelationIcon, RelationPointsIcon, type RenderCellProps, type RenderHeaderCellProps, RotateLeftIcon, RotateRightIcon, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, type StyledFabricComponent, SunIcon, Switch, type SwitchState, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, TailwindExample, type TailwindExampleProps, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Tooltip, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UserInCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, createStyledComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getResponsiveProps, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useBreakpoint, useContextMenuControl, useTheme };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,13 @@
1
- import * as react from 'react';
2
- import react__default, { SVGProps, CSSProperties as CSSProperties$1, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
- import * as styled_components from 'styled-components';
4
1
  import { CSSProperties, DefaultTheme } from 'styled-components';
5
2
  export { ServerStyleSheet, StyleSheetManager } from 'styled-components';
6
3
  import * as styled_components_dist_types from 'styled-components/dist/types';
7
4
  import { DefaultTheme as DefaultTheme$1 } from 'styled-components/dist/types';
5
+ import * as react from 'react';
6
+ import react__default, { SVGProps, CSSProperties as CSSProperties$1, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
8
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
8
  import { PopoverPosition, PopoverAlign } from 'react-tiny-popover';
10
9
  import { IContentLoaderProps } from 'react-content-loader';
11
10
 
12
- declare const GlobalStyle: react.NamedExoticComponent<styled_components.ExecutionProps & object>;
13
-
14
11
  interface ThemeProviderProps {
15
12
  children: any;
16
13
  mode?: 'light' | 'LIGHT' | 'dark' | 'DARK';
@@ -814,19 +811,10 @@ interface RotateRightIconProps extends SVGProps<SVGSVGElement> {
814
811
  }
815
812
  declare const RotateRightIcon: ({ fill, ...props }: RotateRightIconProps) => react_jsx_runtime.JSX.Element;
816
813
 
817
- interface BurgerMenuIconProps extends SVGProps<SVGSVGElement> {
818
- fill?: string;
819
- }
820
- declare const BurgerMenuIcon: ({ fill, ...props }: BurgerMenuIconProps) => react_jsx_runtime.JSX.Element;
821
-
822
- interface ClockIconProps extends SVGProps<SVGSVGElement> {
823
- fill?: string;
824
- }
825
- declare const ClockIcon: ({ fill, ...props }: ClockIconProps) => react_jsx_runtime.JSX.Element;
826
-
827
814
  interface SidebarProps {
828
815
  defaultCollapsed?: boolean;
829
816
  children: any;
817
+ canGrow: boolean;
830
818
  }
831
819
  declare const Sidebar: react__default.ForwardRefExoticComponent<SidebarProps & {
832
820
  m?: string | number;
@@ -856,6 +844,7 @@ declare const Sidebar: react__default.ForwardRefExoticComponent<SidebarProps & {
856
844
  interface SidebarContext {
857
845
  collapsed: boolean;
858
846
  setCollapsed: React.Dispatch<React.SetStateAction<boolean>>;
847
+ canGrow: boolean;
859
848
  }
860
849
  declare const SidebarContext: react.Context<SidebarContext>;
861
850
 
@@ -863,8 +852,6 @@ interface SidebarItemBase {
863
852
  active?: boolean;
864
853
  icon?: React.ComponentType<SVGProps<SVGSVGElement>>;
865
854
  label?: string;
866
- height?: number;
867
- iconSize?: number;
868
855
  }
869
856
  interface SidebarItemAnchor {
870
857
  href: string;
@@ -876,19 +863,17 @@ interface SidebarItemButton {
876
863
  onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
877
864
  }
878
865
  type SidebarItemProps = SidebarItemBase & (SidebarItemAnchor | SidebarItemButton);
879
- declare const SidebarItem: ({ active, icon: Icon, label, height, iconSize, ...props }: SidebarItemProps) => react_jsx_runtime.JSX.Element;
866
+ declare const SidebarItem: ({ active, icon: Icon, label, ...props }: SidebarItemProps) => react_jsx_runtime.JSX.Element;
880
867
 
881
868
  declare const SidebarDelimeter: () => react_jsx_runtime.JSX.Element;
882
869
 
883
- type SectionRole = 'header' | 'footer' | 'content';
884
870
  interface SidebarSectionProps {
885
871
  grow?: number;
886
872
  shrink?: number;
887
873
  basis?: CSSProperties['flexBasis'];
888
874
  items: React.ReactElement[];
889
- role: SectionRole;
890
875
  }
891
- declare const SidebarSection: ({ grow, shrink, basis, items, role }: SidebarSectionProps) => react_jsx_runtime.JSX.Element;
876
+ declare const SidebarSection: ({ grow, shrink, basis, items }: SidebarSectionProps) => react_jsx_runtime.JSX.Element;
892
877
 
893
878
  type TypographyProps = FabricComponent<{
894
879
  style?: CSSProperties$1;
@@ -1026,7 +1011,7 @@ declare const ListMenuSection: ({ title, items }: ListMenuSectionProps) => react
1026
1011
  interface HeaderProps {
1027
1012
  children?: any;
1028
1013
  }
1029
- declare const Header: react.ForwardRefExoticComponent<HeaderProps & react.RefAttributes<HTMLHeadElement>>;
1014
+ declare const Header: ({ children }: HeaderProps) => react_jsx_runtime.JSX.Element;
1030
1015
 
1031
1016
  declare const HeaderDelimeter: () => react_jsx_runtime.JSX.Element;
1032
1017
 
@@ -1090,9 +1075,9 @@ interface ContextMenuProps {
1090
1075
  }
1091
1076
  declare const ContextMenu: ({ isOpen, onClickOutside, onClick, anchor, size, disabled, fullWidth, className, positions, align, children, hasBorder, maxHeight, matchAnchorWidth, anchorIcon, }: ContextMenuProps) => react_jsx_runtime.JSX.Element;
1092
1077
 
1093
- interface StyledProps$1 {
1078
+ interface StyledProps {
1094
1079
  }
1095
- declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps$1>> & string;
1080
+ declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
1096
1081
 
1097
1082
  declare const useContextMenuControl: () => {
1098
1083
  isOpen: boolean;
@@ -1629,30 +1614,24 @@ declare const ModalHeader: styled_components_dist_types.IStyledComponentBase<"we
1629
1614
  declare const ModalBody: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1630
1615
  declare const ModalFooter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1631
1616
 
1632
- interface PageLayoutProps {
1633
- children?: any;
1634
- className?: string;
1617
+ interface TailwindExampleProps {
1618
+ variant?: 'primary' | 'secondary' | 'success' | 'danger';
1619
+ children: react__default.ReactNode;
1635
1620
  }
1636
- declare const PageLayout: ({ children, className }: PageLayoutProps) => react_jsx_runtime.JSX.Element;
1637
- declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1621
+ declare const TailwindExample: react__default.FC<TailwindExampleProps>;
1638
1622
 
1639
- interface ContentProps {
1640
- children: any;
1641
- className?: string;
1642
- }
1643
- declare const PageContent: ({ children, className }: ContentProps) => react_jsx_runtime.JSX.Element;
1644
- declare const StyledMain: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
1645
-
1646
- interface SubNavProps {
1623
+ interface PageLayoutProps {
1624
+ header?: any;
1625
+ sidebar?: any;
1647
1626
  children?: any;
1648
1627
  className?: string;
1649
- top?: number;
1650
1628
  }
1651
- declare const SubNav: ({ children, className, top }: SubNavProps) => react_jsx_runtime.JSX.Element;
1652
- type StyledProps = {
1653
- $top: number;
1654
- };
1655
- declare const Styled: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
1629
+ declare const PageLayout: ({ children, header, sidebar, className }: PageLayoutProps) => react_jsx_runtime.JSX.Element;
1630
+ interface StyledContainerProps {
1631
+ $withHeader?: boolean;
1632
+ $withSidebar?: boolean;
1633
+ }
1634
+ declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledContainerProps>> & string;
1656
1635
 
1657
1636
  type ContainerProps = {
1658
1637
  children: any;
@@ -1835,4 +1814,4 @@ declare const FullscreenCard: react.ForwardRefExoticComponent<FullscreenCardProp
1835
1814
  } | undefined;
1836
1815
  } & react.RefAttributes<unknown>>;
1837
1816
 
1838
- export { type Action, Alert, AlertIcon, AndroidIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BreakpointProvider, BugReportIcon, BurgerMenuIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClockIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContentLoader, type ContentLoaderProps, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlashIcon, FlexContainer, FlexItem, FolderAlertIcon, FolderInfoIcon, FullscreenCard, GlobalStyle, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, IosIcon, Label, type LabelSize, type LabelSizeStyle, Line, LinerProgress, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MicrosoftIcon, Modal, ModalBody, ModalFooter, ModalHeader, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, Overlay, type OverlayProps, PageContent, PageLayout, Pagination, type PaginationProps, PassportIcon, PasswordFinderIcon, PencilIcon, PhonebookIcon, PlaneIcon, PlusIcon, PointIcon, PrintIcon, Profiler2Icon, ProfilerIcon, RelationIcon, RelationPointsIcon, type RenderCellProps, type RenderHeaderCellProps, RotateLeftIcon, RotateRightIcon, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, Styled, StyledContainer, type StyledFabricComponent, StyledMain, SubNav, SunIcon, Switch, type SwitchState, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Tooltip, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UserInCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, createStyledComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getResponsiveProps, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useBreakpoint, useContextMenuControl, useTheme };
1817
+ export { type Action, Alert, AlertIcon, AndroidIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, Box, type Breakpoint, BreakpointProvider, BugReportIcon, BusIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseCircleIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, Container, ContentLoader, type ContentLoaderProps, ContextMenu, ContextMenuDelimiter, CrossIcon, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, EditUserIcon, EmptyData, type EmptyDataProps, EnableVisibleIcon, EnterArrowLeftIcon, type FabricComponent, FileIcon, FiltersIcon, FlashIcon, FlexContainer, FlexItem, FolderAlertIcon, FolderInfoIcon, FullscreenCard, Graph2D, type Graph2DProps, type Graph2DRef, type GraphData, type GraphState, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleFilledIcon, InfoCircleIcon, Input, type InputElementProps, type InputElementStyle, type InputProps, type InputSize, type InputSizeStyle, type InputState, type InputVariant, IosIcon, Label, type LabelSize, type LabelSizeStyle, Line, LinerProgress, type LinkObject, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MaximizeIcon, MicrosoftIcon, Modal, ModalBody, ModalFooter, ModalHeader, MoonIcon, type NestedColorPaths, type NodeButton, type NodeObject, OpenLockIcon, OrganizationIcon, Overlay, type OverlayProps, PageLayout, Pagination, type PaginationProps, PassportIcon, PasswordFinderIcon, PencilIcon, PhonebookIcon, PlaneIcon, PlusIcon, PointIcon, PrintIcon, Profiler2Icon, ProfilerIcon, RelationIcon, RelationPointsIcon, type RenderCellProps, type RenderHeaderCellProps, RotateLeftIcon, RotateRightIcon, RowActionsMenu, SandBoxIcon, SearchIcon, Select, ShipIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, type StyledFabricComponent, SunIcon, Switch, type SwitchState, Table, Tag, type TagColor, type TagElementStyle, type TagVariant, TailwindExample, type TailwindExampleProps, type TextAreaElementProps, type Theme, type ThemeMode, ThemeProvider, Tooltip, Typography, type TypographyVariant, UnfoldIcon, UpRightArrowCircleIcon, UserInCircleIcon, UsersIcon, VectorIcon, WayIcon, convertPaletteToRem, createComponent, createStyledComponent, darkTheme, darkThemePx, destructSpaceProps, generatePropertySpaceStyle, getBreakpoint, getButtonSizeStyles, getButtonStyles, getInputStyles, getResponsiveProps, getTypographyStyles, hexToRgba, lightTheme, lightThemePx, propToRem, pxToRem, remToPx, resolveThemeColor, useBreakpoint, useContextMenuControl, useTheme };