@primer/components 31.0.2-rc.c7dafefb → 31.2.0-rc.a53b3afb

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 (100) hide show
  1. package/.storybook/main.js +7 -9
  2. package/.storybook/preview.js +5 -1
  3. package/CHANGELOG.md +11 -1
  4. package/dist/browser.esm.js +11 -10
  5. package/dist/browser.esm.js.map +1 -1
  6. package/dist/browser.umd.js +11 -10
  7. package/dist/browser.umd.js.map +1 -1
  8. package/docs/content/FilterList.md +2 -2
  9. package/docs/content/TextInputWithTokens.mdx +114 -0
  10. package/docs/content/theming.md +23 -0
  11. package/lib/Autocomplete/Autocomplete.d.ts +4 -4
  12. package/lib/Autocomplete/AutocompleteInput.d.ts +4 -4
  13. package/lib/Button/Button.d.ts +5 -5
  14. package/lib/Button/ButtonBase.d.ts +1 -1
  15. package/lib/Button/ButtonClose.d.ts +3 -3
  16. package/lib/Button/ButtonDanger.d.ts +5 -5
  17. package/lib/Button/ButtonInvisible.d.ts +5 -5
  18. package/lib/Button/ButtonOutline.d.ts +5 -5
  19. package/lib/Button/ButtonPrimary.d.ts +5 -5
  20. package/lib/CircleBadge.d.ts +2 -2
  21. package/lib/CircleOcticon.d.ts +4 -4
  22. package/lib/Dialog.d.ts +4 -4
  23. package/lib/Dropdown.d.ts +16 -16
  24. package/lib/DropdownMenu/DropdownButton.d.ts +6 -6
  25. package/lib/FilterList.d.ts +3 -3
  26. package/lib/Flash.d.ts +1 -1
  27. package/lib/Label.d.ts +1 -1
  28. package/lib/Position.d.ts +4 -4
  29. package/lib/ProgressBar.d.ts +1 -1
  30. package/lib/SelectMenu/SelectMenu.d.ts +24 -24
  31. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  32. package/lib/TextInputWithTokens.d.ts +8 -4
  33. package/lib/TextInputWithTokens.js +61 -8
  34. package/lib/Timeline.d.ts +4 -4
  35. package/lib/Token/AvatarToken.d.ts +1 -1
  36. package/lib/Token/IssueLabelToken.d.ts +1 -1
  37. package/lib/Token/Token.d.ts +1 -1
  38. package/lib/_TextInputWrapper.d.ts +1 -1
  39. package/lib/_TextInputWrapper.js +1 -1
  40. package/lib/__tests__/KeyPaths.types.test.d.ts +10 -0
  41. package/lib/__tests__/KeyPaths.types.test.js +10 -0
  42. package/lib/__tests__/TextInputWithTokens.test.js +149 -9
  43. package/lib/stories/TextInputWithTokens.stories.js +18 -1
  44. package/lib/sx.d.ts +8 -2
  45. package/lib/theme.d.ts +78 -0
  46. package/lib/theme.js +3 -1
  47. package/lib/utils/types/KeyPaths.d.ts +3 -0
  48. package/lib/utils/types/KeyPaths.js +1 -0
  49. package/lib-esm/Autocomplete/Autocomplete.d.ts +4 -4
  50. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +4 -4
  51. package/lib-esm/Button/Button.d.ts +5 -5
  52. package/lib-esm/Button/ButtonBase.d.ts +1 -1
  53. package/lib-esm/Button/ButtonClose.d.ts +3 -3
  54. package/lib-esm/Button/ButtonDanger.d.ts +5 -5
  55. package/lib-esm/Button/ButtonInvisible.d.ts +5 -5
  56. package/lib-esm/Button/ButtonOutline.d.ts +5 -5
  57. package/lib-esm/Button/ButtonPrimary.d.ts +5 -5
  58. package/lib-esm/CircleBadge.d.ts +2 -2
  59. package/lib-esm/CircleOcticon.d.ts +4 -4
  60. package/lib-esm/Dialog.d.ts +4 -4
  61. package/lib-esm/Dropdown.d.ts +16 -16
  62. package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -6
  63. package/lib-esm/FilterList.d.ts +3 -3
  64. package/lib-esm/Flash.d.ts +1 -1
  65. package/lib-esm/Label.d.ts +1 -1
  66. package/lib-esm/Position.d.ts +4 -4
  67. package/lib-esm/ProgressBar.d.ts +1 -1
  68. package/lib-esm/SelectMenu/SelectMenu.d.ts +24 -24
  69. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  70. package/lib-esm/TextInputWithTokens.d.ts +8 -4
  71. package/lib-esm/TextInputWithTokens.js +60 -8
  72. package/lib-esm/Timeline.d.ts +4 -4
  73. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  74. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  75. package/lib-esm/Token/Token.d.ts +1 -1
  76. package/lib-esm/_TextInputWrapper.d.ts +1 -1
  77. package/lib-esm/_TextInputWrapper.js +1 -1
  78. package/lib-esm/__tests__/KeyPaths.types.test.d.ts +10 -0
  79. package/lib-esm/__tests__/KeyPaths.types.test.js +3 -0
  80. package/lib-esm/__tests__/TextInputWithTokens.test.js +142 -9
  81. package/lib-esm/stories/TextInputWithTokens.stories.js +14 -0
  82. package/lib-esm/sx.d.ts +8 -2
  83. package/lib-esm/theme.d.ts +78 -0
  84. package/lib-esm/theme.js +2 -1
  85. package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
  86. package/lib-esm/utils/types/KeyPaths.js +1 -0
  87. package/package-lock.json +37942 -41
  88. package/package.json +2 -1
  89. package/src/TextInputWithTokens.tsx +64 -8
  90. package/src/_TextInputWrapper.tsx +1 -0
  91. package/src/__tests__/KeyPaths.types.test.ts +13 -0
  92. package/src/__tests__/TextInputWithTokens.test.tsx +133 -1
  93. package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +7 -0
  94. package/src/__tests__/__snapshots__/TextInput.test.tsx.snap +6 -0
  95. package/src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap +463 -0
  96. package/src/stories/TextInputWithTokens.stories.tsx +9 -0
  97. package/src/sx.ts +14 -2
  98. package/src/theme.ts +86 -0
  99. package/src/utils/types/KeyPaths.ts +4 -0
  100. package/stats.html +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "31.0.2-rc.c7dafefb",
3
+ "version": "31.2.0-rc.a53b3afb",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -132,6 +132,7 @@
132
132
  "rollup-plugin-visualizer": "5.5.0",
133
133
  "semver": "7.3.5",
134
134
  "size-limit": "5.0.2",
135
+ "storybook-addon-performance": "0.16.1",
135
136
  "styled-components": "4.4.1",
136
137
  "typescript": "4.2.2"
137
138
  },
@@ -1,4 +1,4 @@
1
- import React, {FocusEventHandler, KeyboardEventHandler, RefObject, useRef, useState} from 'react'
1
+ import React, {FocusEventHandler, KeyboardEventHandler, MouseEventHandler, RefObject, useRef, useState} from 'react'
2
2
  import {omit} from '@styled-system/props'
3
3
  import {FocusKeys} from './behaviors/focusZone'
4
4
  import {useCombinedRefs} from './hooks/useCombinedRefs'
@@ -11,6 +11,7 @@ import {useProvidedRefOrCreate} from './hooks'
11
11
  import UnstyledTextInput from './_UnstyledTextInput'
12
12
  import TextInputWrapper from './_TextInputWrapper'
13
13
  import Box from './Box'
14
+ import Text from './Text'
14
15
  import {isFocusable} from './utils/iterateFocusableElements'
15
16
 
16
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -48,8 +49,19 @@ type TextInputWithTokensInternalProps<TokenComponentType extends AnyReactCompone
48
49
  * Whether the remove buttons should be rendered in the tokens
49
50
  */
50
51
  hideTokenRemoveButtons?: boolean
52
+ /**
53
+ * The number of tokens to display before truncating
54
+ */
55
+ visibleTokenCount?: number
51
56
  } & TextInputProps
52
57
 
58
+ const overflowCountFontSizeMap: Record<TokenSizeKeys, number> = {
59
+ small: 0,
60
+ medium: 1,
61
+ large: 1,
62
+ extralarge: 2
63
+ }
64
+
53
65
  // using forwardRef is important so that other components (ex. Autocomplete) can use the ref
54
66
  function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactComponent>(
55
67
  {
@@ -71,6 +83,7 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
71
83
  minWidth: minWidthProp,
72
84
  maxWidth: maxWidthProp,
73
85
  variant: variantProp,
86
+ visibleTokenCount,
74
87
  ...rest
75
88
  }: TextInputWithTokensInternalProps<TokenComponentType> & {
76
89
  selectedTokenIndex: number | undefined
@@ -78,11 +91,12 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
78
91
  },
79
92
  externalRef: React.ForwardedRef<HTMLInputElement>
80
93
  ) {
81
- const {onFocus, onKeyDown, ...inputPropsRest} = omit(rest)
94
+ const {onBlur, onFocus, onKeyDown, ...inputPropsRest} = omit(rest)
82
95
  const ref = useProvidedRefOrCreate<HTMLInputElement>(externalRef as React.RefObject<HTMLInputElement>)
83
96
  const localInputRef = useRef<HTMLInputElement>(null)
84
97
  const combinedInputRef = useCombinedRefs(localInputRef, ref)
85
98
  const [selectedTokenIndex, setSelectedTokenIndex] = useState<number | undefined>()
99
+ const [tokensAreTruncated, setTokensAreTruncated] = useState<boolean>(Boolean(visibleTokenCount))
86
100
  const {containerRef} = useFocusZone(
87
101
  {
88
102
  focusOutBehavior: 'wrap',
@@ -144,18 +158,42 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
144
158
 
145
159
  const handleTokenBlur: FocusEventHandler = () => {
146
160
  setSelectedTokenIndex(undefined)
161
+
162
+ // HACK: wait a tick and check the focused element before hiding truncated tokens
163
+ // this prevents the tokens from hiding when the user is moving focus between tokens,
164
+ // but still hides the tokens when the user blurs the token by tabbing out or clicking somewhere else on the page
165
+ setTimeout(() => {
166
+ if (!containerRef.current?.contains(document.activeElement) && visibleTokenCount) {
167
+ setTokensAreTruncated(true)
168
+ }
169
+ }, 0)
147
170
  }
148
171
 
149
- const handleTokenKeyUp: KeyboardEventHandler = e => {
150
- if (e.key === 'Escape') {
172
+ const handleTokenKeyUp: KeyboardEventHandler = event => {
173
+ if (event.key === 'Escape') {
151
174
  ref.current?.focus()
152
175
  }
153
176
  }
154
177
 
155
- const handleInputFocus: FocusEventHandler = e => {
156
- onFocus && onFocus(e)
178
+ const handleInputFocus: FocusEventHandler = event => {
179
+ onFocus && onFocus(event)
157
180
  setSelectedTokenIndex(undefined)
181
+ visibleTokenCount && setTokensAreTruncated(false)
182
+ }
183
+
184
+ const handleInputBlur: FocusEventHandler = event => {
185
+ onBlur && onBlur(event)
186
+
187
+ // HACK: wait a tick and check the focused element before hiding truncated tokens
188
+ // this prevents the tokens from hiding when the user is moving focus from the input to a token,
189
+ // but still hides the tokens when the user blurs the input by tabbing out or clicking somewhere else on the page
190
+ setTimeout(() => {
191
+ if (!containerRef.current?.contains(document.activeElement) && visibleTokenCount) {
192
+ setTokensAreTruncated(true)
193
+ }
194
+ }, 0)
158
195
  }
196
+
159
197
  const handleInputKeyDown: KeyboardEventHandler = e => {
160
198
  if (onKeyDown) {
161
199
  onKeyDown(e)
@@ -187,6 +225,16 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
187
225
  }
188
226
  }
189
227
 
228
+ const focusInput: MouseEventHandler = () => {
229
+ combinedInputRef.current?.focus()
230
+ }
231
+
232
+ const preventTokenClickPropagation: MouseEventHandler = event => {
233
+ event.stopPropagation()
234
+ }
235
+
236
+ const visibleTokens = tokensAreTruncated ? tokens.slice(0, visibleTokenCount) : tokens
237
+
190
238
  return (
191
239
  <TextInputWrapper
192
240
  block={block}
@@ -199,6 +247,7 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
199
247
  minWidth={minWidthProp}
200
248
  maxWidth={maxWidthProp}
201
249
  variant={variantProp}
250
+ onClick={focusInput}
202
251
  sx={{
203
252
  ...(block
204
253
  ? {
@@ -251,19 +300,21 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
251
300
  ref={combinedInputRef}
252
301
  disabled={disabled}
253
302
  onFocus={handleInputFocus}
303
+ onBlur={handleInputBlur}
254
304
  onKeyDown={handleInputKeyDown}
255
305
  type="text"
256
306
  sx={{height: '100%'}}
257
307
  {...inputPropsRest}
258
308
  />
259
309
  </Box>
260
- {tokens.length && TokenComponent
261
- ? tokens.map(({id, ...tokenRest}, i) => (
310
+ {TokenComponent
311
+ ? visibleTokens.map(({id, ...tokenRest}, i) => (
262
312
  <TokenComponent
263
313
  key={id}
264
314
  onFocus={handleTokenFocus(i)}
265
315
  onBlur={handleTokenBlur}
266
316
  onKeyUp={handleTokenKeyUp}
317
+ onClick={preventTokenClickPropagation}
267
318
  isSelected={selectedTokenIndex === i}
268
319
  onRemove={() => {
269
320
  handleTokenRemove(id)
@@ -275,6 +326,11 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
275
326
  />
276
327
  ))
277
328
  : null}
329
+ {tokensAreTruncated ? (
330
+ <Text color="fg.muted" fontSize={size && overflowCountFontSizeMap[size]}>
331
+ +{tokens.length - visibleTokens.length}
332
+ </Text>
333
+ ) : null}
278
334
  </Box>
279
335
  </TextInputWrapper>
280
336
  )
@@ -45,6 +45,7 @@ const TextInputWrapper = styled.span<StyledWrapperProps>`
45
45
  border-radius: ${get('radii.2')};
46
46
  outline: none;
47
47
  box-shadow: ${get('shadows.primer.shadow.inset')};
48
+ cursor: text;
48
49
 
49
50
  ${props => {
50
51
  if (props.hasIcon) {
@@ -0,0 +1,13 @@
1
+ import {KeyPaths} from '../utils/types/KeyPaths'
2
+
3
+ type NestedObject = {
4
+ a: string
5
+ b: {
6
+ b1: string
7
+ b2: string
8
+ }
9
+ }
10
+
11
+ export function generatesKeyPathsFromObject(x: KeyPaths<NestedObject>): 'a' | 'b.b1' | 'b.b2' {
12
+ return x
13
+ }
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import {render} from '../utils/testing'
3
- import {render as HTMLRender, cleanup, fireEvent} from '@testing-library/react'
3
+ import {render as HTMLRender, fireEvent, act, cleanup} from '@testing-library/react'
4
4
  import {axe, toHaveNoViolations} from 'jest-axe'
5
5
  import 'babel-polyfill'
6
6
  import {TokenSizeKeys, tokenSizes} from '../Token/TokenBase'
@@ -29,6 +29,18 @@ const LabelledTextInputWithTokens: React.FC<TextInputWithTokensProps> = ({onToke
29
29
  </>
30
30
  )
31
31
 
32
+ // describe('axe test', () => {
33
+ // it('should have no axe violations', async () => {
34
+ // const onRemoveMock = jest.fn()
35
+ // const {container} = HTMLRender(<LabelledTextInputWithTokens tokens={mockTokens} onTokenRemove={onRemoveMock} />)
36
+ // const results = await axe(container)
37
+ // expect(results).toHaveNoViolations()
38
+ // cleanup()
39
+ // })
40
+ // })
41
+
42
+ jest.useFakeTimers()
43
+
32
44
  describe('TextInputWithTokens', () => {
33
45
  it('renders without tokens', () => {
34
46
  const onRemoveMock = jest.fn()
@@ -85,6 +97,13 @@ describe('TextInputWithTokens', () => {
85
97
  ).toMatchSnapshot()
86
98
  })
87
99
 
100
+ it('renders a truncated set of tokens', () => {
101
+ const onRemoveMock = jest.fn()
102
+ expect(
103
+ render(<TextInputWithTokens tokens={mockTokens} onTokenRemove={onRemoveMock} visibleTokenCount={2} />)
104
+ ).toMatchSnapshot()
105
+ })
106
+
88
107
  it('focuses the previous token when keying ArrowLeft', () => {
89
108
  const onRemoveMock = jest.fn()
90
109
  const {getByLabelText, getByText} = HTMLRender(
@@ -165,6 +184,119 @@ describe('TextInputWithTokens', () => {
165
184
  expect(document.activeElement?.id).toEqual(inputNode.id)
166
185
  })
167
186
 
187
+ it('does not focus the input when clicking a token', () => {
188
+ const onRemoveMock = jest.fn()
189
+ const {getByLabelText, getByText} = HTMLRender(
190
+ <LabelledTextInputWithTokens tokens={mockTokens} onTokenRemove={onRemoveMock} visibleTokenCount={2} />
191
+ )
192
+ const inputNode = getByLabelText('Tokens')
193
+ const tokenNode = getByText(mockTokens[0].text)
194
+
195
+ expect(document.activeElement).not.toEqual(inputNode.id)
196
+ fireEvent.click(tokenNode)
197
+ expect(document.activeElement?.id).not.toEqual(inputNode.id)
198
+ })
199
+
200
+ it('focuses the input when clicking somewhere in the component besides the tokens', () => {
201
+ const onRemoveMock = jest.fn()
202
+ const {getByLabelText, getByText} = HTMLRender(
203
+ <LabelledTextInputWithTokens tokens={mockTokens} onTokenRemove={onRemoveMock} visibleTokenCount={2} />
204
+ )
205
+ const inputNode = getByLabelText('Tokens')
206
+ const truncatedTokenCount = getByText('+6')
207
+
208
+ expect(document.activeElement).not.toEqual(inputNode.id)
209
+ fireEvent.click(truncatedTokenCount)
210
+ expect(document.activeElement?.id).toEqual(inputNode.id)
211
+ })
212
+
213
+ it('shows all tokens when the input is focused and hides them when it is blurred (when visibleTokenCount is set)', () => {
214
+ const onRemoveMock = jest.fn()
215
+ const visibleTokenCount = 2
216
+ const {getByLabelText, getByText} = HTMLRender(
217
+ <>
218
+ <LabelledTextInputWithTokens
219
+ tokens={mockTokens}
220
+ onTokenRemove={onRemoveMock}
221
+ visibleTokenCount={visibleTokenCount}
222
+ />
223
+ <button id="focusableOutsideComponent">Focus me</button>
224
+ </>
225
+ )
226
+ const inputNode = getByLabelText('Tokens')
227
+ const focusableOutsideComponentNode = getByText('Focus me')
228
+ const allTokenLabels = mockTokens.map(token => token.text)
229
+ const truncatedTokenCountNode = getByText('+6')
230
+
231
+ act(() => {
232
+ jest.runAllTimers()
233
+ fireEvent.focus(inputNode)
234
+ })
235
+
236
+ setTimeout(() => {
237
+ for (const tokenLabel of allTokenLabels) {
238
+ const tokenNode = getByText(tokenLabel)
239
+ expect(tokenNode).toBeDefined()
240
+ }
241
+ }, 0)
242
+
243
+ act(() => {
244
+ jest.runAllTimers()
245
+ // onBlur isn't called on input unless we specifically fire the "blur" event
246
+ // eslint-disable-next-line github/no-blur
247
+ fireEvent.blur(inputNode)
248
+ fireEvent.focus(focusableOutsideComponentNode)
249
+ })
250
+
251
+ setTimeout(() => {
252
+ expect(truncatedTokenCountNode).toBeDefined()
253
+
254
+ for (const tokenLabel of allTokenLabels) {
255
+ const tokenNode = getByText(tokenLabel)
256
+ if (allTokenLabels.indexOf(tokenLabel) > visibleTokenCount) {
257
+ // eslint-disable-next-line jest/no-conditional-expect
258
+ expect(tokenNode).toBeDefined()
259
+ } else {
260
+ // eslint-disable-next-line jest/no-conditional-expect
261
+ expect(tokenNode).not.toBeDefined()
262
+ }
263
+ }
264
+ }, 0)
265
+
266
+ jest.useRealTimers()
267
+ })
268
+
269
+ it('does not hide tokens when blurring the input to focus within the component (when visibleTokenCount is set)', () => {
270
+ const onRemoveMock = jest.fn()
271
+ const visibleTokenCount = 2
272
+ const {getByLabelText, getByText} = HTMLRender(
273
+ <>
274
+ <LabelledTextInputWithTokens
275
+ tokens={mockTokens}
276
+ onTokenRemove={onRemoveMock}
277
+ visibleTokenCount={visibleTokenCount}
278
+ />
279
+ <button id="focusableOutsideComponent">Focus me</button>
280
+ </>
281
+ )
282
+ const inputNode = getByLabelText('Tokens')
283
+ const firstTokenNode = getByText(mockTokens[visibleTokenCount - 1].text)
284
+ const allTokenLabels = mockTokens.map(token => token.text)
285
+ const truncatedTokenCountNode = getByText('+6')
286
+
287
+ act(() => {
288
+ fireEvent.focus(inputNode)
289
+ fireEvent.focus(firstTokenNode)
290
+ })
291
+
292
+ expect(truncatedTokenCountNode).toBeDefined()
293
+
294
+ for (const tokenLabel of allTokenLabels) {
295
+ const tokenNode = getByText(tokenLabel)
296
+ expect(tokenNode).toBeDefined()
297
+ }
298
+ })
299
+
168
300
  it('focuses the first token when keying ArrowRight in the input', () => {
169
301
  const onRemoveMock = jest.fn()
170
302
  const {getByLabelText, getByText} = HTMLRender(
@@ -36,6 +36,7 @@ Array [
36
36
  border-radius: 6px;
37
37
  outline: none;
38
38
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
39
+ cursor: text;
39
40
  padding: 6px 12px;
40
41
  }
41
42
 
@@ -148,6 +149,7 @@ Array [
148
149
  border-radius: 6px;
149
150
  outline: none;
150
151
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
152
+ cursor: text;
151
153
  padding: 6px 12px;
152
154
  }
153
155
 
@@ -295,6 +297,7 @@ Array [
295
297
  border-radius: 6px;
296
298
  outline: none;
297
299
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
300
+ cursor: text;
298
301
  padding: 6px 12px;
299
302
  }
300
303
 
@@ -1040,6 +1043,7 @@ Array [
1040
1043
  border-radius: 6px;
1041
1044
  outline: none;
1042
1045
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
1046
+ cursor: text;
1043
1047
  padding: 6px 12px;
1044
1048
  }
1045
1049
 
@@ -1708,6 +1712,7 @@ Array [
1708
1712
  border-radius: 6px;
1709
1713
  outline: none;
1710
1714
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
1715
+ cursor: text;
1711
1716
  padding: 6px 12px;
1712
1717
  }
1713
1718
 
@@ -2376,6 +2381,7 @@ Array [
2376
2381
  border-radius: 6px;
2377
2382
  outline: none;
2378
2383
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
2384
+ cursor: text;
2379
2385
  padding: 6px 12px;
2380
2386
  }
2381
2387
 
@@ -3337,6 +3343,7 @@ Array [
3337
3343
  border-radius: 6px;
3338
3344
  outline: none;
3339
3345
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
3346
+ cursor: text;
3340
3347
  padding: 6px 12px;
3341
3348
  }
3342
3349
 
@@ -35,6 +35,7 @@ exports[`TextInput renders 1`] = `
35
35
  border-radius: 6px;
36
36
  outline: none;
37
37
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
38
+ cursor: text;
38
39
  padding: 6px 12px;
39
40
  }
40
41
 
@@ -106,6 +107,7 @@ exports[`TextInput renders block 1`] = `
106
107
  border-radius: 6px;
107
108
  outline: none;
108
109
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
110
+ cursor: text;
109
111
  padding: 6px 12px;
110
112
  display: block;
111
113
  width: 100%;
@@ -179,6 +181,7 @@ exports[`TextInput renders consistently 1`] = `
179
181
  border-radius: 6px;
180
182
  outline: none;
181
183
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
184
+ cursor: text;
182
185
  padding: 6px 12px;
183
186
  }
184
187
 
@@ -249,6 +252,7 @@ exports[`TextInput renders large 1`] = `
249
252
  border-radius: 6px;
250
253
  outline: none;
251
254
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
255
+ cursor: text;
252
256
  padding: 6px 12px;
253
257
  padding-left: 8px;
254
258
  padding-right: 8px;
@@ -325,6 +329,7 @@ exports[`TextInput renders small 1`] = `
325
329
  border-radius: 6px;
326
330
  outline: none;
327
331
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
332
+ cursor: text;
328
333
  padding: 6px 12px;
329
334
  min-height: 28px;
330
335
  padding-left: 8px;
@@ -403,6 +408,7 @@ exports[`TextInput should render a password input 1`] = `
403
408
  border-radius: 6px;
404
409
  outline: none;
405
410
  box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
411
+ cursor: text;
406
412
  padding: 6px 12px;
407
413
  }
408
414