@ntbjs/react-components 2.0.2-rc.1 → 2.0.2-rc.3

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.
Files changed (28) hide show
  1. package/build/inputs/ActionButton/ActionButton.js +9 -5
  2. package/build/inputs/ActionButton/ActionButton.js.map +1 -1
  3. package/build/inputs/ActionButton/ActionButton.styled.js +16 -13
  4. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
  5. package/build/inputs/CompactTextInput/CompactTextInput.js +59 -72
  6. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
  7. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +141 -226
  8. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
  9. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
  10. package/build/inputs/MultiSelect/MultiSelect.js +227 -115
  11. package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
  12. package/build/inputs/MultiSelect/MultiSelect.styled.js +72 -175
  13. package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
  14. package/build/inputs/TextArea/TextArea.js +67 -77
  15. package/build/inputs/TextArea/TextArea.js.map +1 -1
  16. package/build/inputs/TextArea/TextArea.styled.js +179 -220
  17. package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
  18. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +20 -26
  19. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  20. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +19 -15
  21. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
  22. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +18 -16
  23. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
  24. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +75 -34
  25. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
  26. package/build/widgets/Instructions/Instructions.js +0 -9
  27. package/build/widgets/Instructions/Instructions.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,224 +1,121 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { applyDefaultTheme } from '../../utils/defaultTheme.js';
3
3
  import { ReactComponent as SvgClose } from '../../icons/close.svg.js';
4
- import Select, { components } from 'react-select';
4
+ import Select from 'react-select';
5
5
  import CreatableSelect from 'react-select/creatable';
6
6
  import { withAsyncPaginate, AsyncPaginate } from 'react-select-async-paginate';
7
7
 
8
8
  const AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect);
9
9
  const showMoreHeight = 114;
10
- const sharedStyle = css`
11
- font-family: ${props => props.theme.primaryFontFamily};
12
- font-size: 12px;
13
- font-weight: 400;
10
+ const MultiSelectWrapper = styled.div`
14
11
  position: relative;
12
+ /* Targets internal container to ensure overlay is visible even if library tries to clip it */
13
+ & [class*='ValueContainer'] {
14
+ overflow: visible !important;
15
+ }
15
16
  `;
16
- styled.label.attrs(applyDefaultTheme)`
17
+ const Label = styled.label.attrs(applyDefaultTheme)`
17
18
  ${props => props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))};
18
- flex-basis: 33.33%;
19
19
  font-size: 0.875rem;
20
- line-height: 1rem;
21
- cursor: pointer;
22
- height: 19px;
23
- display: flex;
24
- align-items: center;
25
- `;
26
- const MultiSelect = styled(Select).attrs(applyDefaultTheme)`
27
- ${sharedStyle}
28
- `;
29
- const CreatableMultiSelect = styled(CreatableSelect).attrs(applyDefaultTheme)`
30
- ${sharedStyle}
31
- `;
32
- const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate).attrs(applyDefaultTheme)`
33
- ${sharedStyle}
34
- `;
35
- const AsyncMultiSelect = styled(AsyncPaginate).attrs(applyDefaultTheme)`
36
- ${sharedStyle}
37
- `;
38
- const MultiSelectWrapper = styled.div.attrs(applyDefaultTheme)`
39
- position: relative;
20
+ margin-bottom: 4px;
21
+ display: block;
40
22
  `;
41
- styled(components.Control).attrs(applyDefaultTheme)`
42
- && {
43
- align-items: flex-start;
44
- background: transparent;
45
- border: none;
46
- box-shadow: none;
47
- }
48
-
49
- :hover {
50
- cursor: ${props => !props.isDisabled && props.focused || props.readOnly ? 'default' : 'pointer'};
23
+ const Control = styled.div`
24
+ & > div {
25
+ cursor: ${props => props.$readOnly ? 'default' : 'pointer'};
51
26
  }
52
27
  `;
53
- styled(components.ValueContainer)`
54
- && {
55
- align-items: flex-start;
56
- gap: 8px;
57
- padding: 0;
58
-
59
- max-height: ${props => {
60
- return props.showMore ? props.$error || props.$warning ? '100%' : showMoreHeight + 16 + 'px' : '100%';
61
- }} !important;
62
-
63
- ${props => (props.$error || props.$warning) && css`
64
- border: 1px solid;
65
- border-radius: 3px;
66
- padding: 4px;
67
-
68
- border-color: ${props => props.$error ? props.theme.getColor('red-500') : props.warning ? props.theme.getColor('orange-500') : 'inherit'};
69
- `}
70
- }
28
+ const ValueContainer = styled.div.attrs(applyDefaultTheme)`
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ gap: 8px;
32
+ max-height: ${props => props.$showMore ? props.$error || props.$warning ? 'none' : `${showMoreHeight + 16}px` : 'none'};
33
+ ${props => (props.$error || props.$warning) && css`
34
+ border: 1px solid;
35
+ border-radius: 3px;
36
+ padding: 4px;
37
+ border-color: ${props.$error ? props.theme.getColor('red-500') : props.theme.getColor('orange-500')};
38
+ `}
71
39
  `;
72
- const MultiValueWrapper = styled.div.attrs(applyDefaultTheme)`
73
- && {
74
- border-radius: 3px;
75
- margin: 0;
76
- }
40
+ const MultiValueWrapper = styled.div`
41
+ margin: 0;
77
42
  `;
78
- const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)`
79
- && {
80
- border-radius: 3px;
81
- margin: 0;
82
-
83
- ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-800'))}
84
-
85
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-100'))}
86
-
87
- > div {
88
- align-items: center;
89
- display: flex;
90
- font-size: 12px;
91
- min-height: 26px;
92
-
93
- :first-of-type {
94
- padding: ${props => props.isDisabled || props.readOnly ? '0 8px' : '0 3px 0 8px'};
95
- }
96
-
97
- :last-of-type:not(:only-child) {
98
- padding: 0 8px 0 5px;
99
- height: 100%;
100
- width: fit-content;
101
- }
102
-
103
- :last-of-type:not(:only-child):hover {
104
- background-color: ${props => props.theme.getColor('red-500')};
105
- border-bottom-left-radius: 0;
106
- border-top-left-radius: 0;
107
- cursor: pointer;
108
- }
109
-
110
- svg {
111
- stroke: white;
112
- stroke-width: 2px;
113
- width: 8px;
114
- }
115
-
116
- :hover {
117
- cursor: pointer;
118
- }
119
- }
43
+ const MultiValueRemoveIcon = styled(SvgClose)`
44
+ width: 8px;
45
+ stroke: white;
46
+ stroke-width: 2px;
120
47
  `;
121
- const MultiValueRemove = styled(components.MultiValueRemove).attrs(applyDefaultTheme)``;
122
- styled(components.Input).attrs(applyDefaultTheme)`
123
- align-self: center;
124
- font-size: ${props => props.$focused ? '14px' : '12px'};
48
+ const InputWrapper = styled.div.attrs(applyDefaultTheme)`
125
49
  min-width: 150px;
126
-
127
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
128
-
129
- ${props => !props.$focused && css`
130
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))}
131
-
132
- :before {
133
- height: 100%;
134
- white-space: nowrap;
135
- width: fit-content;
136
- content: '${props => props.edittext}';
50
+ position: relative;
51
+ ${props => !props.$focused && props.$editText && css`
52
+ &::before {
53
+ content: '${props.$editText}';
54
+ color: ${p => p.theme.getColor('gray-400')};
55
+ font-size: 12px;
56
+ position: absolute;
57
+ top: 50%;
58
+ transform: translateY(-50%);
59
+ pointer-events: none;
137
60
  }
138
61
  `}
62
+ input {
63
+ color: ${props => props.theme.themeProp(props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))} !important;
139
64
  }
140
65
  `;
141
- const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)`
66
+ const OptionContent = styled.div`
67
+ display: flex;
68
+ justify-content: space-between;
69
+ align-items: center;
70
+ padding: 8px 12px;
71
+ width: 100%;
142
72
  font-size: 14px;
143
-
144
- ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('white'))}
145
-
146
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
73
+ color: inherit;
147
74
  `;
148
- const sharedOptionStyle = css`
149
- ${props => props.isFocused && css`
150
- ${props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))}
151
- `}
152
-
153
- ${props => props.isSelected && css`
154
- ${props.theme.themeProp('background-color', 'transparent', 'transparent')}
155
-
156
- ${props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
157
- `}
158
-
159
- ${props => props.isFocused && props.isSelected && css`
160
- ${props.theme.themeProp('background-color', props.theme.getColor('gray-500'), props.theme.getColor('gray-200'))}
161
- `}
162
-
163
- :hover {
164
- cursor: pointer;
75
+ styled.div`
76
+ [class*='menu'] {
77
+ z-index: 9999 !important;
78
+ border-radius: 4px;
165
79
  }
166
80
  `;
167
- const Option = styled(components.Option).attrs(applyDefaultTheme)`
168
- ${sharedOptionStyle}
169
- `;
170
- const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)`
171
- ${sharedOptionStyle}
172
-
173
- display: flex !important;
174
- justify-content: space-between;
175
- `;
176
81
  const DropdownOptionDeleteIcon = styled(SvgClose).attrs(applyDefaultTheme)`
177
- stroke-width: 1px;
178
82
  width: 8px;
179
-
180
- ${props => props.theme.themeProp('stroke', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
83
+ stroke: ${props => props.theme.themeProp(props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
181
84
  `;
182
85
  const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)`
183
- align-items: end;
184
- display: flex;
185
- flex-direction: column;
186
- height: 100%;
187
- left: 0;
188
86
  position: absolute;
189
- max-height: ${showMoreHeight + 16}px;
190
87
  top: 0;
88
+ left: 0;
191
89
  width: 100%;
192
-
193
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('emerald-500'))}
194
-
195
- :hover {
90
+ height: 100%;
91
+ display: flex;
92
+ flex-direction: column;
93
+ justify-content: flex-end;
94
+ z-index: 50;
95
+ color: ${props => props.theme.themeProp(props.theme.getColor('gray-100'), props.theme.getColor('emerald-500'))};
96
+ &:hover {
196
97
  cursor: pointer;
197
98
  text-decoration: underline;
198
99
  }
199
100
  `;
200
101
  const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)`
201
- align-items: end;
202
- display: block;
203
- height: 100%;
204
- max-height: ${showMoreHeight}px;
205
- left: 0;
206
- top: 0;
207
- width: 100%;
208
-
209
- ${props => props.theme.themeProp('background', 'transparent linear-gradient(180deg, #12121200 0%, #12121230 40%, #12121279 70%, #121212 95%, #121212 100%) 0% 0% no-repeat padding-box', 'transparent linear-gradient(180deg, #fefefe00 0%, #fefefe30 40%, #fefefe79 70%, #fefefe 95%, #fefefe 100%) 0% 0% no-repeat padding-box')}
102
+ flex: 1;
103
+ background: ${props => props.theme.themeProp('linear-gradient(180deg, #12121200 0%, #121212 100%)', 'linear-gradient(180deg, #fefefe00 0%, #fefefe 100%)')};
210
104
  `;
211
105
  const ShowMoreText = styled.div.attrs(applyDefaultTheme)`
106
+ background-color: ${props => props.theme.themeProp('#121212', '#fefefe')};
107
+ text-align: right;
212
108
  font-size: 0.875rem;
213
- width: 100%;
214
- ${props => props.theme.themeProp('background-color', '#121212', '#fefefe')}
215
109
  `;
216
110
  const ErrorMessage = styled.div.attrs(applyDefaultTheme)`
217
- color: ${props => props.$error ? props.theme.getColor('red-500') : props.$warning ? props.theme.getColor('orange-500') : 'inherit'};
111
+ color: ${props => props.$error ? props.theme.getColor('red-500') : props.theme.getColor('orange-500')};
218
112
  font-size: 0.75rem;
219
113
  margin-top: 8px;
220
- padding: 0 12px;
221
114
  `;
115
+ const MultiSelect = styled(Select).attrs(applyDefaultTheme)``;
116
+ const CreatableMultiSelect = styled(CreatableSelect).attrs(applyDefaultTheme)``;
117
+ const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate).attrs(applyDefaultTheme)``;
118
+ const AsyncMultiSelect = styled(AsyncPaginate).attrs(applyDefaultTheme)``;
222
119
 
223
- export { AsyncCreatableMultiSelect, AsyncMultiSelect, CreatableMultiSelect, DropdownMenu, DropdownOptionDeleteIcon, ErrorMessage, MultiSelect, MultiSelectWrapper, MultiValue, MultiValueRemove, MultiValueWrapper, Option, SelectedOption, ShowMoreOverlay, ShowMoreText, ShowMoreWrapper };
120
+ export { AsyncCreatableMultiSelect, AsyncMultiSelect, Control, CreatableMultiSelect, DropdownOptionDeleteIcon, ErrorMessage, InputWrapper, Label, MultiSelect, MultiSelectWrapper, MultiValueRemoveIcon, MultiValueWrapper, OptionContent, ShowMoreOverlay, ShowMoreText, ShowMoreWrapper, ValueContainer };
224
121
  //# sourceMappingURL=MultiSelect.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.styled.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\n\nimport Select from 'react-select';\nimport CreatableSelect from 'react-select/creatable';\nimport { AsyncPaginate, withAsyncPaginate } from 'react-select-async-paginate';\nimport { components } from 'react-select';\n\nconst AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect);\n\nconst showMoreHeight = 114;\n\nconst sharedStyle = css`\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 12px;\n font-weight: 400;\n position: relative;\n`;\n\nexport const Label = styled.label.attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n cursor: pointer;\n height: 19px;\n display: flex;\n align-items: center;\n`;\n\nexport const MultiSelect = styled(Select).attrs(applyDefaultTheme)`\n ${sharedStyle}\n`;\n\nexport const CreatableMultiSelect = styled(CreatableSelect).attrs(applyDefaultTheme)`\n ${sharedStyle}\n`;\n\nexport const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate).attrs(\n applyDefaultTheme\n)`\n ${sharedStyle}\n`;\n\nexport const AsyncMultiSelect = styled(AsyncPaginate).attrs(applyDefaultTheme)`\n ${sharedStyle}\n`;\n\nexport const MultiSelectWrapper = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n`;\n\nexport const Control = styled(components.Control).attrs(applyDefaultTheme)`\n && {\n align-items: flex-start;\n background: transparent;\n border: none;\n box-shadow: none;\n }\n\n :hover {\n cursor: ${props =>\n (!props.isDisabled && props.focused) || props.readOnly ? 'default' : 'pointer'};\n }\n`;\n\nexport const ValueContainer = styled(components.ValueContainer)`\n && {\n align-items: flex-start;\n gap: 8px;\n padding: 0;\n\n max-height: ${props => {\n return props.showMore\n ? props.$error || props.$warning\n ? '100%'\n : showMoreHeight + 16 + 'px'\n : '100%';\n }} !important;\n\n ${props =>\n (props.$error || props.$warning) &&\n css`\n border: 1px solid;\n border-radius: 3px;\n padding: 4px;\n\n border-color: ${props =>\n props.$error\n ? props.theme.getColor('red-500')\n : props.warning\n ? props.theme.getColor('orange-500')\n : 'inherit'};\n `}\n }\n`;\n\nexport const MultiValueWrapper = styled.div.attrs(applyDefaultTheme)`\n && {\n border-radius: 3px;\n margin: 0;\n }\n`;\n\nexport const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)`\n && {\n border-radius: 3px;\n margin: 0;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-800')\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-100')\n )}\n\n > div {\n align-items: center;\n display: flex;\n font-size: 12px;\n min-height: 26px;\n\n :first-of-type {\n padding: ${props => (props.isDisabled || props.readOnly ? '0 8px' : '0 3px 0 8px')};\n }\n\n :last-of-type:not(:only-child) {\n padding: 0 8px 0 5px;\n height: 100%;\n width: fit-content;\n }\n\n :last-of-type:not(:only-child):hover {\n background-color: ${props => props.theme.getColor('red-500')};\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n cursor: pointer;\n }\n\n svg {\n stroke: white;\n stroke-width: 2px;\n width: 8px;\n }\n\n :hover {\n cursor: pointer;\n }\n }\n`;\n\nexport const MultiValueRemove = styled(components.MultiValueRemove).attrs(applyDefaultTheme)``;\n\nexport const Input = styled(components.Input).attrs(applyDefaultTheme)`\n align-self: center;\n font-size: ${props => (props.$focused ? '14px' : '12px')};\n min-width: 150px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n\n ${props =>\n !props.$focused &&\n css`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n\n :before {\n height: 100%;\n white-space: nowrap;\n width: fit-content;\n content: '${props => props.edittext}';\n }\n `}\n }\n`;\n\nexport const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)`\n font-size: 14px;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('white')\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nconst sharedOptionStyle = css`\n ${props =>\n props.isFocused &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n ${props =>\n props.isSelected &&\n css`\n ${props.theme.themeProp('background-color', 'transparent', 'transparent')}\n\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n `}\n\n ${props =>\n props.isFocused &&\n props.isSelected &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n :hover {\n cursor: pointer;\n }\n`;\n\nexport const Option = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n`;\n\nexport const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n\n display: flex !important;\n justify-content: space-between;\n`;\n\nexport const DropdownOptionDeleteIcon = styled(CloseIcon).attrs(applyDefaultTheme)`\n stroke-width: 1px;\n width: 8px;\n\n ${props =>\n props.theme.themeProp(\n 'stroke',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nexport const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)`\n align-items: end;\n display: flex;\n flex-direction: column;\n height: 100%;\n left: 0;\n position: absolute;\n max-height: ${showMoreHeight + 16}px;\n top: 0;\n width: 100%;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('emerald-500')\n )}\n\n :hover {\n cursor: pointer;\n text-decoration: underline;\n }\n`;\n\nexport const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)`\n align-items: end;\n display: block;\n height: 100%;\n max-height: ${showMoreHeight}px;\n left: 0;\n top: 0;\n width: 100%;\n\n ${props =>\n props.theme.themeProp(\n 'background',\n 'transparent linear-gradient(180deg, #12121200 0%, #12121230 40%, #12121279 70%, #121212 95%, #121212 100%) 0% 0% no-repeat padding-box',\n 'transparent linear-gradient(180deg, #fefefe00 0%, #fefefe30 40%, #fefefe79 70%, #fefefe 95%, #fefefe 100%) 0% 0% no-repeat padding-box'\n )}\n`;\n\nexport const ShowMoreText = styled.div.attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n width: 100%;\n ${props => props.theme.themeProp('background-color', '#121212', '#fefefe')}\n`;\n\nexport const ErrorMessage = styled.div.attrs(applyDefaultTheme)`\n color: ${props =>\n props.$error\n ? props.theme.getColor('red-500')\n : props.$warning\n ? props.theme.getColor('orange-500')\n : 'inherit'};\n font-size: 0.75rem;\n margin-top: 8px;\n padding: 0 12px;\n`;\n"],"names":["AsyncCreatableSelectPaginate","withAsyncPaginate","CreatableSelect","showMoreHeight","sharedStyle","css","props","theme","primaryFontFamily","styled","label","attrs","applyDefaultTheme","themeProp","getColor","MultiSelect","Select","CreatableMultiSelect","AsyncCreatableMultiSelect","AsyncMultiSelect","AsyncPaginate","MultiSelectWrapper","div","components","Control","isDisabled","focused","readOnly","ValueContainer","showMore","$error","$warning","warning","MultiValueWrapper","MultiValue","MultiValueRemove","Input","$focused","edittext","DropdownMenu","Menu","sharedOptionStyle","isFocused","isSelected","Option","SelectedOption","DropdownOptionDeleteIcon","CloseIcon","ShowMoreWrapper","ShowMoreOverlay","ShowMoreText","ErrorMessage"],"mappings":";;;;;;;AAUA,MAAMA,4BAA4B,GAAGC,iBAAiB,CAACC,eAAe,CAAC,CAAA;AAEvE,MAAMC,cAAc,GAAG,GAAG,CAAA;AAE1B,MAAMC,WAAW,GAAGC,GAAG,CAAA;AACvB,eAAA,EAAiBC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,iBAAiB,CAAA;AACvD;AACA;AACA;AACA,CAAC,CAAA;AAEoBC,MAAM,CAACC,KAAK,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC1D,EAAIN,EAAAA,KAAK,IACLA,KAA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AA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACM,SAAS,CACnB,OAAO,EACPP,KAAK,CAACC,KAAK,CAACO,QAAQ,CAAC,UAAU,CAAC,EAChCR,KAAK,CAACC,KAAK,CAACO,QAAQ,CAAC,aAAa,CACpC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMmC,eAAe,GAAGxC,MAAM,CAACa,GAAG,CAACX,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAClE;AACA;AACA;AACA,cAAA,EAAgBT,cAAc,CAAA;AAC9B;AACA;AACA;AACA;AACA,EAAA,EAAIG,KAAK,IACLA,KAAK,CAACC,KAAK,CAACM,SAAS,CACnB,YAAY,EACZ,wIAAwI,EACxI,wIACF,CAAC,CAAA;AACL,EAAC;AAEM,MAAMqC,YAAY,GAAGzC,MAAM,CAACa,GAAG,CAACX,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC/D;AACA;AACA,EAAA,EAAIN,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACM,SAAS,CAAC,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;AAC5E,EAAC;AAEM,MAAMsC,YAAY,GAAG1C,MAAM,CAACa,GAAG,CAACX,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC/D,SAAA,EAAWN,KAAK,IACZA,KAAK,CAACwB,MAAM,GACRxB,KAAK,CAACC,KAAK,CAACO,QAAQ,CAAC,SAAS,CAAC,GAC/BR,KAAK,CAACyB,QAAQ,GACZzB,KAAK,CAACC,KAAK,CAACO,QAAQ,CAAC,YAAY,CAAC,GAClC,SAAS,CAAA;AACnB;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"MultiSelect.styled.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\nimport Select from 'react-select';\nimport CreatableSelect from 'react-select/creatable';\nimport { AsyncPaginate, withAsyncPaginate } from 'react-select-async-paginate';\n\nconst AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect);\nconst showMoreHeight = 114;\n\nexport const MultiSelectWrapper = styled.div`\n position: relative;\n /* Targets internal container to ensure overlay is visible even if library tries to clip it */\n & [class*='ValueContainer'] {\n overflow: visible !important;\n }\n`;\n\nexport const Label = styled.label.attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n font-size: 0.875rem;\n margin-bottom: 4px;\n display: block;\n`;\n\nexport const Control = styled.div`\n & > div {\n cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};\n }\n`;\n\nexport const ValueContainer = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-height: ${props =>\n props.$showMore\n ? props.$error || props.$warning\n ? 'none'\n : `${showMoreHeight + 16}px`\n : 'none'};\n ${props =>\n (props.$error || props.$warning) &&\n css`\n border: 1px solid;\n border-radius: 3px;\n padding: 4px;\n border-color: ${props.$error\n ? props.theme.getColor('red-500')\n : props.theme.getColor('orange-500')};\n `}\n`;\n\nexport const MultiValueWrapper = styled.div`\n margin: 0;\n`;\n\nexport const MultiValueRemoveIcon = styled(CloseIcon)`\n width: 8px;\n stroke: white;\n stroke-width: 2px;\n`;\n\nexport const InputWrapper = styled.div.attrs(applyDefaultTheme)`\n min-width: 150px;\n position: relative;\n ${props =>\n !props.$focused &&\n props.$editText &&\n css`\n &::before {\n content: '${props.$editText}';\n color: ${p => p.theme.getColor('gray-400')};\n font-size: 12px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n }\n `}\n input {\n color: ${props =>\n props.theme.themeProp(\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )} !important;\n }\n`;\n\nexport const OptionContent = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 12px;\n width: 100%;\n font-size: 14px;\n color: inherit;\n`;\n\nexport const DropdownMenu = styled.div`\n [class*='menu'] {\n z-index: 9999 !important;\n border-radius: 4px;\n }\n`;\n\nexport const DropdownOptionDeleteIcon = styled(CloseIcon).attrs(applyDefaultTheme)`\n width: 8px;\n stroke: ${props =>\n props.theme.themeProp(props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};\n`;\n\nexport const ShowMoreWrapper = styled.div.attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n z-index: 50;\n color: ${props =>\n props.theme.themeProp(props.theme.getColor('gray-100'), props.theme.getColor('emerald-500'))};\n &:hover {\n cursor: pointer;\n text-decoration: underline;\n }\n`;\n\nexport const ShowMoreOverlay = styled.div.attrs(applyDefaultTheme)`\n flex: 1;\n background: ${props =>\n props.theme.themeProp(\n 'linear-gradient(180deg, #12121200 0%, #121212 100%)',\n 'linear-gradient(180deg, #fefefe00 0%, #fefefe 100%)'\n )};\n`;\n\nexport const ShowMoreText = styled.div.attrs(applyDefaultTheme)`\n background-color: ${props => props.theme.themeProp('#121212', '#fefefe')};\n text-align: right;\n font-size: 0.875rem;\n`;\n\nexport const ErrorMessage = styled.div.attrs(applyDefaultTheme)`\n color: ${props =>\n props.$error ? props.theme.getColor('red-500') : props.theme.getColor('orange-500')};\n font-size: 0.75rem;\n margin-top: 8px;\n`;\n\nexport const MultiSelect = styled(Select).attrs(applyDefaultTheme)``;\nexport const CreatableMultiSelect = styled(CreatableSelect).attrs(applyDefaultTheme)``;\nexport const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate).attrs(\n applyDefaultTheme\n)``;\nexport const AsyncMultiSelect = styled(AsyncPaginate).attrs(applyDefaultTheme)``;\n"],"names":["AsyncCreatableSelectPaginate","withAsyncPaginate","CreatableSelect","showMoreHeight","MultiSelectWrapper","styled","div","Label","label","attrs","applyDefaultTheme","props","theme","themeProp","getColor","Control","$readOnly","ValueContainer","$showMore","$error","$warning","css","MultiValueWrapper","MultiValueRemoveIcon","CloseIcon","InputWrapper","$focused","$editText","p","OptionContent","DropdownOptionDeleteIcon","ShowMoreWrapper","ShowMoreOverlay","ShowMoreText","ErrorMessage","MultiSelect","Select","CreatableMultiSelect","AsyncCreatableMultiSelect","AsyncMultiSelect","AsyncPaginate"],"mappings":";;;;;;;AAOA,MAAMA,4BAA4B,GAAGC,iBAAiB,CAACC,eAAe,CAAC,CAAA;AACvE,MAAMC,cAAc,GAAG,GAAG,CAAA;AAEbC,MAAAA,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CAAA;AAC5C;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMC,KAAK,GAAGF,MAAM,CAACG,KAAK,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC1D,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,OAAO,CAAC,EAC7BH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA,EAAC;AAEYC,MAAAA,OAAO,GAAGV,MAAM,CAACC,GAAG,CAAA;AACjC;AACA,YAAcK,EAAAA,KAAK,IAAKA,KAAK,CAACK,SAAS,GAAG,SAAS,GAAG,SAAU,CAAA;AAChE;AACA,EAAC;AAEM,MAAMC,cAAc,GAAGZ,MAAM,CAACC,GAAG,CAACG,KAAK,CAACC,iBAAiB,CAAC,CAAA;AACjE;AACA;AACA;AACA,cAAgBC,EAAAA,KAAK,IACjBA,KAAK,CAACO,SAAS,GACXP,KAAK,CAACQ,MAAM,IAAIR,KAAK,CAACS,QAAQ,GAC5B,MAAM,GACN,CAAA,EAAGjB,cAAc,GAAG,EAAE,CAAI,EAAA,CAAA,GAC5B,MAAM,CAAA;AACd,EAAIQ,E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AAS,CAAC,GAAGH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,YAAY,CAAC,CAAA;AACvF;AACA;AACA,EAAC;AAEYqB,MAAAA,WAAW,GAAG9B,MAAM,CAAC+B,MAAM,CAAC,CAAC3B,KAAK,CAACC,iBAAiB,CAAC,CAAE,EAAA;AACvD2B,MAAAA,oBAAoB,GAAGhC,MAAM,CAACH,eAAe,CAAC,CAACO,KAAK,CAACC,iBAAiB,CAAC,CAAE,EAAA;AACzE4B,MAAAA,yBAAyB,GAAGjC,MAAM,CAACL,4BAA4B,CAAC,CAACS,KAAK,CACjFC,iBACF,CAAC,CAAE,EAAA;AACU6B,MAAAA,gBAAgB,GAAGlC,MAAM,CAACmC,aAAa,CAAC,CAAC/B,KAAK,CAACC,iBAAiB,CAAC,CAAE;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React__default, { useRef, useState, useMemo, useEffect, useCallback } from 'react';
2
+ import React__default, { useRef, useState, useEffect, useCallback, useMemo, memo } from 'react';
3
3
  import { isEmpty } from 'lodash';
4
4
  import useMergedRefs from '@restart/hooks/useMergedRefs';
5
5
  import { nanoid } from 'nanoid';
@@ -12,7 +12,7 @@ import '../../data/Tabs/Tabs.js';
12
12
  import Tooltip from '../../data/Tooltip/Tooltip.js';
13
13
  import '../../data/VerificationStatusIcon/VerificationStatusIcon.js';
14
14
  import { ReactComponent as SvgEditNote } from '../../icons/edit-note.svg.js';
15
- import { TextAreaContainter, Label, SuccessContainerLabel, TextInput, TextInputFieldIconAlert, TextInputField, SuccessContainer, InputIconContainer, TextInputLabel, Description } from './TextArea.styled.js';
15
+ import { TextInputField, TextAreaContainter, Label, SuccessContainerLabel, TextInput, TextInputFieldIconAlert, SuccessContainer, InputIconContainer, TextInputLabel, Description } from './TextArea.styled.js';
16
16
 
17
17
  const TextArea = React__default.forwardRef(function TextArea({
18
18
  value,
@@ -46,89 +46,77 @@ const TextArea = React__default.forwardRef(function TextArea({
46
46
  const textInputDomNode = useRef(null);
47
47
  const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);
48
48
  const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));
49
- const [autoFocus, setAutoFocus] = useState(false);
50
- const [uniqueId] = useState(nanoid());
51
- const memoizedDescriptionToolTip = useMemo(() => {
52
- return descriptionToolTip;
53
- }, [descriptionToolTip]);
49
+ const [uniqueId] = useState(() => nanoid());
54
50
  useEffect(() => {
55
- setAutoFocus(false);
51
+ setInputIsEmpty(!(value || defaultValue));
56
52
  }, [value, defaultValue]);
57
53
  const onKeyDown = useCallback(event => {
58
54
  if (event.key === 'Enter') {
59
55
  event.stopPropagation();
60
56
  }
61
57
  }, []);
62
- const input = () => {
63
- return React__default.createElement(TextAreaContainter, null, fieldLabel && React__default.createElement(Label, {
64
- htmlFor: uniqueId,
65
- disabled: disabled
66
- }, fieldLabel, React__default.createElement(SuccessContainerLabel, null, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default.createElement(TextInput, {
67
- $fieldLabel: !isEmpty(fieldLabel),
68
- disabled: disabled,
69
- readOnly: readOnly,
70
- type: type,
71
- className: className,
72
- style: style
73
- }, React__default.createElement(TextInputFieldIconAlert, {
74
- type: type
75
- }, icon), React__default.createElement(TextInputField, _extends({
76
- autoFocus: autoFocus,
77
- $borderRadius: borderRadius,
78
- ref: textInputRef,
79
- rows: rows,
80
- value: value,
81
- defaultValue: defaultValue,
82
- name: name,
83
- placeholder: placeholder || ' ',
84
- required: required,
85
- readOnly: readOnly,
86
- disabled: disabled,
87
- $edit: edit,
88
- type: type,
89
- autoComplete: autoComplete,
90
- $hasIcon: Boolean(icon),
91
- id: `text-input-${uniqueId}`,
92
- key: uniqueId,
93
- $padding: padding,
94
- onChange: e => {
95
- if (e.target.value) {
96
- setInputIsEmpty(false);
97
- if (!autoFocus) {
98
- setAutoFocus(true);
99
- }
100
- } else {
101
- setInputIsEmpty(true);
102
- if (!autoFocus) {
103
- setAutoFocus(true);
104
- }
105
- }
106
- onChange(e);
107
- },
108
- onKeyDown: onKeyDown,
109
- onBlur: onBlur,
110
- $noBorder: noBorder
111
- }, rest)), !fieldLabel && (type === 'loading' || type === 'success') && React__default.createElement(SuccessContainer, null, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
112
- disabled: disabled
113
- }, React__default.createElement(SvgEditNote, {
114
- className: padding === 'small' ? 'smallPadingIcon' : undefined
115
- })), label && React__default.createElement(TextInputLabel, {
116
- htmlFor: `text-input-${uniqueId}`,
117
- $hasPlaceholder: Boolean(placeholder),
118
- $hasIcon: Boolean(icon),
119
- $inputIsEmpty: inputIsEmpty
120
- }, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default.createElement(Description, {
121
- type: type
122
- }, description)));
123
- };
58
+ const handleChange = useCallback(e => {
59
+ setInputIsEmpty(!e.target.value);
60
+ onChange(e);
61
+ }, [onChange]);
62
+ const textAreaElement = useMemo(() => React__default.createElement(TextInputField, _extends({
63
+ ref: textInputRef,
64
+ rows: rows,
65
+ value: value,
66
+ defaultValue: defaultValue,
67
+ name: name,
68
+ placeholder: placeholder,
69
+ required: required,
70
+ readOnly: readOnly,
71
+ disabled: disabled,
72
+ $edit: edit,
73
+ $type: type,
74
+ autoComplete: autoComplete,
75
+ $hasIcon: Boolean(icon),
76
+ id: `text-input-${uniqueId}`,
77
+ $padding: padding,
78
+ $borderRadius: borderRadius,
79
+ $noBorder: noBorder,
80
+ onChange: handleChange,
81
+ onKeyDown: onKeyDown,
82
+ onBlur: onBlur
83
+ }, rest)), [textInputRef, rows, value, defaultValue, name, placeholder, required, readOnly, disabled, edit, type, autoComplete, icon, uniqueId, padding, borderRadius, noBorder, handleChange, onKeyDown, onBlur, rest]);
84
+ const wrappedInput = useMemo(() => React__default.createElement(TextAreaContainter, null, fieldLabel && React__default.createElement(Label, {
85
+ htmlFor: uniqueId,
86
+ $disabled: disabled
87
+ }, fieldLabel, React__default.createElement(SuccessContainerLabel, {
88
+ $type: type
89
+ }, type === 'loading' && loadingIcon, type === 'success' && successIcon)), React__default.createElement(TextInput, {
90
+ $fieldLabel: !isEmpty(fieldLabel),
91
+ disabled: disabled,
92
+ readOnly: readOnly,
93
+ $type: type,
94
+ className: className,
95
+ style: style
96
+ }, icon && React__default.createElement(TextInputFieldIconAlert, {
97
+ $type: type
98
+ }, icon), textAreaElement, !fieldLabel && (type === 'loading' || type === 'success') && React__default.createElement(SuccessContainer, {
99
+ $type: type
100
+ }, type === 'loading' && loadingIcon, type === 'success' && successIcon), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
101
+ $disabled: disabled
102
+ }, React__default.createElement(SvgEditNote, {
103
+ className: padding === 'small' ? 'smallPadingIcon' : undefined
104
+ })), label && React__default.createElement(TextInputLabel, {
105
+ htmlFor: `text-input-${uniqueId}`,
106
+ $hasPlaceholder: Boolean(placeholder),
107
+ $hasIcon: Boolean(icon),
108
+ $inputIsEmpty: inputIsEmpty
109
+ }, label, required && ' *'), typeof description === 'string' && description.length > 0 && React__default.createElement(Description, {
110
+ $type: type
111
+ }, description))), [fieldLabel, uniqueId, disabled, type, loadingIcon, successIcon, icon, textAreaElement, readOnly, noBorder, padding, label, placeholder, inputIsEmpty, required, description, className, style]);
124
112
  if (hidden) return null;
125
- return React__default.createElement(React__default.Fragment, null, !memoizedDescriptionToolTip && input(), memoizedDescriptionToolTip && React__default.createElement("div", null, React__default.createElement(Tooltip, {
126
- content: memoizedDescriptionToolTip,
127
- key: "tooltipTextArea1",
113
+ return React__default.createElement(Tooltip, {
114
+ content: descriptionToolTip || '',
128
115
  placement: "bottom-end",
129
- trigger: 'mouseenter',
130
- zIndex: 999999
131
- }, input())));
116
+ trigger: "mouseenter",
117
+ zIndex: 999999,
118
+ disabled: !descriptionToolTip
119
+ }, wrappedInput);
132
120
  });
133
121
  TextArea.defaultProps = {
134
122
  rows: 4,
@@ -164,12 +152,14 @@ TextArea.propTypes = process.env.NODE_ENV !== "production" ? {
164
152
  onChange: PropTypes.func,
165
153
  onBlur: PropTypes.func,
166
154
  noBorder: PropTypes.bool,
155
+ isExpanded: PropTypes.func,
167
156
  type: PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'loading', 'success']),
168
157
  loadingIcon: PropTypes.element,
169
158
  successIcon: PropTypes.element,
170
159
  descriptionToolTip: PropTypes.string,
171
160
  borderRadius: PropTypes.number
172
161
  } : {};
162
+ var TextArea$1 = memo(TextArea);
173
163
 
174
- export { TextArea as default };
164
+ export { TextArea$1 as default };
175
165
  //# sourceMappingURL=TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';\n\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [autoFocus, setAutoFocus] = useState(false);\n\n const [uniqueId] = useState(nanoid());\n\n const memoizedDescriptionToolTip = useMemo(() => {\n return descriptionToolTip;\n }, [descriptionToolTip]);\n\n useEffect(() => {\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const input = () => {\n return (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n type={type}\n className={className}\n style={style}\n >\n <S.TextInputFieldIconAlert type={type}>{icon}</S.TextInputFieldIconAlert>\n <S.TextInputField\n autoFocus={autoFocus}\n $borderRadius={borderRadius}\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n key={uniqueId}\n $padding={padding}\n onChange={e => {\n if (e.target.value) {\n setInputIsEmpty(false);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n } else {\n setInputIsEmpty(true);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n }\n onChange(e);\n }}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n $noBorder={noBorder}\n {...rest}\n />\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && noBorder && (\n <S.InputIconContainer disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n );\n };\n\n if (hidden) return null;\n\n return (\n <>\n {!memoizedDescriptionToolTip && input()}\n {memoizedDescriptionToolTip && (\n <div>\n <Tooltip\n content={memoizedDescriptionToolTip}\n key=\"tooltipTextArea1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n zIndex={999999}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n </>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default TextArea;\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","autoFocus","setAutoFocus","uniqueId","nanoid","memoizedDescriptionToolTip","useMemo","useEffect","onKeyDown","useCallback","event","key","stopPropagation","input","createElement","S","htmlFor","$fieldLabel","isEmpty","_extends","$borderRadius","ref","$edit","$hasIcon","Boolean","id","$padding","e","target","$noBorder","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Fragment","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneOfType","number","object","oneOf","func"],"mappings":";;;;;;;;;;;;;;;;AAsBMA,MAAAA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,IAAI;EACJC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,WAAW;EACXC,WAAW;EACXC,OAAO;EACPC,kBAAkB;EAClBC,YAAY;EACZC,UAAU;EACV,GAAGC,IAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAC,IAAI,CAAC,CAAA;AACrC,EAAA,MAAMC,YAAY,GAAGC,aAAa,CAACJ,YAAY,EAAEC,gBAAgB,CAAC,CAAA;AAElE,EAAA,MAAM,CAACI,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAAC,EAAElC,KAAK,IAAIC,YAAY,CAAC,CAAC,CAAA;EAC1E,MAAM,CAACkC,SAAS,EAAEC,YAAY,CAAC,GAAGF,QAAQ,CAAC,KAAK,CAAC,CAAA;EAEjD,MAAM,CAACG,QAAQ,CAAC,GAAGH,QAAQ,CAACI,MAAM,EAAE,CAAC,CAAA;AAErC,EAAA,MAAMC,0BAA0B,GAAGC,OAAO,CAAC,MAAM;AAC/C,IAAA,OAAOjB,kBAAkB,CAAA;AAC3B,GAAC,EAAE,CAACA,kBAAkB,CAAC,CAAC,CAAA;AAExBkB,EAAAA,SAAS,CAAC,MAAM;IACdL,YAAY,CAAC,KAAK,CAAC,CAAA;AACrB,GAAC,E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AS,CAACI,SAAS,CAAC,CAACJ,SAAS,CAACK,MAAM,EAAEL,SAAS,CAACC,MAAM,CAAC,CAAC;EAI/DlE,SAAS,EAAEiE,SAAS,CAACC,MAAM;EAI3BjE,KAAK,EAAEgE,SAAS,CAACM,MAAM;AAIvBhE,EAAAA,OAAO,EAAE0D,SAAS,CAACO,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;EAItDtE,QAAQ,EAAE+D,SAAS,CAACQ,IAAI;EAIxBtE,MAAM,EAAE8D,SAAS,CAACQ,IAAI;EACtBrE,QAAQ,EAAE6D,SAAS,CAACE,IAAI;EAMxBtE,IAAI,EAAEoE,SAAS,CAACO,KAAK,CAAC,CACpB,EAAE,EACF,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;EAIFnE,WAAW,EAAE4D,SAAS,CAACG,OAAO;EAI9B9D,WAAW,EAAE2D,SAAS,CAACG,OAAO;EAI9B5D,kBAAkB,EAAEyD,SAAS,CAACC,MAAM;EAIpCzD,YAAY,EAAEwD,SAAS,CAACK,MAAAA;AAC1B,CAAC,GAAA,EAAA;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo, memo } from 'react';\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [uniqueId] = useState(() => nanoid());\n\n useEffect(() => {\n setInputIsEmpty(!(value || defaultValue));\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const handleChange = useCallback(\n e => {\n setInputIsEmpty(!e.target.value);\n onChange(e);\n },\n [onChange]\n );\n\n const textAreaElement = useMemo(\n () => (\n <S.TextInputField\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n $type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n $padding={padding}\n $borderRadius={borderRadius}\n $noBorder={noBorder}\n onChange={handleChange}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n {...rest}\n />\n ),\n [\n textInputRef,\n rows,\n value,\n defaultValue,\n name,\n placeholder,\n required,\n readOnly,\n disabled,\n edit,\n type,\n autoComplete,\n icon,\n uniqueId,\n padding,\n borderRadius,\n noBorder,\n handleChange,\n onKeyDown,\n onBlur,\n rest\n ]\n );\n\n const wrappedInput = useMemo(\n () => (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} $disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel $type={type}>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n $type={type}\n className={className}\n style={style}\n >\n {icon && <S.TextInputFieldIconAlert $type={type}>{icon}</S.TextInputFieldIconAlert>}\n {textAreaElement}\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer $type={type}>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && noBorder && (\n <S.InputIconContainer $disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description $type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n ),\n [\n fieldLabel,\n uniqueId,\n disabled,\n type,\n loadingIcon,\n successIcon,\n icon,\n textAreaElement,\n readOnly,\n noBorder,\n padding,\n label,\n placeholder,\n inputIsEmpty,\n required,\n description,\n className,\n style\n ]\n );\n\n if (hidden) return null;\n\n return (\n <Tooltip\n content={descriptionToolTip || ''}\n placement=\"bottom-end\"\n trigger=\"mouseenter\"\n zIndex={999999}\n disabled={!descriptionToolTip}\n >\n {wrappedInput}\n </Tooltip>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n isExpanded: PropTypes.func,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default memo(TextArea);\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","uniqueId","nanoid","useEffect","onKeyDown","useCallback","event","key","stopPropagation","handleChange","e","target","textAreaElement","useMemo","createElement","S","_extends","ref","$edit","$type","$hasIcon","Boolean","id","$padding","$borderRadius","$noBorder","wrappedInput","htmlFor","$disabled","$fieldLabel","isEmpty","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneOfType","number","object","oneOf","func","isExpanded","memo"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAMA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,IAAI;EACJC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,WAAW;EACXC,WAAW;EACXC,OAAO;EACPC,kBAAkB;EAClBC,YAAY;EACZC,UAAU;EACV,GAAGC,IAAAA;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAC,IAAI,CAAC,CAAA;AACrC,EAAA,MAAMC,YAAY,GAAGC,aAAa,CAACJ,YAAY,EAAEC,gBAA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