@itcase/forms 1.0.15 → 1.0.17

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.
@@ -20,14 +20,58 @@
20
20
  align-items: center;
21
21
  }
22
22
  }
23
+ .form-field {
24
+ }
25
+ .form {
26
+ &^&-field_type_float {
27
+ position: relative;
28
+ &^&__item_state_focus,
29
+ &^&__item_state_filled {
30
+ & .form {
31
+ &-field {
32
+ &__label {
33
+ transform: scale(0.8) translate(10px, -9px);
34
+ }
35
+ }
36
+ }
37
+ & .input {
38
+ &::placeholder {
39
+ opacity: 100%;
40
+ }
41
+ }
42
+ }
43
+ & .form {
44
+ &-field {
45
+ &__label {
46
+ pointer-events: none;
47
+ position: absolute;
48
+ display: flex;
49
+ top: 0;
50
+ z-index: 2;
51
+ transform: scale(1) translate(8px, 9px);
52
+ transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
53
+ transform-origin: top left;
54
+ background: var(--color-surface-primary);
55
+ padding: 0 4px;
56
+ }
57
+ &__message {
58
+ padding: 4px 0 12px 12px;
59
+ }
60
+ }
61
+ }
62
+ & .input {
63
+ &::placeholder {
64
+ opacity: 0%;
65
+ transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
66
+ }
67
+ }
68
+ }
69
+ }
23
70
  .form-field {
24
71
  &_type {
25
72
  &_normal {
26
73
  gap: 4px;
27
74
  }
28
- &_float {
29
- padding: 12px 0;
30
- }
31
75
  }
32
76
  }
33
77
  .form-field {
@@ -648,6 +648,7 @@ function FieldWrapperBase(props) {
648
648
  }
649
649
  FieldWrapperBase.defaultProps = {
650
650
  tag: 'div',
651
+ type: 'normal',
651
652
  errorMessageTextSize: 's',
652
653
  errorMessageTextColor: 'errorTextSecondary'
653
654
  };
@@ -638,6 +638,7 @@ function FieldWrapperBase(props) {
638
638
  }
639
639
  FieldWrapperBase.defaultProps = {
640
640
  tag: 'div',
641
+ type: 'normal',
641
642
  errorMessageTextSize: 's',
642
643
  errorMessageTextColor: 'errorTextSecondary'
643
644
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/forms",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Forms fields, inputs, etc.",
5
5
  "keywords": [
6
6
  "forms",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@itcase/common": "^1.1.6",
38
- "@itcase/ui": "^1.0.25",
38
+ "@itcase/ui": "^1.0.33",
39
39
  "axios": "^1.5.0",
40
40
  "clsx": "^2.0.0",
41
41
  "date-fns": "2.0.0-alpha.7",
@@ -55,7 +55,7 @@
55
55
  "devDependencies": {
56
56
  "@babel/core": "^7.22.11",
57
57
  "@babel/eslint-parser": "^7.22.11",
58
- "@babel/preset-env": "^7.22.10",
58
+ "@babel/preset-env": "^7.22.14",
59
59
  "@babel/preset-react": "^7.22.5",
60
60
  "@commitlint/cli": "^17.7.1",
61
61
  "@commitlint/config-conventional": "^17.7.0",
@@ -99,7 +99,7 @@
99
99
  "postcss-pxtorem": "^6.0.0",
100
100
  "postcss-responsive-type": "github:ITCase/postcss-responsive-type",
101
101
  "postcss-sort-media-queries": "^5.2.0",
102
- "prettier": "^3.0.2",
102
+ "prettier": "^3.0.3",
103
103
  "react-datepicker": "^4.16.0",
104
104
  "rollup": "^3.28.1",
105
105
  "rollup-plugin-peer-deps-external": "^2.2.4",