@dxc-technology/halstack-react 0.0.0-9fd3a96 → 0.0.0-a01bf75
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/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +47 -0
- package/HalstackContext.d.ts +12 -0
- package/HalstackContext.js +343 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +239 -0
- package/accordion/Accordion.stories.tsx +395 -0
- package/accordion/Accordion.test.js +71 -0
- package/accordion/types.d.ts +69 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +149 -0
- package/accordion-group/AccordionGroup.stories.tsx +251 -0
- package/accordion-group/AccordionGroup.test.js +126 -0
- package/accordion-group/types.d.ts +79 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +293 -0
- package/alert/Alert.stories.tsx +198 -0
- package/alert/Alert.test.js +92 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +61 -0
- package/badge/types.d.ts +5 -0
- package/badge/types.js +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +51 -0
- package/bleed/Bleed.stories.tsx +341 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +4 -0
- package/box/Box.js +116 -0
- package/box/Box.stories.tsx +147 -0
- package/box/Box.test.js +18 -0
- package/box/types.d.ts +44 -0
- package/box/types.js +5 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +123 -0
- package/bulleted-list/BulletedList.stories.tsx +200 -0
- package/bulleted-list/types.d.ts +11 -0
- package/bulleted-list/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +154 -0
- package/button/Button.stories.tsx +425 -0
- package/button/Button.test.js +35 -0
- package/button/types.d.ts +53 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/card/Card.js +161 -0
- package/card/Card.stories.tsx +201 -0
- package/card/Card.test.js +50 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +68 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/Checkbox.js +250 -0
- package/checkbox/Checkbox.stories.tsx +260 -0
- package/checkbox/Checkbox.test.js +155 -0
- package/checkbox/types.d.ts +68 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +155 -0
- package/chip/Chip.stories.tsx +206 -0
- package/chip/Chip.test.js +56 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/common/utils.js +22 -0
- package/common/variables.js +1538 -0
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +269 -0
- package/date-input/DateInput.stories.tsx +304 -0
- package/date-input/DateInput.test.js +835 -0
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +146 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +75 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +126 -0
- package/date-input/types.d.ts +158 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +160 -0
- package/dialog/Dialog.stories.tsx +289 -0
- package/dialog/Dialog.test.js +70 -0
- package/dialog/types.d.ts +44 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +388 -0
- package/dropdown/Dropdown.stories.tsx +438 -0
- package/dropdown/Dropdown.test.js +585 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +70 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +81 -0
- package/dropdown/types.d.ts +100 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +547 -0
- package/file-input/FileInput.stories.tsx +618 -0
- package/file-input/FileInput.test.js +457 -0
- package/file-input/FileItem.d.ts +4 -0
- package/file-input/FileItem.js +162 -0
- package/file-input/types.d.ts +129 -0
- package/file-input/types.js +5 -0
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +69 -0
- package/flex/Flex.stories.tsx +103 -0
- package/flex/types.d.ts +32 -0
- package/flex/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +185 -0
- package/footer/Footer.stories.tsx +228 -0
- package/footer/Footer.test.js +109 -0
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +77 -0
- package/footer/types.d.ts +66 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +303 -0
- package/header/Header.stories.tsx +315 -0
- package/header/Header.test.js +79 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +34 -0
- package/header/types.d.ts +48 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +159 -0
- package/heading/Heading.stories.tsx +54 -0
- package/heading/Heading.test.js +186 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +51 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +20 -0
- package/layout/ApplicationLayout.js +171 -0
- package/layout/ApplicationLayout.stories.tsx +162 -0
- package/layout/Icons.d.ts +5 -0
- package/layout/Icons.js +66 -0
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +42 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +4 -0
- package/link/Link.js +136 -0
- package/link/Link.stories.tsx +253 -0
- package/link/Link.test.js +83 -0
- package/link/types.d.ts +54 -0
- package/link/types.js +5 -0
- package/main.d.ts +44 -0
- package/{dist/main.js → main.js} +163 -73
- package/nav-tabs/NavTabs.d.ts +8 -0
- package/nav-tabs/NavTabs.js +125 -0
- package/nav-tabs/NavTabs.stories.tsx +260 -0
- package/nav-tabs/NavTabs.test.js +82 -0
- package/nav-tabs/Tab.d.ts +4 -0
- package/nav-tabs/Tab.js +150 -0
- package/nav-tabs/types.d.ts +53 -0
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +76 -0
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInput.test.js +542 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/{dist/ThemeContext.js → number-input/NumberInputContext.js} +6 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +124 -0
- package/number-input/types.js +5 -0
- package/package.json +49 -36
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +54 -0
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +165 -0
- package/paginator/Paginator.stories.tsx +87 -0
- package/paginator/Paginator.test.js +315 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/paragraph/Paragraph.d.ts +6 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +166 -0
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/PasswordInput.test.js +181 -0
- package/password-input/types.d.ts +110 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +176 -0
- package/progress-bar/ProgressBar.stories.jsx +93 -0
- package/progress-bar/ProgressBar.test.js +110 -0
- package/progress-bar/types.d.ts +36 -0
- package/progress-bar/types.js +5 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +117 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +156 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +283 -0
- package/radio-group/RadioGroup.stories.tsx +214 -0
- package/radio-group/RadioGroup.test.js +722 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +195 -0
- package/resultsetTable/ResultsetTable.stories.tsx +300 -0
- package/resultsetTable/ResultsetTable.test.js +325 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +169 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +97 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +664 -0
- package/select/Select.stories.tsx +971 -0
- package/select/Select.test.js +2228 -0
- package/select/types.d.ts +210 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.d.ts +10 -0
- package/sidenav/Sidenav.js +266 -0
- package/sidenav/Sidenav.stories.tsx +282 -0
- package/sidenav/Sidenav.test.js +44 -0
- package/sidenav/types.d.ts +73 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +343 -0
- package/slider/Slider.stories.tsx +240 -0
- package/slider/Slider.test.js +250 -0
- package/slider/types.d.ts +86 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +250 -0
- package/spinner/Spinner.stories.jsx +129 -0
- package/spinner/Spinner.test.js +64 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/switch/Switch.d.ts +4 -0
- package/switch/Switch.js +262 -0
- package/switch/Switch.stories.tsx +171 -0
- package/switch/Switch.test.js +225 -0
- package/switch/types.d.ts +66 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/table/Table.js +118 -0
- package/table/Table.stories.jsx +356 -0
- package/table/Table.test.js +26 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +133 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +467 -0
- package/tabs/Tabs.stories.tsx +226 -0
- package/tabs/Tabs.test.js +351 -0
- package/tabs/types.d.ts +92 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +183 -0
- package/tag/Tag.stories.tsx +155 -0
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +84 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +673 -0
- package/text-input/TextInput.stories.tsx +569 -0
- package/text-input/TextInput.test.js +1724 -0
- package/text-input/types.d.ts +197 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +277 -0
- package/textarea/Textarea.stories.jsx +216 -0
- package/textarea/Textarea.test.js +437 -0
- package/textarea/types.d.ts +137 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +215 -0
- package/toggle-group/ToggleGroup.stories.tsx +215 -0
- package/toggle-group/ToggleGroup.test.js +156 -0
- package/toggle-group/types.d.ts +105 -0
- package/toggle-group/types.js +5 -0
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +131 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +2 -0
- package/useTheme.js +22 -0
- package/useTranslatedLabels.d.ts +2 -0
- package/useTranslatedLabels.js +20 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +285 -0
- package/wizard/Wizard.stories.tsx +253 -0
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +65 -0
- package/wizard/types.js +5 -0
- package/README.md +0 -66
- package/babel.config.js +0 -4
- package/dist/accordion/Accordion.js +0 -268
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/alert/Alert.js +0 -304
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/box/Box.js +0 -148
- package/dist/button/Button.js +0 -202
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/card/Card.js +0 -217
- package/dist/checkbox/Checkbox.js +0 -240
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/chip/Chip.js +0 -208
- package/dist/common/RequiredComponent.js +0 -46
- package/dist/common/services/example-service.js +0 -10
- package/dist/common/services/example-service.test.js +0 -12
- package/dist/common/utils.js +0 -42
- package/dist/common/variables.js +0 -434
- package/dist/date/Date.js +0 -356
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.js +0 -197
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.js +0 -449
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.js +0 -371
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.js +0 -373
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/heading/Heading.js +0 -153
- package/dist/input-text/InputText.js +0 -570
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/ApplicationLayout.js +0 -335
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/link/Link.js +0 -189
- package/dist/link/readme.md +0 -51
- package/dist/paginator/Paginator.js +0 -196
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/progress-bar/ProgressBar.js +0 -185
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.js +0 -195
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/ResultsetTable.js +0 -333
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/select/Select.js +0 -473
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/sidenav/Sidenav.js +0 -128
- package/dist/slider/Slider.js +0 -266
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -193
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.js +0 -199
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/table/Table.js +0 -105
- package/dist/tabs/Tabs.js +0 -172
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/tag/Tag.js +0 -234
- package/dist/textarea/Textarea.js +0 -227
- package/dist/toggle/Toggle.js +0 -223
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/ToggleGroup.js +0 -214
- package/dist/toggle-group/readme.md +0 -82
- package/dist/upload/Upload.js +0 -200
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -122
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -279
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/FileToUpload.js +0 -158
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/files-upload/FilesToUpload.js +0 -123
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/Transaction.js +0 -155
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/upload/transactions/Transactions.js +0 -120
- package/dist/wizard/Wizard.js +0 -327
- package/dist/wizard/invalid_icon.svg +0 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Accordion.test.js +0 -33
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -393
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -130
- package/test/Footer.test.js +0 -99
- package/test/Header.test.js +0 -39
- package/test/Heading.test.js +0 -35
- package/test/InputText.test.js +0 -236
- package/test/Link.test.js +0 -33
- package/test/Paginator.test.js +0 -165
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -282
- package/test/Select.test.js +0 -191
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- package/test/Spinner.test.js +0 -27
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -88
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- package/test/Toggle.test.js +0 -43
- package/test/ToggleGroup.test.js +0 -81
- package/test/Upload.test.js +0 -60
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
- /package/{dist/common → common}/OpenSans.css +0 -0
- /package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- /package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
package/link/types.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
export declare type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
|
|
10
|
+
export declare type LinkProps = {
|
|
11
|
+
/**
|
|
12
|
+
* If true, the color is inherited from parent.
|
|
13
|
+
*/
|
|
14
|
+
inheritColor?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the link is disabled.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates the position of the icon in the component.
|
|
21
|
+
*/
|
|
22
|
+
iconPosition?: "before" | "after";
|
|
23
|
+
/**
|
|
24
|
+
* Page to be opened when the user clicks on the link.
|
|
25
|
+
*/
|
|
26
|
+
href?: string;
|
|
27
|
+
/**
|
|
28
|
+
* If true, the page is opened in a new browser tab.
|
|
29
|
+
*/
|
|
30
|
+
newWindow?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* If defined, the link will be displayed as a button. This
|
|
33
|
+
* function will be called when the user clicks the link.
|
|
34
|
+
*/
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
38
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
39
|
+
*/
|
|
40
|
+
margin?: Space | Margin;
|
|
41
|
+
/**
|
|
42
|
+
* Value of the tabindex.
|
|
43
|
+
*/
|
|
44
|
+
tabIndex?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Content of the link.
|
|
47
|
+
*/
|
|
48
|
+
children: string;
|
|
49
|
+
/**
|
|
50
|
+
* Element or path used as the icon that will be placed next to the link text.
|
|
51
|
+
*/
|
|
52
|
+
icon?: string | SVG;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
package/link/types.js
ADDED
package/main.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import DxcAlert from "./alert/Alert";
|
|
2
|
+
import DxcAccordion from "./accordion/Accordion";
|
|
3
|
+
import DxcButton from "./button/Button";
|
|
4
|
+
import DxcCard from "./card/Card";
|
|
5
|
+
import DxcCheckbox from "./checkbox/Checkbox";
|
|
6
|
+
import DxcDialog from "./dialog/Dialog";
|
|
7
|
+
import DxcDropdown from "./dropdown/Dropdown";
|
|
8
|
+
import DxcSlider from "./slider/Slider";
|
|
9
|
+
import DxcSwitch from "./switch/Switch";
|
|
10
|
+
import DxcTabs from "./tabs/Tabs";
|
|
11
|
+
import DxcProgressBar from "./progress-bar/ProgressBar";
|
|
12
|
+
import DxcSpinner from "./spinner/Spinner";
|
|
13
|
+
import DxcTable from "./table/Table";
|
|
14
|
+
import DxcBox from "./box/Box";
|
|
15
|
+
import DxcTag from "./tag/Tag";
|
|
16
|
+
import DxcPaginator from "./paginator/Paginator";
|
|
17
|
+
import DxcWizard from "./wizard/Wizard";
|
|
18
|
+
import DxcLink from "./link/Link";
|
|
19
|
+
import DxcHeading from "./heading/Heading";
|
|
20
|
+
import DxcResultsetTable from "./resultsetTable/ResultsetTable";
|
|
21
|
+
import DxcChip from "./chip/Chip";
|
|
22
|
+
import DxcApplicationLayout from "./layout/ApplicationLayout";
|
|
23
|
+
import DxcToggleGroup from "./toggle-group/ToggleGroup";
|
|
24
|
+
import DxcAccordionGroup from "./accordion-group/AccordionGroup";
|
|
25
|
+
import DxcBadge from "./badge/Badge";
|
|
26
|
+
import DxcTextInput from "./text-input/TextInput";
|
|
27
|
+
import DxcPasswordInput from "./password-input/PasswordInput";
|
|
28
|
+
import DxcDateInput from "./date-input/DateInput";
|
|
29
|
+
import DxcNumberInput from "./number-input/NumberInput";
|
|
30
|
+
import DxcTextarea from "./textarea/Textarea";
|
|
31
|
+
import DxcSelect from "./select/Select";
|
|
32
|
+
import DxcFileInput from "./file-input/FileInput";
|
|
33
|
+
import DxcRadioGroup from "./radio-group/RadioGroup";
|
|
34
|
+
import DxcBleed from "./bleed/Bleed";
|
|
35
|
+
import DxcInset from "./inset/Inset";
|
|
36
|
+
import DxcQuickNav from "./quick-nav/QuickNav";
|
|
37
|
+
import DxcNavTabs from "./nav-tabs/NavTabs";
|
|
38
|
+
import DxcFlex from "./flex/Flex";
|
|
39
|
+
import DxcTypography from "./typography/Typography";
|
|
40
|
+
import DxcParagraph from "./paragraph/Paragraph";
|
|
41
|
+
import DxcBulletedList from "./bulleted-list/BulletedList";
|
|
42
|
+
import HalstackContext, { HalstackProvider, HalstackLanguageContext } from "./HalstackContext";
|
|
43
|
+
import { BackgroundColorProvider } from "./BackgroundColorContext";
|
|
44
|
+
export { DxcAlert, DxcButton, DxcCheckbox, DxcTextInput, DxcDropdown, DxcSwitch, DxcSlider, DxcTable, DxcTabs, DxcToggleGroup, DxcDialog, DxcCard, DxcProgressBar, DxcAccordion, DxcSpinner, DxcBox, DxcTag, DxcPaginator, DxcWizard, DxcLink, DxcHeading, DxcResultsetTable, DxcChip, DxcApplicationLayout, HalstackContext, HalstackLanguageContext, HalstackProvider, BackgroundColorProvider, DxcAccordionGroup, DxcBadge, DxcPasswordInput, DxcDateInput, DxcNumberInput, DxcTextarea, DxcSelect, DxcFileInput, DxcRadioGroup, DxcBleed, DxcInset, DxcQuickNav, DxcNavTabs, DxcFlex, DxcTypography, DxcParagraph, DxcBulletedList, };
|
package/{dist/main.js → main.js}
RENAMED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "BackgroundColorProvider", {
|
|
9
11
|
enumerable: true,
|
|
10
12
|
get: function get() {
|
|
11
|
-
return
|
|
13
|
+
return _BackgroundColorContext.BackgroundColorProvider;
|
|
12
14
|
}
|
|
13
15
|
});
|
|
14
16
|
Object.defineProperty(exports, "DxcAccordion", {
|
|
@@ -17,6 +19,48 @@ Object.defineProperty(exports, "DxcAccordion", {
|
|
|
17
19
|
return _Accordion["default"];
|
|
18
20
|
}
|
|
19
21
|
});
|
|
22
|
+
Object.defineProperty(exports, "DxcAccordionGroup", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function get() {
|
|
25
|
+
return _AccordionGroup["default"];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "DxcAlert", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function get() {
|
|
31
|
+
return _Alert["default"];
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "DxcApplicationLayout", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function get() {
|
|
37
|
+
return _ApplicationLayout["default"];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "DxcBadge", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function get() {
|
|
43
|
+
return _Badge["default"];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "DxcBleed", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function get() {
|
|
49
|
+
return _Bleed["default"];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "DxcBox", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function get() {
|
|
55
|
+
return _Box["default"];
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "DxcBulletedList", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function get() {
|
|
61
|
+
return _BulletedList["default"];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
20
64
|
Object.defineProperty(exports, "DxcButton", {
|
|
21
65
|
enumerable: true,
|
|
22
66
|
get: function get() {
|
|
@@ -35,10 +79,16 @@ Object.defineProperty(exports, "DxcCheckbox", {
|
|
|
35
79
|
return _Checkbox["default"];
|
|
36
80
|
}
|
|
37
81
|
});
|
|
38
|
-
Object.defineProperty(exports, "
|
|
82
|
+
Object.defineProperty(exports, "DxcChip", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function get() {
|
|
85
|
+
return _Chip["default"];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "DxcDateInput", {
|
|
39
89
|
enumerable: true,
|
|
40
90
|
get: function get() {
|
|
41
|
-
return
|
|
91
|
+
return _DateInput["default"];
|
|
42
92
|
}
|
|
43
93
|
});
|
|
44
94
|
Object.defineProperty(exports, "DxcDialog", {
|
|
@@ -53,58 +103,64 @@ Object.defineProperty(exports, "DxcDropdown", {
|
|
|
53
103
|
return _Dropdown["default"];
|
|
54
104
|
}
|
|
55
105
|
});
|
|
56
|
-
Object.defineProperty(exports, "
|
|
106
|
+
Object.defineProperty(exports, "DxcFileInput", {
|
|
57
107
|
enumerable: true,
|
|
58
108
|
get: function get() {
|
|
59
|
-
return
|
|
109
|
+
return _FileInput["default"];
|
|
60
110
|
}
|
|
61
111
|
});
|
|
62
|
-
Object.defineProperty(exports, "
|
|
112
|
+
Object.defineProperty(exports, "DxcFlex", {
|
|
63
113
|
enumerable: true,
|
|
64
114
|
get: function get() {
|
|
65
|
-
return
|
|
115
|
+
return _Flex["default"];
|
|
66
116
|
}
|
|
67
117
|
});
|
|
68
|
-
Object.defineProperty(exports, "
|
|
118
|
+
Object.defineProperty(exports, "DxcHeading", {
|
|
69
119
|
enumerable: true,
|
|
70
120
|
get: function get() {
|
|
71
|
-
return
|
|
121
|
+
return _Heading["default"];
|
|
72
122
|
}
|
|
73
123
|
});
|
|
74
|
-
Object.defineProperty(exports, "
|
|
124
|
+
Object.defineProperty(exports, "DxcInset", {
|
|
75
125
|
enumerable: true,
|
|
76
126
|
get: function get() {
|
|
77
|
-
return
|
|
127
|
+
return _Inset["default"];
|
|
78
128
|
}
|
|
79
129
|
});
|
|
80
|
-
Object.defineProperty(exports, "
|
|
130
|
+
Object.defineProperty(exports, "DxcLink", {
|
|
81
131
|
enumerable: true,
|
|
82
132
|
get: function get() {
|
|
83
|
-
return
|
|
133
|
+
return _Link["default"];
|
|
84
134
|
}
|
|
85
135
|
});
|
|
86
|
-
Object.defineProperty(exports, "
|
|
136
|
+
Object.defineProperty(exports, "DxcNavTabs", {
|
|
87
137
|
enumerable: true,
|
|
88
138
|
get: function get() {
|
|
89
|
-
return
|
|
139
|
+
return _NavTabs["default"];
|
|
90
140
|
}
|
|
91
141
|
});
|
|
92
|
-
Object.defineProperty(exports, "
|
|
142
|
+
Object.defineProperty(exports, "DxcNumberInput", {
|
|
93
143
|
enumerable: true,
|
|
94
144
|
get: function get() {
|
|
95
|
-
return
|
|
145
|
+
return _NumberInput["default"];
|
|
96
146
|
}
|
|
97
147
|
});
|
|
98
|
-
Object.defineProperty(exports, "
|
|
148
|
+
Object.defineProperty(exports, "DxcPaginator", {
|
|
99
149
|
enumerable: true,
|
|
100
150
|
get: function get() {
|
|
101
|
-
return
|
|
151
|
+
return _Paginator["default"];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(exports, "DxcParagraph", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function get() {
|
|
157
|
+
return _Paragraph["default"];
|
|
102
158
|
}
|
|
103
159
|
});
|
|
104
|
-
Object.defineProperty(exports, "
|
|
160
|
+
Object.defineProperty(exports, "DxcPasswordInput", {
|
|
105
161
|
enumerable: true,
|
|
106
162
|
get: function get() {
|
|
107
|
-
return
|
|
163
|
+
return _PasswordInput["default"];
|
|
108
164
|
}
|
|
109
165
|
});
|
|
110
166
|
Object.defineProperty(exports, "DxcProgressBar", {
|
|
@@ -113,64 +169,70 @@ Object.defineProperty(exports, "DxcProgressBar", {
|
|
|
113
169
|
return _ProgressBar["default"];
|
|
114
170
|
}
|
|
115
171
|
});
|
|
116
|
-
Object.defineProperty(exports, "
|
|
172
|
+
Object.defineProperty(exports, "DxcQuickNav", {
|
|
117
173
|
enumerable: true,
|
|
118
174
|
get: function get() {
|
|
119
|
-
return
|
|
175
|
+
return _QuickNav["default"];
|
|
120
176
|
}
|
|
121
177
|
});
|
|
122
|
-
Object.defineProperty(exports, "
|
|
178
|
+
Object.defineProperty(exports, "DxcRadioGroup", {
|
|
123
179
|
enumerable: true,
|
|
124
180
|
get: function get() {
|
|
125
|
-
return
|
|
181
|
+
return _RadioGroup["default"];
|
|
126
182
|
}
|
|
127
183
|
});
|
|
128
|
-
Object.defineProperty(exports, "
|
|
184
|
+
Object.defineProperty(exports, "DxcResultsetTable", {
|
|
129
185
|
enumerable: true,
|
|
130
186
|
get: function get() {
|
|
131
|
-
return
|
|
187
|
+
return _ResultsetTable["default"];
|
|
132
188
|
}
|
|
133
189
|
});
|
|
134
|
-
Object.defineProperty(exports, "
|
|
190
|
+
Object.defineProperty(exports, "DxcSelect", {
|
|
135
191
|
enumerable: true,
|
|
136
192
|
get: function get() {
|
|
137
|
-
return
|
|
193
|
+
return _Select["default"];
|
|
138
194
|
}
|
|
139
195
|
});
|
|
140
|
-
Object.defineProperty(exports, "
|
|
196
|
+
Object.defineProperty(exports, "DxcSlider", {
|
|
141
197
|
enumerable: true,
|
|
142
198
|
get: function get() {
|
|
143
|
-
return
|
|
199
|
+
return _Slider["default"];
|
|
144
200
|
}
|
|
145
201
|
});
|
|
146
|
-
Object.defineProperty(exports, "
|
|
202
|
+
Object.defineProperty(exports, "DxcSpinner", {
|
|
147
203
|
enumerable: true,
|
|
148
204
|
get: function get() {
|
|
149
|
-
return
|
|
205
|
+
return _Spinner["default"];
|
|
150
206
|
}
|
|
151
207
|
});
|
|
152
|
-
Object.defineProperty(exports, "
|
|
208
|
+
Object.defineProperty(exports, "DxcSwitch", {
|
|
153
209
|
enumerable: true,
|
|
154
210
|
get: function get() {
|
|
155
|
-
return
|
|
211
|
+
return _Switch["default"];
|
|
156
212
|
}
|
|
157
213
|
});
|
|
158
|
-
Object.defineProperty(exports, "
|
|
214
|
+
Object.defineProperty(exports, "DxcTable", {
|
|
159
215
|
enumerable: true,
|
|
160
216
|
get: function get() {
|
|
161
|
-
return
|
|
217
|
+
return _Table["default"];
|
|
162
218
|
}
|
|
163
219
|
});
|
|
164
|
-
Object.defineProperty(exports, "
|
|
220
|
+
Object.defineProperty(exports, "DxcTabs", {
|
|
165
221
|
enumerable: true,
|
|
166
222
|
get: function get() {
|
|
167
|
-
return
|
|
223
|
+
return _Tabs["default"];
|
|
168
224
|
}
|
|
169
225
|
});
|
|
170
|
-
Object.defineProperty(exports, "
|
|
226
|
+
Object.defineProperty(exports, "DxcTag", {
|
|
171
227
|
enumerable: true,
|
|
172
228
|
get: function get() {
|
|
173
|
-
return
|
|
229
|
+
return _Tag["default"];
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(exports, "DxcTextInput", {
|
|
233
|
+
enumerable: true,
|
|
234
|
+
get: function get() {
|
|
235
|
+
return _TextInput["default"];
|
|
174
236
|
}
|
|
175
237
|
});
|
|
176
238
|
Object.defineProperty(exports, "DxcTextarea", {
|
|
@@ -179,34 +241,40 @@ Object.defineProperty(exports, "DxcTextarea", {
|
|
|
179
241
|
return _Textarea["default"];
|
|
180
242
|
}
|
|
181
243
|
});
|
|
182
|
-
Object.defineProperty(exports, "
|
|
244
|
+
Object.defineProperty(exports, "DxcToggleGroup", {
|
|
183
245
|
enumerable: true,
|
|
184
246
|
get: function get() {
|
|
185
|
-
return
|
|
247
|
+
return _ToggleGroup["default"];
|
|
186
248
|
}
|
|
187
249
|
});
|
|
188
|
-
Object.defineProperty(exports, "
|
|
250
|
+
Object.defineProperty(exports, "DxcTypography", {
|
|
189
251
|
enumerable: true,
|
|
190
252
|
get: function get() {
|
|
191
|
-
return
|
|
253
|
+
return _Typography["default"];
|
|
192
254
|
}
|
|
193
255
|
});
|
|
194
|
-
Object.defineProperty(exports, "
|
|
256
|
+
Object.defineProperty(exports, "DxcWizard", {
|
|
195
257
|
enumerable: true,
|
|
196
258
|
get: function get() {
|
|
197
|
-
return
|
|
259
|
+
return _Wizard["default"];
|
|
198
260
|
}
|
|
199
261
|
});
|
|
200
|
-
Object.defineProperty(exports, "
|
|
262
|
+
Object.defineProperty(exports, "HalstackContext", {
|
|
201
263
|
enumerable: true,
|
|
202
264
|
get: function get() {
|
|
203
|
-
return
|
|
265
|
+
return _HalstackContext["default"];
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(exports, "HalstackLanguageContext", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function get() {
|
|
271
|
+
return _HalstackContext.HalstackLanguageContext;
|
|
204
272
|
}
|
|
205
273
|
});
|
|
206
|
-
Object.defineProperty(exports, "
|
|
274
|
+
Object.defineProperty(exports, "HalstackProvider", {
|
|
207
275
|
enumerable: true,
|
|
208
276
|
get: function get() {
|
|
209
|
-
return
|
|
277
|
+
return _HalstackContext.HalstackProvider;
|
|
210
278
|
}
|
|
211
279
|
});
|
|
212
280
|
|
|
@@ -220,36 +288,20 @@ var _Card = _interopRequireDefault(require("./card/Card"));
|
|
|
220
288
|
|
|
221
289
|
var _Checkbox = _interopRequireDefault(require("./checkbox/Checkbox"));
|
|
222
290
|
|
|
223
|
-
var _Date = _interopRequireDefault(require("./date/Date"));
|
|
224
|
-
|
|
225
291
|
var _Dialog = _interopRequireDefault(require("./dialog/Dialog"));
|
|
226
292
|
|
|
227
293
|
var _Dropdown = _interopRequireDefault(require("./dropdown/Dropdown"));
|
|
228
294
|
|
|
229
|
-
var _Footer = _interopRequireDefault(require("./footer/Footer"));
|
|
230
|
-
|
|
231
|
-
var _Header = _interopRequireDefault(require("./header/Header"));
|
|
232
|
-
|
|
233
|
-
var _InputText = _interopRequireDefault(require("./input-text/InputText"));
|
|
234
|
-
|
|
235
|
-
var _Radio = _interopRequireDefault(require("./radio/Radio"));
|
|
236
|
-
|
|
237
|
-
var _Select = _interopRequireDefault(require("./select/Select"));
|
|
238
|
-
|
|
239
295
|
var _Slider = _interopRequireDefault(require("./slider/Slider"));
|
|
240
296
|
|
|
241
297
|
var _Switch = _interopRequireDefault(require("./switch/Switch"));
|
|
242
298
|
|
|
243
299
|
var _Tabs = _interopRequireDefault(require("./tabs/Tabs"));
|
|
244
300
|
|
|
245
|
-
var _TabsForSections = _interopRequireDefault(require("./tabs-for-sections/TabsForSections"));
|
|
246
|
-
|
|
247
301
|
var _ProgressBar = _interopRequireDefault(require("./progress-bar/ProgressBar"));
|
|
248
302
|
|
|
249
303
|
var _Spinner = _interopRequireDefault(require("./spinner/Spinner"));
|
|
250
304
|
|
|
251
|
-
var _Upload = _interopRequireDefault(require("./upload/Upload"));
|
|
252
|
-
|
|
253
305
|
var _Table = _interopRequireDefault(require("./table/Table"));
|
|
254
306
|
|
|
255
307
|
var _Box = _interopRequireDefault(require("./box/Box"));
|
|
@@ -258,16 +310,12 @@ var _Tag = _interopRequireDefault(require("./tag/Tag"));
|
|
|
258
310
|
|
|
259
311
|
var _Paginator = _interopRequireDefault(require("./paginator/Paginator"));
|
|
260
312
|
|
|
261
|
-
var _Sidenav = _interopRequireDefault(require("./sidenav/Sidenav"));
|
|
262
|
-
|
|
263
313
|
var _Wizard = _interopRequireDefault(require("./wizard/Wizard"));
|
|
264
314
|
|
|
265
315
|
var _Link = _interopRequireDefault(require("./link/Link"));
|
|
266
316
|
|
|
267
317
|
var _Heading = _interopRequireDefault(require("./heading/Heading"));
|
|
268
318
|
|
|
269
|
-
var _Textarea = _interopRequireDefault(require("./textarea/Textarea"));
|
|
270
|
-
|
|
271
319
|
var _ResultsetTable = _interopRequireDefault(require("./resultsetTable/ResultsetTable"));
|
|
272
320
|
|
|
273
321
|
var _Chip = _interopRequireDefault(require("./chip/Chip"));
|
|
@@ -276,4 +324,46 @@ var _ApplicationLayout = _interopRequireDefault(require("./layout/ApplicationLay
|
|
|
276
324
|
|
|
277
325
|
var _ToggleGroup = _interopRequireDefault(require("./toggle-group/ToggleGroup"));
|
|
278
326
|
|
|
279
|
-
var
|
|
327
|
+
var _AccordionGroup = _interopRequireDefault(require("./accordion-group/AccordionGroup"));
|
|
328
|
+
|
|
329
|
+
var _Badge = _interopRequireDefault(require("./badge/Badge"));
|
|
330
|
+
|
|
331
|
+
var _TextInput = _interopRequireDefault(require("./text-input/TextInput"));
|
|
332
|
+
|
|
333
|
+
var _PasswordInput = _interopRequireDefault(require("./password-input/PasswordInput"));
|
|
334
|
+
|
|
335
|
+
var _DateInput = _interopRequireDefault(require("./date-input/DateInput"));
|
|
336
|
+
|
|
337
|
+
var _NumberInput = _interopRequireDefault(require("./number-input/NumberInput"));
|
|
338
|
+
|
|
339
|
+
var _Textarea = _interopRequireDefault(require("./textarea/Textarea"));
|
|
340
|
+
|
|
341
|
+
var _Select = _interopRequireDefault(require("./select/Select"));
|
|
342
|
+
|
|
343
|
+
var _FileInput = _interopRequireDefault(require("./file-input/FileInput"));
|
|
344
|
+
|
|
345
|
+
var _RadioGroup = _interopRequireDefault(require("./radio-group/RadioGroup"));
|
|
346
|
+
|
|
347
|
+
var _Bleed = _interopRequireDefault(require("./bleed/Bleed"));
|
|
348
|
+
|
|
349
|
+
var _Inset = _interopRequireDefault(require("./inset/Inset"));
|
|
350
|
+
|
|
351
|
+
var _QuickNav = _interopRequireDefault(require("./quick-nav/QuickNav"));
|
|
352
|
+
|
|
353
|
+
var _NavTabs = _interopRequireDefault(require("./nav-tabs/NavTabs"));
|
|
354
|
+
|
|
355
|
+
var _Flex = _interopRequireDefault(require("./flex/Flex"));
|
|
356
|
+
|
|
357
|
+
var _Typography = _interopRequireDefault(require("./typography/Typography"));
|
|
358
|
+
|
|
359
|
+
var _Paragraph = _interopRequireDefault(require("./paragraph/Paragraph"));
|
|
360
|
+
|
|
361
|
+
var _BulletedList = _interopRequireDefault(require("./bulleted-list/BulletedList"));
|
|
362
|
+
|
|
363
|
+
var _HalstackContext = _interopRequireWildcard(require("./HalstackContext"));
|
|
364
|
+
|
|
365
|
+
var _BackgroundColorContext = require("./BackgroundColorContext");
|
|
366
|
+
|
|
367
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
368
|
+
|
|
369
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NavTabsContextProps, NavTabsProps } from "./types";
|
|
3
|
+
export declare const NavTabsContext: React.Context<NavTabsContextProps>;
|
|
4
|
+
declare const DxcNavTabs: {
|
|
5
|
+
({ iconPosition, tabIndex, children }: NavTabsProps): JSX.Element;
|
|
6
|
+
Tab: React.ForwardRefExoticComponent<import("./types").TabProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
};
|
|
8
|
+
export default DxcNavTabs;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.NavTabsContext = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
+
|
|
20
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
21
|
+
|
|
22
|
+
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
23
|
+
|
|
24
|
+
var _templateObject;
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
var NavTabsContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
31
|
+
exports.NavTabsContext = NavTabsContext;
|
|
32
|
+
|
|
33
|
+
var getPropInChild = function getPropInChild(child, propName) {
|
|
34
|
+
return child.props ? child.props[propName] ? child.props[propName] : child.props.children ? getPropInChild(child.props.children, propName) : undefined : undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var getLabelFromTab = function getLabelFromTab(child) {
|
|
38
|
+
if (typeof child === "string") {
|
|
39
|
+
return child.toString();
|
|
40
|
+
} else if (child.props.children) {
|
|
41
|
+
return Array.isArray(child.props.children) ? getLabelFromTab(child.props.children[0]) : getLabelFromTab(child.props.children);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var getPreviousTabIndex = function getPreviousTabIndex(array, initialIndex) {
|
|
46
|
+
var index = initialIndex === 0 ? array.length - 1 : initialIndex - 1;
|
|
47
|
+
|
|
48
|
+
while (getPropInChild(array[index], "disabled")) {
|
|
49
|
+
index = index === 0 ? array.length - 1 : index - 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return index;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var getNextTabIndex = function getNextTabIndex(array, initialIndex) {
|
|
56
|
+
var index = initialIndex === array.length - 1 ? 0 : initialIndex + 1;
|
|
57
|
+
|
|
58
|
+
while (getPropInChild(array[index], "disabled")) {
|
|
59
|
+
index = index === array.length - 1 ? 0 : index + 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return index;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var DxcNavTabs = function DxcNavTabs(_ref) {
|
|
66
|
+
var _ref$iconPosition = _ref.iconPosition,
|
|
67
|
+
iconPosition = _ref$iconPosition === void 0 ? "top" : _ref$iconPosition,
|
|
68
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
69
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
70
|
+
children = _ref.children;
|
|
71
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
72
|
+
|
|
73
|
+
var _useState = (0, _react.useState)(null),
|
|
74
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
75
|
+
innerFocus = _useState2[0],
|
|
76
|
+
setInnerFocus = _useState2[1];
|
|
77
|
+
|
|
78
|
+
var contextValue = (0, _react.useMemo)(function () {
|
|
79
|
+
return {
|
|
80
|
+
iconPosition: iconPosition,
|
|
81
|
+
tabIndex: tabIndex,
|
|
82
|
+
hasIcons: _react["default"].Children.toArray(children).some(function (child) {
|
|
83
|
+
return getPropInChild(child, "icon");
|
|
84
|
+
}),
|
|
85
|
+
focusedLabel: innerFocus === null ? undefined : getLabelFromTab(children[innerFocus])
|
|
86
|
+
};
|
|
87
|
+
}, [iconPosition, tabIndex, innerFocus]);
|
|
88
|
+
|
|
89
|
+
var handleOnKeyDown = function handleOnKeyDown(event) {
|
|
90
|
+
var activeTab = _react["default"].Children.toArray(children).findIndex(function (child) {
|
|
91
|
+
return getPropInChild(child, "active");
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
switch (event.key) {
|
|
95
|
+
case "Left":
|
|
96
|
+
case "ArrowLeft":
|
|
97
|
+
event.preventDefault();
|
|
98
|
+
setInnerFocus(getPreviousTabIndex(children, innerFocus === null ? activeTab : innerFocus));
|
|
99
|
+
break;
|
|
100
|
+
|
|
101
|
+
case "Right":
|
|
102
|
+
case "ArrowRight":
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
setInnerFocus(getNextTabIndex(children, innerFocus === null ? activeTab : innerFocus));
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
110
|
+
theme: colorsTheme.navTabs
|
|
111
|
+
}, /*#__PURE__*/_react["default"].createElement(NavTabsContainer, {
|
|
112
|
+
onKeyDown: handleOnKeyDown,
|
|
113
|
+
role: "tablist",
|
|
114
|
+
"aria-label": "Navigation tabs"
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement(NavTabsContext.Provider, {
|
|
116
|
+
value: contextValue
|
|
117
|
+
}, children)));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
DxcNavTabs.Tab = _Tab["default"];
|
|
121
|
+
|
|
122
|
+
var NavTabsContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n"])));
|
|
123
|
+
|
|
124
|
+
var _default = DxcNavTabs;
|
|
125
|
+
exports["default"] = _default;
|