@dhis2-ui/select 10.9.2 → 10.10.0-alpha.1
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/build/cjs/index.js +18 -4
- package/build/cjs/locales/en/translations.json +7 -5
- package/build/cjs/simple-single-select/__stories__/DefaultPosition.js +38 -0
- package/build/cjs/simple-single-select/__stories__/Dense.js +22 -0
- package/build/cjs/simple-single-select/__stories__/Empty.js +20 -0
- package/build/cjs/simple-single-select/__stories__/EmptyWithEmptyNode.js +28 -0
- package/build/cjs/simple-single-select/__stories__/EmptyWithEmptyText.js +21 -0
- package/build/cjs/simple-single-select/__stories__/FlippedPosition.js +37 -0
- package/build/cjs/simple-single-select/__stories__/InfiniteLoading.js +61 -0
- package/build/cjs/simple-single-select/__stories__/Loading.js +20 -0
- package/build/cjs/simple-single-select/__stories__/ShiftedIntoView.js +28 -0
- package/build/cjs/simple-single-select/__stories__/WithClearButton.js +25 -0
- package/build/cjs/simple-single-select/__stories__/WithCustomLowMaxHeight.js +22 -0
- package/build/cjs/simple-single-select/__stories__/WithCustomOptions.js +48 -0
- package/build/cjs/simple-single-select/__stories__/WithDisabledOption.js +28 -0
- package/build/cjs/simple-single-select/__stories__/WithFilterField.js +36 -0
- package/build/cjs/simple-single-select/__stories__/WithInitialFocus.js +38 -0
- package/build/cjs/simple-single-select/__stories__/WithManyOptions.js +24 -0
- package/build/cjs/simple-single-select/__stories__/WithNoMatchText.js +30 -0
- package/build/cjs/simple-single-select/__stories__/WithOnBlur.js +23 -0
- package/build/cjs/simple-single-select/__stories__/WithOnFocus.js +23 -0
- package/build/cjs/simple-single-select/__stories__/WithOptionsAndDisabled.js +22 -0
- package/build/cjs/simple-single-select/__stories__/WithOptionsAndLoading.js +34 -0
- package/build/cjs/simple-single-select/__stories__/WithOptionsAndLoadingText.js +35 -0
- package/build/cjs/simple-single-select/__stories__/WithPlaceholder.js +23 -0
- package/build/cjs/simple-single-select/__stories__/WithPlaceholderAndSelection.js +25 -0
- package/build/cjs/simple-single-select/__stories__/WithPrefix.js +22 -0
- package/build/cjs/simple-single-select/__stories__/WithPrefixAndSelection.js +25 -0
- package/build/cjs/simple-single-select/__stories__/WithRTL.js +34 -0
- package/build/cjs/simple-single-select/__stories__/WithSelection.js +24 -0
- package/build/cjs/simple-single-select/__stories__/WithSelectionAndDisabled.js +25 -0
- package/build/cjs/simple-single-select/__stories__/WithoutOptionsAndLoading.js +21 -0
- package/build/cjs/simple-single-select/__stories__/WithoutSelection.js +22 -0
- package/build/cjs/simple-single-select/__stories__/options.js +77 -0
- package/build/cjs/simple-single-select/features/keyboard-interactions.test.e2e.js +441 -0
- package/build/cjs/simple-single-select/features/menu-positioning.test.e2e.js +152 -0
- package/build/cjs/simple-single-select/index.js +19 -0
- package/build/cjs/simple-single-select/is-option-hidden.js +22 -0
- package/build/cjs/simple-single-select/menu/empty.js +26 -0
- package/build/cjs/simple-single-select/menu/filter.js +60 -0
- package/build/cjs/simple-single-select/menu/index.js +12 -0
- package/build/cjs/simple-single-select/menu/loading.js +30 -0
- package/build/cjs/simple-single-select/menu/menu.js +158 -0
- package/build/cjs/simple-single-select/menu/no-match.js +28 -0
- package/build/cjs/simple-single-select/menu/option.js +120 -0
- package/build/cjs/simple-single-select/menu/options-list.js +97 -0
- package/build/cjs/simple-single-select/selected-value/clear-button.js +74 -0
- package/build/cjs/simple-single-select/selected-value/container.js +100 -0
- package/build/cjs/simple-single-select/selected-value/index.js +12 -0
- package/build/cjs/simple-single-select/selected-value/placeholder.js +30 -0
- package/build/cjs/simple-single-select/selected-value/prefix.js +30 -0
- package/build/cjs/simple-single-select/selected-value/selected-value.js +119 -0
- package/build/cjs/simple-single-select/shared-prop-types.js +14 -0
- package/build/cjs/simple-single-select/simple-single-select.e2e.stories.js +156 -0
- package/build/cjs/simple-single-select/simple-single-select.js +319 -0
- package/build/cjs/simple-single-select/simple-single-select.prod.stories.js +228 -0
- package/build/cjs/simple-single-select/simple-single-select.test.js +1106 -0
- package/build/cjs/simple-single-select/use-handle-key-press/index.js +19 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-focus-option.js +24 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-handle-key-press-on-combobox.js +177 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-handle-key-press-on-filter-input.js +106 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-handle-typing.js +81 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-highlight-first-option-on-previous-page.js +50 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-highlight-first-visible-option.js +30 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-highlight-last-option-on-next-page.js +50 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-highlight-last-visible-option.js +42 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-page-down.js +45 -0
- package/build/cjs/simple-single-select/use-handle-key-press/use-page-up.js +44 -0
- package/build/cjs/simple-single-select/use-handle-key-press/utils.js +46 -0
- package/build/cjs/simple-single-select-field/index.js +12 -0
- package/build/cjs/simple-single-select-field/simple-single-select-field.js +138 -0
- package/build/cjs/simple-single-select-field/simple-single-select-field.prod.stories.js +188 -0
- package/build/cjs/simple-single-select-field/simple-single-select-field.test.js +133 -0
- package/build/es/index.js +2 -0
- package/build/es/locales/en/translations.json +7 -5
- package/build/es/simple-single-select/__stories__/DefaultPosition.js +29 -0
- package/build/es/simple-single-select/__stories__/Dense.js +13 -0
- package/build/es/simple-single-select/__stories__/Empty.js +11 -0
- package/build/es/simple-single-select/__stories__/EmptyWithEmptyNode.js +19 -0
- package/build/es/simple-single-select/__stories__/EmptyWithEmptyText.js +12 -0
- package/build/es/simple-single-select/__stories__/FlippedPosition.js +28 -0
- package/build/es/simple-single-select/__stories__/InfiniteLoading.js +53 -0
- package/build/es/simple-single-select/__stories__/Loading.js +12 -0
- package/build/es/simple-single-select/__stories__/ShiftedIntoView.js +18 -0
- package/build/es/simple-single-select/__stories__/WithClearButton.js +16 -0
- package/build/es/simple-single-select/__stories__/WithCustomLowMaxHeight.js +13 -0
- package/build/es/simple-single-select/__stories__/WithCustomOptions.js +38 -0
- package/build/es/simple-single-select/__stories__/WithDisabledOption.js +19 -0
- package/build/es/simple-single-select/__stories__/WithFilterField.js +27 -0
- package/build/es/simple-single-select/__stories__/WithInitialFocus.js +29 -0
- package/build/es/simple-single-select/__stories__/WithManyOptions.js +15 -0
- package/build/es/simple-single-select/__stories__/WithNoMatchText.js +21 -0
- package/build/es/simple-single-select/__stories__/WithOnBlur.js +14 -0
- package/build/es/simple-single-select/__stories__/WithOnFocus.js +14 -0
- package/build/es/simple-single-select/__stories__/WithOptionsAndDisabled.js +13 -0
- package/build/es/simple-single-select/__stories__/WithOptionsAndLoading.js +25 -0
- package/build/es/simple-single-select/__stories__/WithOptionsAndLoadingText.js +26 -0
- package/build/es/simple-single-select/__stories__/WithPlaceholder.js +14 -0
- package/build/es/simple-single-select/__stories__/WithPlaceholderAndSelection.js +16 -0
- package/build/es/simple-single-select/__stories__/WithPrefix.js +13 -0
- package/build/es/simple-single-select/__stories__/WithPrefixAndSelection.js +16 -0
- package/build/es/simple-single-select/__stories__/WithRTL.js +25 -0
- package/build/es/simple-single-select/__stories__/WithSelection.js +15 -0
- package/build/es/simple-single-select/__stories__/WithSelectionAndDisabled.js +16 -0
- package/build/es/simple-single-select/__stories__/WithoutOptionsAndLoading.js +12 -0
- package/build/es/simple-single-select/__stories__/WithoutSelection.js +13 -0
- package/build/es/simple-single-select/__stories__/options.js +71 -0
- package/build/es/simple-single-select/features/keyboard-interactions.test.e2e.js +439 -0
- package/build/es/simple-single-select/features/menu-positioning.test.e2e.js +150 -0
- package/build/es/simple-single-select/index.js +2 -0
- package/build/es/simple-single-select/is-option-hidden.js +16 -0
- package/build/es/simple-single-select/menu/empty.js +19 -0
- package/build/es/simple-single-select/menu/filter.js +53 -0
- package/build/es/simple-single-select/menu/index.js +1 -0
- package/build/es/simple-single-select/menu/loading.js +23 -0
- package/build/es/simple-single-select/menu/menu.js +149 -0
- package/build/es/simple-single-select/menu/no-match.js +21 -0
- package/build/es/simple-single-select/menu/option.js +111 -0
- package/build/es/simple-single-select/menu/options-list.js +88 -0
- package/build/es/simple-single-select/selected-value/clear-button.js +68 -0
- package/build/es/simple-single-select/selected-value/container.js +91 -0
- package/build/es/simple-single-select/selected-value/index.js +1 -0
- package/build/es/simple-single-select/selected-value/placeholder.js +23 -0
- package/build/es/simple-single-select/selected-value/prefix.js +23 -0
- package/build/es/simple-single-select/selected-value/selected-value.js +112 -0
- package/build/es/simple-single-select/shared-prop-types.js +7 -0
- package/build/es/simple-single-select/simple-single-select.e2e.stories.js +142 -0
- package/build/es/simple-single-select/simple-single-select.js +310 -0
- package/build/es/simple-single-select/simple-single-select.prod.stories.js +36 -0
- package/build/es/simple-single-select/simple-single-select.test.js +1103 -0
- package/build/es/simple-single-select/use-handle-key-press/index.js +2 -0
- package/build/es/simple-single-select/use-handle-key-press/use-focus-option.js +18 -0
- package/build/es/simple-single-select/use-handle-key-press/use-handle-key-press-on-combobox.js +171 -0
- package/build/es/simple-single-select/use-handle-key-press/use-handle-key-press-on-filter-input.js +100 -0
- package/build/es/simple-single-select/use-handle-key-press/use-handle-typing.js +75 -0
- package/build/es/simple-single-select/use-handle-key-press/use-highlight-first-option-on-previous-page.js +44 -0
- package/build/es/simple-single-select/use-handle-key-press/use-highlight-first-visible-option.js +24 -0
- package/build/es/simple-single-select/use-handle-key-press/use-highlight-last-option-on-next-page.js +44 -0
- package/build/es/simple-single-select/use-handle-key-press/use-highlight-last-visible-option.js +36 -0
- package/build/es/simple-single-select/use-handle-key-press/use-page-down.js +39 -0
- package/build/es/simple-single-select/use-handle-key-press/use-page-up.js +38 -0
- package/build/es/simple-single-select/use-handle-key-press/utils.js +36 -0
- package/build/es/simple-single-select-field/index.js +1 -0
- package/build/es/simple-single-select-field/simple-single-select-field.js +131 -0
- package/build/es/simple-single-select-field/simple-single-select-field.prod.stories.js +172 -0
- package/build/es/simple-single-select-field/simple-single-select-field.test.js +130 -0
- package/package.json +15 -15
- package/types/index.d.ts +184 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
import { IconChevronDown16 } from '@dhis2/ui-icons';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { ClearButton } from './clear-button.js';
|
|
6
|
+
import { Container } from './container.js';
|
|
7
|
+
import { Placeholder } from './placeholder.js';
|
|
8
|
+
import { Prefix } from './prefix.js';
|
|
9
|
+
export function SelectedValue(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
clearText,
|
|
12
|
+
comboBoxId,
|
|
13
|
+
name,
|
|
14
|
+
selectedLabel,
|
|
15
|
+
onKeyDown,
|
|
16
|
+
autoFocus,
|
|
17
|
+
clearable,
|
|
18
|
+
comboBoxRef,
|
|
19
|
+
dataTest,
|
|
20
|
+
dense,
|
|
21
|
+
disabled,
|
|
22
|
+
error,
|
|
23
|
+
expanded,
|
|
24
|
+
hasSelection,
|
|
25
|
+
inputMaxHeight,
|
|
26
|
+
labelledBy,
|
|
27
|
+
placeholder,
|
|
28
|
+
prefix,
|
|
29
|
+
tabIndex,
|
|
30
|
+
valid,
|
|
31
|
+
warning,
|
|
32
|
+
onBlur,
|
|
33
|
+
onClear,
|
|
34
|
+
onClick,
|
|
35
|
+
onFocus
|
|
36
|
+
} = _ref;
|
|
37
|
+
const dataTestPrefix = `${dataTest}-selectedvalue`;
|
|
38
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
39
|
+
dataTest: `${dataTestPrefix}-container`,
|
|
40
|
+
ref: comboBoxRef,
|
|
41
|
+
comboBoxId: comboBoxId,
|
|
42
|
+
autoFocus: autoFocus,
|
|
43
|
+
dense: dense,
|
|
44
|
+
disabled: disabled,
|
|
45
|
+
error: error,
|
|
46
|
+
expanded: expanded,
|
|
47
|
+
labelledBy: labelledBy,
|
|
48
|
+
name: name,
|
|
49
|
+
placeholder: placeholder,
|
|
50
|
+
tabIndex: tabIndex,
|
|
51
|
+
valid: valid,
|
|
52
|
+
warning: warning,
|
|
53
|
+
onBlur: onBlur,
|
|
54
|
+
onClick: onClick,
|
|
55
|
+
onFocus: onFocus,
|
|
56
|
+
onKeyDown: onKeyDown
|
|
57
|
+
}, prefix && /*#__PURE__*/React.createElement(Prefix, {
|
|
58
|
+
dataTest: `${dataTestPrefix}-prefix`,
|
|
59
|
+
prefix: prefix
|
|
60
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
tabIndex: "-1",
|
|
62
|
+
className: _JSXStyle.dynamic([["3226769786", [inputMaxHeight]]]) + " " + "selected-option-label"
|
|
63
|
+
}, !selectedLabel && !prefix && placeholder && /*#__PURE__*/React.createElement(Placeholder, {
|
|
64
|
+
dataTest: `${dataTestPrefix}-placeholder`,
|
|
65
|
+
placeholder: placeholder
|
|
66
|
+
}), selectedLabel), hasSelection && clearable && !disabled && /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: _JSXStyle.dynamic([["3226769786", [inputMaxHeight]]]) + " " + "clear-button-container"
|
|
68
|
+
}, /*#__PURE__*/React.createElement(ClearButton, {
|
|
69
|
+
clearText: clearText,
|
|
70
|
+
dataTest: `${dataTestPrefix}-clear`,
|
|
71
|
+
onClear: onClear
|
|
72
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
73
|
+
"aria-label": "Open select",
|
|
74
|
+
onClick: () => {
|
|
75
|
+
comboBoxRef.current.focus();
|
|
76
|
+
onClick();
|
|
77
|
+
},
|
|
78
|
+
className: _JSXStyle.dynamic([["3226769786", [inputMaxHeight]]]) + " " + "toggle-icon"
|
|
79
|
+
}, /*#__PURE__*/React.createElement(IconChevronDown16, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
80
|
+
id: "3226769786",
|
|
81
|
+
dynamic: [inputMaxHeight]
|
|
82
|
+
}, [`.selected-option-label.__jsx-style-dynamic-selector{overflow-y:auto;max-height:${inputMaxHeight};-webkit-flex:1;-ms-flex:1;flex:1;}`, ".clear-button-container.__jsx-style-dynamic-selector{margin-inline-start:auto;}", ".toggle-icon.__jsx-style-dynamic-selector{display:block;background:none;padding:0;border:0;}"]));
|
|
83
|
+
}
|
|
84
|
+
SelectedValue.propTypes = {
|
|
85
|
+
clearText: PropTypes.string.isRequired,
|
|
86
|
+
comboBoxId: PropTypes.string.isRequired,
|
|
87
|
+
name: PropTypes.string.isRequired,
|
|
88
|
+
selectedLabel: PropTypes.string.isRequired,
|
|
89
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
90
|
+
autoFocus: PropTypes.bool,
|
|
91
|
+
clearable: PropTypes.bool,
|
|
92
|
+
comboBoxRef: PropTypes.shape({
|
|
93
|
+
current: PropTypes.instanceOf(HTMLElement)
|
|
94
|
+
}),
|
|
95
|
+
dataTest: PropTypes.string,
|
|
96
|
+
dense: PropTypes.bool,
|
|
97
|
+
disabled: PropTypes.bool,
|
|
98
|
+
error: PropTypes.bool,
|
|
99
|
+
expanded: PropTypes.bool,
|
|
100
|
+
hasSelection: PropTypes.bool,
|
|
101
|
+
inputMaxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
102
|
+
labelledBy: PropTypes.string,
|
|
103
|
+
placeholder: PropTypes.string,
|
|
104
|
+
prefix: PropTypes.string,
|
|
105
|
+
tabIndex: PropTypes.string,
|
|
106
|
+
valid: PropTypes.bool,
|
|
107
|
+
warning: PropTypes.bool,
|
|
108
|
+
onBlur: PropTypes.func,
|
|
109
|
+
onClear: PropTypes.func,
|
|
110
|
+
onClick: PropTypes.func,
|
|
111
|
+
onFocus: PropTypes.func
|
|
112
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { SimpleSingleSelect } from './simple-single-select.js';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Simple Single Select',
|
|
6
|
+
component: SimpleSingleSelect
|
|
7
|
+
};
|
|
8
|
+
const options = [{
|
|
9
|
+
label: 'ANC 1st visit',
|
|
10
|
+
value: 'anc_1st_visit'
|
|
11
|
+
}, {
|
|
12
|
+
label: 'ANC 2nd visit',
|
|
13
|
+
value: 'anc_2nd_visit'
|
|
14
|
+
}, {
|
|
15
|
+
label: 'ANC 3rd visit',
|
|
16
|
+
value: 'anc_3rd_visit'
|
|
17
|
+
}, {
|
|
18
|
+
label: 'ANC 4th or more visits',
|
|
19
|
+
value: 'anc_4th_or_more_visits'
|
|
20
|
+
}, {
|
|
21
|
+
label: 'ARI treated with antibiotics (pneumonia) follow-up',
|
|
22
|
+
value: 'ari_treated_with_antibiotics_(pneumonia)_follow-up'
|
|
23
|
+
}, {
|
|
24
|
+
label: 'ARI treated with antibiotics (pneumonia) new',
|
|
25
|
+
value: 'ari_treated_with_antibiotics_(pneumonia)_new'
|
|
26
|
+
}, {
|
|
27
|
+
label: 'ARI treated with antibiotics (pneumonia) referrals',
|
|
28
|
+
value: 'ari_treated_with_antibiotics_(pneumonia)_referrals'
|
|
29
|
+
}, {
|
|
30
|
+
label: 'ARI treated without antibiotics (cough) follow-up',
|
|
31
|
+
value: 'ari_treated_without_antibiotics_(cough)_follow-up'
|
|
32
|
+
}, {
|
|
33
|
+
label: 'ARI treated without antibiotics (cough) new',
|
|
34
|
+
value: 'ari_treated_without_antibiotics_(cough)_new'
|
|
35
|
+
}, {
|
|
36
|
+
label: 'ARI treated without antibiotics (cough) referrals',
|
|
37
|
+
value: 'ari_treated_without_antibiotics_(cough)_referrals'
|
|
38
|
+
}, {
|
|
39
|
+
label: 'ART No clients who stopped TRT due to TRT failure',
|
|
40
|
+
value: 'art_no_clients_who_stopped_trt_due_to_trt_failure'
|
|
41
|
+
}, {
|
|
42
|
+
label: 'ART No clients who stopped TRT due to adverse clinical status/event',
|
|
43
|
+
value: 'art_no_clients_who_stopped_trt_due_to_adverse_clinical_status/event'
|
|
44
|
+
}, {
|
|
45
|
+
label: 'ART No clients with change of regimen due to drug toxicity',
|
|
46
|
+
value: 'art_no_clients_with_change_of_regimen_due_to_drug_toxicity'
|
|
47
|
+
}, {
|
|
48
|
+
label: 'ART No clients with new adverse drug reaction',
|
|
49
|
+
value: 'art_no_clients_with_new_adverse_drug_reaction'
|
|
50
|
+
}, {
|
|
51
|
+
label: 'ART No started Opportunist Infection prophylaxis',
|
|
52
|
+
value: 'art_no_started_opportunist_infection_prophylaxis'
|
|
53
|
+
}, {
|
|
54
|
+
label: 'ART clients with new adverse clinical event',
|
|
55
|
+
value: 'art_clients_with_new_adverse_clinical_event'
|
|
56
|
+
}, {
|
|
57
|
+
label: 'ART defaulters',
|
|
58
|
+
value: 'art_defaulters'
|
|
59
|
+
}, {
|
|
60
|
+
label: 'ART enrollment stage 1',
|
|
61
|
+
value: 'art_enrollment_stage_1'
|
|
62
|
+
}, {
|
|
63
|
+
label: 'ART enrollment stage 2',
|
|
64
|
+
value: 'art_enrollment_stage_2'
|
|
65
|
+
}, {
|
|
66
|
+
label: 'ART enrollment stage 3',
|
|
67
|
+
value: 'art_enrollment_stage_3'
|
|
68
|
+
}, {
|
|
69
|
+
label: 'ART enrollment stage 4',
|
|
70
|
+
value: 'art_enrollment_stage_4'
|
|
71
|
+
}, {
|
|
72
|
+
label: 'ART entry point: No PMTCT',
|
|
73
|
+
value: 'art_entry_point:_no_pmtct'
|
|
74
|
+
}];
|
|
75
|
+
const fiveOptions = options.slice(0, 5);
|
|
76
|
+
export const DefaultPosition = () => /*#__PURE__*/React.createElement(SimpleSingleSelect, {
|
|
77
|
+
name: "Simple",
|
|
78
|
+
selected: {
|
|
79
|
+
label: 'ANC 1st visit',
|
|
80
|
+
value: 'anc_1st_visit'
|
|
81
|
+
},
|
|
82
|
+
onChange: () => null,
|
|
83
|
+
options: fiveOptions
|
|
84
|
+
});
|
|
85
|
+
export const FlippedPosition = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SimpleSingleSelect, {
|
|
86
|
+
name: "Simple",
|
|
87
|
+
selected: {
|
|
88
|
+
label: 'ANC 1st visit',
|
|
89
|
+
value: 'anc_1st_visit'
|
|
90
|
+
},
|
|
91
|
+
onChange: () => null,
|
|
92
|
+
options: options
|
|
93
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
94
|
+
id: "979451016"
|
|
95
|
+
}, ["html,body,#storybook-root{position:relative;height:500px;max-height:500px;}", "#storybook-root{padding-top:400px !important;}"]));
|
|
96
|
+
export const ShiftedIntoView = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SimpleSingleSelect, {
|
|
97
|
+
name: "Simple",
|
|
98
|
+
selected: {
|
|
99
|
+
label: 'ANC 1st visit',
|
|
100
|
+
value: 'anc_1st_visit'
|
|
101
|
+
},
|
|
102
|
+
onChange: () => null,
|
|
103
|
+
options: options
|
|
104
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
105
|
+
id: "438540012"
|
|
106
|
+
}, ["html,body,#storybook-root{position:relative;height:300px !important;max-height:300px;}", "#storybook-root{padding-top:130px !important;}"]));
|
|
107
|
+
export const HundretOptions = () => {
|
|
108
|
+
const [selected, setSelected] = useState({
|
|
109
|
+
value: '0',
|
|
110
|
+
label: `Select option 0`
|
|
111
|
+
});
|
|
112
|
+
const [hundretOptions] = useState(Array.apply(null, Array(100)).map((x, i) => ({
|
|
113
|
+
value: `${i}`,
|
|
114
|
+
label: `Select option ${i}`
|
|
115
|
+
})));
|
|
116
|
+
return /*#__PURE__*/React.createElement(SimpleSingleSelect, {
|
|
117
|
+
name: "Simple",
|
|
118
|
+
selected: selected,
|
|
119
|
+
onChange: setSelected,
|
|
120
|
+
options: hundretOptions
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
export const HundretOptionsWithDisabled = () => {
|
|
124
|
+
const [selected, setSelected] = useState({
|
|
125
|
+
value: '10',
|
|
126
|
+
label: `Select option 10`
|
|
127
|
+
});
|
|
128
|
+
const [hundretOptions] = useState(Array.apply(null, Array(100)).map((x, i) => ({
|
|
129
|
+
value: `${i}`,
|
|
130
|
+
label: `Select option ${i}`,
|
|
131
|
+
disabled: [0,
|
|
132
|
+
// first otpion
|
|
133
|
+
17, 18, 99 // last otpion
|
|
134
|
+
].includes(i)
|
|
135
|
+
})));
|
|
136
|
+
return /*#__PURE__*/React.createElement(SimpleSingleSelect, {
|
|
137
|
+
name: "Simple",
|
|
138
|
+
selected: selected,
|
|
139
|
+
onChange: setSelected,
|
|
140
|
+
options: hundretOptions
|
|
141
|
+
});
|
|
142
|
+
};
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { requiredIf } from '@dhis2/prop-types';
|
|
2
|
+
import { sharedPropTypes } from '@dhis2/ui-constants';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import i18n from '../locales/index.js';
|
|
7
|
+
import { Menu } from './menu/index.js';
|
|
8
|
+
import { SelectedValue } from './selected-value/index.js';
|
|
9
|
+
import { optionProp } from './shared-prop-types.js';
|
|
10
|
+
import { useHandleKeyPressOnCombobox, useHandleKeyPressOnFilterInput } from './use-handle-key-press/index.js';
|
|
11
|
+
function useFocussedOptionIndex(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
filterable,
|
|
14
|
+
filterValue,
|
|
15
|
+
options
|
|
16
|
+
} = _ref;
|
|
17
|
+
const [defaultFocussedOptionIndex, setDefaultFocussedOptionIndex] = useState(0);
|
|
18
|
+
const [searchFocussedOptionIndex, setSearchFocussedOptionIndex] = useState(0);
|
|
19
|
+
|
|
20
|
+
// We want to reset the focussed option index when searching when the
|
|
21
|
+
// options change BUT we don't want to reset options when adding more
|
|
22
|
+
// options by using the "infinite scrolling" strategy
|
|
23
|
+
const initialized = useRef(false);
|
|
24
|
+
const prevFirstOption = useRef();
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
var _options$2;
|
|
27
|
+
// Ignore first call to prevent unnecessary re-render
|
|
28
|
+
if (!initialized.current) {
|
|
29
|
+
var _options$;
|
|
30
|
+
initialized.current = true;
|
|
31
|
+
prevFirstOption.current = (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value;
|
|
32
|
+
} else if (filterable && prevFirstOption.current !== ((_options$2 = options[0]) === null || _options$2 === void 0 ? void 0 : _options$2.value)) {
|
|
33
|
+
var _options$3;
|
|
34
|
+
prevFirstOption.current = (_options$3 = options[0]) === null || _options$3 === void 0 ? void 0 : _options$3.value;
|
|
35
|
+
setSearchFocussedOptionIndex(0);
|
|
36
|
+
}
|
|
37
|
+
}, [options, filterable, initialized, prevFirstOption]);
|
|
38
|
+
const focussedOptionIndex = useMemo(() => {
|
|
39
|
+
return filterValue ? searchFocussedOptionIndex : defaultFocussedOptionIndex;
|
|
40
|
+
}, [defaultFocussedOptionIndex, searchFocussedOptionIndex, filterValue]);
|
|
41
|
+
const setFocussedOptionIndex = useMemo(() => {
|
|
42
|
+
return filterValue ? setSearchFocussedOptionIndex : setDefaultFocussedOptionIndex;
|
|
43
|
+
}, [filterValue]);
|
|
44
|
+
return [focussedOptionIndex, setFocussedOptionIndex];
|
|
45
|
+
}
|
|
46
|
+
export function SimpleSingleSelect(_ref2) {
|
|
47
|
+
let {
|
|
48
|
+
name,
|
|
49
|
+
options,
|
|
50
|
+
onChange,
|
|
51
|
+
autoFocus = false,
|
|
52
|
+
className = '',
|
|
53
|
+
clearText: _clearText = '',
|
|
54
|
+
clearable = false,
|
|
55
|
+
optionComponent = undefined,
|
|
56
|
+
dataTest = 'dhis2-simplesingleselect',
|
|
57
|
+
dense = false,
|
|
58
|
+
disabled = false,
|
|
59
|
+
empty: _empty = false,
|
|
60
|
+
error = false,
|
|
61
|
+
filterHelpText = '',
|
|
62
|
+
filterLabel = '',
|
|
63
|
+
filterPlaceholder: _filterPlaceholder = '',
|
|
64
|
+
filterValue = '',
|
|
65
|
+
filterable = false,
|
|
66
|
+
inputMaxHeight = '',
|
|
67
|
+
labelledBy = '',
|
|
68
|
+
loading = false,
|
|
69
|
+
menuLoadingText: _menuLoadingText = '',
|
|
70
|
+
menuMaxHeight = '288px',
|
|
71
|
+
noMatchText: _noMatchText = '',
|
|
72
|
+
optionUpdateStrategy = 'polite',
|
|
73
|
+
placeholder = '',
|
|
74
|
+
prefix = '',
|
|
75
|
+
selected = {
|
|
76
|
+
label: '',
|
|
77
|
+
value: ''
|
|
78
|
+
},
|
|
79
|
+
tabIndex = '0',
|
|
80
|
+
valid = false,
|
|
81
|
+
warning = false,
|
|
82
|
+
onBlur = () => undefined,
|
|
83
|
+
onClear = () => undefined,
|
|
84
|
+
onEndReached = () => undefined,
|
|
85
|
+
onFilterChange = () => undefined,
|
|
86
|
+
onFocus = () => undefined
|
|
87
|
+
} = _ref2;
|
|
88
|
+
// We can't translate with default props as the translation function would
|
|
89
|
+
// be called before we get any translations from the consuming app/lib
|
|
90
|
+
const clearText = _clearText || i18n.t('Clear');
|
|
91
|
+
const empty = _empty || i18n.t('No data found');
|
|
92
|
+
const filterPlaceholder = _filterPlaceholder || i18n.t('Type to filter options');
|
|
93
|
+
const menuLoadingText = _menuLoadingText || i18n.t('Loading options');
|
|
94
|
+
const noMatchText = _noMatchText || i18n.t('No options found');
|
|
95
|
+
const comboBoxId = `${name}-combo`;
|
|
96
|
+
const comboBoxRef = useRef();
|
|
97
|
+
const listBoxRef = useRef();
|
|
98
|
+
const [focussedOptionIndex, setFocussedOptionIndex] = useFocussedOptionIndex({
|
|
99
|
+
filterable,
|
|
100
|
+
filterValue,
|
|
101
|
+
options
|
|
102
|
+
});
|
|
103
|
+
const [selectRef, setSelectRef] = useState();
|
|
104
|
+
const [expanded, setExpanded] = useState(false);
|
|
105
|
+
const closeMenu = useCallback(() => setExpanded(false), []);
|
|
106
|
+
const selectedValue = (selected === null || selected === void 0 ? void 0 : selected.value) || '';
|
|
107
|
+
const selectedLabel = (selected === null || selected === void 0 ? void 0 : selected.label) || '';
|
|
108
|
+
const openMenu = useCallback(() => {
|
|
109
|
+
const selectedOptionIndex = options.findIndex(option => option.value === selectedValue);
|
|
110
|
+
if (selectedOptionIndex !== focussedOptionIndex) {
|
|
111
|
+
setFocussedOptionIndex(selectedOptionIndex);
|
|
112
|
+
}
|
|
113
|
+
setExpanded(true);
|
|
114
|
+
}, [options, selectedValue, focussedOptionIndex, setFocussedOptionIndex]);
|
|
115
|
+
const toggleMenu = useCallback(() => {
|
|
116
|
+
if (expanded) {
|
|
117
|
+
closeMenu();
|
|
118
|
+
} else {
|
|
119
|
+
openMenu();
|
|
120
|
+
}
|
|
121
|
+
}, [expanded, openMenu, closeMenu]);
|
|
122
|
+
const selectFocussedOption = useCallback(() => {
|
|
123
|
+
const option = options[focussedOptionIndex];
|
|
124
|
+
if (option) {
|
|
125
|
+
onChange(option);
|
|
126
|
+
}
|
|
127
|
+
}, [focussedOptionIndex, options, onChange]);
|
|
128
|
+
const focusComboBox = useCallback(() => {
|
|
129
|
+
var _comboBoxRef$current;
|
|
130
|
+
return (_comboBoxRef$current = comboBoxRef.current) === null || _comboBoxRef$current === void 0 ? void 0 : _comboBoxRef$current.focus();
|
|
131
|
+
}, [comboBoxRef]);
|
|
132
|
+
const handleKeyDown = useHandleKeyPressOnCombobox({
|
|
133
|
+
value: selectedValue,
|
|
134
|
+
disabled,
|
|
135
|
+
onChange,
|
|
136
|
+
expanded,
|
|
137
|
+
loading,
|
|
138
|
+
options,
|
|
139
|
+
openMenu,
|
|
140
|
+
closeMenu,
|
|
141
|
+
listBoxRef,
|
|
142
|
+
focussedOptionIndex,
|
|
143
|
+
setFocussedOptionIndex,
|
|
144
|
+
selectFocussedOption
|
|
145
|
+
});
|
|
146
|
+
const handleKeyDownOnFilterInput = useHandleKeyPressOnFilterInput({
|
|
147
|
+
value: selectedValue,
|
|
148
|
+
options,
|
|
149
|
+
loading,
|
|
150
|
+
closeMenu,
|
|
151
|
+
listBoxRef,
|
|
152
|
+
focusComboBox,
|
|
153
|
+
focussedOptionIndex,
|
|
154
|
+
setFocussedOptionIndex,
|
|
155
|
+
selectFocussedOption
|
|
156
|
+
});
|
|
157
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
className: cx('simple-single-select', className),
|
|
159
|
+
"data-test": dataTest,
|
|
160
|
+
ref: div => {
|
|
161
|
+
if (
|
|
162
|
+
// when setting the state (with `setSelectRef), this
|
|
163
|
+
// component will rerender and this function will be run
|
|
164
|
+
// again twice. The first call will provide a null-value
|
|
165
|
+
!div ||
|
|
166
|
+
// Making sure we're not setting state
|
|
167
|
+
// if we already have the correct element
|
|
168
|
+
div === selectRef) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
setSelectRef(div);
|
|
172
|
+
}
|
|
173
|
+
}, /*#__PURE__*/React.createElement(SelectedValue, {
|
|
174
|
+
autoFocus: autoFocus,
|
|
175
|
+
clearText: clearText,
|
|
176
|
+
clearable: clearable,
|
|
177
|
+
comboBoxRef: comboBoxRef,
|
|
178
|
+
comboBoxId: comboBoxId,
|
|
179
|
+
dataTest: dataTest,
|
|
180
|
+
dense: dense,
|
|
181
|
+
disabled: disabled,
|
|
182
|
+
error: error,
|
|
183
|
+
expanded: expanded,
|
|
184
|
+
hasSelection: !!selectedValue,
|
|
185
|
+
inputMaxHeight: inputMaxHeight,
|
|
186
|
+
labelledBy: labelledBy,
|
|
187
|
+
name: name,
|
|
188
|
+
placeholder: placeholder,
|
|
189
|
+
prefix: prefix,
|
|
190
|
+
tabIndex: tabIndex.toString(),
|
|
191
|
+
warning: warning,
|
|
192
|
+
valid: valid,
|
|
193
|
+
selectedLabel: selectedLabel,
|
|
194
|
+
onBlur: onBlur,
|
|
195
|
+
onClear: onClear,
|
|
196
|
+
onClick: toggleMenu,
|
|
197
|
+
onFocus: onFocus,
|
|
198
|
+
onKeyDown: handleKeyDown
|
|
199
|
+
}), /*#__PURE__*/React.createElement(Menu, {
|
|
200
|
+
comboBoxId: comboBoxId,
|
|
201
|
+
optionComponent: optionComponent,
|
|
202
|
+
disabled: disabled,
|
|
203
|
+
empty: empty,
|
|
204
|
+
filterHelpText: filterHelpText,
|
|
205
|
+
filterLabel: filterLabel,
|
|
206
|
+
filterable: filterable,
|
|
207
|
+
filterValue: filterValue,
|
|
208
|
+
filterPlaceholder: filterPlaceholder,
|
|
209
|
+
focussedOptionIndex: focussedOptionIndex,
|
|
210
|
+
onFilterInputKeyDown: handleKeyDownOnFilterInput,
|
|
211
|
+
hidden: !expanded,
|
|
212
|
+
name: name,
|
|
213
|
+
labelledBy: labelledBy,
|
|
214
|
+
listBoxRef: listBoxRef,
|
|
215
|
+
loading: loading,
|
|
216
|
+
loadingText: menuLoadingText,
|
|
217
|
+
maxHeight: menuMaxHeight,
|
|
218
|
+
noMatchText: noMatchText,
|
|
219
|
+
optionUpdateStrategy: optionUpdateStrategy,
|
|
220
|
+
options: options,
|
|
221
|
+
selectRef: selectRef,
|
|
222
|
+
selectedValue: selectedValue,
|
|
223
|
+
tabIndex: tabIndex.toString(),
|
|
224
|
+
onBlur: onBlur,
|
|
225
|
+
onChange: nextValue => {
|
|
226
|
+
onChange(nextValue);
|
|
227
|
+
closeMenu();
|
|
228
|
+
},
|
|
229
|
+
onClose: closeMenu,
|
|
230
|
+
onEndReached: onEndReached,
|
|
231
|
+
onFilterChange: onFilterChange
|
|
232
|
+
}));
|
|
233
|
+
}
|
|
234
|
+
SimpleSingleSelect.propTypes = {
|
|
235
|
+
/** necessary for IDs that are required for accessibility **/
|
|
236
|
+
name: PropTypes.string.isRequired,
|
|
237
|
+
/** An array of options **/
|
|
238
|
+
options: PropTypes.arrayOf(optionProp).isRequired,
|
|
239
|
+
/** A callback that will be called with the new value or an empty string **/
|
|
240
|
+
onChange: PropTypes.func.isRequired,
|
|
241
|
+
/** Will focus the select initially **/
|
|
242
|
+
autoFocus: PropTypes.bool,
|
|
243
|
+
/** Additional class names that will be applied to the root element **/
|
|
244
|
+
className: PropTypes.string,
|
|
245
|
+
/** This will allow us to put an aria-label on the clear button **/
|
|
246
|
+
clearText: requiredIf(props => props.clearable, PropTypes.string),
|
|
247
|
+
/** Whether a clear button should be displayed or not **/
|
|
248
|
+
clearable: PropTypes.bool,
|
|
249
|
+
/** A value for a `data-test` attribute on the root element **/
|
|
250
|
+
dataTest: PropTypes.string,
|
|
251
|
+
/** Renders a select with lower height **/
|
|
252
|
+
dense: PropTypes.bool,
|
|
253
|
+
/** Disables all interactions with the select (except focussing) **/
|
|
254
|
+
disabled: PropTypes.bool,
|
|
255
|
+
/** Text or component to display when there are no options **/
|
|
256
|
+
empty: PropTypes.node,
|
|
257
|
+
/** Applies 'error' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props **/
|
|
258
|
+
error: sharedPropTypes.statusPropType,
|
|
259
|
+
/** Help text that will be displayed below the input **/
|
|
260
|
+
filterHelpText: PropTypes.string,
|
|
261
|
+
/** Value will be used as aria-label attribute on the filter input **/
|
|
262
|
+
filterLabel: PropTypes.string,
|
|
263
|
+
/** Placeholder for the filter input **/
|
|
264
|
+
filterPlaceholder: PropTypes.string,
|
|
265
|
+
/** Value of the filter input **/
|
|
266
|
+
filterValue: PropTypes.string,
|
|
267
|
+
/** Whether the select should display a filter input **/
|
|
268
|
+
filterable: PropTypes.bool,
|
|
269
|
+
/** Max height of the container displaying the selected value **/
|
|
270
|
+
inputMaxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
271
|
+
/** Should contain the id of the element that labels the select, if applicable **/
|
|
272
|
+
labelledBy: PropTypes.string,
|
|
273
|
+
/** Will show a loading indicator at the end of the options-list **/
|
|
274
|
+
loading: PropTypes.bool,
|
|
275
|
+
/** Text that will be displayed next to the loading indicator **/
|
|
276
|
+
menuLoadingText: PropTypes.string,
|
|
277
|
+
/** Allows to modify the max height of the menu **/
|
|
278
|
+
menuMaxHeight: PropTypes.string,
|
|
279
|
+
/** String that will be displayed when the select is being filtered but the options array is empty **/
|
|
280
|
+
noMatchText: requiredIf(props => props.filterable, PropTypes.string),
|
|
281
|
+
/** Allows to override what's rendered inside the `button[role="option"]`.
|
|
282
|
+
* Can be overriden on an individual option basis **/
|
|
283
|
+
optionComponent: PropTypes.elementType,
|
|
284
|
+
/** For a11y: How aggressively the user should be updated about changes in options **/
|
|
285
|
+
optionUpdateStrategy: PropTypes.oneOf(['off', 'polite', 'assertive']),
|
|
286
|
+
/** String to show when there's no selected option **/
|
|
287
|
+
placeholder: PropTypes.string,
|
|
288
|
+
/** String that will be displayed before the label of the selected option **/
|
|
289
|
+
prefix: PropTypes.string,
|
|
290
|
+
selected: PropTypes.shape({
|
|
291
|
+
label: PropTypes.string.isRequired,
|
|
292
|
+
value: PropTypes.string.isRequired
|
|
293
|
+
}),
|
|
294
|
+
/** Standard HTML tab-index attribute that will be put on the combobox's root element **/
|
|
295
|
+
tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
296
|
+
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props **/
|
|
297
|
+
valid: sharedPropTypes.statusPropType,
|
|
298
|
+
/** Applies 'warning' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props **/
|
|
299
|
+
warning: sharedPropTypes.statusPropType,
|
|
300
|
+
/** Will be called when the combobox is loses focus **/
|
|
301
|
+
onBlur: PropTypes.func,
|
|
302
|
+
/** Will be called when the combobox is loses focus **/
|
|
303
|
+
onClear: PropTypes.func,
|
|
304
|
+
/** Will be called when the last option is scrolled into the visible area **/
|
|
305
|
+
onEndReached: PropTypes.func,
|
|
306
|
+
/** Will be called when the filter value changes **/
|
|
307
|
+
onFilterChange: PropTypes.func,
|
|
308
|
+
/** Will be called when the combobox is being focused **/
|
|
309
|
+
onFocus: PropTypes.func
|
|
310
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SimpleSingleSelect } from './simple-single-select.js';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Simple Single Select',
|
|
4
|
+
component: SimpleSingleSelect
|
|
5
|
+
};
|
|
6
|
+
export { WithoutSelection } from './__stories__/WithoutSelection.js';
|
|
7
|
+
export { WithSelection } from './__stories__/WithSelection.js';
|
|
8
|
+
export { WithOnFocus } from './__stories__/WithOnFocus.js';
|
|
9
|
+
export { WithOnBlur } from './__stories__/WithOnBlur.js';
|
|
10
|
+
export { WithCustomOptions } from './__stories__/WithCustomOptions.js';
|
|
11
|
+
export { WithInitialFocus } from './__stories__/WithInitialFocus.js';
|
|
12
|
+
export { Dense } from './__stories__/Dense.js';
|
|
13
|
+
export { Empty } from './__stories__/Empty.js';
|
|
14
|
+
export { Loading } from './__stories__/Loading.js';
|
|
15
|
+
export { InfiniteLoading } from './__stories__/InfiniteLoading.js';
|
|
16
|
+
export { EmptyWithEmptyText } from './__stories__/EmptyWithEmptyText.js';
|
|
17
|
+
export { EmptyWithEmptyNode } from './__stories__/EmptyWithEmptyNode.js';
|
|
18
|
+
export { WithOptionsAndLoading } from './__stories__/WithOptionsAndLoading.js';
|
|
19
|
+
export { WithOptionsAndLoadingText } from './__stories__/WithOptionsAndLoadingText.js';
|
|
20
|
+
export { WithoutOptionsAndLoading } from './__stories__/WithoutOptionsAndLoading.js';
|
|
21
|
+
export { WithManyOptions } from './__stories__/WithManyOptions.js';
|
|
22
|
+
export { WithCustomLowMaxHeight } from './__stories__/WithCustomLowMaxHeight.js';
|
|
23
|
+
export { WithOptionsAndDisabled } from './__stories__/WithOptionsAndDisabled.js';
|
|
24
|
+
export { WithSelectionAndDisabled } from './__stories__/WithSelectionAndDisabled.js';
|
|
25
|
+
export { WithPrefix } from './__stories__/WithPrefix.js';
|
|
26
|
+
export { WithPrefixAndSelection } from './__stories__/WithPrefixAndSelection.js';
|
|
27
|
+
export { WithRTL } from './__stories__/WithRTL.js';
|
|
28
|
+
export { WithPlaceholder } from './__stories__/WithPlaceholder.js';
|
|
29
|
+
export { WithPlaceholderAndSelection } from './__stories__/WithPlaceholderAndSelection.js';
|
|
30
|
+
export { WithDisabledOption } from './__stories__/WithDisabledOption.js';
|
|
31
|
+
export { WithClearButton } from './__stories__/WithClearButton.js';
|
|
32
|
+
export { WithFilterField } from './__stories__/WithFilterField.js';
|
|
33
|
+
export { WithNoMatchText } from './__stories__/WithNoMatchText.js';
|
|
34
|
+
export { DefaultPosition } from './__stories__/DefaultPosition.js';
|
|
35
|
+
export { FlippedPosition } from './__stories__/FlippedPosition.js';
|
|
36
|
+
export { ShiftedIntoView } from './__stories__/ShiftedIntoView.js';
|