@itcase/forms 1.0.14 → 1.0.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.
@@ -5,6 +5,12 @@
5
5
  z-index: 1;
6
6
  outline: 0;
7
7
  @mixin easing easeOutQuart, all, 0.2s;
8
+ &-wrapper {
9
+ display: flex;
10
+ gap: 20px;
11
+ justify-content: space-between;
12
+ flex-flow: row wrap;
13
+ }
8
14
  &_size {
9
15
  @each $size in normal, compact {
10
16
  &_$(size) {
@@ -15,6 +21,7 @@
15
21
  }
16
22
  }
17
23
  ^&__hint {
24
+ width: 100%;
18
25
  min-height: 120px;
19
26
  display: flex;
20
27
  flex-flow: column nowrap;
@@ -41,6 +48,7 @@
41
48
  }
42
49
  }
43
50
  &__thumb {
51
+ flex: 30%;
44
52
  display: grid;
45
53
  column-gap: 8px;
46
54
  grid-template-columns: min-content 1fr;
@@ -48,8 +56,8 @@
48
56
  margin: 0 0 16px 0;
49
57
  padding: 8px 16px 8px 8px;
50
58
  &-image {
51
- width: 80px;
52
- height: 80px;
59
+ width: 160px;
60
+ height: 160px;
53
61
  grid-column-start: 1;
54
62
  grid-row-start: span 2;
55
63
  display: flex;
@@ -220,6 +220,21 @@
220
220
  margin: 30px 0 0 0;
221
221
  }
222
222
  }
223
+ .form-notification {
224
+ &_type {
225
+ &_sticky {
226
+ z-index: 100;
227
+ position: sticky;
228
+ top: 20px;
229
+ left: 0;
230
+ }
231
+ }
232
+ &__item {
233
+ text-align: center;
234
+ padding: 20px;
235
+ border-radius: 12px;
236
+ }
237
+ }
223
238
  .form {
224
239
  &_type_bottom-button {
225
240
  flex: 1;
@@ -0,0 +1,15 @@
1
+ .form-notification {
2
+ &_type {
3
+ &_sticky {
4
+ z-index: 100;
5
+ position: sticky;
6
+ top: 20px;
7
+ left: 0;
8
+ }
9
+ }
10
+ &__item {
11
+ text-align: center;
12
+ padding: 20px;
13
+ border-radius: 12px;
14
+ }
15
+ }
@@ -1345,6 +1345,10 @@ var FileInputDropzone = /*#__PURE__*/React__default.default.memo(function FileIn
1345
1345
  prefix: 'border-color_',
1346
1346
  propsKey: 'thumbBorderColor'
1347
1347
  });
1348
+ var thumbBorderColorHoverClass = useDeviceTargetClass.useDeviceTargetClass(props, {
1349
+ prefix: 'border-color_hover_',
1350
+ propsKey: 'thumbBorderColorHover'
1351
+ });
1348
1352
  var thumbBorderTypeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
1349
1353
  prefix: 'border_type_',
1350
1354
  propsKey: 'thumbBorderType'
@@ -1357,7 +1361,7 @@ var FileInputDropzone = /*#__PURE__*/React__default.default.memo(function FileIn
1357
1361
  className: clsx__default.default('form-dropzone__dropzone-wrapper', fillClass, fillHoverClass, borderWidthClass, borderColorClass, borderColorHoverClass, borderTypeClass)
1358
1362
  }, files.map(function (file, i) {
1359
1363
  return /*#__PURE__*/React__default.default.createElement("aside", {
1360
- className: clsx__default.default('form-dropzone__thumb', fillClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderTypeClass),
1364
+ className: clsx__default.default('form-dropzone__thumb', fillClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderColorHoverClass, thumbBorderTypeClass),
1361
1365
  key: "" + (file.id || file.name + "_" + i || 'i' + i)
1362
1366
  }, isPreviews && /*#__PURE__*/React__default.default.createElement("div", {
1363
1367
  className: "form-dropzone__thumb-image"
@@ -1449,6 +1453,7 @@ var FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(prop
1449
1453
  label = props.label,
1450
1454
  thumbBorderWidth = props.thumbBorderWidth,
1451
1455
  thumbBorderColor = props.thumbBorderColor,
1456
+ thumbBorderColorHover = props.thumbBorderColorHover,
1452
1457
  thumbBorderType = props.thumbBorderType,
1453
1458
  removeThumbTextHoverColor = props.removeThumbTextHoverColor,
1454
1459
  labelTextColor = props.labelTextColor,
@@ -1511,6 +1516,7 @@ var FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(prop
1511
1516
  borderType: borderType,
1512
1517
  thumbBorderWidth: thumbBorderWidth,
1513
1518
  thumbBorderColor: thumbBorderColor,
1519
+ thumbBorderColorHover: thumbBorderColorHover,
1514
1520
  thumbBorderType: thumbBorderType,
1515
1521
  fill: fill,
1516
1522
  size: size,
@@ -2434,6 +2440,7 @@ var FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalFor
2434
2440
  type = props.type,
2435
2441
  buttonJustifyContent = props.buttonJustifyContent,
2436
2442
  title = props.title,
2443
+ notificationType = props.notificationType,
2437
2444
  buttonFill = props.buttonFill,
2438
2445
  titleTextSize = props.titleTextSize,
2439
2446
  titleTextColor = props.titleTextColor,
@@ -2501,10 +2508,13 @@ var FinalForm = /*#__PURE__*/React__default.default.forwardRef(function FinalFor
2501
2508
  size: descriptionSize,
2502
2509
  textColor: descriptionTextColor,
2503
2510
  textWeight: descriptionTextWeight
2504
- }, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React__default.default.createElement(Notification.NotificationItem, {
2511
+ }, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React__default.default.createElement("div", {
2512
+ className: clsx__default.default('notification', 'form-notification', notificationType && "form-notification_type_" + notificationType)
2513
+ }, /*#__PURE__*/React__default.default.createElement(Notification.NotificationItem, {
2514
+ className: "form-notification__item",
2505
2515
  text: form.getState().submitError,
2506
2516
  status: "error"
2507
- }), onChangeFormValues && /*#__PURE__*/React__default.default.createElement(reactFinalForm.FormSpy, {
2517
+ })), onChangeFormValues && /*#__PURE__*/React__default.default.createElement(reactFinalForm.FormSpy, {
2508
2518
  subscription: {
2509
2519
  values: true
2510
2520
  },
@@ -1335,6 +1335,10 @@ var FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(props
1335
1335
  prefix: 'border-color_',
1336
1336
  propsKey: 'thumbBorderColor'
1337
1337
  });
1338
+ var thumbBorderColorHoverClass = useDeviceTargetClass(props, {
1339
+ prefix: 'border-color_hover_',
1340
+ propsKey: 'thumbBorderColorHover'
1341
+ });
1338
1342
  var thumbBorderTypeClass = useDeviceTargetClass(props, {
1339
1343
  prefix: 'border_type_',
1340
1344
  propsKey: 'thumbBorderType'
@@ -1347,7 +1351,7 @@ var FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(props
1347
1351
  className: clsx('form-dropzone__dropzone-wrapper', fillClass, fillHoverClass, borderWidthClass, borderColorClass, borderColorHoverClass, borderTypeClass)
1348
1352
  }, files.map(function (file, i) {
1349
1353
  return /*#__PURE__*/React.createElement("aside", {
1350
- className: clsx('form-dropzone__thumb', fillClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderTypeClass),
1354
+ className: clsx('form-dropzone__thumb', fillClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderColorHoverClass, thumbBorderTypeClass),
1351
1355
  key: "" + (file.id || file.name + "_" + i || 'i' + i)
1352
1356
  }, isPreviews && /*#__PURE__*/React.createElement("div", {
1353
1357
  className: "form-dropzone__thumb-image"
@@ -1439,6 +1443,7 @@ var FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
1439
1443
  label = props.label,
1440
1444
  thumbBorderWidth = props.thumbBorderWidth,
1441
1445
  thumbBorderColor = props.thumbBorderColor,
1446
+ thumbBorderColorHover = props.thumbBorderColorHover,
1442
1447
  thumbBorderType = props.thumbBorderType,
1443
1448
  removeThumbTextHoverColor = props.removeThumbTextHoverColor,
1444
1449
  labelTextColor = props.labelTextColor,
@@ -1501,6 +1506,7 @@ var FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
1501
1506
  borderType: borderType,
1502
1507
  thumbBorderWidth: thumbBorderWidth,
1503
1508
  thumbBorderColor: thumbBorderColor,
1509
+ thumbBorderColorHover: thumbBorderColorHover,
1504
1510
  thumbBorderType: thumbBorderType,
1505
1511
  fill: fill,
1506
1512
  size: size,
@@ -2424,6 +2430,7 @@ var FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
2424
2430
  type = props.type,
2425
2431
  buttonJustifyContent = props.buttonJustifyContent,
2426
2432
  title = props.title,
2433
+ notificationType = props.notificationType,
2427
2434
  buttonFill = props.buttonFill,
2428
2435
  titleTextSize = props.titleTextSize,
2429
2436
  titleTextColor = props.titleTextColor,
@@ -2491,10 +2498,13 @@ var FinalForm = /*#__PURE__*/React.forwardRef(function FinalForm(props, ref) {
2491
2498
  size: descriptionSize,
2492
2499
  textColor: descriptionTextColor,
2493
2500
  textWeight: descriptionTextWeight
2494
- }, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React.createElement(NotificationItem, {
2501
+ }, description), submitError && !modifiedSinceLastSubmit && /*#__PURE__*/React.createElement("div", {
2502
+ className: clsx('notification', 'form-notification', notificationType && "form-notification_type_" + notificationType)
2503
+ }, /*#__PURE__*/React.createElement(NotificationItem, {
2504
+ className: "form-notification__item",
2495
2505
  text: form.getState().submitError,
2496
2506
  status: "error"
2497
- }), onChangeFormValues && /*#__PURE__*/React.createElement(FormSpy, {
2507
+ })), onChangeFormValues && /*#__PURE__*/React.createElement(FormSpy, {
2498
2508
  subscription: {
2499
2509
  values: true
2500
2510
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/forms",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Forms fields, inputs, etc.",
5
5
  "keywords": [
6
6
  "forms",