@onewelcome/react-lib-components 0.1.7-alpha → 0.1.8-alpha

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 (69) hide show
  1. package/dist/DataGrid/DataGrid.d.ts +30 -0
  2. package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +14 -0
  3. package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +13 -0
  4. package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +16 -0
  5. package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +6 -0
  6. package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +7 -0
  7. package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +10 -0
  8. package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +10 -0
  9. package/dist/DataGrid/datagrid.interfaces.d.ts +13 -0
  10. package/dist/Form/Select/Option.d.ts +9 -4
  11. package/dist/Form/Select/Select.d.ts +8 -2
  12. package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +1 -1
  13. package/dist/Icon/Icon.d.ts +1 -0
  14. package/dist/_BaseStyling_/BaseStyling.d.ts +4 -0
  15. package/dist/hooks/useSpacing.d.ts +1 -1
  16. package/dist/hooks/useWrapper.d.ts +1 -1
  17. package/dist/index.d.ts +5 -0
  18. package/dist/react-lib-components.cjs.development.js +949 -272
  19. package/dist/react-lib-components.cjs.development.js.map +1 -1
  20. package/dist/react-lib-components.cjs.production.min.js +1 -1
  21. package/dist/react-lib-components.cjs.production.min.js.map +1 -1
  22. package/dist/react-lib-components.esm.js +947 -273
  23. package/dist/react-lib-components.esm.js.map +1 -1
  24. package/dist/util/helper.d.ts +1 -1
  25. package/package.json +11 -11
  26. package/src/ContextMenu/ContextMenu.tsx +16 -1
  27. package/src/DataGrid/DataGrid.module.scss +21 -0
  28. package/src/DataGrid/DataGrid.test.tsx +276 -0
  29. package/src/DataGrid/DataGrid.tsx +101 -0
  30. package/src/DataGrid/DataGridActions/DataGridActions.module.scss +35 -0
  31. package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +184 -0
  32. package/src/DataGrid/DataGridActions/DataGridActions.tsx +109 -0
  33. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +41 -0
  34. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +83 -0
  35. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +88 -0
  36. package/src/DataGrid/DataGridBody/DataGridBody.module.scss +10 -0
  37. package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +123 -0
  38. package/src/DataGrid/DataGridBody/DataGridBody.tsx +64 -0
  39. package/src/DataGrid/DataGridBody/DataGridCell.module.scss +33 -0
  40. package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +74 -0
  41. package/src/DataGrid/DataGridBody/DataGridCell.tsx +25 -0
  42. package/src/DataGrid/DataGridBody/DataGridRow.module.scss +7 -0
  43. package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +101 -0
  44. package/src/DataGrid/DataGridBody/DataGridRow.tsx +27 -0
  45. package/src/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +258 -0
  46. package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +26 -0
  47. package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +255 -0
  48. package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +80 -0
  49. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +68 -0
  50. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +128 -0
  51. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +72 -0
  52. package/src/DataGrid/datagrid.interfaces.ts +14 -0
  53. package/src/Form/Select/Option.tsx +39 -21
  54. package/src/Form/Select/Select.module.scss +1 -1
  55. package/src/Form/Select/Select.test.tsx +235 -56
  56. package/src/Form/Select/Select.tsx +194 -34
  57. package/src/Form/Toggle/Toggle.module.scss +1 -0
  58. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +44 -0
  59. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +4 -2
  60. package/src/Icon/Icon.module.scss +4 -0
  61. package/src/Icon/Icon.tsx +1 -0
  62. package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
  63. package/src/Notifications/BaseModal/BaseModal.test.tsx +2 -1
  64. package/src/Notifications/Dialog/Dialog.module.scss +1 -1
  65. package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss +1 -1
  66. package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +1 -1
  67. package/src/Pagination/Pagination.module.scss +74 -74
  68. package/src/_BaseStyling_/BaseStyling.tsx +14 -6
  69. package/src/index.ts +6 -0
@@ -4,117 +4,117 @@
4
4
  color: var(--greyed-out);
5
5
  display: flex;
6
6
  flex-direction: column;
7
- }
8
7
 
9
- .form-element {
10
- height: 2.5rem;
8
+ .form-element {
9
+ height: 2.5rem;
11
10
 
12
- button {
13
- min-height: 2.5rem;
11
+ button {
12
+ min-height: 2.5rem;
13
+ }
14
14
  }
15
- }
16
15
 
17
- .total {
18
- flex: 1 0 auto;
19
- display: flex;
20
- align-items: center;
21
- justify-content: center;
22
-
23
- span > span {
24
- font-weight: 700;
25
- font-family: var(--font-family);
26
- font-size: var(--font-size);
27
- margin-left: 0.25rem;
28
- }
29
- }
16
+ .total {
17
+ flex: 1 0 auto;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
30
21
 
31
- .pagination {
32
- flex: 1 0 auto;
33
- display: flex;
34
- align-items: center;
35
- justify-content: center;
36
- margin-top: 1rem;
22
+ span > span {
23
+ font-weight: 700;
24
+ font-family: var(--font-family);
25
+ font-size: var(--font-size);
26
+ margin-left: 0.25rem;
27
+ }
28
+ }
37
29
 
38
- .previous,
39
- .next {
30
+ .pagination {
31
+ flex: 1 0 auto;
40
32
  display: flex;
41
33
  align-items: center;
34
+ justify-content: center;
35
+ margin-top: 1rem;
42
36
 
43
- button {
44
- margin: 0.25rem;
45
- }
37
+ .previous,
38
+ .next {
39
+ display: flex;
40
+ align-items: center;
41
+
42
+ button {
43
+ margin: 0.25rem;
44
+ }
46
45
 
47
- button span:before {
48
- font-size: 0.75rem;
46
+ button span:before {
47
+ font-size: 0.75rem;
48
+ }
49
49
  }
50
50
  }
51
- }
52
51
 
53
- .per-page {
54
- display: none;
55
- align-items: center;
56
- }
52
+ .per-page {
53
+ display: none;
54
+ align-items: center;
55
+ }
57
56
 
58
- .page {
59
- display: flex;
60
- align-items: center;
61
- flex-basis: min-content;
62
- }
57
+ .page {
58
+ display: flex;
59
+ align-items: center;
60
+ flex-basis: min-content;
61
+ }
63
62
 
64
- .page-size-select {
65
- border-color: #fff;
66
- margin: 0 0.25rem;
63
+ .page-size-select {
64
+ border-color: #fff;
65
+ margin: 0 0.25rem;
67
66
 
68
- button {
69
- min-width: 55px;
70
- padding: 0;
67
+ button {
68
+ min-width: 3.4375rem;
69
+ padding: 0;
71
70
 
72
- div[data-display] {
73
- left: 0.5rem;
74
- }
71
+ div[data-display] {
72
+ left: 0.5rem;
73
+ }
75
74
 
76
- div:not([data-display]) {
77
- right: 0.5rem;
75
+ div:not([data-display]) {
76
+ right: 0.5rem;
77
+ }
78
78
  }
79
79
  }
80
- }
81
80
 
82
- .current-value-input {
83
- margin: 0 0.25rem 0 0;
84
- padding: 0;
81
+ .current-value-input {
82
+ margin: 0 0.25rem 0 0;
83
+ padding: 0;
85
84
 
86
- input {
87
- border-radius: var(--input-border-radius);
88
- padding: 0 1rem;
89
- width: auto;
90
- text-align: center;
85
+ input {
86
+ border-radius: var(--input-border-radius);
87
+ padding: 0 1rem;
88
+ width: auto;
89
+ text-align: center;
90
+ }
91
91
  }
92
92
  }
93
93
 
94
94
  @media screen and (min-width: 30em) {
95
95
  .pagination-wrapper {
96
96
  flex-direction: row;
97
- }
98
97
 
99
- .total {
100
- justify-content: flex-start;
101
- }
98
+ .total {
99
+ justify-content: flex-start;
100
+ }
102
101
 
103
- .pagination {
104
- margin-top: 0;
105
- justify-content: flex-end;
102
+ .pagination {
103
+ margin-top: 0;
104
+ justify-content: flex-end;
106
105
 
107
- .previous,
108
- .next {
109
- button {
110
- margin: 0.5rem;
106
+ .previous,
107
+ .next {
108
+ button {
109
+ margin: 0.5rem;
110
+ }
111
111
  }
112
112
  }
113
113
  }
114
114
  }
115
115
 
116
116
  @media screen and (min-width: 48em) {
117
- .per-page {
117
+ .pagination-wrapper .per-page {
118
118
  display: flex;
119
119
  }
120
120
  }
@@ -26,6 +26,10 @@ interface CSSProperties {
26
26
  snackbarSuccessBackgroundColor?: string;
27
27
  snackbarErrorBackgroundColor?: string;
28
28
  snackbarBorderRadius?: string;
29
+ dataGridRowBackgroundColor?: string;
30
+ dataGridRowHoverBackgroundColor?: string;
31
+ cardBackgroundColor?: string;
32
+ cardBorderRadius?: string;
29
33
  tabsBackgroundColor?: string;
30
34
  tabBorderWidth?: string;
31
35
  tabBorderStyle?: string;
@@ -66,22 +70,26 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
66
70
  buttonBorderWidth: '2px',
67
71
  buttonFontSize: '1rem',
68
72
  buttonBorderStyle: 'solid',
69
- buttonFillTextColor: '#FFF',
70
- buttonFillBackgroundColor: '#FFF',
71
- buttonOutlineHoverTextColor: '#FFF',
73
+ buttonFillTextColor: '#fff',
74
+ buttonFillBackgroundColor: '#fff',
75
+ buttonOutlineHoverTextColor: '#fff',
72
76
  inputBorderColor: '#e9e9eb',
73
77
  inputBorderRadius: '8px',
74
78
  inputBorderWidth: '1px',
75
79
  inputBorderStyle: 'solid',
76
- inputBackgroundColor: '#FFF',
80
+ inputBackgroundColor: '#fff',
77
81
  modalShadowColor: 'rgba(0, 0, 0, 0.16)',
78
- modalBackgroundColor: '#F5F8F8',
79
- modalHeaderBackgroundColor: '#FFF',
82
+ modalBackgroundColor: '#f5f8f8',
83
+ modalHeaderBackgroundColor: '#fff',
80
84
  snackbarTextColor: '#fff',
81
85
  snackbarInfoBackgroundColor: '#003b5e',
82
86
  snackbarSuccessBackgroundColor: '#008a28',
83
87
  snackbarErrorBackgroundColor: '#e22a1d',
84
88
  snackbarBorderRadius: '8px',
89
+ dataGridRowBackgroundColor: 'transparent',
90
+ dataGridRowHoverBackgroundColor: '#f5e6f0',
91
+ cardBackgroundColor: '#fff',
92
+ cardBorderRadius: '8px',
85
93
  tabsBackgroundColor: '#FFF',
86
94
  tabBorderWidth: '2px',
87
95
  tabBorderStyle: 'solid',
package/src/index.ts CHANGED
@@ -97,3 +97,9 @@ export {
97
97
  Props as BaseWizardStepsProps,
98
98
  Step as WizardStep,
99
99
  } from './Wizard/BaseWizardSteps/BaseWizardSteps';
100
+
101
+ /** DataGrid */
102
+ export { HeaderCell } from './DataGrid/datagrid.interfaces';
103
+ export { DataGrid, Props as DataGridProps } from './DataGrid/DataGrid';
104
+ export { DataGridRow, Props as DataGridRowProps } from './DataGrid/DataGridBody/DataGridRow';
105
+ export { DataGridCell, Props as DataGridCellProps } from './DataGrid/DataGridBody/DataGridCell';