@innovaccer/design-system 2.6.0 → 2.7.0-0

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 (287) hide show
  1. package/.eslintrc.json +10 -9
  2. package/.github/workflows/chromatic.yml +5 -0
  3. package/.github/workflows/pull_request.yml +1 -1
  4. package/.storybook/main.js +4 -0
  5. package/.vscode/settings.json +11 -0
  6. package/CHANGELOG.md +36 -0
  7. package/CONTRIBUTING.md +7 -1
  8. package/core/accessibility/utils/useAccessibilityProps.ts +4 -2
  9. package/core/common.type.tsx +22 -0
  10. package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +9 -9
  11. package/core/components/atoms/_chip/index.tsx +17 -3
  12. package/core/components/atoms/avatar/Avatar.tsx +4 -14
  13. package/core/components/atoms/avatar/__stories__/variants/Appearance.story.tsx +3 -2
  14. package/core/components/atoms/avatar/__tests__/Avatar.test.tsx +14 -9
  15. package/core/components/atoms/avatarGroup/AvatarGroup.tsx +3 -5
  16. package/core/components/atoms/badge/Badge.tsx +2 -12
  17. package/core/components/atoms/badge/__tests__/Badge.test.tsx +22 -7
  18. package/core/components/atoms/badge/_stories_/variants/Appearance.story.tsx +3 -2
  19. package/core/components/atoms/badge/_stories_/variants/Subtle.story.tsx +3 -2
  20. package/core/components/atoms/button/Button.tsx +10 -7
  21. package/core/components/atoms/button/__stories__/index.story.tsx +1 -1
  22. package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +2 -2
  23. package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +2 -2
  24. package/core/components/atoms/button/__stories__/variants/icon/IconLeft.story.tsx +2 -2
  25. package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +2 -2
  26. package/core/components/atoms/button/__tests__/Button.test.tsx +1 -1
  27. package/core/components/atoms/button/__tests__/__snapshots__/Button.test.tsx.snap +0 -137
  28. package/core/components/atoms/card/__stories__/empty.story.tsx +1 -1
  29. package/core/components/atoms/card/__stories__/nested.story.tsx +1 -1
  30. package/core/components/atoms/card/__stories__/scroll.story.tsx +1 -1
  31. package/core/components/atoms/checkbox/Checkbox.tsx +8 -9
  32. package/core/components/atoms/checkbox/__stories__/variants/Size.story.tsx +2 -2
  33. package/core/components/atoms/chip/Chip.tsx +3 -2
  34. package/core/components/atoms/chip/__stories__/variants/Selection.story.tsx +17 -0
  35. package/core/components/atoms/chip/__stories__/variants/Type.story.tsx +2 -2
  36. package/core/components/atoms/chip/__tests__/Chip.test.tsx +7 -0
  37. package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +5 -5
  38. package/core/components/atoms/chipGroup/__tests__/chipGroup.test.tsx +2 -2
  39. package/core/components/atoms/chipGroup/_stories_/index.story.tsx +2 -2
  40. package/core/components/atoms/dropdown/Dropdown.tsx +18 -17
  41. package/core/components/atoms/dropdown/DropdownButton.tsx +2 -2
  42. package/core/components/atoms/dropdown/DropdownList.tsx +10 -5
  43. package/core/components/atoms/dropdown/Loading.tsx +1 -1
  44. package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.tsx +45 -0
  45. package/core/components/atoms/dropdown/__stories__/_common_/types.tsx +3 -0
  46. package/core/components/atoms/dropdown/__stories__/variants/Size.story.tsx +2 -2
  47. package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +1 -1
  48. package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +12 -1
  49. package/core/components/atoms/dropdown/__tests__/Loading.test.tsx +0 -1
  50. package/core/components/atoms/dropdown/option/index.tsx +1 -1
  51. package/core/components/atoms/heading/Heading.tsx +4 -4
  52. package/core/components/atoms/heading/__stories__/variants/Appearance.story.tsx +3 -2
  53. package/core/components/atoms/heading/__tests__/Heading.test.tsx +4 -3
  54. package/core/components/atoms/icon/Icon.tsx +3 -3
  55. package/core/components/atoms/input/Input.tsx +3 -3
  56. package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +62 -0
  57. package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +38 -0
  58. package/core/components/atoms/input/__stories__/variants/controlledInput.story.tsx +46 -0
  59. package/core/components/atoms/input/__stories__/variants/types/BasicInput.story.tsx +2 -2
  60. package/core/components/atoms/input/__stories__/variants/types/IconLeft.story.tsx +2 -10
  61. package/core/components/atoms/input/__stories__/variants/types/WithLabel.story.tsx +1 -9
  62. package/core/components/atoms/label/Label.tsx +1 -1
  63. package/core/components/atoms/legend/Legend.tsx +2 -2
  64. package/core/components/atoms/legend/__stories__/variants/labelAppearance.story.tsx +2 -2
  65. package/core/components/atoms/link/Link.tsx +4 -4
  66. package/core/components/atoms/message/Message.tsx +12 -12
  67. package/core/components/atoms/message/__stories__/index.story.tsx +1 -1
  68. package/core/components/atoms/message/__stories__/variants/Appearance.story.tsx +1 -1
  69. package/core/components/atoms/message/__stories__/variants/AppearanceTitle.story.tsx +1 -1
  70. package/core/components/atoms/message/__tests__/Message.test.tsx +1 -6
  71. package/core/components/atoms/message/__tests__/__snapshots__/Message.test.tsx.snap +0 -45
  72. package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +2 -2
  73. package/core/components/atoms/metricInput/MetricInput.tsx +5 -5
  74. package/core/components/atoms/multiSlider/SliderUtils.tsx +1 -4
  75. package/core/components/atoms/multiSlider/index.tsx +3 -4
  76. package/core/components/atoms/outsideClick/OutsideClick.tsx +1 -2
  77. package/core/components/atoms/paragraph/Paragraph.tsx +2 -2
  78. package/core/components/atoms/paragraph/__stories__/variants/Appearance.story.tsx +2 -2
  79. package/core/components/atoms/paragraph/__tests__/Paragraph.test.tsx +2 -2
  80. package/core/components/atoms/pills/Pills.tsx +2 -12
  81. package/core/components/atoms/pills/__stories__/variants/Appearance.story.tsx +3 -2
  82. package/core/components/atoms/pills/__stories__/variants/Subtle.story.tsx +3 -2
  83. package/core/components/atoms/pills/__tests__/Pills.test.tsx +3 -2
  84. package/core/components/atoms/placeholderImage/PlaceholderImage.tsx +2 -2
  85. package/core/components/atoms/placeholderImage/__stories__/variants/Size.story.tsx +2 -2
  86. package/core/components/atoms/placeholderParagraph/PlaceholderParagraph.tsx +2 -2
  87. package/core/components/atoms/placeholderParagraph/__stories__/variants/Size.story.tsx +2 -2
  88. package/core/components/atoms/popperWrapper/PopperWrapper.tsx +2 -6
  89. package/core/components/atoms/progressRing/ProgressRing.tsx +2 -2
  90. package/core/components/atoms/progressRing/__stories__/variants/Size.story.tsx +1 -1
  91. package/core/components/atoms/radio/Radio.tsx +4 -5
  92. package/core/components/atoms/rangeSlider/RangeSlider.tsx +1 -2
  93. package/core/components/atoms/rangeSlider/__stories__/index.story.tsx +1 -2
  94. package/core/components/atoms/rangeSlider/__stories__/variants/Controlled.story.tsx +1 -2
  95. package/core/components/atoms/rangeSlider/__stories__/variants/CustomLabels.story.tsx +1 -2
  96. package/core/components/atoms/spinner/Spinner.tsx +4 -4
  97. package/core/components/atoms/spinner/__stories__/variants/Appearance.story.tsx +2 -2
  98. package/core/components/atoms/spinner/__stories__/variants/Size.story.tsx +1 -1
  99. package/core/components/atoms/statusHint/StatusHint.tsx +2 -3
  100. package/core/components/atoms/statusHint/__stories__/variants/Appearance.story.tsx +3 -2
  101. package/core/components/atoms/statusHint/__tests__/StatusHint.test.tsx +3 -2
  102. package/core/components/atoms/subheading/Subheading.tsx +2 -2
  103. package/core/components/atoms/subheading/__stories__/variants/Appearance.story.tsx +3 -2
  104. package/core/components/atoms/subheading/__tests__/Subheading.test.tsx +3 -2
  105. package/core/components/atoms/switchInput/Switch.tsx +7 -8
  106. package/core/components/atoms/text/Text.tsx +4 -4
  107. package/core/components/atoms/text/__stories__/variants/Appearance.story.tsx +2 -2
  108. package/core/components/atoms/text/__tests__/Text.test.tsx +2 -3
  109. package/core/components/atoms/toast/ActionButton.tsx +2 -2
  110. package/core/components/atoms/toast/Toast.tsx +11 -6
  111. package/core/components/atoms/toast/__stories__/index.story.tsx +2 -6
  112. package/core/components/atoms/toast/__stories__/variants/Appearance.story.tsx +3 -2
  113. package/core/components/atoms/toast/__stories__/variants/ToastMessage.story.tsx +3 -2
  114. package/core/components/atoms/toast/__stories__/variants/ToastWithAction.story.tsx +3 -2
  115. package/core/components/atoms/toast/__tests__/Toast.test.tsx +1 -1
  116. package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +0 -131
  117. package/core/components/css-utilities/Schema.tsx +1 -1
  118. package/core/components/css-utilities/Spacing/Schema.tsx +1 -1
  119. package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +2 -2
  120. package/core/components/molecules/dropzone/Dropzone.tsx +3 -3
  121. package/core/components/molecules/dropzone/DropzoneBase.tsx +22 -38
  122. package/core/components/molecules/dropzone/__stories__/index.story.tsx +151 -41
  123. package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +2 -2
  124. package/core/components/molecules/dropzone/utils.tsx +6 -4
  125. package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +4 -4
  126. package/core/components/molecules/emptyState/EmptyState.tsx +4 -4
  127. package/core/components/molecules/emptyState/__stories__/pageNotLoadedWithSVG.story.tsx +26 -26
  128. package/core/components/molecules/fileList/FileListItem.tsx +1 -2
  129. package/core/components/molecules/fileUploader/FileUploaderItem.tsx +1 -2
  130. package/core/components/molecules/fileUploader/FileUploaderStatus.tsx +1 -1
  131. package/core/components/molecules/fileUploader/__stories__/_common_/types.tsx +3 -0
  132. package/core/components/molecules/fileUploader/__stories__/index.story.tsx +3 -222
  133. package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +5 -7
  134. package/core/components/molecules/inputMask/InputMask.tsx +212 -146
  135. package/core/components/molecules/inputMask/__stories__/index.story.tsx +24 -0
  136. package/core/components/molecules/modal/Modal.tsx +4 -6
  137. package/core/components/molecules/modal/__stories__/Confirmation.story.tsx +1 -1
  138. package/core/components/molecules/placeholder/Placeholder.tsx +2 -2
  139. package/core/components/molecules/popover/Popover.tsx +2 -9
  140. package/core/components/molecules/sidesheet/Sidesheet.tsx +5 -7
  141. package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.tsx +172 -0
  142. package/core/components/molecules/tooltip/Tooltip.tsx +4 -4
  143. package/core/components/organisms/calendar/__stories__/variants/firstDayOfWeek.story.tsx +2 -2
  144. package/core/components/organisms/calendar/utility.ts +3 -3
  145. package/core/components/organisms/choiceList/ChoiceList.tsx +11 -11
  146. package/core/components/organisms/datePicker/DatePicker.tsx +1 -1
  147. package/core/components/organisms/datePicker/Trigger.tsx +1 -5
  148. package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +9 -10
  149. package/core/components/organisms/dateRangePicker/SingleInputTrigger.tsx +0 -1
  150. package/core/components/organisms/dateRangePicker/Trigger.tsx +2 -2
  151. package/core/components/organisms/dateRangePicker/__stories__/variants/monthsInView.story.tsx +2 -2
  152. package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +16 -16
  153. package/core/components/organisms/grid/Cell.tsx +19 -19
  154. package/core/components/organisms/grid/Grid.tsx +3 -4
  155. package/core/components/organisms/grid/GridBody.tsx +0 -1
  156. package/core/components/organisms/grid/GridContext.ts +1 -1
  157. package/core/components/organisms/grid/__stories__/_common_/editableSchema.tsx +1 -3
  158. package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +1 -1
  159. package/core/components/organisms/grid/__stories__/_common_/loaderSchema.ts +0 -2
  160. package/core/components/organisms/grid/__stories__/_common_/schema.tsx +1 -3
  161. package/core/components/organisms/grid/__stories__/_common_/simpleLoaderSchema.ts +0 -2
  162. package/core/components/organisms/grid/__stories__/_common_/statusSchema.ts +0 -2
  163. package/core/components/organisms/inlineMessage/InlineMessage.tsx +2 -2
  164. package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +3 -2
  165. package/core/components/organisms/list/__stories__/_common_/types.tsx +3 -0
  166. package/core/components/organisms/list/__stories__/index.story.tsx +0 -16
  167. package/core/components/organisms/table/Table.tsx +2 -2
  168. package/core/components/organisms/table/__stories__/CompressedTable.story.tsx +1 -1
  169. package/core/components/organisms/table/__stories__/DataTable.story.tsx +1 -1
  170. package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +1 -1
  171. package/core/components/organisms/table/__stories__/PinnedColumn.story.tsx +1 -1
  172. package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +1 -1
  173. package/core/components/organisms/table/__stories__/StandardTable.story.tsx +1 -1
  174. package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +1 -1
  175. package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +1 -1
  176. package/core/components/organisms/table/__stories__/TightStory.story.tsx +1 -1
  177. package/core/components/organisms/table/__stories__/_common_/types.tsx +3 -0
  178. package/core/components/organisms/table/__stories__/variants/showHead.story.tsx +2 -2
  179. package/core/components/organisms/table/__stories__/variants/showMenu.story.tsx +2 -2
  180. package/core/components/organisms/table/__stories__/variants/size.story.tsx +2 -2
  181. package/core/components/organisms/table/__stories__/variants/type.story.tsx +2 -2
  182. package/core/components/organisms/table/__stories__/variants/withCheckbox.story.tsx +2 -2
  183. package/core/components/organisms/table/__stories__/variants/withPagination.story.tsx +2 -2
  184. package/core/components/organisms/timePicker/TimePicker.tsx +3 -7
  185. package/core/components/organisms/verticalNav/__stories__/schema.tsx +0 -2
  186. package/core/components/organisms/verticalNav/__tests__/VerticalNav.test.tsx +1 -2
  187. package/core/global.d.ts +9 -0
  188. package/core/index.tsx +1 -1
  189. package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +18 -5
  190. package/core/utils/docPage/generateImports.tsx +2 -3
  191. package/core/utils/docPage/index.tsx +30 -20
  192. package/core/utils/docPage/sandbox.tsx +14 -7
  193. package/core/utils/overlayHelper.ts +7 -3
  194. package/core/utils/testHelper.ts +1 -1
  195. package/core/utils/types.tsx +1 -1
  196. package/css/dist/index.css +48 -30
  197. package/css/dist/index.css.map +1 -1
  198. package/css/src/components/button.css +5 -5
  199. package/css/src/components/calendar.css +1 -1
  200. package/css/src/components/chip.css +6 -4
  201. package/css/src/components/fullscreenModal.css +4 -3
  202. package/css/src/components/message.css +0 -5
  203. package/css/src/components/switch.css +23 -2
  204. package/css/src/components/toast.css +0 -5
  205. package/css/src/variables/index.css +5 -2
  206. package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +4 -1
  207. package/dist/core/common.type.d.ts +12 -0
  208. package/dist/core/components/atoms/avatar/Avatar.d.ts +4 -4
  209. package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -3
  210. package/dist/core/components/atoms/badge/Badge.d.ts +2 -2
  211. package/dist/core/components/atoms/button/Button.d.ts +6 -6
  212. package/dist/core/components/atoms/checkbox/Checkbox.d.ts +3 -3
  213. package/dist/core/components/atoms/chip/Chip.d.ts +2 -2
  214. package/dist/core/components/atoms/dropdown/Dropdown.d.ts +18 -17
  215. package/dist/core/components/atoms/dropdown/DropdownButton.d.ts +2 -2
  216. package/dist/core/components/atoms/dropdown/DropdownList.d.ts +4 -3
  217. package/dist/core/components/atoms/dropdown/option/index.d.ts +1 -1
  218. package/dist/core/components/atoms/heading/Heading.d.ts +4 -4
  219. package/dist/core/components/atoms/icon/Icon.d.ts +2 -2
  220. package/dist/core/components/atoms/input/Input.d.ts +3 -3
  221. package/dist/core/components/atoms/legend/Legend.d.ts +2 -2
  222. package/dist/core/components/atoms/link/Link.d.ts +4 -4
  223. package/dist/core/components/atoms/message/Message.d.ts +2 -2
  224. package/dist/core/components/atoms/metricInput/MetricInput.d.ts +3 -3
  225. package/dist/core/components/atoms/multiSlider/SliderUtils.d.ts +1 -1
  226. package/dist/core/components/atoms/multiSlider/index.d.ts +3 -3
  227. package/dist/core/components/atoms/paragraph/Paragraph.d.ts +2 -2
  228. package/dist/core/components/atoms/pills/Pills.d.ts +2 -2
  229. package/dist/core/components/atoms/placeholderImage/PlaceholderImage.d.ts +2 -2
  230. package/dist/core/components/atoms/placeholderParagraph/PlaceholderParagraph.d.ts +2 -2
  231. package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +1 -2
  232. package/dist/core/components/atoms/progressRing/ProgressRing.d.ts +2 -2
  233. package/dist/core/components/atoms/radio/Radio.d.ts +4 -4
  234. package/dist/core/components/atoms/rangeSlider/RangeSlider.d.ts +1 -1
  235. package/dist/core/components/atoms/spinner/Spinner.d.ts +4 -4
  236. package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -2
  237. package/dist/core/components/atoms/subheading/Subheading.d.ts +2 -2
  238. package/dist/core/components/atoms/switchInput/Switch.d.ts +6 -6
  239. package/dist/core/components/atoms/text/Text.d.ts +4 -4
  240. package/dist/core/components/atoms/toast/ActionButton.d.ts +2 -2
  241. package/dist/core/components/atoms/toast/Toast.d.ts +2 -2
  242. package/dist/core/components/molecules/dropzone/Dropzone.d.ts +3 -3
  243. package/dist/core/components/molecules/dropzone/DropzoneBase.d.ts +1 -1
  244. package/dist/core/components/molecules/dropzone/utils.d.ts +5 -3
  245. package/dist/core/components/molecules/emptyState/EmptyState.d.ts +4 -4
  246. package/dist/core/components/molecules/fileList/FileListItem.d.ts +1 -1
  247. package/dist/core/components/molecules/fileUploader/FileUploaderItem.d.ts +1 -1
  248. package/dist/core/components/molecules/fileUploader/FileUploaderStatus.d.ts +1 -1
  249. package/dist/core/components/molecules/fullscreenModal/FullscreenModal.d.ts +4 -7
  250. package/dist/core/components/molecules/inputMask/InputMask.d.ts +10 -2
  251. package/dist/core/components/molecules/modal/Modal.d.ts +3 -6
  252. package/dist/core/components/molecules/placeholder/Placeholder.d.ts +2 -2
  253. package/dist/core/components/molecules/popover/Popover.d.ts +0 -1
  254. package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +3 -6
  255. package/dist/core/components/molecules/tooltip/Tooltip.d.ts +3 -3
  256. package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +5 -6
  257. package/dist/core/components/organisms/dateRangePicker/DateRangePicker.d.ts +24 -0
  258. package/dist/core/components/organisms/grid/Cell.d.ts +1 -1
  259. package/dist/core/components/organisms/grid/Grid.d.ts +3 -3
  260. package/dist/core/components/organisms/grid/GridContext.d.ts +1 -1
  261. package/dist/core/components/organisms/inlineMessage/InlineMessage.d.ts +2 -2
  262. package/dist/core/components/organisms/table/Table.d.ts +2 -2
  263. package/dist/core/components/patterns/dateRangePicker/withCustomPopover.story.d.ts +5 -1
  264. package/dist/core/utils/docPage/generateImports.d.ts +1 -1
  265. package/dist/core/utils/overlayHelper.d.ts +1 -1
  266. package/dist/core/utils/types.d.ts +1 -1
  267. package/dist/index.esm.js +221 -245
  268. package/dist/index.js +225 -233
  269. package/dist/index.js.map +1 -1
  270. package/dist/index.umd.js +1 -1
  271. package/dist/index.umd.js.br +0 -0
  272. package/dist/index.umd.js.gz +0 -0
  273. package/dts.config.js +11 -2
  274. package/package.json +20 -18
  275. package/tsconfig.json +3 -16
  276. package/tsconfig.type.json +2 -1
  277. package/types/index.d.ts +2217 -0
  278. package/types/{innovaccer-design-system/tsconfig.json → tsconfig.json} +1 -1
  279. package/types/{innovaccer-design-system/tslint.json → tslint.json} +0 -0
  280. package/types/types-tests.tsx +936 -0
  281. package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +0 -89
  282. package/core/components/atoms/message/__stories__/default.story.tsx +0 -16
  283. package/core/components/atoms/toast/__stories__/DefaultToast.story.tsx +0 -16
  284. package/core/components/molecules/dropzone/__stories__/variants/DropzoneWithFileList.story.tsx +0 -176
  285. package/core/components/molecules/fileUploader/__stories__/variants/FileUploaderList.story.tsx +0 -80
  286. package/types/innovaccer-design-system/index.d.ts +0 -39
  287. package/types/innovaccer-design-system/innovaccer-design-system-tests.ts +0 -0
@@ -0,0 +1,172 @@
1
+ import * as React from 'react';
2
+ import { boolean } from '@storybook/addon-knobs';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { updateKnob } from '@/utils/storybookEventEmitter';
5
+ import { Text, Paragraph, Sidesheet, ModalDescription, Button, Badge, Heading, Divider } from '@/index';
6
+
7
+ export const customHeader = () => {
8
+ const open = boolean('open', true);
9
+ const seperator = boolean('seperator', false);
10
+ const stickFooter = boolean('stick bottom', false);
11
+ const backdropClose = boolean('backdropClose', false);
12
+
13
+ const onClose = () => {
14
+ updateKnob('open', false);
15
+ action('on close triggered')();
16
+ };
17
+
18
+ const options = {
19
+ onClose,
20
+ open,
21
+ seperator,
22
+ stickFooter,
23
+ backdropClose,
24
+ footer: (
25
+ <>
26
+ <Button appearance="primary" className="mr-4">
27
+ Primary
28
+ </Button>
29
+ <Button appearance="basic">Basic</Button>
30
+ </>
31
+ ),
32
+ };
33
+
34
+ const modalDescriptionOptions = {
35
+ title: 'Description Title',
36
+ description: 'Adding a subheading clearly indicates the hierarchy of the information.',
37
+ removePadding: true,
38
+ };
39
+
40
+ const modalDescriptionOptionsWithoutTitle = {
41
+ description: 'Card Sections include supporting text like an article summary or a restaurant description.',
42
+ removePadding: true,
43
+ };
44
+
45
+ return (
46
+ <div>
47
+ <Paragraph>
48
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
49
+ magna aliqua.
50
+ <br />
51
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
52
+ <br />
53
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br />
54
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
55
+ <br />
56
+ </Paragraph>
57
+ <Sidesheet
58
+ {...options}
59
+ dimension="regular"
60
+ header={
61
+ <div className="pl-7">
62
+ <Heading size="s">Untitled document</Heading>
63
+ <div className="d-flex">
64
+ <div className="mr-3">
65
+ <Badge appearance="primary">User Interface</Badge>
66
+ </div>
67
+ <div className="mr-3">
68
+ <Badge>Design</Badge>
69
+ </div>
70
+ <div className="mr-3">
71
+ <Badge>Development</Badge>
72
+ </div>
73
+ </div>
74
+ <Divider></Divider>
75
+ </div>
76
+ }
77
+ >
78
+ <Text>Modal Body</Text>
79
+ <ModalDescription {...modalDescriptionOptions} />
80
+ <ModalDescription {...modalDescriptionOptionsWithoutTitle} />
81
+ </Sidesheet>
82
+ </div>
83
+ );
84
+ };
85
+
86
+ const customCode = `() => {
87
+ const [open, setOpen] = React.useState(true);
88
+
89
+ const onClose = () => {
90
+ setOpen(!open);
91
+ };
92
+
93
+ const options = {
94
+ onClose,
95
+ open,
96
+ footer: (
97
+ <>
98
+ <Button appearance="primary" className="mr-4">
99
+ Primary
100
+ </Button>
101
+ <Button appearance="basic">Basic</Button>
102
+ </>
103
+ ),
104
+ };
105
+
106
+ const modalDescriptionOptions = {
107
+ title: 'Description Title',
108
+ description: 'Adding a subheading clearly indicates the hierarchy of the information.',
109
+ removePadding: true,
110
+ };
111
+
112
+ const modalDescriptionOptionsWithoutTitle = {
113
+ description: 'Card Sections include supporting text like an article summary or a restaurant description.',
114
+ removePadding: true,
115
+ };
116
+
117
+ return (
118
+ <div>
119
+ <Paragraph>
120
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
121
+ magna aliqua. <br />
122
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.{' '}
123
+ <br />
124
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br />
125
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{' '}
126
+ <br />
127
+ <Button appearance="primary" onClick={() => setOpen(true)}>
128
+ Open
129
+ </Button>
130
+ </Paragraph>
131
+ <Sidesheet
132
+ {...options}
133
+ dimension="regular"
134
+ header={
135
+ <div className="pl-7">
136
+ <Heading size="s">Untitled document</Heading>
137
+ <div className="d-flex">
138
+ <div className="mr-3">
139
+ <Badge appearance="primary">User Interface</Badge>
140
+ </div>
141
+ <div className="mr-3">
142
+ <Badge>Design</Badge>
143
+ </div>
144
+ <div className="mr-3">
145
+ <Badge>Development</Badge>
146
+ </div>
147
+ </div>
148
+ <Divider></Divider>
149
+ </div>
150
+ }
151
+ >
152
+ <Text>Modal Body</Text>
153
+ <ModalDescription {...modalDescriptionOptions} />
154
+ <ModalDescription {...modalDescriptionOptionsWithoutTitle} />
155
+ </Sidesheet>
156
+ </div>
157
+ );
158
+ }`;
159
+
160
+ export default {
161
+ title: 'Components/Sidesheet/Custom Header',
162
+ component: Sidesheet,
163
+ parameters: {
164
+ docs: {
165
+ docPage: {
166
+ customCode,
167
+ title: 'Modal',
168
+ noHtml: true,
169
+ },
170
+ },
171
+ },
172
+ };
@@ -3,7 +3,7 @@ import { Popover, Text } from '@/index';
3
3
  import { PopoverProps } from '@/index.type';
4
4
  import { BaseProps, filterProps } from '@/utils/types';
5
5
 
6
- const propsList = [
6
+ const tooltipPropsList = [
7
7
  'trigger',
8
8
  'on',
9
9
  'open',
@@ -15,8 +15,8 @@ const propsList = [
15
15
  'hideOnReferenceEscape',
16
16
  'closeOnScroll',
17
17
  ] as const;
18
- type PopperProps = typeof propsList[number];
19
- export interface TooltipProps extends Omit<PopoverProps, PopperProps>, BaseProps {
18
+ type TooltipPopperProps = typeof tooltipPropsList[number];
19
+ export interface TooltipProps extends Omit<PopoverProps, TooltipPopperProps>, BaseProps {
20
20
  /**
21
21
  * Text to be rendered in `Tooltip`
22
22
  */
@@ -49,7 +49,7 @@ export const Tooltip = (props: TooltipProps) => {
49
49
  // ...Popover.defaultProps,
50
50
  // hoverable: false
51
51
  // }, propsList);
52
- Tooltip.defaultProps = Object.assign({}, filterProps(Popover.defaultProps, propsList), {
52
+ Tooltip.defaultProps = Object.assign({}, filterProps(Popover.defaultProps, tooltipPropsList), {
53
53
  hoverable: false,
54
54
  });
55
55
 
@@ -9,10 +9,10 @@ export const firstDayOfWeek = () => {
9
9
 
10
10
  const style = {
11
11
  flexWrap: 'wrap',
12
- };
12
+ } as const;
13
+ // to freeze the object for typescript
13
14
 
14
15
  return (
15
- // @ts-ignore
16
16
  <div className="d-flex" style={style}>
17
17
  {values.map((v, index) => (
18
18
  <div className="mr-9 mt-5" key={index}>
@@ -151,9 +151,9 @@ export const translateToDate = (format: string, val: string, validators: Validat
151
151
  if (isValid(validators, val, format)) {
152
152
  const separator = format.includes('/') ? '/' : '-';
153
153
 
154
- let year: number = -1,
155
- month: number = -1,
156
- date: number = -1;
154
+ let year = -1,
155
+ month = -1,
156
+ date = -1;
157
157
  const v = val.split(separator);
158
158
  format.split(separator).forEach((f, i) => {
159
159
  switch (f) {
@@ -2,10 +2,10 @@ import * as React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { Checkbox, Radio, Label } from '@/index';
4
4
  import { BaseProps } from '@/utils/types';
5
+ import { ChangeEvent } from '@/common.type';
5
6
 
6
- export type Alignment = 'horizontal' | 'vertical';
7
- export type Size = 'regular' | 'tiny';
8
- type ChangeEvent = React.ChangeEvent<HTMLInputElement>;
7
+ export type ChoiceListAlignment = 'horizontal' | 'vertical';
8
+ export type ChoiceListSize = 'regular' | 'tiny';
9
9
  type noop = (ev: ChangeEvent) => void;
10
10
 
11
11
  export interface Choice {
@@ -43,12 +43,12 @@ export interface ChoiceListProps extends BaseProps {
43
43
  * Alignment in which the coices will be rendered
44
44
  * @default "vertical"
45
45
  */
46
- alignment?: Alignment;
46
+ alignment?: ChoiceListAlignment;
47
47
  /**
48
48
  * Size of the `ChoiceList`
49
49
  * @default "regular"
50
50
  */
51
- size?: Size;
51
+ size?: ChoiceListSize;
52
52
  /**
53
53
  * renders `checkbox` if `true` and renders `radio` if `false` of the `ChoiceList`
54
54
  * @default false
@@ -73,8 +73,8 @@ const renderCheckbox = (
73
73
  list: Choice[],
74
74
  handleOnChange: noop,
75
75
  ChoiceListDisabled: boolean,
76
- size: Size,
77
- alignment: Alignment,
76
+ size: ChoiceListSize,
77
+ alignment: ChoiceListAlignment,
78
78
  selected: string[]
79
79
  ) => {
80
80
  return list.map((item: Choice, checkboxIndex: number) => {
@@ -100,8 +100,8 @@ const renderRadio = (
100
100
  list: Choice[],
101
101
  handleOnChange: noop,
102
102
  ChoiceListDisabled: boolean,
103
- size: Size,
104
- alignment: Alignment,
103
+ size: ChoiceListSize,
104
+ alignment: ChoiceListAlignment,
105
105
  selected: string[]
106
106
  ) => {
107
107
  return list.map((item: Choice, radioIndex: number) => {
@@ -123,7 +123,7 @@ const renderRadio = (
123
123
  });
124
124
  };
125
125
 
126
- const getCheckboxClassName = (alignment: Alignment, index: number) => {
126
+ const getCheckboxClassName = (alignment: ChoiceListAlignment, index: number) => {
127
127
  const ChoiceListCheckboxClass = classNames({
128
128
  [`ChoiceList-checkbox--${alignment}`]: true,
129
129
  ['ml-0']: index === 0 && alignment === 'horizontal',
@@ -132,7 +132,7 @@ const getCheckboxClassName = (alignment: Alignment, index: number) => {
132
132
  return ChoiceListCheckboxClass;
133
133
  };
134
134
 
135
- const getRadioClassName = (alignment: Alignment, index: number) => {
135
+ const getRadioClassName = (alignment: ChoiceListAlignment, index: number) => {
136
136
  const ChoiceListRadioClass = classNames({
137
137
  [`ChoiceList-radio--${alignment}`]: true,
138
138
  ['ml-0']: index === 0 && alignment === 'horizontal',
@@ -198,7 +198,7 @@ export class DatePicker extends React.Component<DatePickerProps, DatePickerState
198
198
  const { date } = this.state;
199
199
  const { months } = config;
200
200
  const todayDate = new Date(Date.now());
201
- const todayMonthAndDate: string = `${months[todayDate.getMonth()]} ${todayDate.getDate()}`;
201
+ const todayMonthAndDate = `${months[todayDate.getMonth()]} ${todayDate.getDate()}`;
202
202
  const currDate = convertToDate(date, inputFormat, validators);
203
203
  const dateDisabledBefore = convertToDate(disabledBefore, inputFormat, validators);
204
204
  const dateDisabledAfter = convertToDate(disabledAfter, inputFormat, validators);
@@ -61,11 +61,7 @@ export const Trigger = (props: TriggerProps) => {
61
61
  error={showError}
62
62
  mask={mask}
63
63
  value={
64
- date
65
- ? translateToString(inputFormat, date)
66
- : init // @ts-ignore
67
- ? InputMask.utils.getDefaultValue(mask, placeholderChar)
68
- : ''
64
+ date ? translateToString(inputFormat, date) : init ? InputMask.utils.getDefaultValue(mask, placeholderChar) : ''
69
65
  }
70
66
  onChange={onChangeHandler}
71
67
  onBlur={onBlurHandler}
@@ -119,6 +119,15 @@ export interface DateRangePickerState {
119
119
  }
120
120
 
121
121
  export class DateRangePicker extends React.Component<DateRangePickerProps, DateRangePickerState> {
122
+ static utils = {
123
+ getCurrentWeek,
124
+ getPreviousWeek,
125
+ getPreviousMonth,
126
+ getPrevious90Days,
127
+ getCustomDates,
128
+ getCurrentYear,
129
+ getCurrentMonth,
130
+ };
122
131
  static defaultProps = {
123
132
  ...Calendar.defaultProps,
124
133
  children: <></>,
@@ -431,15 +440,5 @@ export class DateRangePicker extends React.Component<DateRangePickerProps, DateR
431
440
  return this.renderCalendar();
432
441
  }
433
442
  }
434
- // @ts-ignore
435
- DateRangePicker.utils = {
436
- getCurrentWeek,
437
- getPreviousWeek,
438
- getPreviousMonth,
439
- getPrevious90Days,
440
- getCustomDates,
441
- getCurrentYear,
442
- getCurrentMonth,
443
- };
444
443
 
445
444
  export default DateRangePicker;
@@ -21,7 +21,6 @@ export const SingleInputTrigger = (props: TriggerProps) => {
21
21
  const errorMessage = inputOptions.caption === undefined ? 'Invalid value' : inputOptions.caption;
22
22
  const { label } = inputOptions;
23
23
  const { placeholderChar = '_' } = inputOptions;
24
- // @ts-ignore
25
24
  const defaultValue = InputMask.utils.getDefaultValue(mask, placeholderChar).split(' - ');
26
25
  const sValue = startValue || defaultValue[0];
27
26
  const eValue = endValue || defaultValue[1];
@@ -130,7 +130,7 @@ export const Trigger = (props: TriggerProps) => {
130
130
  value={
131
131
  startDate
132
132
  ? translateToString(inputFormat, startDate)
133
- : init // @ts-ignore
133
+ : init
134
134
  ? InputMask.utils.getDefaultValue(mask, startPlaceholderChar)
135
135
  : ''
136
136
  }
@@ -162,7 +162,7 @@ export const Trigger = (props: TriggerProps) => {
162
162
  value={
163
163
  endDate
164
164
  ? translateToString(inputFormat, endDate)
165
- : init // @ts-ignore
165
+ : init
166
166
  ? InputMask.utils.getDefaultValue(mask, endPlaceholderChar)
167
167
  : ''
168
168
  }
@@ -6,10 +6,10 @@ import Card from '@/components/atoms/card';
6
6
  export const monthsInView = () => {
7
7
  const style = {
8
8
  flexDirection: 'column',
9
- };
9
+ } as const;
10
+ // to freeze the object for typescript
10
11
 
11
12
  return (
12
- // @ts-ignore
13
13
  <div className="d-flex" style={style}>
14
14
  {Array.from([1, 2, 3], (x) => (
15
15
  <div className="mt-5" style={{ alignSelf: 'flex-start' }}>
@@ -38981,22 +38981,22 @@ exports[`DateRangePicker component
38981
38981
  </span>
38982
38982
  </div>
38983
38983
  <div
38984
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
38984
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
38985
38985
  data-test="DesignSystem-Calendar--monthValue"
38986
38986
  >
38987
38987
  <span
38988
- class="Text Text--link Text--regular"
38988
+ class="Text Text--default Text--regular"
38989
38989
  data-test="DesignSystem-Text"
38990
38990
  >
38991
38991
  Nov
38992
38992
  </span>
38993
38993
  </div>
38994
38994
  <div
38995
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
38995
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
38996
38996
  data-test="DesignSystem-Calendar--monthValue"
38997
38997
  >
38998
38998
  <span
38999
- class="Text Text--default Text--regular"
38999
+ class="Text Text--link Text--regular"
39000
39000
  data-test="DesignSystem-Text"
39001
39001
  >
39002
39002
  Dec
@@ -40540,22 +40540,22 @@ exports[`DateRangePicker component
40540
40540
  </span>
40541
40541
  </div>
40542
40542
  <div
40543
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
40543
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
40544
40544
  data-test="DesignSystem-Calendar--monthValue"
40545
40545
  >
40546
40546
  <span
40547
- class="Text Text--link Text--small"
40547
+ class="Text Text--default Text--small"
40548
40548
  data-test="DesignSystem-Text"
40549
40549
  >
40550
40550
  Nov
40551
40551
  </span>
40552
40552
  </div>
40553
40553
  <div
40554
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
40554
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
40555
40555
  data-test="DesignSystem-Calendar--monthValue"
40556
40556
  >
40557
40557
  <span
40558
- class="Text Text--default Text--small"
40558
+ class="Text Text--link Text--small"
40559
40559
  data-test="DesignSystem-Text"
40560
40560
  >
40561
40561
  Dec
@@ -42099,22 +42099,22 @@ exports[`DateRangePicker component
42099
42099
  </span>
42100
42100
  </div>
42101
42101
  <div
42102
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
42102
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
42103
42103
  data-test="DesignSystem-Calendar--monthValue"
42104
42104
  >
42105
42105
  <span
42106
- class="Text Text--link Text--regular"
42106
+ class="Text Text--default Text--regular"
42107
42107
  data-test="DesignSystem-Text"
42108
42108
  >
42109
42109
  Nov
42110
42110
  </span>
42111
42111
  </div>
42112
42112
  <div
42113
- class="Calendar-value Calendar-monthValue Calendar-monthValue--large"
42113
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--large Calendar-value--currDateMonthYear"
42114
42114
  data-test="DesignSystem-Calendar--monthValue"
42115
42115
  >
42116
42116
  <span
42117
- class="Text Text--default Text--regular"
42117
+ class="Text Text--link Text--regular"
42118
42118
  data-test="DesignSystem-Text"
42119
42119
  >
42120
42120
  Dec
@@ -46679,22 +46679,22 @@ exports[`DateRangePicker component
46679
46679
  </span>
46680
46680
  </div>
46681
46681
  <div
46682
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
46682
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
46683
46683
  data-test="DesignSystem-Calendar--monthValue"
46684
46684
  >
46685
46685
  <span
46686
- class="Text Text--link Text--small"
46686
+ class="Text Text--default Text--small"
46687
46687
  data-test="DesignSystem-Text"
46688
46688
  >
46689
46689
  Nov
46690
46690
  </span>
46691
46691
  </div>
46692
46692
  <div
46693
- class="Calendar-value Calendar-monthValue Calendar-monthValue--small"
46693
+ class="Calendar-value Calendar-monthValue Calendar-monthValue--small Calendar-value--currDateMonthYear"
46694
46694
  data-test="DesignSystem-Calendar--monthValue"
46695
46695
  >
46696
46696
  <span
46697
- class="Text Text--default Text--small"
46697
+ class="Text Text--link Text--small"
46698
46698
  data-test="DesignSystem-Text"
46699
46699
  >
46700
46700
  Dec
@@ -28,10 +28,12 @@ type BodyCellProps = SharedCellProps & {
28
28
  expandedState: [boolean, React.Dispatch<React.SetStateAction<boolean>>];
29
29
  };
30
30
 
31
- export type CellProps = (HeaderCellProps | BodyCellProps) & {
32
- isHead?: boolean;
33
- firstCell: boolean;
34
- };
31
+ export type CellProps = Partial<HeaderCellProps> &
32
+ Partial<BodyCellProps> &
33
+ SharedCellProps & {
34
+ isHead?: boolean;
35
+ firstCell: boolean;
36
+ };
35
37
 
36
38
  const HeaderCell = (props: HeaderCellProps) => {
37
39
  const context = React.useContext(GridContext);
@@ -265,24 +267,16 @@ export const Cell = (props: CellProps) => {
265
267
  isHead,
266
268
  firstCell,
267
269
  schema,
268
- // @ts-ignore
269
270
  data,
270
- // @ts-ignore
271
271
  rowIndex,
272
272
  colIndex,
273
- // @ts-ignore
274
273
  expandedState,
275
- // @ts-ignore
276
274
  onSelectAll,
277
- // @ts-ignore
278
275
  onMenuChange,
279
- // @ts-ignore
280
276
  onFilterChange,
281
- // @ts-ignore
282
277
  updateColumnSchema,
283
- // @ts-ignore
284
278
  reorderColumn,
285
- } = props;
279
+ } = props as CellProps;
286
280
 
287
281
  const { draggable, separator, nestedRows, ref, withCheckbox } = context;
288
282
 
@@ -323,7 +317,7 @@ export const Cell = (props: CellProps) => {
323
317
  type: pinned || '',
324
318
  };
325
319
 
326
- if (from.type === to.type) reorderColumn(from.name, to.name);
320
+ if (from.type === to.type && reorderColumn) reorderColumn(from.name, to.name);
327
321
  }
328
322
  }}
329
323
  style={{
@@ -337,13 +331,19 @@ export const Cell = (props: CellProps) => {
337
331
  colIndex={colIndex}
338
332
  schema={schema}
339
333
  onSelectAll={onSelectAll}
340
- onMenuChange={onMenuChange}
341
- onFilterChange={onFilterChange}
342
- updateColumnSchema={updateColumnSchema}
343
- reorderColumn={reorderColumn}
334
+ onMenuChange={onMenuChange!}
335
+ onFilterChange={onFilterChange!}
336
+ updateColumnSchema={updateColumnSchema!}
337
+ reorderColumn={reorderColumn!}
344
338
  />
345
339
  ) : (
346
- <BodyCell rowIndex={rowIndex} colIndex={colIndex} data={data} schema={schema} expandedState={expandedState} />
340
+ <BodyCell
341
+ rowIndex={rowIndex!}
342
+ colIndex={colIndex}
343
+ data={data!}
344
+ schema={schema}
345
+ expandedState={expandedState!}
346
+ />
347
347
  )}
348
348
  </div>
349
349
  );
@@ -288,6 +288,9 @@ export interface GridState {
288
288
 
289
289
  export class Grid extends React.Component<GridProps, GridState> {
290
290
  static defaultProps: GridProps;
291
+ gridRef: GridRef = null;
292
+ isHeadSyncing = false;
293
+ isBodySyncing = false;
291
294
 
292
295
  constructor(props: GridProps) {
293
296
  super(props);
@@ -327,10 +330,6 @@ export class Grid extends React.Component<GridProps, GridState> {
327
330
  }
328
331
  }
329
332
 
330
- gridRef: GridRef = null;
331
- isHeadSyncing: boolean = false;
332
- isBodySyncing: boolean = false;
333
-
334
333
  addScrollListeners() {
335
334
  const gridHeadEl = this.gridRef!.querySelector('.Grid-head');
336
335
  const gridBodyEl = this.gridRef!.querySelector('.Grid-body');
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- // @ts-ignore
3
2
  import VirtualScroll from 'react-dynamic-virtual-scroll';
4
3
  import { GridRow } from './GridRow';
5
4
  import { GridState, onSelectFn, Schema, updatePrevPageInfoFunction } from './Grid';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { GridProps } from '@/index.type';
3
3
  import { GridRef } from './Grid';
4
4
  import defaultProps from './defaultProps';
@@ -1,7 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Schema } from '../../Grid';
3
- // @ts-ignore
4
- import iconImg from './image.png';
5
3
  import { GridCellProps } from '../../GridCell';
6
4
  import { PlaceholderParagraph, EditableInput } from '@/index';
7
5
 
@@ -89,7 +87,7 @@ const schema: Schema = [
89
87
  resizable: true,
90
88
  align: 'center',
91
89
  cellType: 'ICON',
92
- translate: (_) => ({
90
+ translate: () => ({
93
91
  icon: 'events',
94
92
  }),
95
93
  // separator: true,
@@ -6,7 +6,7 @@ import { filterData, sortData } from '../../utility';
6
6
  export const fetchData: fetchDataFunction = (options) => {
7
7
  const { page, pageSize, sortingList, filterList, searchTerm } = options;
8
8
 
9
- const onSearch = (d: RowData, searchTerm: string = '') => {
9
+ const onSearch = (d: RowData, searchTerm = '') => {
10
10
  return (
11
11
  d.firstName.toLowerCase().match(searchTerm.toLowerCase()) ||
12
12
  d.lastName.toLowerCase().match(searchTerm.toLowerCase())
@@ -1,5 +1,3 @@
1
- // @ts-ignore
2
- import image from './image.png';
3
1
  import { GridProps } from '../../Grid';
4
2
  import schema from './schema';
5
3
 
@@ -1,7 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { Schema } from '../../Grid';
3
- // @ts-ignore
4
- import iconImg from './image.png';
5
3
  import { Icon, GridCell } from '@/index';
6
4
 
7
5
  const schema: Schema = [
@@ -88,7 +86,7 @@ const schema: Schema = [
88
86
  resizable: true,
89
87
  align: 'center',
90
88
  cellType: 'ICON',
91
- translate: (_) => ({
89
+ translate: () => ({
92
90
  icon: 'events',
93
91
  }),
94
92
  // separator: true,