@innovaccer/design-system 2.5.0-4 → 2.6.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.
- package/.all-contributorsrc +1 -1
- package/.eslintrc.json +53 -0
- package/.github/workflows/jira.yml +1 -2
- package/.github/workflows/main.yml +2 -2
- package/.github/workflows/pull_request.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierrc +2 -2
- package/CHANGELOG.md +38 -88
- package/CONTRIBUTING.md +173 -97
- package/README.md +1 -1
- package/commitlint.config.js +1 -0
- package/core/accessibility/utils/index.ts +5 -0
- package/core/accessibility/utils/isEnterKey.ts +5 -0
- package/core/accessibility/utils/isSpaceKey.ts +5 -0
- package/core/accessibility/utils/useAccessibilityProps.ts +31 -0
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +8 -0
- package/core/components/atoms/_chip/index.tsx +2 -0
- package/core/components/atoms/button/__stories__/Alert.story.tsx +8 -1
- package/core/components/atoms/button/__stories__/Cancel.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconButtonGroup.story.tsx +12 -3
- package/core/components/atoms/button/__stories__/IconButtonSecondary.story.tsx +6 -1
- package/core/components/atoms/button/__stories__/IconLeftSecondary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconRightSecondary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/IconTransparent.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/LabelButtonGroup.story.tsx +14 -3
- package/core/components/atoms/button/__stories__/LargeIconExpanded.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/LoadingPrimary.story.tsx +4 -1
- package/core/components/atoms/button/__stories__/Primary.story.tsx +5 -2
- package/core/components/atoms/button/__stories__/SplitButton.story.tsx +6 -1
- package/core/components/atoms/button/__stories__/Transparent.story.tsx +8 -1
- package/core/components/atoms/button/__stories__/index.story.tsx +11 -1
- package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/Size.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/icon/Icon.story.tsx +15 -0
- package/core/components/atoms/button/__stories__/variants/icon/IconLeft.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +4 -0
- package/core/components/atoms/button/__stories__/variants/state/Alert.story.tsx +7 -17
- package/core/components/atoms/button/__stories__/variants/state/Basic.story.tsx +9 -17
- package/core/components/atoms/button/__stories__/variants/state/Primary.story.tsx +7 -17
- package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +7 -17
- package/core/components/atoms/button/__stories__/variants/state/Transparent.story.tsx +13 -17
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +6 -0
- package/core/components/atoms/collapsible/__stories__/index.story.tsx +2 -2
- package/core/components/atoms/collapsible/__tests__/__snapshots__/Collapsible.test.tsx.snap +8 -0
- package/core/components/atoms/divider/Divider.tsx +44 -0
- package/core/components/atoms/divider/__stories__/BasicDividerInCard.story.tsx +74 -0
- package/core/components/atoms/divider/__stories__/HeaderDividerInCard.story.tsx +35 -0
- package/core/components/atoms/divider/__stories__/IndentedDivider.story.tsx +49 -0
- package/core/components/atoms/divider/__stories__/Vertical.story.tsx +51 -0
- package/core/components/atoms/divider/__stories__/index.story.tsx +91 -0
- package/core/components/atoms/divider/__stories__/variants/HorizontalDivider.story.tsx +27 -0
- package/core/components/atoms/divider/__tests__/Divider.test.tsx +50 -0
- package/core/components/atoms/divider/__tests__/__snapshots__/Divider.test.tsx.snap +53 -0
- package/core/components/atoms/divider/index.tsx +2 -0
- package/core/components/atoms/dropdown/DropdownList.tsx +8 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +27 -17
- package/core/components/atoms/dropdown/option/DefaultOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/IconOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/IconWithMetaOption.tsx +3 -0
- package/core/components/atoms/dropdown/option/MetaOption.tsx +3 -0
- package/core/components/atoms/editable/Editable.tsx +3 -0
- package/core/components/atoms/icon/Icon.tsx +14 -3
- package/core/components/atoms/icon/__stories__/variants/Image.story.tsx +6 -1
- package/core/components/atoms/icon/__tests__/__snapshots__/Icon.test.tsx.snap +74 -0
- package/core/components/atoms/input/Input.tsx +14 -4
- package/core/components/atoms/input/__stories__/BasicInput.story.tsx +2 -1
- package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +29 -9
- package/core/components/atoms/input/__stories__/InputWithLabel.story.tsx +11 -3
- package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +8 -4
- package/core/components/atoms/input/__stories__/RequiredVsOptional.story.tsx +12 -8
- package/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap +19 -0
- package/core/components/atoms/legend/Legend.tsx +3 -0
- package/core/components/atoms/message/__stories__/CustomDescription.tsx +25 -0
- package/core/components/atoms/metricInput/MetricInput.tsx +12 -2
- package/core/components/atoms/metricInput/__stories__/DefaultMetric.story.tsx +8 -2
- package/core/components/atoms/metricInput/__stories__/WithPrefix.story.tsx +6 -2
- package/core/components/atoms/metricInput/__stories__/index.story.tsx +1 -0
- package/core/components/atoms/metricInput/__stories__/variants/Controlled.story.tsx +2 -0
- package/core/components/atoms/metricInput/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/metricInput/__stories__/withSuffix.story.tsx +6 -2
- package/core/components/atoms/metricInput/__tests__/__snapshots__/MetricInput.test.tsx.snap +20 -4
- package/core/components/atoms/multiSlider/Handle.tsx +3 -0
- package/core/components/atoms/multiSlider/index.tsx +6 -0
- package/core/components/atoms/outsideClick/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/statusHint/StatusHint.tsx +3 -0
- package/core/components/atoms/switchInput/Switch.tsx +10 -4
- package/core/components/atoms/switchInput/__stories__/DefaultSwitch.story.tsx +4 -1
- package/core/components/atoms/switchInput/__stories__/OffState.story.tsx +4 -1
- package/core/components/atoms/switchInput/__stories__/index.story.tsx +26 -3
- package/core/components/atoms/switchInput/__stories__/variants/Size.story.tsx +10 -1
- package/core/components/atoms/switchInput/__stories__/variants/State.story.tsx +9 -2
- package/core/components/atoms/textarea/__stories__/TextareaWithCaption.story.tsx +9 -3
- package/core/components/atoms/textarea/__stories__/defaultTextarea.story.tsx +10 -2
- package/core/components/atoms/textarea/__stories__/index.story.tsx +1 -0
- package/core/components/atoms/textarea/__stories__/variants/Disable.story.tsx +1 -0
- package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +30 -0
- 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 +1 -1
- 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/Box.tsx +3 -0
- package/core/components/molecules/chipInput/ChipInput.tsx +3 -0
- package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +12 -0
- package/core/components/molecules/dropzone/Dropzone.tsx +3 -0
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +1 -1
- package/core/components/molecules/editableChipInput/EditableChipInput.tsx +9 -5
- package/core/components/molecules/editableChipInput/__stories__/Uncontrolled.story.tsx +1 -1
- package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +8 -0
- package/core/components/molecules/editableDropdown/EditableDropdown.tsx +2 -2
- package/core/components/molecules/editableInput/EditableInput.tsx +13 -4
- package/core/components/molecules/emptyState/EmptyState.tsx +5 -1
- package/core/components/molecules/fileList/FileListItem.tsx +2 -0
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +2 -0
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +156 -21
- package/core/components/molecules/inputMask/InputMask.tsx +1 -1
- package/core/components/molecules/inputMask/__tests__/__snapshots__/InputMask.test.tsx.snap +1 -0
- package/core/components/molecules/pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +5 -1
- package/core/components/molecules/stepper/Step.tsx +2 -0
- package/core/components/molecules/tabs/Tabs.tsx +2 -0
- package/core/components/molecules/tabs/TabsWrapper.tsx +2 -0
- package/core/components/molecules/tabs/__stories__/CustomLabels.story.tsx +1 -1
- package/core/components/molecules/verificationCodeInput/VerificationCodeInput.tsx +8 -4
- package/core/components/molecules/verificationCodeInput/__stories__/index.story.tsx +3 -1
- package/core/components/molecules/verificationCodeInput/__tests__/__snapshots__/VerificationCodeInput.test.tsx.snap +1 -0
- package/core/components/organisms/calendar/Calendar.tsx +130 -8
- package/core/components/organisms/calendar/__tests__/Calendar.test.tsx +27 -0
- package/core/components/organisms/choiceList/ChoiceList.tsx +1 -1
- package/core/components/organisms/datePicker/DatePicker.tsx +30 -15
- package/core/components/organisms/datePicker/__tests__/DatePicker.test.tsx +136 -46
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +4388 -1857
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +112 -40
- package/core/components/organisms/grid/Cell.tsx +4 -0
- package/core/components/organisms/grid/GridRow.tsx +4 -0
- package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +2 -2
- package/core/components/organisms/horizontalNav/HorizontalNav.tsx +2 -0
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +3 -5
- package/core/components/organisms/inlineMessage/__tests__/__snapshots__/InlineMessage.test.tsx.snap +30 -40
- package/core/components/organisms/navigation/VerticalNavigation.tsx +4 -0
- package/core/components/organisms/table/Table.tsx +1 -0
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +4 -1
- package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +3 -2
- package/core/components/organisms/table/__stories__/Selection.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/syncTable.story.tsx +14 -6
- package/core/components/organisms/table/__stories__/variants/nestedRows.story.tsx +5 -2
- package/core/components/organisms/table/__stories__/variants/withHeader.story.tsx +0 -2
- package/core/components/organisms/timePicker/TimePicker.tsx +1 -1
- package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePicker.test.tsx.snap +14 -2
- package/core/components/organisms/verticalNav/MenuItem.tsx +2 -0
- package/core/components/patterns/datePicker/datePickerWithPresets.story.tsx +126 -0
- package/core/components/patterns/dateRangePicker/withCustomPopover.story.tsx +8 -8
- package/core/components/patterns/forms/CreatePassword.story.tsx +1 -1
- package/core/components/patterns/forms/VerificationCodeInput.story.tsx +2 -2
- package/core/components/patterns/table/Table with Header/tableWithHeader.story.jsx +7 -7
- package/core/index.tsx +1 -0
- package/core/index.type.tsx +1 -0
- package/core/utils/Keys.ts +4 -0
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +544 -536
- package/core/utils/docPage/index.tsx +22 -17
- package/core/utils/testHelper.ts +1 -1
- package/core/utils/validators.ts +37 -34
- package/css/dist/index.css +1523 -1402
- package/css/dist/index.css.map +1 -1
- package/css/src/components/Legend.css +7 -7
- package/css/src/components/ProgressBar.css +1 -1
- package/css/src/components/avatarGroup.css +1 -1
- package/css/src/components/backdrop.css +12 -6
- package/css/src/components/badge.css +52 -52
- package/css/src/components/button.css +99 -94
- package/css/src/components/calendar.css +137 -126
- package/css/src/components/card.css +0 -1
- package/css/src/components/cardSubdued.css +3 -5
- package/css/src/components/chat.css +1 -1
- package/css/src/components/checkbox.css +71 -70
- package/css/src/components/chip.css +14 -13
- package/css/src/components/chipGroup.css +5 -5
- package/css/src/components/chipInput.css +1 -1
- package/css/src/components/choiceList.css +4 -4
- package/css/src/components/dateRangePicker.css +13 -13
- package/css/src/components/divider.css +20 -0
- package/css/src/components/dropdown.css +61 -61
- package/css/src/components/dropdownButton.css +36 -36
- package/css/src/components/dropzone.css +16 -20
- package/css/src/components/editableChipInput.css +10 -9
- package/css/src/components/editableDropdown.css +1 -1
- package/css/src/components/editableInput.css +1 -1
- package/css/src/components/emptyState.css +15 -15
- package/css/src/components/fileList.css +44 -45
- package/css/src/components/grid.css +217 -199
- package/css/src/components/horizontalNav.css +0 -1
- package/css/src/components/icon.css +1 -7
- package/css/src/components/inlineMessage.css +2 -1
- package/css/src/components/input.css +62 -62
- package/css/src/components/link.css +1 -1
- package/css/src/components/list.css +10 -10
- package/css/src/components/message.css +69 -70
- package/css/src/components/metaList.css +26 -26
- package/css/src/components/metricInput.css +3 -4
- package/css/src/components/modal.css +1 -1
- package/css/src/components/navigation.css +3 -3
- package/css/src/components/pageHeader.css +1 -2
- package/css/src/components/pagination.css +36 -36
- package/css/src/components/pills.css +19 -19
- package/css/src/components/placeholder.css +10 -5
- package/css/src/components/popover.css +2 -2
- package/css/src/components/progressRing.css +1 -1
- package/css/src/components/radio.css +74 -74
- package/css/src/components/slider.css +5 -5
- package/css/src/components/statusHints.css +15 -15
- package/css/src/components/switch.css +45 -41
- package/css/src/components/table.css +15 -15
- package/css/src/components/tabs.css +53 -53
- package/css/src/components/textarea.css +1 -1
- package/css/src/components/toast.css +53 -53
- package/css/src/components/verificationCodeInput.css +5 -6
- package/css/src/components/verticalNav.css +1 -2
- package/css/src/core/base.css +3 -0
- package/css/src/core/typography.css +1 -1
- package/css/src/core/utilities.css +1 -1
- package/css/src/tokens/index.css +63 -63
- package/css/src/utils/align.css +1 -1
- package/css/src/utils/background.css +1 -1
- package/css/src/utils/cursor.css +1 -1
- package/css/src/utils/display.css +1 -1
- package/css/src/utils/flex.css +1 -1
- package/css/src/utils/grid.css +1 -1
- package/css/src/utils/overflow.css +1 -1
- package/css/src/utils/position.css +1 -1
- package/css/src/utils/spacing.css +1 -1
- package/css/src/utils/utility.css +13 -13
- package/css/src/variables/index.css +1 -1
- package/dist/core/accessibility/utils/index.d.ts +4 -0
- package/dist/core/accessibility/utils/isEnterKey.d.ts +3 -0
- package/dist/core/accessibility/utils/isSpaceKey.d.ts +3 -0
- package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +15 -0
- package/dist/core/components/atoms/divider/Divider.d.ts +15 -0
- package/dist/core/components/atoms/divider/index.d.ts +2 -0
- package/dist/core/components/atoms/icon/Icon.d.ts +3 -1
- package/dist/core/components/atoms/input/Input.d.ts +1 -1
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +50 -49
- package/dist/core/components/atoms/switchInput/Switch.d.ts +2 -1
- package/dist/core/components/organisms/calendar/Calendar.d.ts +31 -0
- package/dist/core/components/organisms/datePicker/DatePicker.d.ts +2 -0
- package/dist/core/components/patterns/datePicker/datePickerWithPresets.story.d.ts +15 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/index.esm.js +829 -495
- package/dist/index.js +313 -144
- 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/package.json +17 -14
- package/.husky/prepare-commit-msg +0 -6
- package/tslint.json +0 -30
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1639036106070
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.
|
|
5
|
+
* Version: v2.6.0
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -202,46 +202,58 @@
|
|
|
202
202
|
|
|
203
203
|
switch (format) {
|
|
204
204
|
case 'dd/mm/yyyy':
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
{
|
|
206
|
+
var p = val.split('/');
|
|
207
|
+
var date_1 = +p[0] || 1;
|
|
208
|
+
var month = +p[1] || 1;
|
|
209
|
+
var year = +p[2] || 1900;
|
|
210
|
+
return validate(date_1, month, year);
|
|
211
|
+
}
|
|
210
212
|
|
|
211
213
|
case 'mm/dd/yyyy':
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
{
|
|
215
|
+
var p = val.split('/');
|
|
216
|
+
var date_2 = +p[1] || 1;
|
|
217
|
+
var month = +p[0] || 1;
|
|
218
|
+
var year = +p[2] || 1900;
|
|
219
|
+
return validate(date_2, month, year);
|
|
220
|
+
}
|
|
217
221
|
|
|
218
222
|
case 'yyyy/mm/dd':
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
{
|
|
224
|
+
var p = val.split('/');
|
|
225
|
+
var date_3 = +p[2] || 1;
|
|
226
|
+
var month = +p[1] || 1;
|
|
227
|
+
var year = +p[0] || 1900;
|
|
228
|
+
return validate(date_3, month, year);
|
|
229
|
+
}
|
|
224
230
|
|
|
225
231
|
case 'dd-mm-yyyy':
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
{
|
|
233
|
+
var p = val.split('-');
|
|
234
|
+
var date_4 = +p[0] || 1;
|
|
235
|
+
var month = +p[1] || 1;
|
|
236
|
+
var year = +p[2] || 1900;
|
|
237
|
+
return validate(date_4, month, year);
|
|
238
|
+
}
|
|
231
239
|
|
|
232
240
|
case 'mm-dd-yyyy':
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
241
|
+
{
|
|
242
|
+
var p = val.split('-');
|
|
243
|
+
var date_5 = +p[1] || 1;
|
|
244
|
+
var month = +p[0] || 1;
|
|
245
|
+
var year = +p[2] || 1900;
|
|
246
|
+
return validate(date_5, month, year);
|
|
247
|
+
}
|
|
238
248
|
|
|
239
249
|
case 'yyyy-mm-dd':
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
250
|
+
{
|
|
251
|
+
var p = val.split('-');
|
|
252
|
+
var date_6 = +p[2] || 1;
|
|
253
|
+
var month = +p[1] || 1;
|
|
254
|
+
var year = +p[0] || 1900;
|
|
255
|
+
return validate(date_6, month, year);
|
|
256
|
+
}
|
|
245
257
|
|
|
246
258
|
default:
|
|
247
259
|
return false;
|
|
@@ -968,6 +980,38 @@
|
|
|
968
980
|
size: 'regular'
|
|
969
981
|
};
|
|
970
982
|
|
|
983
|
+
var isEnterKey = function isEnterKey(e) {
|
|
984
|
+
return e.key === 'Enter';
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
var isSpaceKey = function isSpaceKey(e) {
|
|
988
|
+
return e.key === 'Space';
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
var useAccessibilityProps = function useAccessibilityProps(_a) {
|
|
992
|
+
var onClick = _a.onClick,
|
|
993
|
+
_onKeyDown = _a.onKeyDown,
|
|
994
|
+
role = _a.role;
|
|
995
|
+
return __assign({}, onClick ? {
|
|
996
|
+
onClick: onClick,
|
|
997
|
+
role: role || 'button',
|
|
998
|
+
tabIndex: 0,
|
|
999
|
+
onKeyDown: function onKeyDown(e) {
|
|
1000
|
+
if (_onKeyDown) {
|
|
1001
|
+
_onKeyDown(e);
|
|
1002
|
+
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
if (isEnterKey(e) && onClick) {
|
|
1007
|
+
onClick(e);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
} : {
|
|
1011
|
+
role: role
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
|
|
971
1015
|
var Icon = function Icon(props) {
|
|
972
1016
|
var _a;
|
|
973
1017
|
|
|
@@ -975,8 +1019,8 @@
|
|
|
975
1019
|
className = props.className,
|
|
976
1020
|
name = props.name,
|
|
977
1021
|
size = props.size,
|
|
978
|
-
onClick = props.onClick,
|
|
979
1022
|
children = props.children;
|
|
1023
|
+
var accessibilityProps = useAccessibilityProps(props);
|
|
980
1024
|
var baseProps = extractBaseProps(props);
|
|
981
1025
|
|
|
982
1026
|
var mapper = function mapper(val) {
|
|
@@ -1006,10 +1050,10 @@
|
|
|
1006
1050
|
}
|
|
1007
1051
|
|
|
1008
1052
|
return /*#__PURE__*/React__namespace.createElement("i", __assign({}, baseProps, {
|
|
1053
|
+
role: "alert",
|
|
1009
1054
|
className: iconClass,
|
|
1010
|
-
style: styles
|
|
1011
|
-
|
|
1012
|
-
}), type ? name + "_" + type : name);
|
|
1055
|
+
style: styles
|
|
1056
|
+
}, accessibilityProps), type ? name + "_" + type : name);
|
|
1013
1057
|
};
|
|
1014
1058
|
Icon.displayName = 'Icon';
|
|
1015
1059
|
Icon.defaultProps = {
|
|
@@ -1900,46 +1944,50 @@
|
|
|
1900
1944
|
break;
|
|
1901
1945
|
|
|
1902
1946
|
case 'Enter':
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1947
|
+
{
|
|
1948
|
+
var activeElement = document.activeElement;
|
|
1949
|
+
|
|
1950
|
+
if (dropdownOpen && (inputRef.current === activeElement || dropdownTriggerRef.current === activeElement)) {
|
|
1951
|
+
event.preventDefault();
|
|
1952
|
+
var classes = withCheckbox ? optionClass + " .Checkbox-input" : optionClass;
|
|
1953
|
+
var elements = document.querySelectorAll(classes);
|
|
1954
|
+
var element = elements[cursor];
|
|
1955
|
+
if (element) element.click();
|
|
1956
|
+
}
|
|
1912
1957
|
|
|
1913
|
-
|
|
1914
|
-
|
|
1958
|
+
if (!dropdownOpen) onToggleDropdown(!dropdownOpen);
|
|
1959
|
+
break;
|
|
1960
|
+
}
|
|
1915
1961
|
|
|
1916
1962
|
case 'Tab':
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1963
|
+
{
|
|
1964
|
+
if (!showApplyButton && dropdownOpen) {
|
|
1965
|
+
event.preventDefault();
|
|
1966
|
+
onToggleDropdown(false, 'onClick');
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1922
1969
|
|
|
1923
|
-
|
|
1924
|
-
|
|
1970
|
+
var currentElement = document.activeElement;
|
|
1971
|
+
var disabledApplyButton = (_a = dropdownApplyButtonRef.current) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
1925
1972
|
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1973
|
+
if ((currentElement === dropdownCancelButtonRef.current && disabledApplyButton || currentElement === dropdownApplyButtonRef.current) && dropdownOpen) {
|
|
1974
|
+
event.preventDefault();
|
|
1975
|
+
onToggleDropdown(false, 'onClick');
|
|
1976
|
+
return;
|
|
1977
|
+
}
|
|
1931
1978
|
|
|
1932
|
-
|
|
1933
|
-
|
|
1979
|
+
if (showApplyButton && dropdownOpen) {
|
|
1980
|
+
event.preventDefault();
|
|
1934
1981
|
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1982
|
+
if (currentElement === dropdownCancelButtonRef.current) {
|
|
1983
|
+
(_b = dropdownApplyButtonRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1984
|
+
} else {
|
|
1985
|
+
(_c = dropdownCancelButtonRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
1986
|
+
}
|
|
1939
1987
|
}
|
|
1940
|
-
}
|
|
1941
1988
|
|
|
1942
|
-
|
|
1989
|
+
break;
|
|
1990
|
+
}
|
|
1943
1991
|
}
|
|
1944
1992
|
};
|
|
1945
1993
|
|
|
@@ -3045,6 +3093,17 @@
|
|
|
3045
3093
|
};
|
|
3046
3094
|
};
|
|
3047
3095
|
|
|
3096
|
+
_this.yearMouseOverHandler = function (year, isCurrentYear, isDisabled, ev) {
|
|
3097
|
+
var onYearHover = _this.props.onYearHover;
|
|
3098
|
+
var yearData = {
|
|
3099
|
+
value: year,
|
|
3100
|
+
year: year,
|
|
3101
|
+
isCurrentYear: isCurrentYear,
|
|
3102
|
+
isDisabled: isDisabled
|
|
3103
|
+
};
|
|
3104
|
+
if (onYearHover) onYearHover(yearData, ev);
|
|
3105
|
+
};
|
|
3106
|
+
|
|
3048
3107
|
_this.selectMonth = function (month) {
|
|
3049
3108
|
return function () {
|
|
3050
3109
|
_this.updateState(_this.state.yearNav, month);
|
|
@@ -3055,7 +3114,28 @@
|
|
|
3055
3114
|
};
|
|
3056
3115
|
};
|
|
3057
3116
|
|
|
3117
|
+
_this.monthMouseOverHandler = function (month, isCurrentMonth, isDisabled, ev) {
|
|
3118
|
+
var months = config.months;
|
|
3119
|
+
var onMonthHover = _this.props.onMonthHover;
|
|
3120
|
+
var monthData = {
|
|
3121
|
+
value: months[month],
|
|
3122
|
+
month: months[month],
|
|
3123
|
+
year: _this.state.year,
|
|
3124
|
+
isCurrentMonth: isCurrentMonth,
|
|
3125
|
+
isDisabled: isDisabled
|
|
3126
|
+
};
|
|
3127
|
+
if (onMonthHover) onMonthHover(monthData, ev);
|
|
3128
|
+
};
|
|
3129
|
+
|
|
3058
3130
|
_this.selectDate = function (index, date, prevMonthDayRange, dayRange) {
|
|
3131
|
+
var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, false);
|
|
3132
|
+
|
|
3133
|
+
_this.setState({
|
|
3134
|
+
currDate: d
|
|
3135
|
+
});
|
|
3136
|
+
};
|
|
3137
|
+
|
|
3138
|
+
_this.calculateDate = function (index, date, prevMonthDayRange, dayRange, isDateHovered) {
|
|
3059
3139
|
var neighbouringMonthIndex;
|
|
3060
3140
|
var neighbouringMonthDate;
|
|
3061
3141
|
var type = '';
|
|
@@ -3077,15 +3157,15 @@
|
|
|
3077
3157
|
year = _a.year,
|
|
3078
3158
|
month = _a.month;
|
|
3079
3159
|
|
|
3080
|
-
|
|
3160
|
+
if (isDateHovered === false) {
|
|
3161
|
+
_this.updateState(year, month, neighbouringMonthDate);
|
|
3081
3162
|
|
|
3082
|
-
|
|
3163
|
+
_this.onNavIconClickHandler(type)();
|
|
3164
|
+
}
|
|
3083
3165
|
|
|
3084
3166
|
var d = _this.getDateValue(year, month, neighbouringMonthDate);
|
|
3085
3167
|
|
|
3086
|
-
|
|
3087
|
-
currDate: d
|
|
3088
|
-
});
|
|
3168
|
+
return d;
|
|
3089
3169
|
};
|
|
3090
3170
|
|
|
3091
3171
|
_this.onNavIconClickHandler = function (type) {
|
|
@@ -3329,7 +3409,8 @@
|
|
|
3329
3409
|
key: row + "-" + col,
|
|
3330
3410
|
"data-test": "DesignSystem-Calendar--yearValue",
|
|
3331
3411
|
className: valueClass,
|
|
3332
|
-
onClick: _this.selectYear(year)
|
|
3412
|
+
onClick: _this.selectYear(year),
|
|
3413
|
+
onMouseOver: _this.yearMouseOverHandler.bind(_this, year, isCurrentYear(), disabled)
|
|
3333
3414
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
3334
3415
|
size: size === 'small' ? 'small' : 'regular',
|
|
3335
3416
|
appearance: active ? 'white' : disabled ? 'disabled' : isCurrentYear() ? 'link' : 'default'
|
|
@@ -3381,7 +3462,8 @@
|
|
|
3381
3462
|
key: row + "-" + col,
|
|
3382
3463
|
"data-test": "DesignSystem-Calendar--monthValue",
|
|
3383
3464
|
className: valueClass,
|
|
3384
|
-
onClick: _this.selectMonth(month)
|
|
3465
|
+
onClick: _this.selectMonth(month),
|
|
3466
|
+
onMouseOver: _this.monthMouseOverHandler.bind(_this, month, isCurrentMonth(), disabled)
|
|
3385
3467
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
3386
3468
|
size: size === 'small' ? 'small' : 'regular',
|
|
3387
3469
|
appearance: active ? 'white' : disabled ? 'disabled' : isCurrentMonth() ? 'link' : 'default'
|
|
@@ -3438,7 +3520,8 @@
|
|
|
3438
3520
|
firstDayOfWeek = _a.firstDayOfWeek,
|
|
3439
3521
|
disabledBefore = _a.disabledBefore,
|
|
3440
3522
|
disabledAfter = _a.disabledAfter,
|
|
3441
|
-
monthsInView = _a.monthsInView
|
|
3523
|
+
monthsInView = _a.monthsInView,
|
|
3524
|
+
onDateHover = _a.onDateHover;
|
|
3442
3525
|
var _b = _this.state,
|
|
3443
3526
|
startDate = _b.startDate,
|
|
3444
3527
|
endDate = _b.endDate,
|
|
@@ -3462,11 +3545,7 @@
|
|
|
3462
3545
|
var dummyDays = Math.abs(dayDiff);
|
|
3463
3546
|
var noOfRows = Math.ceil((dayRange + dummyDays) / daysInRow);
|
|
3464
3547
|
|
|
3465
|
-
if (noOfRows === 6) {
|
|
3466
|
-
noOfRows = noOfRows;
|
|
3467
|
-
} else if (monthsInView > 1) {
|
|
3468
|
-
noOfRows = noOfRows;
|
|
3469
|
-
} else {
|
|
3548
|
+
if (noOfRows === 6) ; else if (monthsInView > 1) ; else {
|
|
3470
3549
|
noOfRows = noOfRows + 1;
|
|
3471
3550
|
}
|
|
3472
3551
|
|
|
@@ -3502,6 +3581,25 @@
|
|
|
3502
3581
|
};
|
|
3503
3582
|
};
|
|
3504
3583
|
|
|
3584
|
+
var onMouseEnterHandler = function onMouseEnterHandler(date, isToday, isDisabled, ev) {
|
|
3585
|
+
var d = _this.calculateDate(index, date, prevMonthDayRange, dayRange, true) || new Date();
|
|
3586
|
+
var months = config.months,
|
|
3587
|
+
days = config.days;
|
|
3588
|
+
var dayName = days.large[d.getDay()];
|
|
3589
|
+
var dateData = {
|
|
3590
|
+
value: d.getDate(),
|
|
3591
|
+
isToday: isToday,
|
|
3592
|
+
isDisabled: isDisabled,
|
|
3593
|
+
todayDate: _this.state.currDate,
|
|
3594
|
+
fullDate: d,
|
|
3595
|
+
date: d.getDate(),
|
|
3596
|
+
month: months[d.getMonth()],
|
|
3597
|
+
year: d.getFullYear(),
|
|
3598
|
+
dayName: dayName
|
|
3599
|
+
};
|
|
3600
|
+
if (onDateHover) onDateHover(dateData, ev);
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3505
3603
|
return Array.from({
|
|
3506
3604
|
length: noOfRows
|
|
3507
3605
|
}, function (_y, row) {
|
|
@@ -3601,14 +3699,16 @@
|
|
|
3601
3699
|
"data-test": "DesignSystem-Calendar--dateValue",
|
|
3602
3700
|
className: valueClass,
|
|
3603
3701
|
onClick: onClickHandler(date),
|
|
3604
|
-
onMouseOver: onMouseOverHandler(date)
|
|
3702
|
+
onMouseOver: onMouseOverHandler(date),
|
|
3703
|
+
onMouseEnter: onMouseEnterHandler.bind(_this, date, today(), disabled)
|
|
3605
3704
|
}, date), isEventExist && _this.renderEventsIndicator(size, active)), (dummy && date > 0 && index === monthsInView - 1 || dummy && date <= 0 && index === 0) && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
3606
3705
|
appearance: active ? 'white' : disabled ? 'disabled' : today() ? 'link' : 'default',
|
|
3607
3706
|
size: size === 'small' ? 'small' : 'regular',
|
|
3608
3707
|
"data-test": "DesignSystem-Calendar--dateValue",
|
|
3609
3708
|
className: valueClass,
|
|
3610
3709
|
onClick: onClickHandler(date),
|
|
3611
|
-
onMouseOver: onMouseOverHandler(date)
|
|
3710
|
+
onMouseOver: onMouseOverHandler(date),
|
|
3711
|
+
onMouseEnter: onMouseEnterHandler.bind(_this, date, today(), disabled)
|
|
3612
3712
|
}, date <= 0 ? prevMonthDayRange + date : date - dayRange), isEventExist && _this.renderEventsIndicator(size, active)));
|
|
3613
3713
|
}));
|
|
3614
3714
|
});
|
|
@@ -4324,7 +4424,11 @@
|
|
|
4324
4424
|
_a.onDateChange;
|
|
4325
4425
|
_a.closeOnSelect;
|
|
4326
4426
|
var size = _a.size,
|
|
4327
|
-
|
|
4427
|
+
_b = _a.showTodayDate,
|
|
4428
|
+
showTodayDate = _b === void 0 ? true : _b,
|
|
4429
|
+
_c = _a.children,
|
|
4430
|
+
children = _c === void 0 ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null) : _c,
|
|
4431
|
+
rest = __rest(_a, ["date", "open", "position", "inputFormat", "outputFormat", "inputOptions", "validators", "withInput", "disabledBefore", "disabledAfter", "onDateChange", "closeOnSelect", "size", "showTodayDate", "children"]);
|
|
4328
4432
|
|
|
4329
4433
|
var date = this.state.date;
|
|
4330
4434
|
var months = config.months;
|
|
@@ -4348,13 +4452,15 @@
|
|
|
4348
4452
|
return !isTodayDateDisabled;
|
|
4349
4453
|
};
|
|
4350
4454
|
|
|
4351
|
-
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(
|
|
4455
|
+
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
4456
|
+
className: "d-flex"
|
|
4457
|
+
}, children, /*#__PURE__*/React__namespace.createElement(Calendar, __assign({}, rest, {
|
|
4352
4458
|
size: size,
|
|
4353
4459
|
date: currDate,
|
|
4354
4460
|
disabledBefore: dateDisabledBefore,
|
|
4355
4461
|
disabledAfter: dateDisabledAfter,
|
|
4356
4462
|
onDateChange: this.onDateChangeHandler
|
|
4357
|
-
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
4463
|
+
}))), showTodayDate && /*#__PURE__*/React__namespace.createElement("div", {
|
|
4358
4464
|
className: "d-flex justify-content-center pb-6",
|
|
4359
4465
|
"data-test": "DesignSystem-Select--TodaysDate-wrapper"
|
|
4360
4466
|
}, /*#__PURE__*/React__namespace.createElement(Chip, {
|
|
@@ -4592,7 +4698,8 @@
|
|
|
4592
4698
|
var _a;
|
|
4593
4699
|
|
|
4594
4700
|
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4595
|
-
}
|
|
4701
|
+
},
|
|
4702
|
+
role: "presentation"
|
|
4596
4703
|
}, inlineLabel && /*#__PURE__*/React__namespace.createElement("div", {
|
|
4597
4704
|
className: "Input-inlineLabel"
|
|
4598
4705
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
@@ -4623,12 +4730,17 @@
|
|
|
4623
4730
|
position: "top",
|
|
4624
4731
|
tooltip: info
|
|
4625
4732
|
}, trigger) : actionIcon && (value || defaultValue) ? actionIcon : onClear && (value || defaultValue) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
4626
|
-
className: rightIconClass
|
|
4733
|
+
className: rightIconClass
|
|
4734
|
+
}, /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
4735
|
+
"data-test": "DesignSystem-Input--closeIcon",
|
|
4627
4736
|
onClick: function onClick(e) {
|
|
4628
|
-
|
|
4737
|
+
var _a;
|
|
4738
|
+
|
|
4739
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus({
|
|
4740
|
+
preventScroll: true
|
|
4741
|
+
});
|
|
4742
|
+
onClear(e);
|
|
4629
4743
|
},
|
|
4630
|
-
"data-test": "DesignSystem-Input--closeIcon"
|
|
4631
|
-
}, /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
4632
4744
|
name: 'close',
|
|
4633
4745
|
size: sizeMapping$1[size]
|
|
4634
4746
|
})));
|
|
@@ -4769,7 +4881,14 @@
|
|
|
4769
4881
|
var _a;
|
|
4770
4882
|
|
|
4771
4883
|
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4772
|
-
}
|
|
4884
|
+
},
|
|
4885
|
+
onFocus: function onFocus() {
|
|
4886
|
+
var _a;
|
|
4887
|
+
|
|
4888
|
+
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4889
|
+
},
|
|
4890
|
+
onKeyDown: function onKeyDown() {},
|
|
4891
|
+
role: "presentation"
|
|
4773
4892
|
}, icon && /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
4774
4893
|
"data-test": "DesignSystem-MetricInput--icon",
|
|
4775
4894
|
name: icon,
|
|
@@ -4804,9 +4923,9 @@
|
|
|
4804
4923
|
size: size,
|
|
4805
4924
|
appearance: "subtle"
|
|
4806
4925
|
}, suffix), /*#__PURE__*/React__namespace.createElement("div", {
|
|
4807
|
-
className: "MetricInput-arrowIcons"
|
|
4808
|
-
tabIndex: 0
|
|
4926
|
+
className: "MetricInput-arrowIcons"
|
|
4809
4927
|
}, /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
4928
|
+
tabIndex: -1,
|
|
4810
4929
|
className: getArrowClass('up'),
|
|
4811
4930
|
size: iconSize,
|
|
4812
4931
|
name: "keyboard_arrow_up",
|
|
@@ -4815,6 +4934,7 @@
|
|
|
4815
4934
|
},
|
|
4816
4935
|
"data-test": "DesignSystem-MetricInput--upIcon"
|
|
4817
4936
|
}), /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
4937
|
+
tabIndex: -1,
|
|
4818
4938
|
className: getArrowClass('down'),
|
|
4819
4939
|
size: iconSize,
|
|
4820
4940
|
name: "keyboard_arrow_down",
|
|
@@ -5302,14 +5422,14 @@
|
|
|
5302
5422
|
switch (eventType) {
|
|
5303
5423
|
case 'edit':
|
|
5304
5424
|
setEditing(true);
|
|
5425
|
+
break;
|
|
5305
5426
|
|
|
5306
5427
|
case 'hover':
|
|
5307
5428
|
setShowComponent(true);
|
|
5308
|
-
|
|
5429
|
+
break;
|
|
5309
5430
|
|
|
5310
5431
|
case 'default':
|
|
5311
5432
|
setShowComponent(false);
|
|
5312
|
-
return;
|
|
5313
5433
|
}
|
|
5314
5434
|
};
|
|
5315
5435
|
|
|
@@ -6598,8 +6718,10 @@
|
|
|
6598
6718
|
var SwitchWrapper = classNames__default["default"]((_b = {}, _b['Switch-wrapper'] = true, _b['Switch-wrapper--disabled'] = disabled, _b["Switch-wrapper--" + size] = size, _b['Switch-wrapper--checked'] = checked, _b['Switch-wrapper--checkedDisabled'] = checked && disabled, _b));
|
|
6599
6719
|
|
|
6600
6720
|
var onChangeHandler = function onChangeHandler(event) {
|
|
6601
|
-
if (
|
|
6602
|
-
|
|
6721
|
+
if (event.type == 'change' || isSpaceKey(event)) {
|
|
6722
|
+
if (checkedProp === undefined) setChecked(!checked);
|
|
6723
|
+
if (onChange) onChange(event, !checked);
|
|
6724
|
+
}
|
|
6603
6725
|
};
|
|
6604
6726
|
|
|
6605
6727
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -6613,7 +6735,8 @@
|
|
|
6613
6735
|
ref: ref,
|
|
6614
6736
|
name: name,
|
|
6615
6737
|
value: value,
|
|
6616
|
-
className: "Switch-input"
|
|
6738
|
+
className: "Switch-input",
|
|
6739
|
+
onKeyUp: onChangeHandler
|
|
6617
6740
|
})), /*#__PURE__*/React__namespace.createElement("span", {
|
|
6618
6741
|
className: SwitchWrapper
|
|
6619
6742
|
}));
|
|
@@ -8908,15 +9031,23 @@
|
|
|
8908
9031
|
|
|
8909
9032
|
switch (eventType) {
|
|
8910
9033
|
case 'edit':
|
|
8911
|
-
|
|
8912
|
-
|
|
9034
|
+
{
|
|
9035
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
9036
|
+
setEditing(true);
|
|
9037
|
+
setShowComponent(true);
|
|
9038
|
+
break;
|
|
9039
|
+
}
|
|
8913
9040
|
|
|
8914
9041
|
case 'hover':
|
|
8915
|
-
|
|
8916
|
-
|
|
9042
|
+
{
|
|
9043
|
+
setShowComponent(true);
|
|
9044
|
+
break;
|
|
9045
|
+
}
|
|
8917
9046
|
|
|
8918
9047
|
case 'default':
|
|
8919
|
-
|
|
9048
|
+
{
|
|
9049
|
+
setShowComponent(false);
|
|
9050
|
+
}
|
|
8920
9051
|
}
|
|
8921
9052
|
};
|
|
8922
9053
|
|
|
@@ -9066,14 +9197,21 @@
|
|
|
9066
9197
|
var onChangeHandler = function onChangeHandler(eventType) {
|
|
9067
9198
|
switch (eventType) {
|
|
9068
9199
|
case 'edit':
|
|
9069
|
-
|
|
9200
|
+
{
|
|
9201
|
+
setShowComponent(true);
|
|
9202
|
+
break;
|
|
9203
|
+
}
|
|
9070
9204
|
|
|
9071
9205
|
case 'hover':
|
|
9072
|
-
|
|
9206
|
+
{
|
|
9207
|
+
break;
|
|
9208
|
+
}
|
|
9073
9209
|
|
|
9074
9210
|
case 'default':
|
|
9075
|
-
|
|
9076
|
-
|
|
9211
|
+
{
|
|
9212
|
+
setShowComponent(false);
|
|
9213
|
+
break;
|
|
9214
|
+
}
|
|
9077
9215
|
}
|
|
9078
9216
|
};
|
|
9079
9217
|
|
|
@@ -12380,10 +12518,10 @@
|
|
|
12380
12518
|
length = _this$props2.length,
|
|
12381
12519
|
buffer = _this$props2.buffer;
|
|
12382
12520
|
_this$props2.offset;
|
|
12383
|
-
_this$props2.
|
|
12521
|
+
_this$props2.renderItems;
|
|
12384
12522
|
_this$props2.minItemHeight;
|
|
12385
12523
|
var forwardRef = _this$props2.forwardRef,
|
|
12386
|
-
rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "
|
|
12524
|
+
rest = _objectWithoutProperties(_this$props2, ["totalLength", "length", "buffer", "offset", "renderItems", "minItemHeight", "forwardRef"]);
|
|
12387
12525
|
|
|
12388
12526
|
var _this$state = this.state,
|
|
12389
12527
|
init = _this$state.init,
|
|
@@ -12427,6 +12565,7 @@
|
|
|
12427
12565
|
|
|
12428
12566
|
var index = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
12429
12567
|
return /*#__PURE__*/React__namespace.createElement(VirtualScroll, _extends({
|
|
12568
|
+
key: props.totalLength,
|
|
12430
12569
|
forwardRef: ref
|
|
12431
12570
|
}, props));
|
|
12432
12571
|
});
|
|
@@ -13778,6 +13917,7 @@
|
|
|
13778
13917
|
}, headerAttr), headerChildren)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
13779
13918
|
className: "Table-grid"
|
|
13780
13919
|
}, /*#__PURE__*/React__namespace.createElement(Grid, __assign({}, this.state, {
|
|
13920
|
+
key: this.state.searchTerm,
|
|
13781
13921
|
updateData: this.updateData,
|
|
13782
13922
|
updateSchema: this.updateSchema,
|
|
13783
13923
|
updateSortingList: this.updateSortingList,
|
|
@@ -14332,54 +14472,62 @@
|
|
|
14332
14472
|
|
|
14333
14473
|
switch (e.key) {
|
|
14334
14474
|
case KEY_CODE.backspace:
|
|
14335
|
-
|
|
14475
|
+
{
|
|
14476
|
+
e.preventDefault();
|
|
14336
14477
|
|
|
14337
|
-
|
|
14478
|
+
var vals = __spreadArrays(values);
|
|
14338
14479
|
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
|
|
14480
|
+
if (values[index]) {
|
|
14481
|
+
vals[index] = '';
|
|
14482
|
+
setValues(vals);
|
|
14483
|
+
} else if (prev && prev.current) {
|
|
14484
|
+
vals[prevIndex] = '';
|
|
14485
|
+
prev.current.focus({
|
|
14486
|
+
preventScroll: true
|
|
14487
|
+
});
|
|
14488
|
+
setValues(vals);
|
|
14489
|
+
}
|
|
14349
14490
|
|
|
14350
|
-
|
|
14491
|
+
break;
|
|
14492
|
+
}
|
|
14351
14493
|
|
|
14352
14494
|
case KEY_CODE.left:
|
|
14353
|
-
|
|
14495
|
+
{
|
|
14496
|
+
e.preventDefault();
|
|
14354
14497
|
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
|
|
14359
|
-
|
|
14498
|
+
if (prev && prev.current) {
|
|
14499
|
+
prev.current.focus({
|
|
14500
|
+
preventScroll: true
|
|
14501
|
+
});
|
|
14502
|
+
}
|
|
14360
14503
|
|
|
14361
|
-
|
|
14504
|
+
break;
|
|
14505
|
+
}
|
|
14362
14506
|
|
|
14363
14507
|
case KEY_CODE.right:
|
|
14364
|
-
|
|
14508
|
+
{
|
|
14509
|
+
e.preventDefault();
|
|
14365
14510
|
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14511
|
+
if (nextRef && nextRef.current) {
|
|
14512
|
+
nextRef.current.focus({
|
|
14513
|
+
preventScroll: true
|
|
14514
|
+
});
|
|
14515
|
+
}
|
|
14371
14516
|
|
|
14372
|
-
|
|
14517
|
+
break;
|
|
14518
|
+
}
|
|
14373
14519
|
|
|
14374
14520
|
case KEY_CODE.up:
|
|
14375
14521
|
case KEY_CODE.down:
|
|
14376
14522
|
case KEY_CODE.e:
|
|
14377
14523
|
case KEY_CODE.E:
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14524
|
+
{
|
|
14525
|
+
if (type === 'number') {
|
|
14526
|
+
e.preventDefault();
|
|
14527
|
+
}
|
|
14381
14528
|
|
|
14382
|
-
|
|
14529
|
+
break;
|
|
14530
|
+
}
|
|
14383
14531
|
}
|
|
14384
14532
|
};
|
|
14385
14533
|
|
|
@@ -14438,10 +14586,10 @@
|
|
|
14438
14586
|
name: IconMapping[appearance],
|
|
14439
14587
|
appearance: appearance,
|
|
14440
14588
|
className: IconClass
|
|
14441
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
14589
|
+
}), /*#__PURE__*/React__namespace.createElement(Text, {
|
|
14442
14590
|
"data-test": "DesignSystem-InlineMessage--Description",
|
|
14443
14591
|
className: DescriptionClass
|
|
14444
|
-
}, description))
|
|
14592
|
+
}, description));
|
|
14445
14593
|
};
|
|
14446
14594
|
InlineMessage.displayName = 'InlineMessage';
|
|
14447
14595
|
InlineMessage.defaultProps = {
|
|
@@ -14552,7 +14700,7 @@
|
|
|
14552
14700
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("fieldset", {
|
|
14553
14701
|
className: ChoiceListClass,
|
|
14554
14702
|
"data-test": "DesignSystem-ChoiceList-Wrapper"
|
|
14555
|
-
}, title && title.trim() && /*#__PURE__*/React__namespace.createElement(Label, null, title.trim()),
|
|
14703
|
+
}, title && title.trim() && /*#__PURE__*/React__namespace.createElement(Label, null, title.trim()), allowMultiple ? /*#__PURE__*/React__namespace.createElement("div", {
|
|
14556
14704
|
className: "" + (alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
|
|
14557
14705
|
}, renderCheckbox(choices, handleOnChange, disabled, size, alignment, selected)) : /*#__PURE__*/React__namespace.createElement("div", {
|
|
14558
14706
|
className: "" + (alignment === 'horizontal' ? ChoiceHorizontalClass : ChoiceListVerticalClass)
|
|
@@ -14566,7 +14714,27 @@
|
|
|
14566
14714
|
disabled: false
|
|
14567
14715
|
};
|
|
14568
14716
|
|
|
14569
|
-
var
|
|
14717
|
+
var Divider = function Divider(props) {
|
|
14718
|
+
var _a;
|
|
14719
|
+
|
|
14720
|
+
var vertical = props.vertical,
|
|
14721
|
+
appearance = props.appearance,
|
|
14722
|
+
className = props.className;
|
|
14723
|
+
var baseProps = extractBaseProps(props);
|
|
14724
|
+
var DividerClass = classNames__default["default"]((_a = {}, _a['Divider'] = true, _a['Divider--horizontal'] = !vertical, _a['Divider--vertical'] = vertical, _a['Divider--basic'] = appearance !== 'header', _a['Divider--header'] = !vertical && appearance === 'header', _a), className);
|
|
14725
|
+
return /*#__PURE__*/React__namespace.createElement("hr", __assign({
|
|
14726
|
+
"data-test": "DesignSystem-Divider"
|
|
14727
|
+
}, baseProps, {
|
|
14728
|
+
className: DividerClass
|
|
14729
|
+
}));
|
|
14730
|
+
};
|
|
14731
|
+
Divider.displayName = 'Divider';
|
|
14732
|
+
Divider.defaultProps = {
|
|
14733
|
+
appearance: 'basic',
|
|
14734
|
+
vertical: false
|
|
14735
|
+
};
|
|
14736
|
+
|
|
14737
|
+
var version = "2.6.0";
|
|
14570
14738
|
|
|
14571
14739
|
exports.Avatar = Avatar;
|
|
14572
14740
|
exports.AvatarGroup = AvatarGroup;
|
|
@@ -14592,6 +14760,7 @@
|
|
|
14592
14760
|
exports.DatePicker = DatePicker;
|
|
14593
14761
|
exports.DateRangePicker = DateRangePicker;
|
|
14594
14762
|
exports.Dialog = Dialog;
|
|
14763
|
+
exports.Divider = Divider;
|
|
14595
14764
|
exports.Dropdown = Dropdown;
|
|
14596
14765
|
exports.Dropzone = Dropzone;
|
|
14597
14766
|
exports.EditableChipInput = EditableChipInput;
|