@7shifts/sous-chef 1.5.2 → 1.5.6

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 (141) hide show
  1. package/dist/forms/MultiSelectField/MultiSelectField.d.ts +2 -1
  2. package/dist/forms/TextField/TextField.d.ts +2 -0
  3. package/dist/index.css +1258 -889
  4. package/dist/index.js +9 -3
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.modern.js +9 -3
  7. package/dist/index.modern.js.map +1 -1
  8. package/package.json +6 -6
  9. package/CHANGELOG.md +0 -190
  10. package/dist/actions/Button/Button.js.flow +0 -44
  11. package/dist/actions/Button/index.js.flow +0 -8
  12. package/dist/actions/PaginationControls/PaginationControls.js.flow +0 -16
  13. package/dist/actions/PaginationControls/index.js.flow +0 -8
  14. package/dist/actions/Toggle/Toggle.js.flow +0 -21
  15. package/dist/actions/Toggle/index.js.flow +0 -8
  16. package/dist/actions/index.js.flow +0 -11
  17. package/dist/core/DataTable/DataTable.js.flow +0 -59
  18. package/dist/core/DataTable/DataTableContext.js.flow +0 -15
  19. package/dist/core/DataTable/index.js.flow +0 -8
  20. package/dist/core/DataTable/types.js.flow +0 -32
  21. package/dist/core/DataTableCell/DataTableCell.js.flow +0 -16
  22. package/dist/core/DataTableCell/index.js.flow +0 -8
  23. package/dist/core/DataTableEditableCell/DataTableEditableCell.js.flow +0 -26
  24. package/dist/core/DataTableEditableCell/index.js.flow +0 -8
  25. package/dist/core/DataTableRow/DataTableRow.js.flow +0 -17
  26. package/dist/core/DataTableRow/index.js.flow +0 -8
  27. package/dist/core/Flex/Flex.js.flow +0 -29
  28. package/dist/core/Flex/index.js.flow +0 -8
  29. package/dist/core/Flex/types.js.flow +0 -27
  30. package/dist/core/Inline/Inline.js.flow +0 -41
  31. package/dist/core/Inline/index.js.flow +0 -8
  32. package/dist/core/ResourceTable/ResourceTable.js.flow +0 -55
  33. package/dist/core/ResourceTable/ResourceTableContext.js.flow +0 -15
  34. package/dist/core/ResourceTable/index.js.flow +0 -8
  35. package/dist/core/ResourceTable/types.js.flow +0 -32
  36. package/dist/core/ResourceTableRow/ResourceTableRow.js.flow +0 -17
  37. package/dist/core/ResourceTableRow/index.js.flow +0 -8
  38. package/dist/core/Stack/Stack.js.flow +0 -35
  39. package/dist/core/Stack/index.js.flow +0 -8
  40. package/dist/core/index.js.flow +0 -39
  41. package/dist/feedback/Spinner/Spinner.js.flow +0 -15
  42. package/dist/feedback/Spinner/index.js.flow +0 -8
  43. package/dist/feedback/index.js.flow +0 -9
  44. package/dist/forms/AffixContainer/AffixContainer.js.flow +0 -15
  45. package/dist/forms/AffixContainer/index.js.flow +0 -8
  46. package/dist/forms/Caption/Caption.js.flow +0 -14
  47. package/dist/forms/Caption/index.js.flow +0 -8
  48. package/dist/forms/CheckboxField/CheckboxField.js.flow +0 -25
  49. package/dist/forms/CheckboxField/index.js.flow +0 -8
  50. package/dist/forms/DateField/DateField.js.flow +0 -35
  51. package/dist/forms/DateField/index.js.flow +0 -8
  52. package/dist/forms/DatePickerCalendar/DatePickerCalendar.js.flow +0 -18
  53. package/dist/forms/DatePickerCalendar/index.js.flow +0 -8
  54. package/dist/forms/DatePickerField/DatePickerField.d.ts +0 -23
  55. package/dist/forms/DatePickerField/DatePickerField.js.flow +0 -35
  56. package/dist/forms/DatePickerField/index.d.ts +0 -1
  57. package/dist/forms/DatePickerField/index.js.flow +0 -8
  58. package/dist/forms/DateRangeField/DateRangeField.js.flow +0 -37
  59. package/dist/forms/DateRangeField/index.js.flow +0 -8
  60. package/dist/forms/ErrorMessage/ErrorMessage.js.flow +0 -14
  61. package/dist/forms/ErrorMessage/index.js.flow +0 -8
  62. package/dist/forms/Field/Field.js.flow +0 -17
  63. package/dist/forms/Field/index.js.flow +0 -8
  64. package/dist/forms/Form/Form.js.flow +0 -18
  65. package/dist/forms/Form/FormContext.js.flow +0 -17
  66. package/dist/forms/Form/index.js.flow +0 -8
  67. package/dist/forms/Form/types.js.flow +0 -21
  68. package/dist/forms/FormRow/FormRow.js.flow +0 -31
  69. package/dist/forms/FormRow/index.js.flow +0 -15
  70. package/dist/forms/Label/Label.js.flow +0 -14
  71. package/dist/forms/Label/index.js.flow +0 -8
  72. package/dist/forms/MultiSelectField/MultiSelectField.js.flow +0 -33
  73. package/dist/forms/MultiSelectField/index.js.flow +0 -8
  74. package/dist/forms/PasswordCriteria/PasswordCriteria.js.flow +0 -14
  75. package/dist/forms/PasswordCriteria/index.js.flow +0 -8
  76. package/dist/forms/PasswordField/PasswordField.js.flow +0 -28
  77. package/dist/forms/PasswordField/index.js.flow +0 -8
  78. package/dist/forms/PasswordField/types.js.flow +0 -12
  79. package/dist/forms/PillSelectField/PillSelectField.js.flow +0 -26
  80. package/dist/forms/PillSelectField/index.js.flow +0 -8
  81. package/dist/forms/RadioGroupField/RadioGroupField.js.flow +0 -20
  82. package/dist/forms/RadioGroupField/index.js.flow +0 -8
  83. package/dist/forms/RadioGroupOption/RadioGroupOption.js.flow +0 -16
  84. package/dist/forms/RadioGroupOption/index.js.flow +0 -8
  85. package/dist/forms/SelectField/SelectField.js.flow +0 -40
  86. package/dist/forms/SelectField/index.js.flow +0 -8
  87. package/dist/forms/SelectField/types.js.flow +0 -26
  88. package/dist/forms/TextAreaField/TextAreaField.js.flow +0 -35
  89. package/dist/forms/TextAreaField/index.js.flow +0 -8
  90. package/dist/forms/TextField/TextField.js.flow +0 -38
  91. package/dist/forms/TextField/index.js.flow +0 -8
  92. package/dist/forms/WeekField/WeekField.js.flow +0 -35
  93. package/dist/forms/WeekField/index.js.flow +0 -8
  94. package/dist/forms/WeekPickerField/WeekPickerField.d.ts +0 -25
  95. package/dist/forms/WeekPickerField/WeekPickerField.js.flow +0 -35
  96. package/dist/forms/WeekPickerField/index.d.ts +0 -1
  97. package/dist/forms/WeekPickerField/index.js.flow +0 -8
  98. package/dist/forms/index.js.flow +0 -56
  99. package/dist/foundation/colors.js.flow +0 -116
  100. package/dist/icons/IconArrowDown.js.flow +0 -19
  101. package/dist/icons/IconArrowLeft.js.flow +0 -17
  102. package/dist/icons/IconArrowRight.js.flow +0 -17
  103. package/dist/icons/IconArrowUp.js.flow +0 -17
  104. package/dist/icons/IconCalendar.js.flow +0 -17
  105. package/dist/icons/IconCheck.js.flow +0 -17
  106. package/dist/icons/IconChevronDown.js.flow +0 -18
  107. package/dist/icons/IconChevronUp.js.flow +0 -16
  108. package/dist/icons/IconComment.js.flow +0 -16
  109. package/dist/icons/IconDelete.js.flow +0 -17
  110. package/dist/icons/IconEdit.js.flow +0 -17
  111. package/dist/icons/IconExclaim.flow +0 -17
  112. package/dist/icons/IconEye.js.flow +0 -17
  113. package/dist/icons/IconEyeSlash.js.flow +0 -17
  114. package/dist/icons/IconLocation.js.flow +0 -16
  115. package/dist/icons/IconMinusCircle.js.flow +0 -16
  116. package/dist/icons/IconMore.js.flow +0 -17
  117. package/dist/icons/IconRemove.js.flow +0 -17
  118. package/dist/icons/IconUser.flow +0 -17
  119. package/dist/icons/IconUser.js.flow +0 -17
  120. package/dist/icons/IconUserPlus.js.flow +0 -17
  121. package/dist/icons/index.js.flow +0 -50
  122. package/dist/icons/types.js.flow +0 -8
  123. package/dist/index.js.flow +0 -14
  124. package/dist/media/Avatar/Avatar.js.flow +0 -18
  125. package/dist/media/Avatar/index.js.flow +0 -8
  126. package/dist/media/Badge/Badge.js.flow +0 -18
  127. package/dist/media/Badge/index.js.flow +0 -8
  128. package/dist/media/index.js.flow +0 -10
  129. package/dist/nophoto~DrLDqLZE.png +0 -0
  130. package/dist/overlay/Modal/Modal.js.flow +0 -23
  131. package/dist/overlay/Modal/ModalBody/ModalBody.js.flow +0 -13
  132. package/dist/overlay/Modal/ModalBody/index.js.flow +0 -8
  133. package/dist/overlay/Modal/ModalFooter/ModalFooter.js.flow +0 -18
  134. package/dist/overlay/Modal/ModalFooter/index.js.flow +0 -8
  135. package/dist/overlay/Modal/index.js.flow +0 -8
  136. package/dist/overlay/Tooltip/Tooltip.js.flow +0 -21
  137. package/dist/overlay/Tooltip/index.js.flow +0 -8
  138. package/dist/overlay/index.js.flow +0 -12
  139. package/dist/profile/LetterProfile/LetterProfile.d.ts +0 -9
  140. package/dist/profile/LetterProfile/index.d.ts +0 -1
  141. package/dist/profile/index.d.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "1.5.2",
3
+ "version": "1.5.6",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",
@@ -31,10 +31,10 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/core": "^7.14.3",
34
- "@storybook/addon-actions": "^6.2.9",
35
- "@storybook/addon-essentials": "^6.2.9",
36
- "@storybook/addon-links": "^6.2.9",
37
- "@storybook/react": "^6.2.9",
34
+ "@storybook/addon-actions": "^6.4.12",
35
+ "@storybook/addon-essentials": "^6.4.12",
36
+ "@storybook/addon-links": "^6.4.12",
37
+ "@storybook/react": "^6.4.12",
38
38
  "@testing-library/jest-dom": "^5.12.0",
39
39
  "@testing-library/react": "^11.2.7",
40
40
  "@testing-library/user-event": "^13.2.1",
@@ -64,12 +64,12 @@
64
64
  "formik": "^2.2.6",
65
65
  "gh-pages": "^2.2.0",
66
66
  "microbundle-crl": "^0.13.10",
67
- "node-sass": "^4.0.0",
68
67
  "npm-run-all": "^4.1.5",
69
68
  "prettier": "^2.0.4",
70
69
  "react": "^16.13.1",
71
70
  "react-dom": "^16.13.1",
72
71
  "react-scripts": "^3.4.1",
72
+ "sass": "^1.48.0",
73
73
  "sass-loader": "10.1.1",
74
74
  "typescript": "^3.7.5",
75
75
  "yup": "^0.32.9"
package/CHANGELOG.md DELETED
@@ -1,190 +0,0 @@
1
- ## 1.5.2 (November 10th, 2021)
2
-
3
- ### Enhancements
4
-
5
- - PasswordField: Updated met criteria bullet to IconCheck to be consistent with mobile ([#69](https://github.com/7shifts/sous-chef/pull/69))
6
-
7
- ### New Components
8
-
9
- - IconCheck: added for now to use in PasswordCriteria. ([#69](https://github.com/7shifts/sous-chef/pull/69))
10
-
11
- ## 1.5.1 (October 20th, 2021)
12
-
13
- ### Bug fixes
14
-
15
- - DataTable: Exported `DataTableCustomComponent` type ([#67](https://github.com/7shifts/sous-chef/pull/67))
16
-
17
- ## 1.5.0 (October 19th, 2021)
18
-
19
- ### New components
20
-
21
- - PillSelectField ([#65](https://github.com/7shifts/sous-chef/pull/65))
22
-
23
- ### Bug fixes
24
-
25
- - Field: Updated to align properly when using FormRow with only one form field with with label ([#66](https://github.com/7shifts/sous-chef/pull/66))
26
-
27
- ## 1.4.1 (October 8th, 2021)
28
-
29
- ### Enhancements
30
-
31
- - DataTable: Updated flow types ([#62](https://github.com/7shifts/sous-chef/pull/62))
32
- - Tooltip: Added the prop `onClose` to listen when the overlay closed ([#64](https://github.com/7shifts/sous-chef/pull/64))
33
-
34
- ## 1.4.0 (October 7th, 2021)
35
-
36
- ### Enhancements
37
-
38
- - Updated SelectField to support disabled options
39
-
40
- ## 1.3.1 (September 29th, 2021)
41
-
42
- ### Bug fixes
43
-
44
- - Avatar: updated to show the proper background when the image url is not available ([#57](https://github.com/7shifts/sous-chef/pull/57))
45
- - PaginationControls: updated to have the title with the first character capitalized ([#58](https://github.com/7shifts/sous-chef/pull/58))
46
- - DataTable: Added missing exports ([#59](https://github.com/7shifts/sous-chef/pull/59))
47
-
48
- ## 1.3.0 (September 27th, 2021)
49
-
50
- ### New components
51
-
52
- - DataTable ([#50](https://github.com/7shifts/sous-chef/pull/50)) - And added editable functionality ([#54](https://github.com/7shifts/sous-chef/pull/54))
53
-
54
- ## 1.2.2 (September 24rd, 2021)
55
-
56
- ### Bug fixes
57
-
58
- - TextField: Removed the support for Formik `Field` as it was a breaking change in the `TextField` component ([#56](https://github.com/7shifts/sous-chef/pull/56))
59
-
60
- ## 1.2.1 (September 23rd, 2021)
61
-
62
- ### Bug fixes
63
-
64
- - Modal: When a scroll was showing, the top content was getting cut off on the top. Also updated the flow type ([#55](https://github.com/7shifts/sous-chef/pull/55))
65
-
66
- ### Enhancements
67
-
68
- - Form: Updated the field components to work with formik components such as `Field` and `FieldArray`. It also suports now dynamic fields ([#53](https://github.com/7shifts/sous-chef/pull/53))
69
-
70
- ## 1.2.0 (September 15th, 2021)
71
-
72
- ### New components
73
-
74
- - Modal ([#49](https://github.com/7shifts/sous-chef/pull/49))
75
-
76
- ### Bug fixes
77
-
78
- - Avatar: The fallback image was not being applied properly ([#46](https://github.com/7shifts/sous-chef/pull/46))
79
-
80
- ## 1.1.4 (August 17, 2021)
81
-
82
- ### Bug fixes
83
-
84
- - Button: Fixed the padding when having only an icon inside the Button ([#45](https://github.com/7shifts/sous-chef/pull/45))
85
-
86
- ## 1.1.3 (August 5, 2021)
87
-
88
- ### Bug fixes
89
-
90
- - MultiSelectField: It was not wrapping to the next line when multiple options were select and they didn't fit on the space given ([#44](https://github.com/7shifts/sous-chef/pull/44))
91
-
92
- ## 1.1.2 (August 4, 2021)
93
-
94
- ### Bug fixes
95
-
96
- - SelectField: When using the `prefix` prop it had a missaligned prefix ([#43](https://github.com/7shifts/sous-chef/pull/43))
97
- - SelectField: Implemented the `onBlur` prop ([#42](https://github.com/7shifts/sous-chef/pull/42))
98
- - MultiSelectField: Implemented the `onBlur` prop ([#42](https://github.com/7shifts/sous-chef/pull/42))
99
-
100
- ## 1.1.1 (July 28, 2021)
101
-
102
- ### Enhancements
103
-
104
- - Badge: Added the `title` prop to make it easier adding a black tooltip ([#40](https://github.com/7shifts/sous-chef/pull/40))
105
-
106
- ### New components
107
-
108
- - IconExclaim ([#41](https://github.com/7shifts/sous-chef/pull/41))
109
-
110
- ## 1.1.0 (July 23, 2021)
111
-
112
- ### New components
113
-
114
- - Badge ([#37](https://github.com/7shifts/sous-chef/pull/37))
115
- - Avatar ([#38](https://github.com/7shifts/sous-chef/pull/38))
116
- - IconComment ([#39](https://github.com/7shifts/sous-chef/pull/39))
117
- - IconLocation ([#39](https://github.com/7shifts/sous-chef/pull/39))
118
- - IconMinusCircle ([#39](https://github.com/7shifts/sous-chef/pull/39))
119
- - IconUserPlus ([#39](https://github.com/7shifts/sous-chef/pull/39))
120
-
121
- ### Bug fixes
122
-
123
- - SelectField: When there is no container with size defined the component will grow with the content until it fills the space ([#36](https://github.com/7shifts/sous-chef/pull/36))
124
-
125
- ### Enhancements
126
-
127
- - SelectField: Added the `prefix` prop and the `asToolbarField` so the component will look as a toolbar filter with no border ([#36](https://github.com/7shifts/sous-chef/pull/36))
128
-
129
- ## 1.0.3 (July 15, 2021)
130
-
131
- ### Bug fixes
132
-
133
- - Button: Fixed global CSS overrites when button behaves like link ([#35](https://github.com/7shifts/sous-chef/pull/35))
134
-
135
- ## 1.0.2 (July 15, 2021)
136
-
137
- ### Bug fixes
138
-
139
- - TextAreaField: Fixed global CSS overrites ([#34](https://github.com/7shifts/sous-chef/pull/34))
140
-
141
- ## 1.0.1 (July 14, 2021)
142
-
143
- ### Enhancements
144
-
145
- - TextField: Added the possibility of using `useRef` ([#33](https://github.com/7shifts/sous-chef/pull/33))
146
-
147
- ## 1.0.0 (June 25, 2021)
148
-
149
- ### New components
150
-
151
- - Tooltip ([#16](https://github.com/7shifts/sous-chef/pull/16))
152
- - MultiSelectField ([#19](https://github.com/7shifts/sous-chef/pull/19))
153
- - TextAreaField ([#21](https://github.com/7shifts/sous-chef/pull/21))
154
- - RadioGroupField ([#22](https://github.com/7shifts/sous-chef/pull/22))
155
- - WeekField ([#24](https://github.com/7shifts/sous-chef/pull/24))
156
- - DateRangeField ([#25](https://github.com/7shifts/sous-chef/pull/25))
157
- - IconRemove ([#26](https://github.com/7shifts/sous-chef/pull/26))
158
-
159
- ### Enhancements
160
-
161
- - Button: Added the possibility of making Butons act as links ([#23](https://github.com/7shifts/sous-chef/pull/23))
162
- - SelectField and MultiSelectField: Added the possibility of customizing the select options ([#27](https://github.com/7shifts/sous-chef/pull/27))
163
-
164
- ### Bug fixes
165
-
166
- - Form: consolidated the Flow types for `useFormik` and `<Formik ...>` ([#28](https://github.com/7shifts/sous-chef/pull/28))
167
- - Icons: added missing Flow types ([#26](https://github.com/7shifts/sous-chef/pull/26))
168
-
169
- ### Pre existing components
170
-
171
- - Button
172
- - PaginationControls
173
- - Toggle
174
- - Inline
175
- - Stack
176
- - ResourceTable
177
- - Spinner
178
- - CheckboxField
179
- - DateField
180
- - DateRangeField
181
- - Form
182
- - FormRow
183
- - MultiSelectField
184
- - PasswordField
185
- - RadioGroupField
186
- - SelectField
187
- - TextAreaField
188
- - TextField
189
- - WeekField
190
- - Tooltip
@@ -1,44 +0,0 @@
1
- /**
2
- * Flowtype definitions for Button
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- declare type ButtonTheme =
10
- | 'default'
11
- | 'primary'
12
- | 'danger'
13
- | 'upsell'
14
- | 'marketing'
15
- | 'hollow'
16
- | 'link-primary'
17
- | 'link-danger'
18
- | 'link-upsell'
19
- | 'link-toolbar'
20
- | 'link-contrast'
21
- | 'link-icon';
22
- declare type Props = {
23
- children: React$Node,
24
- type?: 'button' | 'submit' | 'reset',
25
-
26
- /**
27
- * It controls the button theme
28
- */
29
- theme?: ButtonTheme,
30
- disabled?: boolean,
31
- onClick?: (e: SyntheticEvent<HTMLButtonElement>) => void,
32
- id?: string,
33
- wide?: boolean,
34
- loading?: boolean,
35
-
36
- /**
37
- * This will show a black tooltip when the user hover the button
38
- */
39
- title?: string,
40
- href?: string,
41
- target?: '_self' | '_blank',
42
- };
43
- declare var _default: React$AbstractComponent<Props, HTMLElement>;
44
- declare export default typeof _default;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from './Button';
@@ -1,16 +0,0 @@
1
- /**
2
- * Flowtype definitions for PaginationControls
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- declare type Props = {
10
- hasPrevious?: boolean,
11
- hasNext?: boolean,
12
- onPreviousClick: () => void,
13
- onNextClick: () => void,
14
- };
15
- declare var PaginationControls: (props: Props) => React$Node;
16
- declare export default typeof PaginationControls;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from './PaginationControls';
@@ -1,21 +0,0 @@
1
- /**
2
- * Flowtype definitions for Toggle
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- declare type Props = {
10
- /**
11
- * It turns the toggle ON if `true` and OFF if `false`
12
- */
13
- checked: boolean,
14
- onChange: (e: boolean) => void,
15
- label?: React$Node,
16
- caption?: React$Node,
17
- disabled?: boolean,
18
- id?: string,
19
- };
20
- declare var Toggle: (props: Props) => React$Node;
21
- declare export default typeof Toggle;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./Toggle";
@@ -1,11 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import Toggle from './Toggle';
9
- import Button from './Button';
10
- import PaginationControls from './PaginationControls';
11
- declare export { Toggle, Button, PaginationControls };
@@ -1,59 +0,0 @@
1
- /**
2
- * Flowtype definitions for DataTable
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- import type { Column, CustomComponent, Item, Sort } from './types';
10
- declare type Props<T> = {
11
- /**
12
- * Each element represents a row and each key of the object represents a column
13
- */
14
- items: Item<T>[],
15
-
16
- /**
17
- * For each column element, the `name` property should match the key on `items`
18
- */
19
- columns: Column[],
20
-
21
- /**
22
- * A custom component for customizing how the each item is rendered. It pass as props: `item`, `index`, `columnSizes` and `columns`
23
- */
24
- itemComponent?: React$ComponentType<CustomComponent<T>>,
25
- maxHeight?: number,
26
-
27
- /**
28
- * Used for pagination
29
- */
30
- hasPrevious?: boolean,
31
-
32
- /**
33
- * Used for pagination
34
- */
35
- hasNext?: boolean,
36
-
37
- /**
38
- * Used for pagination
39
- */
40
- onPreviousClick?: () => void,
41
-
42
- /**
43
- * Used for pagination
44
- */
45
- onNextClick?: () => void,
46
- isLoading?: boolean,
47
-
48
- /**
49
- * It is fired when a sorted column is clicked to be sorted
50
- */
51
- onSort?: (sort: Sort) => void,
52
- showActionMenu?: boolean,
53
- /** Will render footer component if not null - expects a custom RowItem component */
54
- footerComponent?: React.ReactNode;
55
- /** Will render vertical borders between columns if true */
56
- hasVerticalBorders?: boolean
57
- };
58
- declare var DataTable: <T>(props: Props<T>) => React$Node;
59
- declare export default typeof DataTable;
@@ -1,15 +0,0 @@
1
- /**
2
- * Flowtype definitions for DataTableContext
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
- import * as React from 'react';
8
-
9
- export type DataTableContextType = {
10
- columnSizes?: number[],
11
- showActionMenu?: boolean,
12
- };
13
- declare var Context: React$Context<DataTableContextType>;
14
- declare export var useDataTableContext: () => DataTableContextType;
15
- declare export default typeof Context;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./DataTable";
@@ -1,32 +0,0 @@
1
- /**
2
- * Flowtype definitions for types
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
- import * as React from 'react';
8
-
9
- export type Column = {
10
- name: string,
11
- label?: React$Node,
12
- size?: number,
13
- isSortable?: boolean,
14
- currentSort?: SortDirection,
15
- isRightAligned?: boolean
16
- };
17
- export type SortDirection = 'asc' | 'desc' | null;
18
- export type Sort = {
19
- columnName: string,
20
- direction: SortDirection,
21
- };
22
- export type Item<T> = T | (T & { actions?: Action[] });
23
- export type CustomComponent<T> = {
24
- item: Item<T>,
25
- index: number,
26
- columnSizes?: number[],
27
- columns?: Column[],
28
- };
29
- export type Action = {
30
- label: React$Node,
31
- onAction: () => void,
32
- };
@@ -1,16 +0,0 @@
1
- /**
2
- * Flowtype definitions for DataTableRow
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
- import * as React from 'react';
8
- declare type Props = {
9
- value?: string,
10
- /** Use a prefix for things like currency symbols (“$”, “¥”, “£”) or icons. */
11
- prefix?: React.ReactNode,
12
- /** Use suffix for things like units of measure (“in”, “cm”, ”hours”) or icons. */
13
- suffix?: React.ReactNode
14
- };
15
- declare var DataTableCell: (props: Props) => React$Node;
16
- declare export default typeof DataTableCell;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./DataTableCell";
@@ -1,26 +0,0 @@
1
- /**
2
- * Flowtype definitions for DataTableRow
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
- import * as React from 'react';
8
- declare type Props = {
9
- name: string,
10
- columnIndex: number,
11
- rowIndex: number,
12
- id?: string,
13
- value?: string,
14
- onChange?: (e: string) => void,
15
- onBlur?: (e: string) => void,
16
- placeholder?: string,
17
- disabled?: boolean,
18
- error?: string,
19
- /** Use a prefix for things like currency symbols (“$”, “¥”, “£”) or icons. */
20
- prefix?: React.ReactNode,
21
- /** Use suffix for things like units of measure (“in”, “cm”, ”hours”) or icons. */
22
- suffix?: React.ReactNode,
23
- defaultValue?: string
24
- };
25
- declare var DataTableEditableCell: (props: Props) => React$Node;
26
- declare export default typeof DataTableEditableCell;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./DataTableEditableCell";
@@ -1,17 +0,0 @@
1
- /**
2
- * Flowtype definitions for DataTableRow
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- import type { Action } from '../DataTable/types';
10
- declare type Props = {
11
- children: React$Node,
12
- onClick?: () => void,
13
- isSelected?: boolean,
14
- actions?: Action[],
15
- };
16
- declare var DataTableRow: (props: Props) => React$Node;
17
- declare export default typeof DataTableRow;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./DataTableRow";
@@ -1,29 +0,0 @@
1
- /**
2
- * Flowtype definitions for Flex
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- import type { AlignItems, FlexWrap, JustifyContent, Space } from './types';
10
- declare type Props = {
11
- children: React$Node,
12
- space?: Space,
13
-
14
- /**
15
- * It sets how each item will grow or shrink to fit the space available in its flex container. The default value is `0 1 auto` but it can be overriden. Check it out this [official doc](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) to see all the possible values.
16
- */
17
- flex?: (string | number)[],
18
- alignItems?: AlignItems,
19
- justifyContent?: JustifyContent,
20
- inlineFlex?: boolean,
21
- direction?: 'row' | 'column',
22
- flexItems?: boolean,
23
- flexWrap?: FlexWrap,
24
- };
25
- /**
26
- * Flex is a internal component used by Stack and Inline. DON'T use this component outside of Sous Chef
27
- */
28
- declare var Flex: (props: Props) => React$Node;
29
- declare export default typeof Flex;
@@ -1,8 +0,0 @@
1
- /**
2
- * Flowtype definitions for index
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- declare export { default } from "./Flex";
@@ -1,27 +0,0 @@
1
- /**
2
- * Flowtype definitions for types
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- export type AlignItems = "flex-start" | "flex-end" | "center" | "stretch";
9
- export type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
10
- export type JustifyContent = "start" | "end" | "center" | "space-between";
11
- export type Space =
12
- | 0
13
- | 4
14
- | 8
15
- | 12
16
- | 16
17
- | 20
18
- | 24
19
- | 28
20
- | 32
21
- | 36
22
- | 40
23
- | 44
24
- | 48
25
- | 52
26
- | 56
27
- | 60;
@@ -1,41 +0,0 @@
1
- /**
2
- * Flowtype definitions for Inline
3
- * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
5
- * @flow
6
- */
7
-
8
- import * as React from 'react';
9
- import type {
10
- AlignItems,
11
- FlexWrap,
12
- JustifyContent,
13
- Space,
14
- } from '../Flex/types';
15
- declare type Props = {
16
- children: React$Node,
17
-
18
- /**
19
- * From `0` to `60` with multiples of `4`, eg. `8`, `12`, `16` and so on.
20
- */
21
- space?: Space,
22
-
23
- /**
24
- * It sets how each item will grow or shrink to fit the space available in its flex container. The default value is `0 1 auto` but it can be overriden. Check it out this [official doc](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) to see all the possible values.
25
- */
26
- flex?: (string | number)[],
27
-
28
- /**
29
- * One of: `flex-start`, `flex-end`, `center`, `stretch`
30
- */
31
- alignItems?: AlignItems,
32
-
33
- /**
34
- * One of: `start`, `end`, `center`, `space-between`
35
- */
36
- justifyContent?: JustifyContent,
37
- inlineFlex?: boolean,
38
- flexWrap?: FlexWrap,
39
- };
40
- declare var Inline: (props: Props) => React$Node;
41
- declare export default typeof Inline;