@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
|
@@ -0,0 +1,60 @@
|
|
|
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 _Heading = _interopRequireDefault(require("../heading/Heading"));
|
|
17
|
+
|
|
18
|
+
var _Stack = _interopRequireDefault(require("../stack/Stack"));
|
|
19
|
+
|
|
20
|
+
var _Inset = _interopRequireDefault(require("../inset/Inset"));
|
|
21
|
+
|
|
22
|
+
var _templateObject, _templateObject2;
|
|
23
|
+
|
|
24
|
+
var DxcQuickNav = function DxcQuickNav(_ref) {
|
|
25
|
+
var title = _ref.title,
|
|
26
|
+
links = _ref.links;
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(QuickNavContainer, null, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
28
|
+
gutter: "small"
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
|
|
30
|
+
level: 4,
|
|
31
|
+
text: title
|
|
32
|
+
}), /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
33
|
+
gutter: "xsmall"
|
|
34
|
+
}, links.map(function (link) {
|
|
35
|
+
var _link$links;
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
|
|
38
|
+
space: "xxsmall"
|
|
39
|
+
}, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
40
|
+
gutter: "xsmall"
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement(Link, {
|
|
42
|
+
href: "#".concat(link === null || link === void 0 ? void 0 : link.id)
|
|
43
|
+
}, link === null || link === void 0 ? void 0 : link.label), (_link$links = link.links) === null || _link$links === void 0 ? void 0 : _link$links.map(function (sublink) {
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
|
|
45
|
+
horizontal: "xsmall"
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
47
|
+
gutter: "xsmall"
|
|
48
|
+
}, /*#__PURE__*/_react["default"].createElement(Link, {
|
|
49
|
+
href: "#".concat(sublink === null || sublink === void 0 ? void 0 : sublink.id)
|
|
50
|
+
}, sublink === null || sublink === void 0 ? void 0 : sublink.label)));
|
|
51
|
+
})));
|
|
52
|
+
}))));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var QuickNavContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n padding: 5px 15px;\n border-left: 2px solid #bfbfbf;\n"])));
|
|
56
|
+
|
|
57
|
+
var Link = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n font-size: 14px;\n color: #666666;\n &:hover {\n color: #ab63cf;\n }\n &:focus {\n border-radius: 2px;\n border-color: #0095ff;\n }\n"])));
|
|
58
|
+
|
|
59
|
+
var _default = DxcQuickNav;
|
|
60
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import DxcQuickNav from "./QuickNav";
|
|
4
|
+
import DxcHeading from "../heading/Heading";
|
|
5
|
+
import DxcText from "../text/Text";
|
|
6
|
+
import Title from "../../.storybook/components/Title";
|
|
7
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "QuickNav",
|
|
11
|
+
component: DxcQuickNav,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const links = [
|
|
15
|
+
{
|
|
16
|
+
label: "Overview",
|
|
17
|
+
id: "overview",
|
|
18
|
+
links: [
|
|
19
|
+
{
|
|
20
|
+
label: "Introduction",
|
|
21
|
+
id: "introduction",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "Principles",
|
|
27
|
+
id: "principles",
|
|
28
|
+
links: [
|
|
29
|
+
{ label: "Color", id: "color" },
|
|
30
|
+
{ label: "Spacing", id: "spacing" },
|
|
31
|
+
{ label: "Typography", id: "typography" },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export const Chromatic = () => (
|
|
37
|
+
<>
|
|
38
|
+
<ExampleContainer>
|
|
39
|
+
<Title title="Default" level={4} />
|
|
40
|
+
<QuickNavContainer>
|
|
41
|
+
<DxcQuickNav title="Sections" links={links}></DxcQuickNav>
|
|
42
|
+
</QuickNavContainer>
|
|
43
|
+
</ExampleContainer>
|
|
44
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
45
|
+
<Title title="Link hovered" level={4} />
|
|
46
|
+
<QuickNavContainer>
|
|
47
|
+
<DxcQuickNav title="Sections" links={links}></DxcQuickNav>
|
|
48
|
+
</QuickNavContainer>
|
|
49
|
+
</ExampleContainer>
|
|
50
|
+
<ExampleContainer>
|
|
51
|
+
<Title title="QuickNav with content" level={4} />
|
|
52
|
+
<Container>
|
|
53
|
+
<ContentContainer>
|
|
54
|
+
<Content id="overview">
|
|
55
|
+
<DxcHeading level={1} text="Overview" margin={{ bottom: "small" }} />
|
|
56
|
+
<DxcText>
|
|
57
|
+
Halstack is the DXC Technology's open source design system for insurance products and digital experiences.
|
|
58
|
+
Our system provides all the tools and resources needed to create superior, beautiful but above all,
|
|
59
|
+
functional user experiences. Halstack is the DXC Technology's open source design system for insurance
|
|
60
|
+
products and digital experiences. Our system provides all the tools and resources needed to create
|
|
61
|
+
superior, beautiful but above all, functional user experiences.Halstack is the DXC Technology's open
|
|
62
|
+
source design system for insurance products and digital experiences. Our system provides all the tools and
|
|
63
|
+
resources needed to create superior, beautiful but above all, functional user experiences.Halstack is the
|
|
64
|
+
DXC Technology's open source design system for insurance products and digital experiences. Our system
|
|
65
|
+
provides all the tools and resources needed to create superior, beautiful but above all, functional user
|
|
66
|
+
experiences.Halstack is the DXC Technology's open source design system for insurance products and digital
|
|
67
|
+
experiences. Our system provides all the tools and resources needed to create superior, beautiful but
|
|
68
|
+
above all, functional user experiences.Halstack is the DXC Technology's open source design system for
|
|
69
|
+
insurance products and digital experiences. Our system provides all the tools and resources needed to
|
|
70
|
+
create superior, beautiful but above all, functional user experiences.Halstack is the DXC Technology's
|
|
71
|
+
open source design system for insurance products and digital experiences. Our system provides all the
|
|
72
|
+
tools and resources needed to create superior, beautiful but above all, functional user experiences.
|
|
73
|
+
</DxcText>
|
|
74
|
+
<Content id="introduction">
|
|
75
|
+
<DxcHeading level={2} text="Introduction" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
76
|
+
<DxcText>
|
|
77
|
+
Design principles Halstack design principles are the fundamental part of DXC Technology's approach to
|
|
78
|
+
provide guidance for development teams in order to deliver delightful and consistent user experiences to
|
|
79
|
+
our customers: Balance Consistency Visual hierarchy All our components, design tokens, accessibility
|
|
80
|
+
guidelines, responsive design techniques, and layout proposals have been carefully curated by DXC design
|
|
81
|
+
and engineering teams with the objective of creating a unique visual language and ecosystem for our
|
|
82
|
+
applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
|
|
83
|
+
design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
|
|
84
|
+
to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
|
|
85
|
+
design new features, or help us improve the project documentation. If you're interested, definitely
|
|
86
|
+
check out our contribution guidelines.Design principles Halstack design principles are the fundamental
|
|
87
|
+
part of DXC Technology's approach to provide guidance for development teams in order to deliver
|
|
88
|
+
delightful and consistent user experiences to our customers: Balance Consistency Visual hierarchy All
|
|
89
|
+
our components, design tokens, accessibility guidelines, responsive design techniques, and layout
|
|
90
|
+
proposals have been carefully curated by DXC design and engineering teams with the objective of creating
|
|
91
|
+
a unique visual language and ecosystem for our applications. This is the DXC way of creating User
|
|
92
|
+
Experiences. Open Source Halstack is an open source design system, this means that we work towards DXC
|
|
93
|
+
Technology bussines needs, but it is open for anyone to use and contribute back to. We are charmed to
|
|
94
|
+
receive external contributions to help us find bugs, design new features, or help us improve the project
|
|
95
|
+
documentation. If you're interested, definitely check out our contribution guidelines.Design principles
|
|
96
|
+
Halstack design principles are the fundamental part of DXC Technology's approach to provide guidance for
|
|
97
|
+
development teams in order to deliver delightful and consistent user experiences to our customers:
|
|
98
|
+
Balance Consistency Visual hierarchy All our components, design tokens, accessibility guidelines,
|
|
99
|
+
responsive design techniques, and layout proposals have been carefully curated by DXC design and
|
|
100
|
+
engineering teams with the objective of creating a unique visual language and ecosystem for our
|
|
101
|
+
applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
|
|
102
|
+
design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
|
|
103
|
+
to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
|
|
104
|
+
design new features, or help us improve the project documentation. If you're interested, definitely
|
|
105
|
+
check out our contribution guidelines.
|
|
106
|
+
</DxcText>
|
|
107
|
+
</Content>
|
|
108
|
+
</Content>
|
|
109
|
+
<Content id="principles">
|
|
110
|
+
<DxcHeading level={1} text="Principles" margin={{ top: "small", bottom: "xsmall" }} />
|
|
111
|
+
<Content id="color">
|
|
112
|
+
<DxcHeading level={2} text="Color" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
113
|
+
<DxcText>
|
|
114
|
+
The color palette is an essential asset as a communication resource of our design system. Halstack color
|
|
115
|
+
palette brings a unified consistency and helps in guiding the user's perception order. Our color palette
|
|
116
|
+
is based in the HSL model . All our color families are calculated using the lightness value of the
|
|
117
|
+
standard DXC palette colors. Color Tokens Halstack uses tokens to manage color. Appart from a
|
|
118
|
+
multi-purpose greyscale family, purple and blue are the core color families used in our set of
|
|
119
|
+
components. Additional families as red, green and yellow help as feedback role-based color palettes and
|
|
120
|
+
must not be used outside this context.The color palette is an essential asset as a communication
|
|
121
|
+
resource of our design system. Halstack color palette brings a unified consistency and helps in guiding
|
|
122
|
+
the user's perception order. Our color palette is based in the HSL model . All our color families are
|
|
123
|
+
calculated using the lightness value of the standard DXC palette colors. Color Tokens Halstack uses
|
|
124
|
+
tokens to manage color. Appart from a multi-purpose greyscale family, purple and blue are the core color
|
|
125
|
+
families used in our set of components. Additional families as red, green and yellow help as feedback
|
|
126
|
+
role-based color palettes and must not be used outside this context.The color palette is an essential
|
|
127
|
+
asset as a communication resource of our design system. Halstack color palette brings a unified
|
|
128
|
+
consistency and helps in guiding the user's perception order. Our color palette is based in the HSL
|
|
129
|
+
model . All our color families are calculated using the lightness value of the standard DXC palette
|
|
130
|
+
colors. Color Tokens Halstack uses tokens to manage color. Appart from a multi-purpose greyscale family,
|
|
131
|
+
purple and blue are the core color families used in our set of components. Additional families as red,
|
|
132
|
+
green and yellow help as feedback role-based color palettes and must not be used outside this
|
|
133
|
+
context.The color palette is an essential asset as a communication resource of our design system.
|
|
134
|
+
Halstack color palette brings a unified consistency and helps in guiding the user's perception order.
|
|
135
|
+
Our color palette is based in the HSL model . All our color families are calculated using the lightness
|
|
136
|
+
value of the standard DXC palette colors. Color Tokens Halstack uses tokens to manage color. Appart from
|
|
137
|
+
a multi-purpose greyscale family, purple and blue are the core color families used in our set of
|
|
138
|
+
components. Additional families as red, green and yellow help as feedback role-based color palettes and
|
|
139
|
+
must not be used outside this context.The color palette is an essential asset as a communication
|
|
140
|
+
resource of our design system. Halstack color palette brings a unified consistency and helps in guiding
|
|
141
|
+
the user's perception order. Our color palette is based in the HSL model . All our color families are
|
|
142
|
+
calculated using the lightness value of the standard DXC palette colors. Color Tokens Halstack uses
|
|
143
|
+
tokens to manage color. Appart from a multi-purpose greyscale family, purple and blue are the core color
|
|
144
|
+
families used in our set of components. Additional families as red, green and yellow help as feedback
|
|
145
|
+
role-based color palettes and must not be used outside this context.
|
|
146
|
+
</DxcText>
|
|
147
|
+
</Content>
|
|
148
|
+
<Content id="spacing">
|
|
149
|
+
<DxcHeading level={2} text="Spacing" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
150
|
+
<DxcText>
|
|
151
|
+
In the search of consistent alignment between the elements we provide a spacing scale based on a root
|
|
152
|
+
values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and consistent,
|
|
153
|
+
yet distinct enough, steps between them.In the search of consistent alignment between the elements we
|
|
154
|
+
provide a spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are easily
|
|
155
|
+
multiplied, they provide flexible and consistent, yet distinct enough, steps between them.In the search
|
|
156
|
+
of consistent alignment between the elements we provide a spacing scale based on a root values of 8px
|
|
157
|
+
and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and consistent, yet distinct
|
|
158
|
+
enough, steps between them.In the search of consistent alignment between the elements we provide a
|
|
159
|
+
spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they
|
|
160
|
+
provide flexible and consistent, yet distinct enough, steps between them.In the search of consistent
|
|
161
|
+
alignment between the elements we provide a spacing scale based on a root values of 8px and 4px. The
|
|
162
|
+
numbers 4 and 8 are easily multiplied, they provide flexible and consistent, yet distinct enough, steps
|
|
163
|
+
between them.In the search of consistent alignment between the elements we provide a spacing scale based
|
|
164
|
+
on a root values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and
|
|
165
|
+
consistent, yet distinct enough, steps between them.In the search of consistent alignment between the
|
|
166
|
+
elements we provide a spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are
|
|
167
|
+
easily multiplied, they provide flexible and consistent, yet distinct enough, steps between them.
|
|
168
|
+
</DxcText>
|
|
169
|
+
</Content>
|
|
170
|
+
<Content id="typography">
|
|
171
|
+
<DxcHeading level={2} text="Typography" margin={{ top: "xsmall", bottom: "xsmall" }} />
|
|
172
|
+
<DxcText>
|
|
173
|
+
Our selected typography helps in structuring our user's experience based on the visual impact that it
|
|
174
|
+
has on the user interface content. It defines what is the first noticeable piece of information or data
|
|
175
|
+
based on the font shape, size, color, or type and it highlights some pieces of text over the rest. Some
|
|
176
|
+
typographic elements used in Halstack Design System include headers, body, taglines, captions, and
|
|
177
|
+
labels. Make sure you include all the different typographic variants in order to enhance the
|
|
178
|
+
application's content structure, including the Heading component which defines different levels of page
|
|
179
|
+
and section titles.Our selected typography helps in structuring our user's experience based on the
|
|
180
|
+
visual impact that it has on the user interface content. It defines what is the first noticeable piece
|
|
181
|
+
of information or data based on the font shape, size, color, or type and it highlights some pieces of
|
|
182
|
+
text over the rest. Some typographic elements used in Halstack Design System include headers, body,
|
|
183
|
+
taglines, captions, and labels. Make sure you include all the different typographic variants in order to
|
|
184
|
+
enhance the application's content structure, including the Heading component which defines different
|
|
185
|
+
levels of page and section titles.Our selected typography helps in structuring our user's experience
|
|
186
|
+
based on the visual impact that it has on the user interface content. It defines what is the first
|
|
187
|
+
noticeable piece of information or data based on the font shape, size, color, or type and it highlights
|
|
188
|
+
some pieces of text over the rest. Some typographic elements used in Halstack Design System include
|
|
189
|
+
headers, body, taglines, captions, and labels. Make sure you include all the different typographic
|
|
190
|
+
variants in order to enhance the application's content structure, including the Heading component which
|
|
191
|
+
defines different levels of page and section titles.Our selected typography helps in structuring our
|
|
192
|
+
user's experience based on the visual impact that it has on the user interface content. It defines what
|
|
193
|
+
is the first noticeable piece of information or data based on the font shape, size, color, or type and
|
|
194
|
+
it highlights some pieces of text over the rest. Some typographic elements used in Halstack Design
|
|
195
|
+
System include headers, body, taglines, captions, and labels. Make sure you include all the different
|
|
196
|
+
typographic variants in order to enhance the application's content structure, including the Heading
|
|
197
|
+
component which defines different levels of page and section titles.Our selected typography helps in
|
|
198
|
+
structuring our user's experience based on the visual impact that it has on the user interface content.
|
|
199
|
+
It defines what is the first noticeable piece of information or data based on the font shape, size,
|
|
200
|
+
color, or type and it highlights some pieces of text over the rest. Some typographic elements used in
|
|
201
|
+
Halstack Design System include headers, body, taglines, captions, and labels. Make sure you include all
|
|
202
|
+
the different typographic variants in order to enhance the application's content structure, including
|
|
203
|
+
the Heading component which defines different levels of page and section titles.
|
|
204
|
+
</DxcText>
|
|
205
|
+
</Content>
|
|
206
|
+
</Content>
|
|
207
|
+
</ContentContainer>
|
|
208
|
+
<QuickNavContainer>
|
|
209
|
+
<DxcQuickNav title="Sections" links={links}></DxcQuickNav>
|
|
210
|
+
</QuickNavContainer>
|
|
211
|
+
</Container>
|
|
212
|
+
</ExampleContainer>
|
|
213
|
+
</>
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
const Container = styled.div`
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
width: 100%;
|
|
220
|
+
`;
|
|
221
|
+
|
|
222
|
+
const ContentContainer = styled.div`
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
padding: 60px;
|
|
226
|
+
margin: 0 auto;
|
|
227
|
+
width: 800px;
|
|
228
|
+
`;
|
|
229
|
+
|
|
230
|
+
const Content = styled.div``;
|
|
231
|
+
|
|
232
|
+
const QuickNavContainer = styled.div`
|
|
233
|
+
max-height: calc(100vh - 100px);
|
|
234
|
+
position: sticky;
|
|
235
|
+
top: 100px;
|
|
236
|
+
width: 300px;
|
|
237
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare type Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Title of the quick nav component.
|
|
4
|
+
*/
|
|
5
|
+
title: string;
|
|
6
|
+
/**
|
|
7
|
+
* Links to be shown inside the quick nav component.
|
|
8
|
+
*/
|
|
9
|
+
links: Link[];
|
|
10
|
+
};
|
|
11
|
+
declare type Link = {
|
|
12
|
+
/**
|
|
13
|
+
* Label to be shown in the link.
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Id used to navigate to the section that the link refers. This id must be passed to the wrapper that contains the section to make possible the navigation.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sublinks of the link.
|
|
22
|
+
*/
|
|
23
|
+
links?: Link[];
|
|
24
|
+
};
|
|
25
|
+
export default Props;
|
package/radio/Radio.d.ts
ADDED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
13
|
|
|
16
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
@@ -23,43 +21,28 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
23
21
|
|
|
24
22
|
var _Radio = _interopRequireDefault(require("@material-ui/core/Radio"));
|
|
25
23
|
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
24
|
var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
|
|
29
25
|
|
|
30
26
|
var _variables = require("../common/variables.js");
|
|
31
27
|
|
|
32
28
|
var _utils = require("../common/utils.js");
|
|
33
29
|
|
|
34
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
35
|
-
|
|
36
|
-
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n cursor: ", ";\n"]);
|
|
32
|
+
var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
34
|
+
var _templateObject, _templateObject2;
|
|
47
35
|
|
|
48
|
-
function
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n display: inline-flex;\n align-items: center;\n max-height: 42px;\n position: relative;\n flex-direction: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n .MuiButtonBase-root {\n width: auto;\n height: auto;\n padding: 10px;\n margin: 2px;\n ", ": ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin-left: ", ";\n margin-right: ", ";\n .MuiIconButton-label {\n .MuiSvgIcon-root {\n height: ", ";\n width: ", ";\n }\n color: ", ";\n\n > div > :nth-child(2) path {\n color: ", ";\n }\n }\n\n &.Mui-focusVisible {\n background-color: transparent;\n .MuiSvgIcon-root {\n outline: ", "\n auto 1px;\n }\n }\n :hover {\n background-color: transparent;\n }\n .MuiTouchRipple-ripple {\n height: 40px !important;\n width: 40px !important;\n top: 0px !important;\n left: 0px !important;\n }\n }\n .MuiRadio-colorSecondary.Mui-checked {\n color: ", ";\n :hover {\n background-color: transparent;\n }\n }\n"]);
|
|
36
|
+
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); }
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
38
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
57
39
|
|
|
58
40
|
var DxcRadio = function DxcRadio(_ref) {
|
|
59
41
|
var _ref$checked = _ref.checked,
|
|
60
42
|
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
61
43
|
value = _ref.value,
|
|
62
|
-
label = _ref.label,
|
|
44
|
+
_ref$label = _ref.label,
|
|
45
|
+
label = _ref$label === void 0 ? "" : _ref$label,
|
|
63
46
|
_ref$labelPosition = _ref.labelPosition,
|
|
64
47
|
labelPosition = _ref$labelPosition === void 0 ? "before" : _ref$labelPosition,
|
|
65
48
|
name = _ref.name,
|
|
@@ -80,7 +63,7 @@ var DxcRadio = function DxcRadio(_ref) {
|
|
|
80
63
|
var colorsTheme = (0, _useTheme["default"])();
|
|
81
64
|
var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
|
|
82
65
|
|
|
83
|
-
var handlerRadioChange = function handlerRadioChange(
|
|
66
|
+
var handlerRadioChange = function handlerRadioChange() {
|
|
84
67
|
if (checked == null) {
|
|
85
68
|
setInnerChecked(true);
|
|
86
69
|
}
|
|
@@ -90,30 +73,29 @@ var DxcRadio = function DxcRadio(_ref) {
|
|
|
90
73
|
}
|
|
91
74
|
};
|
|
92
75
|
|
|
93
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
94
77
|
theme: colorsTheme.radio
|
|
95
|
-
}, _react["default"].createElement(RadioContainer, {
|
|
78
|
+
}, /*#__PURE__*/_react["default"].createElement(RadioContainer, {
|
|
96
79
|
id: name,
|
|
97
80
|
labelPosition: labelPosition,
|
|
98
81
|
disabled: disabled,
|
|
99
82
|
margin: margin,
|
|
100
83
|
size: size,
|
|
101
84
|
backgroundType: backgroundType
|
|
102
|
-
}, _react["default"].createElement(_Radio["default"], {
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
|
103
86
|
checked: checked != null && checked || innerChecked,
|
|
104
87
|
name: name,
|
|
105
88
|
onClick: handlerRadioChange,
|
|
106
89
|
value: value,
|
|
107
|
-
label: label,
|
|
108
90
|
disabled: disabled,
|
|
109
91
|
disableRipple: true
|
|
110
|
-
}), _react["default"].createElement(LabelContainer, {
|
|
92
|
+
}), /*#__PURE__*/_react["default"].createElement(LabelContainer, {
|
|
111
93
|
checked: checked || innerChecked,
|
|
112
94
|
labelPosition: labelPosition,
|
|
113
95
|
disabled: disabled,
|
|
114
96
|
onClick: !disabled && handlerRadioChange || null,
|
|
115
97
|
backgroundType: backgroundType
|
|
116
|
-
}, required && _react["default"].createElement(_RequiredComponent["default"], null), label)));
|
|
98
|
+
}, required && /*#__PURE__*/_react["default"].createElement(_RequiredComponent["default"], null), label)));
|
|
117
99
|
};
|
|
118
100
|
|
|
119
101
|
var sizes = {
|
|
@@ -132,7 +114,7 @@ var calculateWidth = function calculateWidth(margin, size) {
|
|
|
132
114
|
return sizes[size];
|
|
133
115
|
};
|
|
134
116
|
|
|
135
|
-
var RadioContainer = _styledComponents["default"].span(_templateObject(), function (props) {
|
|
117
|
+
var RadioContainer = _styledComponents["default"].span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n display: inline-flex;\n align-items: center;\n max-height: 42px;\n position: relative;\n flex-direction: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n .MuiButtonBase-root {\n width: auto;\n height: auto;\n padding: 10px;\n margin: 2px;\n ", ": ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin-left: ", ";\n margin-right: ", ";\n .MuiIconButton-label {\n .MuiSvgIcon-root {\n height: ", ";\n width: ", ";\n }\n color: ", ";\n\n > div > :nth-child(2) path {\n color: ", ";\n }\n }\n\n &.Mui-focusVisible {\n background-color: transparent;\n .MuiSvgIcon-root {\n outline: ", "\n auto 1px;\n }\n }\n :hover {\n background-color: transparent;\n }\n .MuiTouchRipple-ripple {\n height: 40px !important;\n width: 40px !important;\n top: 0px !important;\n left: 0px !important;\n }\n }\n .MuiRadio-colorSecondary.Mui-checked {\n color: ", ";\n :hover {\n background-color: transparent;\n }\n }\n"])), function (props) {
|
|
136
118
|
return calculateWidth(props.margin, props.size);
|
|
137
119
|
}, function (props) {
|
|
138
120
|
return props.labelPosition === "before" ? "row-reverse" : "row";
|
|
@@ -174,7 +156,7 @@ var RadioContainer = _styledComponents["default"].span(_templateObject(), functi
|
|
|
174
156
|
return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.colorOnDark : props.disabled && props.theme.disabledColor || props.theme.color;
|
|
175
157
|
});
|
|
176
158
|
|
|
177
|
-
var LabelContainer = _styledComponents["default"].span(_templateObject2(), function (props) {
|
|
159
|
+
var LabelContainer = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n cursor: ", ";\n"])), function (props) {
|
|
178
160
|
return props.theme.fontFamily;
|
|
179
161
|
}, function (props) {
|
|
180
162
|
return props.theme.fontSize;
|
|
@@ -188,22 +170,5 @@ var LabelContainer = _styledComponents["default"].span(_templateObject2(), funct
|
|
|
188
170
|
return props.disabled === true ? "not-allowed" : "pointer";
|
|
189
171
|
});
|
|
190
172
|
|
|
191
|
-
DxcRadio.propTypes = {
|
|
192
|
-
size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
|
|
193
|
-
checked: _propTypes["default"].bool,
|
|
194
|
-
value: _propTypes["default"].any,
|
|
195
|
-
label: _propTypes["default"].string,
|
|
196
|
-
labelPosition: _propTypes["default"].oneOf(["after", "before", ""]),
|
|
197
|
-
name: _propTypes["default"].string,
|
|
198
|
-
disabled: _propTypes["default"].bool,
|
|
199
|
-
onClick: _propTypes["default"].func,
|
|
200
|
-
required: _propTypes["default"].bool,
|
|
201
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
202
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
203
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
204
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
205
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
206
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
207
|
-
};
|
|
208
173
|
var _default = DxcRadio;
|
|
209
174
|
exports["default"] = _default;
|