@dxc-technology/halstack-react 12.1.0 → 13.0.0
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/README.md +1 -1
- package/dist/index.d.mts +6439 -0
- package/dist/index.d.ts +6439 -0
- package/dist/index.js +12617 -0
- package/dist/index.mjs +12529 -0
- package/package.json +59 -63
- package/BackgroundColorContext.d.ts +0 -1
- package/BackgroundColorContext.js +0 -30
- package/HalstackContext.d.ts +0 -1246
- package/HalstackContext.js +0 -310
- package/accordion/Accordion.accessibility.test.d.ts +0 -1
- package/accordion/Accordion.accessibility.test.js +0 -71
- package/accordion/Accordion.d.ts +0 -4
- package/accordion/Accordion.js +0 -168
- package/accordion/Accordion.stories.tsx +0 -241
- package/accordion/Accordion.test.d.ts +0 -1
- package/accordion/Accordion.test.js +0 -56
- package/accordion/types.d.ts +0 -57
- package/accordion/types.js +0 -5
- package/accordion-group/AccordionGroup.accessibility.test.d.ts +0 -1
- package/accordion-group/AccordionGroup.accessibility.test.js +0 -82
- package/accordion-group/AccordionGroup.d.ts +0 -7
- package/accordion-group/AccordionGroup.js +0 -101
- package/accordion-group/AccordionGroup.stories.tsx +0 -252
- package/accordion-group/AccordionGroup.test.d.ts +0 -1
- package/accordion-group/AccordionGroup.test.js +0 -94
- package/accordion-group/AccordionGroupAccordion.d.ts +0 -4
- package/accordion-group/AccordionGroupAccordion.js +0 -31
- package/accordion-group/AccordionGroupContext.d.ts +0 -3
- package/accordion-group/AccordionGroupContext.js +0 -8
- package/accordion-group/types.d.ts +0 -67
- package/accordion-group/types.js +0 -5
- package/action-icon/ActionIcon.accessibility.test.d.ts +0 -1
- package/action-icon/ActionIcon.accessibility.test.js +0 -63
- package/action-icon/ActionIcon.d.ts +0 -4
- package/action-icon/ActionIcon.js +0 -48
- package/action-icon/ActionIcon.stories.tsx +0 -41
- package/action-icon/ActionIcon.test.d.ts +0 -1
- package/action-icon/ActionIcon.test.js +0 -64
- package/action-icon/types.d.ts +0 -26
- package/action-icon/types.js +0 -5
- package/alert/Alert.accessibility.test.d.ts +0 -1
- package/alert/Alert.accessibility.test.js +0 -95
- package/alert/Alert.d.ts +0 -4
- package/alert/Alert.js +0 -203
- package/alert/Alert.stories.tsx +0 -198
- package/alert/Alert.test.d.ts +0 -1
- package/alert/Alert.test.js +0 -75
- package/alert/types.d.ts +0 -49
- package/alert/types.js +0 -5
- package/badge/Badge.accessibility.test.d.ts +0 -1
- package/badge/Badge.accessibility.test.js +0 -129
- package/badge/Badge.d.ts +0 -4
- package/badge/Badge.js +0 -161
- package/badge/Badge.stories.tsx +0 -210
- package/badge/Badge.test.d.ts +0 -1
- package/badge/Badge.test.js +0 -30
- package/badge/types.d.ts +0 -54
- package/badge/types.js +0 -5
- package/bleed/Bleed.d.ts +0 -3
- package/bleed/Bleed.js +0 -43
- package/bleed/Bleed.stories.tsx +0 -342
- package/bleed/types.d.ts +0 -37
- package/bleed/types.js +0 -5
- package/box/Box.accessibility.test.d.ts +0 -1
- package/box/Box.accessibility.test.js +0 -33
- package/box/Box.d.ts +0 -4
- package/box/Box.js +0 -75
- package/box/Box.stories.tsx +0 -119
- package/box/Box.test.d.ts +0 -1
- package/box/Box.test.js +0 -13
- package/box/types.d.ts +0 -32
- package/box/types.js +0 -5
- package/breadcrumbs/Breadcrumbs.accessibility.test.d.ts +0 -1
- package/breadcrumbs/Breadcrumbs.accessibility.test.js +0 -96
- package/breadcrumbs/Breadcrumbs.d.ts +0 -4
- package/breadcrumbs/Breadcrumbs.js +0 -79
- package/breadcrumbs/Breadcrumbs.stories.tsx +0 -194
- package/breadcrumbs/Breadcrumbs.test.d.ts +0 -1
- package/breadcrumbs/Breadcrumbs.test.js +0 -168
- package/breadcrumbs/Item.d.ts +0 -4
- package/breadcrumbs/Item.js +0 -52
- package/breadcrumbs/dropdownTheme.d.ts +0 -53
- package/breadcrumbs/dropdownTheme.js +0 -62
- package/breadcrumbs/types.d.ts +0 -16
- package/breadcrumbs/types.js +0 -5
- package/bulleted-list/BulletedList.accessibility.test.d.ts +0 -1
- package/bulleted-list/BulletedList.accessibility.test.js +0 -119
- package/bulleted-list/BulletedList.d.ts +0 -7
- package/bulleted-list/BulletedList.js +0 -92
- package/bulleted-list/BulletedList.stories.tsx +0 -115
- package/bulleted-list/types.d.ts +0 -38
- package/bulleted-list/types.js +0 -5
- package/button/Button.accessibility.test.d.ts +0 -1
- package/button/Button.accessibility.test.js +0 -127
- package/button/Button.d.ts +0 -4
- package/button/Button.js +0 -121
- package/button/Button.stories.tsx +0 -325
- package/button/Button.test.d.ts +0 -1
- package/button/Button.test.js +0 -38
- package/button/types.d.ts +0 -57
- package/button/types.js +0 -5
- package/card/Card.accessibility.test.d.ts +0 -1
- package/card/Card.accessibility.test.js +0 -36
- package/card/Card.d.ts +0 -4
- package/card/Card.js +0 -121
- package/card/Card.stories.tsx +0 -171
- package/card/Card.test.d.ts +0 -1
- package/card/Card.test.js +0 -39
- package/card/types.d.ts +0 -62
- package/card/types.js +0 -5
- package/checkbox/Checkbox.accessibility.test.d.ts +0 -1
- package/checkbox/Checkbox.accessibility.test.js +0 -87
- package/checkbox/Checkbox.d.ts +0 -4
- package/checkbox/Checkbox.js +0 -212
- package/checkbox/Checkbox.stories.tsx +0 -222
- package/checkbox/Checkbox.test.d.ts +0 -1
- package/checkbox/Checkbox.test.js +0 -199
- package/checkbox/types.d.ts +0 -72
- package/checkbox/types.js +0 -5
- package/chip/Chip.accessibility.test.d.ts +0 -1
- package/chip/Chip.accessibility.test.js +0 -67
- package/chip/Chip.d.ts +0 -4
- package/chip/Chip.js +0 -126
- package/chip/Chip.stories.tsx +0 -195
- package/chip/Chip.test.d.ts +0 -1
- package/chip/Chip.test.js +0 -41
- package/chip/types.d.ts +0 -45
- package/chip/types.js +0 -5
- package/common/coreTokens.d.ts +0 -237
- package/common/coreTokens.js +0 -184
- package/common/utils.d.ts +0 -1
- package/common/utils.js +0 -16
- package/common/variables.d.ts +0 -1392
- package/common/variables.js +0 -1264
- package/container/Container.d.ts +0 -4
- package/container/Container.js +0 -194
- package/container/Container.stories.tsx +0 -214
- package/container/types.d.ts +0 -74
- package/container/types.js +0 -5
- package/contextual-menu/ContextualMenu.accessibility.test.d.ts +0 -1
- package/contextual-menu/ContextualMenu.accessibility.test.js +0 -98
- package/contextual-menu/ContextualMenu.d.ts +0 -5
- package/contextual-menu/ContextualMenu.js +0 -108
- package/contextual-menu/ContextualMenu.stories.tsx +0 -223
- package/contextual-menu/ContextualMenu.test.d.ts +0 -1
- package/contextual-menu/ContextualMenu.test.js +0 -247
- package/contextual-menu/GroupItem.d.ts +0 -4
- package/contextual-menu/GroupItem.js +0 -67
- package/contextual-menu/ItemAction.d.ts +0 -4
- package/contextual-menu/ItemAction.js +0 -50
- package/contextual-menu/MenuItem.d.ts +0 -4
- package/contextual-menu/MenuItem.js +0 -29
- package/contextual-menu/SingleItem.d.ts +0 -4
- package/contextual-menu/SingleItem.js +0 -38
- package/contextual-menu/types.d.ts +0 -61
- package/contextual-menu/types.js +0 -5
- package/date-input/Calendar.d.ts +0 -4
- package/date-input/Calendar.js +0 -230
- package/date-input/DateInput.accessibility.test.d.ts +0 -1
- package/date-input/DateInput.accessibility.test.js +0 -229
- package/date-input/DateInput.d.ts +0 -4
- package/date-input/DateInput.js +0 -228
- package/date-input/DateInput.stories.tsx +0 -291
- package/date-input/DateInput.test.d.ts +0 -1
- package/date-input/DateInput.test.js +0 -808
- package/date-input/DatePicker.d.ts +0 -4
- package/date-input/DatePicker.js +0 -121
- package/date-input/YearPicker.d.ts +0 -4
- package/date-input/YearPicker.js +0 -105
- package/date-input/types.d.ts +0 -164
- package/date-input/types.js +0 -5
- package/dialog/Dialog.accessibility.test.d.ts +0 -1
- package/dialog/Dialog.accessibility.test.js +0 -69
- package/dialog/Dialog.d.ts +0 -4
- package/dialog/Dialog.js +0 -93
- package/dialog/Dialog.stories.tsx +0 -369
- package/dialog/Dialog.test.d.ts +0 -1
- package/dialog/Dialog.test.js +0 -370
- package/dialog/types.d.ts +0 -36
- package/dialog/types.js +0 -5
- package/divider/Divider.accessibility.test.d.ts +0 -1
- package/divider/Divider.accessibility.test.js +0 -33
- package/divider/Divider.d.ts +0 -4
- package/divider/Divider.js +0 -36
- package/divider/Divider.stories.tsx +0 -223
- package/divider/Divider.test.d.ts +0 -1
- package/divider/Divider.test.js +0 -38
- package/divider/types.d.ts +0 -21
- package/divider/types.js +0 -5
- package/dropdown/Dropdown.accessibility.test.d.ts +0 -1
- package/dropdown/Dropdown.accessibility.test.js +0 -183
- package/dropdown/Dropdown.d.ts +0 -4
- package/dropdown/Dropdown.js +0 -320
- package/dropdown/Dropdown.stories.tsx +0 -427
- package/dropdown/Dropdown.test.d.ts +0 -1
- package/dropdown/Dropdown.test.js +0 -628
- package/dropdown/DropdownMenu.d.ts +0 -4
- package/dropdown/DropdownMenu.js +0 -63
- package/dropdown/DropdownMenuItem.d.ts +0 -4
- package/dropdown/DropdownMenuItem.js +0 -71
- package/dropdown/types.d.ts +0 -96
- package/dropdown/types.js +0 -5
- package/file-input/FileInput.accessibility.test.d.ts +0 -1
- package/file-input/FileInput.accessibility.test.js +0 -167
- package/file-input/FileInput.d.ts +0 -4
- package/file-input/FileInput.js +0 -438
- package/file-input/FileInput.stories.tsx +0 -618
- package/file-input/FileInput.test.d.ts +0 -1
- package/file-input/FileInput.test.js +0 -404
- package/file-input/FileItem.d.ts +0 -4
- package/file-input/FileItem.js +0 -125
- package/file-input/types.d.ts +0 -125
- package/file-input/types.js +0 -5
- package/flex/Flex.d.ts +0 -4
- package/flex/Flex.js +0 -57
- package/flex/Flex.stories.tsx +0 -112
- package/flex/types.d.ts +0 -97
- package/flex/types.js +0 -5
- package/footer/Footer.accessibility.test.d.ts +0 -1
- package/footer/Footer.accessibility.test.js +0 -125
- package/footer/Footer.d.ts +0 -4
- package/footer/Footer.js +0 -140
- package/footer/Footer.stories.tsx +0 -208
- package/footer/Footer.test.d.ts +0 -1
- package/footer/Footer.test.js +0 -85
- package/footer/Icons.d.ts +0 -3
- package/footer/Icons.js +0 -108
- package/footer/types.d.ts +0 -64
- package/footer/types.js +0 -5
- package/grid/Grid.d.ts +0 -7
- package/grid/Grid.js +0 -76
- package/grid/Grid.stories.tsx +0 -221
- package/grid/types.d.ts +0 -115
- package/grid/types.js +0 -5
- package/header/Header.accessibility.test.d.ts +0 -1
- package/header/Header.accessibility.test.js +0 -94
- package/header/Header.d.ts +0 -8
- package/header/Header.js +0 -210
- package/header/Header.stories.tsx +0 -267
- package/header/Header.test.d.ts +0 -1
- package/header/Header.test.js +0 -66
- package/header/Icons.d.ts +0 -2
- package/header/Icons.js +0 -24
- package/header/types.d.ts +0 -33
- package/header/types.js +0 -5
- package/heading/Heading.accessibility.test.d.ts +0 -1
- package/heading/Heading.accessibility.test.js +0 -33
- package/heading/Heading.d.ts +0 -4
- package/heading/Heading.js +0 -137
- package/heading/Heading.stories.tsx +0 -54
- package/heading/Heading.test.d.ts +0 -1
- package/heading/Heading.test.js +0 -156
- package/heading/types.d.ts +0 -33
- package/heading/types.js +0 -5
- package/icon/Icon.accessibility.test.d.ts +0 -1
- package/icon/Icon.accessibility.test.js +0 -30
- package/icon/Icon.d.ts +0 -4
- package/icon/Icon.js +0 -33
- package/icon/Icon.stories.tsx +0 -28
- package/icon/types.d.ts +0 -4
- package/icon/types.js +0 -5
- package/image/Image.accessibility.test.d.ts +0 -1
- package/image/Image.accessibility.test.js +0 -56
- package/image/Image.d.ts +0 -4
- package/image/Image.js +0 -70
- package/image/Image.stories.tsx +0 -129
- package/image/types.d.ts +0 -72
- package/image/types.js +0 -5
- package/inset/Inset.d.ts +0 -3
- package/inset/Inset.js +0 -43
- package/inset/Inset.stories.tsx +0 -230
- package/inset/types.d.ts +0 -37
- package/inset/types.js +0 -5
- package/layout/ApplicationLayout.d.ts +0 -20
- package/layout/ApplicationLayout.js +0 -137
- package/layout/ApplicationLayout.stories.tsx +0 -162
- package/layout/Icons.d.ts +0 -7
- package/layout/Icons.js +0 -48
- package/layout/types.d.ts +0 -41
- package/layout/types.js +0 -5
- package/link/Link.accessibility.test.d.ts +0 -1
- package/link/Link.accessibility.test.js +0 -108
- package/link/Link.d.ts +0 -4
- package/link/Link.js +0 -117
- package/link/Link.stories.tsx +0 -253
- package/link/Link.test.d.ts +0 -1
- package/link/Link.test.js +0 -63
- package/link/types.d.ts +0 -54
- package/link/types.js +0 -5
- package/main.d.ts +0 -50
- package/main.js +0 -364
- package/nav-tabs/NavTabs.accessibility.test.d.ts +0 -1
- package/nav-tabs/NavTabs.accessibility.test.js +0 -44
- package/nav-tabs/NavTabs.d.ts +0 -7
- package/nav-tabs/NavTabs.js +0 -108
- package/nav-tabs/NavTabs.stories.tsx +0 -294
- package/nav-tabs/NavTabs.test.d.ts +0 -1
- package/nav-tabs/NavTabs.test.js +0 -77
- package/nav-tabs/NavTabsContext.d.ts +0 -3
- package/nav-tabs/NavTabsContext.js +0 -8
- package/nav-tabs/Tab.d.ts +0 -4
- package/nav-tabs/Tab.js +0 -117
- package/nav-tabs/types.d.ts +0 -52
- package/nav-tabs/types.js +0 -5
- package/number-input/NumberInput.accessibility.test.d.ts +0 -1
- package/number-input/NumberInput.accessibility.test.js +0 -227
- package/number-input/NumberInput.d.ts +0 -4
- package/number-input/NumberInput.js +0 -86
- package/number-input/NumberInput.stories.tsx +0 -117
- package/number-input/NumberInput.test.d.ts +0 -1
- package/number-input/NumberInput.test.js +0 -988
- package/number-input/NumberInputContext.d.ts +0 -3
- package/number-input/NumberInputContext.js +0 -8
- package/number-input/types.d.ts +0 -136
- package/number-input/types.js +0 -5
- package/paginator/Paginator.accessibility.test.d.ts +0 -1
- package/paginator/Paginator.accessibility.test.js +0 -78
- package/paginator/Paginator.d.ts +0 -4
- package/paginator/Paginator.js +0 -138
- package/paginator/Paginator.stories.tsx +0 -87
- package/paginator/Paginator.test.d.ts +0 -1
- package/paginator/Paginator.test.js +0 -334
- package/paginator/types.d.ts +0 -38
- package/paginator/types.js +0 -5
- package/paragraph/Paragraph.accessibility.test.d.ts +0 -1
- package/paragraph/Paragraph.accessibility.test.js +0 -28
- package/paragraph/Paragraph.d.ts +0 -5
- package/paragraph/Paragraph.js +0 -22
- package/paragraph/Paragraph.stories.tsx +0 -27
- package/password-input/PasswordInput.accessibility.test.d.ts +0 -1
- package/password-input/PasswordInput.accessibility.test.js +0 -152
- package/password-input/PasswordInput.d.ts +0 -4
- package/password-input/PasswordInput.js +0 -97
- package/password-input/PasswordInput.stories.tsx +0 -99
- package/password-input/PasswordInput.test.d.ts +0 -1
- package/password-input/PasswordInput.test.js +0 -197
- package/password-input/types.d.ts +0 -111
- package/password-input/types.js +0 -5
- package/progress-bar/ProgressBar.accessibility.test.d.ts +0 -1
- package/progress-bar/ProgressBar.accessibility.test.js +0 -35
- package/progress-bar/ProgressBar.d.ts +0 -4
- package/progress-bar/ProgressBar.js +0 -146
- package/progress-bar/ProgressBar.stories.tsx +0 -93
- package/progress-bar/ProgressBar.test.d.ts +0 -1
- package/progress-bar/ProgressBar.test.js +0 -93
- package/progress-bar/types.d.ts +0 -37
- package/progress-bar/types.js +0 -5
- package/quick-nav/QuickNav.accessibility.test.d.ts +0 -1
- package/quick-nav/QuickNav.accessibility.test.js +0 -57
- package/quick-nav/QuickNav.d.ts +0 -4
- package/quick-nav/QuickNav.js +0 -94
- package/quick-nav/QuickNav.stories.tsx +0 -356
- package/quick-nav/types.d.ts +0 -21
- package/quick-nav/types.js +0 -5
- package/radio-group/Radio.d.ts +0 -4
- package/radio-group/Radio.js +0 -121
- package/radio-group/RadioGroup.accessibility.test.d.ts +0 -1
- package/radio-group/RadioGroup.accessibility.test.js +0 -97
- package/radio-group/RadioGroup.d.ts +0 -4
- package/radio-group/RadioGroup.js +0 -233
- package/radio-group/RadioGroup.stories.tsx +0 -214
- package/radio-group/RadioGroup.test.d.ts +0 -1
- package/radio-group/RadioGroup.test.js +0 -754
- package/radio-group/types.d.ts +0 -114
- package/radio-group/types.js +0 -5
- package/resultset-table/Icons.d.ts +0 -7
- package/resultset-table/Icons.js +0 -47
- package/resultset-table/ResultsetTable.accessibility.test.d.ts +0 -1
- package/resultset-table/ResultsetTable.accessibility.test.js +0 -284
- package/resultset-table/ResultsetTable.d.ts +0 -7
- package/resultset-table/ResultsetTable.js +0 -171
- package/resultset-table/ResultsetTable.stories.tsx +0 -413
- package/resultset-table/ResultsetTable.test.d.ts +0 -1
- package/resultset-table/ResultsetTable.test.js +0 -379
- package/resultset-table/types.d.ts +0 -100
- package/resultset-table/types.js +0 -5
- package/select/Listbox.d.ts +0 -4
- package/select/Listbox.js +0 -151
- package/select/Option.d.ts +0 -4
- package/select/Option.js +0 -89
- package/select/Select.accessibility.test.d.ts +0 -1
- package/select/Select.accessibility.test.js +0 -227
- package/select/Select.d.ts +0 -4
- package/select/Select.js +0 -600
- package/select/Select.stories.tsx +0 -919
- package/select/Select.test.d.ts +0 -1
- package/select/Select.test.js +0 -2267
- package/select/types.d.ts +0 -209
- package/select/types.js +0 -5
- package/sidenav/Sidenav.accessibility.test.d.ts +0 -1
- package/sidenav/Sidenav.accessibility.test.js +0 -59
- package/sidenav/Sidenav.d.ts +0 -10
- package/sidenav/Sidenav.js +0 -201
- package/sidenav/Sidenav.stories.tsx +0 -277
- package/sidenav/Sidenav.test.d.ts +0 -1
- package/sidenav/Sidenav.test.js +0 -37
- package/sidenav/SidenavContext.d.ts +0 -5
- package/sidenav/SidenavContext.js +0 -13
- package/sidenav/types.d.ts +0 -76
- package/sidenav/types.js +0 -5
- package/slider/Slider.accessibility.test.d.ts +0 -1
- package/slider/Slider.accessibility.test.js +0 -103
- package/slider/Slider.d.ts +0 -4
- package/slider/Slider.js +0 -283
- package/slider/Slider.stories.tsx +0 -180
- package/slider/Slider.test.d.ts +0 -1
- package/slider/Slider.test.js +0 -256
- package/slider/types.d.ts +0 -86
- package/slider/types.js +0 -5
- package/spinner/Spinner.accessibility.test.d.ts +0 -1
- package/spinner/Spinner.accessibility.test.js +0 -96
- package/spinner/Spinner.d.ts +0 -4
- package/spinner/Spinner.js +0 -210
- package/spinner/Spinner.stories.tsx +0 -129
- package/spinner/Spinner.test.d.ts +0 -1
- package/spinner/Spinner.test.js +0 -55
- package/spinner/types.d.ts +0 -32
- package/spinner/types.js +0 -5
- package/status-light/StatusLight.accessibility.test.d.ts +0 -1
- package/status-light/StatusLight.accessibility.test.js +0 -157
- package/status-light/StatusLight.d.ts +0 -4
- package/status-light/StatusLight.js +0 -51
- package/status-light/StatusLight.stories.tsx +0 -74
- package/status-light/StatusLight.test.d.ts +0 -1
- package/status-light/StatusLight.test.js +0 -25
- package/status-light/types.d.ts +0 -17
- package/status-light/types.js +0 -5
- package/switch/Switch.accessibility.test.d.ts +0 -1
- package/switch/Switch.accessibility.test.js +0 -98
- package/switch/Switch.d.ts +0 -4
- package/switch/Switch.js +0 -211
- package/switch/Switch.stories.tsx +0 -149
- package/switch/Switch.test.d.ts +0 -1
- package/switch/Switch.test.js +0 -180
- package/switch/types.d.ts +0 -66
- package/switch/types.js +0 -5
- package/table/DropdownTheme.js +0 -62
- package/table/Table.accessibility.test.d.ts +0 -1
- package/table/Table.accessibility.test.js +0 -92
- package/table/Table.d.ts +0 -8
- package/table/Table.js +0 -161
- package/table/Table.stories.tsx +0 -663
- package/table/Table.test.d.ts +0 -1
- package/table/Table.test.js +0 -111
- package/table/types.d.ts +0 -49
- package/table/types.js +0 -5
- package/tabs/Tab.d.ts +0 -4
- package/tabs/Tab.js +0 -117
- package/tabs/Tabs.accessibility.test.d.ts +0 -1
- package/tabs/Tabs.accessibility.test.js +0 -56
- package/tabs/Tabs.d.ts +0 -4
- package/tabs/Tabs.js +0 -373
- package/tabs/Tabs.stories.tsx +0 -230
- package/tabs/Tabs.test.d.ts +0 -1
- package/tabs/Tabs.test.js +0 -276
- package/tabs/types.d.ts +0 -92
- package/tabs/types.js +0 -5
- package/tag/Tag.accessibility.test.d.ts +0 -1
- package/tag/Tag.accessibility.test.js +0 -69
- package/tag/Tag.d.ts +0 -4
- package/tag/Tag.js +0 -151
- package/tag/Tag.stories.tsx +0 -152
- package/tag/Tag.test.d.ts +0 -1
- package/tag/Tag.test.js +0 -41
- package/tag/types.d.ts +0 -69
- package/tag/types.js +0 -5
- package/text-input/Suggestion.d.ts +0 -4
- package/text-input/Suggestion.js +0 -67
- package/text-input/Suggestions.d.ts +0 -4
- package/text-input/Suggestions.js +0 -94
- package/text-input/TextInput.accessibility.test.d.ts +0 -1
- package/text-input/TextInput.accessibility.test.js +0 -320
- package/text-input/TextInput.d.ts +0 -4
- package/text-input/TextInput.js +0 -569
- package/text-input/TextInput.stories.tsx +0 -468
- package/text-input/TextInput.test.d.ts +0 -1
- package/text-input/TextInput.test.js +0 -1755
- package/text-input/types.d.ts +0 -205
- package/text-input/types.js +0 -5
- package/textarea/Textarea.accessibility.test.d.ts +0 -1
- package/textarea/Textarea.accessibility.test.js +0 -155
- package/textarea/Textarea.d.ts +0 -4
- package/textarea/Textarea.js +0 -235
- package/textarea/Textarea.stories.tsx +0 -174
- package/textarea/Textarea.test.d.ts +0 -1
- package/textarea/Textarea.test.js +0 -406
- package/textarea/types.d.ts +0 -141
- package/textarea/types.js +0 -5
- package/toggle-group/ToggleGroup.accessibility.test.d.ts +0 -1
- package/toggle-group/ToggleGroup.accessibility.test.js +0 -107
- package/toggle-group/ToggleGroup.d.ts +0 -4
- package/toggle-group/ToggleGroup.js +0 -199
- package/toggle-group/ToggleGroup.stories.tsx +0 -218
- package/toggle-group/ToggleGroup.test.d.ts +0 -1
- package/toggle-group/ToggleGroup.test.js +0 -137
- package/toggle-group/types.d.ts +0 -114
- package/toggle-group/types.js +0 -5
- package/typography/Typography.accessibility.test.d.ts +0 -1
- package/typography/Typography.accessibility.test.js +0 -339
- package/typography/Typography.d.ts +0 -4
- package/typography/Typography.js +0 -23
- package/typography/Typography.stories.tsx +0 -196
- package/typography/types.d.ts +0 -18
- package/typography/types.js +0 -5
- package/useTheme.d.ts +0 -1145
- package/useTheme.js +0 -15
- package/useTranslatedLabels.d.ts +0 -85
- package/useTranslatedLabels.js +0 -14
- package/utils/BaseTypography.d.ts +0 -21
- package/utils/BaseTypography.js +0 -94
- package/utils/FocusLock.d.ts +0 -13
- package/utils/FocusLock.js +0 -125
- package/wizard/Wizard.accessibility.test.d.ts +0 -1
- package/wizard/Wizard.accessibility.test.js +0 -55
- package/wizard/Wizard.d.ts +0 -4
- package/wizard/Wizard.js +0 -239
- package/wizard/Wizard.stories.tsx +0 -272
- package/wizard/Wizard.test.d.ts +0 -1
- package/wizard/Wizard.test.js +0 -114
- package/wizard/types.d.ts +0 -64
- package/wizard/types.js +0 -5
package/select/Select.js
DELETED
|
@@ -1,600 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
15
|
-
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
16
|
-
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
17
|
-
var _variables = require("../common/variables");
|
|
18
|
-
var _utils = require("../common/utils");
|
|
19
|
-
var _Listbox = _interopRequireDefault(require("./Listbox"));
|
|
20
|
-
var Popover = _interopRequireWildcard(require("@radix-ui/react-popover"));
|
|
21
|
-
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
22
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
23
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
25
|
-
var isOptionGroup = function isOptionGroup(option) {
|
|
26
|
-
return "options" in option && option.options != null;
|
|
27
|
-
};
|
|
28
|
-
var isArrayOfOptionGroups = function isArrayOfOptionGroups(options) {
|
|
29
|
-
return isOptionGroup(options[0]);
|
|
30
|
-
};
|
|
31
|
-
var groupsHaveOptions = function groupsHaveOptions(filteredOptions) {
|
|
32
|
-
return isArrayOfOptionGroups(filteredOptions) ? filteredOptions.some(function (groupOption) {
|
|
33
|
-
var _groupOption$options;
|
|
34
|
-
return ((_groupOption$options = groupOption.options) === null || _groupOption$options === void 0 ? void 0 : _groupOption$options.length) > 0;
|
|
35
|
-
}) : true;
|
|
36
|
-
};
|
|
37
|
-
var canOpenOptions = function canOpenOptions(options, disabled) {
|
|
38
|
-
return !disabled && (options === null || options === void 0 ? void 0 : options.length) > 0 && groupsHaveOptions(options);
|
|
39
|
-
};
|
|
40
|
-
var filterOptionsBySearchValue = function filterOptionsBySearchValue(options, searchValue) {
|
|
41
|
-
if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
42
|
-
if (isArrayOfOptionGroups(options)) return options.map(function (optionGroup) {
|
|
43
|
-
var group = {
|
|
44
|
-
label: optionGroup.label,
|
|
45
|
-
options: optionGroup.options.filter(function (option) {
|
|
46
|
-
return option.label.toUpperCase().includes(searchValue.toUpperCase());
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
return group;
|
|
50
|
-
});else return options.filter(function (option) {
|
|
51
|
-
return option.label.toUpperCase().includes(searchValue.toUpperCase());
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var getLastOptionIndex = function getLastOptionIndex(options, filteredOptions, searchable, optional, multiple) {
|
|
56
|
-
var last = 0;
|
|
57
|
-
var reducer = function reducer(acc, current) {
|
|
58
|
-
var _current$options;
|
|
59
|
-
return acc + ((_current$options = current.options) === null || _current$options === void 0 ? void 0 : _current$options.length);
|
|
60
|
-
};
|
|
61
|
-
if (searchable && (filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.length) > 0) isArrayOfOptionGroups(filteredOptions) ? last = filteredOptions.reduce(reducer, 0) - 1 : last = filteredOptions.length - 1;else if ((options === null || options === void 0 ? void 0 : options.length) > 0) isArrayOfOptionGroups(options) ? last = options.reduce(reducer, 0) - 1 : last = options.length - 1;
|
|
62
|
-
return optional && !multiple ? last + 1 : last;
|
|
63
|
-
};
|
|
64
|
-
var getSelectedOption = function getSelectedOption(value, options, multiple, optional, optionalItem) {
|
|
65
|
-
var selectedOption = multiple ? [] : {};
|
|
66
|
-
var singleSelectionIndex;
|
|
67
|
-
if (multiple) {
|
|
68
|
-
if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
69
|
-
options.forEach(function (option) {
|
|
70
|
-
if (isOptionGroup(option)) option.options.forEach(function (singleOption) {
|
|
71
|
-
if (value.includes(singleOption.value) && Array.isArray(selectedOption)) selectedOption.push(singleOption);
|
|
72
|
-
});else if (value.includes(option.value) && Array.isArray(selectedOption)) selectedOption.push(option);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
if (optional && value === "") {
|
|
77
|
-
selectedOption = optionalItem;
|
|
78
|
-
singleSelectionIndex = 0;
|
|
79
|
-
} else if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
80
|
-
var group_index = 0;
|
|
81
|
-
options.some(function (option, index) {
|
|
82
|
-
if (isOptionGroup(option)) {
|
|
83
|
-
option.options.some(function (singleOption) {
|
|
84
|
-
if (singleOption.value === value) {
|
|
85
|
-
selectedOption = singleOption;
|
|
86
|
-
singleSelectionIndex = optional ? group_index + 1 : group_index;
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
group_index++;
|
|
90
|
-
});
|
|
91
|
-
} else if (option.value === value) {
|
|
92
|
-
selectedOption = option;
|
|
93
|
-
singleSelectionIndex = optional ? index + 1 : index;
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
selectedOption: selectedOption,
|
|
101
|
-
singleSelectionIndex: singleSelectionIndex
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
var getSelectedOptionLabel = function getSelectedOptionLabel(placeholder, selectedOption) {
|
|
105
|
-
var _selectedOption$label;
|
|
106
|
-
if (Array.isArray(selectedOption)) return selectedOption.length === 0 ? placeholder : selectedOption.map(function (option) {
|
|
107
|
-
return option.label;
|
|
108
|
-
}).join(", ");else return (_selectedOption$label = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label) !== null && _selectedOption$label !== void 0 ? _selectedOption$label : placeholder;
|
|
109
|
-
};
|
|
110
|
-
var notOptionalCheck = function notOptionalCheck(value, multiple, optional) {
|
|
111
|
-
return !optional && (multiple ? value.length === 0 : value === "");
|
|
112
|
-
};
|
|
113
|
-
var useWidth = function useWidth(target) {
|
|
114
|
-
var _useState = (0, _react.useState)(0),
|
|
115
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
116
|
-
width = _useState2[0],
|
|
117
|
-
setWidth = _useState2[1];
|
|
118
|
-
(0, _react.useEffect)(function () {
|
|
119
|
-
if (target != null) {
|
|
120
|
-
setWidth(target.getBoundingClientRect().width);
|
|
121
|
-
var triggerObserver = new ResizeObserver(function (entries) {
|
|
122
|
-
var rect = entries[0].target.getBoundingClientRect();
|
|
123
|
-
setWidth(rect === null || rect === void 0 ? void 0 : rect.width);
|
|
124
|
-
});
|
|
125
|
-
triggerObserver.observe(target);
|
|
126
|
-
return function () {
|
|
127
|
-
triggerObserver.unobserve(target);
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}, [target]);
|
|
131
|
-
return width;
|
|
132
|
-
};
|
|
133
|
-
var DxcSelect = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
134
|
-
var _ref4;
|
|
135
|
-
var label = _ref.label,
|
|
136
|
-
_ref$name = _ref.name,
|
|
137
|
-
name = _ref$name === void 0 ? "" : _ref$name,
|
|
138
|
-
defaultValue = _ref.defaultValue,
|
|
139
|
-
value = _ref.value,
|
|
140
|
-
options = _ref.options,
|
|
141
|
-
helperText = _ref.helperText,
|
|
142
|
-
_ref$placeholder = _ref.placeholder,
|
|
143
|
-
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
144
|
-
_ref$disabled = _ref.disabled,
|
|
145
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
146
|
-
_ref$optional = _ref.optional,
|
|
147
|
-
optional = _ref$optional === void 0 ? false : _ref$optional,
|
|
148
|
-
_ref$searchable = _ref.searchable,
|
|
149
|
-
searchable = _ref$searchable === void 0 ? false : _ref$searchable,
|
|
150
|
-
_ref$multiple = _ref.multiple,
|
|
151
|
-
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
152
|
-
onChange = _ref.onChange,
|
|
153
|
-
onBlur = _ref.onBlur,
|
|
154
|
-
error = _ref.error,
|
|
155
|
-
margin = _ref.margin,
|
|
156
|
-
_ref$size = _ref.size,
|
|
157
|
-
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
158
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
159
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
160
|
-
var selectId = "select-".concat((0, _react.useId)());
|
|
161
|
-
var selectLabelId = "label-".concat(selectId);
|
|
162
|
-
var searchableInputId = "searchable-input-".concat(selectId);
|
|
163
|
-
var errorId = "error-".concat(selectId);
|
|
164
|
-
var optionsListId = "".concat(selectId, "-listbox");
|
|
165
|
-
var _useState3 = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : multiple ? [] : ""),
|
|
166
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
167
|
-
innerValue = _useState4[0],
|
|
168
|
-
setInnerValue = _useState4[1];
|
|
169
|
-
var _useState5 = (0, _react.useState)(""),
|
|
170
|
-
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
171
|
-
searchValue = _useState6[0],
|
|
172
|
-
setSearchValue = _useState6[1];
|
|
173
|
-
var _useState7 = (0, _react.useState)(-1),
|
|
174
|
-
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
175
|
-
visualFocusIndex = _useState8[0],
|
|
176
|
-
changeVisualFocusIndex = _useState8[1];
|
|
177
|
-
var _useState9 = (0, _react.useState)(false),
|
|
178
|
-
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
179
|
-
isOpen = _useState10[0],
|
|
180
|
-
changeIsOpen = _useState10[1];
|
|
181
|
-
var selectRef = (0, _react.useRef)(null);
|
|
182
|
-
var selectSearchInputRef = (0, _react.useRef)(null);
|
|
183
|
-
var selectedOptionLabelRef = (0, _react.useRef)(null);
|
|
184
|
-
var width = useWidth(selectRef.current);
|
|
185
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
186
|
-
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
187
|
-
var optionalItem = {
|
|
188
|
-
label: placeholder,
|
|
189
|
-
value: ""
|
|
190
|
-
};
|
|
191
|
-
var filteredOptions = (0, _react.useMemo)(function () {
|
|
192
|
-
return filterOptionsBySearchValue(options, searchValue);
|
|
193
|
-
}, [options, searchValue]);
|
|
194
|
-
var lastOptionIndex = (0, _react.useMemo)(function () {
|
|
195
|
-
return getLastOptionIndex(options, filteredOptions, searchable, optional, multiple);
|
|
196
|
-
}, [options, filteredOptions, searchable, optional, multiple]);
|
|
197
|
-
var _useMemo = (0, _react.useMemo)(function () {
|
|
198
|
-
return getSelectedOption(value !== null && value !== void 0 ? value : innerValue, options, multiple, optional, optionalItem);
|
|
199
|
-
}, [value, innerValue, options, multiple, optional, optionalItem]),
|
|
200
|
-
selectedOption = _useMemo.selectedOption,
|
|
201
|
-
singleSelectionIndex = _useMemo.singleSelectionIndex;
|
|
202
|
-
var openOptions = function openOptions() {
|
|
203
|
-
if (!isOpen && canOpenOptions(options, disabled)) changeIsOpen(true);
|
|
204
|
-
};
|
|
205
|
-
var closeOptions = function closeOptions() {
|
|
206
|
-
if (isOpen) {
|
|
207
|
-
changeIsOpen(false);
|
|
208
|
-
changeVisualFocusIndex(-1);
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
var handleSelectChangeValue = function handleSelectChangeValue(newOption) {
|
|
212
|
-
var newValue;
|
|
213
|
-
if (multiple) {
|
|
214
|
-
var _ref2, _ref3;
|
|
215
|
-
if ((value !== null && value !== void 0 ? value : innerValue).includes(newOption.value)) newValue = ((_ref2 = value && Array.isArray(value) && value) !== null && _ref2 !== void 0 ? _ref2 : innerValue && Array.isArray(innerValue) && innerValue).filter(function (optionVal) {
|
|
216
|
-
return optionVal !== newOption.value;
|
|
217
|
-
});else newValue = [].concat((0, _toConsumableArray2["default"])((_ref3 = value && Array.isArray(value) && value) !== null && _ref3 !== void 0 ? _ref3 : innerValue && Array.isArray(innerValue) && innerValue), [newOption.value]);
|
|
218
|
-
} else newValue = newOption.value;
|
|
219
|
-
value !== null && value !== void 0 ? value : setInnerValue(newValue);
|
|
220
|
-
notOptionalCheck(newValue, multiple, optional) ? onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
221
|
-
value: newValue,
|
|
222
|
-
error: translatedLabels.formFields.requiredValueErrorMessage
|
|
223
|
-
}) : onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
224
|
-
value: newValue
|
|
225
|
-
});
|
|
226
|
-
};
|
|
227
|
-
var handleSelectOnClick = function handleSelectOnClick() {
|
|
228
|
-
searchable && selectSearchInputRef.current.focus();
|
|
229
|
-
if (isOpen) {
|
|
230
|
-
closeOptions();
|
|
231
|
-
setSearchValue("");
|
|
232
|
-
} else openOptions();
|
|
233
|
-
};
|
|
234
|
-
var handleSelectOnFocus = function handleSelectOnFocus(event) {
|
|
235
|
-
if (!event.currentTarget.contains(event.relatedTarget)) searchable && selectSearchInputRef.current.focus();
|
|
236
|
-
};
|
|
237
|
-
var handleSelectOnBlur = function handleSelectOnBlur(event) {
|
|
238
|
-
// focus leaves container (outside, not to a child)
|
|
239
|
-
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
240
|
-
closeOptions();
|
|
241
|
-
setSearchValue("");
|
|
242
|
-
var currentValue = value !== null && value !== void 0 ? value : innerValue;
|
|
243
|
-
notOptionalCheck(currentValue, multiple, optional) ? onBlur === null || onBlur === void 0 ? void 0 : onBlur({
|
|
244
|
-
value: currentValue,
|
|
245
|
-
error: translatedLabels.formFields.requiredValueErrorMessage
|
|
246
|
-
}) : onBlur === null || onBlur === void 0 ? void 0 : onBlur({
|
|
247
|
-
value: currentValue
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
var handleSelectOnKeyDown = function handleSelectOnKeyDown(event) {
|
|
252
|
-
switch (event.key) {
|
|
253
|
-
case "Down":
|
|
254
|
-
case "ArrowDown":
|
|
255
|
-
event.preventDefault();
|
|
256
|
-
singleSelectionIndex !== undefined && (!isOpen || visualFocusIndex === -1 && singleSelectionIndex > -1 && singleSelectionIndex <= lastOptionIndex) ? changeVisualFocusIndex(singleSelectionIndex) : changeVisualFocusIndex(function (visualFocusIndex) {
|
|
257
|
-
if (visualFocusIndex < lastOptionIndex) return visualFocusIndex + 1;else if (visualFocusIndex === lastOptionIndex) return 0;
|
|
258
|
-
});
|
|
259
|
-
openOptions();
|
|
260
|
-
break;
|
|
261
|
-
case "Up":
|
|
262
|
-
case "ArrowUp":
|
|
263
|
-
event.preventDefault();
|
|
264
|
-
singleSelectionIndex !== undefined && (!isOpen || visualFocusIndex === -1 && singleSelectionIndex > -1 && singleSelectionIndex <= lastOptionIndex) ? changeVisualFocusIndex(singleSelectionIndex) : changeVisualFocusIndex(function (visualFocusIndex) {
|
|
265
|
-
return visualFocusIndex === 0 || visualFocusIndex === -1 ? lastOptionIndex : visualFocusIndex - 1;
|
|
266
|
-
});
|
|
267
|
-
openOptions();
|
|
268
|
-
break;
|
|
269
|
-
case "Esc":
|
|
270
|
-
case "Escape":
|
|
271
|
-
event.preventDefault();
|
|
272
|
-
isOpen && event.stopPropagation();
|
|
273
|
-
closeOptions();
|
|
274
|
-
setSearchValue("");
|
|
275
|
-
break;
|
|
276
|
-
case "Enter":
|
|
277
|
-
if (isOpen && visualFocusIndex >= 0) {
|
|
278
|
-
var accLength = optional && !multiple ? 1 : 0;
|
|
279
|
-
if (searchable) {
|
|
280
|
-
if (filteredOptions.length > 0) {
|
|
281
|
-
if (optional && !multiple && visualFocusIndex === 0 && groupsHaveOptions(filteredOptions)) handleSelectChangeValue(optionalItem);else isArrayOfOptionGroups(filteredOptions) ? groupsHaveOptions(filteredOptions) && filteredOptions.some(function (groupOption) {
|
|
282
|
-
var groupLength = accLength + groupOption.options.length;
|
|
283
|
-
groupLength > visualFocusIndex && handleSelectChangeValue(groupOption.options[visualFocusIndex - accLength]);
|
|
284
|
-
accLength = groupLength;
|
|
285
|
-
return groupLength > visualFocusIndex;
|
|
286
|
-
}) : handleSelectChangeValue(filteredOptions[visualFocusIndex - accLength]);
|
|
287
|
-
}
|
|
288
|
-
} else {
|
|
289
|
-
if (optional && !multiple && visualFocusIndex === 0) handleSelectChangeValue(optionalItem);else isArrayOfOptionGroups(options) ? options.some(function (groupOption) {
|
|
290
|
-
var groupLength = accLength + groupOption.options.length;
|
|
291
|
-
groupLength > visualFocusIndex && handleSelectChangeValue(groupOption.options[visualFocusIndex - accLength]);
|
|
292
|
-
accLength = groupLength;
|
|
293
|
-
return groupLength > visualFocusIndex;
|
|
294
|
-
}) : handleSelectChangeValue(options[visualFocusIndex - accLength]);
|
|
295
|
-
}
|
|
296
|
-
!multiple && closeOptions();
|
|
297
|
-
setSearchValue("");
|
|
298
|
-
}
|
|
299
|
-
break;
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
var handleSearchIOnChange = function handleSearchIOnChange(event) {
|
|
303
|
-
setSearchValue(event.target.value);
|
|
304
|
-
changeVisualFocusIndex(-1);
|
|
305
|
-
openOptions();
|
|
306
|
-
};
|
|
307
|
-
var handleClearOptionsActionOnClick = function handleClearOptionsActionOnClick(event) {
|
|
308
|
-
event.stopPropagation();
|
|
309
|
-
value !== null && value !== void 0 ? value : setInnerValue([]);
|
|
310
|
-
!optional ? onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
311
|
-
value: [],
|
|
312
|
-
error: translatedLabels.formFields.requiredValueErrorMessage
|
|
313
|
-
}) : onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
314
|
-
value: []
|
|
315
|
-
});
|
|
316
|
-
};
|
|
317
|
-
var handleClearSearchActionOnClick = function handleClearSearchActionOnClick(event) {
|
|
318
|
-
event.stopPropagation();
|
|
319
|
-
setSearchValue("");
|
|
320
|
-
};
|
|
321
|
-
var handleOptionOnClick = (0, _react.useCallback)(function (option) {
|
|
322
|
-
handleSelectChangeValue(option);
|
|
323
|
-
!multiple && closeOptions();
|
|
324
|
-
setSearchValue("");
|
|
325
|
-
}, [handleSelectChangeValue, closeOptions, multiple]);
|
|
326
|
-
(0, _react.useEffect)(function () {
|
|
327
|
-
if ((selectedOptionLabelRef === null || selectedOptionLabelRef === void 0 ? void 0 : selectedOptionLabelRef.current) != null) {
|
|
328
|
-
if ((selectedOptionLabelRef === null || selectedOptionLabelRef === void 0 ? void 0 : selectedOptionLabelRef.current.scrollWidth) > (selectedOptionLabelRef === null || selectedOptionLabelRef === void 0 ? void 0 : selectedOptionLabelRef.current.clientWidth)) selectedOptionLabelRef.current.title = getSelectedOptionLabel(placeholder, selectedOption);else selectedOptionLabelRef.current.title = "";
|
|
329
|
-
}
|
|
330
|
-
}, [placeholder, selectedOption]);
|
|
331
|
-
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
332
|
-
theme: colorsTheme.select
|
|
333
|
-
}, /*#__PURE__*/_react["default"].createElement(SelectContainer, {
|
|
334
|
-
margin: margin,
|
|
335
|
-
size: size,
|
|
336
|
-
ref: ref
|
|
337
|
-
}, label && /*#__PURE__*/_react["default"].createElement(Label, {
|
|
338
|
-
id: selectLabelId,
|
|
339
|
-
disabled: disabled,
|
|
340
|
-
onClick: function onClick() {
|
|
341
|
-
selectRef.current.focus();
|
|
342
|
-
},
|
|
343
|
-
helperText: helperText,
|
|
344
|
-
htmlFor: searchable ? searchableInputId : undefined
|
|
345
|
-
}, label, " ", optional && /*#__PURE__*/_react["default"].createElement(OptionalLabel, null, translatedLabels.formFields.optionalLabel)), helperText && /*#__PURE__*/_react["default"].createElement(HelperText, {
|
|
346
|
-
disabled: disabled
|
|
347
|
-
}, helperText), /*#__PURE__*/_react["default"].createElement(Popover.Root, {
|
|
348
|
-
open: isOpen
|
|
349
|
-
}, /*#__PURE__*/_react["default"].createElement(Popover.Trigger, {
|
|
350
|
-
asChild: true,
|
|
351
|
-
type: undefined
|
|
352
|
-
}, /*#__PURE__*/_react["default"].createElement(Select, {
|
|
353
|
-
id: selectId,
|
|
354
|
-
disabled: disabled,
|
|
355
|
-
error: error,
|
|
356
|
-
onBlur: handleSelectOnBlur,
|
|
357
|
-
onClick: handleSelectOnClick,
|
|
358
|
-
onFocus: handleSelectOnFocus,
|
|
359
|
-
onKeyDown: handleSelectOnKeyDown,
|
|
360
|
-
ref: selectRef,
|
|
361
|
-
tabIndex: disabled ? -1 : tabIndex,
|
|
362
|
-
role: "combobox",
|
|
363
|
-
"aria-controls": optionsListId,
|
|
364
|
-
"aria-disabled": disabled,
|
|
365
|
-
"aria-expanded": isOpen,
|
|
366
|
-
"aria-haspopup": "listbox",
|
|
367
|
-
"aria-labelledby": label ? selectLabelId : undefined,
|
|
368
|
-
"aria-activedescendant": visualFocusIndex >= 0 ? "option-".concat(visualFocusIndex) : undefined,
|
|
369
|
-
"aria-invalid": error ? true : false,
|
|
370
|
-
"aria-errormessage": error ? errorId : undefined,
|
|
371
|
-
"aria-required": !disabled && !optional
|
|
372
|
-
}, multiple && Array.isArray(selectedOption) && selectedOption.length > 0 && /*#__PURE__*/_react["default"].createElement(SelectionIndicator, null, /*#__PURE__*/_react["default"].createElement(SelectionNumber, {
|
|
373
|
-
disabled: disabled
|
|
374
|
-
}, selectedOption.length), /*#__PURE__*/_react["default"].createElement(ClearOptionsAction, {
|
|
375
|
-
disabled: disabled,
|
|
376
|
-
onMouseDown: function onMouseDown(event) {
|
|
377
|
-
// Avoid input to lose focus when pressed
|
|
378
|
-
event.preventDefault();
|
|
379
|
-
},
|
|
380
|
-
onClick: handleClearOptionsActionOnClick,
|
|
381
|
-
tabIndex: -1,
|
|
382
|
-
title: translatedLabels.select.actionClearSelectionTitle,
|
|
383
|
-
"aria-label": translatedLabels.select.actionClearSelectionTitle
|
|
384
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
385
|
-
icon: "clear"
|
|
386
|
-
}))), /*#__PURE__*/_react["default"].createElement(SearchableValueContainer, null, /*#__PURE__*/_react["default"].createElement(ValueInput, {
|
|
387
|
-
name: name,
|
|
388
|
-
disabled: disabled,
|
|
389
|
-
value: multiple ? ((_ref4 = value && Array.isArray(value) && value) !== null && _ref4 !== void 0 ? _ref4 : innerValue && Array.isArray(innerValue) && innerValue).join(",") : value !== null && value !== void 0 ? value : innerValue,
|
|
390
|
-
readOnly: true,
|
|
391
|
-
"aria-hidden": "true"
|
|
392
|
-
}), searchable && /*#__PURE__*/_react["default"].createElement(SearchInput, {
|
|
393
|
-
id: searchableInputId,
|
|
394
|
-
value: searchValue,
|
|
395
|
-
disabled: disabled,
|
|
396
|
-
onChange: handleSearchIOnChange,
|
|
397
|
-
ref: selectSearchInputRef,
|
|
398
|
-
autoComplete: "nope",
|
|
399
|
-
autoCorrect: "nope",
|
|
400
|
-
size: 1
|
|
401
|
-
}), (!searchable || searchValue === "") && /*#__PURE__*/_react["default"].createElement(SelectedOption, {
|
|
402
|
-
disabled: disabled,
|
|
403
|
-
atBackground: (multiple ? (value !== null && value !== void 0 ? value : innerValue).length === 0 : !(value !== null && value !== void 0 ? value : innerValue)) || searchable && isOpen
|
|
404
|
-
}, /*#__PURE__*/_react["default"].createElement(SelectedOptionLabel, {
|
|
405
|
-
ref: selectedOptionLabelRef
|
|
406
|
-
}, getSelectedOptionLabel(placeholder, selectedOption)))), !disabled && error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, null, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
407
|
-
icon: "filled_error"
|
|
408
|
-
})), searchable && searchValue.length > 0 && /*#__PURE__*/_react["default"].createElement(ClearSearchAction, {
|
|
409
|
-
onMouseDown: function onMouseDown(event) {
|
|
410
|
-
// Avoid input to lose focus
|
|
411
|
-
event.preventDefault();
|
|
412
|
-
},
|
|
413
|
-
onClick: handleClearSearchActionOnClick,
|
|
414
|
-
tabIndex: -1,
|
|
415
|
-
title: translatedLabels.select.actionClearSearchTitle,
|
|
416
|
-
"aria-label": translatedLabels.select.actionClearSearchTitle
|
|
417
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
418
|
-
icon: "clear"
|
|
419
|
-
})), /*#__PURE__*/_react["default"].createElement(CollapseIndicator, {
|
|
420
|
-
disabled: disabled
|
|
421
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
422
|
-
icon: isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
423
|
-
})))), /*#__PURE__*/_react["default"].createElement(Popover.Portal, null, /*#__PURE__*/_react["default"].createElement(Popover.Content, {
|
|
424
|
-
sideOffset: 4,
|
|
425
|
-
style: {
|
|
426
|
-
zIndex: "2147483647"
|
|
427
|
-
},
|
|
428
|
-
onOpenAutoFocus: function onOpenAutoFocus(event) {
|
|
429
|
-
// Avoid select to lose focus when the list is opened
|
|
430
|
-
event.preventDefault();
|
|
431
|
-
},
|
|
432
|
-
onCloseAutoFocus: function onCloseAutoFocus(event) {
|
|
433
|
-
// Avoid select to lose focus when the list is closed
|
|
434
|
-
event.preventDefault();
|
|
435
|
-
}
|
|
436
|
-
}, /*#__PURE__*/_react["default"].createElement(_Listbox["default"], {
|
|
437
|
-
id: optionsListId,
|
|
438
|
-
currentValue: value !== null && value !== void 0 ? value : innerValue,
|
|
439
|
-
options: searchable ? filteredOptions : options,
|
|
440
|
-
visualFocusIndex: visualFocusIndex,
|
|
441
|
-
lastOptionIndex: lastOptionIndex,
|
|
442
|
-
multiple: multiple,
|
|
443
|
-
optional: optional,
|
|
444
|
-
optionalItem: optionalItem,
|
|
445
|
-
searchable: searchable,
|
|
446
|
-
handleOptionOnClick: handleOptionOnClick,
|
|
447
|
-
styles: {
|
|
448
|
-
width: width
|
|
449
|
-
}
|
|
450
|
-
})))), !disabled && typeof error === "string" && /*#__PURE__*/_react["default"].createElement(Error, {
|
|
451
|
-
id: errorId,
|
|
452
|
-
role: "alert",
|
|
453
|
-
"aria-live": error ? "assertive" : "off"
|
|
454
|
-
}, error)));
|
|
455
|
-
});
|
|
456
|
-
var sizes = {
|
|
457
|
-
small: "240px",
|
|
458
|
-
medium: "360px",
|
|
459
|
-
large: "480px",
|
|
460
|
-
fillParent: "100%"
|
|
461
|
-
};
|
|
462
|
-
var calculateWidth = function calculateWidth(margin, size) {
|
|
463
|
-
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
464
|
-
};
|
|
465
|
-
var SelectContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
466
|
-
return calculateWidth(props.margin, props.size);
|
|
467
|
-
}, function (props) {
|
|
468
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
469
|
-
}, function (props) {
|
|
470
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
471
|
-
}, function (props) {
|
|
472
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
473
|
-
}, function (props) {
|
|
474
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
475
|
-
}, function (props) {
|
|
476
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
477
|
-
});
|
|
478
|
-
var Label = _styledComponents["default"].label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n cursor: default;\n ", "\n"])), function (props) {
|
|
479
|
-
return props.disabled ? props.theme.disabledColor : props.theme.labelFontColor;
|
|
480
|
-
}, function (props) {
|
|
481
|
-
return props.theme.fontFamily;
|
|
482
|
-
}, function (props) {
|
|
483
|
-
return props.theme.labelFontSize;
|
|
484
|
-
}, function (props) {
|
|
485
|
-
return props.theme.labelFontStyle;
|
|
486
|
-
}, function (props) {
|
|
487
|
-
return props.theme.labelFontWeight;
|
|
488
|
-
}, function (props) {
|
|
489
|
-
return props.theme.labelLineHeight;
|
|
490
|
-
}, function (props) {
|
|
491
|
-
return !props.helperText && "margin-bottom: 0.25rem";
|
|
492
|
-
});
|
|
493
|
-
var OptionalLabel = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"])), function (props) {
|
|
494
|
-
return props.theme.optionalLabelFontWeight;
|
|
495
|
-
});
|
|
496
|
-
var HelperText = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-bottom: 0.25rem;\n"])), function (props) {
|
|
497
|
-
return props.disabled ? props.theme.disabledColor : props.theme.helperTextFontColor;
|
|
498
|
-
}, function (props) {
|
|
499
|
-
return props.theme.fontFamily;
|
|
500
|
-
}, function (props) {
|
|
501
|
-
return props.theme.helperTextFontSize;
|
|
502
|
-
}, function (props) {
|
|
503
|
-
return props.theme.helperTextFontStyle;
|
|
504
|
-
}, function (props) {
|
|
505
|
-
return props.theme.helperTextFontWeight;
|
|
506
|
-
}, function (props) {
|
|
507
|
-
return props.theme.helperTextLineHeight;
|
|
508
|
-
});
|
|
509
|
-
var Select = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n position: relative;\n align-items: center;\n height: calc(2.5rem - 2px);\n padding: 0 0.5rem;\n outline: none;\n ", ";\n box-shadow: 0 0 0 2px transparent;\n border-radius: 4px;\n border: 1px solid\n ", ";\n ", "\n ", ";\n\n ", ";\n"])), function (props) {
|
|
510
|
-
return props.disabled && "background-color: ".concat(props.theme.disabledInputBackgroundColor);
|
|
511
|
-
}, function (props) {
|
|
512
|
-
return props.disabled ? props.theme.disabledInputBorderColor : props.theme.enabledInputBorderColor;
|
|
513
|
-
}, function (props) {
|
|
514
|
-
return props.error && !props.disabled && "border-color: transparent;\n box-shadow: 0 0 0 2px ".concat(props.theme.errorInputBorderColor, ";\n ");
|
|
515
|
-
}, function (props) {
|
|
516
|
-
return props.disabled ? "cursor: not-allowed;" : "cursor: pointer;";
|
|
517
|
-
}, function (props) {
|
|
518
|
-
return !props.disabled && "\n &:hover {\n border-color: ".concat(props.error ? "transparent" : props.theme.hoverInputBorderColor, ";\n ").concat(props.error && "box-shadow: 0 0 0 2px ".concat(props.theme.hoverInputErrorBorderColor, ";"), "\n }\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px ").concat(props.theme.focusInputBorderColor, ";\n }\n ");
|
|
519
|
-
});
|
|
520
|
-
var SelectionIndicator = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n border: 1px solid ", ";\n border-radius: 2px;\n max-height: 22px;\n width: 46px;\n"])), function (props) {
|
|
521
|
-
return props.theme.selectionIndicatorBorderColor;
|
|
522
|
-
});
|
|
523
|
-
var SelectionNumber = _styledComponents["default"].span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n user-select: none;\n ", ";\n border-right: 1px solid ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n ", "\n"])), function (props) {
|
|
524
|
-
return !props.disabled && "background-color: ".concat(props.theme.selectionIndicatorBackgroundColor);
|
|
525
|
-
}, function (props) {
|
|
526
|
-
return props.theme.selectionIndicatorBorderColor;
|
|
527
|
-
}, function (props) {
|
|
528
|
-
return props.disabled ? props.theme.disabledColor : props.theme.selectionIndicatorFontColor;
|
|
529
|
-
}, function (props) {
|
|
530
|
-
return props.theme.fontFamily;
|
|
531
|
-
}, function (props) {
|
|
532
|
-
return props.theme.selectionIndicatorFontSize;
|
|
533
|
-
}, function (props) {
|
|
534
|
-
return props.theme.selectionIndicatorFontStyle;
|
|
535
|
-
}, function (props) {
|
|
536
|
-
return props.theme.selectionIndicatorFontWeight;
|
|
537
|
-
}, function (props) {
|
|
538
|
-
return props.disabled ? "cursor: not-allowed;" : "cursor: default;";
|
|
539
|
-
});
|
|
540
|
-
var ClearOptionsAction = _styledComponents["default"].button(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n width: 23px;\n height: 22px;\n border: none;\n padding: 0.25rem;\n ", "\n background-color: ", ";\n color: ", ";\n\n :focus-visible {\n outline: none;\n }\n ", "\n\n font-size:16px;\n"])), function (props) {
|
|
541
|
-
return props.disabled ? "cursor: not-allowed;" : "cursor: pointer;";
|
|
542
|
-
}, function (props) {
|
|
543
|
-
return props.disabled ? "transparent" : props.theme.enabledSelectionIndicatorActionBackgroundColor;
|
|
544
|
-
}, function (props) {
|
|
545
|
-
return props.disabled ? props.theme.disabledColor : props.theme.enabledSelectionIndicatorActionIconColor;
|
|
546
|
-
}, function (props) {
|
|
547
|
-
return !props.disabled && "\n &:hover {\n background-color: ".concat(props.theme.hoverSelectionIndicatorActionBackgroundColor, ";\n color: ").concat(props.theme.hoverSelectionIndicatorActionIconColor, ";\n }\n &:active {\n background-color: ").concat(props.theme.activeSelectionIndicatorActionBackgroundColor, ";\n color: ").concat(props.theme.activeSelectionIndicatorActionIconColor, ";\n }\n ");
|
|
548
|
-
});
|
|
549
|
-
var SearchableValueContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n display: grid;\n width: 100%;\n"])));
|
|
550
|
-
var SelectedOption = _styledComponents["default"].span(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n display: inline-flex;\n align-items: center;\n height: calc(2.5rem - 2px);\n padding: 0 0.5rem;\n user-select: none;\n overflow: hidden;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"])), function (props) {
|
|
551
|
-
if (props.disabled) return props.theme.disabledColor;else if (props.atBackground) return props.theme.placeholderFontColor;else return props.theme.valueFontColor;
|
|
552
|
-
}, function (props) {
|
|
553
|
-
return props.theme.fontFamily;
|
|
554
|
-
}, function (props) {
|
|
555
|
-
return props.theme.valueFontSize;
|
|
556
|
-
}, function (props) {
|
|
557
|
-
return props.theme.valueFontStyle;
|
|
558
|
-
}, function (props) {
|
|
559
|
-
return props.theme.valueFontWeight;
|
|
560
|
-
});
|
|
561
|
-
var SelectedOptionLabel = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
562
|
-
var ValueInput = _styledComponents["default"].input(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n display: none;\n"])));
|
|
563
|
-
var SearchInput = _styledComponents["default"].input(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["\n grid-area: 1 / 1 / 1 / 1;\n height: calc(2.5rem - 2px);\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n"])), function (props) {
|
|
564
|
-
return props.disabled ? props.theme.disabledColor : props.theme.valueFontColor;
|
|
565
|
-
}, function (props) {
|
|
566
|
-
return props.theme.fontFamily;
|
|
567
|
-
}, function (props) {
|
|
568
|
-
return props.theme.valueFontSize;
|
|
569
|
-
}, function (props) {
|
|
570
|
-
return props.theme.valueFontStyle;
|
|
571
|
-
}, function (props) {
|
|
572
|
-
return props.theme.valueFontWeight;
|
|
573
|
-
});
|
|
574
|
-
var ErrorIcon = _styledComponents["default"].span(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n margin-left: 0.25rem;\n pointer-events: none;\n color: ", ";\n\n font-size: 1.25rem;\n"])), function (props) {
|
|
575
|
-
return props.theme.errorIconColor;
|
|
576
|
-
});
|
|
577
|
-
var Error = _styledComponents["default"].span(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 1.5em;\n color: ", ";\n font-family: ", ";\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.5em;\n margin-top: 0.25rem;\n"])), function (props) {
|
|
578
|
-
return props.theme.errorMessageColor;
|
|
579
|
-
}, function (props) {
|
|
580
|
-
return props.theme.fontFamily;
|
|
581
|
-
});
|
|
582
|
-
var CollapseIndicator = _styledComponents["default"].span(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 16px;\n width: 16px;\n padding: 4px;\n margin-left: 0.25rem;\n color: ", ";\n"])), function (props) {
|
|
583
|
-
return props.disabled ? props.theme.disabledColor : props.theme.collapseIndicatorColor;
|
|
584
|
-
});
|
|
585
|
-
var ClearSearchAction = _styledComponents["default"].button(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n padding: 3px;\n margin-left: 0.25rem;\n background-color: ", ";\n color: ", ";\n\n cursor: pointer;\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n font-size: 16px;\n"])), function (props) {
|
|
586
|
-
return props.theme.fontFamily;
|
|
587
|
-
}, function (props) {
|
|
588
|
-
return props.theme.actionBackgroundColor;
|
|
589
|
-
}, function (props) {
|
|
590
|
-
return props.theme.actionIconColor;
|
|
591
|
-
}, function (props) {
|
|
592
|
-
return props.theme.hoverActionBackgroundColor;
|
|
593
|
-
}, function (props) {
|
|
594
|
-
return props.theme.hoverActionIconColor;
|
|
595
|
-
}, function (props) {
|
|
596
|
-
return props.theme.activeActionBackgroundColor;
|
|
597
|
-
}, function (props) {
|
|
598
|
-
return props.theme.activeActionIconColor;
|
|
599
|
-
});
|
|
600
|
-
var _default = exports["default"] = DxcSelect;
|