@dxc-technology/halstack-react 0.0.0-d0ecadd → 0.0.0-d123a22
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 +1 -10
- package/BackgroundColorContext.js +5 -22
- package/HalstackContext.d.ts +1240 -6
- package/HalstackContext.js +126 -111
- package/README.md +47 -0
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +101 -159
- package/accordion/Accordion.stories.tsx +82 -148
- package/accordion/Accordion.test.d.ts +1 -0
- package/accordion/Accordion.test.js +24 -40
- package/accordion/types.d.ts +6 -17
- package/accordion-group/AccordionGroup.accessibility.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.accessibility.test.js +82 -0
- package/accordion-group/AccordionGroup.d.ts +2 -2
- package/accordion-group/AccordionGroup.js +31 -98
- package/accordion-group/AccordionGroup.stories.tsx +94 -67
- package/accordion-group/AccordionGroup.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.test.js +49 -106
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +12 -17
- package/action-icon/ActionIcon.accessibility.test.d.ts +1 -0
- package/action-icon/ActionIcon.accessibility.test.js +63 -0
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +48 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.d.ts +1 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.accessibility.test.d.ts +1 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.js +37 -127
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.d.ts +1 -0
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.accessibility.test.d.ts +1 -0
- package/badge/Badge.accessibility.test.js +129 -0
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +142 -42
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.d.ts +1 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/Bleed.stories.tsx +64 -63
- package/bleed/types.d.ts +2 -2
- package/box/Box.accessibility.test.d.ts +1 -0
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +19 -60
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.d.ts +1 -0
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -14
- package/breadcrumbs/Breadcrumbs.accessibility.test.d.ts +1 -0
- package/breadcrumbs/Breadcrumbs.accessibility.test.js +96 -0
- package/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/breadcrumbs/Breadcrumbs.js +79 -0
- package/breadcrumbs/Breadcrumbs.stories.tsx +194 -0
- package/breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/breadcrumbs/Breadcrumbs.test.js +169 -0
- package/breadcrumbs/Item.d.ts +4 -0
- package/breadcrumbs/Item.js +52 -0
- package/breadcrumbs/dropdownTheme.d.ts +53 -0
- package/breadcrumbs/dropdownTheme.js +62 -0
- package/breadcrumbs/types.d.ts +16 -0
- package/bulleted-list/BulletedList.accessibility.test.d.ts +1 -0
- package/bulleted-list/BulletedList.accessibility.test.js +119 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +92 -0
- package/bulleted-list/BulletedList.stories.tsx +115 -0
- package/bulleted-list/types.d.ts +38 -0
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +64 -117
- package/button/Button.stories.tsx +151 -100
- package/button/Button.test.d.ts +1 -0
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +12 -8
- package/card/Card.accessibility.test.d.ts +1 -0
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.d.ts +1 -1
- package/card/Card.js +49 -89
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.d.ts +1 -0
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +6 -11
- package/checkbox/Checkbox.accessibility.test.d.ts +1 -0
- package/checkbox/Checkbox.accessibility.test.js +87 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +138 -183
- package/checkbox/Checkbox.stories.tsx +128 -94
- package/checkbox/Checkbox.test.d.ts +1 -0
- package/checkbox/Checkbox.test.js +159 -38
- package/checkbox/types.d.ts +11 -3
- package/chip/Chip.accessibility.test.d.ts +1 -0
- package/chip/Chip.accessibility.test.js +67 -0
- package/chip/Chip.js +45 -80
- package/chip/Chip.stories.tsx +107 -27
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +17 -32
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +6 -12
- package/common/variables.d.ts +1392 -0
- package/common/variables.js +993 -1199
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.accessibility.test.js +98 -0
- package/contextual-menu/ContextualMenu.d.ts +5 -0
- package/contextual-menu/ContextualMenu.js +88 -0
- package/contextual-menu/ContextualMenu.stories.tsx +232 -0
- package/contextual-menu/ContextualMenu.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.test.js +205 -0
- package/contextual-menu/GroupItem.d.ts +4 -0
- package/contextual-menu/GroupItem.js +67 -0
- package/contextual-menu/ItemAction.d.ts +4 -0
- package/contextual-menu/ItemAction.js +51 -0
- package/contextual-menu/MenuItem.d.ts +4 -0
- package/contextual-menu/MenuItem.js +29 -0
- package/contextual-menu/SingleItem.d.ts +4 -0
- package/contextual-menu/SingleItem.js +38 -0
- package/contextual-menu/types.d.ts +58 -0
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +214 -0
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +230 -0
- package/date-input/DateInput.js +149 -299
- package/date-input/DateInput.stories.tsx +210 -56
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +700 -370
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +121 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +100 -0
- package/date-input/types.d.ts +72 -15
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +61 -106
- package/dialog/Dialog.stories.tsx +325 -167
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +350 -19
- package/dialog/types.d.ts +18 -25
- package/divider/Divider.accessibility.test.d.ts +1 -0
- package/divider/Divider.accessibility.test.js +33 -0
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.d.ts +1 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.js +184 -0
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +232 -303
- package/dropdown/Dropdown.stories.tsx +235 -57
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +604 -164
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +63 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +71 -0
- package/dropdown/types.d.ts +35 -19
- package/file-input/FileInput.accessibility.test.d.ts +1 -0
- package/file-input/FileInput.accessibility.test.js +167 -0
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +240 -393
- package/file-input/FileInput.stories.tsx +123 -12
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +314 -367
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +56 -117
- package/file-input/types.d.ts +25 -8
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +57 -0
- package/flex/Flex.stories.tsx +112 -0
- package/flex/types.d.ts +97 -0
- package/footer/Footer.accessibility.test.d.ts +1 -0
- package/footer/Footer.accessibility.test.js +125 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +73 -118
- package/footer/Footer.stories.tsx +99 -21
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +32 -56
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +53 -22
- package/footer/types.d.ts +26 -27
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/grid/types.js +5 -0
- package/header/Header.accessibility.test.d.ts +1 -0
- package/header/Header.accessibility.test.js +94 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +90 -183
- package/header/Header.stories.tsx +133 -38
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +5 -15
- package/header/types.d.ts +7 -21
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +33 -0
- package/heading/Heading.js +10 -32
- package/heading/Heading.test.d.ts +1 -0
- package/heading/Heading.test.js +64 -94
- package/heading/types.d.ts +7 -7
- package/icon/Icon.accessibility.test.d.ts +1 -0
- package/icon/Icon.accessibility.test.js +30 -0
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +28 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.accessibility.test.d.ts +1 -0
- package/image/Image.accessibility.test.js +56 -0
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +129 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.js +13 -21
- package/inset/Inset.stories.tsx +5 -4
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +15 -6
- package/layout/ApplicationLayout.js +56 -118
- package/layout/ApplicationLayout.stories.tsx +81 -45
- package/layout/Icons.d.ts +7 -5
- package/layout/Icons.js +41 -59
- package/layout/types.d.ts +21 -32
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +108 -0
- package/link/Link.js +32 -51
- package/link/Link.stories.tsx +76 -9
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +23 -43
- package/link/types.d.ts +14 -14
- package/main.d.ts +15 -13
- package/main.js +66 -103
- package/nav-tabs/NavTabs.accessibility.test.d.ts +1 -0
- package/nav-tabs/NavTabs.accessibility.test.js +44 -0
- package/nav-tabs/NavTabs.d.ts +7 -0
- package/nav-tabs/NavTabs.js +108 -0
- package/nav-tabs/NavTabs.stories.tsx +294 -0
- package/nav-tabs/NavTabs.test.d.ts +1 -0
- package/nav-tabs/NavTabs.test.js +77 -0
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +117 -0
- package/{tabs-nav → nav-tabs}/types.d.ts +15 -16
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +228 -0
- package/number-input/NumberInput.js +46 -36
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +859 -376
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +17 -5
- package/package.json +51 -54
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +79 -0
- package/paginator/Paginator.js +35 -68
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.d.ts +1 -0
- package/paginator/Paginator.test.js +252 -225
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.accessibility.test.d.ts +1 -0
- package/paragraph/Paragraph.accessibility.test.js +28 -0
- package/paragraph/Paragraph.d.ts +5 -0
- package/paragraph/Paragraph.js +22 -0
- package/paragraph/Paragraph.stories.tsx +27 -0
- package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
- package/password-input/PasswordInput.accessibility.test.js +153 -0
- package/password-input/PasswordInput.js +58 -127
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +159 -141
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.js +68 -92
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +39 -4
- package/progress-bar/ProgressBar.test.d.ts +1 -0
- package/progress-bar/ProgressBar.test.js +71 -43
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.accessibility.test.d.ts +1 -0
- package/quick-nav/QuickNav.accessibility.test.js +57 -0
- package/quick-nav/QuickNav.js +22 -44
- package/quick-nav/QuickNav.stories.tsx +146 -27
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +59 -79
- package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
- package/radio-group/RadioGroup.accessibility.test.js +97 -0
- package/radio-group/RadioGroup.js +70 -119
- package/radio-group/RadioGroup.stories.tsx +132 -18
- package/radio-group/RadioGroup.test.d.ts +1 -0
- package/radio-group/RadioGroup.test.js +518 -459
- package/radio-group/types.d.ts +10 -10
- package/resultset-table/Icons.d.ts +7 -0
- package/resultset-table/Icons.js +47 -0
- package/resultset-table/ResultsetTable.accessibility.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.accessibility.test.js +285 -0
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/resultset-table/ResultsetTable.js +171 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +168 -30
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.test.js +380 -0
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Listbox.js +40 -64
- package/select/Option.js +35 -56
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +228 -0
- package/select/Select.js +147 -207
- package/select/Select.stories.tsx +496 -203
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +1922 -1816
- package/select/types.d.ts +17 -20
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +132 -78
- package/sidenav/Sidenav.stories.tsx +246 -151
- package/sidenav/Sidenav.test.d.ts +1 -0
- package/sidenav/Sidenav.test.js +25 -44
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +52 -26
- package/slider/Slider.accessibility.test.d.ts +1 -0
- package/slider/Slider.accessibility.test.js +104 -0
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +146 -181
- package/slider/Slider.stories.tsx +64 -61
- package/slider/Slider.test.d.ts +1 -0
- package/slider/Slider.test.js +195 -88
- package/slider/types.d.ts +7 -3
- package/spinner/Spinner.accessibility.test.d.ts +1 -0
- package/spinner/Spinner.accessibility.test.js +96 -0
- package/spinner/Spinner.js +34 -74
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -27
- package/spinner/Spinner.test.d.ts +1 -0
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.accessibility.test.d.ts +1 -0
- package/status-light/StatusLight.accessibility.test.js +157 -0
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.d.ts +1 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.accessibility.test.d.ts +1 -0
- package/switch/Switch.accessibility.test.js +98 -0
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +145 -129
- package/switch/Switch.stories.tsx +49 -60
- package/switch/Switch.test.d.ts +1 -0
- package/switch/Switch.test.js +137 -55
- package/switch/types.d.ts +7 -3
- package/table/DropdownTheme.js +62 -0
- package/table/Table.accessibility.test.d.ts +1 -0
- package/table/Table.accessibility.test.js +93 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +78 -35
- package/table/Table.stories.tsx +663 -0
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +93 -7
- package/table/types.d.ts +34 -6
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +117 -0
- package/tabs/Tabs.accessibility.test.d.ts +1 -0
- package/tabs/Tabs.accessibility.test.js +56 -0
- package/tabs/Tabs.js +303 -141
- package/tabs/Tabs.stories.tsx +124 -6
- package/tabs/Tabs.test.d.ts +1 -0
- package/tabs/Tabs.test.js +212 -76
- package/tabs/types.d.ts +30 -20
- package/tag/Tag.accessibility.test.d.ts +1 -0
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.js +35 -67
- package/tag/Tag.stories.tsx +18 -8
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +17 -36
- package/tag/types.d.ts +9 -9
- package/text-input/Suggestion.js +40 -28
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +94 -0
- package/text-input/TextInput.accessibility.test.d.ts +1 -0
- package/text-input/TextInput.accessibility.test.js +321 -0
- package/text-input/TextInput.js +311 -512
- package/text-input/TextInput.stories.tsx +276 -276
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +1418 -1374
- package/text-input/types.d.ts +43 -16
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.js +70 -115
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.d.ts +1 -0
- package/textarea/Textarea.test.js +151 -182
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.accessibility.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +92 -108
- package/toggle-group/ToggleGroup.stories.tsx +52 -7
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +28 -19
- package/typography/Typography.accessibility.test.d.ts +1 -0
- package/typography/Typography.accessibility.test.js +339 -0
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +23 -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 +1144 -1
- package/useTheme.js +2 -9
- package/useTranslatedLabels.d.ts +84 -1
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +94 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +124 -0
- package/wizard/Wizard.accessibility.test.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.js +34 -87
- package/wizard/Wizard.stories.tsx +59 -1
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +9 -9
- package/card/ice-cream.jpg +0 -0
- package/common/OpenSans.css +0 -81
- package/common/RequiredComponent.js +0 -32
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/inline/Inline.d.ts +0 -4
- package/inline/Inline.js +0 -56
- package/inline/Inline.stories.tsx +0 -264
- package/inline/types.d.ts +0 -32
- package/list/List.d.ts +0 -4
- package/list/List.js +0 -47
- package/list/List.stories.tsx +0 -89
- package/list/types.d.ts +0 -7
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/paginator/Icons.js +0 -66
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/resultsetTable/ResultsetTable.js +0 -254
- package/resultsetTable/ResultsetTable.test.js +0 -348
- package/row/Row.d.ts +0 -3
- package/row/Row.js +0 -127
- package/row/Row.stories.tsx +0 -237
- package/row/types.d.ts +0 -28
- package/select/Icons.d.ts +0 -10
- package/select/Icons.js +0 -93
- package/stack/Stack.d.ts +0 -4
- package/stack/Stack.js +0 -50
- package/stack/Stack.stories.tsx +0 -225
- package/stack/types.d.ts +0 -28
- package/table/Table.stories.jsx +0 -277
- package/tabs-nav/NavTabs.d.ts +0 -8
- package/tabs-nav/NavTabs.js +0 -125
- package/tabs-nav/NavTabs.stories.tsx +0 -170
- package/tabs-nav/NavTabs.test.js +0 -82
- package/tabs-nav/Tab.js +0 -132
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- package/textarea/Textarea.stories.jsx +0 -157
- /package/{inline → action-icon}/types.js +0 -0
- /package/{list → breadcrumbs}/types.js +0 -0
- /package/{resultsetTable → bulleted-list}/types.js +0 -0
- /package/{row → container}/types.js +0 -0
- /package/{stack → contextual-menu}/types.js +0 -0
- /package/{tabs-nav → divider}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → flex/types.js} +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
|
@@ -1,68 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
17
|
-
|
|
18
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
12
|
var _Header = _interopRequireDefault(require("../header/Header"));
|
|
21
|
-
|
|
22
13
|
var _Footer = _interopRequireDefault(require("../footer/Footer"));
|
|
23
|
-
|
|
24
14
|
var _Sidenav = _interopRequireDefault(require("../sidenav/Sidenav"));
|
|
25
|
-
|
|
26
15
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _Icons = require("./Icons");
|
|
31
|
-
|
|
32
|
-
var _uuid = require("uuid");
|
|
33
|
-
|
|
34
|
-
var _SidenavContext = require("./SidenavContext");
|
|
35
|
-
|
|
16
|
+
var _variables = require("../common/variables");
|
|
17
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
18
|
+
var _SidenavContext = require("../sidenav/SidenavContext");
|
|
36
19
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
37
|
-
|
|
38
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
20
|
+
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
21
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
44
24
|
var year = new Date().getFullYear();
|
|
45
|
-
|
|
46
|
-
var Header = function Header(_ref) {
|
|
25
|
+
var Main = function Main(_ref) {
|
|
47
26
|
var children = _ref.children;
|
|
48
27
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
|
|
49
28
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
var Footer = function Footer(_ref3) {
|
|
57
|
-
var children = _ref3.children;
|
|
58
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
var Sidenav = function Sidenav(_ref4) {
|
|
62
|
-
var childProps = (0, _extends2["default"])({}, _ref4);
|
|
63
|
-
return /*#__PURE__*/_react["default"].createElement(_Sidenav["default"], childProps, childProps.children);
|
|
29
|
+
var defaultHeader = function defaultHeader() {
|
|
30
|
+
return /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
31
|
+
underlined: true
|
|
32
|
+
});
|
|
64
33
|
};
|
|
65
|
-
|
|
66
34
|
var defaultFooter = function defaultFooter() {
|
|
67
35
|
return /*#__PURE__*/_react["default"].createElement(_Footer["default"], {
|
|
68
36
|
copyright: "\xA9 DXC Technology ".concat(year, "\u200B\u200B\u200B\u200B. All rights reserved."),
|
|
@@ -70,130 +38,100 @@ var defaultFooter = function defaultFooter() {
|
|
|
70
38
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
71
39
|
text: "Linkedin"
|
|
72
40
|
}, {
|
|
73
|
-
href: "https://
|
|
74
|
-
text: "
|
|
41
|
+
href: "https://x.com/dxctechnology",
|
|
42
|
+
text: "X"
|
|
75
43
|
}, {
|
|
76
44
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
77
45
|
text: "Facebook"
|
|
78
46
|
}],
|
|
79
47
|
socialLinks: [{
|
|
80
48
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
81
|
-
logo: _Icons.linkedinLogo
|
|
49
|
+
logo: _Icons["default"].linkedinLogo,
|
|
50
|
+
title: "Linkedin"
|
|
82
51
|
}, {
|
|
83
|
-
href: "https://
|
|
84
|
-
logo: _Icons.
|
|
52
|
+
href: "https://x.com/dxctechnology",
|
|
53
|
+
logo: _Icons["default"].xLogo,
|
|
54
|
+
title: "X"
|
|
85
55
|
}, {
|
|
86
56
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
87
|
-
logo: _Icons.facebookLogo
|
|
57
|
+
logo: _Icons["default"].facebookLogo,
|
|
58
|
+
title: "Facebook"
|
|
88
59
|
}]
|
|
89
60
|
});
|
|
90
61
|
};
|
|
91
|
-
|
|
92
|
-
var defaultHeader = function defaultHeader() {
|
|
93
|
-
return /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
94
|
-
underlined: true
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
|
|
98
62
|
var childTypeExists = function childTypeExists(children, childType) {
|
|
99
63
|
return children.find(function (child) {
|
|
100
64
|
return (child === null || child === void 0 ? void 0 : child.type) === childType;
|
|
101
65
|
});
|
|
102
66
|
};
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
67
|
+
var DxcApplicationLayout = function DxcApplicationLayout(_ref2) {
|
|
68
|
+
var _ref2$visibilityToggl = _ref2.visibilityToggleLabel,
|
|
69
|
+
visibilityToggleLabel = _ref2$visibilityToggl === void 0 ? "" : _ref2$visibilityToggl,
|
|
70
|
+
header = _ref2.header,
|
|
71
|
+
sidenav = _ref2.sidenav,
|
|
72
|
+
footer = _ref2.footer,
|
|
73
|
+
children = _ref2.children;
|
|
74
|
+
var _useState = (0, _react.useState)(false),
|
|
75
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
76
|
+
isSidenavVisibleResponsive = _useState2[0],
|
|
77
|
+
setIsSidenavVisibleResponsive = _useState2[1];
|
|
115
78
|
var _useState3 = (0, _react.useState)(false),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var _useState5 = (0, _react.useState)(false),
|
|
121
|
-
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
122
|
-
isResponsive = _useState6[0],
|
|
123
|
-
setIsResponsive = _useState6[1];
|
|
124
|
-
|
|
79
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
80
|
+
isResponsive = _useState4[0],
|
|
81
|
+
setIsResponsive = _useState4[1];
|
|
125
82
|
var ref = (0, _react.useRef)(null);
|
|
126
83
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
127
|
-
|
|
128
84
|
var childrenArray = _react["default"].Children.toArray(children);
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
var footer = childTypeExists(childrenArray, _Footer["default"]) || childTypeExists(childrenArray, Footer) || defaultFooter();
|
|
132
|
-
var sidenav = childTypeExists(childrenArray, Sidenav);
|
|
85
|
+
var headerContent = header || defaultHeader();
|
|
86
|
+
var footerContent = footer || defaultFooter();
|
|
133
87
|
var main = childTypeExists(childrenArray, Main);
|
|
134
|
-
|
|
135
|
-
var handleResize = function handleResize() {
|
|
88
|
+
var handleResize = (0, _react.useCallback)(function () {
|
|
136
89
|
setIsResponsive(window.matchMedia("(max-width: ".concat(_variables.responsiveSizes.medium, "rem)")).matches);
|
|
137
|
-
};
|
|
138
|
-
|
|
90
|
+
}, []);
|
|
139
91
|
var handleSidenavVisibility = function handleSidenavVisibility() {
|
|
140
92
|
setIsSidenavVisibleResponsive(function (isSidenavVisibleResponsive) {
|
|
141
93
|
return !isSidenavVisibleResponsive;
|
|
142
94
|
});
|
|
143
95
|
};
|
|
144
|
-
|
|
145
96
|
(0, _react.useEffect)(function () {
|
|
146
97
|
handleResize();
|
|
147
98
|
window.addEventListener("resize", handleResize);
|
|
148
99
|
return function () {
|
|
149
100
|
window.removeEventListener("resize", handleResize);
|
|
150
101
|
};
|
|
151
|
-
}, [
|
|
102
|
+
}, [handleResize]);
|
|
152
103
|
(0, _react.useEffect)(function () {
|
|
153
104
|
!isResponsive && setIsSidenavVisibleResponsive(false);
|
|
154
|
-
}, [isResponsive
|
|
105
|
+
}, [isResponsive]);
|
|
155
106
|
return /*#__PURE__*/_react["default"].createElement(ApplicationLayoutContainer, {
|
|
156
107
|
hasSidenav: sidenav ? true : false,
|
|
157
108
|
isSidenavVisible: isSidenavVisibleResponsive,
|
|
158
109
|
ref: ref
|
|
159
|
-
}, /*#__PURE__*/_react["default"].createElement(HeaderContainer, null,
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement(HeaderContainer, null, headerContent), sidenav && isResponsive && /*#__PURE__*/_react["default"].createElement(VisibilityToggle, null, /*#__PURE__*/_react["default"].createElement(HamburgerTrigger, {
|
|
160
111
|
onClick: handleSidenavVisibility,
|
|
161
|
-
"aria-labelledby": visibilityToggleLabel ? visibilityToggleLabelId : undefined,
|
|
162
112
|
"aria-label": visibilityToggleLabel ? undefined : translatedLabels.applicationLayout.visibilityToggleTitle,
|
|
163
113
|
title: translatedLabels.applicationLayout.visibilityToggleTitle
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
}, visibilityToggleLabel))
|
|
114
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
115
|
+
icon: "Menu"
|
|
116
|
+
}), visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
|
|
167
117
|
value: setIsSidenavVisibleResponsive
|
|
168
|
-
}, sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /*#__PURE__*/_react["default"].createElement(SidenavContainer, null, sidenav)), /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(MainContentContainer, null, main),
|
|
118
|
+
}, sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /*#__PURE__*/_react["default"].createElement(SidenavContainer, null, sidenav)), /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(MainContentContainer, null, main), footerContent)));
|
|
169
119
|
};
|
|
170
|
-
|
|
171
120
|
var ApplicationLayoutContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n\n @media (max-width: ", "rem) {\n ", ";\n ", "\n }\n"])), _variables.responsiveSizes.medium, function (props) {
|
|
172
|
-
return props.hasSidenav && "top:
|
|
121
|
+
return props.hasSidenav && "top: 116px";
|
|
173
122
|
}, function (props) {
|
|
174
123
|
return props.isSidenavVisible && "overflow: hidden;";
|
|
175
124
|
});
|
|
176
|
-
|
|
177
125
|
var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n"])));
|
|
178
|
-
|
|
179
126
|
var VisibilityToggle = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 64px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 4px 16px;\n width: 100%;\n background-color: #f2f2f2;\n user-select: none;\n z-index: 2;\n"])));
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
var
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
var SidenavContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n position: sticky;\n top: 64px;\n display: flex;\n height: calc(100vh - 64px);\n z-index: 1;\n\n @media (max-width: ", "rem) {\n position: fixed;\n top: 112px;\n }\n"])), _variables.responsiveSizes.medium);
|
|
188
|
-
|
|
189
|
-
var MainContainer = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
190
|
-
|
|
191
|
-
var MainContentContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n"])));
|
|
192
|
-
|
|
193
|
-
DxcApplicationLayout.Header = Header;
|
|
127
|
+
var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 12px 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n color: #000;\n cursor: pointer;\n\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n span::before {\n font-size: 20px;\n }\n"])));
|
|
128
|
+
var BodyContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex: 1;\n"])));
|
|
129
|
+
var SidenavContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n position: sticky;\n top: 64px;\n display: flex;\n height: calc(100vh - 64px);\n z-index: 1;\n\n @media (max-width: ", "rem) {\n position: absolute;\n top: 0px;\n height: 100%;\n }\n"])), _variables.responsiveSizes.medium);
|
|
130
|
+
var MainContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
131
|
+
var MainContentContainer = _styledComponents["default"].main(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n background-color: #fff;\n"])));
|
|
132
|
+
DxcApplicationLayout.Header = _Header["default"];
|
|
194
133
|
DxcApplicationLayout.Main = Main;
|
|
195
|
-
DxcApplicationLayout.Footer =
|
|
196
|
-
DxcApplicationLayout.SideNav =
|
|
134
|
+
DxcApplicationLayout.Footer = _Footer["default"];
|
|
135
|
+
DxcApplicationLayout.SideNav = _Sidenav["default"];
|
|
197
136
|
DxcApplicationLayout.useResponsiveSidenavVisibility = _SidenavContext.useResponsiveSidenavVisibility;
|
|
198
|
-
var _default = DxcApplicationLayout;
|
|
199
|
-
exports["default"] = _default;
|
|
137
|
+
var _default = exports["default"] = DxcApplicationLayout;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import DxcApplicationLayout from "./ApplicationLayout";
|
|
3
|
-
import DxcSidenav from "../sidenav/Sidenav";
|
|
4
3
|
import Title from "../../.storybook/components/Title";
|
|
5
4
|
import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
|
-
title: "Application Layout
|
|
7
|
+
title: "Application Layout",
|
|
9
8
|
component: DxcApplicationLayout,
|
|
10
9
|
parameters: {
|
|
11
10
|
viewport: {
|
|
@@ -30,15 +29,25 @@ export const DefaultApplicationLayout = () => (
|
|
|
30
29
|
|
|
31
30
|
export const ApplicationLayoutWithDefaultSidenav = () => (
|
|
32
31
|
<>
|
|
33
|
-
<DxcApplicationLayout
|
|
34
|
-
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
<DxcApplicationLayout
|
|
33
|
+
sidenav={
|
|
34
|
+
<DxcApplicationLayout.SideNav
|
|
35
|
+
title={
|
|
36
|
+
<DxcApplicationLayout.SideNav.Title>
|
|
37
|
+
Application layout with push sidenav
|
|
38
|
+
</DxcApplicationLayout.SideNav.Title>
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
<DxcApplicationLayout.SideNav.Section>
|
|
42
|
+
<p>SideNav Content</p>
|
|
43
|
+
<p>SideNav Content</p>
|
|
44
|
+
<p>SideNav Content</p>
|
|
45
|
+
<p>SideNav Content</p>
|
|
46
|
+
<p>SideNav Content</p>
|
|
47
|
+
</DxcApplicationLayout.SideNav.Section>
|
|
48
|
+
</DxcApplicationLayout.SideNav>
|
|
49
|
+
}
|
|
50
|
+
>
|
|
42
51
|
<DxcApplicationLayout.Main>
|
|
43
52
|
<p>Main Content</p>
|
|
44
53
|
<p>Main Content</p>
|
|
@@ -51,15 +60,26 @@ export const ApplicationLayoutWithDefaultSidenav = () => (
|
|
|
51
60
|
|
|
52
61
|
export const ApplicationLayoutWithResponsiveSidenav = () => (
|
|
53
62
|
<>
|
|
54
|
-
<DxcApplicationLayout
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
<DxcApplicationLayout
|
|
64
|
+
visibilityToggleLabel="Example"
|
|
65
|
+
sidenav={
|
|
66
|
+
<DxcApplicationLayout.SideNav
|
|
67
|
+
title={
|
|
68
|
+
<DxcApplicationLayout.SideNav.Title>
|
|
69
|
+
Application layout with push sidenav
|
|
70
|
+
</DxcApplicationLayout.SideNav.Title>
|
|
71
|
+
}
|
|
72
|
+
>
|
|
73
|
+
<DxcApplicationLayout.SideNav.Section>
|
|
74
|
+
<p>SideNav Content</p>
|
|
75
|
+
<p>SideNav Content</p>
|
|
76
|
+
<p>SideNav Content</p>
|
|
77
|
+
<p>SideNav Content</p>
|
|
78
|
+
<p>SideNav Content</p>
|
|
79
|
+
</DxcApplicationLayout.SideNav.Section>
|
|
80
|
+
</DxcApplicationLayout.SideNav>
|
|
81
|
+
}
|
|
82
|
+
>
|
|
63
83
|
<DxcApplicationLayout.Main>
|
|
64
84
|
<p>Main Content</p>
|
|
65
85
|
<p>Main Content</p>
|
|
@@ -74,23 +94,31 @@ ApplicationLayoutWithResponsiveSidenav.parameters = {
|
|
|
74
94
|
viewport: {
|
|
75
95
|
defaultViewport: "pixel",
|
|
76
96
|
},
|
|
97
|
+
chromatic: { viewports: [540] },
|
|
77
98
|
};
|
|
78
99
|
|
|
79
100
|
export const ApplicationLayoutWithCustomHeader = () => (
|
|
80
101
|
<>
|
|
81
|
-
<DxcApplicationLayout
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
<DxcApplicationLayout
|
|
103
|
+
header={<p>Custom Header</p>}
|
|
104
|
+
sidenav={
|
|
105
|
+
<DxcApplicationLayout.SideNav
|
|
106
|
+
title={
|
|
107
|
+
<DxcApplicationLayout.SideNav.Title>
|
|
108
|
+
Application layout with push sidenav
|
|
109
|
+
</DxcApplicationLayout.SideNav.Title>
|
|
110
|
+
}
|
|
111
|
+
>
|
|
112
|
+
<DxcApplicationLayout.SideNav.Section>
|
|
113
|
+
<p>SideNav Content</p>
|
|
114
|
+
<p>SideNav Content</p>
|
|
115
|
+
<p>SideNav Content</p>
|
|
116
|
+
<p>SideNav Content</p>
|
|
117
|
+
<p>SideNav Content</p>
|
|
118
|
+
</DxcApplicationLayout.SideNav.Section>
|
|
119
|
+
</DxcApplicationLayout.SideNav>
|
|
120
|
+
}
|
|
121
|
+
>
|
|
94
122
|
<DxcApplicationLayout.Main>
|
|
95
123
|
<p>Main Content</p>
|
|
96
124
|
<p>Main Content</p>
|
|
@@ -103,24 +131,32 @@ export const ApplicationLayoutWithCustomHeader = () => (
|
|
|
103
131
|
|
|
104
132
|
export const ApplicationLayoutWithCustomFooter = () => (
|
|
105
133
|
<>
|
|
106
|
-
<DxcApplicationLayout
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
134
|
+
<DxcApplicationLayout
|
|
135
|
+
footer={<p>Custom Footer</p>}
|
|
136
|
+
sidenav={
|
|
137
|
+
<DxcApplicationLayout.SideNav
|
|
138
|
+
title={
|
|
139
|
+
<DxcApplicationLayout.SideNav.Title>
|
|
140
|
+
Application layout with push sidenav
|
|
141
|
+
</DxcApplicationLayout.SideNav.Title>
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
<DxcApplicationLayout.SideNav.Section>
|
|
145
|
+
<p>SideNav Content</p>
|
|
146
|
+
<p>SideNav Content</p>
|
|
147
|
+
<p>SideNav Content</p>
|
|
148
|
+
<p>SideNav Content</p>
|
|
149
|
+
<p>SideNav Content</p>
|
|
150
|
+
</DxcApplicationLayout.SideNav.Section>
|
|
151
|
+
</DxcApplicationLayout.SideNav>
|
|
152
|
+
}
|
|
153
|
+
>
|
|
115
154
|
<DxcApplicationLayout.Main>
|
|
116
155
|
<p>Main Content</p>
|
|
117
156
|
<p>Main Content</p>
|
|
118
157
|
<p>Main Content</p>
|
|
119
158
|
<p>Main Content</p>
|
|
120
159
|
</DxcApplicationLayout.Main>
|
|
121
|
-
<DxcApplicationLayout.Footer>
|
|
122
|
-
<p>Custom Footer</p>
|
|
123
|
-
</DxcApplicationLayout.Footer>
|
|
124
160
|
</DxcApplicationLayout>
|
|
125
161
|
</>
|
|
126
162
|
);
|
package/layout/Icons.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const layoutIcons: {
|
|
3
|
+
facebookLogo: React.JSX.Element;
|
|
4
|
+
xLogo: React.JSX.Element;
|
|
5
|
+
linkedinLogo: React.JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default layoutIcons;
|
package/layout/Icons.js
CHANGED
|
@@ -1,66 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
52
|
-
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332 c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41 c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708 c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92 c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991 c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974 c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64 H370.873z"
|
|
53
|
-
})));
|
|
54
|
-
|
|
55
|
-
exports.linkedinLogo = linkedinLogo;
|
|
56
|
-
|
|
57
|
-
var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
-
height: "24",
|
|
60
|
-
width: "24",
|
|
61
|
-
viewBox: "0 0 24 24"
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
63
|
-
d: "M3 18V16H21V18ZM3 13V11H21V13ZM3 8V6H21V8Z"
|
|
64
|
-
}));
|
|
65
|
-
|
|
66
|
-
exports.hamburgerIcon = hamburgerIcon;
|
|
9
|
+
var layoutIcons = {
|
|
10
|
+
facebookLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
11
|
+
version: "1.1",
|
|
12
|
+
x: "0px",
|
|
13
|
+
y: "0px",
|
|
14
|
+
width: "438.536px",
|
|
15
|
+
height: "438.536px",
|
|
16
|
+
viewBox: "0 0 438.536 438.536",
|
|
17
|
+
fill: "#FFFFFF"
|
|
18
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
19
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402 c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401 c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
|
|
20
|
+
}))),
|
|
21
|
+
xLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
22
|
+
width: "256",
|
|
23
|
+
height: "256",
|
|
24
|
+
viewBox: "0 0 256 256",
|
|
25
|
+
fill: "none",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
28
|
+
width: "256",
|
|
29
|
+
height: "256",
|
|
30
|
+
rx: "40",
|
|
31
|
+
fill: "white"
|
|
32
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
+
d: "M140.192 118.205L187.848 64H176.556L135.158 111.056L102.117 64H64L113.975 135.163L64 192H75.2914L118.982 142.296L153.883 192H192L140.192 118.205ZM124.722 135.787L119.65 128.697L79.3634 72.3294H96.7094L129.232 117.837L134.282 124.927L176.551 184.076H159.205L124.722 135.787Z",
|
|
34
|
+
fill: "#0F1419"
|
|
35
|
+
})),
|
|
36
|
+
linkedinLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
37
|
+
version: "1.1",
|
|
38
|
+
x: "0px",
|
|
39
|
+
y: "0px",
|
|
40
|
+
width: "438.536px",
|
|
41
|
+
height: "438.536px",
|
|
42
|
+
viewBox: "0 0 438.536 438.536",
|
|
43
|
+
fill: "#FFFFFF"
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
45
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332 c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41 c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708 c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92 c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991 c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974 c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64 H370.873z"
|
|
46
|
+
})))
|
|
47
|
+
};
|
|
48
|
+
var _default = exports["default"] = layoutIcons;
|
package/layout/types.d.ts
CHANGED
|
@@ -1,52 +1,41 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
declare type Padding = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
declare type ChildrenType = AppLayoutHeaderPropsType | AppLayoutMainPropsType | AppLayoutFooterPropsType | AppLayoutSidenavPropsType;
|
|
10
|
-
export declare type AppLayoutHeaderPropsType = {
|
|
11
|
-
/**
|
|
12
|
-
* Everything between this tags will be displayed as a header, at the top of the screen.
|
|
13
|
-
* This is optional and if it is not specified, the DxcHeader will be shown by default.
|
|
14
|
-
*/
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
};
|
|
17
|
-
export declare type AppLayoutMainPropsType = {
|
|
2
|
+
export type AppLayoutMainPropsType = {
|
|
18
3
|
/**
|
|
19
4
|
* Everything between the tags will be displayed as the content of the main part of the application.
|
|
20
5
|
*/
|
|
21
6
|
children: React.ReactNode;
|
|
22
7
|
};
|
|
23
|
-
export
|
|
8
|
+
export type AppLayoutSidenavPropsType = {
|
|
24
9
|
/**
|
|
25
|
-
*
|
|
26
|
-
* This is optional and if it is not specified, the DxcFooter will be shown by default.
|
|
10
|
+
* The area inside the sidenav. This area can be used to render the content inside the sidenav.
|
|
27
11
|
*/
|
|
28
|
-
children
|
|
29
|
-
};
|
|
30
|
-
export declare type AppLayoutSidenavPropsType = {
|
|
31
|
-
/**
|
|
32
|
-
* Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
33
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
|
|
34
|
-
*/
|
|
35
|
-
padding?: Space | Padding;
|
|
12
|
+
children: React.ReactNode;
|
|
36
13
|
/**
|
|
37
|
-
* The area
|
|
14
|
+
* The area assigned to render the sidenav title. It is highly recommended to use the sidenav title.
|
|
38
15
|
*/
|
|
39
|
-
|
|
16
|
+
title?: React.ReactNode;
|
|
40
17
|
};
|
|
41
|
-
|
|
18
|
+
type AppLayoutPropsType = {
|
|
42
19
|
/**
|
|
43
20
|
* Text to be placed next to the hamburger button that toggles the
|
|
44
21
|
* visibility of the sidenav.
|
|
45
22
|
*/
|
|
46
23
|
visibilityToggleLabel?: string;
|
|
47
24
|
/**
|
|
48
|
-
*
|
|
25
|
+
* Header content.
|
|
26
|
+
*/
|
|
27
|
+
header?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Sidenav content
|
|
30
|
+
*/
|
|
31
|
+
sidenav?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Footer content
|
|
34
|
+
*/
|
|
35
|
+
footer?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Use the DxcApplicationLayout.Main provided to render main content.
|
|
49
38
|
*/
|
|
50
|
-
children: React.ReactElement<
|
|
39
|
+
children: React.ReactElement<AppLayoutMainPropsType>;
|
|
51
40
|
};
|
|
52
41
|
export default AppLayoutPropsType;
|