@itcase/ui 1.0.93 → 1.0.95

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.
@@ -32,6 +32,8 @@ function Group(props) {
32
32
  children,
33
33
  className,
34
34
  horizontalScroll,
35
+ tag: Tag,
36
+ htmlFor,
35
37
  set,
36
38
  style,
37
39
  dataTour,
@@ -113,9 +115,10 @@ function Group(props) {
113
115
  styles: groupStyles,
114
116
  wrapper: groupWrapperStyles
115
117
  } = useStyles.useStyles(props);
116
- return /*#__PURE__*/React__default.default.createElement("div", {
118
+ return /*#__PURE__*/React__default.default.createElement(Tag, {
117
119
  className: clsx__default.default(className, 'group', widthClass, heightClass, columnsClass, contentAlignClass, alignDirectionClass, directionClass, alignClass, fillClass, fillHoverClass, set && `group_set_${set}`, horizontalScroll && 'group_type_horizontal_scroll', stackingClass, wrapClass, growClass, shapeClass, borderColorClass, borderWidthClass, borderTypeClass, elevationClass, justifyContentClass),
118
120
  "data-tour": dataTour,
121
+ htmlFor: htmlFor,
119
122
  id: id,
120
123
  style: Object.assign({}, groupStyles, style),
121
124
  onClick: onClick
@@ -129,99 +132,61 @@ Group.propTypes = {
129
132
  children: PropTypes__default.default.any,
130
133
  className: PropTypes__default.default.string,
131
134
  direction: PropTypes__default.default.oneOf(direction.default),
132
- directionDesktop: PropTypes__default.default.oneOf(direction.default),
133
- directionMobile: PropTypes__default.default.oneOf(direction.default),
134
- directionTablet: PropTypes__default.default.oneOf(direction.default),
135
135
  fill: PropTypes__default.default.oneOf(fill.default),
136
- fillMobile: PropTypes__default.default.oneOf(fill.default),
137
- fillTablet: PropTypes__default.default.oneOf(fill.default),
138
- fillDesktop: PropTypes__default.default.oneOf(fill.default),
139
136
  contentAlign: PropTypes__default.default.oneOf([null, 'center']),
140
- contentAlignDesktop: PropTypes__default.default.oneOf([null, 'center']),
141
- contentAlignMobile: PropTypes__default.default.oneOf([null, 'center']),
142
- contentAlignTablet: PropTypes__default.default.oneOf([null, 'center']),
137
+ tag: PropTypes__default.default.string,
143
138
  stacking: PropTypes__default.default.oneOf(stacking.default),
144
- stackingDesktop: PropTypes__default.default.oneOf(stacking.default),
145
- stackingMobile: PropTypes__default.default.oneOf(stacking.default),
146
- stackingTablet: PropTypes__default.default.oneOf(stacking.default),
147
139
  wrap: PropTypes__default.default.oneOf(wrap.default),
148
- wrapDesktop: PropTypes__default.default.oneOf(wrap.default),
149
- wrapMobile: PropTypes__default.default.oneOf(wrap.default),
150
- wrapTablet: PropTypes__default.default.oneOf(wrap.default),
151
140
  shape: PropTypes__default.default.oneOf(shape.default),
152
- shapeDesktop: PropTypes__default.default.oneOf(shape.default),
153
- shapeMobile: PropTypes__default.default.oneOf(shape.default),
154
- shapeTablet: PropTypes__default.default.oneOf(shape.default),
155
141
  spaceBetweenItems: PropTypes__default.default.string,
156
- spaceBetweenItemsDesktop: PropTypes__default.default.string,
157
- spaceBetweenItemsMobile: PropTypes__default.default.string,
158
- spaceBetweenItemsTablet: PropTypes__default.default.string,
159
142
  width: PropTypes__default.default.oneOf(width.default),
160
- widthMobile: PropTypes__default.default.oneOf(width.default),
161
- widthTablet: PropTypes__default.default.oneOf(width.default),
162
- widthDesktop: PropTypes__default.default.oneOf(width.default),
163
143
  columns: PropTypes__default.default.number,
164
- columnsDesktop: PropTypes__default.default.number,
165
- columnsMobile: PropTypes__default.default.number,
166
- columnsTablet: PropTypes__default.default.number,
167
144
  set: PropTypes__default.default.string,
168
145
  horizontalScroll: PropTypes__default.default.bool,
169
- onClick: PropTypes__default.default.func
146
+ onClick: PropTypes__default.default.func,
147
+ htmlFor: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number])
148
+ };
149
+ Group.defaultProps = {
150
+ tag: 'div'
170
151
  };
171
152
  Group.__docgenInfo = {
172
153
  "description": "",
173
154
  "methods": [],
174
155
  "displayName": "Group",
175
156
  "props": {
176
- "id": {
177
- "description": "",
178
- "type": {
179
- "name": "string"
157
+ "tag": {
158
+ "defaultValue": {
159
+ "value": "'div'",
160
+ "computed": false
180
161
  },
181
- "required": false
182
- },
183
- "children": {
184
- "description": "",
185
- "type": {
186
- "name": "any"
187
- },
188
- "required": false
189
- },
190
- "className": {
191
162
  "description": "",
192
163
  "type": {
193
164
  "name": "string"
194
165
  },
195
166
  "required": false
196
167
  },
197
- "direction": {
168
+ "id": {
198
169
  "description": "",
199
170
  "type": {
200
- "name": "enum",
201
- "computed": true,
202
- "value": "directionProps"
171
+ "name": "string"
203
172
  },
204
173
  "required": false
205
174
  },
206
- "directionDesktop": {
175
+ "children": {
207
176
  "description": "",
208
177
  "type": {
209
- "name": "enum",
210
- "computed": true,
211
- "value": "directionProps"
178
+ "name": "any"
212
179
  },
213
180
  "required": false
214
181
  },
215
- "directionMobile": {
182
+ "className": {
216
183
  "description": "",
217
184
  "type": {
218
- "name": "enum",
219
- "computed": true,
220
- "value": "directionProps"
185
+ "name": "string"
221
186
  },
222
187
  "required": false
223
188
  },
224
- "directionTablet": {
189
+ "direction": {
225
190
  "description": "",
226
191
  "type": {
227
192
  "name": "enum",
@@ -239,33 +204,6 @@ Group.__docgenInfo = {
239
204
  },
240
205
  "required": false
241
206
  },
242
- "fillMobile": {
243
- "description": "",
244
- "type": {
245
- "name": "enum",
246
- "computed": true,
247
- "value": "fillProps"
248
- },
249
- "required": false
250
- },
251
- "fillTablet": {
252
- "description": "",
253
- "type": {
254
- "name": "enum",
255
- "computed": true,
256
- "value": "fillProps"
257
- },
258
- "required": false
259
- },
260
- "fillDesktop": {
261
- "description": "",
262
- "type": {
263
- "name": "enum",
264
- "computed": true,
265
- "value": "fillProps"
266
- },
267
- "required": false
268
- },
269
207
  "contentAlign": {
270
208
  "description": "",
271
209
  "type": {
@@ -280,48 +218,6 @@ Group.__docgenInfo = {
280
218
  },
281
219
  "required": false
282
220
  },
283
- "contentAlignDesktop": {
284
- "description": "",
285
- "type": {
286
- "name": "enum",
287
- "value": [{
288
- "value": "null",
289
- "computed": false
290
- }, {
291
- "value": "'center'",
292
- "computed": false
293
- }]
294
- },
295
- "required": false
296
- },
297
- "contentAlignMobile": {
298
- "description": "",
299
- "type": {
300
- "name": "enum",
301
- "value": [{
302
- "value": "null",
303
- "computed": false
304
- }, {
305
- "value": "'center'",
306
- "computed": false
307
- }]
308
- },
309
- "required": false
310
- },
311
- "contentAlignTablet": {
312
- "description": "",
313
- "type": {
314
- "name": "enum",
315
- "value": [{
316
- "value": "null",
317
- "computed": false
318
- }, {
319
- "value": "'center'",
320
- "computed": false
321
- }]
322
- },
323
- "required": false
324
- },
325
221
  "stacking": {
326
222
  "description": "",
327
223
  "type": {
@@ -331,33 +227,6 @@ Group.__docgenInfo = {
331
227
  },
332
228
  "required": false
333
229
  },
334
- "stackingDesktop": {
335
- "description": "",
336
- "type": {
337
- "name": "enum",
338
- "computed": true,
339
- "value": "stackingProps"
340
- },
341
- "required": false
342
- },
343
- "stackingMobile": {
344
- "description": "",
345
- "type": {
346
- "name": "enum",
347
- "computed": true,
348
- "value": "stackingProps"
349
- },
350
- "required": false
351
- },
352
- "stackingTablet": {
353
- "description": "",
354
- "type": {
355
- "name": "enum",
356
- "computed": true,
357
- "value": "stackingProps"
358
- },
359
- "required": false
360
- },
361
230
  "wrap": {
362
231
  "description": "",
363
232
  "type": {
@@ -367,33 +236,6 @@ Group.__docgenInfo = {
367
236
  },
368
237
  "required": false
369
238
  },
370
- "wrapDesktop": {
371
- "description": "",
372
- "type": {
373
- "name": "enum",
374
- "computed": true,
375
- "value": "wrapProps"
376
- },
377
- "required": false
378
- },
379
- "wrapMobile": {
380
- "description": "",
381
- "type": {
382
- "name": "enum",
383
- "computed": true,
384
- "value": "wrapProps"
385
- },
386
- "required": false
387
- },
388
- "wrapTablet": {
389
- "description": "",
390
- "type": {
391
- "name": "enum",
392
- "computed": true,
393
- "value": "wrapProps"
394
- },
395
- "required": false
396
- },
397
239
  "shape": {
398
240
  "description": "",
399
241
  "type": {
@@ -403,33 +245,6 @@ Group.__docgenInfo = {
403
245
  },
404
246
  "required": false
405
247
  },
406
- "shapeDesktop": {
407
- "description": "",
408
- "type": {
409
- "name": "enum",
410
- "computed": true,
411
- "value": "shapeProps"
412
- },
413
- "required": false
414
- },
415
- "shapeMobile": {
416
- "description": "",
417
- "type": {
418
- "name": "enum",
419
- "computed": true,
420
- "value": "shapeProps"
421
- },
422
- "required": false
423
- },
424
- "shapeTablet": {
425
- "description": "",
426
- "type": {
427
- "name": "enum",
428
- "computed": true,
429
- "value": "shapeProps"
430
- },
431
- "required": false
432
- },
433
248
  "spaceBetweenItems": {
434
249
  "description": "",
435
250
  "type": {
@@ -437,27 +252,6 @@ Group.__docgenInfo = {
437
252
  },
438
253
  "required": false
439
254
  },
440
- "spaceBetweenItemsDesktop": {
441
- "description": "",
442
- "type": {
443
- "name": "string"
444
- },
445
- "required": false
446
- },
447
- "spaceBetweenItemsMobile": {
448
- "description": "",
449
- "type": {
450
- "name": "string"
451
- },
452
- "required": false
453
- },
454
- "spaceBetweenItemsTablet": {
455
- "description": "",
456
- "type": {
457
- "name": "string"
458
- },
459
- "required": false
460
- },
461
255
  "width": {
462
256
  "description": "",
463
257
  "type": {
@@ -467,33 +261,6 @@ Group.__docgenInfo = {
467
261
  },
468
262
  "required": false
469
263
  },
470
- "widthMobile": {
471
- "description": "",
472
- "type": {
473
- "name": "enum",
474
- "computed": true,
475
- "value": "widthProps"
476
- },
477
- "required": false
478
- },
479
- "widthTablet": {
480
- "description": "",
481
- "type": {
482
- "name": "enum",
483
- "computed": true,
484
- "value": "widthProps"
485
- },
486
- "required": false
487
- },
488
- "widthDesktop": {
489
- "description": "",
490
- "type": {
491
- "name": "enum",
492
- "computed": true,
493
- "value": "widthProps"
494
- },
495
- "required": false
496
- },
497
264
  "columns": {
498
265
  "description": "",
499
266
  "type": {
@@ -501,27 +268,6 @@ Group.__docgenInfo = {
501
268
  },
502
269
  "required": false
503
270
  },
504
- "columnsDesktop": {
505
- "description": "",
506
- "type": {
507
- "name": "number"
508
- },
509
- "required": false
510
- },
511
- "columnsMobile": {
512
- "description": "",
513
- "type": {
514
- "name": "number"
515
- },
516
- "required": false
517
- },
518
- "columnsTablet": {
519
- "description": "",
520
- "type": {
521
- "name": "number"
522
- },
523
- "required": false
524
- },
525
271
  "set": {
526
272
  "description": "",
527
273
  "type": {
@@ -542,6 +288,18 @@ Group.__docgenInfo = {
542
288
  "name": "func"
543
289
  },
544
290
  "required": false
291
+ },
292
+ "htmlFor": {
293
+ "description": "",
294
+ "type": {
295
+ "name": "union",
296
+ "value": [{
297
+ "name": "string"
298
+ }, {
299
+ "name": "number"
300
+ }]
301
+ },
302
+ "required": false
545
303
  }
546
304
  }
547
305
  };
@@ -34,6 +34,7 @@ function Image(props) {
34
34
  className,
35
35
  imageWrapperClassName,
36
36
  imageClassName,
37
+ mode,
37
38
  overlay,
38
39
  src,
39
40
  title,
@@ -85,16 +86,21 @@ function Image(props) {
85
86
  prefix: 'border-color-image_',
86
87
  propsKey: 'borderColorImage'
87
88
  });
89
+ const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
90
+ prefix: 'fill_',
91
+ propsKey: 'fill'
92
+ });
93
+ const fillHoverClass = useDeviceTargetClass.useDeviceTargetClass(props, {
94
+ prefix: 'fill_hover_',
95
+ propsKey: 'fillHover'
96
+ });
88
97
  const {
89
- // left
90
98
  styles,
91
- // leftImageWrapper
92
99
  wrapper: wrapperStyles,
93
- // leftImage
94
100
  image: imageStyles
95
101
  } = useStyles.useStyles(props);
96
102
  return /*#__PURE__*/React__default.default.createElement("div", {
97
- className: clsx__default.default(className, 'image', type && `image_type_${type}`, cursorClass, horizontalAlignClass, verticalAlignClass, shapeClass, resizeModeClass, widthClass, heightClass),
103
+ className: clsx__default.default(className, 'image', mode && `image_mode_${mode}`, type && `image_type_${type}`, cursorClass, horizontalAlignClass, verticalAlignClass, shapeClass, fillClass, fillHoverClass, resizeModeClass, widthClass, heightClass),
98
104
  onClick: onClick,
99
105
  style: styles
100
106
  }, before, /*#__PURE__*/React__default.default.createElement("div", {
@@ -48,6 +48,7 @@ function Label(props) {
48
48
  labelTextWrap,
49
49
  labelTextColor,
50
50
  labelTextColorHover,
51
+ mode,
51
52
  set,
52
53
  before,
53
54
  after,
@@ -104,7 +105,7 @@ function Label(props) {
104
105
  styles: labelStyles
105
106
  } = useStyles.useStyles(props);
106
107
  return /*#__PURE__*/React__default.default.createElement("div", {
107
- className: clsx__default.default(className, 'label', fillClass || labelConfig.appearance[appearance] && `fill_${labelConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || labelConfig.appearance[appearance] && `fill_hover_${labelConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, borderClass, borderTypeClass, sizeClass, wrapClass, widthClass, alignDirectionClass, alignClass, textAlignClass, type && `label_type_${type}`, set && `label_set_${set}`, onClick && (cursor || 'cursor_type_pointer')),
108
+ className: clsx__default.default(className, 'label', fillClass || labelConfig.appearance[appearance] && `fill_${labelConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || labelConfig.appearance[appearance] && `fill_hover_${labelConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, borderClass, borderTypeClass, sizeClass, wrapClass, widthClass, alignDirectionClass, alignClass, textAlignClass, type && `label_type_${type}`, set && `label_set_${set}`, mode && `label_mode_${mode}`, onClick && (cursor || 'cursor_type_pointer')),
108
109
  "data-tour": dataTour,
109
110
  style: labelStyles,
110
111
  onClick: onClick
@@ -35,9 +35,10 @@ var clsx__default = /*#__PURE__*/_interopDefault(clsx);
35
35
  function Logo(props) {
36
36
  const {
37
37
  className,
38
- size,
39
- link,
40
38
  href,
39
+ link,
40
+ mode,
41
+ size,
41
42
  source,
42
43
  src
43
44
  } = props;
@@ -61,7 +62,7 @@ function Logo(props) {
61
62
  styles: logo
62
63
  } = useStyles.useStyles(props);
63
64
  return /*#__PURE__*/React__default.default.createElement("div", {
64
- className: clsx__default.default(className, 'logo', alignDirectionClass, alignClass, widthClass, alignItemsClass, size && `logo_size_${size}`),
65
+ className: clsx__default.default(className, 'logo', alignDirectionClass, alignClass, widthClass, alignItemsClass, size && `logo_size_${size}`, mode && `logo_mode_${mode}`),
65
66
  style: logo
66
67
  }, link || href ? /*#__PURE__*/React__default.default.createElement(index.LinkWrapper, {
67
68
  href: link || href
@@ -30,13 +30,14 @@ var clsx__default = /*#__PURE__*/_interopDefault(clsx);
30
30
  function Text(props) {
31
31
  const {
32
32
  after,
33
- dataTour,
34
33
  before,
35
34
  children,
36
35
  className,
37
36
  cursor,
38
- tag: Tag,
37
+ dataTour,
39
38
  htmlFor,
39
+ mode,
40
+ tag: Tag,
40
41
  type,
41
42
  onClick
42
43
  } = props;
@@ -88,7 +89,7 @@ function Text(props) {
88
89
  propsKey: 'width'
89
90
  });
90
91
  return /*#__PURE__*/React__default.default.createElement(Tag, {
91
- className: clsx__default.default(className, 'text', sizeClass, weightClass, textColorClass, textColorActiveClass, textColorHoverClass, textGradientClass, textStyleClass, textTruncateClass, textWrapClass, type && `text_type_${type}`, widthClass, cursorClass, onClick && (cursor || 'cursor_type_pointer')),
92
+ className: clsx__default.default(className, 'text', sizeClass, weightClass, textColorClass, textColorActiveClass, textColorHoverClass, textGradientClass, textStyleClass, textTruncateClass, textWrapClass, type && `text_type_${type}`, mode && `text_mode_${mode}`, widthClass, cursorClass, onClick && (cursor || 'cursor_type_pointer')),
92
93
  "data-tour": dataTour,
93
94
  htmlFor: htmlFor,
94
95
  style: textStyles,
@@ -42,6 +42,7 @@ function Title(props) {
42
42
  onClick
43
43
  } = props;
44
44
  const {
45
+ mode,
45
46
  size,
46
47
  sizeMobile,
47
48
  sizeTablet,
@@ -113,7 +114,7 @@ function Title(props) {
113
114
  return size;
114
115
  }, [isMobile, isTablet, isDesktop]);
115
116
  return /*#__PURE__*/React__default.default.createElement(Tag, {
116
- className: clsx__default.default(className, 'title', fillColorClass, size && `title_size_${size}`, textColorClass, textColorActiveClass, textColorHoverClass, typeClass, textGradientClass, textStyleClass, weightClass, textWrap && `word-wrap_${textWrap}`),
117
+ className: clsx__default.default(className, 'title', fillColorClass, size && `title_size_${size}`, mode && `title_mode_${mode}`, textColorClass, textColorActiveClass, textColorHoverClass, typeClass, textGradientClass, textStyleClass, weightClass, textWrap && `word-wrap_${textWrap}`),
117
118
  "data-tour": dataTour,
118
119
  onClick: onClick,
119
120
  style: titleStyles
@@ -1,4 +1,5 @@
1
1
  .accordion {
2
+ border-radius: var(--accordion-border-radius, 12px);
2
3
  &__wrapper {
3
4
  width: 100%;
4
5
  max-width: var(--max);
@@ -48,7 +49,7 @@
48
49
  min-width: 170px;
49
50
  display: flex;
50
51
  flex-flow: row wrap;
51
- gap: 8px;
52
+ gap: 14px;
52
53
  &__title {
53
54
  flex: 1;
54
55
  }
@@ -16,24 +16,32 @@
16
16
  }
17
17
  }
18
18
  .avatar {
19
- &_size {
20
- @each $size in 14, 16, 24, 32, 40, 48, 56, 60, 64, 72, 80, 96, 112, 144, 240 {
21
- &_$(size) {
22
- ^^&__wrapper {
23
- width: $(size)px;
24
- height: $(size)px;
25
- display: flex;
26
- justify-content: center;
27
- align-items: center;
28
- ^^^&__image {
29
- width: $(size)px;
30
- height: $(size)px;
31
- }
19
+ &&_mode {
20
+ &_skeleton {
21
+ ^^&__wrapper {
22
+ background-image: linear-gradient(
23
+ 90deg,
24
+ var(--color-surface-secondary),
25
+ var(--color-surface-tertiary),
26
+ var(--color-surface-secondary)
27
+ );
28
+ background-size: 200%;
29
+ animation: avatar-skeleton 3s infinite linear;
30
+ ^^^&__name {
31
+ color: transparent;
32
32
  }
33
33
  }
34
34
  }
35
35
  }
36
36
  }
37
+ @keyframes avatar-skeleton {
38
+ 0% {
39
+ background-position: 200%;
40
+ }
41
+ 100% {
42
+ background-position: -200%;
43
+ }
44
+ }
37
45
  .avatar {
38
46
  &_shape {
39
47
  &_circular {
@@ -56,3 +64,22 @@
56
64
  }
57
65
  }
58
66
  }
67
+ .avatar {
68
+ &_size {
69
+ @each $size in 14, 16, 24, 32, 40, 48, 56, 60, 64, 72, 80, 96, 112, 144, 240 {
70
+ &_$(size) {
71
+ ^^&__wrapper {
72
+ width: $(size)px;
73
+ height: $(size)px;
74
+ display: flex;
75
+ justify-content: center;
76
+ align-items: center;
77
+ ^^^&__image {
78
+ width: $(size)px;
79
+ height: $(size)px;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
@@ -3,6 +3,41 @@
3
3
  justify-content: center;
4
4
  align-items: center;
5
5
  }
6
+ .badge {
7
+ &&_mode {
8
+ &_skeleton {
9
+ background-image: linear-gradient(
10
+ 90deg,
11
+ var(--color-surface-secondary),
12
+ var(--color-surface-tertiary),
13
+ var(--color-surface-secondary)
14
+ );
15
+ background-size: 200%;
16
+ animation: badge-skeleton 3s infinite linear;
17
+ ^^^^&.text {
18
+ color: transparent;
19
+ }
20
+ }
21
+ }
22
+ }
23
+ @keyframes badge-skeleton {
24
+ 0% {
25
+ background-position: 200%;
26
+ }
27
+ 100% {
28
+ background-position: -200%;
29
+ }
30
+ }
31
+ .badge {
32
+ &_shape {
33
+ &_rounded {
34
+ border-radius: var(--badge-shape-rounded, 6px);
35
+ }
36
+ &_circular {
37
+ border-radius: 50%;
38
+ }
39
+ }
40
+ }
6
41
  .badge {
7
42
  &_size {
8
43
  @each $size in xxs, xs, s, m, l, xl, xxl {
@@ -29,16 +64,6 @@
29
64
  }
30
65
  }
31
66
  }
32
- .badge {
33
- &_shape {
34
- &_rounded {
35
- border-radius: var(--badge-shape-rounded, 6px);
36
- }
37
- &_circular {
38
- border-radius: 50%;
39
- }
40
- }
41
- }
42
67
  :root {
43
68
  --badge-width-size-xxs: 16px;
44
69
  --badge-height-size-xxs: 16px;