@innovaccer/design-system 2.5.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.
- package/.eslintrc.json +54 -0
- package/.github/workflows/chromatic.yml +5 -0
- package/.github/workflows/main.yml +2 -2
- package/.github/workflows/pull_request.yml +2 -2
- package/.github/workflows/test.yml +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierrc +2 -2
- package/.storybook/main.js +4 -0
- package/.vscode/settings.json +11 -0
- package/CHANGELOG.md +78 -0
- package/CONTRIBUTING.md +180 -98
- 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 +33 -0
- package/core/common.type.tsx +22 -0
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +17 -9
- package/core/components/atoms/_chip/index.tsx +19 -3
- package/core/components/atoms/avatar/Avatar.tsx +4 -14
- package/core/components/atoms/avatar/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/avatar/__tests__/Avatar.test.tsx +14 -9
- package/core/components/atoms/avatarGroup/AvatarGroup.tsx +3 -5
- package/core/components/atoms/badge/Badge.tsx +2 -12
- package/core/components/atoms/badge/__tests__/Badge.test.tsx +22 -7
- package/core/components/atoms/badge/_stories_/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/badge/_stories_/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/button/Button.tsx +10 -7
- 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 +12 -2
- package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +6 -2
- package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +6 -2
- 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 +6 -2
- package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +6 -2
- 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/Transparent.story.tsx +13 -17
- package/core/components/atoms/button/__tests__/Button.test.tsx +1 -1
- package/core/components/atoms/button/__tests__/__snapshots__/Button.test.tsx.snap +0 -137
- package/core/components/atoms/card/__stories__/empty.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/nested.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/scroll.story.tsx +1 -1
- package/core/components/atoms/checkbox/Checkbox.tsx +8 -9
- package/core/components/atoms/checkbox/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/chip/Chip.tsx +3 -2
- package/core/components/atoms/chip/__stories__/variants/Selection.story.tsx +17 -0
- package/core/components/atoms/chip/__stories__/variants/Type.story.tsx +2 -2
- package/core/components/atoms/chip/__tests__/Chip.test.tsx +7 -0
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +11 -5
- package/core/components/atoms/chipGroup/__tests__/chipGroup.test.tsx +2 -2
- package/core/components/atoms/chipGroup/_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/Dropdown.tsx +18 -17
- package/core/components/atoms/dropdown/DropdownButton.tsx +2 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +18 -7
- package/core/components/atoms/dropdown/Loading.tsx +1 -1
- package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.tsx +45 -0
- package/core/components/atoms/dropdown/__stories__/_common_/types.tsx +3 -0
- package/core/components/atoms/dropdown/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +28 -18
- package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +12 -1
- package/core/components/atoms/dropdown/__tests__/Loading.test.tsx +0 -1
- 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/dropdown/option/index.tsx +1 -1
- package/core/components/atoms/editable/Editable.tsx +3 -0
- package/core/components/atoms/heading/Heading.tsx +4 -4
- package/core/components/atoms/heading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/heading/__tests__/Heading.test.tsx +4 -3
- package/core/components/atoms/icon/Icon.tsx +16 -5
- 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 +17 -7
- package/core/components/atoms/input/__stories__/BasicInput.story.tsx +2 -1
- package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +91 -9
- package/core/components/atoms/input/__stories__/InputWithLabel.story.tsx +11 -3
- package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +46 -4
- package/core/components/atoms/input/__stories__/RequiredVsOptional.story.tsx +12 -8
- package/core/components/atoms/input/__stories__/variants/controlledInput.story.tsx +46 -0
- package/core/components/atoms/input/__stories__/variants/types/BasicInput.story.tsx +2 -2
- package/core/components/atoms/input/__stories__/variants/types/IconLeft.story.tsx +2 -10
- package/core/components/atoms/input/__stories__/variants/types/WithLabel.story.tsx +1 -9
- package/core/components/atoms/input/__tests__/__snapshots__/Input.test.tsx.snap +19 -0
- package/core/components/atoms/label/Label.tsx +1 -1
- package/core/components/atoms/legend/Legend.tsx +5 -2
- package/core/components/atoms/legend/__stories__/variants/labelAppearance.story.tsx +2 -2
- package/core/components/atoms/link/Link.tsx +4 -4
- package/core/components/atoms/message/Message.tsx +12 -12
- package/core/components/atoms/message/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/Appearance.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/AppearanceTitle.story.tsx +1 -1
- package/core/components/atoms/message/__tests__/Message.test.tsx +1 -6
- package/core/components/atoms/message/__tests__/__snapshots__/Message.test.tsx.snap +0 -45
- package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +2 -2
- package/core/components/atoms/metricInput/MetricInput.tsx +17 -7
- 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/SliderUtils.tsx +1 -4
- package/core/components/atoms/multiSlider/index.tsx +9 -4
- package/core/components/atoms/outsideClick/OutsideClick.tsx +1 -2
- package/core/components/atoms/paragraph/Paragraph.tsx +2 -2
- package/core/components/atoms/paragraph/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/paragraph/__tests__/Paragraph.test.tsx +2 -2
- package/core/components/atoms/pills/Pills.tsx +2 -12
- package/core/components/atoms/pills/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/pills/__stories__/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/pills/__tests__/Pills.test.tsx +3 -2
- package/core/components/atoms/placeholderImage/PlaceholderImage.tsx +2 -2
- package/core/components/atoms/placeholderImage/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/PlaceholderParagraph.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/popperWrapper/PopperWrapper.tsx +2 -6
- package/core/components/atoms/progressRing/ProgressRing.tsx +2 -2
- package/core/components/atoms/progressRing/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/radio/Radio.tsx +4 -5
- package/core/components/atoms/rangeSlider/RangeSlider.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/index.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/Controlled.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/CustomLabels.story.tsx +1 -2
- package/core/components/atoms/spinner/Spinner.tsx +4 -4
- package/core/components/atoms/spinner/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/spinner/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/statusHint/StatusHint.tsx +5 -3
- package/core/components/atoms/statusHint/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/statusHint/__tests__/StatusHint.test.tsx +3 -2
- package/core/components/atoms/subheading/Subheading.tsx +2 -2
- package/core/components/atoms/subheading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/subheading/__tests__/Subheading.test.tsx +3 -2
- package/core/components/atoms/switchInput/Switch.tsx +14 -9
- 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/text/Text.tsx +4 -4
- package/core/components/atoms/text/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/text/__tests__/Text.test.tsx +2 -3
- 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/ActionButton.tsx +2 -2
- package/core/components/atoms/toast/Toast.tsx +11 -6
- package/core/components/atoms/toast/__stories__/index.story.tsx +2 -6
- package/core/components/atoms/toast/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastMessage.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastWithAction.story.tsx +3 -2
- package/core/components/atoms/toast/__tests__/Toast.test.tsx +1 -1
- package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +24 -125
- package/core/components/css-utilities/Schema.tsx +1 -1
- package/core/components/css-utilities/Spacing/Schema.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 +14 -2
- package/core/components/molecules/dropzone/Dropzone.tsx +6 -3
- package/core/components/molecules/dropzone/DropzoneBase.tsx +22 -38
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +1 -1
- package/core/components/molecules/dropzone/__stories__/index.story.tsx +151 -41
- package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +2 -2
- package/core/components/molecules/dropzone/utils.tsx +6 -4
- 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 +12 -4
- 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 +9 -5
- package/core/components/molecules/emptyState/__stories__/pageNotLoadedWithSVG.story.tsx +26 -26
- package/core/components/molecules/fileList/FileListItem.tsx +3 -2
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +3 -2
- package/core/components/molecules/fileUploader/FileUploaderStatus.tsx +1 -1
- package/core/components/molecules/fileUploader/__stories__/_common_/types.tsx +3 -0
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +3 -222
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +5 -7
- package/core/components/molecules/inputMask/InputMask.tsx +212 -146
- package/core/components/molecules/inputMask/__stories__/index.story.tsx +24 -0
- package/core/components/molecules/inputMask/__tests__/__snapshots__/InputMask.test.tsx.snap +1 -0
- package/core/components/molecules/modal/Modal.tsx +4 -6
- package/core/components/molecules/modal/__stories__/Confirmation.story.tsx +1 -1
- package/core/components/molecules/pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +5 -1
- package/core/components/molecules/placeholder/Placeholder.tsx +2 -2
- package/core/components/molecules/popover/Popover.tsx +2 -9
- package/core/components/molecules/sidesheet/Sidesheet.tsx +5 -7
- package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.tsx +172 -0
- 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/tooltip/Tooltip.tsx +4 -4
- 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/__stories__/variants/firstDayOfWeek.story.tsx +2 -2
- package/core/components/organisms/calendar/__tests__/Calendar.test.tsx +27 -0
- package/core/components/organisms/calendar/utility.ts +3 -3
- package/core/components/organisms/choiceList/ChoiceList.tsx +12 -12
- package/core/components/organisms/datePicker/DatePicker.tsx +31 -16
- package/core/components/organisms/datePicker/Trigger.tsx +1 -5
- package/core/components/organisms/datePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap +4518 -4479
- package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +9 -10
- package/core/components/organisms/dateRangePicker/SingleInputTrigger.tsx +0 -1
- package/core/components/organisms/dateRangePicker/Trigger.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__stories__/variants/monthsInView.story.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +112 -40
- package/core/components/organisms/grid/Cell.tsx +23 -19
- package/core/components/organisms/grid/Grid.tsx +3 -4
- package/core/components/organisms/grid/GridBody.tsx +0 -1
- package/core/components/organisms/grid/GridContext.ts +1 -1
- package/core/components/organisms/grid/GridRow.tsx +4 -0
- package/core/components/organisms/grid/__stories__/_common_/editableSchema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +3 -3
- package/core/components/organisms/grid/__stories__/_common_/loaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/schema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/simpleLoaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/statusSchema.ts +0 -2
- package/core/components/organisms/horizontalNav/HorizontalNav.tsx +2 -0
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +5 -7
- package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +3 -2
- package/core/components/organisms/inlineMessage/__tests__/__snapshots__/InlineMessage.test.tsx.snap +30 -40
- package/core/components/organisms/list/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/list/__stories__/index.story.tsx +0 -16
- package/core/components/organisms/navigation/VerticalNavigation.tsx +4 -0
- package/core/components/organisms/table/Table.tsx +3 -2
- package/core/components/organisms/table/__stories__/CompressedTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/DataTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/PinnedColumn.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +4 -3
- package/core/components/organisms/table/__stories__/Selection.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/StandardTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/TightStory.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/table/__stories__/syncTable.story.tsx +14 -6
- package/core/components/organisms/table/__stories__/variants/showHead.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/showMenu.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/size.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/type.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withCheckbox.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withHeader.story.tsx +0 -2
- package/core/components/organisms/table/__stories__/variants/withPagination.story.tsx +2 -2
- package/core/components/organisms/timePicker/TimePicker.tsx +4 -8
- 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/organisms/verticalNav/__stories__/schema.tsx +0 -2
- package/core/components/organisms/verticalNav/__tests__/VerticalNav.test.tsx +1 -2
- 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/global.d.ts +9 -0
- package/core/index.tsx +2 -1
- package/core/index.type.tsx +1 -0
- package/core/utils/Keys.ts +4 -0
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +562 -541
- package/core/utils/docPage/generateImports.tsx +2 -3
- package/core/utils/docPage/index.tsx +52 -37
- package/core/utils/docPage/sandbox.tsx +14 -7
- package/core/utils/overlayHelper.ts +7 -3
- package/core/utils/testHelper.ts +2 -2
- package/core/utils/types.tsx +1 -1
- package/core/utils/validators.ts +37 -34
- package/css/dist/index.css +1550 -1415
- 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 +95 -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 +20 -17
- 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/fullscreenModal.css +4 -3
- 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 +64 -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 +66 -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 +51 -56
- 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 +6 -3
- 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 +18 -0
- package/dist/core/common.type.d.ts +12 -0
- package/dist/core/components/atoms/avatar/Avatar.d.ts +4 -4
- package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -3
- package/dist/core/components/atoms/badge/Badge.d.ts +2 -2
- package/dist/core/components/atoms/button/Button.d.ts +6 -6
- package/dist/core/components/atoms/checkbox/Checkbox.d.ts +3 -3
- package/dist/core/components/atoms/chip/Chip.d.ts +2 -2
- 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/dropdown/Dropdown.d.ts +18 -17
- package/dist/core/components/atoms/dropdown/DropdownButton.d.ts +2 -2
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +4 -3
- package/dist/core/components/atoms/dropdown/option/index.d.ts +1 -1
- package/dist/core/components/atoms/heading/Heading.d.ts +4 -4
- package/dist/core/components/atoms/icon/Icon.d.ts +5 -3
- package/dist/core/components/atoms/input/Input.d.ts +4 -4
- package/dist/core/components/atoms/legend/Legend.d.ts +2 -2
- package/dist/core/components/atoms/link/Link.d.ts +4 -4
- package/dist/core/components/atoms/message/Message.d.ts +2 -2
- package/dist/core/components/atoms/metricInput/MetricInput.d.ts +3 -3
- package/dist/core/components/atoms/multiSlider/SliderUtils.d.ts +1 -1
- package/dist/core/components/atoms/multiSlider/index.d.ts +3 -3
- package/dist/core/components/atoms/paragraph/Paragraph.d.ts +2 -2
- package/dist/core/components/atoms/pills/Pills.d.ts +2 -2
- package/dist/core/components/atoms/placeholderImage/PlaceholderImage.d.ts +2 -2
- package/dist/core/components/atoms/placeholderParagraph/PlaceholderParagraph.d.ts +2 -2
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +51 -51
- package/dist/core/components/atoms/progressRing/ProgressRing.d.ts +2 -2
- package/dist/core/components/atoms/radio/Radio.d.ts +4 -4
- package/dist/core/components/atoms/rangeSlider/RangeSlider.d.ts +1 -1
- package/dist/core/components/atoms/spinner/Spinner.d.ts +4 -4
- package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -2
- package/dist/core/components/atoms/subheading/Subheading.d.ts +2 -2
- package/dist/core/components/atoms/switchInput/Switch.d.ts +7 -6
- package/dist/core/components/atoms/text/Text.d.ts +4 -4
- package/dist/core/components/atoms/toast/ActionButton.d.ts +2 -2
- package/dist/core/components/atoms/toast/Toast.d.ts +2 -2
- package/dist/core/components/molecules/dropzone/Dropzone.d.ts +3 -3
- package/dist/core/components/molecules/dropzone/DropzoneBase.d.ts +1 -1
- package/dist/core/components/molecules/dropzone/utils.d.ts +5 -3
- package/dist/core/components/molecules/emptyState/EmptyState.d.ts +4 -4
- package/dist/core/components/molecules/fileList/FileListItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderStatus.d.ts +1 -1
- package/dist/core/components/molecules/fullscreenModal/FullscreenModal.d.ts +4 -7
- package/dist/core/components/molecules/inputMask/InputMask.d.ts +10 -2
- package/dist/core/components/molecules/modal/Modal.d.ts +3 -6
- package/dist/core/components/molecules/placeholder/Placeholder.d.ts +2 -2
- package/dist/core/components/molecules/popover/Popover.d.ts +0 -1
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +3 -6
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +3 -3
- package/dist/core/components/organisms/calendar/Calendar.d.ts +31 -0
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +5 -6
- package/dist/core/components/organisms/datePicker/DatePicker.d.ts +2 -0
- package/dist/core/components/organisms/dateRangePicker/DateRangePicker.d.ts +24 -0
- package/dist/core/components/organisms/grid/Cell.d.ts +1 -1
- package/dist/core/components/organisms/grid/Grid.d.ts +3 -3
- package/dist/core/components/organisms/grid/GridContext.d.ts +1 -1
- package/dist/core/components/organisms/inlineMessage/InlineMessage.d.ts +2 -2
- package/dist/core/components/organisms/table/Table.d.ts +2 -2
- package/dist/core/components/patterns/datePicker/datePickerWithPresets.story.d.ts +15 -0
- package/dist/core/components/patterns/dateRangePicker/withCustomPopover.story.d.ts +5 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.type.d.ts +1 -0
- package/dist/core/utils/docPage/generateImports.d.ts +1 -1
- package/dist/core/utils/overlayHelper.d.ts +1 -1
- package/dist/core/utils/types.d.ts +1 -1
- package/dist/index.esm.js +1039 -729
- package/dist/index.js +532 -371
- 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/dts.config.js +11 -2
- package/package.json +32 -27
- package/tsconfig.json +3 -16
- package/tsconfig.type.json +2 -1
- package/types/index.d.ts +2217 -0
- package/types/{innovaccer-design-system/tsconfig.json → tsconfig.json} +1 -1
- package/types/{innovaccer-design-system/tslint.json → tslint.json} +0 -0
- package/types/types-tests.tsx +936 -0
- package/.husky/prepare-commit-msg +0 -6
- package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +0 -99
- package/core/components/atoms/message/__stories__/default.story.tsx +0 -16
- package/core/components/atoms/toast/__stories__/DefaultToast.story.tsx +0 -16
- package/core/components/molecules/dropzone/__stories__/variants/DropzoneWithFileList.story.tsx +0 -176
- package/core/components/molecules/fileUploader/__stories__/variants/FileUploaderList.story.tsx +0 -80
- package/tslint.json +0 -30
- package/types/innovaccer-design-system/index.d.ts +0 -39
- package/types/innovaccer-design-system/innovaccer-design-system-tests.ts +0 -0
|
@@ -7,7 +7,9 @@ exports[`Icon component
|
|
|
7
7
|
<div>
|
|
8
8
|
<i
|
|
9
9
|
class="material-icons material-icons-round Icon Icon--accent1"
|
|
10
|
+
role="button"
|
|
10
11
|
style="font-size: 50px; width: 50px;"
|
|
12
|
+
tabindex="0"
|
|
11
13
|
>
|
|
12
14
|
events_round
|
|
13
15
|
</i>
|
|
@@ -22,7 +24,9 @@ exports[`Icon component
|
|
|
22
24
|
<div>
|
|
23
25
|
<i
|
|
24
26
|
class="material-icons material-icons-round Icon Icon--accent1Dark"
|
|
27
|
+
role="button"
|
|
25
28
|
style="font-size: 50px; width: 50px;"
|
|
29
|
+
tabindex="0"
|
|
26
30
|
>
|
|
27
31
|
events_round
|
|
28
32
|
</i>
|
|
@@ -37,7 +41,9 @@ exports[`Icon component
|
|
|
37
41
|
<div>
|
|
38
42
|
<i
|
|
39
43
|
class="material-icons material-icons-round Icon Icon--accent1Lighter"
|
|
44
|
+
role="button"
|
|
40
45
|
style="font-size: 50px; width: 50px;"
|
|
46
|
+
tabindex="0"
|
|
41
47
|
>
|
|
42
48
|
events_round
|
|
43
49
|
</i>
|
|
@@ -52,7 +58,9 @@ exports[`Icon component
|
|
|
52
58
|
<div>
|
|
53
59
|
<i
|
|
54
60
|
class="material-icons material-icons-round Icon Icon--accent2"
|
|
61
|
+
role="button"
|
|
55
62
|
style="font-size: 50px; width: 50px;"
|
|
63
|
+
tabindex="0"
|
|
56
64
|
>
|
|
57
65
|
events_round
|
|
58
66
|
</i>
|
|
@@ -67,7 +75,9 @@ exports[`Icon component
|
|
|
67
75
|
<div>
|
|
68
76
|
<i
|
|
69
77
|
class="material-icons material-icons-round Icon Icon--accent2Dark"
|
|
78
|
+
role="button"
|
|
70
79
|
style="font-size: 50px; width: 50px;"
|
|
80
|
+
tabindex="0"
|
|
71
81
|
>
|
|
72
82
|
events_round
|
|
73
83
|
</i>
|
|
@@ -82,7 +92,9 @@ exports[`Icon component
|
|
|
82
92
|
<div>
|
|
83
93
|
<i
|
|
84
94
|
class="material-icons material-icons-round Icon Icon--accent2Lighter"
|
|
95
|
+
role="button"
|
|
85
96
|
style="font-size: 50px; width: 50px;"
|
|
97
|
+
tabindex="0"
|
|
86
98
|
>
|
|
87
99
|
events_round
|
|
88
100
|
</i>
|
|
@@ -97,7 +109,9 @@ exports[`Icon component
|
|
|
97
109
|
<div>
|
|
98
110
|
<i
|
|
99
111
|
class="material-icons material-icons-round Icon Icon--accent3"
|
|
112
|
+
role="button"
|
|
100
113
|
style="font-size: 50px; width: 50px;"
|
|
114
|
+
tabindex="0"
|
|
101
115
|
>
|
|
102
116
|
events_round
|
|
103
117
|
</i>
|
|
@@ -112,7 +126,9 @@ exports[`Icon component
|
|
|
112
126
|
<div>
|
|
113
127
|
<i
|
|
114
128
|
class="material-icons material-icons-round Icon Icon--accent3Dark"
|
|
129
|
+
role="button"
|
|
115
130
|
style="font-size: 50px; width: 50px;"
|
|
131
|
+
tabindex="0"
|
|
116
132
|
>
|
|
117
133
|
events_round
|
|
118
134
|
</i>
|
|
@@ -127,7 +143,9 @@ exports[`Icon component
|
|
|
127
143
|
<div>
|
|
128
144
|
<i
|
|
129
145
|
class="material-icons material-icons-round Icon Icon--accent3Lighter"
|
|
146
|
+
role="button"
|
|
130
147
|
style="font-size: 50px; width: 50px;"
|
|
148
|
+
tabindex="0"
|
|
131
149
|
>
|
|
132
150
|
events_round
|
|
133
151
|
</i>
|
|
@@ -142,7 +160,9 @@ exports[`Icon component
|
|
|
142
160
|
<div>
|
|
143
161
|
<i
|
|
144
162
|
class="material-icons material-icons-round Icon Icon--accent4"
|
|
163
|
+
role="button"
|
|
145
164
|
style="font-size: 50px; width: 50px;"
|
|
165
|
+
tabindex="0"
|
|
146
166
|
>
|
|
147
167
|
events_round
|
|
148
168
|
</i>
|
|
@@ -157,7 +177,9 @@ exports[`Icon component
|
|
|
157
177
|
<div>
|
|
158
178
|
<i
|
|
159
179
|
class="material-icons material-icons-round Icon Icon--accent4Dark"
|
|
180
|
+
role="button"
|
|
160
181
|
style="font-size: 50px; width: 50px;"
|
|
182
|
+
tabindex="0"
|
|
161
183
|
>
|
|
162
184
|
events_round
|
|
163
185
|
</i>
|
|
@@ -172,7 +194,9 @@ exports[`Icon component
|
|
|
172
194
|
<div>
|
|
173
195
|
<i
|
|
174
196
|
class="material-icons material-icons-round Icon Icon--accent4Lighter"
|
|
197
|
+
role="button"
|
|
175
198
|
style="font-size: 50px; width: 50px;"
|
|
199
|
+
tabindex="0"
|
|
176
200
|
>
|
|
177
201
|
events_round
|
|
178
202
|
</i>
|
|
@@ -187,7 +211,9 @@ exports[`Icon component
|
|
|
187
211
|
<div>
|
|
188
212
|
<i
|
|
189
213
|
class="material-icons material-icons-round Icon Icon--alert"
|
|
214
|
+
role="button"
|
|
190
215
|
style="font-size: 50px; width: 50px;"
|
|
216
|
+
tabindex="0"
|
|
191
217
|
>
|
|
192
218
|
events_round
|
|
193
219
|
</i>
|
|
@@ -202,7 +228,9 @@ exports[`Icon component
|
|
|
202
228
|
<div>
|
|
203
229
|
<i
|
|
204
230
|
class="material-icons material-icons-round Icon Icon--alertDark"
|
|
231
|
+
role="button"
|
|
205
232
|
style="font-size: 50px; width: 50px;"
|
|
233
|
+
tabindex="0"
|
|
206
234
|
>
|
|
207
235
|
events_round
|
|
208
236
|
</i>
|
|
@@ -217,7 +245,9 @@ exports[`Icon component
|
|
|
217
245
|
<div>
|
|
218
246
|
<i
|
|
219
247
|
class="material-icons material-icons-round Icon Icon--alertLighter"
|
|
248
|
+
role="button"
|
|
220
249
|
style="font-size: 50px; width: 50px;"
|
|
250
|
+
tabindex="0"
|
|
221
251
|
>
|
|
222
252
|
events_round
|
|
223
253
|
</i>
|
|
@@ -232,7 +262,9 @@ exports[`Icon component
|
|
|
232
262
|
<div>
|
|
233
263
|
<i
|
|
234
264
|
class="material-icons material-icons-round Icon Icon--destructive"
|
|
265
|
+
role="button"
|
|
235
266
|
style="font-size: 50px; width: 50px;"
|
|
267
|
+
tabindex="0"
|
|
236
268
|
>
|
|
237
269
|
events_round
|
|
238
270
|
</i>
|
|
@@ -247,7 +279,9 @@ exports[`Icon component
|
|
|
247
279
|
<div>
|
|
248
280
|
<i
|
|
249
281
|
class="material-icons material-icons-round Icon Icon--disabled"
|
|
282
|
+
role="button"
|
|
250
283
|
style="font-size: 50px; width: 50px;"
|
|
284
|
+
tabindex="0"
|
|
251
285
|
>
|
|
252
286
|
events_round
|
|
253
287
|
</i>
|
|
@@ -262,7 +296,9 @@ exports[`Icon component
|
|
|
262
296
|
<div>
|
|
263
297
|
<i
|
|
264
298
|
class="material-icons material-icons-round Icon Icon--info"
|
|
299
|
+
role="button"
|
|
265
300
|
style="font-size: 50px; width: 50px;"
|
|
301
|
+
tabindex="0"
|
|
266
302
|
>
|
|
267
303
|
events_round
|
|
268
304
|
</i>
|
|
@@ -277,7 +313,9 @@ exports[`Icon component
|
|
|
277
313
|
<div>
|
|
278
314
|
<i
|
|
279
315
|
class="material-icons material-icons-round Icon Icon--inverse"
|
|
316
|
+
role="button"
|
|
280
317
|
style="font-size: 50px; width: 50px;"
|
|
318
|
+
tabindex="0"
|
|
281
319
|
>
|
|
282
320
|
events_round
|
|
283
321
|
</i>
|
|
@@ -292,7 +330,9 @@ exports[`Icon component
|
|
|
292
330
|
<div>
|
|
293
331
|
<i
|
|
294
332
|
class="material-icons material-icons-round Icon Icon--primary"
|
|
333
|
+
role="button"
|
|
295
334
|
style="font-size: 50px; width: 50px;"
|
|
335
|
+
tabindex="0"
|
|
296
336
|
>
|
|
297
337
|
events_round
|
|
298
338
|
</i>
|
|
@@ -307,7 +347,9 @@ exports[`Icon component
|
|
|
307
347
|
<div>
|
|
308
348
|
<i
|
|
309
349
|
class="material-icons material-icons-round Icon Icon--primaryDark"
|
|
350
|
+
role="button"
|
|
310
351
|
style="font-size: 50px; width: 50px;"
|
|
352
|
+
tabindex="0"
|
|
311
353
|
>
|
|
312
354
|
events_round
|
|
313
355
|
</i>
|
|
@@ -322,7 +364,9 @@ exports[`Icon component
|
|
|
322
364
|
<div>
|
|
323
365
|
<i
|
|
324
366
|
class="material-icons material-icons-round Icon Icon--primaryLighter"
|
|
367
|
+
role="button"
|
|
325
368
|
style="font-size: 50px; width: 50px;"
|
|
369
|
+
tabindex="0"
|
|
326
370
|
>
|
|
327
371
|
events_round
|
|
328
372
|
</i>
|
|
@@ -337,7 +381,9 @@ exports[`Icon component
|
|
|
337
381
|
<div>
|
|
338
382
|
<i
|
|
339
383
|
class="material-icons material-icons-round Icon Icon--subtle"
|
|
384
|
+
role="button"
|
|
340
385
|
style="font-size: 50px; width: 50px;"
|
|
386
|
+
tabindex="0"
|
|
341
387
|
>
|
|
342
388
|
events_round
|
|
343
389
|
</i>
|
|
@@ -352,7 +398,9 @@ exports[`Icon component
|
|
|
352
398
|
<div>
|
|
353
399
|
<i
|
|
354
400
|
class="material-icons material-icons-round Icon Icon--success"
|
|
401
|
+
role="button"
|
|
355
402
|
style="font-size: 50px; width: 50px;"
|
|
403
|
+
tabindex="0"
|
|
356
404
|
>
|
|
357
405
|
events_round
|
|
358
406
|
</i>
|
|
@@ -367,7 +415,9 @@ exports[`Icon component
|
|
|
367
415
|
<div>
|
|
368
416
|
<i
|
|
369
417
|
class="material-icons material-icons-round Icon Icon--successDark"
|
|
418
|
+
role="button"
|
|
370
419
|
style="font-size: 50px; width: 50px;"
|
|
420
|
+
tabindex="0"
|
|
371
421
|
>
|
|
372
422
|
events_round
|
|
373
423
|
</i>
|
|
@@ -382,7 +432,9 @@ exports[`Icon component
|
|
|
382
432
|
<div>
|
|
383
433
|
<i
|
|
384
434
|
class="material-icons material-icons-round Icon Icon--successLighter"
|
|
435
|
+
role="button"
|
|
385
436
|
style="font-size: 50px; width: 50px;"
|
|
437
|
+
tabindex="0"
|
|
386
438
|
>
|
|
387
439
|
events_round
|
|
388
440
|
</i>
|
|
@@ -397,7 +449,9 @@ exports[`Icon component
|
|
|
397
449
|
<div>
|
|
398
450
|
<i
|
|
399
451
|
class="material-icons material-icons-round Icon Icon--warning"
|
|
452
|
+
role="button"
|
|
400
453
|
style="font-size: 50px; width: 50px;"
|
|
454
|
+
tabindex="0"
|
|
401
455
|
>
|
|
402
456
|
events_round
|
|
403
457
|
</i>
|
|
@@ -412,7 +466,9 @@ exports[`Icon component
|
|
|
412
466
|
<div>
|
|
413
467
|
<i
|
|
414
468
|
class="material-icons material-icons-round Icon Icon--warningDark"
|
|
469
|
+
role="button"
|
|
415
470
|
style="font-size: 50px; width: 50px;"
|
|
471
|
+
tabindex="0"
|
|
416
472
|
>
|
|
417
473
|
events_round
|
|
418
474
|
</i>
|
|
@@ -427,7 +483,9 @@ exports[`Icon component
|
|
|
427
483
|
<div>
|
|
428
484
|
<i
|
|
429
485
|
class="material-icons material-icons-round Icon Icon--warningLighter"
|
|
486
|
+
role="button"
|
|
430
487
|
style="font-size: 50px; width: 50px;"
|
|
488
|
+
tabindex="0"
|
|
431
489
|
>
|
|
432
490
|
events_round
|
|
433
491
|
</i>
|
|
@@ -442,7 +500,9 @@ exports[`Icon component
|
|
|
442
500
|
<div>
|
|
443
501
|
<i
|
|
444
502
|
class="material-icons material-icons-round Icon Icon--white"
|
|
503
|
+
role="button"
|
|
445
504
|
style="font-size: 50px; width: 50px;"
|
|
505
|
+
tabindex="0"
|
|
446
506
|
>
|
|
447
507
|
events_round
|
|
448
508
|
</i>
|
|
@@ -457,7 +517,9 @@ exports[`Icon component
|
|
|
457
517
|
<div>
|
|
458
518
|
<i
|
|
459
519
|
class="material-icons Icon"
|
|
520
|
+
role="button"
|
|
460
521
|
style="font-size: 50px; width: 50px;"
|
|
522
|
+
tabindex="0"
|
|
461
523
|
>
|
|
462
524
|
events_filled
|
|
463
525
|
</i>
|
|
@@ -472,7 +534,9 @@ exports[`Icon component
|
|
|
472
534
|
<div>
|
|
473
535
|
<i
|
|
474
536
|
class="material-icons material-icons-outlined Icon"
|
|
537
|
+
role="button"
|
|
475
538
|
style="font-size: 50px; width: 50px;"
|
|
539
|
+
tabindex="0"
|
|
476
540
|
>
|
|
477
541
|
events_outlined
|
|
478
542
|
</i>
|
|
@@ -487,7 +551,9 @@ exports[`Icon component
|
|
|
487
551
|
<div>
|
|
488
552
|
<i
|
|
489
553
|
class="material-icons material-icons-outlined Icon"
|
|
554
|
+
role="button"
|
|
490
555
|
style="font-size: 50px; width: 50px;"
|
|
556
|
+
tabindex="0"
|
|
491
557
|
>
|
|
492
558
|
events_outlined
|
|
493
559
|
</i>
|
|
@@ -502,7 +568,9 @@ exports[`Icon component
|
|
|
502
568
|
<div>
|
|
503
569
|
<i
|
|
504
570
|
class="material-icons material-icons-round Icon"
|
|
571
|
+
role="button"
|
|
505
572
|
style="font-size: 50px; width: 50px;"
|
|
573
|
+
tabindex="0"
|
|
506
574
|
>
|
|
507
575
|
events_round
|
|
508
576
|
</i>
|
|
@@ -517,7 +585,9 @@ exports[`Icon component
|
|
|
517
585
|
<div>
|
|
518
586
|
<i
|
|
519
587
|
class="material-icons material-icons-round Icon"
|
|
588
|
+
role="button"
|
|
520
589
|
style="font-size: 50px; width: 50px;"
|
|
590
|
+
tabindex="0"
|
|
521
591
|
>
|
|
522
592
|
events_round
|
|
523
593
|
</i>
|
|
@@ -532,7 +602,9 @@ exports[`Icon component
|
|
|
532
602
|
<div>
|
|
533
603
|
<i
|
|
534
604
|
class="material-icons material-icons-sharp Icon"
|
|
605
|
+
role="button"
|
|
535
606
|
style="font-size: 50px; width: 50px;"
|
|
607
|
+
tabindex="0"
|
|
536
608
|
>
|
|
537
609
|
events_sharp
|
|
538
610
|
</i>
|
|
@@ -547,7 +619,9 @@ exports[`Icon component
|
|
|
547
619
|
<div>
|
|
548
620
|
<i
|
|
549
621
|
class="material-icons material-icons-two-tone Icon"
|
|
622
|
+
role="button"
|
|
550
623
|
style="font-size: 50px; width: 50px;"
|
|
624
|
+
tabindex="0"
|
|
551
625
|
>
|
|
552
626
|
events_two-tone
|
|
553
627
|
</i>
|
|
@@ -3,10 +3,10 @@ import classNames from 'classnames';
|
|
|
3
3
|
import { Tooltip, Icon, Text } from '@/index';
|
|
4
4
|
import { IconProps } from '@/index.type';
|
|
5
5
|
import { BaseHtmlProps, BaseProps, extractBaseProps } from '@/utils/types';
|
|
6
|
+
import { AutoComplete } from '@/common.type';
|
|
6
7
|
|
|
7
8
|
export type InputType = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url';
|
|
8
|
-
export type
|
|
9
|
-
export type Size = 'tiny' | 'regular' | 'large';
|
|
9
|
+
export type InputSize = 'tiny' | 'regular' | 'large';
|
|
10
10
|
|
|
11
11
|
export interface InputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
12
12
|
/**
|
|
@@ -27,14 +27,15 @@ export interface InputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
|
27
27
|
*/
|
|
28
28
|
defaultValue?: string;
|
|
29
29
|
/**
|
|
30
|
-
* Text to display when input is empty
|
|
30
|
+
* Text to display when input is empty.
|
|
31
|
+
* Incase a label is missing, a placeholder should be provided to make it accessible for all user.
|
|
31
32
|
*/
|
|
32
33
|
placeholder?: string;
|
|
33
34
|
/**
|
|
34
35
|
* Size of the `Input`
|
|
35
36
|
* @default "regular"
|
|
36
37
|
*/
|
|
37
|
-
size?:
|
|
38
|
+
size?: InputSize;
|
|
38
39
|
/**
|
|
39
40
|
* Material icon name
|
|
40
41
|
*/
|
|
@@ -105,7 +106,7 @@ export interface InputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
|
105
106
|
/**
|
|
106
107
|
* Callback function when user clicks the clear button
|
|
107
108
|
*/
|
|
108
|
-
onClear?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
109
|
+
onClear?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
109
110
|
/**
|
|
110
111
|
* Callback function when `Input` text changes
|
|
111
112
|
*/
|
|
@@ -216,6 +217,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>((props, forw
|
|
|
216
217
|
className={classes}
|
|
217
218
|
style={{ minWidth }}
|
|
218
219
|
onClick={() => ref.current?.focus()}
|
|
220
|
+
role="presentation"
|
|
219
221
|
>
|
|
220
222
|
{inlineLabel && (
|
|
221
223
|
<div className="Input-inlineLabel">
|
|
@@ -257,8 +259,16 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>((props, forw
|
|
|
257
259
|
) : (
|
|
258
260
|
onClear &&
|
|
259
261
|
(value || defaultValue) && (
|
|
260
|
-
<div className={rightIconClass}
|
|
261
|
-
<Icon
|
|
262
|
+
<div className={rightIconClass}>
|
|
263
|
+
<Icon
|
|
264
|
+
data-test="DesignSystem-Input--closeIcon"
|
|
265
|
+
onClick={(e) => {
|
|
266
|
+
ref.current?.focus({ preventScroll: true });
|
|
267
|
+
onClear(e);
|
|
268
|
+
}}
|
|
269
|
+
name={'close'}
|
|
270
|
+
size={sizeMapping[size]}
|
|
271
|
+
/>
|
|
262
272
|
</div>
|
|
263
273
|
)
|
|
264
274
|
)}
|
|
@@ -12,7 +12,7 @@ export const basicInput = () => {
|
|
|
12
12
|
setValue('');
|
|
13
13
|
}, []);
|
|
14
14
|
|
|
15
|
-
return <Input name="input" className="w-25" value={value} onChange={onChange} onClear={onClear} />;
|
|
15
|
+
return <Input placeholder="Name" name="input" className="w-25" value={value} onChange={onChange} onClear={onClear} />;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const customCode = `() => {
|
|
@@ -28,6 +28,7 @@ const customCode = `() => {
|
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
30
|
<Input
|
|
31
|
+
placeholder="Name"
|
|
31
32
|
name="input"
|
|
32
33
|
className="w-25"
|
|
33
34
|
value={value}
|
|
@@ -2,34 +2,115 @@ import * as React from 'react';
|
|
|
2
2
|
import { Input, Icon, Label, Caption } from '@/index';
|
|
3
3
|
|
|
4
4
|
export const inputWithCaption = () => {
|
|
5
|
+
const [visibility, setVisibility] = React.useState(false);
|
|
6
|
+
const [visibility2, setVisibility2] = React.useState(false);
|
|
5
7
|
return (
|
|
6
8
|
<div className="d-flex">
|
|
7
9
|
<div>
|
|
8
|
-
<Label withInput={true}>
|
|
10
|
+
<Label htmlFor="password-1" withInput={true}>
|
|
11
|
+
Password
|
|
12
|
+
</Label>
|
|
9
13
|
<Input
|
|
10
|
-
|
|
14
|
+
id="password-1"
|
|
15
|
+
placeholder="Password"
|
|
11
16
|
value="Value"
|
|
12
|
-
type=
|
|
13
|
-
actionIcon={
|
|
17
|
+
type={visibility ? 'text' : 'password'}
|
|
18
|
+
actionIcon={
|
|
19
|
+
<Icon
|
|
20
|
+
onClick={() => setVisibility((x) => !x)}
|
|
21
|
+
name={visibility ? 'visibility_on' : 'visibility_off'}
|
|
22
|
+
className="cursor-pointer"
|
|
23
|
+
/>
|
|
24
|
+
}
|
|
14
25
|
/>
|
|
15
26
|
<Caption withInput={true}>Create a string, unique password</Caption>
|
|
16
27
|
</div>
|
|
17
28
|
<div className="ml-6">
|
|
18
|
-
<Label withInput={true}>
|
|
29
|
+
<Label htmlFor="password-2" withInput={true}>
|
|
30
|
+
Password
|
|
31
|
+
</Label>
|
|
19
32
|
<Input
|
|
20
|
-
|
|
33
|
+
id="password-2"
|
|
34
|
+
placeholder="Password"
|
|
21
35
|
value="Value"
|
|
22
|
-
type=
|
|
23
|
-
actionIcon={
|
|
36
|
+
type={visibility2 ? 'text' : 'password'}
|
|
37
|
+
actionIcon={
|
|
38
|
+
<Icon
|
|
39
|
+
onClick={() => setVisibility2((x) => !x)}
|
|
40
|
+
name={visibility2 ? 'visibility_on' : 'visibility_off'}
|
|
41
|
+
className="cursor-pointer"
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
24
44
|
/>
|
|
25
45
|
<Caption withInput={true} error={true}>
|
|
26
|
-
Create a password with
|
|
46
|
+
Create a password with at least 8 characters
|
|
27
47
|
</Caption>
|
|
28
48
|
</div>
|
|
29
49
|
</div>
|
|
30
50
|
);
|
|
31
51
|
};
|
|
32
52
|
|
|
53
|
+
const customCode = `() => {
|
|
54
|
+
const [visibility, setVisibility] = React.useState(false);
|
|
55
|
+
const [visibility2, setVisibility2] = React.useState(false);
|
|
56
|
+
const [inputValue, setInputValue] = React.useState('Value');
|
|
57
|
+
const [secondInputValue, setSecondInputValue] = React.useState('Value');
|
|
58
|
+
return (
|
|
59
|
+
<div className="d-flex">
|
|
60
|
+
<div>
|
|
61
|
+
<Label htmlFor="password-1" withInput={true}>
|
|
62
|
+
Password
|
|
63
|
+
</Label>
|
|
64
|
+
<Input
|
|
65
|
+
id="password-1"
|
|
66
|
+
placeholder="Password"
|
|
67
|
+
value={inputValue}
|
|
68
|
+
type={visibility ? 'text' : 'password'}
|
|
69
|
+
onChange={(ev) => {
|
|
70
|
+
ev.persist();
|
|
71
|
+
setInputValue(ev.target.value);
|
|
72
|
+
}}
|
|
73
|
+
actionIcon={
|
|
74
|
+
<Icon
|
|
75
|
+
aria-label={visibility ? 'Show Password' : 'Hide Password'}
|
|
76
|
+
onClick={() => setVisibility((x) => !x)}
|
|
77
|
+
name={visibility ? 'visibility_on' : 'visibility_off'}
|
|
78
|
+
className="cursor-pointer"
|
|
79
|
+
/>
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
<Caption withInput={true}>Create a string, unique password</Caption>
|
|
83
|
+
</div>
|
|
84
|
+
<div className="ml-6">
|
|
85
|
+
<Label htmlFor="password-2" withInput={true}>
|
|
86
|
+
Password
|
|
87
|
+
</Label>
|
|
88
|
+
<Input
|
|
89
|
+
id="password-2"
|
|
90
|
+
placeholder="Password"
|
|
91
|
+
value={secondInputValue}
|
|
92
|
+
type={visibility2 ? 'text' : 'password'}
|
|
93
|
+
onChange={(ev) => {
|
|
94
|
+
ev.persist();
|
|
95
|
+
setSecondInputValue(ev.target.value);
|
|
96
|
+
}}
|
|
97
|
+
actionIcon={
|
|
98
|
+
<Icon
|
|
99
|
+
aria-label={visibility ? 'Show Password' : 'Hide Password'}
|
|
100
|
+
onClick={() => setVisibility2((x) => !x)}
|
|
101
|
+
name={visibility2 ? 'visibility_on' : 'visibility_off'}
|
|
102
|
+
className="cursor-pointer"
|
|
103
|
+
/>
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
106
|
+
<Caption withInput={true} error={true}>
|
|
107
|
+
Create a password with at least 8 characters
|
|
108
|
+
</Caption>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
};`;
|
|
113
|
+
|
|
33
114
|
export default {
|
|
34
115
|
title: 'Components/Input/Input With Caption',
|
|
35
116
|
component: Input,
|
|
@@ -37,6 +118,7 @@ export default {
|
|
|
37
118
|
docs: {
|
|
38
119
|
docPage: {
|
|
39
120
|
title: 'Input',
|
|
121
|
+
customCode,
|
|
40
122
|
props: {
|
|
41
123
|
exclude: ['autocomplete'],
|
|
42
124
|
},
|
|
@@ -10,8 +10,10 @@ export const inputWithLabel = () => {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<>
|
|
13
|
-
<Label withInput={true}>
|
|
14
|
-
|
|
13
|
+
<Label htmlFor="email" withInput={true}>
|
|
14
|
+
Email
|
|
15
|
+
</Label>
|
|
16
|
+
<Input id="email" placeholder="Email" className="w-25" value={value} onChange={onChange} />
|
|
15
17
|
</>
|
|
16
18
|
);
|
|
17
19
|
};
|
|
@@ -25,12 +27,18 @@ const customCode = `() => {
|
|
|
25
27
|
|
|
26
28
|
return (
|
|
27
29
|
<>
|
|
28
|
-
<Label
|
|
30
|
+
<Label
|
|
31
|
+
withInput={true}
|
|
32
|
+
htmlFor="email"
|
|
33
|
+
>
|
|
34
|
+
Email
|
|
35
|
+
</Label>
|
|
29
36
|
<Input
|
|
30
37
|
name="input"
|
|
31
38
|
className="w-25"
|
|
32
39
|
value={value}
|
|
33
40
|
onChange={onChange}
|
|
41
|
+
placeholder="Email"
|
|
34
42
|
/>
|
|
35
43
|
</>
|
|
36
44
|
);
|
|
@@ -5,17 +5,58 @@ export const labelPosition = () => {
|
|
|
5
5
|
return (
|
|
6
6
|
<div className="d-flex align-items-end">
|
|
7
7
|
<div>
|
|
8
|
-
<Label withInput={true}>
|
|
9
|
-
|
|
8
|
+
<Label htmlFor="fullName" withInput={true}>
|
|
9
|
+
Full Name
|
|
10
|
+
</Label>
|
|
11
|
+
<Input placeholder="Full name" id="fullName" value="Joy Lawson" />
|
|
10
12
|
</div>
|
|
11
13
|
<div className="d-flex align-items-center ml-9">
|
|
12
|
-
<Label className="mr-6">
|
|
13
|
-
|
|
14
|
+
<Label htmlFor="fullName2" className="mr-6">
|
|
15
|
+
Full Name
|
|
16
|
+
</Label>
|
|
17
|
+
<Input placeholder="Full name" id="fullName2" value="Joy Lawson" />
|
|
14
18
|
</div>
|
|
15
19
|
</div>
|
|
16
20
|
);
|
|
17
21
|
};
|
|
18
22
|
|
|
23
|
+
const customCode = `() => {
|
|
24
|
+
const [inputValue, setInputValue] = React.useState('Joy Lawson');
|
|
25
|
+
const [secondInputValue, setSecondInputValue] = React.useState('Joy Lawson');
|
|
26
|
+
return (
|
|
27
|
+
<div className="d-flex align-items-end">
|
|
28
|
+
<div>
|
|
29
|
+
<Label htmlFor="fullName" withInput={true}>
|
|
30
|
+
Full Name
|
|
31
|
+
</Label>
|
|
32
|
+
<Input
|
|
33
|
+
placeholder="Full name"
|
|
34
|
+
id="fullName"
|
|
35
|
+
value={inputValue}
|
|
36
|
+
onChange={(ev) => {
|
|
37
|
+
ev.persist();
|
|
38
|
+
setInputValue(ev.target.value);
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
<div className="d-flex align-items-center ml-9">
|
|
43
|
+
<Label htmlFor="fullName2" className="mr-6">
|
|
44
|
+
Full Name
|
|
45
|
+
</Label>
|
|
46
|
+
<Input
|
|
47
|
+
placeholder="Full name"
|
|
48
|
+
id="fullName2"
|
|
49
|
+
value={secondInputValue}
|
|
50
|
+
onChange={(ev) => {
|
|
51
|
+
ev.persist();
|
|
52
|
+
setSecondInputValue(ev.target.value);
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};`;
|
|
59
|
+
|
|
19
60
|
export default {
|
|
20
61
|
title: 'Components/Input/Label Position',
|
|
21
62
|
component: Input,
|
|
@@ -23,6 +64,7 @@ export default {
|
|
|
23
64
|
docs: {
|
|
24
65
|
docPage: {
|
|
25
66
|
title: 'Input',
|
|
67
|
+
customCode,
|
|
26
68
|
props: {
|
|
27
69
|
exclude: ['autocomplete'],
|
|
28
70
|
},
|