@dxc-technology/halstack-react 0.0.0-ebb089f → 0.0.0-ec06b53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +47 -0
- package/HalstackContext.d.ts +12 -0
- package/HalstackContext.js +294 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +245 -0
- package/accordion/Accordion.stories.tsx +306 -0
- package/accordion/Accordion.test.js +71 -0
- package/accordion/types.d.ts +69 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +149 -0
- package/accordion-group/AccordionGroup.stories.tsx +251 -0
- package/accordion-group/AccordionGroup.test.js +126 -0
- package/accordion-group/types.d.ts +79 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/{dist/alert → alert}/Alert.js +44 -154
- package/alert/Alert.stories.tsx +170 -0
- package/alert/Alert.test.js +92 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +61 -0
- package/badge/types.d.ts +5 -0
- package/badge/types.js +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +51 -0
- package/bleed/Bleed.stories.tsx +341 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +4 -0
- package/box/Box.js +116 -0
- package/box/Box.stories.tsx +132 -0
- package/box/Box.test.js +18 -0
- package/box/types.d.ts +44 -0
- package/box/types.js +5 -0
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +123 -0
- package/bulleted-list/BulletedList.stories.tsx +200 -0
- package/bulleted-list/types.d.ts +11 -0
- package/bulleted-list/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +156 -0
- package/button/Button.stories.tsx +283 -0
- package/button/Button.test.js +35 -0
- package/button/types.d.ts +53 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/card/Card.js +161 -0
- package/card/Card.stories.tsx +201 -0
- package/card/Card.test.js +50 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +68 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/checkbox/Checkbox.js +250 -0
- package/checkbox/Checkbox.stories.tsx +208 -0
- package/checkbox/Checkbox.test.js +155 -0
- package/checkbox/types.d.ts +68 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +161 -0
- package/chip/Chip.stories.tsx +119 -0
- package/chip/Chip.test.js +56 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +3 -11
- package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/{dist/common → common}/utils.js +0 -0
- package/{dist/common → common}/variables.js +363 -425
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +227 -0
- package/date-input/DateInput.stories.tsx +151 -0
- package/date-input/DateInput.test.js +752 -0
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +160 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +115 -0
- package/date-input/types.d.ts +160 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +162 -0
- package/dialog/Dialog.stories.tsx +267 -0
- package/dialog/Dialog.test.js +70 -0
- package/dialog/types.d.ts +44 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +391 -0
- package/dropdown/Dropdown.stories.tsx +312 -0
- package/dropdown/Dropdown.test.js +585 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +80 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +92 -0
- package/dropdown/types.d.ts +100 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +551 -0
- package/file-input/FileInput.stories.tsx +535 -0
- package/file-input/FileInput.test.js +498 -0
- package/file-input/FileItem.d.ts +4 -0
- package/file-input/FileItem.js +161 -0
- package/file-input/types.d.ts +129 -0
- package/file-input/types.js +5 -0
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +69 -0
- package/flex/Flex.stories.tsx +103 -0
- package/flex/types.d.ts +32 -0
- package/flex/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +185 -0
- package/footer/Footer.stories.tsx +137 -0
- package/footer/Footer.test.js +109 -0
- package/footer/Icons.d.ts +2 -0
- package/{dist/footer → footer}/Icons.js +16 -16
- package/footer/types.d.ts +66 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +305 -0
- package/header/Header.stories.tsx +172 -0
- package/header/Header.test.js +79 -0
- package/header/Icons.d.ts +2 -0
- package/{dist/header → header}/Icons.js +9 -34
- package/header/types.d.ts +48 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/{dist/heading → heading}/Heading.js +25 -96
- package/heading/Heading.stories.tsx +54 -0
- package/heading/Heading.test.js +186 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +51 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +20 -0
- package/layout/ApplicationLayout.js +171 -0
- package/layout/ApplicationLayout.stories.tsx +162 -0
- package/layout/Icons.d.ts +5 -0
- package/{dist/layout → layout}/Icons.js +19 -8
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +42 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +4 -0
- package/link/Link.js +136 -0
- package/link/Link.stories.tsx +193 -0
- package/link/Link.test.js +83 -0
- package/link/types.d.ts +54 -0
- package/link/types.js +5 -0
- package/main.d.ts +44 -0
- package/{dist/main.js → main.js} +114 -104
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +76 -0
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInput.test.js +542 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/{dist/number-input → number-input}/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +124 -0
- package/number-input/types.js +5 -0
- package/package.json +36 -33
- package/{dist/paginator → paginator}/Icons.js +9 -9
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +171 -0
- package/paginator/Paginator.stories.tsx +63 -0
- package/paginator/Paginator.test.js +308 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/paragraph/Paragraph.d.ts +6 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/{dist/password-input → password-input}/PasswordInput.js +40 -77
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/PasswordInput.test.js +181 -0
- package/password-input/types.d.ts +110 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +176 -0
- package/progress-bar/ProgressBar.stories.jsx +60 -0
- package/progress-bar/ProgressBar.test.js +110 -0
- package/progress-bar/types.d.ts +36 -0
- package/progress-bar/types.js +5 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +117 -0
- package/quick-nav/QuickNav.stories.tsx +342 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +156 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +283 -0
- package/radio-group/RadioGroup.stories.tsx +101 -0
- package/radio-group/RadioGroup.test.js +722 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +195 -0
- package/resultsetTable/ResultsetTable.stories.tsx +300 -0
- package/resultsetTable/ResultsetTable.test.js +330 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +198 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +110 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +645 -0
- package/select/Select.stories.tsx +627 -0
- package/select/Select.test.js +2233 -0
- package/select/types.d.ts +210 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.d.ts +10 -0
- package/sidenav/Sidenav.js +268 -0
- package/sidenav/Sidenav.stories.tsx +180 -0
- package/sidenav/Sidenav.test.js +44 -0
- package/sidenav/types.d.ts +73 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +343 -0
- package/slider/Slider.stories.tsx +183 -0
- package/slider/Slider.test.js +250 -0
- package/slider/types.d.ts +86 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +250 -0
- package/spinner/Spinner.stories.jsx +103 -0
- package/spinner/Spinner.test.js +64 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/switch/Switch.d.ts +4 -0
- package/switch/Switch.js +262 -0
- package/switch/Switch.stories.tsx +138 -0
- package/switch/Switch.test.js +225 -0
- package/switch/types.d.ts +66 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/{dist/table → table}/Table.js +12 -26
- package/table/Table.stories.jsx +277 -0
- package/table/Table.test.js +26 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +135 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +467 -0
- package/tabs/Tabs.stories.tsx +186 -0
- package/tabs/Tabs.test.js +351 -0
- package/tabs/types.d.ts +92 -0
- package/tabs/types.js +5 -0
- package/tabs-nav/NavTabs.d.ts +8 -0
- package/tabs-nav/NavTabs.js +125 -0
- package/tabs-nav/NavTabs.stories.tsx +170 -0
- package/tabs-nav/NavTabs.test.js +82 -0
- package/tabs-nav/Tab.d.ts +4 -0
- package/tabs-nav/Tab.js +130 -0
- package/tabs-nav/types.d.ts +53 -0
- package/tabs-nav/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +183 -0
- package/tag/Tag.stories.tsx +142 -0
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +57 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +677 -0
- package/text-input/TextInput.stories.tsx +481 -0
- package/text-input/TextInput.test.js +1624 -0
- package/text-input/types.d.ts +197 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/{dist/textarea → textarea}/Textarea.js +50 -142
- package/textarea/Textarea.stories.jsx +157 -0
- package/textarea/Textarea.test.js +437 -0
- package/textarea/types.d.ts +137 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/{dist/toggle-group → toggle-group}/ToggleGroup.js +36 -148
- package/toggle-group/ToggleGroup.stories.tsx +173 -0
- package/toggle-group/ToggleGroup.test.js +156 -0
- package/toggle-group/types.d.ts +105 -0
- package/toggle-group/types.js +5 -0
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +131 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +2 -0
- package/{dist/useTheme.js → useTheme.js} +2 -2
- package/useTranslatedLabels.d.ts +2 -0
- package/useTranslatedLabels.js +20 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +285 -0
- package/wizard/Wizard.stories.tsx +233 -0
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +65 -0
- package/wizard/types.js +5 -0
- package/README.md +0 -66
- package/babel.config.js +0 -7
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -250
- package/dist/V3Select/V3Select.js +0 -549
- package/dist/V3Select/index.d.ts +0 -27
- package/dist/V3Textarea/V3Textarea.js +0 -264
- package/dist/V3Textarea/index.d.ts +0 -27
- package/dist/accordion/Accordion.js +0 -353
- package/dist/accordion/index.d.ts +0 -28
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/accordion-group/index.d.ts +0 -16
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/box/Box.js +0 -156
- package/dist/box/index.d.ts +0 -25
- package/dist/button/Button.js +0 -238
- package/dist/button/Button.stories.js +0 -27
- package/dist/button/index.d.ts +0 -24
- package/dist/card/Card.js +0 -254
- package/dist/card/index.d.ts +0 -22
- package/dist/checkbox/Checkbox.js +0 -299
- package/dist/checkbox/index.d.ts +0 -24
- package/dist/chip/Chip.js +0 -265
- package/dist/chip/index.d.ts +0 -22
- package/dist/date/Date.js +0 -379
- package/dist/date/index.d.ts +0 -27
- package/dist/date-input/DateInput.js +0 -400
- package/dist/date-input/index.d.ts +0 -95
- package/dist/dialog/Dialog.js +0 -218
- package/dist/dialog/index.d.ts +0 -18
- package/dist/dropdown/Dropdown.js +0 -544
- package/dist/dropdown/index.d.ts +0 -26
- package/dist/file-input/FileInput.js +0 -644
- package/dist/file-input/FileItem.js +0 -287
- package/dist/file-input/index.d.ts +0 -81
- package/dist/footer/Footer.js +0 -421
- package/dist/footer/index.d.ts +0 -25
- package/dist/header/Header.js +0 -470
- package/dist/header/index.d.ts +0 -25
- package/dist/heading/index.d.ts +0 -17
- package/dist/input-text/Icons.js +0 -22
- package/dist/input-text/InputText.js +0 -705
- package/dist/input-text/index.d.ts +0 -36
- package/dist/layout/ApplicationLayout.js +0 -327
- package/dist/link/Link.js +0 -237
- package/dist/link/index.d.ts +0 -23
- package/dist/main.d.ts +0 -40
- package/dist/number-input/NumberInput.js +0 -136
- package/dist/number-input/index.d.ts +0 -113
- package/dist/paginator/Paginator.js +0 -305
- package/dist/paginator/index.d.ts +0 -20
- package/dist/password-input/index.d.ts +0 -94
- package/dist/progress-bar/ProgressBar.js +0 -242
- package/dist/progress-bar/index.d.ts +0 -18
- package/dist/radio/Radio.js +0 -209
- package/dist/radio/index.d.ts +0 -23
- package/dist/resultsetTable/ResultsetTable.js +0 -358
- package/dist/resultsetTable/index.d.ts +0 -19
- package/dist/select/Select.js +0 -1137
- package/dist/select/index.d.ts +0 -131
- package/dist/sidenav/Sidenav.js +0 -179
- package/dist/sidenav/index.d.ts +0 -13
- package/dist/slider/Slider.js +0 -404
- package/dist/slider/index.d.ts +0 -29
- package/dist/spinner/Spinner.js +0 -381
- package/dist/spinner/index.d.ts +0 -17
- package/dist/switch/Switch.js +0 -222
- package/dist/switch/index.d.ts +0 -24
- package/dist/table/index.d.ts +0 -13
- package/dist/tabs/Tabs.js +0 -343
- package/dist/tabs/index.d.ts +0 -19
- package/dist/tag/Tag.js +0 -282
- package/dist/tag/index.d.ts +0 -24
- package/dist/text-input/TextInput.js +0 -974
- package/dist/text-input/index.d.ts +0 -135
- package/dist/textarea/index.d.ts +0 -117
- package/dist/toggle/Toggle.js +0 -220
- package/dist/toggle/index.d.ts +0 -21
- package/dist/toggle-group/index.d.ts +0 -21
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/dist/upload/buttons-upload/Icons.js +0 -40
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/dist/upload/dragAndDropArea/Icons.js +0 -39
- package/dist/upload/file-upload/FileToUpload.js +0 -189
- package/dist/upload/file-upload/Icons.js +0 -66
- package/dist/upload/files-upload/FilesToUpload.js +0 -123
- package/dist/upload/index.d.ts +0 -15
- package/dist/upload/transaction/Icons.js +0 -160
- package/dist/upload/transaction/Transaction.js +0 -148
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/wizard/Icons.js +0 -65
- package/dist/wizard/Wizard.js +0 -405
- package/dist/wizard/index.d.ts +0 -18
- 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 -395
- package/test/DateInput.test.js +0 -242
- 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 -94
- package/test/Header.test.js +0 -34
- package/test/Heading.test.js +0 -83
- package/test/InputText.test.js +0 -239
- package/test/Link.test.js +0 -43
- package/test/NumberInput.test.js +0 -259
- package/test/Paginator.test.js +0 -181
- 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 -330
- package/test/Select.test.js +0 -928
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -74
- 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/Tag.test.js +0 -32
- package/test/TextInput.test.js +0 -731
- package/test/Textarea.test.js +0 -193
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/V3Select.test.js +0 -212
- package/test/V3TextArea.test.js +0 -51
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
package/dist/select/index.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
type SVG = string | (HTMLElement & SVGElement);
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Margin = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
type OptionGroup = {
|
|
11
|
-
/**
|
|
12
|
-
* Label of the group to be shown in the select's listbox.
|
|
13
|
-
*/
|
|
14
|
-
label: string;
|
|
15
|
-
/**
|
|
16
|
-
* List of the grouped options.
|
|
17
|
-
*/
|
|
18
|
-
options: Option[];
|
|
19
|
-
};
|
|
20
|
-
type Option = {
|
|
21
|
-
/**
|
|
22
|
-
* Element used as the icon that will be placed before the option label.
|
|
23
|
-
* It can be a url of an image or an inline SVG. If the url option
|
|
24
|
-
* is the chosen one, take into account that the component's
|
|
25
|
-
* color styling tokens will not be applied to the image.
|
|
26
|
-
*/
|
|
27
|
-
icon?: SVG;
|
|
28
|
-
/**
|
|
29
|
-
* Label of the option to be shown in the select's listbox.
|
|
30
|
-
*/
|
|
31
|
-
label: string;
|
|
32
|
-
/**
|
|
33
|
-
* Value of the option. It should be unique and
|
|
34
|
-
* not an empty string, which is reserved to the empty option added
|
|
35
|
-
* by optional prop.
|
|
36
|
-
*/
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type Props = {
|
|
41
|
-
/**
|
|
42
|
-
* Text to be placed above the select.
|
|
43
|
-
*/
|
|
44
|
-
label?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Name attribute of the input element. This attribute will allow users
|
|
47
|
-
* to find the component's value during the submit event. In this event,
|
|
48
|
-
* the component's value will always be a regular string, for both single
|
|
49
|
-
* and multiple selection modes, been in the first one a single option
|
|
50
|
-
* value and in the multiple variant more than one option value,
|
|
51
|
-
* separated by commas.
|
|
52
|
-
*/
|
|
53
|
-
name?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Value of the select. If undefined, the component will be uncontrolled
|
|
56
|
-
* and the value will be managed internally by the component.
|
|
57
|
-
*/
|
|
58
|
-
value?: string | string[];
|
|
59
|
-
/**
|
|
60
|
-
* An array of objects representing the selectable options.
|
|
61
|
-
*/
|
|
62
|
-
options?: Option[] | OptionGroup[];
|
|
63
|
-
/**
|
|
64
|
-
* Helper text to be placed above the select.
|
|
65
|
-
*/
|
|
66
|
-
helperText?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Text to be put as placeholder of the select.
|
|
69
|
-
*/
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/**
|
|
72
|
-
* If true, the component will be disabled.
|
|
73
|
-
*/
|
|
74
|
-
disabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* If true, the select will be optional, showing '(Optional)'
|
|
77
|
-
* next to the label and adding a default first option with empty value, been
|
|
78
|
-
* the placeholder (if defined) its label. Otherwise, the field will be
|
|
79
|
-
* considered required and an error will be passed as a parameter to the
|
|
80
|
-
* OnBlur and onChange functions if an option wasn't selected.
|
|
81
|
-
*/
|
|
82
|
-
optional?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* If true, enables search functionality.
|
|
85
|
-
*/
|
|
86
|
-
searchable?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* If true, the select component will support multiple selected options.
|
|
89
|
-
* In that case, value will be an array of strings with each selected
|
|
90
|
-
* option value.
|
|
91
|
-
*/
|
|
92
|
-
multiple?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* This function will be called when the user selects an option.
|
|
95
|
-
* An object including the current value and the error (if the value entered is not valid)
|
|
96
|
-
* will be passed to this function. If there is no error, error will be null.
|
|
97
|
-
*/
|
|
98
|
-
onChange?: (value: string | string[]) => void;
|
|
99
|
-
/**
|
|
100
|
-
* This function will be called when the select loses the focus. An
|
|
101
|
-
* object including the value (or values) and the error (if the value
|
|
102
|
-
* selected is not valid) will be passed to this function. If there is no error,
|
|
103
|
-
* error will be null.
|
|
104
|
-
*/
|
|
105
|
-
onBlur?: (val: { value: string | string[]; error: string }) => void;
|
|
106
|
-
/**
|
|
107
|
-
* If it is defined, the component will change its appearance, showing
|
|
108
|
-
* the error below the select component. If it is not defined, the error
|
|
109
|
-
* messages will be managed internally, but never displayed on its own.
|
|
110
|
-
*/
|
|
111
|
-
error?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
114
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
115
|
-
*/
|
|
116
|
-
margin?: Space | Margin;
|
|
117
|
-
/**
|
|
118
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
119
|
-
*/
|
|
120
|
-
size?: "small" | "medium" | "large" | "fillParent";
|
|
121
|
-
/**
|
|
122
|
-
* Value of the tabindex attribute.
|
|
123
|
-
*/
|
|
124
|
-
tabIndex?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Reference to the component.
|
|
127
|
-
*/
|
|
128
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export default function DxcSelect(props: Props): JSX.Element;
|
package/dist/sidenav/Sidenav.js
DELETED
|
@@ -1,179 +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 _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
|
|
22
|
-
var _variables = require("../common/variables.js");
|
|
23
|
-
|
|
24
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
25
|
-
|
|
26
|
-
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
27
|
-
|
|
28
|
-
function _templateObject4() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n margin: ", ";\n cursor: pointer;\n\n :focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"]);
|
|
30
|
-
|
|
31
|
-
_templateObject4 = function _templateObject4() {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _templateObject3() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin-bottom: 4px;\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject3 = function _templateObject3() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject2() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n margin-bottom: 16px;\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject2 = function _templateObject2() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n background-color: ", ";\n max-width: 300px;\n width: ", ";\n padding: ", ";\n\n overflow-y: auto;\n overflow-x: hidden;\n ::-webkit-scrollbar {\n width: 2px;\n }\n ::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 3px;\n }\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 3px;\n }\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject = function _templateObject() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var DxcSidenav = function DxcSidenav(_ref) {
|
|
69
|
-
var padding = _ref.padding,
|
|
70
|
-
children = _ref.children;
|
|
71
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
72
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
73
|
-
theme: colorsTheme.sidenav
|
|
74
|
-
}, _react["default"].createElement(SideNavContainer, {
|
|
75
|
-
padding: padding
|
|
76
|
-
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
77
|
-
color: colorsTheme.sidenav.backgroundColor
|
|
78
|
-
}, children)));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
var Title = function Title(_ref2) {
|
|
82
|
-
var children = _ref2.children;
|
|
83
|
-
return _react["default"].createElement(SideNavMenuTitle, null, children);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var Subtitle = function Subtitle(_ref3) {
|
|
87
|
-
var children = _ref3.children;
|
|
88
|
-
return _react["default"].createElement(SideNavMenuSubTitle, null, children);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
var Link = function Link(_ref4) {
|
|
92
|
-
var href = _ref4.href,
|
|
93
|
-
onClick = _ref4.onClick,
|
|
94
|
-
children = _ref4.children;
|
|
95
|
-
return _react["default"].createElement(SideNavMenuLink, {
|
|
96
|
-
href: href,
|
|
97
|
-
onClick: onClick
|
|
98
|
-
}, children);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
var SideNavContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
102
|
-
return props.theme.backgroundColor;
|
|
103
|
-
}, function (props) {
|
|
104
|
-
return props.padding ? "calc(300px - ".concat(_variables.spaces[props.padding], " - ").concat(_variables.spaces[props.padding], ")") : "300px";
|
|
105
|
-
}, function (props) {
|
|
106
|
-
return props.padding ? _variables.spaces[props.padding] : "";
|
|
107
|
-
}, function (props) {
|
|
108
|
-
return props.theme.scrollBarTrackColor;
|
|
109
|
-
}, function (props) {
|
|
110
|
-
return props.theme.scrollBarThumbColor;
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
var SideNavMenuTitle = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
114
|
-
return props.theme.titleFontFamily;
|
|
115
|
-
}, function (props) {
|
|
116
|
-
return props.theme.titleFontSize;
|
|
117
|
-
}, function (props) {
|
|
118
|
-
return props.theme.titleFontStyle;
|
|
119
|
-
}, function (props) {
|
|
120
|
-
return props.theme.titleFontWeight;
|
|
121
|
-
}, function (props) {
|
|
122
|
-
return props.theme.titleFontColor;
|
|
123
|
-
}, function (props) {
|
|
124
|
-
return props.theme.titleFontLetterSpacing;
|
|
125
|
-
}, function (props) {
|
|
126
|
-
return props.theme.titleFontTextTransform;
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
var SideNavMenuSubTitle = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
130
|
-
return props.theme.subtitleFontFamily;
|
|
131
|
-
}, function (props) {
|
|
132
|
-
return props.theme.subtitleFontSize;
|
|
133
|
-
}, function (props) {
|
|
134
|
-
return props.theme.subtitleFontStyle;
|
|
135
|
-
}, function (props) {
|
|
136
|
-
return props.theme.subtitleFontWeight;
|
|
137
|
-
}, function (props) {
|
|
138
|
-
return props.theme.subtitleFontColor;
|
|
139
|
-
}, function (props) {
|
|
140
|
-
return props.theme.subtitleFontLetterSpacing;
|
|
141
|
-
}, function (props) {
|
|
142
|
-
return props.theme.subtitleFontTextTransform;
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
var SideNavMenuLink = _styledComponents["default"].a(_templateObject4(), function (props) {
|
|
146
|
-
return props.theme.linkFontFamily;
|
|
147
|
-
}, function (props) {
|
|
148
|
-
return props.theme.linkFontSize;
|
|
149
|
-
}, function (props) {
|
|
150
|
-
return props.theme.linkFontStyle;
|
|
151
|
-
}, function (props) {
|
|
152
|
-
return props.theme.linkFontWeight;
|
|
153
|
-
}, function (props) {
|
|
154
|
-
return props.theme.linkFontColor;
|
|
155
|
-
}, function (props) {
|
|
156
|
-
return props.theme.linkFontLetterSpacing;
|
|
157
|
-
}, function (props) {
|
|
158
|
-
return props.theme.linkFontTextTransform;
|
|
159
|
-
}, function (props) {
|
|
160
|
-
return props.theme.linkTextDecoration;
|
|
161
|
-
}, function (props) {
|
|
162
|
-
return "".concat(props.theme.linkMarginTop, " ").concat(props.theme.linkMarginRight, " ").concat(props.theme.linkMarginBottom, " ").concat(props.theme.linkMarginLeft);
|
|
163
|
-
}, function (props) {
|
|
164
|
-
return props.theme.linkFocusColor;
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
DxcSidenav.propTypes = {
|
|
168
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
169
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
170
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
171
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
172
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
173
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
174
|
-
};
|
|
175
|
-
DxcSidenav.Title = Title;
|
|
176
|
-
DxcSidenav.Subtitle = Subtitle;
|
|
177
|
-
DxcSidenav.Link = Link;
|
|
178
|
-
var _default = DxcSidenav;
|
|
179
|
-
exports["default"] = _default;
|
package/dist/sidenav/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Padding = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
padding?: Space | Padding;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default function DxcSidenav(props: Props): JSX.Element;
|