@xaypay/tui 0.0.109 → 0.0.111

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.
@@ -9,31 +9,36 @@ const TH = ({
9
9
  item,
10
10
  tHeadFamily,
11
11
  tHeadPadding,
12
+ tHeadFontSize,
12
13
  tHeadFontWeight,
13
14
  handleCheckedHeader,
14
15
  borderTopLeftRadius,
15
16
  borderTopRightRadius,
16
17
  handleHeaderItemClick,
18
+ handleCheckArrowActionHeader,
17
19
  }) => {
18
20
  return (
19
21
  <th
20
22
  style={{
23
+ width: 'auto',
24
+ cursor: 'pointer',
25
+ whiteSpace: 'nowrap',
21
26
  position: 'relative',
22
27
  padding: tHeadPadding,
28
+ fontSize: tHeadFontSize,
23
29
  fontFamily: tHeadFamily,
24
30
  fontWeight: tHeadFontWeight,
25
31
  borderTopLeftRadius: borderTopLeftRadius,
26
32
  borderTopRightRadius: borderTopRightRadius,
27
- cursor: handleHeaderItemClick ? 'pointer' : 'normal',
28
33
  }}
29
- onClick={handleHeaderItemClick ? handleHeaderItemClick : (_) => _}
34
+ onClick={handleHeaderItemClick}
30
35
  className={`${item.sortingArrows && styles['sorting-arrows']}`}
31
36
  >
32
37
  <div
33
38
  style={{
34
39
  display: 'flex',
35
40
  alignItems: 'flex-start',
36
- justifyContent: item.hasOwnProperty('checkBox') ? 'space-between' : 'center',
41
+ justifyContent: Object.prototype.hasOwnProperty.call(item, 'checkBox') ? 'space-between' : 'center',
37
42
  }}
38
43
  >
39
44
  {item.hasOwnProperty('checkBox') ? (
@@ -42,14 +47,31 @@ const TH = ({
42
47
  float="left"
43
48
  checked={item.checkBox.checked}
44
49
  disabled={item.checkBox.disabled}
45
- handleChecked={handleCheckedHeader ? handleCheckedHeader : (_) => _}
50
+ handleChecked={!item.checkBox.disabled ? handleCheckedHeader : (_) => _}
46
51
  checkedColor={item.checkBox.checkedColor ? item.checkBox.checkedColor : ''}
47
52
  unCheckedColor={item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''}
48
53
  />
49
54
  ) : (
50
55
  ''
51
56
  )}
52
- {item.type === 'show' ? item.content : ''}
57
+ <p
58
+ style={{
59
+ margin: '0px',
60
+ }}
61
+ onClick={
62
+ Object.prototype.hasOwnProperty.call(item, 'arrowComponent')
63
+ ? (e) => handleCheckArrowActionHeader(e, item)
64
+ : (_) => _
65
+ }
66
+ >
67
+ {item.type === 'show'
68
+ ? item.content
69
+ : Object.prototype.hasOwnProperty.call(item, 'arrowComponent')
70
+ ? item.status === 'close'
71
+ ? item.closeArrow
72
+ : item.openArrow
73
+ : ''}
74
+ </p>
53
75
  </div>
54
76
  </th>
55
77
  )
@@ -116,7 +116,7 @@ Typography.propTypes = {
116
116
  textDecoration: PropTypes.string,
117
117
  backgroundColor: PropTypes.string,
118
118
  variant: PropTypes.oneOf(Object.values(TypographyType)),
119
- size: PropTypes.oneOf(PropTypes.string, PropTypes.number),
119
+ size: PropTypes.oneOf([PropTypes.string, PropTypes.number]),
120
120
  }
121
121
 
122
122
  Typography.defaultProps = {
@@ -619,3 +619,27 @@ import StackAlt from './assets/stackalt.svg';
619
619
  unCheckedColor: '#D1D1D1', // for checkbox border color
620
620
  }
621
621
  ```
622
+
623
+ ### TABLE
624
+ ```
625
+ {
626
+ tHeadFontSize: '16px', // for table header font size
627
+ tHeadFontWeight: 600, // for table header font weight
628
+ tHeadColor: '#FBFBFB', // for table header color
629
+ tHeadPadding: '11px 20px', // for table header padding
630
+ tHeadBorderRadius: '14px', // for table header border radius
631
+ tHeadBackgroundColor: '#00236A', // for table header background color
632
+ tHeadFamily: 'Noto Sans Armenia', // for table header font family
633
+
634
+ tBodyColor: '#3C393E', // for table body color
635
+ tBodyFontSize: '16px', // for table body font size
636
+ tBodyFontWeight: 500, // for table body font weight
637
+ tBodyTextAlign: 'center', // for table body text align
638
+ tBodyPadding: '11px 20px', // for table body padding
639
+ tBodyFontFamily: 'Noto Sans Armenia', // for table body font family
640
+
641
+ tBodyRowBorder: '1px solid #eeeeee', // for table body row border
642
+
643
+ openListColor: '#A3A5A9' // for table body opened list color
644
+ }
645
+ ```
@@ -19,8 +19,13 @@ import tooltipImage from './static/tooltip-usage.png';
19
19
  import textareaImage from './static/textarea-usage.png';
20
20
  import buttonImageIcon from './static/button-usage-icon.png';
21
21
  import fileSingleImage from './static/file-single-usage.png';
22
+ import tableComponent from './static/table-component-usage.png';
22
23
  import toasterImage from './static/toaster-container-usage.png';
23
24
  import autocompleteImage from './static/autocomplete-usage.png';
25
+ import tableHeaderStructure from './static/table-header-data-structure-usage.png';
26
+ import tableBodyStructureFirst from './static/table-body-data-structure-first-part-usage.png';
27
+ import tableBodyStructureThird from './static/table-body-data-structure-third-part-usage.png';
28
+ import tableBodyStructureSecond from './static/table-body-data-structure-second-part-usage.png';
24
29
 
25
30
  <Meta title="Intro/Usage" />
26
31
 
@@ -174,3 +179,10 @@ import autocompleteImage from './static/autocomplete-usage.png';
174
179
 
175
180
  ### Modal
176
181
  <img src={modalImage} alt="file image" />
182
+
183
+ ### Table
184
+ <img src={tableComponent} alt="file image" />
185
+ <img src={tableHeaderStructure} alt="file image" />
186
+ <img src={tableBodyStructureFirst} alt="file image" />
187
+ <img src={tableBodyStructureSecond} alt="file image" />
188
+ <img src={tableBodyStructureThird} alt="file image" />
package/tui.config.js CHANGED
@@ -413,21 +413,23 @@ module.exports = {
413
413
  },
414
414
  // default properties for <Table /> component
415
415
  TABLE: {
416
- tHeadFontWeight: 600,
417
- tHeadColor: '#FBFBFB',
418
- tHeadPadding: '11px 20px',
419
- tHeadBorderRadius: '14px',
420
- tHeadBackgroundColor: '#00236A',
421
- tHeadFamily: 'Noto Sans Armenia',
416
+ tHeadFontSize: '16px', // for table header font size
417
+ tHeadFontWeight: 600, // for table header font weight
418
+ tHeadColor: '#FBFBFB', // for table header color
419
+ tHeadPadding: '11px 20px', // for table header padding
420
+ tHeadBorderRadius: '14px', // for table header border radius
421
+ tHeadBackgroundColor: '#00236A', // for table header background color
422
+ tHeadFamily: 'Noto Sans Armenia', // for table header font family
422
423
 
423
- tBodyColor: '#3C393E',
424
- tBodyFontSize: '16px',
425
- tBodyFontWeight: 500,
426
- tBodyTextAlign: 'center',
427
- tBodyPadding: '11px 20px',
428
- tBodyFontFamily: 'Noto Sans Armenia',
424
+ tBodyColor: '#3C393E', // for table body color
425
+ tBodyFontSize: '16px', // for table body font size
426
+ tBodyFontWeight: 500, // for table body font weight
427
+ tBodyTextAlign: 'center', // for table body text align
428
+ tBodyPadding: '11px 20px', // for table body padding
429
+ tBodyFontFamily: 'Noto Sans Armenia', // for table body font family
429
430
 
430
- tBodyRowBorder: '1px solid #eeeeee',
431
- tBodyMarginTop: '20px',
431
+ tBodyRowBorder: '1px solid #eeeeee', // for table body row border
432
+
433
+ openListColor: '#A3A5A9' // for table body opened list color
432
434
  },
433
435
  }