@innovaccer/design-system 2.5.0-2 → 2.5.1
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.
- package/.all-contributorsrc +170 -0
- package/.github/workflows/jira.yml +1 -2
- package/.github/workflows/main.yml +1 -6
- package/.github/workflows/test.yml +22 -0
- package/CHANGELOG.md +21 -54
- package/CONTRIBUTING.md +23 -0
- package/README.md +124 -75
- package/core/components/atoms/button/Button.tsx +56 -55
- package/core/components/atoms/button/__tests__/Button.test.tsx +3 -12
- package/core/components/atoms/checkbox/Checkbox.tsx +3 -6
- package/core/components/atoms/collapsible/__stories__/index.story.tsx +2 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +1 -1
- package/core/components/atoms/dropdown/__stories__/Options.tsx +15 -0
- package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +202 -1
- package/core/components/atoms/dropdown/__tests__/Option.test.tsx +3 -0
- package/core/components/atoms/message/__stories__/CustomDescription.tsx +25 -0
- package/core/components/atoms/metaList/Meta.tsx +3 -1
- package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +30 -36
- package/core/components/atoms/metricInput/MetricInput.tsx +2 -2
- package/core/components/atoms/outsideClick/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/radio/Radio.tsx +7 -10
- package/core/components/atoms/radio/__tests__/Radio.test.tsx +13 -7
- package/core/components/css-utilities/Align/Align.story.tsx +1 -1
- package/core/components/css-utilities/Background/Background.story.tsx +1 -1
- package/core/components/css-utilities/Border/Border.story.tsx +128 -0
- package/core/components/css-utilities/Display/Display.story.tsx +1 -1
- package/core/components/css-utilities/Flex/Flex.story.tsx +1 -1
- package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +1 -1
- package/core/components/css-utilities/Overflow/Overflow.story.tsx +1 -1
- package/core/components/css-utilities/Position/Position.story.tsx +1 -1
- package/core/components/css-utilities/Sizing/Sizing.story.tsx +1 -1
- package/core/components/css-utilities/Spacing/Spacing.story.tsx +1 -1
- package/core/components/molecules/chatMessage/__tests__/ChatMessage.test.tsx +20 -46
- package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +47 -111
- package/core/components/molecules/dropzone/__tests__/Utilities.test.tsx +13 -13
- package/core/components/molecules/editableChipInput/EditableChipInput.tsx +3 -1
- package/core/components/molecules/editableInput/EditableInput.tsx +5 -3
- package/core/components/molecules/editableInput/__stories__/variants/Uncontrolled.story.tsx +1 -1
- package/core/components/molecules/editableInput/__tests__/EditableInput.test.tsx +1 -3
- package/core/components/molecules/emptyState/_tests_/EmptyState.test.tsx +3 -7
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +13 -2
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +156 -21
- package/core/components/molecules/fileUploader/__tests__/FileUploader.test.tsx +21 -80
- package/core/components/molecules/fileUploader/__tests__/FileUploaderList.test.tsx +9 -40
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +7 -13
- package/core/components/molecules/fullscreenModal/__stories__/Layering.story.tsx +2 -2
- package/core/components/molecules/modal/Modal.tsx +18 -17
- package/core/components/molecules/modal/ModalBody.tsx +1 -1
- package/core/components/molecules/modal/__stories__/Layering.story.tsx +1 -1
- package/core/components/molecules/modal/__stories__/NoFooter.story.tsx +0 -1
- package/core/components/molecules/modal/__stories__/Scrolling.story.tsx +20 -38
- package/core/components/molecules/modal/__tests__/Modal.test.tsx +1 -1
- package/core/components/molecules/sidesheet/Sidesheet.tsx +16 -17
- package/core/components/organisms/choiceList/ChoiceList.tsx +212 -0
- package/core/components/organisms/choiceList/__stories__/Alignment.story.tsx +32 -0
- package/core/components/organisms/choiceList/__stories__/AllowMultiple.story.tsx +23 -0
- package/core/components/organisms/choiceList/__stories__/Controlled.story.tsx +34 -0
- package/core/components/organisms/choiceList/__stories__/index.story.tsx +18 -0
- package/core/components/organisms/choiceList/__tests__/ChoiceList.test.tsx +155 -0
- package/core/components/organisms/choiceList/__tests__/__snapshots__/ChoiceList.test.tsx.snap +3393 -0
- package/core/components/organisms/choiceList/index.tsx +2 -0
- package/core/components/organisms/datePicker/__tests__/DatePicker.test.tsx +136 -46
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +2594 -102
- package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +5 -0
- package/core/components/organisms/dateRangePicker/__tests__/DateRangePicker.test.tsx +49 -410
- package/core/components/organisms/dateRangePicker/__tests__/Utilities.test.tsx +39 -0
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +45390 -2679
- package/core/components/organisms/dateRangePicker/utilities.tsx +2 -5
- package/core/components/organisms/grid/Cell.tsx +5 -4
- package/core/components/organisms/grid/Grid.tsx +1 -1
- package/core/components/organisms/grid/GridCell.tsx +18 -7
- package/core/components/organisms/grid/GridHead.tsx +1 -1
- package/core/components/organisms/grid/GridRow.tsx +5 -12
- package/core/components/organisms/grid/__tests__/Grid.test.tsx +179 -1
- package/core/components/organisms/grid/__tests__/GridCell.test.tsx +218 -0
- package/core/components/organisms/grid/__tests__/__snapshots__/Grid.test.tsx.snap +1024 -0
- package/core/components/organisms/grid/__tests__/rowUtility.test.tsx +62 -0
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +10 -14
- package/core/components/organisms/inlineMessage/__stories__/InlineMessageWithinTable.story.tsx +9 -12
- package/core/components/organisms/inlineMessage/__stories__/variants/Default.story.tsx +2 -4
- package/core/components/organisms/inlineMessage/__stories__/variants/Error.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Info.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Success.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__stories__/variants/Warning.story.tsx +2 -5
- package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +4 -20
- package/core/components/organisms/navigation/VerticalNavigation.tsx +14 -3
- package/core/components/organisms/navigation/__tests__/Navigation.test.tsx +179 -0
- package/core/components/organisms/navigation/__tests__/__snapshots__/Navigation.test.tsx.snap +530 -0
- package/core/components/organisms/table/DraggableDropdown.tsx +1 -0
- package/core/components/organisms/table/Header.tsx +11 -2
- package/core/components/organisms/table/Table.tsx +2 -2
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +4 -1
- package/core/components/organisms/table/__stories__/variants/nestedRows.story.tsx +5 -2
- package/core/components/organisms/table/__tests__/Table.test.tsx +292 -0
- package/core/components/organisms/table/__tests__/__snapshots__/Table.test.tsx.snap +349041 -0
- package/core/components/organisms/timePicker/__tests__/TimePicker.test.tsx +15 -66
- package/core/components/patterns/dateRangePicker/withCustomPopover.story.tsx +47 -36
- package/core/index.tsx +1 -1
- package/core/index.type.tsx +1 -0
- package/core/utils/OverlayManager.tsx +1 -3
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +4 -0
- package/core/utils/types.tsx +3 -4
- package/css/dist/index.css +78 -8
- package/css/dist/index.css.map +1 -1
- package/css/src/components/button.css +8 -4
- package/css/src/components/choiceList.css +25 -0
- package/css/src/components/modal.css +1 -2
- package/css/src/utils/border.css +39 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +50 -49
- package/dist/core/components/css-utilities/Border/Border.story.d.ts +13 -0
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +33 -0
- package/dist/core/components/organisms/choiceList/index.d.ts +2 -0
- package/dist/core/components/organisms/dateRangePicker/utilities.d.ts +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/index.esm.js +207 -58
- package/dist/index.js +209 -57
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/jest.config.js +2 -1
- package/package.json +6 -4
|
@@ -13,18 +13,14 @@ const FunctionValue = jest.fn();
|
|
|
13
13
|
describe('TimePicker component prop:inputFormat snapshot', () => {
|
|
14
14
|
const mapper: Record<string, any> = {
|
|
15
15
|
inputFormat: valueHelper(timeFormat, { required: true, iterate: true }),
|
|
16
|
-
onTimeChange: valueHelper(FunctionValue, { required: true })
|
|
16
|
+
onTimeChange: valueHelper(FunctionValue, { required: true }),
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const testFunc = (props: Record<string, any>): void => {
|
|
20
20
|
const attr = filterUndefined(props) as Props;
|
|
21
21
|
|
|
22
22
|
it(testMessageHelper(attr), () => {
|
|
23
|
-
const { baseElement } = render(
|
|
24
|
-
<TimePicker
|
|
25
|
-
{...attr}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
23
|
+
const { baseElement } = render(<TimePicker {...attr} />);
|
|
28
24
|
expect(baseElement).toMatchSnapshot();
|
|
29
25
|
});
|
|
30
26
|
};
|
|
@@ -35,18 +31,14 @@ describe('TimePicker component prop:inputFormat snapshot', () => {
|
|
|
35
31
|
describe('TimePicker component prop:outputFormat snapshot', () => {
|
|
36
32
|
const mapper: Record<string, any> = {
|
|
37
33
|
outputFormat: valueHelper(timeFormat, { required: true, iterate: true }),
|
|
38
|
-
onTimeChange: valueHelper(FunctionValue, { required: true })
|
|
34
|
+
onTimeChange: valueHelper(FunctionValue, { required: true }),
|
|
39
35
|
};
|
|
40
36
|
|
|
41
37
|
const testFunc = (props: Record<string, any>): void => {
|
|
42
38
|
const attr = filterUndefined(props) as Props;
|
|
43
39
|
|
|
44
40
|
it(testMessageHelper(attr), () => {
|
|
45
|
-
const { baseElement } = render(
|
|
46
|
-
<TimePicker
|
|
47
|
-
{...attr}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
41
|
+
const { baseElement } = render(<TimePicker {...attr} />);
|
|
50
42
|
expect(baseElement).toMatchSnapshot();
|
|
51
43
|
});
|
|
52
44
|
};
|
|
@@ -63,11 +55,7 @@ describe('TimePicker component prop:validators snapshot', () => {
|
|
|
63
55
|
const attr = filterUndefined(props) as Props;
|
|
64
56
|
|
|
65
57
|
it(testMessageHelper(attr), () => {
|
|
66
|
-
const { baseElement } = render(
|
|
67
|
-
<TimePicker
|
|
68
|
-
{...attr}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
58
|
+
const { baseElement } = render(<TimePicker {...attr} />);
|
|
71
59
|
expect(baseElement).toMatchSnapshot();
|
|
72
60
|
});
|
|
73
61
|
};
|
|
@@ -84,11 +72,7 @@ describe('TimePicker component prop:time snapshot', () => {
|
|
|
84
72
|
const attr = filterUndefined(props) as Props;
|
|
85
73
|
|
|
86
74
|
it(testMessageHelper(attr), () => {
|
|
87
|
-
const { baseElement } = render(
|
|
88
|
-
<TimePicker
|
|
89
|
-
{...attr}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
75
|
+
const { baseElement } = render(<TimePicker {...attr} />);
|
|
92
76
|
expect(baseElement).toMatchSnapshot();
|
|
93
77
|
});
|
|
94
78
|
};
|
|
@@ -97,14 +81,9 @@ describe('TimePicker component prop:time snapshot', () => {
|
|
|
97
81
|
});
|
|
98
82
|
|
|
99
83
|
describe('TimePicker component with different prop:time values', () => {
|
|
100
|
-
|
|
101
84
|
timeValues.forEach((time, key) => {
|
|
102
|
-
it(`check time if prop:time is passed as ${typeof
|
|
103
|
-
const { getByTestId } = render(
|
|
104
|
-
<TimePicker
|
|
105
|
-
time={time}
|
|
106
|
-
/>
|
|
107
|
-
);
|
|
85
|
+
it(`check time if prop:time is passed as ${typeof time} `, () => {
|
|
86
|
+
const { getByTestId } = render(<TimePicker time={time} />);
|
|
108
87
|
expect(getByTestId('DesignSystem-Input')).toHaveValue(expectedTimeValue[key]);
|
|
109
88
|
});
|
|
110
89
|
});
|
|
@@ -112,58 +91,33 @@ describe('TimePicker component with different prop:time values', () => {
|
|
|
112
91
|
|
|
113
92
|
describe('TimePicker component with different prop:inputFormat values', () => {
|
|
114
93
|
it('check format if prop:inputFormat is hh:mm', () => {
|
|
115
|
-
const { getByTestId } = render(
|
|
116
|
-
<TimePicker
|
|
117
|
-
time={timeValues[0]}
|
|
118
|
-
inputFormat="hh:mm"
|
|
119
|
-
/>
|
|
120
|
-
);
|
|
94
|
+
const { getByTestId } = render(<TimePicker time={timeValues[0]} inputFormat="hh:mm" />);
|
|
121
95
|
expect(getByTestId('DesignSystem-Input')).toHaveValue('20:44');
|
|
122
96
|
});
|
|
123
97
|
|
|
124
98
|
it('check format if prop:inputFormat is hh:mm AM', () => {
|
|
125
|
-
const { getByTestId } = render(
|
|
126
|
-
<TimePicker
|
|
127
|
-
time={timeValues[0]}
|
|
128
|
-
inputFormat="hh:mm AM"
|
|
129
|
-
/>
|
|
130
|
-
);
|
|
99
|
+
const { getByTestId } = render(<TimePicker time={timeValues[0]} inputFormat="hh:mm AM" />);
|
|
131
100
|
expect(getByTestId('DesignSystem-Input')).toHaveValue(expectedTimeValue[0]);
|
|
132
101
|
});
|
|
133
102
|
});
|
|
134
103
|
|
|
135
104
|
describe('TimePicker component event handler', () => {
|
|
136
105
|
it('onBlur Event handler ', () => {
|
|
137
|
-
const { getByTestId } = render(
|
|
138
|
-
<TimePicker
|
|
139
|
-
time={timeValues[1]}
|
|
140
|
-
onTimeChange={FunctionValue}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
106
|
+
const { getByTestId } = render(<TimePicker time={timeValues[1]} onTimeChange={FunctionValue} />);
|
|
143
107
|
const InputTestId = getByTestId('DesignSystem-Input');
|
|
144
108
|
fireEvent.blur(InputTestId);
|
|
145
109
|
expect(FunctionValue).toHaveBeenCalled();
|
|
146
110
|
});
|
|
147
111
|
|
|
148
112
|
it('onChange Event handler ', () => {
|
|
149
|
-
const { getByTestId } = render(
|
|
150
|
-
<TimePicker
|
|
151
|
-
time={timeValues[1]}
|
|
152
|
-
onTimeChange={FunctionValue}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
113
|
+
const { getByTestId } = render(<TimePicker time={timeValues[1]} onTimeChange={FunctionValue} />);
|
|
155
114
|
const InputTestId = getByTestId('DesignSystem-Input');
|
|
156
115
|
fireEvent.change(InputTestId, { target: { value: timeValues[0] } });
|
|
157
116
|
expect(FunctionValue).toHaveBeenCalled();
|
|
158
117
|
});
|
|
159
118
|
|
|
160
119
|
it('onClear Event handler ', () => {
|
|
161
|
-
const { getByTestId } = render(
|
|
162
|
-
<TimePicker
|
|
163
|
-
time={timeValues[1]}
|
|
164
|
-
onTimeChange={FunctionValue}
|
|
165
|
-
/>
|
|
166
|
-
);
|
|
120
|
+
const { getByTestId } = render(<TimePicker time={timeValues[1]} onTimeChange={FunctionValue} />);
|
|
167
121
|
const InputTestId = getByTestId('DesignSystem-Input--closeIcon');
|
|
168
122
|
fireEvent.click(InputTestId);
|
|
169
123
|
expect(FunctionValue).toHaveBeenCalled();
|
|
@@ -192,7 +146,7 @@ describe('TimePicker component placeholder', () => {
|
|
|
192
146
|
time={timeValues[1]}
|
|
193
147
|
inputFormat="hh:mm"
|
|
194
148
|
inputOptions={{
|
|
195
|
-
placeholderChar: '*'
|
|
149
|
+
placeholderChar: '*',
|
|
196
150
|
}}
|
|
197
151
|
/>
|
|
198
152
|
);
|
|
@@ -206,12 +160,7 @@ describe('TimePicker component placeholder', () => {
|
|
|
206
160
|
describe('TimePicker component with different time format', () => {
|
|
207
161
|
it('check when inputFormat and outputFormat is different', () => {
|
|
208
162
|
const { getByTestId } = render(
|
|
209
|
-
<TimePicker
|
|
210
|
-
time={timeValues[1]}
|
|
211
|
-
onTimeChange={FunctionValue}
|
|
212
|
-
inputFormat="hh:mm AM"
|
|
213
|
-
outputFormat="hh:mm"
|
|
214
|
-
/>
|
|
163
|
+
<TimePicker time={timeValues[1]} onTimeChange={FunctionValue} inputFormat="hh:mm AM" outputFormat="hh:mm" />
|
|
215
164
|
);
|
|
216
165
|
const InputTestId = getByTestId('DesignSystem-Input');
|
|
217
166
|
fireEvent.blur(InputTestId);
|
|
@@ -14,7 +14,7 @@ const customCode = `
|
|
|
14
14
|
startDate,
|
|
15
15
|
endDate,
|
|
16
16
|
selected: 'currWeek',
|
|
17
|
-
monthNav: DateRangePicker.utils.getCurrentMonth()
|
|
17
|
+
monthNav: DateRangePicker.utils.getCurrentMonth(),
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
this.renderChildren = this.renderChildren.bind(this);
|
|
@@ -28,12 +28,11 @@ const customCode = `
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
onReset() {
|
|
31
|
-
const { startDate, endDate } = DateRangePicker.utils.getCurrentWeek();
|
|
32
31
|
this.setState({
|
|
33
|
-
startDate,
|
|
34
|
-
endDate,
|
|
35
|
-
selected:
|
|
36
|
-
monthNav: DateRangePicker.utils.getCurrentMonth()
|
|
32
|
+
startDate:null,
|
|
33
|
+
endDate:null,
|
|
34
|
+
selected: "",
|
|
35
|
+
monthNav: DateRangePicker.utils.getCurrentMonth()
|
|
37
36
|
});
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -43,68 +42,80 @@ const customCode = `
|
|
|
43
42
|
return (
|
|
44
43
|
<div className="pt-5 px-6" style={{ borderRight: 'var(--border)' }}>
|
|
45
44
|
<div className="d-flex align-items-center justify-content-between">
|
|
46
|
-
|
|
45
|
+
<Heading size="s" className="py-3">Range</Heading>
|
|
47
46
|
<Icon name="refresh" onClick={this.onReset} />
|
|
48
47
|
</div>
|
|
49
48
|
<div className="pt-5">
|
|
50
|
-
<
|
|
49
|
+
<Chip
|
|
51
50
|
label="This week"
|
|
51
|
+
clearButton={false}
|
|
52
|
+
type="selection"
|
|
53
|
+
className="mb-6 d-block"
|
|
54
|
+
selected={selected === "currWeek"}
|
|
52
55
|
name="rangePicker"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
onClick={() => {
|
|
57
|
+
this.setState({
|
|
58
|
+
selected: "currWeek",
|
|
59
|
+
monthNav: DateRangePicker.utils.getCurrentMonth(),
|
|
60
|
+
...DateRangePicker.utils.getCurrentWeek()
|
|
61
|
+
});
|
|
62
|
+
}}
|
|
57
63
|
/>
|
|
58
|
-
<
|
|
64
|
+
<Chip
|
|
59
65
|
label="Last week"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
className="
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
clearButton={false}
|
|
67
|
+
type="selection"
|
|
68
|
+
className="mb-6 d-block"
|
|
69
|
+
selected={selected === 'prevWeek'}
|
|
70
|
+
name={"chip"}
|
|
71
|
+
onClick={() => {
|
|
65
72
|
this.setState({
|
|
66
|
-
selected:
|
|
73
|
+
selected: "prevWeek",
|
|
67
74
|
monthNav: DateRangePicker.utils.getCurrentMonth(),
|
|
68
75
|
...DateRangePicker.utils.getPreviousWeek()
|
|
69
76
|
});
|
|
70
77
|
}}
|
|
71
78
|
/>
|
|
72
|
-
<
|
|
79
|
+
<Chip
|
|
73
80
|
label="Last month"
|
|
81
|
+
clearButton={false}
|
|
82
|
+
type="selection"
|
|
83
|
+
className="mb-6 d-block"
|
|
84
|
+
selected={selected === 'prevMonth'}
|
|
74
85
|
name="rangePicker"
|
|
75
|
-
|
|
76
|
-
className="pb-6"
|
|
77
|
-
checked={selected === 'prevMonth'}
|
|
78
|
-
onChange={() => {
|
|
86
|
+
onClick={() => {
|
|
79
87
|
this.setState({
|
|
80
|
-
selected:
|
|
88
|
+
selected: "prevMonth",
|
|
81
89
|
monthNav: DateRangePicker.utils.getCurrentMonth() - 1,
|
|
82
90
|
...DateRangePicker.utils.getPreviousMonth()
|
|
83
91
|
});
|
|
84
92
|
}}
|
|
85
93
|
/>
|
|
86
|
-
<
|
|
94
|
+
<Chip
|
|
87
95
|
label="Last 90 days"
|
|
96
|
+
clearButton={false}
|
|
97
|
+
type="selection"
|
|
98
|
+
className="mb-6 d-block"
|
|
99
|
+
selected={selected === 'prev90Days'}
|
|
88
100
|
name="rangePicker"
|
|
89
|
-
|
|
90
|
-
className="pb-6"
|
|
91
|
-
checked={selected === 'prev90Days'}
|
|
92
|
-
onChange={() => {
|
|
101
|
+
onClick={() => {
|
|
93
102
|
this.setState({
|
|
94
|
-
selected:
|
|
103
|
+
selected: "prev90Days",
|
|
95
104
|
monthNav: DateRangePicker.utils.getCurrentMonth(),
|
|
96
105
|
...DateRangePicker.utils.getPrevious90Days()
|
|
97
106
|
});
|
|
98
107
|
}}
|
|
99
108
|
/>
|
|
100
|
-
|
|
109
|
+
<Chip
|
|
101
110
|
label="Custom"
|
|
111
|
+
clearButton={false}
|
|
112
|
+
type="selection"
|
|
113
|
+
className="mb-6 d-block"
|
|
114
|
+
selected={selected === 'custom'}
|
|
102
115
|
name="rangePicker"
|
|
103
|
-
|
|
104
|
-
checked={selected === 'custom'}
|
|
105
|
-
onChange={() => {
|
|
116
|
+
onClick={() => {
|
|
106
117
|
this.setState({
|
|
107
|
-
selected:
|
|
118
|
+
selected: "custom",
|
|
108
119
|
monthNav: DateRangePicker.utils.getCurrentMonth(),
|
|
109
120
|
...DateRangePicker.utils.getCustomDates()
|
|
110
121
|
});
|
package/core/index.tsx
CHANGED
|
@@ -80,6 +80,6 @@ export { PageHeader } from './components/organisms/pageHeader';
|
|
|
80
80
|
export { FileList } from './components/molecules/fileList';
|
|
81
81
|
export { VerificationCodeInput } from './components/molecules/verificationCodeInput';
|
|
82
82
|
export { InlineMessage } from './components/organisms/inlineMessage';
|
|
83
|
-
|
|
83
|
+
export { ChoiceList } from './components/organisms/choiceList';
|
|
84
84
|
// @ts-ignore
|
|
85
85
|
export { version } from '../package.json';
|
package/core/index.type.tsx
CHANGED
|
@@ -78,3 +78,4 @@ export { PageHeaderProps } from './components/organisms/pageHeader';
|
|
|
78
78
|
export { FileListProps } from './components/molecules/fileList';
|
|
79
79
|
export { VerificationCodeInputProps } from './components/molecules/verificationCodeInput';
|
|
80
80
|
export { InlineMessageProps } from './components/organisms/inlineMessage';
|
|
81
|
+
export { ChoiceListProps } from './components/organisms/choiceList';
|
|
@@ -35,9 +35,7 @@ class OverlayManager {
|
|
|
35
35
|
isTopOverlay(overlay: HTMLDivElement | null) {
|
|
36
36
|
if (overlay === null) return;
|
|
37
37
|
|
|
38
|
-
return
|
|
39
|
-
!!this.overlays.length && this.overlays[this.overlays.length - 1] === overlay
|
|
40
|
-
);
|
|
38
|
+
return !!this.overlays.length && this.overlays[this.overlays.length - 1] === overlay;
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -2377,6 +2377,7 @@ exports[`TS renders children 1`] = `
|
|
|
2377
2377
|
>
|
|
2378
2378
|
<div
|
|
2379
2379
|
class="Grid-head"
|
|
2380
|
+
data-test="DesignSystem-GridHead-wrapper"
|
|
2380
2381
|
>
|
|
2381
2382
|
<div
|
|
2382
2383
|
class="Grid-row Grid-row--head"
|
|
@@ -2584,6 +2585,7 @@ exports[`TS renders children 1`] = `
|
|
|
2584
2585
|
</div>
|
|
2585
2586
|
<div
|
|
2586
2587
|
class="Table"
|
|
2588
|
+
data-test="DesignSystem-Table-wrapper"
|
|
2587
2589
|
>
|
|
2588
2590
|
<div
|
|
2589
2591
|
class="Table-grid"
|
|
@@ -2602,6 +2604,7 @@ exports[`TS renders children 1`] = `
|
|
|
2602
2604
|
</div>
|
|
2603
2605
|
<div
|
|
2604
2606
|
class="Table"
|
|
2607
|
+
data-test="DesignSystem-Table-wrapper"
|
|
2605
2608
|
>
|
|
2606
2609
|
<div
|
|
2607
2610
|
class="Table-grid"
|
|
@@ -2611,6 +2614,7 @@ exports[`TS renders children 1`] = `
|
|
|
2611
2614
|
>
|
|
2612
2615
|
<div
|
|
2613
2616
|
class="Grid-head"
|
|
2617
|
+
data-test="DesignSystem-GridHead-wrapper"
|
|
2614
2618
|
>
|
|
2615
2619
|
<div
|
|
2616
2620
|
class="Grid-row Grid-row--head"
|
package/core/utils/types.tsx
CHANGED
|
@@ -2,10 +2,9 @@ export type SingleOrArray<T> = T | T[];
|
|
|
2
2
|
|
|
3
3
|
export type MakeRequired<T> = Exclude<T, null | undefined>;
|
|
4
4
|
|
|
5
|
-
export type MakeOptional<T extends {}, K extends keyof any> = Omit<T, K> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
5
|
+
export type MakeOptional<T extends {}, K extends keyof any> = Omit<T, K> & {
|
|
6
|
+
[OK in keyof T & K]?: T[OK];
|
|
7
|
+
};
|
|
9
8
|
|
|
10
9
|
type ValidatorFn<K extends any[] = any[]> = (...values: K) => boolean;
|
|
11
10
|
export type Validators = SingleOrArray<ValidatorFn>;
|
package/css/dist/index.css
CHANGED
|
@@ -1112,16 +1112,20 @@ body {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
1114
1114
|
.Button--transparent:hover {
|
|
1115
|
-
|
|
1115
|
+
background: var(--secondary-light);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.Button--transparent:focus {
|
|
1119
|
+
background: rgba(229, 229, 229, 0.2);
|
|
1120
|
+
/* box-shadow: var(--shadow-spread) var(--secondary-shadow); */
|
|
1116
1121
|
}
|
|
1117
1122
|
|
|
1118
1123
|
.Button--transparent:active {
|
|
1119
1124
|
background: var(--secondary);
|
|
1120
1125
|
}
|
|
1121
1126
|
|
|
1122
|
-
.Button--transparent:focus {
|
|
1123
|
-
|
|
1124
|
-
/* box-shadow: var(--shadow-spread) var(--secondary-shadow); */
|
|
1127
|
+
.Button--transparent:focus:active {
|
|
1128
|
+
background: var(--secondary);
|
|
1125
1129
|
}
|
|
1126
1130
|
|
|
1127
1131
|
.Button--transparent:disabled {
|
|
@@ -1817,6 +1821,32 @@ body {
|
|
|
1817
1821
|
cursor: pointer;
|
|
1818
1822
|
}
|
|
1819
1823
|
|
|
1824
|
+
.ChoiceList {
|
|
1825
|
+
margin: 0;
|
|
1826
|
+
padding: 0;
|
|
1827
|
+
border: none;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
.ChoiceList-checkbox--vertical {
|
|
1831
|
+
margin-top: var(--spacing)
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
.ChoiceList-radio--vertical {
|
|
1835
|
+
margin-top: var(--spacing)
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.ChoiceList--alignHorizontal {
|
|
1839
|
+
display: flex;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
.ChoiceList-checkbox--horizontal {
|
|
1843
|
+
margin-left: var(--spacing-xl)
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.ChoiceList-radio--horizontal {
|
|
1847
|
+
margin-left: var(--spacing-xl)
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1820
1850
|
.Collapsible-wrapper {
|
|
1821
1851
|
position: relative;
|
|
1822
1852
|
z-index: 600;
|
|
@@ -2874,6 +2904,7 @@ body {
|
|
|
2874
2904
|
}
|
|
2875
2905
|
|
|
2876
2906
|
.Grid-cellGroup--pinned {
|
|
2907
|
+
position: -webkit-sticky;
|
|
2877
2908
|
position: sticky;
|
|
2878
2909
|
z-index: 1;
|
|
2879
2910
|
}
|
|
@@ -3784,22 +3815,20 @@ body {
|
|
|
3784
3815
|
|
|
3785
3816
|
@-webkit-keyframes modal-open {
|
|
3786
3817
|
from {
|
|
3787
|
-
top:
|
|
3818
|
+
top: 20px;
|
|
3788
3819
|
opacity: 0;
|
|
3789
3820
|
}
|
|
3790
3821
|
to {
|
|
3791
|
-
top: 104px;
|
|
3792
3822
|
opacity: 100;
|
|
3793
3823
|
}
|
|
3794
3824
|
}
|
|
3795
3825
|
|
|
3796
3826
|
@keyframes modal-open {
|
|
3797
3827
|
from {
|
|
3798
|
-
top:
|
|
3828
|
+
top: 20px;
|
|
3799
3829
|
opacity: 0;
|
|
3800
3830
|
}
|
|
3801
3831
|
to {
|
|
3802
|
-
top: 104px;
|
|
3803
3832
|
opacity: 100;
|
|
3804
3833
|
}
|
|
3805
3834
|
}
|
|
@@ -5561,6 +5590,46 @@ body {
|
|
|
5561
5590
|
.bg-transparent {
|
|
5562
5591
|
background-color: transparent !important;
|
|
5563
5592
|
}
|
|
5593
|
+
.border {
|
|
5594
|
+
border: var(--border) !important;
|
|
5595
|
+
}
|
|
5596
|
+
|
|
5597
|
+
.border-top {
|
|
5598
|
+
border-top: var(--border) !important;
|
|
5599
|
+
}
|
|
5600
|
+
|
|
5601
|
+
.border-bottom {
|
|
5602
|
+
border-bottom: var(--border) !important;
|
|
5603
|
+
}
|
|
5604
|
+
|
|
5605
|
+
.border-right {
|
|
5606
|
+
border-right: var(--border) !important;
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
.border-left {
|
|
5610
|
+
border-left: var(--border) !important;
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
.border-0 {
|
|
5614
|
+
border: 0 !important;
|
|
5615
|
+
}
|
|
5616
|
+
|
|
5617
|
+
.border-top-0 {
|
|
5618
|
+
border-top: 0 !important;
|
|
5619
|
+
}
|
|
5620
|
+
|
|
5621
|
+
.border-right-0 {
|
|
5622
|
+
border-right: 0 !important;
|
|
5623
|
+
}
|
|
5624
|
+
|
|
5625
|
+
.border-bottom-0 {
|
|
5626
|
+
border-bottom: 0 !important;
|
|
5627
|
+
}
|
|
5628
|
+
|
|
5629
|
+
.border-left-0 {
|
|
5630
|
+
border-left: 0 !important;
|
|
5631
|
+
}
|
|
5632
|
+
|
|
5564
5633
|
.cursor-pointer {
|
|
5565
5634
|
cursor: pointer;
|
|
5566
5635
|
}
|
|
@@ -6154,6 +6223,7 @@ body {
|
|
|
6154
6223
|
}
|
|
6155
6224
|
|
|
6156
6225
|
.position-sticky {
|
|
6226
|
+
position: -webkit-sticky !important;
|
|
6157
6227
|
position: sticky !important;
|
|
6158
6228
|
}
|
|
6159
6229
|
.w-25 {
|