@innovaccer/design-system 2.13.4-2 → 2.13.4-3

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.
@@ -1,12 +1,37 @@
1
1
  import { getSearchedOptions } from '../utility';
2
2
 
3
- export const dropdownOptions = [];
4
- export const preSelectedOptions = [];
5
- export const storyOptions = [];
6
- export const disabledStoryOptions = [];
7
- export const iconOptions = [];
8
- export const subInfoOptions = [];
9
- export const iconWithSubinfoOptions = [];
3
+ type OptionType = 'DEFAULT' | 'WITH_ICON' | 'WITH_META' | 'ICON_WITH_META';
4
+
5
+ interface OptionSchema extends Record<string, any> {
6
+ label: string;
7
+ value: React.ReactText;
8
+ icon: string;
9
+ subInfo: string;
10
+ optionType?: OptionType;
11
+ selected?: boolean;
12
+ disabled?: boolean;
13
+ group?: string;
14
+ }
15
+
16
+ interface SelectedOptionSchema extends Record<string, any> {
17
+ label: string;
18
+ value: React.ReactText;
19
+ selected?: boolean;
20
+ }
21
+
22
+ interface fetchOptionSchema {
23
+ searchTerm?: string | undefined;
24
+ count: number;
25
+ options: OptionSchema[];
26
+ }
27
+
28
+ export const dropdownOptions: OptionSchema[] = [];
29
+ export const preSelectedOptions: SelectedOptionSchema[] = [];
30
+ export const storyOptions: OptionSchema[] = [];
31
+ export const disabledStoryOptions: OptionSchema[] = [];
32
+ export const iconOptions: OptionSchema[] = [];
33
+ export const subInfoOptions: OptionSchema[] = [];
34
+ export const iconWithSubinfoOptions: OptionSchema[] = [];
10
35
 
11
36
  for (let i = 1; i <= 10; i++) {
12
37
  storyOptions.push({
@@ -84,7 +109,7 @@ for (let i = 41; i <= 100; i++) {
84
109
  });
85
110
  }
86
111
 
87
- export const selectedStoryOptions = [];
112
+ export const selectedStoryOptions: SelectedOptionSchema[] = [];
88
113
 
89
114
  for (let i = 1; i <= 10; i++) {
90
115
  selectedStoryOptions.push({
@@ -94,7 +119,7 @@ for (let i = 1; i <= 10; i++) {
94
119
  });
95
120
  }
96
121
 
97
- export const multiSelectedStoryOptions = [];
122
+ export const multiSelectedStoryOptions: SelectedOptionSchema[] = [];
98
123
 
99
124
  for (let i = 1; i <= 10; i++) {
100
125
  multiSelectedStoryOptions.push({
@@ -155,9 +180,9 @@ export const iconItems = [
155
180
  },
156
181
  ];
157
182
 
158
- export const fetchOptions = (searchTerm) => {
183
+ export const fetchOptions = (searchTerm: string) => {
159
184
  const searchedOptions = searchTerm ? getSearchedOptions(dropdownOptions, searchTerm) : dropdownOptions;
160
- return new Promise((resolve) => {
185
+ return new Promise<fetchOptionSchema>((resolve) => {
161
186
  window.setTimeout(() => {
162
187
  resolve({
163
188
  searchTerm,
@@ -7,7 +7,7 @@ import { Uncontrolled, Controlled } from '../_common_/types';
7
7
  import { storyOptions } from '../Options';
8
8
 
9
9
  // CSF format story
10
- export const cutsomOption = () => {
10
+ export const customOption = () => {
11
11
  const optionStyle = {
12
12
  paddingRight: 12,
13
13
  paddingLeft: 12,
@@ -110,7 +110,7 @@ const customCode = `() => {
110
110
  }`;
111
111
 
112
112
  export default {
113
- title: 'Components/Dropdown/Variants/Cutsom Option',
113
+ title: 'Components/Dropdown/Variants/Custom Option',
114
114
  component: Dropdown,
115
115
  parameters: {
116
116
  docs: {
@@ -121,7 +121,7 @@ describe('renders option with meta list', () => {
121
121
 
122
122
  describe('renders active option', () => {
123
123
  const dropdownOptions = [
124
- { label: 'Below 18', subInfo: 'People bewlow 18 years old', value: 'below_18' },
124
+ { label: 'Below 18', subInfo: 'People below 18 years old', value: 'below_18' },
125
125
  { label: '19 - 35', subInfo: 'People 19-35 years old', value: '19-35' },
126
126
  { label: '36 - 55', subInfo: 'People 36-55 years old', value: '36-55' },
127
127
  { label: '56 and above', subInfo: 'People above 56 years old', value: '56_above' },
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { List } from '@/index';
3
+ import { NestedRowProps } from '../../GridNestedRow';
3
4
 
4
- export const nestedRowRenderer = (props) => {
5
+ export const nestedRowRenderer = (props: NestedRowProps) => {
5
6
  const { schema, data, loading } = props;
6
7
 
7
8
  return <List loading={loading} schema={schema} data={[data]} nestedRows={true} />;
@@ -88,7 +88,7 @@ export const nestedTableWithNestedCards = () => {
88
88
  ];
89
89
 
90
90
  const nestedRowRenderer = (props) => (
91
- <CardSubdued className="ml-7 mb-4 mt-3 mr-4">
91
+ <CardSubdued className="mb-4 mt-3 mr-4" style={{ marginLeft: '40px' }}>
92
92
  <div className="d-flex flex-row">
93
93
  <div style={{ width: '17%' }}>
94
94
  <Text weight="medium">Type</Text>
@@ -238,7 +238,7 @@ const customCode = `() => {
238
238
  return false;
239
239
  }
240
240
  return (
241
- <CardSubdued className="ml-7 mb-4 mt-3 mr-4">
241
+ <CardSubdued className="mb-4 mt-3 mr-4" style={{ marginLeft: '40px' }}>
242
242
  <div className="d-flex flex-row">
243
243
  <div style={{ width: '17%' }}>
244
244
  <Text weight="medium">Type</Text>
@@ -143,11 +143,14 @@ const customCode = `
143
143
  return false;
144
144
  }
145
145
  return (
146
- <List
147
- loading={loading}
148
- schema={schema}
149
- data={[data]}
150
- />
146
+ <div>
147
+ <Divider className='ml-5' />
148
+ <List
149
+ loading={loading}
150
+ schema={schema}
151
+ data={[data]}
152
+ />
153
+ </div>
151
154
  );
152
155
  }
153
156
 
@@ -2922,8 +2922,16 @@ body {
2922
2922
  cursor: pointer;
2923
2923
  }
2924
2924
 
2925
+ .Grid-nestedRow .Grid-rowWrapper {
2926
+ border-bottom: 0;
2927
+ }
2928
+
2929
+ .Grid-nestedRow .Grid-cell:first-child {
2930
+ padding-left: calc(var(--spacing-3) + var(--spacing));
2931
+ }
2932
+
2925
2933
  .Grid-nestedRowPlaceholder {
2926
- width: 20px;
2934
+ width: var(--spacing-xl);
2927
2935
  margin-right: var(--spacing-l);
2928
2936
  }
2929
2937
 
@@ -3134,6 +3142,15 @@ body {
3134
3142
  overflow: hidden;
3135
3143
  }
3136
3144
 
3145
+ .GridCell--statusHint .StatusHint {
3146
+ overflow: hidden;
3147
+ }
3148
+
3149
+ .GridCell--statusHint .StatusHint .Text {
3150
+ overflow: hidden;
3151
+ text-overflow: ellipsis;
3152
+ }
3153
+
3137
3154
  .GridCell--avatar .Avatar {
3138
3155
  margin: 0;
3139
3156
  }