@dxc-technology/halstack-react 0.0.0-fcf16fe → 0.0.0-fdc49d2
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/ThemeContext.d.ts +10 -0
- package/ThemeContext.js +243 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +248 -0
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/Accordion.test.js +72 -0
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +170 -0
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/AccordionGroup.test.js +133 -0
- package/accordion-group/types.d.ts +68 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +290 -0
- package/alert/Alert.stories.tsx +170 -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 +59 -0
- package/badge/types.d.ts +4 -0
- package/badge/types.js +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +84 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +4 -0
- package/{dist/box → box}/Box.js +15 -53
- package/box/Box.stories.tsx +132 -0
- package/box/Box.test.js +18 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +171 -0
- package/button/Button.stories.tsx +274 -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/{dist/card → card}/Card.js +34 -124
- 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 +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +49 -93
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/Checkbox.test.js +78 -0
- package/checkbox/types.d.ts +64 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +161 -0
- package/chip/Chip.stories.tsx +119 -0
- package/chip/Chip.test.js +56 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +3 -11
- 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/{dist/common → common}/utils.js +0 -0
- package/common/variables.js +1373 -0
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +354 -0
- package/date-input/DateInput.stories.tsx +138 -0
- package/date-input/DateInput.test.js +492 -0
- package/date-input/types.d.ts +104 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/{dist/dialog → dialog}/Dialog.js +30 -99
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/Dialog.test.js +40 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +395 -0
- package/dropdown/Dropdown.stories.tsx +249 -0
- package/dropdown/Dropdown.test.js +189 -0
- package/dropdown/types.d.ts +80 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +590 -0
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileInput.test.js +457 -0
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +184 -0
- package/file-input/types.d.ts +112 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +258 -0
- package/footer/Footer.stories.tsx +130 -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 +65 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +324 -0
- package/header/Header.stories.tsx +162 -0
- package/header/Header.test.js +63 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +34 -0
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/{dist/heading → heading}/Heading.js +31 -94
- 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 +84 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +13 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +231 -0
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/Icons.js +55 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -0
- package/link/Link.js +153 -0
- package/link/Link.stories.tsx +151 -0
- package/link/Link.test.js +91 -0
- package/link/types.d.ts +70 -0
- package/link/types.js +5 -0
- package/list/List.d.ts +4 -0
- package/list/List.js +47 -0
- package/list/List.stories.tsx +95 -0
- package/list/types.d.ts +7 -0
- package/list/types.js +5 -0
- package/main.d.ts +47 -0
- package/{dist/main.js → main.js} +148 -72
- 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 +508 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +19 -0
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +121 -0
- package/number-input/types.js +5 -0
- package/package.json +36 -25
- package/paginator/Icons.js +66 -0
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +192 -0
- package/paginator/Paginator.stories.tsx +63 -0
- package/paginator/Paginator.test.js +266 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +163 -0
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/PasswordInput.test.js +183 -0
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +170 -0
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/ProgressBar.test.js +65 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +60 -0
- package/quick-nav/QuickNav.stories.tsx +237 -0
- package/quick-nav/types.d.ts +25 -0
- package/quick-nav/types.js +5 -0
- package/radio/Radio.d.ts +4 -0
- package/{dist/radio → radio}/Radio.js +17 -52
- package/radio/Radio.stories.tsx +192 -0
- package/radio/Radio.test.js +71 -0
- package/radio/types.d.ts +54 -0
- package/radio/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +141 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +280 -0
- package/radio-group/RadioGroup.stories.tsx +100 -0
- package/radio-group/RadioGroup.test.js +695 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +43 -147
- package/resultsetTable/ResultsetTable.stories.tsx +275 -0
- package/resultsetTable/ResultsetTable.test.js +306 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +3 -0
- package/row/Row.js +127 -0
- package/row/Row.stories.tsx +237 -0
- package/row/types.d.ts +28 -0
- package/row/types.js +5 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +110 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +740 -0
- package/select/Select.stories.tsx +582 -0
- package/select/Select.test.js +2016 -0
- package/select/types.d.ts +191 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +136 -0
- package/sidenav/Sidenav.stories.tsx +182 -0
- package/sidenav/Sidenav.test.js +56 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +317 -0
- package/slider/Slider.stories.tsx +177 -0
- package/slider/Slider.test.js +129 -0
- package/slider/types.d.ts +78 -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 +103 -0
- package/spinner/Spinner.test.js +64 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/stack/Stack.d.ts +3 -0
- package/stack/Stack.js +97 -0
- package/stack/Stack.stories.tsx +164 -0
- package/stack/types.d.ts +24 -0
- package/stack/types.js +5 -0
- package/switch/Switch.d.ts +4 -0
- package/{dist/switch → switch}/Switch.js +45 -75
- package/switch/Switch.stories.tsx +160 -0
- package/switch/Switch.test.js +98 -0
- package/switch/types.d.ts +62 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/{dist/table → table}/Table.js +14 -24
- package/table/Table.stories.jsx +277 -0
- package/table/Table.test.js +26 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +213 -0
- package/tabs/Tabs.stories.tsx +120 -0
- package/tabs/Tabs.test.js +123 -0
- package/tabs/types.d.ts +78 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +186 -0
- package/tag/Tag.stories.tsx +142 -0
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +798 -0
- package/text-input/TextInput.stories.tsx +474 -0
- package/text-input/TextInput.test.js +1725 -0
- package/text-input/types.d.ts +163 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +286 -0
- package/textarea/Textarea.stories.jsx +157 -0
- package/textarea/Textarea.test.js +437 -0
- package/textarea/types.d.ts +134 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +214 -0
- package/toggle-group/ToggleGroup.stories.tsx +173 -0
- package/toggle-group/ToggleGroup.test.js +125 -0
- package/toggle-group/types.d.ts +97 -0
- package/toggle-group/types.js +5 -0
- package/useTheme.d.ts +2 -0
- package/{dist/useTheme.js → useTheme.js} +1 -1
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +286 -0
- package/wizard/Wizard.stories.tsx +214 -0
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/README.md +0 -66
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -216
- package/dist/accordion/Accordion.js +0 -346
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.js +0 -188
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- package/dist/alert/Alert.js +0 -388
- 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/badge/Badge.js +0 -63
- package/dist/button/Button.js +0 -232
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/chip/Chip.js +0 -269
- package/dist/common/variables.js +0 -1158
- package/dist/date/Date.js +0 -381
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.js +0 -492
- 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 -405
- 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 -431
- 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/input-text/InputText.js +0 -669
- 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 -331
- 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 -237
- package/dist/link/readme.md +0 -51
- package/dist/paginator/Paginator.js +0 -283
- 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 -206
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- 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 -563
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/sidenav/Sidenav.js +0 -183
- package/dist/slider/Slider.js +0 -315
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -214
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/tabs/Tabs.js +0 -343
- 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 -280
- package/dist/textarea/Textarea.js +0 -260
- package/dist/toggle/Toggle.js +0 -220
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/ToggleGroup.js +0 -241
- package/dist/toggle-group/readme.md +0 -82
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- 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 -325
- 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 -184
- 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 -171
- 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 -138
- package/dist/wizard/Wizard.js +0 -411
- package/dist/wizard/invalid_icon.svg +0 -5
- package/dist/wizard/valid_icon.svg +0 -5
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- 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 -240
- package/test/Link.test.js +0 -43
- package/test/Paginator.test.js +0 -177
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -330
- package/test/Select.test.js +0 -192
- 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 -109
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- 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
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
|
|
18
|
-
var _reactUseScrollspy = _interopRequireDefault(require("react-use-scrollspy"));
|
|
19
|
-
|
|
20
|
-
var _Tabs = _interopRequireDefault(require("../tabs/Tabs"));
|
|
21
|
-
|
|
22
|
-
function _templateObject() {
|
|
23
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 10;\n ", "\n"]);
|
|
24
|
-
|
|
25
|
-
_templateObject = function _templateObject() {
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var TABS_HEIGHT = 54;
|
|
33
|
-
|
|
34
|
-
var DxcTabsForSections = function DxcTabsForSections(_ref) {
|
|
35
|
-
var _ref$sections = _ref.sections,
|
|
36
|
-
sections = _ref$sections === void 0 ? [] : _ref$sections,
|
|
37
|
-
_ref$stickAtPx = _ref.stickAtPx,
|
|
38
|
-
stickAtPx = _ref$stickAtPx === void 0 ? 0 : _ref$stickAtPx;
|
|
39
|
-
var tabs = sections.map(function (section) {
|
|
40
|
-
return {
|
|
41
|
-
label: section.tabLabel
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
var refs = sections.map(function () {
|
|
45
|
-
return _react["default"].createRef();
|
|
46
|
-
});
|
|
47
|
-
var activeTab = (0, _reactUseScrollspy["default"])({
|
|
48
|
-
sectionElementRefs: refs,
|
|
49
|
-
offsetPx: -stickAtPx - TABS_HEIGHT
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
var onTabClick = function onTabClick(tabId) {
|
|
53
|
-
var topOfElement = refs[tabId].current.offsetTop - stickAtPx - TABS_HEIGHT + 5;
|
|
54
|
-
window.scroll({
|
|
55
|
-
top: topOfElement,
|
|
56
|
-
behavior: "smooth"
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(StyledTabs, {
|
|
61
|
-
stickAtPx: stickAtPx
|
|
62
|
-
}, _react["default"].createElement(_Tabs["default"], {
|
|
63
|
-
tabs: tabs,
|
|
64
|
-
activeTabIndex: activeTab,
|
|
65
|
-
onTabClick: onTabClick
|
|
66
|
-
})), sections.map(function (section, i) {
|
|
67
|
-
return _react["default"].createElement("div", {
|
|
68
|
-
key: "section".concat(i),
|
|
69
|
-
ref: refs[i]
|
|
70
|
-
}, _react["default"].createElement(section.section, null));
|
|
71
|
-
}));
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
DxcTabsForSections.propTypes = {
|
|
75
|
-
stickAtPx: _propTypes["default"].number,
|
|
76
|
-
sections: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
77
|
-
tabLabel: _propTypes["default"].string,
|
|
78
|
-
section: _propTypes["default"].func
|
|
79
|
-
}))
|
|
80
|
-
};
|
|
81
|
-
DxcTabsForSections.defaultProps = {
|
|
82
|
-
stickAtPx: 0,
|
|
83
|
-
sections: []
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var StyledTabs = _styledComponents["default"].div(_templateObject(), function (_ref2) {
|
|
87
|
-
var stickAtPx = _ref2.stickAtPx;
|
|
88
|
-
return stickAtPx && "\n position: sticky;\n top: ".concat(stickAtPx, "px;\n ");
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
var _default = DxcTabsForSections;
|
|
92
|
-
exports["default"] = _default;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# DXC Tabs Component
|
|
2
|
-
|
|
3
|
-
## Tab Group Props
|
|
4
|
-
|
|
5
|
-
<table>
|
|
6
|
-
<tr style="background-color: grey">
|
|
7
|
-
<td>Name</td>
|
|
8
|
-
<td>Default</td>
|
|
9
|
-
<td>Description</td>
|
|
10
|
-
</tr>
|
|
11
|
-
<tr>
|
|
12
|
-
<td>mode: 'filled' | 'underlined'</td>
|
|
13
|
-
<td><code>'filled'</code></td>
|
|
14
|
-
<td>Uses one of the available component modes.</td>
|
|
15
|
-
</tr>
|
|
16
|
-
<tr>
|
|
17
|
-
<td>theme: 'light' | 'dark'</td>
|
|
18
|
-
<td><code>'light'</code></td>
|
|
19
|
-
<td>Uses one of the available component themes.</td>
|
|
20
|
-
</tr>
|
|
21
|
-
<tr>
|
|
22
|
-
<td>showDotIndicator: boolean</td>
|
|
23
|
-
<td><code>false</code></td>
|
|
24
|
-
<td>If true, a dot indicator will be shown in the active tab.</td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td>disableRipple: boolean</td>
|
|
28
|
-
<td><code>false</code></td>
|
|
29
|
-
<td>If true, the ripple effect will be disabled.</td>
|
|
30
|
-
</tr>
|
|
31
|
-
<tr>
|
|
32
|
-
<td>activeTabIndex: number</td>
|
|
33
|
-
<td><code>0</code></td>
|
|
34
|
-
<td>The index of the active tab.</td>
|
|
35
|
-
</tr>
|
|
36
|
-
<tr>
|
|
37
|
-
<td>activeTabIndexChange: function</td>
|
|
38
|
-
<td></td>
|
|
39
|
-
<td>This function will be called when the user clicks on a tab. The index of the clicked tab will be passed as a parameter.</td>
|
|
40
|
-
</tr>
|
|
41
|
-
<tr>
|
|
42
|
-
<td>stepper: boolean</td>
|
|
43
|
-
<td><code>false</code></td>
|
|
44
|
-
<td>If true, the component should be rendered as a Stepper component.</td>
|
|
45
|
-
</tr>
|
|
46
|
-
<tr>
|
|
47
|
-
<td>orientation: 'horizontal' | 'vertical'</td>
|
|
48
|
-
<td><code>'horizontal'</code></td>
|
|
49
|
-
<td>Only if stepper, this parameter shows the stepper orientation.</td>
|
|
50
|
-
</tr>
|
|
51
|
-
|
|
52
|
-
</table>
|
|
53
|
-
|
|
54
|
-
## Tab Props
|
|
55
|
-
|
|
56
|
-
<table>
|
|
57
|
-
<tr style="background-color: grey">
|
|
58
|
-
<td>Name</td>
|
|
59
|
-
<td>Default</td>
|
|
60
|
-
<td>Description</td>
|
|
61
|
-
</tr>
|
|
62
|
-
<tr>
|
|
63
|
-
<td>label: string</td>
|
|
64
|
-
<td></td>
|
|
65
|
-
<td>Text to be placed within the tab.</td>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>iconSrc: string</td>
|
|
69
|
-
<td></td>
|
|
70
|
-
<td>The path of an icon to be placed within the tab.</td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr>
|
|
73
|
-
<td>disabled: boolean</td>
|
|
74
|
-
<td><code>false</code></td>
|
|
75
|
-
<td>Whether the tab is disabled.</td>
|
|
76
|
-
</tr>
|
|
77
|
-
</table>
|
|
78
|
-
|
package/dist/tag/Tag.js
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
17
|
-
|
|
18
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
|
-
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
|
-
var _variables = require("../common/variables.js");
|
|
27
|
-
|
|
28
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
29
|
-
|
|
30
|
-
var _Box = _interopRequireDefault(require("../box/Box"));
|
|
31
|
-
|
|
32
|
-
function _templateObject8() {
|
|
33
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 0px 30px;\n text-transform: ", ";\n letter-spacing: 0.025em;\n flex-grow: 1;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"]);
|
|
34
|
-
|
|
35
|
-
_templateObject8 = function _templateObject8() {
|
|
36
|
-
return data;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return data;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function _templateObject7() {
|
|
43
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n background: ", ";\n width: ", ";\n justify-content: center;\n align-items: center;\n color: ", ";\n height: ", ";\n"]);
|
|
44
|
-
|
|
45
|
-
_templateObject7 = function _templateObject7() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _templateObject6() {
|
|
53
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 43px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n img,\n svg {\n height: ", ";\n width: ", ";\n }\n"]);
|
|
54
|
-
|
|
55
|
-
_templateObject6 = function _templateObject6() {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _templateObject5() {
|
|
63
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 10px 12px;\n height: ", ";\n width: ", ";\n"]);
|
|
64
|
-
|
|
65
|
-
_templateObject5 = function _templateObject5() {
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _templateObject4() {
|
|
73
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n outline: 0;\n font-family: inherit;\n"]);
|
|
74
|
-
|
|
75
|
-
_templateObject4 = function _templateObject4() {
|
|
76
|
-
return data;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function _templateObject3() {
|
|
83
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n"]);
|
|
84
|
-
|
|
85
|
-
_templateObject3 = function _templateObject3() {
|
|
86
|
-
return data;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
return data;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _templateObject2() {
|
|
93
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n width: ", ";\n height: ", ";\n"]);
|
|
94
|
-
|
|
95
|
-
_templateObject2 = function _templateObject2() {
|
|
96
|
-
return data;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
return data;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _templateObject() {
|
|
103
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-style: ", ";\n display: inline-flex;\n cursor: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
104
|
-
|
|
105
|
-
_templateObject = function _templateObject() {
|
|
106
|
-
return data;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
return data;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var DxcTag = function DxcTag(_ref) {
|
|
113
|
-
var icon = _ref.icon,
|
|
114
|
-
iconSrc = _ref.iconSrc,
|
|
115
|
-
label = _ref.label,
|
|
116
|
-
margin = _ref.margin,
|
|
117
|
-
linkHref = _ref.linkHref,
|
|
118
|
-
onClick = _ref.onClick,
|
|
119
|
-
_ref$iconBgColor = _ref.iconBgColor,
|
|
120
|
-
iconBgColor = _ref$iconBgColor === void 0 ? "#6f2c91" : _ref$iconBgColor,
|
|
121
|
-
_ref$labelPosition = _ref.labelPosition,
|
|
122
|
-
labelPosition = _ref$labelPosition === void 0 ? "after" : _ref$labelPosition,
|
|
123
|
-
_ref$newWindow = _ref.newWindow,
|
|
124
|
-
newWindow = _ref$newWindow === void 0 ? false : _ref$newWindow,
|
|
125
|
-
_ref$size = _ref.size,
|
|
126
|
-
size = _ref$size === void 0 ? "fitContent" : _ref$size,
|
|
127
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
128
|
-
tabIndex = _ref$tabIndex === void 0 ? 1 : _ref$tabIndex;
|
|
129
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
130
|
-
|
|
131
|
-
var _useState = (0, _react.useState)(false),
|
|
132
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
133
|
-
isHovered = _useState2[0],
|
|
134
|
-
changeIsHovered = _useState2[1];
|
|
135
|
-
|
|
136
|
-
var clickHandler = function clickHandler() {
|
|
137
|
-
if (onClick) {
|
|
138
|
-
onClick();
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
var tagContent = _react["default"].createElement(_Box["default"], {
|
|
143
|
-
size: size,
|
|
144
|
-
shadowDepth: isHovered && (onClick || linkHref) && 2 || 1
|
|
145
|
-
}, _react["default"].createElement(TagContent, {
|
|
146
|
-
labelPosition: labelPosition,
|
|
147
|
-
margin: margin,
|
|
148
|
-
size: size
|
|
149
|
-
}, _react["default"].createElement(IconContainer, {
|
|
150
|
-
iconBgColor: iconBgColor
|
|
151
|
-
}, icon ? _react["default"].createElement(TagIconContainer, null, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : _react["default"].createElement(TagIcon, {
|
|
152
|
-
src: iconSrc
|
|
153
|
-
})), size !== "small" && _react["default"].createElement(TagLabel, null, label)));
|
|
154
|
-
|
|
155
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
156
|
-
theme: colorsTheme.tag
|
|
157
|
-
}, _react["default"].createElement(StyledDxcTag, {
|
|
158
|
-
margin: margin,
|
|
159
|
-
onMouseEnter: function onMouseEnter() {
|
|
160
|
-
return changeIsHovered(true);
|
|
161
|
-
},
|
|
162
|
-
onMouseLeave: function onMouseLeave() {
|
|
163
|
-
return changeIsHovered(false);
|
|
164
|
-
},
|
|
165
|
-
onClick: clickHandler,
|
|
166
|
-
hasAction: onClick || linkHref
|
|
167
|
-
}, onClick ? _react["default"].createElement(StyledButton, {
|
|
168
|
-
tabIndex: tabIndex
|
|
169
|
-
}, tagContent) : linkHref ? _react["default"].createElement(StyledLink, {
|
|
170
|
-
tabIndex: tabIndex,
|
|
171
|
-
href: linkHref,
|
|
172
|
-
target: newWindow ? "_blank" : "_self"
|
|
173
|
-
}, tagContent) : tagContent));
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
var sizes = {
|
|
177
|
-
small: "42px",
|
|
178
|
-
medium: "240px",
|
|
179
|
-
large: "480px",
|
|
180
|
-
fillParent: "100%",
|
|
181
|
-
fitContent: "unset"
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
var calculateWidth = function calculateWidth(size) {
|
|
185
|
-
return sizes[size];
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
var StyledDxcTag = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
189
|
-
return props.theme.fontStyle;
|
|
190
|
-
}, function (_ref2) {
|
|
191
|
-
var hasAction = _ref2.hasAction;
|
|
192
|
-
return hasAction && "pointer" || "unset";
|
|
193
|
-
}, function (_ref3) {
|
|
194
|
-
var margin = _ref3.margin;
|
|
195
|
-
return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
|
|
196
|
-
}, function (_ref4) {
|
|
197
|
-
var margin = _ref4.margin;
|
|
198
|
-
return margin && margin.top ? _variables.spaces[margin.top] : "";
|
|
199
|
-
}, function (_ref5) {
|
|
200
|
-
var margin = _ref5.margin;
|
|
201
|
-
return margin && margin.right ? _variables.spaces[margin.right] : "";
|
|
202
|
-
}, function (_ref6) {
|
|
203
|
-
var margin = _ref6.margin;
|
|
204
|
-
return margin && margin.bottom ? _variables.spaces[margin.bottom] : "";
|
|
205
|
-
}, function (_ref7) {
|
|
206
|
-
var margin = _ref7.margin;
|
|
207
|
-
return margin && margin.left ? _variables.spaces[margin.left] : "";
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
var TagContent = _styledComponents["default"].div(_templateObject2(), function (_ref8) {
|
|
211
|
-
var labelPosition = _ref8.labelPosition;
|
|
212
|
-
return labelPosition === "before" && "row-reverse" || "row";
|
|
213
|
-
}, function (props) {
|
|
214
|
-
return calculateWidth(props.size);
|
|
215
|
-
}, function (props) {
|
|
216
|
-
return props.theme.height;
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
var StyledLink = _styledComponents["default"].a(_templateObject3());
|
|
220
|
-
|
|
221
|
-
var StyledButton = _styledComponents["default"].button(_templateObject4());
|
|
222
|
-
|
|
223
|
-
var TagIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
|
|
224
|
-
return props.theme.iconHeight;
|
|
225
|
-
}, function (props) {
|
|
226
|
-
return props.theme.iconWidth;
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
var TagIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
230
|
-
return props.theme.iconHeight;
|
|
231
|
-
}, function (props) {
|
|
232
|
-
return props.theme.iconWidth;
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
var IconContainer = _styledComponents["default"].div(_templateObject7(), function (_ref9) {
|
|
236
|
-
var iconBgColor = _ref9.iconBgColor;
|
|
237
|
-
return iconBgColor;
|
|
238
|
-
}, function (props) {
|
|
239
|
-
return props.theme.iconSectionWidth;
|
|
240
|
-
}, function (props) {
|
|
241
|
-
return props.theme.iconColor;
|
|
242
|
-
}, function (props) {
|
|
243
|
-
return props.theme.height;
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
var TagLabel = _styledComponents["default"].div(_templateObject8(), function (props) {
|
|
247
|
-
return props.theme.fontTextTransform;
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
DxcTag.propTypes = {
|
|
251
|
-
size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
|
|
252
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
253
|
-
iconSrc: _propTypes["default"].string,
|
|
254
|
-
iconBgColor: _propTypes["default"].string,
|
|
255
|
-
label: _propTypes["default"].string,
|
|
256
|
-
labelPosition: _propTypes["default"].oneOf(["before", "after"]),
|
|
257
|
-
linkHref: _propTypes["default"].string,
|
|
258
|
-
onClick: _propTypes["default"].func,
|
|
259
|
-
newWindow: _propTypes["default"].bool,
|
|
260
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
261
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
262
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
263
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
264
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
265
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
266
|
-
tabIndex: _propTypes["default"].number
|
|
267
|
-
};
|
|
268
|
-
DxcTag.defaultProps = {
|
|
269
|
-
icon: null,
|
|
270
|
-
iconSrc: null,
|
|
271
|
-
label: null,
|
|
272
|
-
margin: null,
|
|
273
|
-
linkHref: null,
|
|
274
|
-
onClick: null,
|
|
275
|
-
iconBgColor: "#6f2c91",
|
|
276
|
-
labelPosition: "after",
|
|
277
|
-
newWindow: false
|
|
278
|
-
};
|
|
279
|
-
var _default = DxcTag;
|
|
280
|
-
exports["default"] = _default;
|