@charcoal-ui/react 3.8.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/components/Checkbox/index.d.ts.map +1 -1
  2. package/dist/components/Modal/index.d.ts.map +1 -1
  3. package/dist/components/Modal/index.story.d.ts +1 -0
  4. package/dist/components/Modal/index.story.d.ts.map +1 -1
  5. package/dist/components/Modal/useCustomModalOverlay.d.ts +12 -0
  6. package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -0
  7. package/dist/components/Radio/index.d.ts.map +1 -1
  8. package/dist/components/TextArea/index.d.ts.map +1 -1
  9. package/dist/components/TextField/TextField.story.d.ts +1 -0
  10. package/dist/components/TextField/TextField.story.d.ts.map +1 -1
  11. package/dist/components/TextField/index.d.ts.map +1 -1
  12. package/dist/index.cjs.js +1001 -2226
  13. package/dist/index.cjs.js.map +1 -1
  14. package/dist/index.esm.js +995 -2226
  15. package/dist/index.esm.js.map +1 -1
  16. package/package.json +7 -6
  17. package/src/components/Checkbox/__snapshots__/index.story.storyshot +43 -15
  18. package/src/components/Checkbox/index.tsx +13 -5
  19. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +3 -0
  20. package/src/components/IconButton/__snapshots__/index.story.storyshot +5 -0
  21. package/src/components/IconButton/index.tsx +4 -1
  22. package/src/components/Modal/__snapshots__/index.story.storyshot +926 -0
  23. package/src/components/Modal/index.story.tsx +23 -0
  24. package/src/components/Modal/index.tsx +15 -20
  25. package/src/components/Modal/useCustomModalOverlay.tsx +47 -0
  26. package/src/components/Radio/__snapshots__/index.story.storyshot +25 -5
  27. package/src/components/Radio/index.tsx +5 -1
  28. package/src/components/TextArea/index.tsx +22 -14
  29. package/src/components/TextField/TextField.story.tsx +20 -0
  30. package/src/components/TextField/__snapshots__/TextField.story.storyshot +277 -0
  31. package/src/components/TextField/index.tsx +22 -14
@@ -243,4 +243,27 @@ export const NotDismmissableStory: StoryObj<typeof Modal> = {
243
243
  },
244
244
  }
245
245
 
246
+ export const BackgroundScroll: StoryObj<typeof Modal> = {
247
+ render: function Render(args) {
248
+ const state = useOverlayTriggerState({})
249
+ return (
250
+ <OverlayProvider>
251
+ <div
252
+ style={{
253
+ height: 1024,
254
+ }}
255
+ >
256
+ <Button onClick={() => state.open()}>Open Modal</Button>
257
+ </div>
258
+ <M
259
+ {...args}
260
+ isDismissable
261
+ isOpen={state.isOpen}
262
+ onClose={() => state.close()}
263
+ />
264
+ </OverlayProvider>
265
+ )
266
+ },
267
+ }
268
+
246
269
  export { InternalScrollStory as InternalScroll } from './__stories__/InternalScrollStory'
@@ -1,10 +1,6 @@
1
1
  import { useContext, forwardRef, memo } from 'react'
2
2
  import * as React from 'react'
3
- import {
4
- AriaModalOverlayProps,
5
- Overlay,
6
- useModalOverlay,
7
- } from '@react-aria/overlays'
3
+ import { AriaModalOverlayProps, Overlay } from '@react-aria/overlays'
8
4
  import styled, { css, useTheme } from 'styled-components'
9
5
  import { AriaDialogProps } from '@react-types/dialog'
10
6
  import { maxWidth } from '@charcoal-ui/utils'
@@ -15,6 +11,7 @@ import IconButton from '../IconButton'
15
11
  import { useObjectRef } from '@react-aria/utils'
16
12
  import { Dialog } from './Dialog'
17
13
  import { ModalBackgroundContext } from './ModalBackgroundContext'
14
+ import { useCharcoalModalOverlay } from './useCustomModalOverlay'
18
15
 
19
16
  export type BottomSheet = boolean | 'full'
20
17
  export type Size = 'S' | 'M' | 'L'
@@ -81,27 +78,15 @@ const Modal = forwardRef<HTMLDivElement, ModalProps>(function ModalInner(
81
78
 
82
79
  const ref = useObjectRef<HTMLDivElement>(external)
83
80
 
84
- const { modalProps, underlayProps } = useModalOverlay(
81
+ const { modalProps, underlayProps } = useCharcoalModalOverlay(
85
82
  {
86
83
  ...props,
87
84
  isKeyboardDismissDisabled:
88
85
  isDismissable === undefined || isDismissable === false,
89
86
  },
90
-
91
87
  {
92
- close: onClose,
93
- isOpen: isOpen,
94
- // these props are not used actually.
95
- // https://github.com/adobe/react-spectrum/blob/df14e3fb129b94b310f0397a701b83f006b51dfe/packages/%40react-aria/overlays/src/useModalOverlay.ts
96
- open: () => {
97
- // nope
98
- },
99
- setOpen: () => {
100
- // nope
101
- },
102
- toggle: () => {
103
- // nope
104
- },
88
+ onClose,
89
+ isOpen,
105
90
  },
106
91
  ref
107
92
  )
@@ -136,6 +121,15 @@ const Modal = forwardRef<HTMLDivElement, ModalProps>(function ModalInner(
136
121
 
137
122
  const bgRef = React.useRef<HTMLElement>(null)
138
123
 
124
+ const handleClick = React.useCallback(
125
+ (e: MouseEvent) => {
126
+ if (e.currentTarget === e.target) {
127
+ onClose()
128
+ }
129
+ },
130
+ [onClose]
131
+ )
132
+
139
133
  return transition(
140
134
  ({ backgroundColor, overflow, transform }, item) =>
141
135
  item && (
@@ -146,6 +140,7 @@ const Modal = forwardRef<HTMLDivElement, ModalProps>(function ModalInner(
146
140
  {...underlayProps}
147
141
  style={transitionEnabled ? { backgroundColor, overflow } : {}}
148
142
  $bottomSheet={bottomSheet}
143
+ onClick={handleClick}
149
144
  >
150
145
  <ModalBackgroundContext.Provider value={bgRef.current}>
151
146
  <Dialog
@@ -0,0 +1,47 @@
1
+ import * as React from 'react'
2
+ import {
3
+ AriaModalOverlayProps,
4
+ ModalOverlayAria,
5
+ ariaHideOutside,
6
+ useOverlay,
7
+ useOverlayFocusContain,
8
+ usePreventScroll,
9
+ } from '@react-aria/overlays'
10
+
11
+ /**
12
+ * We want to enable scrolling on the modal background,
13
+ * but `useModalOverlay` (specifically, `useOverlay` within it) detects pointer events on the scrollbar.
14
+ * Therefore, to prevent this issue, we need to override `shouldCloseOnInteractOutside` in `useModalOverlay`.
15
+ */
16
+ export function useCharcoalModalOverlay(
17
+ props: AriaModalOverlayProps,
18
+ state: { isOpen: boolean; onClose: () => void },
19
+ ref: React.RefObject<HTMLElement>
20
+ ): ModalOverlayAria {
21
+ const { overlayProps, underlayProps } = useOverlay(
22
+ {
23
+ ...props,
24
+ isOpen: state.isOpen,
25
+ onClose: state.onClose,
26
+ shouldCloseOnInteractOutside: () => false,
27
+ },
28
+ ref
29
+ )
30
+
31
+ usePreventScroll({
32
+ isDisabled: !state.isOpen,
33
+ })
34
+
35
+ useOverlayFocusContain()
36
+
37
+ React.useEffect(() => {
38
+ if (state.isOpen && ref.current) {
39
+ return ariaHideOutside([ref.current])
40
+ }
41
+ }, [state.isOpen, ref])
42
+
43
+ return {
44
+ modalProps: overlayProps,
45
+ underlayProps,
46
+ }
47
+ }
@@ -12,9 +12,9 @@ exports[`Storybook Tests Radio Basic 1`] = `
12
12
  cursor: pointer;
13
13
  }
14
14
 
15
- .c2:disabled,
16
15
  .c2[aria-disabled]:not([aria-disabled='false']) {
17
16
  opacity: 0.32;
17
+ cursor: default;
18
18
  }
19
19
 
20
20
  .c3[type='radio'] {
@@ -34,6 +34,10 @@ exports[`Storybook Tests Radio Basic 1`] = `
34
34
  transition: 0.2s background-color,0.2s box-shadow;
35
35
  }
36
36
 
37
+ .c3[type='radio']:disabled {
38
+ cursor: default;
39
+ }
40
+
37
41
  .c3[type='radio']:not(:disabled):not([aria-disabled]):hover,
38
42
  .c3[type='radio'][aria-disabled='false']:hover {
39
43
  background-color: var(--charcoal-surface1-hover);
@@ -244,9 +248,9 @@ exports[`Storybook Tests Radio Disabled 1`] = `
244
248
  cursor: pointer;
245
249
  }
246
250
 
247
- .c2:disabled,
248
251
  .c2[aria-disabled]:not([aria-disabled='false']) {
249
252
  opacity: 0.32;
253
+ cursor: default;
250
254
  }
251
255
 
252
256
  .c3[type='radio'] {
@@ -266,6 +270,10 @@ exports[`Storybook Tests Radio Disabled 1`] = `
266
270
  transition: 0.2s background-color,0.2s box-shadow;
267
271
  }
268
272
 
273
+ .c3[type='radio']:disabled {
274
+ cursor: default;
275
+ }
276
+
269
277
  .c3[type='radio']:not(:disabled):not([aria-disabled]):hover,
270
278
  .c3[type='radio'][aria-disabled='false']:hover {
271
279
  background-color: var(--charcoal-surface1-hover);
@@ -476,9 +484,9 @@ exports[`Storybook Tests Radio Invalid 1`] = `
476
484
  cursor: pointer;
477
485
  }
478
486
 
479
- .c2:disabled,
480
487
  .c2[aria-disabled]:not([aria-disabled='false']) {
481
488
  opacity: 0.32;
489
+ cursor: default;
482
490
  }
483
491
 
484
492
  .c3[type='radio'] {
@@ -498,6 +506,10 @@ exports[`Storybook Tests Radio Invalid 1`] = `
498
506
  transition: 0.2s background-color,0.2s box-shadow;
499
507
  }
500
508
 
509
+ .c3[type='radio']:disabled {
510
+ cursor: default;
511
+ }
512
+
501
513
  .c3[type='radio']:not(:disabled):not([aria-disabled]):hover,
502
514
  .c3[type='radio'][aria-disabled='false']:hover {
503
515
  background-color: var(--charcoal-surface1-hover);
@@ -709,9 +721,9 @@ exports[`Storybook Tests Radio PartialDisabled 1`] = `
709
721
  cursor: pointer;
710
722
  }
711
723
 
712
- .c2:disabled,
713
724
  .c2[aria-disabled]:not([aria-disabled='false']) {
714
725
  opacity: 0.32;
726
+ cursor: default;
715
727
  }
716
728
 
717
729
  .c3[type='radio'] {
@@ -731,6 +743,10 @@ exports[`Storybook Tests Radio PartialDisabled 1`] = `
731
743
  transition: 0.2s background-color,0.2s box-shadow;
732
744
  }
733
745
 
746
+ .c3[type='radio']:disabled {
747
+ cursor: default;
748
+ }
749
+
734
750
  .c3[type='radio']:not(:disabled):not([aria-disabled]):hover,
735
751
  .c3[type='radio'][aria-disabled='false']:hover {
736
752
  background-color: var(--charcoal-surface1-hover);
@@ -941,9 +957,9 @@ exports[`Storybook Tests Radio Readonly 1`] = `
941
957
  cursor: pointer;
942
958
  }
943
959
 
944
- .c2:disabled,
945
960
  .c2[aria-disabled]:not([aria-disabled='false']) {
946
961
  opacity: 0.32;
962
+ cursor: default;
947
963
  }
948
964
 
949
965
  .c3[type='radio'] {
@@ -963,6 +979,10 @@ exports[`Storybook Tests Radio Readonly 1`] = `
963
979
  transition: 0.2s background-color,0.2s box-shadow;
964
980
  }
965
981
 
982
+ .c3[type='radio']:disabled {
983
+ cursor: default;
984
+ }
985
+
966
986
  .c3[type='radio']:not(:disabled):not([aria-disabled]):hover,
967
987
  .c3[type='radio'][aria-disabled='false']:hover {
968
988
  background-color: var(--charcoal-surface1-hover);
@@ -65,9 +65,9 @@ const RadioRoot = styled.label`
65
65
  align-items: center;
66
66
  cursor: pointer;
67
67
 
68
- &:disabled,
69
68
  &[aria-disabled]:not([aria-disabled='false']) {
70
69
  opacity: 0.32;
70
+ cursor: default;
71
71
  }
72
72
  `
73
73
 
@@ -88,6 +88,10 @@ export const RadioInput = styled.input.attrs({ type: 'radio' })`
88
88
  background-color: var(--charcoal-surface1);
89
89
  transition: 0.2s background-color, 0.2s box-shadow;
90
90
 
91
+ :disabled {
92
+ cursor: default;
93
+ }
94
+
91
95
  &:not(:disabled):not([aria-disabled]),
92
96
  &[aria-disabled='false'] {
93
97
  &:hover {
@@ -7,6 +7,7 @@ import { countCodePointsInString, mergeRefs } from '../../_lib'
7
7
  import { ReactAreaUseTextFieldCompat } from '../../_lib/compat'
8
8
  import { AssistiveText, TextFieldLabel } from '../TextField'
9
9
  import { useFocusWithClick } from '../TextField/useFocusWithClick'
10
+ import { mergeProps } from '@react-aria/utils'
10
11
 
11
12
  type DOMProps = Omit<
12
13
  React.TextareaHTMLAttributes<HTMLTextAreaElement>,
@@ -55,6 +56,7 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
55
56
  maxLength,
56
57
  autoHeight = false,
57
58
  rows: initialRows = 4,
59
+ ...restProps
58
60
  } = props
59
61
 
60
62
  const { visuallyHiddenProps } = useVisuallyHidden()
@@ -95,20 +97,24 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
95
97
  setCount(countCodePointsInString(props.value ?? ''))
96
98
  }, [props.value])
97
99
 
98
- const { inputProps, labelProps, descriptionProps, errorMessageProps } =
99
- useTextField(
100
- {
101
- inputElementType: 'textarea',
102
- isDisabled: disabled,
103
- isRequired: required,
104
- validationState: invalid ? 'invalid' : 'valid',
105
- description: !invalid && assistiveText,
106
- errorMessage: invalid && assistiveText,
107
- onChange: handleChange,
108
- ...props,
109
- },
110
- ariaRef
111
- )
100
+ const {
101
+ inputProps: ariaInputProps,
102
+ labelProps,
103
+ descriptionProps,
104
+ errorMessageProps,
105
+ } = useTextField(
106
+ {
107
+ inputElementType: 'textarea',
108
+ isDisabled: disabled,
109
+ isRequired: required,
110
+ validationState: invalid ? 'invalid' : 'valid',
111
+ description: !invalid && assistiveText,
112
+ errorMessage: invalid && assistiveText,
113
+ onChange: handleChange,
114
+ ...props,
115
+ },
116
+ ariaRef
117
+ )
112
118
 
113
119
  useEffect(() => {
114
120
  if (autoHeight && textareaRef.current !== null) {
@@ -120,6 +126,8 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
120
126
 
121
127
  useFocusWithClick(containerRef, ariaRef)
122
128
 
129
+ const inputProps = mergeProps(restProps, ariaInputProps)
130
+
123
131
  return (
124
132
  <TextFieldRoot className={className} isDisabled={disabled}>
125
133
  <TextFieldLabel
@@ -37,6 +37,26 @@ const Container = styled.div`
37
37
 
38
38
  export const Default = {}
39
39
 
40
+ export const Number: StoryObj<typeof TextField> = {
41
+ render: function Render(args) {
42
+ const [count, setCount] = useState(0)
43
+ return (
44
+ <Container>
45
+ <TextField
46
+ {...args}
47
+ type="number"
48
+ value={count.toString()}
49
+ onChange={(value) => setCount(parseInt(value))}
50
+ onWheel={(e) => {
51
+ e.currentTarget.blur()
52
+ e.stopPropagation()
53
+ }}
54
+ />
55
+ </Container>
56
+ )
57
+ },
58
+ }
59
+
40
60
  export const HasLabel = {
41
61
  args: {
42
62
  showLabel: true,
@@ -1201,6 +1201,281 @@ exports[`Storybook Tests TextField HasLabel 1`] = `
1201
1201
  </div>
1202
1202
  `;
1203
1203
 
1204
+ exports[`Storybook Tests TextField Number 1`] = `
1205
+ .c7 {
1206
+ cursor: pointer;
1207
+ -webkit-appearance: none;
1208
+ -moz-appearance: none;
1209
+ appearance: none;
1210
+ background: transparent;
1211
+ padding: 0;
1212
+ border-style: none;
1213
+ outline: none;
1214
+ color: inherit;
1215
+ text-rendering: inherit;
1216
+ -webkit-letter-spacing: inherit;
1217
+ -moz-letter-spacing: inherit;
1218
+ -ms-letter-spacing: inherit;
1219
+ letter-spacing: inherit;
1220
+ word-spacing: inherit;
1221
+ -webkit-text-decoration: none;
1222
+ text-decoration: none;
1223
+ font: inherit;
1224
+ margin: 0;
1225
+ overflow: visible;
1226
+ text-transform: none;
1227
+ }
1228
+
1229
+ .c7:disabled,
1230
+ .c7[aria-disabled]:not([aria-disabled=false]) {
1231
+ cursor: default;
1232
+ }
1233
+
1234
+ .c7:focus {
1235
+ outline: none;
1236
+ }
1237
+
1238
+ .c7::-moz-focus-inner {
1239
+ border-style: none;
1240
+ padding: 0;
1241
+ }
1242
+
1243
+ .c4 {
1244
+ font-size: 14px;
1245
+ line-height: 22px;
1246
+ font-weight: bold;
1247
+ display: flow-root;
1248
+ color: var(--charcoal-text1);
1249
+ }
1250
+
1251
+ .c4::before {
1252
+ display: block;
1253
+ width: 0;
1254
+ height: 0;
1255
+ content: '';
1256
+ margin-top: -4px;
1257
+ }
1258
+
1259
+ .c4::after {
1260
+ display: block;
1261
+ width: 0;
1262
+ height: 0;
1263
+ content: '';
1264
+ margin-bottom: -4px;
1265
+ }
1266
+
1267
+ .c6 {
1268
+ font-size: 14px;
1269
+ line-height: 22px;
1270
+ display: flow-root;
1271
+ color: var(--charcoal-text3);
1272
+ -webkit-transition: 0.2s color,0.2s box-shadow;
1273
+ transition: 0.2s color,0.2s box-shadow;
1274
+ }
1275
+
1276
+ .c6::before {
1277
+ display: block;
1278
+ width: 0;
1279
+ height: 0;
1280
+ content: '';
1281
+ margin-top: -4px;
1282
+ }
1283
+
1284
+ .c6::after {
1285
+ display: block;
1286
+ width: 0;
1287
+ height: 0;
1288
+ content: '';
1289
+ margin-bottom: -4px;
1290
+ }
1291
+
1292
+ .c6:not(:disabled):not([aria-disabled]):hover,
1293
+ .c6[aria-disabled='false']:hover {
1294
+ color: var(--charcoal-text3-hover);
1295
+ }
1296
+
1297
+ .c6:not(:disabled):not([aria-disabled]):active,
1298
+ .c6[aria-disabled='false']:active {
1299
+ color: var(--charcoal-text3-press);
1300
+ }
1301
+
1302
+ .c6:not(:disabled):not([aria-disabled]):active,
1303
+ .c6[aria-disabled='false']:active,
1304
+ .c6:not(:disabled):not([aria-disabled]):focus,
1305
+ .c6[aria-disabled='false']:focus,
1306
+ .c6:not(:disabled):not([aria-disabled]):focus-visible,
1307
+ .c6[aria-disabled='false']:focus-visible {
1308
+ outline: none;
1309
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1310
+ }
1311
+
1312
+ .c2 {
1313
+ display: -webkit-inline-box;
1314
+ display: -webkit-inline-flex;
1315
+ display: -ms-inline-flexbox;
1316
+ display: inline-flex;
1317
+ -webkit-align-items: center;
1318
+ -webkit-box-align: center;
1319
+ -ms-flex-align: center;
1320
+ align-items: center;
1321
+ }
1322
+
1323
+ .c2 > .c5 {
1324
+ margin-left: auto;
1325
+ }
1326
+
1327
+ .c1 {
1328
+ display: -webkit-box;
1329
+ display: -webkit-flex;
1330
+ display: -ms-flexbox;
1331
+ display: flex;
1332
+ -webkit-flex-direction: column;
1333
+ -ms-flex-direction: column;
1334
+ flex-direction: column;
1335
+ }
1336
+
1337
+ .c3 {
1338
+ margin-bottom: 8px;
1339
+ }
1340
+
1341
+ .c8 {
1342
+ display: grid;
1343
+ grid-template-columns: 1fr;
1344
+ height: 40px;
1345
+ -webkit-transition: 0.2s background-color,0.2s box-shadow;
1346
+ transition: 0.2s background-color,0.2s box-shadow;
1347
+ color: var(--charcoal-text2);
1348
+ background-color: var(--charcoal-surface3);
1349
+ border-radius: 4px;
1350
+ gap: 4px;
1351
+ padding: 0 8px;
1352
+ line-height: 22px;
1353
+ font-size: 14px;
1354
+ }
1355
+
1356
+ .c8:not(:disabled):not([aria-disabled]):hover,
1357
+ .c8 [aria-disabled='false']:hover {
1358
+ background-color: var(--charcoal-surface3-hover);
1359
+ }
1360
+
1361
+ .c8:focus-within {
1362
+ outline: none;
1363
+ box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1364
+ }
1365
+
1366
+ .c9 {
1367
+ border: none;
1368
+ box-sizing: border-box;
1369
+ outline: none;
1370
+ font-family: inherit;
1371
+ -webkit-transform-origin: top left;
1372
+ -ms-transform-origin: top left;
1373
+ transform-origin: top left;
1374
+ -webkit-transform: scale(0.875);
1375
+ -ms-transform: scale(0.875);
1376
+ transform: scale(0.875);
1377
+ width: calc(100% / 0.875);
1378
+ height: calc(100% / 0.875);
1379
+ font-size: calc(14px / 0.875);
1380
+ line-height: calc(22px / 0.875);
1381
+ padding-left: 0;
1382
+ padding-right: 0;
1383
+ border-radius: calc(4px / 0.875);
1384
+ -webkit-appearance: none;
1385
+ -moz-appearance: none;
1386
+ appearance: none;
1387
+ background: transparent;
1388
+ color: var(--charcoal-text2);
1389
+ }
1390
+
1391
+ .c9::-webkit-input-placeholder {
1392
+ color: var(--charcoal-text3);
1393
+ }
1394
+
1395
+ .c9::-moz-placeholder {
1396
+ color: var(--charcoal-text3);
1397
+ }
1398
+
1399
+ .c9:-ms-input-placeholder {
1400
+ color: var(--charcoal-text3);
1401
+ }
1402
+
1403
+ .c9::placeholder {
1404
+ color: var(--charcoal-text3);
1405
+ }
1406
+
1407
+ .c0 {
1408
+ display: grid;
1409
+ gap: 24px;
1410
+ }
1411
+
1412
+ <div
1413
+ data-dark={false}
1414
+ >
1415
+ <div
1416
+ className="c0"
1417
+ >
1418
+ <div
1419
+ className="c1"
1420
+ >
1421
+ <div
1422
+ className="c2 c3"
1423
+ style={
1424
+ Object {
1425
+ "border": 0,
1426
+ "clip": "rect(0 0 0 0)",
1427
+ "clipPath": "inset(50%)",
1428
+ "height": "1px",
1429
+ "margin": "-1px",
1430
+ "overflow": "hidden",
1431
+ "padding": 0,
1432
+ "position": "absolute",
1433
+ "whiteSpace": "nowrap",
1434
+ "width": "1px",
1435
+ }
1436
+ }
1437
+ >
1438
+ <label
1439
+ className="c4"
1440
+ htmlFor="test-id"
1441
+ id="test-id"
1442
+ >
1443
+ Label
1444
+ </label>
1445
+ <div
1446
+ className="c5 c6"
1447
+ >
1448
+ <span>
1449
+ <button
1450
+ className="c7"
1451
+ >
1452
+ Text Link
1453
+ </button>
1454
+ </span>
1455
+ </div>
1456
+ </div>
1457
+ <div
1458
+ className="c8"
1459
+ >
1460
+ <input
1461
+ aria-labelledby="test-id"
1462
+ className="c9"
1463
+ disabled={false}
1464
+ id="test-id"
1465
+ onChange={[Function]}
1466
+ onWheel={[Function]}
1467
+ placeholder="TextField"
1468
+ readOnly={false}
1469
+ required={false}
1470
+ type="number"
1471
+ value="0"
1472
+ />
1473
+ </div>
1474
+ </div>
1475
+ </div>
1476
+ </div>
1477
+ `;
1478
+
1204
1479
  exports[`Storybook Tests TextField PrefixIcon 1`] = `
1205
1480
  .c6 {
1206
1481
  cursor: pointer;
@@ -1352,11 +1627,13 @@ exports[`Storybook Tests TextField PrefixIcon 1`] = `
1352
1627
 
1353
1628
  .c12:not(:disabled):not([aria-disabled]):hover,
1354
1629
  .c12[aria-disabled='false']:hover {
1630
+ color: var(--charcoal-text5-hover);
1355
1631
  background-color: var(--charcoal-surface4-hover);
1356
1632
  }
1357
1633
 
1358
1634
  .c12:not(:disabled):not([aria-disabled]):active,
1359
1635
  .c12[aria-disabled='false']:active {
1636
+ color: var(--charcoal-text5-press);
1360
1637
  background-color: var(--charcoal-surface4-press);
1361
1638
  }
1362
1639