@elliemae/ds-controlled-form 2.4.1-rc.2 → 2.4.1-rc.6
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/cjs/autocomplete/Autocomplete.js +4 -5
- package/cjs/autocomplete/AutocompleteCTX.js +3 -14
- package/cjs/autocomplete/AutocompleteDataTestids.js +1 -7
- package/cjs/autocomplete/config/useAutocomplete.js +23 -10
- package/cjs/autocomplete/parts/container/Container.js +36 -20
- package/cjs/autocomplete/parts/container/styled.js +1 -5
- package/cjs/autocomplete/parts/{controls → container}/useKeyboardNavigation.js +8 -24
- package/cjs/autocomplete/parts/menu-list/MenuList.js +17 -50
- package/cjs/autocomplete/parts/menu-list/styled.js +9 -10
- package/cjs/autocomplete/parts/menu-list/useItemRenderer.js +38 -44
- package/cjs/autocomplete/react-desc-prop-types.js +4 -8
- package/cjs/autocomplete/utils/listHelper.js +8 -16
- package/cjs/checkbox/react-desc-prop-types.js +1 -0
- package/cjs/combobox/ComboBox.js +1 -0
- package/cjs/combobox/config/useComboBox.js +8 -2
- package/cjs/combobox/config/useCorrectOptions.js +14 -42
- package/cjs/combobox/index.js +1 -0
- package/cjs/combobox/parts/A11yFocusedOption.js +3 -3
- package/cjs/combobox/parts/controls/Controls.js +4 -2
- package/cjs/combobox/parts/controls-input/ControlsInput.js +2 -0
- package/cjs/combobox/parts/controls-input/styled.js +1 -1
- package/cjs/combobox/parts/controls-input/useControlsInput.js +6 -6
- package/cjs/combobox/parts/controls-input/useKeyboardNavigation.js +30 -26
- package/cjs/combobox/parts/controls-input/useMaskedOnChange.js +7 -5
- package/cjs/combobox/parts/dropdown-indicator/DropdownIndicator.js +6 -4
- package/cjs/combobox/parts/header-list/useHeaderListHandlers.js +4 -4
- package/cjs/combobox/parts/menu-list/MenuList.js +13 -7
- package/cjs/combobox/parts/menu-list/styled.js +16 -5
- package/cjs/combobox/parts/menu-list/useItemRenderer.js +8 -8
- package/cjs/combobox/parts/menu-list/useMenuListSetFocusOption.js +6 -6
- package/cjs/combobox/react-desc-prop-types.js +2 -1
- package/cjs/combobox/utils/listHelper.js +40 -11
- package/cjs/index.js +20 -3
- package/cjs/large-text-input/DSControlledLargeTextInput.js +83 -0
- package/cjs/large-text-input/exported-related/data-test-ids.js +11 -0
- package/cjs/large-text-input/exported-related/index.js +12 -0
- package/cjs/large-text-input/exported-related/theming.js +13 -0
- package/cjs/large-text-input/index.js +15 -0
- package/cjs/large-text-input/react-desc-prop-types.js +45 -0
- package/cjs/large-text-input/styles.js +40 -0
- package/cjs/mask-hook/hooks/index.js +11 -3
- package/cjs/mask-hook/hooks/useNumberMask.js +7 -0
- package/cjs/mask-hook/hooks/usePhoneMask.js +7 -0
- package/cjs/mask-hook/hooks/useRegExpMask.js +122 -0
- package/cjs/mask-hook/hooks/useSSNMask.js +7 -0
- package/cjs/mask-hook/hooks/{useZipCode.js → useZipCodeMask.js} +12 -5
- package/cjs/mask-hook/index.js +11 -3
- package/cjs/mask-hook/react-desc-prop-types.js +9 -0
- package/cjs/mask-hook/utils/addSpecialCharacters.js +3 -4
- package/cjs/mask-hook/utils/flatStringArray.js +18 -0
- package/cjs/mask-hook/utils/index.js +2 -0
- package/esm/autocomplete/Autocomplete.js +2 -3
- package/esm/autocomplete/AutocompleteCTX.js +3 -14
- package/esm/autocomplete/AutocompleteDataTestids.js +1 -7
- package/esm/autocomplete/config/useAutocomplete.js +27 -14
- package/esm/autocomplete/parts/container/Container.js +38 -23
- package/esm/autocomplete/parts/container/styled.js +2 -5
- package/esm/autocomplete/parts/{controls → container}/useKeyboardNavigation.js +8 -24
- package/esm/autocomplete/parts/menu-list/MenuList.js +19 -52
- package/esm/autocomplete/parts/menu-list/styled.js +9 -10
- package/esm/autocomplete/parts/menu-list/useItemRenderer.js +39 -45
- package/esm/autocomplete/react-desc-prop-types.js +5 -8
- package/esm/autocomplete/utils/listHelper.js +8 -16
- package/esm/checkbox/react-desc-prop-types.js +1 -0
- package/esm/combobox/ComboBox.js +1 -1
- package/esm/combobox/config/useComboBox.js +8 -2
- package/esm/combobox/config/useCorrectOptions.js +15 -43
- package/esm/combobox/index.js +1 -1
- package/esm/combobox/parts/A11yFocusedOption.js +3 -3
- package/esm/combobox/parts/controls/Controls.js +4 -2
- package/esm/combobox/parts/controls-input/ControlsInput.js +2 -0
- package/esm/combobox/parts/controls-input/styled.js +1 -1
- package/esm/combobox/parts/controls-input/useControlsInput.js +6 -6
- package/esm/combobox/parts/controls-input/useKeyboardNavigation.js +30 -26
- package/esm/combobox/parts/controls-input/useMaskedOnChange.js +7 -5
- package/esm/combobox/parts/dropdown-indicator/DropdownIndicator.js +2 -2
- package/esm/combobox/parts/header-list/useHeaderListHandlers.js +4 -4
- package/esm/combobox/parts/menu-list/MenuList.js +13 -7
- package/esm/combobox/parts/menu-list/styled.js +16 -5
- package/esm/combobox/parts/menu-list/useItemRenderer.js +8 -8
- package/esm/combobox/parts/menu-list/useMenuListSetFocusOption.js +6 -6
- package/esm/combobox/react-desc-prop-types.js +2 -1
- package/esm/combobox/utils/listHelper.js +38 -12
- package/esm/index.js +9 -5
- package/esm/large-text-input/DSControlledLargeTextInput.js +72 -0
- package/esm/large-text-input/exported-related/data-test-ids.js +7 -0
- package/esm/large-text-input/exported-related/index.js +2 -0
- package/esm/large-text-input/exported-related/theming.js +8 -0
- package/esm/large-text-input/index.js +3 -0
- package/esm/large-text-input/react-desc-prop-types.js +36 -0
- package/esm/large-text-input/styles.js +30 -0
- package/esm/mask-hook/hooks/index.js +5 -4
- package/esm/mask-hook/hooks/useNumberMask.js +7 -1
- package/esm/mask-hook/hooks/usePhoneMask.js +7 -1
- package/esm/mask-hook/hooks/useRegExpMask.js +116 -0
- package/esm/mask-hook/hooks/useSSNMask.js +7 -1
- package/esm/mask-hook/hooks/{useZipCode.js → useZipCodeMask.js} +11 -5
- package/esm/mask-hook/index.js +5 -4
- package/esm/mask-hook/react-desc-prop-types.js +8 -1
- package/esm/mask-hook/utils/addSpecialCharacters.js +3 -4
- package/esm/mask-hook/utils/flatStringArray.js +14 -0
- package/esm/mask-hook/utils/index.js +1 -0
- package/package.json +60 -88
- package/types/autocomplete/Autocomplete.d.ts +4 -61
- package/types/autocomplete/AutocompleteCTX.d.ts +4 -3
- package/types/autocomplete/AutocompleteDataTestids.d.ts +1 -7
- package/types/autocomplete/config/useAutocomplete.d.ts +3 -2
- package/types/autocomplete/parts/container/Container.d.ts +1 -2
- package/types/autocomplete/parts/container/styled.d.ts +0 -1
- package/types/autocomplete/parts/{controls → container}/useKeyboardNavigation.d.ts +0 -0
- package/types/autocomplete/parts/menu-list/MenuList.d.ts +1 -2
- package/types/autocomplete/parts/menu-list/styled.d.ts +1 -4
- package/types/autocomplete/parts/menu-list/useItemRenderer.d.ts +2 -3
- package/types/autocomplete/react-desc-prop-types.d.ts +8 -18
- package/types/autocomplete/sharedTypes.d.ts +1 -3
- package/types/autocomplete/tests/general.test.d.ts +1 -0
- package/types/autocomplete/tests/utils.d.ts +5 -0
- package/types/autocomplete/utils/listHelper.d.ts +2 -2
- package/types/checkbox/ControlledCheckbox.d.ts +1 -1
- package/types/checkbox/react-desc-prop-types.d.ts +366 -1
- package/types/combobox/ComboBox.d.ts +2 -2
- package/types/combobox/parts/dropdown-indicator/DropdownIndicator.d.ts +1 -0
- package/types/combobox/react-desc-prop-types.d.ts +381 -3
- package/types/combobox/utils/listHelper.d.ts +4 -1
- package/types/index.d.ts +1 -0
- package/types/large-text-input/DSControlledLargeTextInput.d.ts +5 -0
- package/types/large-text-input/exported-related/data-test-ids.d.ts +5 -0
- package/types/large-text-input/exported-related/index.d.ts +2 -0
- package/types/large-text-input/exported-related/theming.d.ts +6 -0
- package/types/large-text-input/index.d.ts +2 -0
- package/types/large-text-input/react-desc-prop-types.d.ts +447 -0
- package/types/large-text-input/styles.d.ts +3 -0
- package/types/large-text-input/tests/DSControlledLargeTextInput.test.d.ts +1 -0
- package/types/mask-hook/hooks/index.d.ts +2 -1
- package/types/mask-hook/hooks/useNumberMask.d.ts +2 -1
- package/types/mask-hook/hooks/usePhoneMask.d.ts +2 -1
- package/types/mask-hook/hooks/useRegExpMask.d.ts +4 -0
- package/types/mask-hook/hooks/useSSNMask.d.ts +2 -1
- package/types/mask-hook/hooks/useZipCodeMask.d.ts +4 -0
- package/types/mask-hook/react-desc-prop-types.d.ts +6 -1
- package/types/mask-hook/tests/useRegExpMask.test.d.ts +1 -0
- package/types/mask-hook/utils/flatStringArray.d.ts +1 -0
- package/types/mask-hook/utils/index.d.ts +1 -0
- package/types/text-input/DSInputText.d.ts +1 -1
- package/types/text-input/config/useInputText.d.ts +110 -110
- package/cjs/autocomplete/config/constants.js +0 -14
- package/cjs/autocomplete/config/useGetPropsWithDefault.js +0 -11
- package/cjs/autocomplete/index.d.js +0 -2
- package/cjs/autocomplete/parts/a11y-messages/MultiAllyMessages.js +0 -33
- package/cjs/autocomplete/parts/a11y-messages/SingleAllyMessages.js +0 -28
- package/cjs/autocomplete/parts/a11y-messages/index.js +0 -11
- package/cjs/autocomplete/parts/a11y-messages/styled.js +0 -15
- package/cjs/autocomplete/parts/controls/Controls.js +0 -63
- package/cjs/autocomplete/parts/controls/index.js +0 -9
- package/cjs/autocomplete/parts/controls/styled.js +0 -44
- package/cjs/autocomplete/parts/controls/useControlsInput.js +0 -44
- package/cjs/autocomplete/parts/controls/useMaskedOnChange.js +0 -28
- package/cjs/autocomplete/parts/menu-list/useMenuList.js +0 -69
- package/cjs/autocomplete/propTypes.js +0 -25
- package/cjs/autocomplete/utils/hooks/useKeyboardNavigation.js +0 -97
- package/cjs/autocomplete/utils/hooks/useOnElementResize.js +0 -37
- package/cjs/text-input/exported-related/name.js +0 -7
- package/cjs/text-input/exported-related/slots.js +0 -11
- package/esm/autocomplete/config/constants.js +0 -10
- package/esm/autocomplete/config/useGetPropsWithDefault.js +0 -7
- package/esm/autocomplete/index.d.js +0 -1
- package/esm/autocomplete/parts/a11y-messages/MultiAllyMessages.js +0 -25
- package/esm/autocomplete/parts/a11y-messages/SingleAllyMessages.js +0 -20
- package/esm/autocomplete/parts/a11y-messages/index.js +0 -2
- package/esm/autocomplete/parts/a11y-messages/styled.js +0 -7
- package/esm/autocomplete/parts/controls/Controls.js +0 -55
- package/esm/autocomplete/parts/controls/index.js +0 -1
- package/esm/autocomplete/parts/controls/styled.js +0 -32
- package/esm/autocomplete/parts/controls/useControlsInput.js +0 -40
- package/esm/autocomplete/parts/controls/useMaskedOnChange.js +0 -24
- package/esm/autocomplete/parts/menu-list/useMenuList.js +0 -65
- package/esm/autocomplete/propTypes.js +0 -21
- package/esm/autocomplete/utils/hooks/useKeyboardNavigation.js +0 -93
- package/esm/autocomplete/utils/hooks/useOnElementResize.js +0 -33
- package/esm/text-input/exported-related/name.js +0 -3
- package/esm/text-input/exported-related/slots.js +0 -7
- package/types/autocomplete/config/constants.d.ts +0 -8
- package/types/autocomplete/config/useGetPropsWithDefault.d.ts +0 -2
- package/types/autocomplete/parts/a11y-messages/MultiAllyMessages.d.ts +0 -3
- package/types/autocomplete/parts/a11y-messages/SingleAllyMessages.d.ts +0 -3
- package/types/autocomplete/parts/a11y-messages/index.d.ts +0 -2
- package/types/autocomplete/parts/a11y-messages/styled.d.ts +0 -1
- package/types/autocomplete/parts/controls/Controls.d.ts +0 -3
- package/types/autocomplete/parts/controls/index.d.ts +0 -1
- package/types/autocomplete/parts/controls/styled.d.ts +0 -8
- package/types/autocomplete/parts/controls/useControlsInput.d.ts +0 -9
- package/types/autocomplete/parts/controls/useMaskedOnChange.d.ts +0 -2
- package/types/autocomplete/parts/menu-list/useMenuList.d.ts +0 -2
- package/types/autocomplete/propTypes.d.ts +0 -51
- package/types/autocomplete/utils/hooks/useKeyboardNavigation.d.ts +0 -4
- package/types/autocomplete/utils/hooks/useOnElementResize.d.ts +0 -3
- package/types/mask-hook/hooks/useZipCode.d.ts +0 -3
- package/types/text-input/exported-related/name.d.ts +0 -1
- package/types/text-input/exported-related/slots.d.ts +0 -5
|
@@ -19,9 +19,9 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
19
19
|
hasError: boolean;
|
|
20
20
|
inputSize: "s" | "m";
|
|
21
21
|
clearable: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
shape: string;
|
|
23
|
+
children: string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null;
|
|
24
|
+
onSelect: React.ReactEventHandler<HTMLInputElement>;
|
|
25
25
|
media: string;
|
|
26
26
|
cite: string;
|
|
27
27
|
data: string;
|
|
@@ -35,97 +35,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
35
35
|
pattern: string;
|
|
36
36
|
default: boolean;
|
|
37
37
|
type: string;
|
|
38
|
-
children: string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null;
|
|
39
38
|
name: string;
|
|
40
|
-
accept: string;
|
|
41
|
-
acceptCharset: string;
|
|
42
|
-
action: string;
|
|
43
|
-
allowFullScreen: boolean;
|
|
44
|
-
allowTransparency: boolean;
|
|
45
|
-
alt: string;
|
|
46
|
-
async: boolean;
|
|
47
|
-
autoComplete: string;
|
|
48
|
-
autoPlay: boolean;
|
|
49
|
-
capture: boolean | "user" | "environment";
|
|
50
|
-
cellPadding: string | number;
|
|
51
|
-
cellSpacing: string | number;
|
|
52
|
-
charSet: string;
|
|
53
|
-
challenge: string;
|
|
54
|
-
checked: boolean;
|
|
55
|
-
classID: string;
|
|
56
|
-
cols: number;
|
|
57
|
-
colSpan: number;
|
|
58
|
-
content: string;
|
|
59
|
-
controls: boolean;
|
|
60
|
-
coords: string;
|
|
61
|
-
crossOrigin: string;
|
|
62
|
-
dateTime: string;
|
|
63
|
-
defer: boolean;
|
|
64
|
-
download: any;
|
|
65
|
-
encType: string;
|
|
66
|
-
formAction: string;
|
|
67
|
-
formEncType: string;
|
|
68
|
-
formMethod: string;
|
|
69
|
-
formNoValidate: boolean;
|
|
70
|
-
formTarget: string;
|
|
71
|
-
frameBorder: string | number;
|
|
72
|
-
headers: string;
|
|
73
|
-
height: string | number;
|
|
74
|
-
high: number;
|
|
75
|
-
href: string;
|
|
76
|
-
hrefLang: string;
|
|
77
|
-
htmlFor: string;
|
|
78
|
-
httpEquiv: string;
|
|
79
|
-
integrity: string;
|
|
80
|
-
keyParams: string;
|
|
81
|
-
keyType: string;
|
|
82
|
-
kind: string;
|
|
83
|
-
list: string;
|
|
84
|
-
loop: boolean;
|
|
85
|
-
low: number;
|
|
86
|
-
manifest: string;
|
|
87
|
-
marginHeight: number;
|
|
88
|
-
marginWidth: number;
|
|
89
|
-
max: string | number;
|
|
90
|
-
maxLength: number;
|
|
91
|
-
mediaGroup: string;
|
|
92
|
-
method: string;
|
|
93
|
-
min: string | number;
|
|
94
|
-
minLength: number;
|
|
95
|
-
multiple: boolean;
|
|
96
|
-
muted: boolean;
|
|
97
|
-
nonce: string;
|
|
98
|
-
noValidate: boolean;
|
|
99
|
-
open: boolean;
|
|
100
|
-
optimum: number;
|
|
101
|
-
playsInline: boolean;
|
|
102
|
-
poster: string;
|
|
103
|
-
preload: string;
|
|
104
|
-
rel: string;
|
|
105
|
-
required: boolean;
|
|
106
|
-
reversed: boolean;
|
|
107
|
-
rows: number;
|
|
108
|
-
rowSpan: number;
|
|
109
|
-
sandbox: string;
|
|
110
|
-
scope: string;
|
|
111
|
-
scoped: boolean;
|
|
112
|
-
scrolling: string;
|
|
113
|
-
seamless: boolean;
|
|
114
|
-
selected: boolean;
|
|
115
|
-
shape: string;
|
|
116
|
-
size: number;
|
|
117
|
-
sizes: string;
|
|
118
|
-
src: string;
|
|
119
|
-
srcDoc: string;
|
|
120
|
-
srcLang: string;
|
|
121
|
-
srcSet: string;
|
|
122
|
-
start: number;
|
|
123
|
-
step: string | number;
|
|
124
|
-
target: string;
|
|
125
|
-
useMap: string;
|
|
126
|
-
width: string | number;
|
|
127
|
-
wmode: string;
|
|
128
|
-
wrap: string;
|
|
129
39
|
defaultChecked: boolean;
|
|
130
40
|
defaultValue: string | number | readonly string[];
|
|
131
41
|
suppressContentEditableWarning: boolean;
|
|
@@ -143,7 +53,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
143
53
|
tabIndex: number;
|
|
144
54
|
translate: "yes" | "no";
|
|
145
55
|
radioGroup: string;
|
|
146
|
-
role: "
|
|
56
|
+
role: "separator" | "option" | (string & {}) | "article" | "button" | "dialog" | "figure" | "form" | "img" | "link" | "main" | "menu" | "menuitem" | "table" | "switch" | "search" | "alert" | "alertdialog" | "application" | "banner" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "directory" | "document" | "feed" | "grid" | "gridcell" | "group" | "heading" | "list" | "listbox" | "listitem" | "log" | "marquee" | "math" | "menubar" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "status" | "tab" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
|
|
147
57
|
about: string;
|
|
148
58
|
datatype: string;
|
|
149
59
|
inlist: any;
|
|
@@ -163,7 +73,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
163
73
|
itemRef: string;
|
|
164
74
|
results: number;
|
|
165
75
|
security: string;
|
|
166
|
-
unselectable: "
|
|
76
|
+
unselectable: "on" | "off";
|
|
167
77
|
inputMode: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
168
78
|
is: string;
|
|
169
79
|
'aria-activedescendant': string;
|
|
@@ -175,7 +85,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
175
85
|
'aria-colindex': number;
|
|
176
86
|
'aria-colspan': number;
|
|
177
87
|
'aria-controls': string;
|
|
178
|
-
'aria-current': boolean | "time" | "
|
|
88
|
+
'aria-current': boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
|
|
179
89
|
'aria-describedby': string;
|
|
180
90
|
'aria-details': string;
|
|
181
91
|
'aria-disabled': boolean | "true" | "false";
|
|
@@ -184,7 +94,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
184
94
|
'aria-expanded': boolean | "true" | "false";
|
|
185
95
|
'aria-flowto': string;
|
|
186
96
|
'aria-grabbed': boolean | "true" | "false";
|
|
187
|
-
'aria-haspopup': boolean | "dialog" | "menu" | "true" | "false" | "
|
|
97
|
+
'aria-haspopup': boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree";
|
|
188
98
|
'aria-hidden': boolean | "true" | "false";
|
|
189
99
|
'aria-invalid': boolean | "true" | "false" | "grammar" | "spelling";
|
|
190
100
|
'aria-keyshortcuts': string;
|
|
@@ -233,6 +143,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
233
143
|
onFocusCapture: React.FocusEventHandler<HTMLInputElement>;
|
|
234
144
|
onBlur: React.FocusEventHandler<HTMLInputElement>;
|
|
235
145
|
onBlurCapture: React.FocusEventHandler<HTMLInputElement>;
|
|
146
|
+
onChange: React.FormEventHandler<HTMLInputElement>;
|
|
236
147
|
onChangeCapture: React.FormEventHandler<HTMLInputElement>;
|
|
237
148
|
onBeforeInput: React.FormEventHandler<HTMLInputElement>;
|
|
238
149
|
onBeforeInputCapture: React.FormEventHandler<HTMLInputElement>;
|
|
@@ -248,6 +159,7 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
248
159
|
onLoadCapture: React.ReactEventHandler<HTMLInputElement>;
|
|
249
160
|
onError: React.ReactEventHandler<HTMLInputElement>;
|
|
250
161
|
onErrorCapture: React.ReactEventHandler<HTMLInputElement>;
|
|
162
|
+
onKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
|
|
251
163
|
onKeyDownCapture: React.KeyboardEventHandler<HTMLInputElement>;
|
|
252
164
|
onKeyPress: React.KeyboardEventHandler<HTMLInputElement>;
|
|
253
165
|
onKeyPressCapture: React.KeyboardEventHandler<HTMLInputElement>;
|
|
@@ -333,7 +245,6 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
333
245
|
onMouseOverCapture: React.MouseEventHandler<HTMLInputElement>;
|
|
334
246
|
onMouseUp: React.MouseEventHandler<HTMLInputElement>;
|
|
335
247
|
onMouseUpCapture: React.MouseEventHandler<HTMLInputElement>;
|
|
336
|
-
onSelect: React.ReactEventHandler<HTMLInputElement>;
|
|
337
248
|
onSelectCapture: React.ReactEventHandler<HTMLInputElement>;
|
|
338
249
|
onTouchCancel: React.TouchEventHandler<HTMLInputElement>;
|
|
339
250
|
onTouchCancelCapture: React.TouchEventHandler<HTMLInputElement>;
|
|
@@ -375,6 +286,95 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
375
286
|
onAnimationIterationCapture: React.AnimationEventHandler<HTMLInputElement>;
|
|
376
287
|
onTransitionEnd: React.TransitionEventHandler<HTMLInputElement>;
|
|
377
288
|
onTransitionEndCapture: React.TransitionEventHandler<HTMLInputElement>;
|
|
289
|
+
list: string;
|
|
290
|
+
width: string | number;
|
|
291
|
+
sizes: string;
|
|
292
|
+
height: string | number;
|
|
293
|
+
accept: string;
|
|
294
|
+
acceptCharset: string;
|
|
295
|
+
action: string;
|
|
296
|
+
allowFullScreen: boolean;
|
|
297
|
+
allowTransparency: boolean;
|
|
298
|
+
alt: string;
|
|
299
|
+
async: boolean;
|
|
300
|
+
autoComplete: string;
|
|
301
|
+
autoFocus: boolean;
|
|
302
|
+
autoPlay: boolean;
|
|
303
|
+
capture: boolean | "user" | "environment";
|
|
304
|
+
cellPadding: string | number;
|
|
305
|
+
cellSpacing: string | number;
|
|
306
|
+
charSet: string;
|
|
307
|
+
challenge: string;
|
|
308
|
+
checked: boolean;
|
|
309
|
+
classID: string;
|
|
310
|
+
cols: number;
|
|
311
|
+
colSpan: number;
|
|
312
|
+
content: string;
|
|
313
|
+
controls: boolean;
|
|
314
|
+
coords: string;
|
|
315
|
+
crossOrigin: string;
|
|
316
|
+
dateTime: string;
|
|
317
|
+
defer: boolean;
|
|
318
|
+
download: any;
|
|
319
|
+
encType: string;
|
|
320
|
+
formAction: string;
|
|
321
|
+
formEncType: string;
|
|
322
|
+
formMethod: string;
|
|
323
|
+
formNoValidate: boolean;
|
|
324
|
+
formTarget: string;
|
|
325
|
+
frameBorder: string | number;
|
|
326
|
+
headers: string;
|
|
327
|
+
high: number;
|
|
328
|
+
href: string;
|
|
329
|
+
hrefLang: string;
|
|
330
|
+
htmlFor: string;
|
|
331
|
+
httpEquiv: string;
|
|
332
|
+
integrity: string;
|
|
333
|
+
keyParams: string;
|
|
334
|
+
keyType: string;
|
|
335
|
+
kind: string;
|
|
336
|
+
loop: boolean;
|
|
337
|
+
low: number;
|
|
338
|
+
manifest: string;
|
|
339
|
+
marginHeight: number;
|
|
340
|
+
marginWidth: number;
|
|
341
|
+
max: string | number;
|
|
342
|
+
maxLength: number;
|
|
343
|
+
mediaGroup: string;
|
|
344
|
+
method: string;
|
|
345
|
+
min: string | number;
|
|
346
|
+
minLength: number;
|
|
347
|
+
multiple: boolean;
|
|
348
|
+
muted: boolean;
|
|
349
|
+
nonce: string;
|
|
350
|
+
noValidate: boolean;
|
|
351
|
+
open: boolean;
|
|
352
|
+
optimum: number;
|
|
353
|
+
playsInline: boolean;
|
|
354
|
+
poster: string;
|
|
355
|
+
preload: string;
|
|
356
|
+
rel: string;
|
|
357
|
+
required: boolean;
|
|
358
|
+
reversed: boolean;
|
|
359
|
+
rows: number;
|
|
360
|
+
rowSpan: number;
|
|
361
|
+
sandbox: string;
|
|
362
|
+
scope: string;
|
|
363
|
+
scoped: boolean;
|
|
364
|
+
scrolling: string;
|
|
365
|
+
seamless: boolean;
|
|
366
|
+
selected: boolean;
|
|
367
|
+
size: number;
|
|
368
|
+
src: string;
|
|
369
|
+
srcDoc: string;
|
|
370
|
+
srcLang: string;
|
|
371
|
+
srcSet: string;
|
|
372
|
+
start: number;
|
|
373
|
+
step: string | number;
|
|
374
|
+
target: string;
|
|
375
|
+
useMap: string;
|
|
376
|
+
wmode: string;
|
|
377
|
+
wrap: string;
|
|
378
378
|
margin: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
379
379
|
m: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
380
380
|
marginTop: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
@@ -385,8 +385,8 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
385
385
|
mb: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
386
386
|
marginLeft: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
387
387
|
ml: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
388
|
-
mx: string | 0 | (string & {}) | (
|
|
389
|
-
my: string | 0 | (string & {}) | (
|
|
388
|
+
mx: string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ({} & "auto") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | ("auto" & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ({} & "auto") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | ("auto" & {}), import("@xstyled/system").Theme>;
|
|
389
|
+
my: string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ({} & "auto") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | ("auto" & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ({} & "auto") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | ("auto" & {}), import("@xstyled/system").Theme>;
|
|
390
390
|
padding: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
391
391
|
p: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
392
392
|
paddingTop: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
@@ -397,8 +397,8 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
397
397
|
pb: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
398
398
|
paddingLeft: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
399
399
|
pl: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
400
|
-
px: string | 0 | (string & {}) | (
|
|
401
|
-
py: string | 0 | (string & {}) | (
|
|
400
|
+
px: string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}), import("@xstyled/system").Theme>;
|
|
401
|
+
py: string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}) | ({} & "inherit") | ({} & "-moz-initial") | ({} & "initial") | ({} & "revert") | ({} & "unset") | ("inherit" & {}) | ("-moz-initial" & {}) | ("initial" & {}) | ("revert" & {}) | ("unset" & {}), import("@xstyled/system").Theme>;
|
|
402
402
|
spaceX: string | import("@xstyled/system").ThemeProp<string, import("@xstyled/system").Theme>;
|
|
403
403
|
spaceY: string | import("@xstyled/system").ThemeProp<string, import("@xstyled/system").Theme>;
|
|
404
404
|
spaceXReverse: boolean | import("@xstyled/system").ThemeProp<boolean, import("@xstyled/system").Theme>;
|
|
@@ -413,22 +413,22 @@ export declare const useInputText: (props: DSInputTextT.Props) => {
|
|
|
413
413
|
minHeight: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
414
414
|
minH: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
415
415
|
maskSize: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
416
|
-
display:
|
|
417
|
-
float: "
|
|
416
|
+
display: (string & {}) | "ruby" | "table" | "inherit" | "grid" | "none" | "-moz-initial" | "initial" | "revert" | "unset" | "inline" | "block" | "run-in" | "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "ruby-base" | "ruby-base-container" | "ruby-text" | "ruby-text-container" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row" | "table-row-group" | "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table" | "contents" | "list-item" | import("@xstyled/system").ThemeProp<import("csstype").Property.Display, import("@xstyled/system").Theme>;
|
|
417
|
+
float: "inherit" | "none" | "left" | "-moz-initial" | "initial" | "revert" | "unset" | "right" | "inline-end" | "inline-start" | import("@xstyled/system").ThemeProp<import("csstype").Property.Float, import("@xstyled/system").Theme>;
|
|
418
418
|
boxSizing: "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "border-box" | "content-box" | import("@xstyled/system").ThemeProp<import("csstype").Property.BoxSizing, import("@xstyled/system").Theme>;
|
|
419
419
|
container: boolean | import("@xstyled/system").ThemeProp<boolean, import("@xstyled/system").Theme>;
|
|
420
|
-
overflow: "hidden" | "inherit" |
|
|
421
|
-
overflowX: "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "
|
|
422
|
-
overflowY: "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "
|
|
423
|
-
position: "fixed" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "-webkit-sticky" | "
|
|
420
|
+
overflow: (string & {}) | "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "scroll" | "clip" | "-moz-hidden-unscrollable" | "visible" | import("@xstyled/system").ThemeProp<import("csstype").Property.Overflow, import("@xstyled/system").Theme>;
|
|
421
|
+
overflowX: "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "scroll" | "clip" | "-moz-hidden-unscrollable" | "visible" | import("@xstyled/system").ThemeProp<import("csstype").Property.OverflowX, import("@xstyled/system").Theme>;
|
|
422
|
+
overflowY: "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "scroll" | "clip" | "-moz-hidden-unscrollable" | "visible" | import("@xstyled/system").ThemeProp<import("csstype").Property.OverflowY, import("@xstyled/system").Theme>;
|
|
423
|
+
position: "fixed" | "inherit" | "absolute" | "-moz-initial" | "initial" | "revert" | "unset" | "-webkit-sticky" | "relative" | "static" | "sticky" | import("@xstyled/system").ThemeProp<import("csstype").Property.Position, import("@xstyled/system").Theme>;
|
|
424
424
|
zIndex: string | (string & {}) | (number & {}) | import("@xstyled/system").ThemeProp<string | (string & {}) | (number & {}), import("@xstyled/system").Theme>;
|
|
425
425
|
top: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
426
426
|
right: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
427
427
|
bottom: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
428
428
|
left: string | 0 | (string & {}) | import("@xstyled/system").ThemeProp<string | 0 | (string & {}), import("@xstyled/system").Theme>;
|
|
429
429
|
visibility: "hidden" | "inherit" | "-moz-initial" | "initial" | "revert" | "unset" | "visible" | "collapse" | import("@xstyled/system").ThemeProp<import("csstype").Property.Visibility, import("@xstyled/system").Theme>;
|
|
430
|
-
overscrollBehavior:
|
|
431
|
-
objectFit: "
|
|
430
|
+
overscrollBehavior: (string & {}) | "inherit" | "none" | "-moz-initial" | "initial" | "revert" | "unset" | "auto" | "contain" | import("@xstyled/system").ThemeProp<import("csstype").Property.OverscrollBehavior, import("@xstyled/system").Theme>;
|
|
431
|
+
objectFit: "inherit" | "none" | "-moz-initial" | "initial" | "revert" | "unset" | "fill" | "contain" | "cover" | "scale-down" | import("@xstyled/system").ThemeProp<import("csstype").Property.ObjectFit, import("@xstyled/system").Theme>;
|
|
432
432
|
};
|
|
433
433
|
xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
434
434
|
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const DATA_TESTID = {
|
|
6
|
-
COMBOBOX_MENU_LIST: 'autocomplete-menu-list',
|
|
7
|
-
COMBOBOX_CLEAR_BTN: 'autocomplete-clear-btn',
|
|
8
|
-
COMBOBOX_ALL_BTN: 'autocomplete-all-btn',
|
|
9
|
-
COMBOBOX_DROPDOWN_BTN: 'autocomplete-dropdown-btn',
|
|
10
|
-
COMBOBOX_OPTION: 'autocomplete-option',
|
|
11
|
-
COMBOBOX: 'autocomplete'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.DATA_TESTID = DATA_TESTID;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
|
-
var AutocompleteCTX = require('../AutocompleteCTX.js');
|
|
7
|
-
|
|
8
|
-
// we have to merge the "default" nested default values with what the user gives us...
|
|
9
|
-
const useGetAutocompleteWithDefaultsProps = props => dsPropsHelpers.useMemoMergePropsWithDefault(props, AutocompleteCTX.defaultProps);
|
|
10
|
-
|
|
11
|
-
exports.useGetAutocompleteWithDefaultsProps = useGetAutocompleteWithDefaultsProps;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var AutocompleteCTX = require('../../AutocompleteCTX.js');
|
|
10
|
-
var listHelper = require('../../utils/listHelper.js');
|
|
11
|
-
var styled = require('./styled.js');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
|
-
|
|
17
|
-
const MultiAllyMessages = () => {
|
|
18
|
-
const {
|
|
19
|
-
props: {
|
|
20
|
-
options,
|
|
21
|
-
selectedValues
|
|
22
|
-
}
|
|
23
|
-
} = React.useContext(AutocompleteCTX.AutocompleteContext);
|
|
24
|
-
const selectableOptions = listHelper.getSelectableOptions(options);
|
|
25
|
-
const multipleSelectedValues = selectedValues;
|
|
26
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
|
|
27
|
-
"aria-live": "polite",
|
|
28
|
-
"aria-atomic": "false",
|
|
29
|
-
"aria-relevant": "additions text"
|
|
30
|
-
}, void 0, "Options selected: ".concat(multipleSelectedValues.map(item => item.label).join(', '), ". ").concat(multipleSelectedValues.length, " of ").concat(selectableOptions.length));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.MultiAllyMessages = MultiAllyMessages;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var AutocompleteCTX = require('../../AutocompleteCTX.js');
|
|
8
|
-
var styled = require('./styled.js');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
|
-
|
|
14
|
-
const SingleAllyMessages = () => {
|
|
15
|
-
const {
|
|
16
|
-
props: {
|
|
17
|
-
selectedValues
|
|
18
|
-
}
|
|
19
|
-
} = React.useContext(AutocompleteCTX.AutocompleteContext);
|
|
20
|
-
const singleSelectedValue = selectedValues;
|
|
21
|
-
return /*#__PURE__*/_jsx__default["default"](styled.StyledA11ySelectedValues, {
|
|
22
|
-
"aria-live": "polite",
|
|
23
|
-
"aria-atomic": "false",
|
|
24
|
-
"aria-relevant": "additions text"
|
|
25
|
-
}, void 0, "Option selected: ".concat(singleSelectedValue.label, "."));
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.SingleAllyMessages = SingleAllyMessages;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var MultiAllyMessages = require('./MultiAllyMessages.js');
|
|
6
|
-
var SingleAllyMessages = require('./SingleAllyMessages.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.MultiAllyMessages = MultiAllyMessages.MultiAllyMessages;
|
|
11
|
-
exports.SingleAllyMessages = SingleAllyMessages.SingleAllyMessages;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
-
|
|
11
|
-
const StyledA11ySelectedValues = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
12
|
-
componentId: "sc-cm1aqq-0"
|
|
13
|
-
})(["width:1px;height:1px;position:absolute;clip:rect(1px,1px,1px,1px);"]);
|
|
14
|
-
|
|
15
|
-
exports.StyledA11ySelectedValues = StyledA11ySelectedValues;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var AutocompleteCTX = require('../../AutocompleteCTX.js');
|
|
8
|
-
var useKeyboardNavigation = require('../../utils/hooks/useKeyboardNavigation.js');
|
|
9
|
-
var useControlsInput = require('./useControlsInput.js');
|
|
10
|
-
var styled = require('./styled.js');
|
|
11
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
-
|
|
15
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
|
-
|
|
17
|
-
const Controls = () => {
|
|
18
|
-
const {
|
|
19
|
-
props: {
|
|
20
|
-
autoFocus,
|
|
21
|
-
hasError,
|
|
22
|
-
placeholder,
|
|
23
|
-
inputMinWidth
|
|
24
|
-
},
|
|
25
|
-
inputRef,
|
|
26
|
-
showPopover,
|
|
27
|
-
focusOptionIdx,
|
|
28
|
-
controlsWrapperRef
|
|
29
|
-
} = React.useContext(AutocompleteCTX.AutocompleteContext);
|
|
30
|
-
const {
|
|
31
|
-
onInputKeyDown
|
|
32
|
-
} = useKeyboardNavigation.useKeyboardNavigation();
|
|
33
|
-
const {
|
|
34
|
-
handleOnBlur,
|
|
35
|
-
handleOnInputMouseDown,
|
|
36
|
-
handleOnChange
|
|
37
|
-
} = useControlsInput.useControlsInput();
|
|
38
|
-
return /*#__PURE__*/jsxRuntime.jsx(styled.StyledControlsWrapper, {
|
|
39
|
-
ref: controlsWrapperRef,
|
|
40
|
-
cols: ['minmax(20px, auto)'],
|
|
41
|
-
minWidth: inputMinWidth,
|
|
42
|
-
hasError: hasError,
|
|
43
|
-
children: /*#__PURE__*/_jsx__default["default"](styled.StyledInputWrapper, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledInput, {
|
|
44
|
-
autoFocus: autoFocus,
|
|
45
|
-
"aria-labelledby": "combo-label",
|
|
46
|
-
"aria-controls": "combo-listbox",
|
|
47
|
-
"aria-owns": "combo-listbox",
|
|
48
|
-
"aria-activedescendant": focusOptionIdx,
|
|
49
|
-
"aria-expanded": showPopover,
|
|
50
|
-
"aria-haspopup": "listbox",
|
|
51
|
-
placeholder: placeholder,
|
|
52
|
-
role: "combobox",
|
|
53
|
-
ref: inputRef,
|
|
54
|
-
type: "text",
|
|
55
|
-
onKeyDown: onInputKeyDown,
|
|
56
|
-
onChange: handleOnChange,
|
|
57
|
-
onBlur: handleOnBlur,
|
|
58
|
-
onClick: handleOnInputMouseDown
|
|
59
|
-
}))
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
exports.Controls = Controls;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
6
|
-
var styled = require('styled-components');
|
|
7
|
-
var dsSystem = require('@elliemae/ds-system');
|
|
8
|
-
var dsGrid = require('@elliemae/ds-grid');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
13
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
|
-
|
|
15
|
-
var _templateObject, _templateObject2;
|
|
16
|
-
const normalBorder = dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n border: 1px solid ", ";\n"])), props => props.hasError ? props.theme.colors.danger[900] : props.theme.colors.neutral[400]);
|
|
17
|
-
const focusBorder = dsSystem.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n border: 2px solid ", ";\n"])), _ref => {
|
|
18
|
-
let {
|
|
19
|
-
theme
|
|
20
|
-
} = _ref;
|
|
21
|
-
return theme.colors.brand[700];
|
|
22
|
-
});
|
|
23
|
-
const StyledControlsWrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
24
|
-
componentId: "sc-vp36gr-0"
|
|
25
|
-
})(["background:transparent;position:relative;border-radius:2px;min-width:", ";align-items:center;align-content:center;height:28px;padding-left:8px;::after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:2px;", " pointer-events:none;z-index:7;}:focus-within{::after{", "}}"], _ref2 => {
|
|
26
|
-
let {
|
|
27
|
-
minWidth
|
|
28
|
-
} = _ref2;
|
|
29
|
-
return "".concat(minWidth, "px");
|
|
30
|
-
}, normalBorder, focusBorder);
|
|
31
|
-
const StyledInput = /*#__PURE__*/styled__default["default"].input.withConfig({
|
|
32
|
-
componentId: "sc-vp36gr-1"
|
|
33
|
-
})(["::placeholder{font-style:italic;color:", ";}font-size:13px;line-height:13px;border:none;padding:0;outline:none;width:100%;color:", ";&:focus{outline:none;}"], props => props.theme.colors.neutral[500], props => props.theme.colors.neutral[700]);
|
|
34
|
-
const StyledInputPlaceHolder = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
35
|
-
componentId: "sc-vp36gr-2"
|
|
36
|
-
})(["font-style:italic;color:", ";position:absolute;display:flex;align-items:center;width:100%;user-select:none;height:28px;"], props => props.theme.colors.neutral[500]);
|
|
37
|
-
const StyledInputWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
38
|
-
componentId: "sc-vp36gr-3"
|
|
39
|
-
})(["position:relative;flex:1;margin-right:5px;display:flex;align-items:center;"]);
|
|
40
|
-
|
|
41
|
-
exports.StyledControlsWrapper = StyledControlsWrapper;
|
|
42
|
-
exports.StyledInput = StyledInput;
|
|
43
|
-
exports.StyledInputPlaceHolder = StyledInputPlaceHolder;
|
|
44
|
-
exports.StyledInputWrapper = StyledInputWrapper;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var AutocompleteCTX = require('../../AutocompleteCTX.js');
|
|
7
|
-
|
|
8
|
-
const useControlsInput = () => {
|
|
9
|
-
const {
|
|
10
|
-
props: {
|
|
11
|
-
selectedValues,
|
|
12
|
-
onChange,
|
|
13
|
-
placeholder,
|
|
14
|
-
onFilter
|
|
15
|
-
},
|
|
16
|
-
setShowPopover,
|
|
17
|
-
inputRef
|
|
18
|
-
} = React.useContext(AutocompleteCTX.AutocompleteContext);
|
|
19
|
-
const handleOnChange = React.useCallback(e => {
|
|
20
|
-
const target = e.target;
|
|
21
|
-
onChange(target.value);
|
|
22
|
-
setShowPopover(true);
|
|
23
|
-
onFilter(target.value);
|
|
24
|
-
}, [onFilter, onChange, setShowPopover]);
|
|
25
|
-
const handleOnBlur = React.useCallback(() => {
|
|
26
|
-
setShowPopover(false);
|
|
27
|
-
}, [setShowPopover]);
|
|
28
|
-
const handleOnInputMouseDown = React.useCallback(e => {
|
|
29
|
-
e.stopPropagation();
|
|
30
|
-
}, []);
|
|
31
|
-
const showPlaceholder = React.useMemo(() => {
|
|
32
|
-
var _inputRef$current;
|
|
33
|
-
|
|
34
|
-
return !((_inputRef$current = inputRef.current) !== null && _inputRef$current !== void 0 && _inputRef$current.value) && selectedValues === '' ? placeholder : null;
|
|
35
|
-
}, [placeholder, inputRef, selectedValues]);
|
|
36
|
-
return React.useMemo(() => ({
|
|
37
|
-
handleOnBlur,
|
|
38
|
-
handleOnChange,
|
|
39
|
-
handleOnInputMouseDown,
|
|
40
|
-
showPlaceholder
|
|
41
|
-
}), [handleOnBlur, handleOnInputMouseDown, handleOnChange, showPlaceholder]);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.useControlsInput = useControlsInput;
|