@itcase/ui 1.2.13 → 1.2.15

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 (52) hide show
  1. package/dist/{DropdownItem-Dy3DG4XJ.js → DropdownItem-CEPQWGQ5.js} +2 -1
  2. package/dist/{DropdownItem-agqkY0-H.js → DropdownItem-sLbGv_08.js} +2 -1
  3. package/dist/{Group-BXfLh7AZ.js → Group-12uup5mu.js} +11 -9
  4. package/dist/{Group-Buo_BxGT.js → Group-BDuYmoBK.js} +11 -9
  5. package/dist/cjs/components/CookiesWarning.js +1 -1
  6. package/dist/cjs/components/Dropdown.js +1 -1
  7. package/dist/cjs/components/FormField.js +1 -1
  8. package/dist/cjs/components/Group.js +2 -2
  9. package/dist/cjs/components/Notification.js +1 -0
  10. package/dist/cjs/components/Page.js +64 -389
  11. package/dist/cjs/components/Pagination.js +1 -1
  12. package/dist/cjs/components/Panel.js +5 -6
  13. package/dist/cjs/components/Response.js +1 -1
  14. package/dist/cjs/components/Select.js +1 -1
  15. package/dist/cjs/context/Notifications.js +128 -144
  16. package/dist/cjs/context/UIContext.js +22 -31
  17. package/dist/cjs/hooks/styleAttributes.interface.js +2 -0
  18. package/dist/cjs/hooks/useDeviceTargetClass.js +1 -0
  19. package/dist/cjs/hooks/useStyles.js +1 -0
  20. package/dist/cjs/hooks.js +2 -0
  21. package/dist/components/CookiesWarning.js +1 -1
  22. package/dist/components/Dropdown.js +1 -1
  23. package/dist/components/FormField.js +1 -1
  24. package/dist/components/Group.js +2 -2
  25. package/dist/components/Notification.js +1 -0
  26. package/dist/components/Page.js +64 -389
  27. package/dist/components/Pagination.js +1 -1
  28. package/dist/components/Panel.js +5 -6
  29. package/dist/components/Response.js +1 -1
  30. package/dist/components/Select.js +1 -1
  31. package/dist/context/Notifications.js +129 -145
  32. package/dist/context/UIContext.js +23 -32
  33. package/dist/css/components/DatePicker/DatePicker.css +26 -32
  34. package/dist/css/components/Group/Group.css +24 -0
  35. package/dist/hooks/styleAttributes.interface.js +1 -0
  36. package/dist/hooks/useDeviceTargetClass.js +1 -0
  37. package/dist/hooks/useStyles.js +1 -0
  38. package/dist/hooks.js +1 -0
  39. package/dist/types/components/Group/Group.d.ts +2 -6
  40. package/dist/types/components/Page/index.d.ts +42 -0
  41. package/dist/types/components/Panel/Panel.d.ts +2 -4
  42. package/dist/types/constants/componentProps/align.d.ts +2 -0
  43. package/dist/types/constants/componentProps/alignDirection.d.ts +2 -0
  44. package/dist/types/constants/componentProps/fill.d.ts +2 -0
  45. package/dist/types/constants/componentProps/horizontalResizeMode.d.ts +2 -0
  46. package/dist/types/constants/componentProps/position.d.ts +2 -0
  47. package/dist/types/constants/componentProps/verticalResizeMode.d.ts +2 -0
  48. package/dist/types/context/Notifications.d.ts +14 -11
  49. package/dist/types/context/Notifications.interface.d.ts +25 -0
  50. package/dist/types/context/UIContext.d.ts +5 -4
  51. package/dist/types/context/index.d.ts +2 -0
  52. package/package.json +19 -18
@@ -1,19 +1,22 @@
1
- export function NotificationsProvider(props: any): import("react/jsx-runtime").JSX.Element;
2
- export namespace NotificationsProvider {
3
- namespace propTypes {
4
- let children: PropTypes.Requireable<any>;
5
- let initialNotificationsList: PropTypes.Requireable<any[]>;
6
- }
1
+ import PropTypes from 'prop-types';
2
+ import type { tId } from '@itcase/common';
3
+ import type { iCreatedNotification, iNotificationsProviderProps } from './Notifications.interface';
4
+ declare function NotificationsProvider(props: iNotificationsProviderProps): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace NotificationsProvider {
6
+ var propTypes: {
7
+ children: PropTypes.Requireable<any>;
8
+ initialNotificationsList: PropTypes.Requireable<any[]>;
9
+ };
7
10
  }
8
- export function useNotifications(): never[];
9
- export function useNotificationsAPI(): {
10
- hideNotifications: (targetId: any) => void;
11
+ declare function useNotifications(): never[];
12
+ declare function useNotificationsAPI(): {
13
+ hideNotifications: (targetId: tId) => void;
11
14
  notificationStatuses: {
12
15
  error: string;
13
16
  info: string;
14
17
  success: string;
15
18
  warning: string;
16
19
  };
17
- showNotification: (notification: any, onClose: any) => void;
20
+ showNotification: (notification: string | iCreatedNotification, onClose?: () => void) => void;
18
21
  };
19
- import PropTypes from 'prop-types';
22
+ export { NotificationsProvider, useNotifications, useNotificationsAPI };
@@ -0,0 +1,25 @@
1
+ import type { tId } from '@itcase/common';
2
+ interface iNotification {
3
+ id: tId;
4
+ _closeTimeout?: ReturnType<typeof setTimeout>;
5
+ closeByTime: number | false;
6
+ status: 'error' | 'info' | 'success' | 'warning';
7
+ text: string;
8
+ textColor: string;
9
+ title: string;
10
+ onClose?: () => void;
11
+ }
12
+ interface iCreatedNotification {
13
+ id?: iNotification['id'];
14
+ closeByTime?: iNotification['closeByTime'];
15
+ status?: iNotification['status'];
16
+ text?: iNotification['text'];
17
+ textColor?: iNotification['textColor'];
18
+ title?: iNotification['title'];
19
+ onClose?: iNotification['onClose'];
20
+ }
21
+ interface iNotificationsProviderProps {
22
+ children: React.ReactNode;
23
+ initialNotificationsList: iCreatedNotification[];
24
+ }
25
+ export type { iNotification, iCreatedNotification, iNotificationsProviderProps };
@@ -1,11 +1,12 @@
1
- export const UIProvider: React.NamedExoticComponent<object>;
2
- export function useUserDeviceContext(): {
1
+ import React from 'react';
2
+ declare function useUserDeviceContext(): {
3
3
  isMobile: boolean;
4
4
  isTablet: boolean;
5
5
  isDesktop: boolean;
6
6
  };
7
- export function useSiteMenuContext(): {
7
+ declare function useSiteMenuContext(): {
8
8
  isSiteMenuOpen: boolean;
9
9
  setIsSiteMenuOpen: () => void;
10
10
  };
11
- import React from 'react';
11
+ declare const UIProvider: React.NamedExoticComponent<object>;
12
+ export { UIProvider, useUserDeviceContext, useSiteMenuContext };
@@ -0,0 +1,2 @@
1
+ export * from './Notifications';
2
+ export * from './UIContext';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -37,9 +37,9 @@
37
37
  }
38
38
  },
39
39
  "exports": {
40
- "./types/components/Modal/Modal.interface": {
41
- "import": "./dist/types/components/Modal/Modal.interface.d.ts",
42
- "types": "./dist/types/components/Modal/Modal.interface.d.ts"
40
+ "./types/components/*/*.interface": {
41
+ "import": "./dist/types/components/*/*.interface.d.ts",
42
+ "types": "./dist/types/components/*/*.interface.d.ts"
43
43
  },
44
44
  "./components/*": {
45
45
  "import": "./dist/components/*.js",
@@ -90,18 +90,18 @@
90
90
  "registry": "https://registry.npmjs.org/"
91
91
  },
92
92
  "dependencies": {
93
- "@itcase/common": "^1.2.10",
93
+ "@itcase/common": "^1.2.11",
94
94
  "clsx": "^2.1.1",
95
95
  "html5-boilerplate": "^9.0.1",
96
96
  "js-cookie": "^3.0.5",
97
97
  "lodash": "^4.17.21",
98
98
  "luxon": "^3.5.0",
99
99
  "prop-types": "^15.8.1",
100
- "rc-slider": "^11.1.5",
100
+ "rc-slider": "^11.1.6",
101
101
  "react": "^18.3.1",
102
102
  "react-dadata": "^2.23.3",
103
103
  "react-date-range": "^2.0.1",
104
- "react-datepicker": "^7.3.0",
104
+ "react-datepicker": "^7.4.0",
105
105
  "react-dom": "^18.3.1",
106
106
  "react-indiana-drag-scroll": "^3.0.3-alpha",
107
107
  "react-inlinesvg": "^4.1.3",
@@ -111,7 +111,7 @@
111
111
  "react-responsive": "^10.0.0",
112
112
  "react-scroll": "^1.9.0",
113
113
  "react-scrollbars-custom": "^4.1.1",
114
- "react-select": "^5.8.0",
114
+ "react-select": "^5.8.1",
115
115
  "swiper": "^11.1.14",
116
116
  "uuid": "^10.0.0"
117
117
  },
@@ -125,26 +125,27 @@
125
125
  "@commitlint/config-conventional": "^19.5.0",
126
126
  "@itcase/lint": "^1.0.13",
127
127
  "@rollup/plugin-babel": "^6.0.4",
128
- "@rollup/plugin-commonjs": "^26.0.1",
128
+ "@rollup/plugin-commonjs": "^28.0.0",
129
129
  "@rollup/plugin-json": "^6.1.0",
130
- "@rollup/plugin-node-resolve": "^15.2.3",
130
+ "@rollup/plugin-node-resolve": "^15.3.0",
131
131
  "@rollup/plugin-terser": "^0.4.4",
132
- "@rollup/plugin-typescript": "^11.1.6",
132
+ "@rollup/plugin-typescript": "^12.1.0",
133
133
  "@semantic-release/changelog": "^6.0.3",
134
134
  "@semantic-release/git": "^10.0.1",
135
135
  "@semantic-release/release-notes-generator": "14.0.1",
136
136
  "@types/js-cookie": "^3.0.6",
137
- "@types/lodash": "^4.17.7",
137
+ "@types/lodash": "^4.17.9",
138
138
  "@types/react": "^18",
139
139
  "@types/react-datepicker": "^7.0.0",
140
140
  "@types/react-dom": "^18.3.0",
141
141
  "@types/react-scroll": "^1.8.10",
142
+ "@types/uuid": "^10.0.0",
142
143
  "babel-loader": "^9.2.1",
143
144
  "babel-plugin-inline-react-svg": "^2.0.2",
144
145
  "babel-plugin-react-docgen": "^4.2.1",
145
146
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
146
147
  "conventional-changelog-conventionalcommits": "^8.0.0",
147
- "eslint": "9.10.0",
148
+ "eslint": "9.11.1",
148
149
  "husky": "^9.1.6",
149
150
  "lint-staged": "^15.2.10",
150
151
  "npm": "^10.8.3",
@@ -161,22 +162,22 @@
161
162
  "postcss-hexrgba": "^2.1.0",
162
163
  "postcss-import": "^16.1.0",
163
164
  "postcss-import-ext-glob": "^2.1.1",
164
- "postcss-mixins": "^11.0.1",
165
+ "postcss-mixins": "^11.0.2",
165
166
  "postcss-nested": "^6.2.0",
166
167
  "postcss-nested-ancestors": "^3.0.0",
167
- "postcss-normalize": "^13.0.0",
168
+ "postcss-normalize": "^13.0.1",
168
169
  "postcss-prepend-imports": "^1.0.1",
169
- "postcss-preset-env": "^10.0.3",
170
+ "postcss-preset-env": "^10.0.5",
170
171
  "postcss-pxtorem": "^6.1.0",
171
172
  "postcss-responsive-type": "github:ITCase/postcss-responsive-type",
172
173
  "postcss-sort-media-queries": "^5.2.0",
173
174
  "prettier": "^3.3.3",
174
- "rollup": "^4.21.3",
175
+ "rollup": "^4.22.5",
175
176
  "rollup-plugin-copy": "^3.5.0",
176
177
  "rollup-plugin-dts": "^6.1.1",
177
178
  "rollup-plugin-peer-deps-external": "^2.2.4",
178
179
  "rollup-preserve-directives": "^1.1.1",
179
- "semantic-release": "^24.1.1",
180
+ "semantic-release": "^24.1.2",
180
181
  "stylelint": "^16.9.0",
181
182
  "typescript": "^5.6.2"
182
183
  }