@dxc-technology/halstack-react 0.0.0-c6243ef → 0.0.0-c667373
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 -0
- package/BackgroundColorContext.js +30 -0
- package/HalstackContext.d.ts +1280 -0
- package/HalstackContext.js +320 -0
- package/README.md +28 -47
- package/accordion/Accordion.accessibility.test.d.ts +1 -0
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +168 -0
- package/accordion/Accordion.stories.tsx +241 -0
- package/accordion/Accordion.test.d.ts +1 -0
- package/accordion/Accordion.test.js +56 -0
- package/accordion/types.d.ts +57 -0
- package/accordion/types.js +5 -0
- 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 +7 -0
- package/accordion-group/AccordionGroup.js +101 -0
- package/accordion-group/AccordionGroup.stories.tsx +252 -0
- package/accordion-group/AccordionGroup.test.d.ts +1 -0
- package/accordion-group/AccordionGroup.test.js +94 -0
- 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 +67 -0
- package/accordion-group/types.js +5 -0
- 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/action-icon/types.js +5 -0
- package/alert/Alert.accessibility.test.d.ts +1 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +203 -0
- package/alert/Alert.stories.tsx +198 -0
- package/alert/Alert.test.d.ts +1 -0
- package/alert/Alert.test.js +75 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.accessibility.test.d.ts +1 -0
- package/badge/Badge.accessibility.test.js +129 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +161 -0
- 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 +54 -0
- package/badge/types.js +5 -0
- package/bar-chart/BarChart.d.ts +4 -0
- package/bar-chart/BarChart.js +152 -0
- package/bar-chart/BarChart.stories.tsx +281 -0
- package/bar-chart/BarChart.test.d.ts +1 -0
- package/bar-chart/BarChart.test.js +194 -0
- package/bar-chart/theme.d.ts +3 -0
- package/bar-chart/theme.js +31 -0
- package/bar-chart/types.d.ts +118 -0
- package/bar-chart/types.js +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +43 -0
- package/bleed/Bleed.stories.tsx +341 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.accessibility.test.d.ts +1 -0
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.d.ts +4 -0
- package/box/Box.js +75 -0
- package/box/Box.stories.tsx +119 -0
- package/box/Box.test.d.ts +1 -0
- package/box/Box.test.js +13 -0
- package/box/types.d.ts +32 -0
- package/box/types.js +5 -0
- 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 +168 -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 +40 -0
- package/breadcrumbs/types.js +5 -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/bulleted-list/types.js +5 -0
- package/button/Button.accessibility.test.d.ts +1 -0
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +121 -0
- package/button/Button.stories.tsx +325 -0
- package/button/Button.test.d.ts +1 -0
- package/button/Button.test.js +38 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.accessibility.test.d.ts +1 -0
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.d.ts +4 -0
- package/card/Card.js +121 -0
- package/card/Card.stories.tsx +171 -0
- package/card/Card.test.d.ts +1 -0
- package/card/Card.test.js +39 -0
- package/card/types.d.ts +62 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.accessibility.test.d.ts +1 -0
- package/checkbox/Checkbox.accessibility.test.js +87 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/Checkbox.js +212 -0
- package/checkbox/Checkbox.stories.tsx +222 -0
- package/checkbox/Checkbox.test.d.ts +1 -0
- package/checkbox/Checkbox.test.js +199 -0
- package/checkbox/types.d.ts +72 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.accessibility.test.d.ts +1 -0
- package/chip/Chip.accessibility.test.js +67 -0
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +126 -0
- package/chip/Chip.stories.tsx +195 -0
- package/chip/Chip.test.d.ts +1 -0
- package/chip/Chip.test.js +41 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/common/coreTokens.d.ts +236 -0
- package/common/coreTokens.js +183 -0
- package/common/utils.d.ts +1 -0
- package/{dist/common → common}/utils.js +6 -12
- package/common/variables.d.ts +1432 -0
- package/common/variables.js +1298 -0
- 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 +176 -0
- package/container/types.js +5 -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 +136 -0
- package/contextual-menu/ContextualMenu.stories.tsx +231 -0
- package/contextual-menu/ContextualMenu.test.d.ts +1 -0
- package/contextual-menu/ContextualMenu.test.js +247 -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 +88 -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 +65 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +230 -0
- package/date-input/DateInput.accessibility.test.d.ts +1 -0
- package/date-input/DateInput.accessibility.test.js +229 -0
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +228 -0
- package/date-input/DateInput.stories.tsx +291 -0
- package/date-input/DateInput.test.d.ts +1 -0
- package/date-input/DateInput.test.js +808 -0
- 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 +105 -0
- package/date-input/types.d.ts +164 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.accessibility.test.d.ts +1 -0
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +93 -0
- package/dialog/Dialog.stories.tsx +369 -0
- package/dialog/Dialog.test.d.ts +1 -0
- package/dialog/Dialog.test.js +370 -0
- package/dialog/types.d.ts +36 -0
- package/dialog/types.js +5 -0
- 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 +224 -0
- package/divider/Divider.test.d.ts +1 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
- package/dropdown/Dropdown.accessibility.test.js +183 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +320 -0
- package/dropdown/Dropdown.stories.tsx +427 -0
- package/dropdown/Dropdown.test.d.ts +1 -0
- package/dropdown/Dropdown.test.js +628 -0
- 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 +96 -0
- package/dropdown/types.js +5 -0
- 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 +4 -0
- package/file-input/FileInput.js +438 -0
- package/file-input/FileInput.stories.tsx +618 -0
- package/file-input/FileInput.test.d.ts +1 -0
- package/file-input/FileInput.test.js +404 -0
- package/file-input/FileItem.d.ts +4 -0
- package/file-input/FileItem.js +125 -0
- package/file-input/types.d.ts +125 -0
- package/file-input/types.js +5 -0
- 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/flex/types.js +5 -0
- package/footer/Footer.accessibility.test.d.ts +1 -0
- package/footer/Footer.accessibility.test.js +125 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +140 -0
- package/footer/Footer.stories.tsx +208 -0
- package/footer/Footer.test.d.ts +1 -0
- package/footer/Footer.test.js +85 -0
- package/footer/Icons.d.ts +3 -0
- package/footer/Icons.js +108 -0
- package/footer/types.d.ts +64 -0
- package/footer/types.js +5 -0
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +221 -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 +8 -0
- package/header/Header.js +210 -0
- package/header/Header.stories.tsx +267 -0
- package/header/Header.test.d.ts +1 -0
- package/header/Header.test.js +66 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +24 -0
- package/header/types.d.ts +33 -0
- package/header/types.js +5 -0
- package/heading/Heading.accessibility.test.d.ts +1 -0
- package/heading/Heading.accessibility.test.js +33 -0
- package/heading/Heading.d.ts +4 -0
- package/{dist/heading → heading}/Heading.js +34 -115
- package/heading/Heading.stories.tsx +54 -0
- package/heading/Heading.test.d.ts +1 -0
- package/heading/Heading.test.js +156 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- 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.d.ts +3 -0
- package/inset/Inset.js +43 -0
- package/inset/Inset.stories.tsx +230 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +20 -0
- package/layout/ApplicationLayout.js +137 -0
- package/layout/ApplicationLayout.stories.tsx +162 -0
- package/layout/Icons.d.ts +7 -0
- package/layout/Icons.js +48 -0
- package/layout/types.d.ts +41 -0
- package/layout/types.js +5 -0
- package/link/Link.accessibility.test.d.ts +1 -0
- package/link/Link.accessibility.test.js +108 -0
- package/link/Link.d.ts +4 -0
- package/link/Link.js +117 -0
- package/link/Link.stories.tsx +253 -0
- package/link/Link.test.d.ts +1 -0
- package/link/Link.test.js +63 -0
- package/link/types.d.ts +54 -0
- package/link/types.js +5 -0
- package/main.d.ts +50 -0
- package/{dist/main.js → main.js} +146 -149
- 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.d.ts +4 -0
- package/nav-tabs/Tab.js +117 -0
- package/nav-tabs/types.d.ts +52 -0
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.accessibility.test.d.ts +1 -0
- package/number-input/NumberInput.accessibility.test.js +227 -0
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +89 -0
- package/number-input/NumberInput.stories.tsx +126 -0
- package/number-input/NumberInput.test.d.ts +1 -0
- package/number-input/NumberInput.test.js +988 -0
- package/number-input/NumberInputContext.d.ts +3 -0
- package/number-input/NumberInputContext.js +8 -0
- package/number-input/types.d.ts +136 -0
- package/number-input/types.js +5 -0
- package/package.json +70 -56
- package/paginator/Paginator.accessibility.test.d.ts +1 -0
- package/paginator/Paginator.accessibility.test.js +78 -0
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +138 -0
- package/paginator/Paginator.stories.tsx +87 -0
- package/paginator/Paginator.test.d.ts +1 -0
- package/paginator/Paginator.test.js +334 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- 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 +152 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +100 -0
- package/password-input/PasswordInput.stories.tsx +108 -0
- package/password-input/PasswordInput.test.d.ts +1 -0
- package/password-input/PasswordInput.test.js +197 -0
- package/password-input/types.d.ts +111 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +146 -0
- package/progress-bar/ProgressBar.stories.tsx +93 -0
- package/progress-bar/ProgressBar.test.d.ts +1 -0
- package/progress-bar/ProgressBar.test.js +93 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/quick-nav/QuickNav.accessibility.test.d.ts +1 -0
- package/quick-nav/QuickNav.accessibility.test.js +57 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +94 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +121 -0
- package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
- package/radio-group/RadioGroup.accessibility.test.js +97 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +233 -0
- package/radio-group/RadioGroup.stories.tsx +214 -0
- package/radio-group/RadioGroup.test.d.ts +1 -0
- package/radio-group/RadioGroup.test.js +754 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- 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 +284 -0
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/resultset-table/ResultsetTable.js +195 -0
- package/resultset-table/ResultsetTable.stories.tsx +413 -0
- package/resultset-table/ResultsetTable.test.d.ts +1 -0
- package/resultset-table/ResultsetTable.test.js +450 -0
- package/resultset-table/types.d.ts +101 -0
- package/resultset-table/types.js +5 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +151 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +89 -0
- package/select/Select.accessibility.test.d.ts +1 -0
- package/select/Select.accessibility.test.js +227 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +602 -0
- package/select/Select.stories.tsx +928 -0
- package/select/Select.test.d.ts +1 -0
- package/select/Select.test.js +2168 -0
- package/select/types.d.ts +209 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.d.ts +10 -0
- package/sidenav/Sidenav.js +201 -0
- package/sidenav/Sidenav.stories.tsx +277 -0
- package/sidenav/Sidenav.test.d.ts +1 -0
- package/sidenav/Sidenav.test.js +37 -0
- package/sidenav/SidenavContext.d.ts +5 -0
- package/sidenav/SidenavContext.js +13 -0
- package/sidenav/types.d.ts +76 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.accessibility.test.d.ts +1 -0
- package/slider/Slider.accessibility.test.js +103 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +283 -0
- package/slider/Slider.stories.tsx +180 -0
- package/slider/Slider.test.d.ts +1 -0
- package/slider/Slider.test.js +256 -0
- package/slider/types.d.ts +86 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.accessibility.test.d.ts +1 -0
- package/spinner/Spinner.accessibility.test.js +96 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +191 -0
- package/spinner/Spinner.stories.tsx +129 -0
- package/spinner/Spinner.test.d.ts +1 -0
- package/spinner/Spinner.test.js +55 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- 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 +4 -0
- package/switch/Switch.js +211 -0
- package/switch/Switch.stories.tsx +149 -0
- package/switch/Switch.test.d.ts +1 -0
- package/switch/Switch.test.js +180 -0
- package/switch/types.d.ts +66 -0
- package/switch/types.js +5 -0
- package/table/DropdownTheme.js +62 -0
- package/table/Table.accessibility.test.d.ts +1 -0
- package/table/Table.accessibility.test.js +92 -0
- package/table/Table.d.ts +8 -0
- package/table/Table.js +161 -0
- package/table/Table.stories.tsx +663 -0
- package/table/Table.test.d.ts +1 -0
- package/table/Table.test.js +111 -0
- package/table/types.d.ts +49 -0
- package/table/types.js +5 -0
- 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.d.ts +4 -0
- package/tabs/Tabs.js +373 -0
- package/tabs/Tabs.stories.tsx +230 -0
- package/tabs/Tabs.test.d.ts +1 -0
- package/tabs/Tabs.test.js +276 -0
- package/tabs/types.d.ts +92 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.accessibility.test.d.ts +1 -0
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +151 -0
- package/tag/Tag.stories.tsx +152 -0
- package/tag/Tag.test.d.ts +1 -0
- package/tag/Tag.test.js +41 -0
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +67 -0
- 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 +320 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +571 -0
- package/text-input/TextInput.stories.tsx +477 -0
- package/text-input/TextInput.test.d.ts +1 -0
- package/text-input/TextInput.test.js +1755 -0
- package/text-input/types.d.ts +205 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.accessibility.test.d.ts +1 -0
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +235 -0
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.d.ts +1 -0
- package/textarea/Textarea.test.js +406 -0
- package/textarea/types.d.ts +141 -0
- package/textarea/types.js +5 -0
- 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 +4 -0
- package/toggle-group/ToggleGroup.js +199 -0
- package/toggle-group/ToggleGroup.stories.tsx +218 -0
- package/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/toggle-group/ToggleGroup.test.js +137 -0
- package/toggle-group/types.d.ts +114 -0
- package/toggle-group/types.js +5 -0
- package/tooltip/Tooltip.accessibility.test.d.ts +1 -0
- package/tooltip/Tooltip.accessibility.test.js +144 -0
- package/tooltip/Tooltip.d.ts +4 -0
- package/tooltip/Tooltip.js +50 -0
- package/tooltip/Tooltip.stories.tsx +111 -0
- package/tooltip/Tooltip.test.d.ts +1 -0
- package/tooltip/Tooltip.test.js +112 -0
- package/tooltip/types.d.ts +16 -0
- package/tooltip/types.js +5 -0
- 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 +196 -0
- package/typography/Typography.test.js +23 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +1168 -0
- package/{dist/useTheme.js → useTheme.js} +4 -11
- package/useTranslatedLabels.d.ts +96 -0
- package/useTranslatedLabels.js +14 -0
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +98 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +125 -0
- package/wizard/Wizard.accessibility.test.d.ts +1 -0
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +239 -0
- package/wizard/Wizard.stories.tsx +272 -0
- package/wizard/Wizard.test.d.ts +1 -0
- package/wizard/Wizard.test.js +114 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -248
- package/dist/accordion/Accordion.js +0 -353
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/alert/Alert.js +0 -403
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/box/Box.js +0 -156
- package/dist/button/Button.js +0 -238
- package/dist/card/Card.js +0 -254
- package/dist/checkbox/Checkbox.js +0 -300
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/chip/Chip.js +0 -265
- package/dist/common/OpenSans.css +0 -81
- package/dist/common/RequiredComponent.js +0 -40
- package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Light.ttf +0 -0
- package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/dist/common/variables.js +0 -1569
- package/dist/date/Date.js +0 -379
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.js +0 -218
- package/dist/dropdown/Dropdown.js +0 -544
- package/dist/file-input/FileInput.js +0 -644
- package/dist/file-input/FileItem.js +0 -280
- package/dist/file-input/index.d.ts +0 -81
- package/dist/footer/Footer.js +0 -395
- package/dist/footer/dxc_logo.svg +0 -15
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.js +0 -403
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.svg +0 -8
- 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 -707
- 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/main.d.ts +0 -8
- package/dist/new-date/NewDate.js +0 -400
- package/dist/new-date/index.d.ts +0 -95
- package/dist/new-select/NewSelect.js +0 -836
- package/dist/new-select/index.d.ts +0 -53
- package/dist/new-textarea/NewTextarea.js +0 -369
- package/dist/new-textarea/index.d.ts +0 -117
- package/dist/number/Number.js +0 -136
- package/dist/number/NumberContext.js +0 -16
- package/dist/number/index.d.ts +0 -113
- package/dist/paginator/Paginator.js +0 -289
- 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/password-input/PasswordInput.js +0 -198
- package/dist/password-input/index.d.ts +0 -94
- package/dist/progress-bar/ProgressBar.js +0 -242
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.js +0 -209
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/ResultsetTable.js +0 -358
- 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 -549
- package/dist/sidenav/Sidenav.js +0 -179
- package/dist/slider/Slider.js +0 -394
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -381
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.js +0 -222
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/table/Table.js +0 -132
- 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 -282
- package/dist/text-input/TextInput.js +0 -971
- package/dist/text-input/index.d.ts +0 -135
- package/dist/textarea/Textarea.js +0 -264
- 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 -327
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
- 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 -329
- 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 -175
- 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 -145
- package/test/FileInput.test.js +0 -201
- 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/NewDate.test.js +0 -232
- package/test/NewTextarea.test.js +0 -195
- package/test/Number.test.js +0 -257
- package/test/Paginator.test.js +0 -177
- package/test/PasswordInput.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -329
- package/test/Select.test.js +0 -212
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- package/test/Spinner.test.js +0 -32
- 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/TextInput.test.js +0 -732
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
17
|
-
|
|
18
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
|
-
|
|
24
|
-
var _uuid = require("uuid");
|
|
25
|
-
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
|
-
var _variables = require("../common/variables.js");
|
|
29
|
-
|
|
30
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
31
|
-
|
|
32
|
-
function _templateObject9() {
|
|
33
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: ", ";\n height: 24px;\n width: 24px;\n overflow: hidden;\n display: flex;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
|
|
34
|
-
|
|
35
|
-
_templateObject9 = function _templateObject9() {
|
|
36
|
-
return data;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return data;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function _templateObject8() {
|
|
43
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 24px;\n width: 24px;\n margin-right: ", ";\n"]);
|
|
44
|
-
|
|
45
|
-
_templateObject8 = function _templateObject8() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _templateObject7() {
|
|
53
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n"]);
|
|
54
|
-
|
|
55
|
-
_templateObject7 = function _templateObject7() {
|
|
56
|
-
return data;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _templateObject6() {
|
|
63
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
|
|
64
|
-
|
|
65
|
-
_templateObject6 = function _templateObject6() {
|
|
66
|
-
return data;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _templateObject5() {
|
|
73
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-right: ", ";\n\n ", "\n"]);
|
|
74
|
-
|
|
75
|
-
_templateObject5 = function _templateObject5() {
|
|
76
|
-
return data;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function _templateObject4() {
|
|
83
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n opacity: 1;\n height: calc(48px - 4px - 4px);\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n border-color: ", ";\n background-color: ", ";\n padding: 4px;\n margin-top: ", ";\n"]);
|
|
84
|
-
|
|
85
|
-
_templateObject4 = function _templateObject4() {
|
|
86
|
-
return data;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
return data;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _templateObject3() {
|
|
93
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: column;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
94
|
-
|
|
95
|
-
_templateObject3 = function _templateObject3() {
|
|
96
|
-
return data;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
return data;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _templateObject2() {
|
|
103
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
104
|
-
|
|
105
|
-
_templateObject2 = function _templateObject2() {
|
|
106
|
-
return data;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
return data;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function _templateObject() {
|
|
113
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
|
|
114
|
-
|
|
115
|
-
_templateObject = function _templateObject() {
|
|
116
|
-
return data;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
return data;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
var DxcToggleGroup = function DxcToggleGroup(_ref) {
|
|
123
|
-
var label = _ref.label,
|
|
124
|
-
helperText = _ref.helperText,
|
|
125
|
-
value = _ref.value,
|
|
126
|
-
onChange = _ref.onChange,
|
|
127
|
-
_ref$disabled = _ref.disabled,
|
|
128
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
129
|
-
_ref$options = _ref.options,
|
|
130
|
-
options = _ref$options === void 0 ? [] : _ref$options,
|
|
131
|
-
margin = _ref.margin,
|
|
132
|
-
_ref$multiple = _ref.multiple,
|
|
133
|
-
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
134
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
135
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
136
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
137
|
-
|
|
138
|
-
var _useState = (0, _react.useState)(multiple ? [] : null),
|
|
139
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
140
|
-
selectedValue = _useState2[0],
|
|
141
|
-
setSelectedValue = _useState2[1];
|
|
142
|
-
|
|
143
|
-
var _useState3 = (0, _react.useState)("toggle-group-".concat((0, _uuid.v4)())),
|
|
144
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 1),
|
|
145
|
-
toggleGroupId = _useState4[0];
|
|
146
|
-
|
|
147
|
-
var handleToggleChange = function handleToggleChange(selectedOption) {
|
|
148
|
-
var newSelectedOptions;
|
|
149
|
-
|
|
150
|
-
if (value == null) {
|
|
151
|
-
if (multiple) {
|
|
152
|
-
newSelectedOptions = selectedValue.map(function (value) {
|
|
153
|
-
return value;
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
if (newSelectedOptions.includes(selectedOption)) {
|
|
157
|
-
var index = newSelectedOptions.indexOf(selectedOption);
|
|
158
|
-
newSelectedOptions.splice(index, 1);
|
|
159
|
-
} else {
|
|
160
|
-
newSelectedOptions.push(selectedOption);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
setSelectedValue(newSelectedOptions);
|
|
164
|
-
} else setSelectedValue(selectedOption === selectedValue ? null : selectedOption);
|
|
165
|
-
} else if (multiple) {
|
|
166
|
-
newSelectedOptions = value.map(function (v) {
|
|
167
|
-
return v;
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
if (newSelectedOptions.includes(selectedOption)) {
|
|
171
|
-
var _index = newSelectedOptions.indexOf(selectedOption);
|
|
172
|
-
|
|
173
|
-
newSelectedOptions.splice(_index, 1);
|
|
174
|
-
} else newSelectedOptions.push(selectedOption);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
typeof onChange === "function" && onChange(multiple ? newSelectedOptions : selectedOption);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
var handleKeyPress = function handleKeyPress(event, optionValue) {
|
|
181
|
-
event.preventDefault();
|
|
182
|
-
if (!disabled && (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "Space")) handleToggleChange(optionValue);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
186
|
-
theme: colorsTheme.toggleGroup
|
|
187
|
-
}, _react["default"].createElement(ToggleGroup, {
|
|
188
|
-
margin: margin,
|
|
189
|
-
disabled: disabled
|
|
190
|
-
}, _react["default"].createElement(Label, {
|
|
191
|
-
htmlFor: toggleGroupId,
|
|
192
|
-
disabled: disabled
|
|
193
|
-
}, label), _react["default"].createElement(HelperText, {
|
|
194
|
-
disabled: disabled
|
|
195
|
-
}, helperText), _react["default"].createElement(OptionsContainer, {
|
|
196
|
-
id: toggleGroupId,
|
|
197
|
-
role: multiple ? "group" : "radiogroup"
|
|
198
|
-
}, options.map(function (option, i) {
|
|
199
|
-
return _react["default"].createElement(ToggleContainer, {
|
|
200
|
-
selected: multiple ? value ? value.includes(option.value) : selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue,
|
|
201
|
-
role: multiple ? "switch" : "radio",
|
|
202
|
-
"aria-checked": multiple ? value ? value.includes(option.value) : selectedValue.includes(option.value) : value ? option.value === value : option.value === selectedValue,
|
|
203
|
-
tabIndex: !disabled ? tabIndex : -1,
|
|
204
|
-
onClick: function onClick() {
|
|
205
|
-
return !disabled && handleToggleChange(option.value);
|
|
206
|
-
},
|
|
207
|
-
isFirst: i === 0,
|
|
208
|
-
isLast: i === options.length - 1,
|
|
209
|
-
isIcon: option.iconSrc || option.icon,
|
|
210
|
-
optionLabel: option.label,
|
|
211
|
-
disabled: disabled,
|
|
212
|
-
onKeyPress: function onKeyPress(event) {
|
|
213
|
-
handleKeyPress(event, option.value);
|
|
214
|
-
},
|
|
215
|
-
key: "toggle-".concat(i, "-").concat(option.label)
|
|
216
|
-
}, _react["default"].createElement(OptionContent, null, option.icon && _react["default"].createElement(IconContainer, {
|
|
217
|
-
optionLabel: option.label
|
|
218
|
-
}, (0, _typeof2["default"])(option.icon) === "object" ? option.icon : _react["default"].createElement(option.icon)), option.iconSrc && _react["default"].createElement(Icon, {
|
|
219
|
-
src: option.iconSrc,
|
|
220
|
-
optionLabel: option.label
|
|
221
|
-
}), option.label && _react["default"].createElement(LabelContainer, null, option.label)));
|
|
222
|
-
}))));
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
var Label = _styledComponents["default"].label(_templateObject(), function (props) {
|
|
226
|
-
return props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor;
|
|
227
|
-
}, function (props) {
|
|
228
|
-
return props.theme.labelFontFamily;
|
|
229
|
-
}, function (props) {
|
|
230
|
-
return props.theme.labelFontSize;
|
|
231
|
-
}, function (props) {
|
|
232
|
-
return props.theme.labelFontStyle;
|
|
233
|
-
}, function (props) {
|
|
234
|
-
return props.theme.labelFontWeight;
|
|
235
|
-
}, function (props) {
|
|
236
|
-
return props.theme.labelLineHeight;
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
var HelperText = _styledComponents["default"].span(_templateObject2(), function (props) {
|
|
240
|
-
return props.disabled ? props.theme.disabledHelperTextFontcolor : props.theme.helperTextFontColor;
|
|
241
|
-
}, function (props) {
|
|
242
|
-
return props.theme.helperTextFontFamily;
|
|
243
|
-
}, function (props) {
|
|
244
|
-
return props.theme.helperTextFontSize;
|
|
245
|
-
}, function (props) {
|
|
246
|
-
return props.theme.helperTextFontStyle;
|
|
247
|
-
}, function (props) {
|
|
248
|
-
return props.theme.helperTextFontWeight;
|
|
249
|
-
}, function (props) {
|
|
250
|
-
return props.theme.helperTextLineHeight;
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
var ToggleGroup = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
254
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
255
|
-
}, function (props) {
|
|
256
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
257
|
-
}, function (props) {
|
|
258
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
259
|
-
}, function (props) {
|
|
260
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
261
|
-
}, function (props) {
|
|
262
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
var OptionsContainer = _styledComponents["default"].div(_templateObject4(), function (props) {
|
|
266
|
-
return props.theme.containerBorderThickness;
|
|
267
|
-
}, function (props) {
|
|
268
|
-
return props.theme.containerBorderStyle;
|
|
269
|
-
}, function (props) {
|
|
270
|
-
return props.theme.containerBorderRadius;
|
|
271
|
-
}, function (props) {
|
|
272
|
-
return props.theme.containerBorderColor;
|
|
273
|
-
}, function (props) {
|
|
274
|
-
return props.theme.containerBackgroundColor;
|
|
275
|
-
}, function (props) {
|
|
276
|
-
return props.theme.containerMarginTop;
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
var ToggleContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
280
|
-
return !props.isLast && "4px";
|
|
281
|
-
}, function (props) {
|
|
282
|
-
return "\n background-color: ".concat(props.selected ? props.disabled ? props.theme.selectedDisabledBackgroundColor : props.theme.selectedBackgroundColor : props.disabled ? props.theme.unselectedDisabledBackgroundColor : props.theme.unselectedBackgroundColor, ";\n border-width: ").concat(props.theme.optionBorderThickness, ";\n border-style: ").concat(props.theme.optionBorderStyle, ";\n border-radius: ").concat(props.theme.optionBorderRadius, ";\n padding-left: ").concat(props.optionLabel && props.isIcon || props.optionLabel && !props.isIcon ? props.theme.labelPaddingLeft : props.theme.iconPaddingLeft, ";\n padding-right: ").concat(props.optionLabel && props.isIcon || props.optionLabel && !props.isIcon ? props.theme.labelPaddingRight : props.theme.iconPaddingRight, ";\n ").concat(!props.disabled ? ":hover {\n background-color: ".concat(props.selected ? props.theme.selectedHoverBackgroundColor : props.theme.unselectedHoverBackgroundColor, ";\n }\n :active {\n background-color: ").concat(props.selected ? props.theme.selectedActiveBackgroundColor : props.theme.unselectedActiveBackgroundColor, ";\n color: #ffffff;\n } \n :focus {\n border-color: transparent;\n box-shadow: 0 0 0 ").concat(props.theme.optionFocusBorderThickness, " ").concat(props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor, ";\n }\n &:focus-visible {\n outline: none;\n }\n cursor: pointer;\n color: ").concat(props.selected ? props.theme.selectedFontColor : props.theme.unselectedFontColor, ";\n") : "color: ".concat(props.selected ? props.theme.selectedDisabledFontColor : props.theme.unselectedDisabledFontColor, ";\n cursor: not-allowed;"), "\n ");
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
var LabelContainer = _styledComponents["default"].span(_templateObject6(), function (props) {
|
|
286
|
-
return props.theme.optionLabelFontFamily;
|
|
287
|
-
}, function (props) {
|
|
288
|
-
return props.theme.optionLabelFontSize;
|
|
289
|
-
}, function (props) {
|
|
290
|
-
return props.theme.optionLabelFontStyle;
|
|
291
|
-
}, function (props) {
|
|
292
|
-
return props.theme.optionLabelFontWeight;
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
var OptionContent = _styledComponents["default"].div(_templateObject7());
|
|
296
|
-
|
|
297
|
-
var Icon = _styledComponents["default"].img(_templateObject8(), function (props) {
|
|
298
|
-
return props.optionLabel && props.theme.iconMarginRight;
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
var IconContainer = _styledComponents["default"].div(_templateObject9(), function (props) {
|
|
302
|
-
return props.optionLabel && props.theme.iconMarginRight;
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
DxcToggleGroup.propTypes = {
|
|
306
|
-
label: _propTypes["default"].string,
|
|
307
|
-
helperText: _propTypes["default"].string,
|
|
308
|
-
value: _propTypes["default"].any,
|
|
309
|
-
onChange: _propTypes["default"].func,
|
|
310
|
-
disabled: _propTypes["default"].bool,
|
|
311
|
-
multiple: _propTypes["default"].bool,
|
|
312
|
-
options: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
313
|
-
value: _propTypes["default"].any.isRequired,
|
|
314
|
-
label: _propTypes["default"].string,
|
|
315
|
-
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
|
|
316
|
-
iconSrc: _propTypes["default"].string
|
|
317
|
-
})),
|
|
318
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
319
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
320
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
321
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
322
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
323
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
324
|
-
tabIndex: _propTypes["default"].number
|
|
325
|
-
};
|
|
326
|
-
var _default = DxcToggleGroup;
|
|
327
|
-
exports["default"] = _default;
|
package/dist/upload/Upload.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
17
|
-
|
|
18
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
23
|
-
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
|
-
var _DragAndDropArea = _interopRequireDefault(require("./dragAndDropArea/DragAndDropArea"));
|
|
27
|
-
|
|
28
|
-
var _FilesToUpload = _interopRequireDefault(require("./files-upload/FilesToUpload"));
|
|
29
|
-
|
|
30
|
-
var _Transactions = _interopRequireDefault(require("./transactions/Transactions"));
|
|
31
|
-
|
|
32
|
-
var _variables = require("../common/variables.js");
|
|
33
|
-
|
|
34
|
-
function _templateObject() {
|
|
35
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-width: 100%;\n height: 400px;\n box-shadow: 0px 3px 6px #00000029;\n border-radius: 4px;\n display: flex;\n flex-direction: row;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject = function _templateObject() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var DxcUpload = function DxcUpload(_ref) {
|
|
45
|
-
var callbackUpload = _ref.callbackUpload,
|
|
46
|
-
margin = _ref.margin,
|
|
47
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
48
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
49
|
-
|
|
50
|
-
var _useState = (0, _react.useState)([]),
|
|
51
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
52
|
-
files = _useState2[0],
|
|
53
|
-
setFiles = _useState2[1];
|
|
54
|
-
|
|
55
|
-
var getFilesToUpload = function getFilesToUpload() {
|
|
56
|
-
return files.filter(function (file) {
|
|
57
|
-
return file.status === "pending";
|
|
58
|
-
}).map(function (file) {
|
|
59
|
-
var fileInfo = {
|
|
60
|
-
name: file.name,
|
|
61
|
-
type: file.type,
|
|
62
|
-
image: file.image,
|
|
63
|
-
status: file.status
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
fileInfo.deleteFile = function () {
|
|
67
|
-
var uploadFiles = [];
|
|
68
|
-
files.forEach(function (item) {
|
|
69
|
-
return uploadFiles.push(item);
|
|
70
|
-
});
|
|
71
|
-
var fileIndex = uploadFiles.indexOf(file, 0);
|
|
72
|
-
|
|
73
|
-
if (fileIndex > -1) {
|
|
74
|
-
uploadFiles.splice(fileIndex, 1);
|
|
75
|
-
setFiles(uploadFiles);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
return fileInfo;
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var getTransactionsFiles = function getTransactionsFiles() {
|
|
84
|
-
return files.filter(function (file) {
|
|
85
|
-
return file.status === "success" || file.status === "error" || file.status === "processing";
|
|
86
|
-
}).map(function (file) {
|
|
87
|
-
return {
|
|
88
|
-
name: file.name,
|
|
89
|
-
type: file.type,
|
|
90
|
-
image: file.image,
|
|
91
|
-
status: file.status
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var getFilePreview = function getFilePreview(file) {
|
|
97
|
-
return new Promise(function (resolve) {
|
|
98
|
-
var reader = new FileReader();
|
|
99
|
-
reader.readAsDataURL(file);
|
|
100
|
-
|
|
101
|
-
reader.onload = function (e) {
|
|
102
|
-
resolve(e.target.result);
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var onDragHandler = function onDragHandler(filesToAdd) {
|
|
108
|
-
setFiles([].concat((0, _toConsumableArray2["default"])(files), (0, _toConsumableArray2["default"])(filesToAdd.map(function (file) {
|
|
109
|
-
var fileToAdd = {
|
|
110
|
-
status: "pending",
|
|
111
|
-
name: file.name,
|
|
112
|
-
type: file.type
|
|
113
|
-
};
|
|
114
|
-
return fileToAdd;
|
|
115
|
-
}))));
|
|
116
|
-
Promise.all(filesToAdd.map(function (fileToAdd) {
|
|
117
|
-
return getFilePreview(fileToAdd);
|
|
118
|
-
})).then(function (previews) {
|
|
119
|
-
setFiles([].concat((0, _toConsumableArray2["default"])(files), (0, _toConsumableArray2["default"])(filesToAdd.map(function (file, index) {
|
|
120
|
-
var fileToAdd = {
|
|
121
|
-
status: "pending",
|
|
122
|
-
name: file.name,
|
|
123
|
-
type: file.type,
|
|
124
|
-
image: previews[index]
|
|
125
|
-
};
|
|
126
|
-
return fileToAdd;
|
|
127
|
-
}))));
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
var onUploadHandler = function onUploadHandler() {
|
|
132
|
-
var uploadedFiles = [];
|
|
133
|
-
files.forEach(function (file) {
|
|
134
|
-
uploadedFiles = [].concat((0, _toConsumableArray2["default"])(uploadedFiles), [file]);
|
|
135
|
-
});
|
|
136
|
-
uploadedFiles.forEach(function (file) {
|
|
137
|
-
if (file.status === "pending") {
|
|
138
|
-
file.status = "processing";
|
|
139
|
-
|
|
140
|
-
if (typeof callbackUpload === "function") {
|
|
141
|
-
callbackUpload(file).then(function () {
|
|
142
|
-
file.status = "success";
|
|
143
|
-
uploadedFiles = getTransactionsFiles();
|
|
144
|
-
setFiles(uploadedFiles);
|
|
145
|
-
})["catch"](function (err) {
|
|
146
|
-
file.status = "error";
|
|
147
|
-
file.message = err;
|
|
148
|
-
uploadedFiles = getTransactionsFiles();
|
|
149
|
-
setFiles(uploadedFiles);
|
|
150
|
-
})["finally"]();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
setFiles(uploadedFiles);
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
var filesToUpload = getFilesToUpload();
|
|
159
|
-
var transactionFiles = getTransactionsFiles();
|
|
160
|
-
return _react["default"].createElement(DXCUpload, {
|
|
161
|
-
margin: margin
|
|
162
|
-
}, transactionFiles && transactionFiles.length !== 0 && _react["default"].createElement(_Transactions["default"], {
|
|
163
|
-
tabIndexValue: tabIndex,
|
|
164
|
-
transactions: transactionFiles
|
|
165
|
-
}), filesToUpload && filesToUpload.length === 0 && transactionFiles && transactionFiles.length === 0 && _react["default"].createElement(_DragAndDropArea["default"], {
|
|
166
|
-
dashed: false,
|
|
167
|
-
addFile: onDragHandler,
|
|
168
|
-
tabIndexValue: tabIndex
|
|
169
|
-
}) || filesToUpload && filesToUpload.length === 0 && transactionFiles && transactionFiles.length !== 0 && _react["default"].createElement(_DragAndDropArea["default"], {
|
|
170
|
-
dashed: true,
|
|
171
|
-
addFile: onDragHandler,
|
|
172
|
-
tabIndexValue: tabIndex
|
|
173
|
-
}), filesToUpload && filesToUpload.length !== 0 && _react["default"].createElement(_FilesToUpload["default"], {
|
|
174
|
-
filesToUpload: filesToUpload,
|
|
175
|
-
addFile: onDragHandler,
|
|
176
|
-
onUpload: onUploadHandler,
|
|
177
|
-
tabIndexValue: tabIndex
|
|
178
|
-
}));
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
DxcUpload.propTypes = {
|
|
182
|
-
callbackUpload: _propTypes["default"].func,
|
|
183
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
184
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
185
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
186
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
187
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
188
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
189
|
-
tabIndex: _propTypes["default"].number
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
var DXCUpload = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
193
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
194
|
-
}, function (props) {
|
|
195
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
196
|
-
}, function (props) {
|
|
197
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
198
|
-
}, function (props) {
|
|
199
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
200
|
-
}, function (props) {
|
|
201
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
var _default = DxcUpload;
|
|
205
|
-
exports["default"] = _default;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
6
|
-
|
|
7
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
|
-
|
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
|
-
var _react2 = require("@storybook/react");
|
|
14
|
-
|
|
15
|
-
var _readme = _interopRequireDefault(require("./readme.md"));
|
|
16
|
-
|
|
17
|
-
var _Upload = _interopRequireDefault(require("./Upload"));
|
|
18
|
-
|
|
19
|
-
function callbackFunc() {
|
|
20
|
-
return _callbackFunc.apply(this, arguments);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _callbackFunc() {
|
|
24
|
-
_callbackFunc = (0, _asyncToGenerator2["default"])(
|
|
25
|
-
/*#__PURE__*/
|
|
26
|
-
_regenerator["default"].mark(function _callee() {
|
|
27
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
28
|
-
while (1) {
|
|
29
|
-
switch (_context.prev = _context.next) {
|
|
30
|
-
case 0:
|
|
31
|
-
return _context.abrupt("return", new Promise(function (resolve) {
|
|
32
|
-
return setTimeout(resolve, 1000);
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
case 1:
|
|
36
|
-
case "end":
|
|
37
|
-
return _context.stop();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, _callee);
|
|
41
|
-
}));
|
|
42
|
-
return _callbackFunc.apply(this, arguments);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
(0, _react2.storiesOf)("Form Components|Upload", module).add("Component", function () {
|
|
46
|
-
return _react["default"].createElement("div", {
|
|
47
|
-
style: {
|
|
48
|
-
marginTop: "80px"
|
|
49
|
-
}
|
|
50
|
-
}, _react["default"].createElement(_Upload["default"], {
|
|
51
|
-
callbackUpload: callbackFunc
|
|
52
|
-
}));
|
|
53
|
-
}, {
|
|
54
|
-
notes: {
|
|
55
|
-
markdown: _readme["default"]
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var knobProps = function knobProps() {
|
|
60
|
-
return {};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
(0, _react2.storiesOf)("Form Components|Upload", module).add("Knobs example", function () {
|
|
64
|
-
var props = knobProps();
|
|
65
|
-
return _react["default"].createElement(_Upload["default"], (0, _extends2["default"])({}, props, {
|
|
66
|
-
callbackUpload: callbackFunc
|
|
67
|
-
}));
|
|
68
|
-
}, {
|
|
69
|
-
notes: {
|
|
70
|
-
markdown: _readme["default"]
|
|
71
|
-
}
|
|
72
|
-
});
|