@itcase/ui 1.2.12 → 1.2.14

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 (45) hide show
  1. package/dist/{Group-Buo_BxGT.js → Group-9Mpk5tQD.js} +8 -4
  2. package/dist/{Group-BXfLh7AZ.js → Group-C9TsGwJy.js} +8 -4
  3. package/dist/cjs/components/CookiesWarning.js +1 -1
  4. package/dist/cjs/components/FormField.js +1 -1
  5. package/dist/cjs/components/Group.js +1 -1
  6. package/dist/cjs/components/Notification.js +1 -0
  7. package/dist/cjs/components/Panel.js +1 -1
  8. package/dist/cjs/components/Response.js +1 -1
  9. package/dist/cjs/components/Select.js +1 -1
  10. package/dist/cjs/context/Notifications.js +128 -144
  11. package/dist/cjs/context/UIContext.js +22 -31
  12. package/dist/cjs/hooks/styleAttributes.interface.js +2 -0
  13. package/dist/cjs/hooks/useDeviceTargetClass.js +1 -0
  14. package/dist/cjs/hooks/useStyles.js +1 -0
  15. package/dist/cjs/hooks.js +2 -0
  16. package/dist/components/CookiesWarning.js +1 -1
  17. package/dist/components/FormField.js +1 -1
  18. package/dist/components/Group.js +1 -1
  19. package/dist/components/Notification.js +1 -0
  20. package/dist/components/Panel.js +1 -1
  21. package/dist/components/Response.js +1 -1
  22. package/dist/components/Select.js +1 -1
  23. package/dist/context/Notifications.js +129 -145
  24. package/dist/context/UIContext.js +23 -32
  25. package/dist/css/components/DatePicker/DatePicker.css +26 -32
  26. package/dist/css/components/Group/Group.css +24 -0
  27. package/dist/css/styles/mediaqueries.css +1 -1
  28. package/dist/hooks/styleAttributes.interface.js +1 -0
  29. package/dist/hooks/useDeviceTargetClass.js +1 -0
  30. package/dist/hooks/useStyles.js +1 -0
  31. package/dist/hooks.js +1 -0
  32. package/dist/types/components/Page/index.d.ts +42 -0
  33. package/dist/types/constants/componentProps/align.d.ts +2 -0
  34. package/dist/types/constants/componentProps/alignDirection.d.ts +2 -0
  35. package/dist/types/constants/componentProps/fill.d.ts +2 -0
  36. package/dist/types/constants/componentProps/horizontalResizeMode.d.ts +2 -0
  37. package/dist/types/constants/componentProps/position.d.ts +2 -0
  38. package/dist/types/constants/componentProps/verticalResizeMode.d.ts +2 -0
  39. package/dist/types/context/Notifications.d.ts +14 -11
  40. package/dist/types/context/Notifications.interface.d.ts +25 -0
  41. package/dist/types/context/UIContext.d.ts +5 -4
  42. package/dist/types/context/index.d.ts +2 -0
  43. package/package.json +19 -18
  44. package/dist/cjs/components/Page.js +0 -416
  45. package/dist/components/Page.js +0 -414
@@ -1,414 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import clsx from 'clsx';
4
- import alignDirectionProps from '../constants/componentProps/alignDirection.js';
5
- import alignProps from '../constants/componentProps/align.js';
6
- import fillProps from '../constants/componentProps/fill.js';
7
- import horizontalResizeModeProps from '../constants/componentProps/horizontalResizeMode.js';
8
- import positionProps from '../constants/componentProps/position.js';
9
- import verticalResizeModeProps from '../constants/componentProps/verticalResizeMode.js';
10
- import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
11
- import { useStyles } from '../hooks/useStyles.js';
12
- import 'lodash/castArray';
13
- import 'lodash/camelCase';
14
- import '../context/UIContext.js';
15
- import '../hooks/useMediaQueries.js';
16
- import 'react-responsive';
17
- import 'lodash/maxBy';
18
- import 'lodash/upperFirst';
19
- import '../hooks/styleAttributes.js';
20
-
21
- function Page(props) {
22
- const {
23
- after,
24
- before,
25
- children,
26
- className,
27
- id,
28
- tag: Tag,
29
- type
30
- } = props;
31
- const alignDirectionClass = useDeviceTargetClass(props, {
32
- prefix: 'align_',
33
- propsKey: 'alignDirection'
34
- });
35
- const alignClass = useDeviceTargetClass(props, {
36
- prefix: 'align_',
37
- propsKey: 'align'
38
- });
39
- const resizeHorizontalClass = useDeviceTargetClass(props, {
40
- prefix: 'wrapper_resize-horizontal_',
41
- propsKey: 'horizontalResizing'
42
- });
43
- const resizeVerticalClass = useDeviceTargetClass(props, {
44
- prefix: 'wrapper_resize-vertical_',
45
- propsKey: 'verticalResizing'
46
- });
47
- const fillClass = useDeviceTargetClass(props, {
48
- prefix: 'fill_',
49
- propsKey: 'fill'
50
- });
51
- const positionClass = useDeviceTargetClass(props, {
52
- prefix: 'position_',
53
- propsKey: 'position'
54
- });
55
- const {
56
- styles,
57
- wrapper: wrapperStyles
58
- } = useStyles(props);
59
- return /*#__PURE__*/React.createElement("div", {
60
- id: id,
61
- className: clsx('page', className, type && `${className}_type_${type}`, fillClass, resizeHorizontalClass, resizeVerticalClass, positionClass),
62
- style: styles
63
- }, /*#__PURE__*/React.createElement("div", {
64
- className: clsx('page__wrapper', alignDirectionClass, alignClass, 'content'),
65
- style: wrapperStyles
66
- }, before, children, after));
67
- }
68
- Page.propTypes = {
69
- children: PropTypes.any,
70
- className: PropTypes.string,
71
- before: PropTypes.string,
72
- after: PropTypes.string,
73
- id: PropTypes.string,
74
- fill: PropTypes.oneOf(fillProps),
75
- fillMobile: PropTypes.oneOf(fillProps),
76
- fillTablet: PropTypes.oneOf(fillProps),
77
- fillDesktop: PropTypes.oneOf(fillProps),
78
- type: PropTypes.string,
79
- tag: PropTypes.string,
80
- position: PropTypes.oneOf(positionProps),
81
- positionMobile: PropTypes.oneOf(positionProps),
82
- positionTablet: PropTypes.oneOf(positionProps),
83
- positionDesktop: PropTypes.oneOf(positionProps),
84
- wrapperPosition: PropTypes.oneOf(positionProps),
85
- wrapperPositionMobile: PropTypes.oneOf(positionProps),
86
- wrapperPositionTablet: PropTypes.oneOf(positionProps),
87
- wrapperPositionDesktop: PropTypes.oneOf(positionProps),
88
- horizontalResizing: PropTypes.oneOf(horizontalResizeModeProps),
89
- horizontalResizingMobile: PropTypes.oneOf(horizontalResizeModeProps),
90
- horizontalResizingTablet: PropTypes.oneOf(horizontalResizeModeProps),
91
- horizontalResizingDesktop: PropTypes.oneOf(horizontalResizeModeProps),
92
- verticalResizing: PropTypes.oneOf(verticalResizeModeProps),
93
- verticalResizingMobile: PropTypes.oneOf(verticalResizeModeProps),
94
- verticalResizingTablet: PropTypes.oneOf(verticalResizeModeProps),
95
- verticalResizingDesktop: PropTypes.oneOf(verticalResizeModeProps),
96
- align: PropTypes.oneOf(alignProps),
97
- alignMobile: PropTypes.oneOf(alignProps),
98
- alignTablet: PropTypes.oneOf(alignProps),
99
- alignDesktop: PropTypes.oneOf(alignProps),
100
- alignDirection: PropTypes.oneOf(alignDirectionProps),
101
- alignDirectionMobile: PropTypes.oneOf(alignDirectionProps),
102
- alignDirectionTablet: PropTypes.oneOf(alignDirectionProps),
103
- alignDirectionDesktop: PropTypes.oneOf(alignDirectionProps)
104
- };
105
- Page.__docgenInfo = {
106
- "description": "",
107
- "methods": [],
108
- "displayName": "Page",
109
- "props": {
110
- "children": {
111
- "description": "",
112
- "type": {
113
- "name": "any"
114
- },
115
- "required": false
116
- },
117
- "className": {
118
- "description": "",
119
- "type": {
120
- "name": "string"
121
- },
122
- "required": false
123
- },
124
- "before": {
125
- "description": "",
126
- "type": {
127
- "name": "string"
128
- },
129
- "required": false
130
- },
131
- "after": {
132
- "description": "",
133
- "type": {
134
- "name": "string"
135
- },
136
- "required": false
137
- },
138
- "id": {
139
- "description": "",
140
- "type": {
141
- "name": "string"
142
- },
143
- "required": false
144
- },
145
- "fill": {
146
- "description": "",
147
- "type": {
148
- "name": "enum",
149
- "computed": true,
150
- "value": "fillProps"
151
- },
152
- "required": false
153
- },
154
- "fillMobile": {
155
- "description": "",
156
- "type": {
157
- "name": "enum",
158
- "computed": true,
159
- "value": "fillProps"
160
- },
161
- "required": false
162
- },
163
- "fillTablet": {
164
- "description": "",
165
- "type": {
166
- "name": "enum",
167
- "computed": true,
168
- "value": "fillProps"
169
- },
170
- "required": false
171
- },
172
- "fillDesktop": {
173
- "description": "",
174
- "type": {
175
- "name": "enum",
176
- "computed": true,
177
- "value": "fillProps"
178
- },
179
- "required": false
180
- },
181
- "type": {
182
- "description": "",
183
- "type": {
184
- "name": "string"
185
- },
186
- "required": false
187
- },
188
- "tag": {
189
- "description": "",
190
- "type": {
191
- "name": "string"
192
- },
193
- "required": false
194
- },
195
- "position": {
196
- "description": "",
197
- "type": {
198
- "name": "enum",
199
- "computed": true,
200
- "value": "positionProps"
201
- },
202
- "required": false
203
- },
204
- "positionMobile": {
205
- "description": "",
206
- "type": {
207
- "name": "enum",
208
- "computed": true,
209
- "value": "positionProps"
210
- },
211
- "required": false
212
- },
213
- "positionTablet": {
214
- "description": "",
215
- "type": {
216
- "name": "enum",
217
- "computed": true,
218
- "value": "positionProps"
219
- },
220
- "required": false
221
- },
222
- "positionDesktop": {
223
- "description": "",
224
- "type": {
225
- "name": "enum",
226
- "computed": true,
227
- "value": "positionProps"
228
- },
229
- "required": false
230
- },
231
- "wrapperPosition": {
232
- "description": "",
233
- "type": {
234
- "name": "enum",
235
- "computed": true,
236
- "value": "positionProps"
237
- },
238
- "required": false
239
- },
240
- "wrapperPositionMobile": {
241
- "description": "",
242
- "type": {
243
- "name": "enum",
244
- "computed": true,
245
- "value": "positionProps"
246
- },
247
- "required": false
248
- },
249
- "wrapperPositionTablet": {
250
- "description": "",
251
- "type": {
252
- "name": "enum",
253
- "computed": true,
254
- "value": "positionProps"
255
- },
256
- "required": false
257
- },
258
- "wrapperPositionDesktop": {
259
- "description": "",
260
- "type": {
261
- "name": "enum",
262
- "computed": true,
263
- "value": "positionProps"
264
- },
265
- "required": false
266
- },
267
- "horizontalResizing": {
268
- "description": "",
269
- "type": {
270
- "name": "enum",
271
- "computed": true,
272
- "value": "horizontalResizeModeProps"
273
- },
274
- "required": false
275
- },
276
- "horizontalResizingMobile": {
277
- "description": "",
278
- "type": {
279
- "name": "enum",
280
- "computed": true,
281
- "value": "horizontalResizeModeProps"
282
- },
283
- "required": false
284
- },
285
- "horizontalResizingTablet": {
286
- "description": "",
287
- "type": {
288
- "name": "enum",
289
- "computed": true,
290
- "value": "horizontalResizeModeProps"
291
- },
292
- "required": false
293
- },
294
- "horizontalResizingDesktop": {
295
- "description": "",
296
- "type": {
297
- "name": "enum",
298
- "computed": true,
299
- "value": "horizontalResizeModeProps"
300
- },
301
- "required": false
302
- },
303
- "verticalResizing": {
304
- "description": "",
305
- "type": {
306
- "name": "enum",
307
- "computed": true,
308
- "value": "verticalResizeModeProps"
309
- },
310
- "required": false
311
- },
312
- "verticalResizingMobile": {
313
- "description": "",
314
- "type": {
315
- "name": "enum",
316
- "computed": true,
317
- "value": "verticalResizeModeProps"
318
- },
319
- "required": false
320
- },
321
- "verticalResizingTablet": {
322
- "description": "",
323
- "type": {
324
- "name": "enum",
325
- "computed": true,
326
- "value": "verticalResizeModeProps"
327
- },
328
- "required": false
329
- },
330
- "verticalResizingDesktop": {
331
- "description": "",
332
- "type": {
333
- "name": "enum",
334
- "computed": true,
335
- "value": "verticalResizeModeProps"
336
- },
337
- "required": false
338
- },
339
- "align": {
340
- "description": "",
341
- "type": {
342
- "name": "enum",
343
- "computed": true,
344
- "value": "alignProps"
345
- },
346
- "required": false
347
- },
348
- "alignMobile": {
349
- "description": "",
350
- "type": {
351
- "name": "enum",
352
- "computed": true,
353
- "value": "alignProps"
354
- },
355
- "required": false
356
- },
357
- "alignTablet": {
358
- "description": "",
359
- "type": {
360
- "name": "enum",
361
- "computed": true,
362
- "value": "alignProps"
363
- },
364
- "required": false
365
- },
366
- "alignDesktop": {
367
- "description": "",
368
- "type": {
369
- "name": "enum",
370
- "computed": true,
371
- "value": "alignProps"
372
- },
373
- "required": false
374
- },
375
- "alignDirection": {
376
- "description": "",
377
- "type": {
378
- "name": "enum",
379
- "computed": true,
380
- "value": "alignDirectionProps"
381
- },
382
- "required": false
383
- },
384
- "alignDirectionMobile": {
385
- "description": "",
386
- "type": {
387
- "name": "enum",
388
- "computed": true,
389
- "value": "alignDirectionProps"
390
- },
391
- "required": false
392
- },
393
- "alignDirectionTablet": {
394
- "description": "",
395
- "type": {
396
- "name": "enum",
397
- "computed": true,
398
- "value": "alignDirectionProps"
399
- },
400
- "required": false
401
- },
402
- "alignDirectionDesktop": {
403
- "description": "",
404
- "type": {
405
- "name": "enum",
406
- "computed": true,
407
- "value": "alignDirectionProps"
408
- },
409
- "required": false
410
- }
411
- }
412
- };
413
-
414
- export { Page };