armtek-uikit-react 1.0.2

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 (50) hide show
  1. package/README.md +1 -0
  2. package/lib/Button/package.json +7 -0
  3. package/lib/cjs/assets/fonts.scss +20 -0
  4. package/lib/cjs/assets/global.css +35 -0
  5. package/lib/cjs/assets/index.d.ts +16 -0
  6. package/lib/cjs/assets/styles.scss +132 -0
  7. package/lib/cjs/index.d.ts +29 -0
  8. package/lib/cjs/index.js +7 -0
  9. package/lib/cjs/shared/hooks/useClickOutside.d.ts +3 -0
  10. package/lib/cjs/shared/hooks/useClickOutside.js +22 -0
  11. package/lib/cjs/shared/services/DateService.d.ts +12 -0
  12. package/lib/cjs/shared/services/DateService.js +48 -0
  13. package/lib/cjs/shared/types/theme.d.ts +10 -0
  14. package/lib/cjs/shared/types/theme.js +3 -0
  15. package/lib/cjs/shared/utils/helpers.d.ts +5 -0
  16. package/lib/cjs/shared/utils/helpers.js +48 -0
  17. package/lib/cjs/ui/Button/Button.d.ts +15 -0
  18. package/lib/cjs/ui/Button/Button.js +44 -0
  19. package/lib/cjs/ui/Button/Button.module.scss +298 -0
  20. package/lib/cjs/ui/Button/ButtonGroup.d.ts +6 -0
  21. package/lib/cjs/ui/Button/ButtonGroup.js +26 -0
  22. package/lib/cjs/ui/Button/ButtonIcon.d.ts +3 -0
  23. package/lib/cjs/ui/Button/ButtonIcon.js +21 -0
  24. package/lib/cjs/ui/Button/style.css +299 -0
  25. package/lib/dist/armtek-uikit-react-index.js +1335 -0
  26. package/lib/dist/armtek-uikit-react-index.min.js +2 -0
  27. package/lib/dist/armtek-uikit-react-index.min.js.LICENSE.txt +15 -0
  28. package/lib/esm/assets/fonts.scss +20 -0
  29. package/lib/esm/assets/global.css +35 -0
  30. package/lib/esm/assets/index.d.ts +16 -0
  31. package/lib/esm/assets/styles.scss +132 -0
  32. package/lib/esm/index.d.ts +29 -0
  33. package/lib/esm/index.js +1 -0
  34. package/lib/esm/shared/hooks/useClickOutside.d.ts +3 -0
  35. package/lib/esm/shared/hooks/useClickOutside.js +17 -0
  36. package/lib/esm/shared/services/DateService.d.ts +12 -0
  37. package/lib/esm/shared/services/DateService.js +42 -0
  38. package/lib/esm/shared/types/theme.d.ts +10 -0
  39. package/lib/esm/shared/types/theme.js +1 -0
  40. package/lib/esm/shared/utils/helpers.d.ts +5 -0
  41. package/lib/esm/shared/utils/helpers.js +40 -0
  42. package/lib/esm/ui/Button/Button.d.ts +15 -0
  43. package/lib/esm/ui/Button/Button.js +38 -0
  44. package/lib/esm/ui/Button/Button.module.scss +298 -0
  45. package/lib/esm/ui/Button/ButtonGroup.d.ts +6 -0
  46. package/lib/esm/ui/Button/ButtonGroup.js +20 -0
  47. package/lib/esm/ui/Button/ButtonIcon.d.ts +3 -0
  48. package/lib/esm/ui/Button/ButtonIcon.js +15 -0
  49. package/lib/esm/ui/Button/style.css +299 -0
  50. package/package.json +94 -0
@@ -0,0 +1,298 @@
1
+ @import "../../assets/styles";
2
+
3
+ .button{
4
+ outline: none;
5
+ border:1px solid transparent;
6
+ border-radius: $radius;
7
+ text-transform: uppercase;
8
+ padding: $size-step calc(3 * $size-step);
9
+ cursor: pointer;
10
+ @include transition(0.3s);
11
+ font-weight: 500;
12
+ font-size: 16px;
13
+ height: $size-elarge;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ &:disabled{
18
+ cursor: initial;
19
+ }
20
+ }
21
+ .button_contained {
22
+ &.button_primary{
23
+ color: #fff;
24
+ background: $color-primary;
25
+ &:hover{
26
+ background: $color-primary-dark;
27
+ }
28
+ &:active{
29
+ background: $color-blue-800;
30
+ }
31
+ &:disabled{
32
+ background: $color-primary-light;
33
+ }
34
+ }
35
+ &.button_secondary {
36
+ background: $color-secondary;
37
+ color: #fff;
38
+ &:hover{
39
+ background: $color-secondary-dark;
40
+ }
41
+ &:active{
42
+ background: $color-orange-800;
43
+ }
44
+ &:disabled{
45
+ background: $color-secondary-light;
46
+ }
47
+ }
48
+ &.button_neutral {
49
+ background: $color-neutral;
50
+ &:hover{
51
+ background: $color-neutral-dark;
52
+ }
53
+ &:active{
54
+ background: $color-gray-600;
55
+ }
56
+ &:disabled{
57
+ background: $color-secondary-light;
58
+ }
59
+ }
60
+ &.button_black {
61
+ background: $color-gray-900;
62
+ &:hover{
63
+ background: $color-neutral-dark;
64
+ }
65
+ &:active{
66
+ background: $color-gray-600;
67
+ }
68
+ &:disabled{
69
+ background: $color-secondary-light;
70
+ }
71
+ }
72
+ }
73
+ .button_outlined {
74
+ background: transparent;
75
+ &.button_primary{
76
+
77
+ color: $color-primary;
78
+ border-color: $color-primary;
79
+ background: transparent;
80
+ &:hover{
81
+ background: rgba($color-primary, 0.1);
82
+ }
83
+ &:active{
84
+ background: $color-blue-A100;
85
+ }
86
+ &:disabled{
87
+ color: $color-primary-light;
88
+ border-color: $color-primary-light;
89
+ }
90
+ }
91
+ &.button_secondary {
92
+ border-color: $color-secondary;
93
+ color: $color-secondary;
94
+ &:hover{
95
+ background: rgba($color-secondary, 0.1);
96
+ }
97
+ &:active{
98
+ background: $color-orange-100;
99
+ }
100
+ &:disabled{
101
+ color: $color-primary-light;
102
+ border-color: $color-primary-light;
103
+ }
104
+ }
105
+ &.button_neutral,
106
+ &.button_black {
107
+ border-color: $color-gray-900;
108
+ color: $color-gray-900;
109
+ &:hover{
110
+ background: rgba($color-neutral, 0.1);
111
+ }
112
+ &:active{
113
+ background: $color-gray-300;
114
+ }
115
+ &:disabled{
116
+ color: $color-neutral-light;
117
+ border-color: $color-neutral-light;
118
+ }
119
+ }
120
+ }
121
+ .button_transparent {
122
+ background: transparent;
123
+ &.button_primary{
124
+ color: $color-primary;
125
+ background: transparent;
126
+ &:hover{
127
+ background: rgba($color-primary, 0.1);
128
+ }
129
+ &:active{
130
+ background: $color-blue-A100;
131
+ }
132
+ &:disabled{
133
+ color: $color-primary-light;
134
+ background: none;
135
+ }
136
+ }
137
+ &.button_secondary {
138
+ color: $color-secondary;
139
+ &:hover{
140
+ background: rgba($color-secondary, 0.1);
141
+ }
142
+ &:active{
143
+ background: $color-orange-100;
144
+ }
145
+ &:disabled{
146
+ color: $color-primary-light;
147
+ background: none;
148
+ }
149
+ }
150
+ &.button_neutral,
151
+ &.button_black {
152
+ color: $color-gray-900;
153
+ &:hover{
154
+ background: rgba($color-neutral, 0.1);
155
+ }
156
+ &:active{
157
+ background: $color-gray-300;
158
+ }
159
+ &:disabled{
160
+ color: $color-neutral-light;
161
+ background: none;
162
+ }
163
+ }
164
+ }
165
+
166
+ .button__adornment{
167
+ font-size: inherit;
168
+ }
169
+ .button__adornment_end{
170
+ margin-left: $size-step;
171
+ }
172
+ .button__adornment_start{
173
+ margin-right: $size-step;
174
+ }
175
+
176
+ .button_large{
177
+ height: $size-large;
178
+ font-size: 15px;
179
+ }
180
+ .button_medium{
181
+ height: $size-medium;
182
+ font-size: 14px;
183
+ }
184
+ .button_small{
185
+ height: $size-small;
186
+ font-size: 13px;
187
+ }
188
+
189
+ .button_icon{
190
+ padding: $size-step;
191
+ width: $size-elarge;
192
+ border-radius: 50%;
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ font-size: 30px;
197
+ &.button_large{
198
+ width: $size-large;
199
+ font-size: 24px;
200
+ }
201
+ &.button_medium{
202
+ width: $size-medium;
203
+ font-size: 20px;
204
+ }
205
+ &.button_small{
206
+ width: $size-small;
207
+ padding: calc($size-step / 2);
208
+ font-size: 16px;
209
+ }
210
+ }
211
+
212
+ .button_group{
213
+ display: flex;
214
+ align-items: center;
215
+ }
216
+ .button_group_inline{
217
+ flex-direction: row;
218
+ }
219
+ .button_group_column{
220
+ flex-direction: column;
221
+ }
222
+
223
+ .button_grouped_inline{
224
+ border-radius: 0;
225
+ &:first-child{
226
+ border-top-left-radius: $radius;
227
+ border-bottom-left-radius: $radius;
228
+ }
229
+ &:last-child{
230
+ border-top-right-radius: $radius;
231
+ border-bottom-right-radius: $radius;
232
+ }
233
+ &.button_contained{
234
+ &.button_primary + *{
235
+ border-left-color: $color-info-dark;
236
+ }
237
+ &.button_secondary + *{
238
+ border-left-color: $color-primary-dark;
239
+ }
240
+ &.button_neutral + *{
241
+ border-left-color: $color-neutral-dark;
242
+ }
243
+ &.button_black + *{
244
+ border-left-color: $color-neutral-dark;
245
+ }
246
+ }
247
+ &.button_outlined{
248
+ &.button_primary + *{
249
+ border-left-color: $color-info-dark;
250
+ }
251
+ &.button_primary:not(:last-child){
252
+ border-right: 0;
253
+ }
254
+ &.button_secondary + *{
255
+ border-left-color: $color-secondary;
256
+ }
257
+ &.button_secondary:not(:last-child){
258
+ border-right: 0;
259
+ }
260
+ &.button_neutral + *{
261
+ border-left-color: $color-neutral;
262
+ }
263
+ &.button_neutral:not(:last-child){
264
+ border-right: 0;
265
+ }
266
+ &.button_black + *{
267
+ border-left-color: $color-neutral;
268
+ }
269
+ &.button_black:not(:last-child){
270
+ border-right: 0;
271
+ }
272
+ }
273
+ &.button_transparent{
274
+ &.button_primary + *{
275
+ border-left-color: $color-gray-200;
276
+ }
277
+ &.button_secondary + *{
278
+ border-left-color: $color-gray-200;
279
+ }
280
+ &.button_neutral + *{
281
+ border-left-color: $color-gray-200;
282
+ }
283
+ &.button_black + *{
284
+ border-left-color: $color-gray-200;
285
+ }
286
+ }
287
+ }
288
+ .button_grouped_column{
289
+ border-radius: 0;
290
+ &:first-child{
291
+ border-top-left-radius: $radius;
292
+ border-top-right-radius: $radius;
293
+ }
294
+ &:last-child{
295
+ border-bottom-left-radius: $radius;
296
+ border-bottom-right-radius: $radius;
297
+ }
298
+ }
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from 'react';
2
+ type PropsType = {
3
+ orientation?: 'column' | 'inline';
4
+ } & HTMLAttributes<HTMLDivElement>;
5
+ declare const ButtonGroup: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
6
+ export default ButtonGroup;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _ButtonModule = _interopRequireDefault(require("./Button.module.scss"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ const ButtonGroup = props => {
10
+ let {
11
+ orientation = 'inline',
12
+ className,
13
+ children,
14
+ ...restProps
15
+ } = props;
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
17
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
18
+ ...restProps,
19
+ className: (0, _clsx.default)(_ButtonModule.default.button_group, _ButtonModule.default['button_group_' + orientation], className),
20
+ children: children
21
+ })
22
+ });
23
+ };
24
+ var _default = ButtonGroup;
25
+ exports.default = _default;
26
+ module.exports = exports.default;
@@ -0,0 +1,3 @@
1
+ import { ButtonProps } from './Button';
2
+ declare const ButtonIcon: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ButtonIcon;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.default = void 0;
6
+ var _Button = _interopRequireDefault(require("./Button"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
+ var _ButtonModule = _interopRequireDefault(require("./Button.module.scss"));
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ const ButtonIcon = props => {
11
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
12
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
13
+ ...props,
14
+ className: (0, _clsx.default)(_ButtonModule.default.button_icon, props.className),
15
+ children: props.children
16
+ })
17
+ });
18
+ };
19
+ var _default = ButtonIcon;
20
+ exports.default = _default;
21
+ module.exports = exports.default;
@@ -0,0 +1,299 @@
1
+ .text_error {
2
+ color: #cc2935;
3
+ }
4
+ .text_success {
5
+ color: #0bd998;
6
+ }
7
+ .adornmentContainer {
8
+ display: flex;
9
+ }
10
+ .adornmentContainer_end {
11
+ margin-left: auto;
12
+ }
13
+ .adornment_end + * {
14
+ margin-left: 8px;
15
+ }
16
+ .adornment_start + * {
17
+ margin-left: 8px;
18
+ }
19
+ .button {
20
+ outline: none;
21
+ border: 1px solid transparent;
22
+ border-radius: 4px;
23
+ text-transform: uppercase;
24
+ padding: 8px 24px;
25
+ cursor: pointer;
26
+ transition: 0.3s all ease;
27
+ font-weight: 500;
28
+ font-size: 16px;
29
+ height: 56px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ }
34
+ .button:disabled {
35
+ cursor: initial;
36
+ }
37
+ .button_contained.button_primary {
38
+ color: #fff;
39
+ background: #0d46ff;
40
+ }
41
+ .button_contained.button_primary:hover {
42
+ background: #0b3cd9;
43
+ }
44
+ .button_contained.button_primary:active {
45
+ background: #406dff;
46
+ }
47
+ .button_contained.button_primary:disabled {
48
+ background: #0b3cd9;
49
+ }
50
+ .button_contained.button_secondary {
51
+ background: #ff7f00;
52
+ color: #fff;
53
+ }
54
+ .button_contained.button_secondary:hover {
55
+ background: #d96c00;
56
+ }
57
+ .button_contained.button_secondary:active {
58
+ background: #ff9426;
59
+ }
60
+ .button_contained.button_secondary:disabled {
61
+ background: #ffa140;
62
+ }
63
+ .button_contained.button_neutral {
64
+ background: #4d5359;
65
+ }
66
+ .button_contained.button_neutral:hover {
67
+ background: #40454a;
68
+ }
69
+ .button_contained.button_neutral:active {
70
+ background: #6c757d;
71
+ }
72
+ .button_contained.button_neutral:disabled {
73
+ background: #ffa140;
74
+ }
75
+ .button_contained.button_black {
76
+ background: #212529;
77
+ }
78
+ .button_contained.button_black:hover {
79
+ background: #40454a;
80
+ }
81
+ .button_contained.button_black:active {
82
+ background: #6c757d;
83
+ }
84
+ .button_contained.button_black:disabled {
85
+ background: #ffa140;
86
+ }
87
+ .button_outlined {
88
+ background: transparent;
89
+ }
90
+ .button_outlined.button_primary {
91
+ color: #0d46ff;
92
+ border-color: #0d46ff;
93
+ background: transparent;
94
+ }
95
+ .button_outlined.button_primary:hover {
96
+ background: rgba(13, 70, 255, 0.1);
97
+ }
98
+ .button_outlined.button_primary:active {
99
+ background: #d9e2ff;
100
+ }
101
+ .button_outlined.button_primary:disabled {
102
+ color: #0b3cd9;
103
+ border-color: #0b3cd9;
104
+ }
105
+ .button_outlined.button_secondary {
106
+ border-color: #ff7f00;
107
+ color: #ff7f00;
108
+ }
109
+ .button_outlined.button_secondary:hover {
110
+ background: rgba(255, 127, 0, 0.1);
111
+ }
112
+ .button_outlined.button_secondary:active {
113
+ background: #ffe6cc;
114
+ }
115
+ .button_outlined.button_secondary:disabled {
116
+ color: #0b3cd9;
117
+ border-color: #0b3cd9;
118
+ }
119
+ .button_outlined.button_neutral, .button_outlined.button_black {
120
+ border-color: #212529;
121
+ color: #212529;
122
+ }
123
+ .button_outlined.button_neutral:hover, .button_outlined.button_black:hover {
124
+ background: rgba(77, 83, 89, 0.1);
125
+ }
126
+ .button_outlined.button_neutral:active, .button_outlined.button_black:active {
127
+ background: #d3dae1;
128
+ }
129
+ .button_outlined.button_neutral:disabled, .button_outlined.button_black:disabled {
130
+ color: #9aa4ae;
131
+ border-color: #9aa4ae;
132
+ }
133
+ .button_transparent {
134
+ background: transparent;
135
+ }
136
+ .button_transparent.button_primary {
137
+ color: #0d46ff;
138
+ background: transparent;
139
+ }
140
+ .button_transparent.button_primary:hover {
141
+ background: rgba(13, 70, 255, 0.1);
142
+ }
143
+ .button_transparent.button_primary:active {
144
+ background: #d9e2ff;
145
+ }
146
+ .button_transparent.button_primary:disabled {
147
+ color: #0b3cd9;
148
+ background: none;
149
+ }
150
+ .button_transparent.button_secondary {
151
+ color: #ff7f00;
152
+ }
153
+ .button_transparent.button_secondary:hover {
154
+ background: rgba(255, 127, 0, 0.1);
155
+ }
156
+ .button_transparent.button_secondary:active {
157
+ background: #ffe6cc;
158
+ }
159
+ .button_transparent.button_secondary:disabled {
160
+ color: #0b3cd9;
161
+ background: none;
162
+ }
163
+ .button_transparent.button_neutral, .button_transparent.button_black {
164
+ color: #212529;
165
+ }
166
+ .button_transparent.button_neutral:hover, .button_transparent.button_black:hover {
167
+ background: rgba(77, 83, 89, 0.1);
168
+ }
169
+ .button_transparent.button_neutral:active, .button_transparent.button_black:active {
170
+ background: #d3dae1;
171
+ }
172
+ .button_transparent.button_neutral:disabled, .button_transparent.button_black:disabled {
173
+ color: #9aa4ae;
174
+ background: none;
175
+ }
176
+ .button__adornment {
177
+ font-size: inherit;
178
+ }
179
+ .button__adornment_end {
180
+ margin-left: 8px;
181
+ }
182
+ .button__adornment_start {
183
+ margin-right: 8px;
184
+ }
185
+ .button_large {
186
+ height: 42px;
187
+ font-size: 15px;
188
+ }
189
+ .button_medium {
190
+ height: 36px;
191
+ font-size: 14px;
192
+ }
193
+ .button_small {
194
+ height: 30px;
195
+ font-size: 13px;
196
+ }
197
+ .button_icon {
198
+ padding: 8px;
199
+ width: 56px;
200
+ border-radius: 50%;
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ font-size: 30px;
205
+ }
206
+ .button_icon.button_large {
207
+ width: 42px;
208
+ font-size: 24px;
209
+ }
210
+ .button_icon.button_medium {
211
+ width: 36px;
212
+ font-size: 20px;
213
+ }
214
+ .button_icon.button_small {
215
+ width: 30px;
216
+ padding: 4px;
217
+ font-size: 16px;
218
+ }
219
+ .button_group {
220
+ display: flex;
221
+ align-items: center;
222
+ }
223
+ .button_group_inline {
224
+ flex-direction: row;
225
+ }
226
+ .button_group_column {
227
+ flex-direction: column;
228
+ }
229
+ .button_grouped_inline {
230
+ border-radius: 0;
231
+ }
232
+ .button_grouped_inline:first-child {
233
+ border-top-left-radius: 4px;
234
+ border-bottom-left-radius: 4px;
235
+ }
236
+ .button_grouped_inline:last-child {
237
+ border-top-right-radius: 4px;
238
+ border-bottom-right-radius: 4px;
239
+ }
240
+ .button_grouped_inline.button_contained.button_primary + * {
241
+ border-left-color: #0b3cd9;
242
+ }
243
+ .button_grouped_inline.button_contained.button_secondary + * {
244
+ border-left-color: #0b3cd9;
245
+ }
246
+ .button_grouped_inline.button_contained.button_neutral + * {
247
+ border-left-color: #40454a;
248
+ }
249
+ .button_grouped_inline.button_contained.button_black + * {
250
+ border-left-color: #40454a;
251
+ }
252
+ .button_grouped_inline.button_outlined.button_primary + * {
253
+ border-left-color: #0b3cd9;
254
+ }
255
+ .button_grouped_inline.button_outlined.button_primary:not(:last-child) {
256
+ border-right: 0;
257
+ }
258
+ .button_grouped_inline.button_outlined.button_secondary + * {
259
+ border-left-color: #ff7f00;
260
+ }
261
+ .button_grouped_inline.button_outlined.button_secondary:not(:last-child) {
262
+ border-right: 0;
263
+ }
264
+ .button_grouped_inline.button_outlined.button_neutral + * {
265
+ border-left-color: #4d5359;
266
+ }
267
+ .button_grouped_inline.button_outlined.button_neutral:not(:last-child) {
268
+ border-right: 0;
269
+ }
270
+ .button_grouped_inline.button_outlined.button_black + * {
271
+ border-left-color: #4d5359;
272
+ }
273
+ .button_grouped_inline.button_outlined.button_black:not(:last-child) {
274
+ border-right: 0;
275
+ }
276
+ .button_grouped_inline.button_transparent.button_primary + * {
277
+ border-left-color: #dfe2e6;
278
+ }
279
+ .button_grouped_inline.button_transparent.button_secondary + * {
280
+ border-left-color: #dfe2e6;
281
+ }
282
+ .button_grouped_inline.button_transparent.button_neutral + * {
283
+ border-left-color: #dfe2e6;
284
+ }
285
+ .button_grouped_inline.button_transparent.button_black + * {
286
+ border-left-color: #dfe2e6;
287
+ }
288
+ .button_grouped_column {
289
+ border-radius: 0;
290
+ }
291
+ .button_grouped_column:first-child {
292
+ border-top-left-radius: 4px;
293
+ border-top-right-radius: 4px;
294
+ }
295
+ .button_grouped_column:last-child {
296
+ border-bottom-left-radius: 4px;
297
+ border-bottom-right-radius: 4px;
298
+ }
299
+