@itcase/ui 1.1.1 → 1.1.3

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 (49) hide show
  1. package/dist/components/Button.js +8 -3
  2. package/dist/components/Cell.js +32 -14
  3. package/dist/components/DatePicker.js +2 -1
  4. package/dist/components/FormField.js +3 -3
  5. package/dist/components/Grid.js +2 -2
  6. package/dist/components/Icon.js +125 -16
  7. package/dist/components/Input.js +1 -8
  8. package/dist/components/InputMask.js +233 -0
  9. package/dist/components/InputPassword.js +6 -6
  10. package/dist/components/Label.js +4 -4
  11. package/dist/components/Modal.js +27 -27
  12. package/dist/components/{Fader.js → Overlay.js} +43 -43
  13. package/dist/components/Response.js +10 -9
  14. package/dist/components/ScrollOnDrag.js +290 -0
  15. package/dist/components/Search.js +19 -3
  16. package/dist/components/Tab.js +8 -8
  17. package/dist/components/Text.js +4 -4
  18. package/dist/constants/componentProps/borderWidth.js +3 -1
  19. package/dist/constants/componentProps/emojiSize.js +3 -1
  20. package/dist/constants/componentProps/iconFillSize.js +3 -1
  21. package/dist/constants/componentProps/iconSize.js +3 -1
  22. package/dist/constants/componentProps/sizePX.js +3 -1
  23. package/dist/css/components/DatePicker/DatePicker.css +12 -5
  24. package/dist/css/components/Group/Group.css +0 -8
  25. package/dist/css/components/InputMask/Input.css +77 -0
  26. package/dist/css/components/Label/Label.css +0 -19
  27. package/dist/css/components/Loader/Loader.css +1 -1
  28. package/dist/css/components/Modal/Modal.css +3 -3
  29. package/dist/css/components/{Fader/Fader.css → Overlay/Overlay.css} +10 -10
  30. package/dist/css/components/Response/Response.css +8 -0
  31. package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +6 -0
  32. package/dist/css/styles/align/align_vertical-reverse.css +6 -6
  33. package/dist/css/styles/align/align_vertical.css +8 -8
  34. package/dist/css/styles/border-color/border-color.css +1 -1
  35. package/dist/css/styles/border-color/border-color_focus.css +2 -2
  36. package/dist/css/styles/border-color/border-color_hover.css +1 -1
  37. package/dist/css/styles/caret-color/caret-color.css +1 -1
  38. package/dist/css/styles/fill/fill.css +2 -2
  39. package/dist/css/styles/fill/fill_active.css +2 -2
  40. package/dist/css/styles/fill/fill_active_hover.css +2 -2
  41. package/dist/css/styles/fill/fill_disabled.css +2 -2
  42. package/dist/css/styles/fill/fill_hover.css +2 -2
  43. package/dist/stories/ModalConfirm.stories.js +1 -1
  44. package/dist/stories/ModalDefault.stories.js +1 -1
  45. package/dist/stories/NotFound.stories.js +3 -4
  46. package/package.json +1 -1
  47. package/dist/components/Empty.js +0 -229
  48. package/dist/css/components/Empty/Empty.css +0 -21
  49. package/dist/stories/Empty.stories.js +0 -115
@@ -1,26 +1,26 @@
1
- .fader {
1
+ .overlay {
2
2
  width: 100%;
3
3
  height: 100%;
4
- background: var(--fader-fill);
4
+ background: var(--overlay-fill);
5
5
  position: absolute;
6
6
  left: 0;
7
7
  top: 0;
8
8
  z-index: 1;
9
- backdrop-filter: blur(var(--fader-blur, 10px));
9
+ backdrop-filter: blur(var(--overlay-blur, 10px));
10
10
  }
11
- .fader {
11
+ .overlay {
12
12
  &&_state {
13
13
  &_visible {
14
14
  position: fixed;
15
15
  visibility: visible !important;
16
- animation-name: faderFadeIn;
16
+ animation-name: overlayFadeIn;
17
17
  }
18
18
  &_hidden {
19
- animation-name: faderFaderOut;
19
+ animation-name: overlayFaderOut;
20
20
  }
21
21
  }
22
22
  }
23
- @keyframes faderFadeIn {
23
+ @keyframes overlayFadeIn {
24
24
  from {
25
25
  opacity: 0%;
26
26
  }
@@ -28,7 +28,7 @@
28
28
  opacity: 100%;
29
29
  }
30
30
  }
31
- @keyframes faderFaderOut {
31
+ @keyframes overlayFaderOut {
32
32
  from {
33
33
  opacity: 100%;
34
34
  }
@@ -36,8 +36,8 @@
36
36
  opacity: 0%;
37
37
  }
38
38
  }
39
- .fader {
39
+ .overlay {
40
40
  &&_type_click {
41
- opacity: 0;
41
+ opacity: 0%;
42
42
  }
43
43
  }
@@ -19,3 +19,11 @@
19
19
  gap: 16px;
20
20
  }
21
21
  }
22
+ .response {
23
+ &_set {
24
+ &_message {
25
+ margin: 200px 0 0 0;
26
+ align-self: center;
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,6 @@
1
+ .scrolldrag {
2
+ white-space: nowrap;
3
+ padding: 0 5px;
4
+ display: inline-block;
5
+ overflow: scroll hidden;
6
+ }
@@ -7,12 +7,12 @@
7
7
  align-items: flex-start;
8
8
  }
9
9
  &-center {
10
- align-items: center;
11
10
  text-align: center;
11
+ align-items: center;
12
12
  }
13
13
  &-right {
14
- align-items: flex-end;
15
14
  text-align: right;
15
+ align-items: flex-end;
16
16
  }
17
17
  }
18
18
  &^&_left {
@@ -20,14 +20,14 @@
20
20
  align-items: flex-start;
21
21
  }
22
22
  &^&_center {
23
+ text-align: center;
23
24
  justify-content: center;
24
25
  align-items: center;
25
- text-align: center;
26
26
  }
27
27
  &^&_right {
28
+ text-align: right;
28
29
  justify-content: center;
29
30
  align-items: flex-end;
30
- text-align: right;
31
31
  }
32
32
  &^&_bottom {
33
33
  &-left {
@@ -35,14 +35,14 @@
35
35
  align-items: flex-start;
36
36
  }
37
37
  &-center {
38
+ text-align: center;
38
39
  justify-content: flex-end;
39
40
  align-items: center;
40
- text-align: center;
41
41
  }
42
42
  &-right {
43
+ text-align: right;
43
44
  justify-content: flex-end;
44
45
  align-items: flex-end;
45
- text-align: right;
46
46
  }
47
47
  }
48
48
  }
@@ -15,8 +15,8 @@
15
15
  align-items: flex-end;
16
16
  }
17
17
  &-auto {
18
- justify-content: space-between;
19
18
  text-align: center;
19
+ justify-content: space-between;
20
20
  align-items: center;
21
21
  }
22
22
  }
@@ -25,19 +25,19 @@
25
25
  align-items: flex-start;
26
26
  }
27
27
  &^&_center {
28
+ text-align: center;
28
29
  justify-content: center;
29
30
  align-items: center;
30
- text-align: center;
31
31
  &-auto {
32
- align-items: center;
33
- text-align: center;
32
+ text-align: center;
34
33
  justify-content: space-between;
34
+ align-items: center;
35
35
  }
36
36
  }
37
37
  &^&_right {
38
+ text-align: right;
38
39
  justify-content: center;
39
40
  align-items: flex-end;
40
- text-align: right;
41
41
  }
42
42
  &^&_bottom {
43
43
  &-left {
@@ -45,19 +45,19 @@
45
45
  align-items: flex-start;
46
46
  }
47
47
  &-center {
48
+ text-align: center;
48
49
  justify-content: flex-end;
49
50
  align-items: center;
50
- text-align: center;
51
51
  }
52
52
  &-right {
53
+ text-align: right;
53
54
  justify-content: flex-end;
54
55
  align-items: flex-end;
55
- text-align: right;
56
56
  }
57
57
  &-auto {
58
- align-items: center;
59
58
  text-align: center;
60
59
  justify-content: space-between;
60
+ align-items: center;
61
61
  }
62
62
  }
63
63
  }
@@ -1,5 +1,5 @@
1
1
  .border-color {
2
- @each $type in accent, primary, secondary, tertiary, surface, success, error {
2
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
3
3
  &_$(type) {
4
4
  &-border {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover, invert {
@@ -1,9 +1,9 @@
1
1
  .border-color {
2
- @each $type in accent, primary, secondary, tertiary, surface, success, error {
2
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
3
3
  &_focus {
4
4
  &_$(type) {
5
5
  &-border {
6
- @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
6
+ @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active, disabled, hover {
7
7
  &-$(color) {
8
8
  &:focus {
9
9
  outline: 0;
@@ -1,6 +1,6 @@
1
1
  .border-color {
2
2
  &_hover {
3
- @each $type in accent, primary, secondary, tertiary, surface, success, error, info, warning {
3
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
4
4
  &_$(type) {
5
5
  &-border {
6
6
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
@@ -1,5 +1,5 @@
1
1
  .caret-color {
2
- @each $type in accent, primary, secondary, tertiary, surface, success, error {
2
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
3
3
  &_$(type) {
4
4
  &-item {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
@@ -1,5 +1,5 @@
1
1
  .fill {
2
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning, gradient {
2
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
3
3
  &_$(type) {
4
4
  &-item {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled,
@@ -27,7 +27,7 @@
27
27
  }
28
28
  }
29
29
  }
30
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
30
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
31
31
  &_$(type) {
32
32
  &-primary {
33
33
  background: var(--color-$(type)-primary);
@@ -1,6 +1,6 @@
1
1
  .fill {
2
2
  &_active {
3
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
3
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
4
4
  &_$(type) {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, active {
6
6
  &-$(color) {
@@ -9,7 +9,7 @@
9
9
  }
10
10
  }
11
11
  }
12
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
12
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
13
13
  &_$(type) {
14
14
  &-primary {
15
15
  &-active {
@@ -1,7 +1,7 @@
1
1
  .fill {
2
2
  &_active {
3
3
  &_hover {
4
- @each $type in accent, primary, secondary, tertiary, surface, success, error {
4
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
5
5
  &_$(type) {
6
6
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
7
7
  &-$(color) {
@@ -12,7 +12,7 @@
12
12
  }
13
13
  }
14
14
  }
15
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, surface, success, error {
15
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
16
16
  &_$(type) {
17
17
  &-primary {
18
18
  background: var(--color-$(type)-primary);
@@ -1,6 +1,6 @@
1
1
  .fill {
2
2
  &_disabled {
3
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
3
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
4
4
  &_$(type) {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
6
6
  &-$(color) {
@@ -11,7 +11,7 @@
11
11
  }
12
12
  }
13
13
  }
14
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
14
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
15
15
  &_$(type) {
16
16
  &-primary {
17
17
  background: var(--color-$(type)-primary);
@@ -1,6 +1,6 @@
1
1
  .fill {
2
2
  &_hover {
3
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
3
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
4
4
  &_$(type) {
5
5
  @each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
6
6
  &-$(color) {
@@ -16,7 +16,7 @@
16
16
  }
17
17
  }
18
18
  }
19
- @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, success, error, info, warning {
19
+ @each $type in accent, primary, secondary, tertiary, quaternary, quinary, senary, surface, error, success, warning, info, danger, gradient {
20
20
  &_$(type) {
21
21
  &-primary {
22
22
  &:hover {
@@ -15,7 +15,7 @@ export default {
15
15
  export const Default = {
16
16
  args: {
17
17
  isOpen: true,
18
- isFader: true,
18
+ isOverlay: true,
19
19
  isOutsideClose: true,
20
20
  shape: 'rounded',
21
21
  elevation: 8,
@@ -13,7 +13,7 @@ export default {
13
13
  export const Default = {
14
14
  args: {
15
15
  isOpen: true,
16
- isFader: true,
16
+ isOverlay: true,
17
17
  isOutsideClose: true,
18
18
  shape: 'rounded',
19
19
  elevation: 8,
@@ -1,6 +1,5 @@
1
1
  import { buttonConfig } from '@itcase/ui/components/Button'
2
- import { Empty } from '@itcase/ui/components/Empty'
3
- import { Image } from '@itcase/ui/components/Image'
2
+ import { Response } from '@itcase/ui/components/Response'
4
3
  import {
5
4
  fillHoverProps,
6
5
  fillProps,
@@ -17,7 +16,7 @@ buttonConfig.setAppearance(buttonAppearance)
17
16
 
18
17
  export default {
19
18
  title: 'Components / NotFound',
20
- component: Empty,
19
+ component: Response,
21
20
  argTypes: {
22
21
  advancedProps: { control: 'boolean' },
23
22
  buttonAfter: {
@@ -80,7 +79,7 @@ export default {
80
79
 
81
80
  export const Default = {
82
81
  args: {
83
- before: <Image alt="search_sign" src="assets/img/search.svg" />,
82
+ imageSrc: 'assets/img/search.svg',
84
83
  message: 'Nothing found',
85
84
  messageTextColor: 'surfaceTextPrimary',
86
85
  messageTextSize: 'l',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -1,229 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var PropTypes = require('prop-types');
5
- var size = require('../constants/componentProps/size.js');
6
- var fill = require('../constants/componentProps/fill.js');
7
- var shape = require('../constants/componentProps/shape.js');
8
- var width = require('../constants/componentProps/width.js');
9
- var textColor = require('../constants/componentProps/textColor.js');
10
- var index$1 = require('./Button.js');
11
- var index = require('./Text.js');
12
- require('clsx');
13
- require('./Icon.js');
14
- require('react-inlinesvg');
15
- require('./Link.js');
16
- require('../constants/componentProps/textGradient.js');
17
- require('../constants/componentProps/textStyle.js');
18
- require('../constants/componentProps/textWeight.js');
19
- require('../constants/componentProps/type.js');
20
- require('../constants/componentProps/underline.js');
21
- require('../hooks/useStyles.js');
22
- require('lodash/camelCase');
23
- require('lodash/maxBy');
24
- require('lodash/upperFirst');
25
- require('../hooks/styleAttributes.js');
26
- require('../context/UIContext.js');
27
- require('../hooks/useMediaQueries.js');
28
- require('react-responsive');
29
- require('../hooks/useDeviceTargetClass.js');
30
- require('lodash/castArray');
31
- require('../constants/componentProps/borderColor.js');
32
- require('../constants/componentProps/borderType.js');
33
- require('../constants/componentProps/iconSize.js');
34
- require('../constants/componentProps/strokeColor.js');
35
- require('./Tooltip.js');
36
- require('./Title.js');
37
- require('../constants/componentProps/textAlign.js');
38
- require('../constants/componentProps/titleSize.js');
39
- require('../constants/componentProps/wrap.js');
40
- require('../constants/componentProps/textSize.js');
41
- require('./Loader.js');
42
- require('../constants/componentProps/textColorActive.js');
43
- require('../constants/componentProps/textColorHover.js');
44
-
45
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
46
-
47
- var React__default = /*#__PURE__*/_interopDefault(React);
48
- var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
49
-
50
- function Empty(props) {
51
- const {
52
- before,
53
- message,
54
- messageTextColor,
55
- messageTextSize,
56
- buttonAfter,
57
- buttonAppearance,
58
- buttonBefore,
59
- buttonFill,
60
- buttonFillHover,
61
- buttonLabel,
62
- buttonLabelTextColor,
63
- buttonLabelTextSize,
64
- buttonShape,
65
- buttonSize,
66
- buttonWidth
67
- } = props;
68
- return /*#__PURE__*/React__default.default.createElement("div", {
69
- className: "empty"
70
- }, before, message && /*#__PURE__*/React__default.default.createElement(index.Text, {
71
- className: "empty__message",
72
- size: messageTextSize,
73
- textColor: messageTextColor
74
- }, message), buttonLabel && /*#__PURE__*/React__default.default.createElement(index$1.Button, {
75
- after: buttonAfter,
76
- appearance: buttonAppearance,
77
- before: buttonBefore,
78
- className: "empty__button",
79
- fill: buttonFill,
80
- fillHover: buttonFillHover,
81
- label: buttonLabel,
82
- labelTextColor: buttonLabelTextColor,
83
- labelTextSize: buttonLabelTextSize,
84
- shape: buttonShape,
85
- size: buttonSize,
86
- width: buttonWidth
87
- }));
88
- }
89
- Empty.propTypes = {
90
- before: PropTypes__default.default.any,
91
- buttonAfter: PropTypes__default.default.any,
92
- buttonBefore: PropTypes__default.default.any,
93
- buttonFill: PropTypes__default.default.oneOf(fill.default),
94
- buttonFillHover: PropTypes__default.default.oneOf(fill.default),
95
- buttonLabel: PropTypes__default.default.string,
96
- buttonLabelTextColor: PropTypes__default.default.oneOf(textColor.default),
97
- buttonLabelTextSize: PropTypes__default.default.oneOf(size.default),
98
- buttonShape: PropTypes__default.default.oneOf(shape.default),
99
- buttonSize: PropTypes__default.default.oneOf(size.default),
100
- buttonWidth: PropTypes__default.default.oneOf(width.default),
101
- message: PropTypes__default.default.string,
102
- messageTextColor: PropTypes__default.default.oneOf(textColor.default),
103
- messageTextSize: PropTypes__default.default.oneOf(size.default)
104
- };
105
- Empty.__docgenInfo = {
106
- "description": "",
107
- "methods": [],
108
- "displayName": "Empty",
109
- "props": {
110
- "before": {
111
- "description": "",
112
- "type": {
113
- "name": "any"
114
- },
115
- "required": false
116
- },
117
- "buttonAfter": {
118
- "description": "",
119
- "type": {
120
- "name": "any"
121
- },
122
- "required": false
123
- },
124
- "buttonBefore": {
125
- "description": "",
126
- "type": {
127
- "name": "any"
128
- },
129
- "required": false
130
- },
131
- "buttonFill": {
132
- "description": "",
133
- "type": {
134
- "name": "enum",
135
- "computed": true,
136
- "value": "fillProps"
137
- },
138
- "required": false
139
- },
140
- "buttonFillHover": {
141
- "description": "",
142
- "type": {
143
- "name": "enum",
144
- "computed": true,
145
- "value": "fillProps"
146
- },
147
- "required": false
148
- },
149
- "buttonLabel": {
150
- "description": "",
151
- "type": {
152
- "name": "string"
153
- },
154
- "required": false
155
- },
156
- "buttonLabelTextColor": {
157
- "description": "",
158
- "type": {
159
- "name": "enum",
160
- "computed": true,
161
- "value": "textColorProps"
162
- },
163
- "required": false
164
- },
165
- "buttonLabelTextSize": {
166
- "description": "",
167
- "type": {
168
- "name": "enum",
169
- "computed": true,
170
- "value": "sizeProps"
171
- },
172
- "required": false
173
- },
174
- "buttonShape": {
175
- "description": "",
176
- "type": {
177
- "name": "enum",
178
- "computed": true,
179
- "value": "shapeProps"
180
- },
181
- "required": false
182
- },
183
- "buttonSize": {
184
- "description": "",
185
- "type": {
186
- "name": "enum",
187
- "computed": true,
188
- "value": "sizeProps"
189
- },
190
- "required": false
191
- },
192
- "buttonWidth": {
193
- "description": "",
194
- "type": {
195
- "name": "enum",
196
- "computed": true,
197
- "value": "widthProps"
198
- },
199
- "required": false
200
- },
201
- "message": {
202
- "description": "",
203
- "type": {
204
- "name": "string"
205
- },
206
- "required": false
207
- },
208
- "messageTextColor": {
209
- "description": "",
210
- "type": {
211
- "name": "enum",
212
- "computed": true,
213
- "value": "textColorProps"
214
- },
215
- "required": false
216
- },
217
- "messageTextSize": {
218
- "description": "",
219
- "type": {
220
- "name": "enum",
221
- "computed": true,
222
- "value": "sizeProps"
223
- },
224
- "required": false
225
- }
226
- }
227
- };
228
-
229
- exports.Empty = Empty;
@@ -1,21 +0,0 @@
1
- .empty {
2
- display: flex;
3
- flex-flow: column nowrap;
4
- justify-content: center;
5
- align-items: center;
6
- gap: 32px;
7
- align-self: center;
8
- margin-top: 200px;
9
- &__message {
10
- text-align: center;
11
- }
12
- &__button {
13
- margin-top: auto;
14
- }
15
- & .image,
16
- .image__wrapper,
17
- .image__item {
18
- pointer-events: none;
19
- user-select: none;
20
- }
21
- }