@charcoal-ui/react 4.0.0-beta.1 → 4.0.0-beta.12

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 (266) hide show
  1. package/README.md +1 -1
  2. package/dist/_lib/compat.d.ts +0 -12
  3. package/dist/_lib/compat.d.ts.map +1 -1
  4. package/dist/_lib/createDivComponent.d.ts +4 -0
  5. package/dist/_lib/createDivComponent.d.ts.map +1 -0
  6. package/dist/_lib/useClassNames.d.ts +2 -2
  7. package/dist/_lib/useClassNames.d.ts.map +1 -1
  8. package/dist/components/Button/index.d.ts +5 -1
  9. package/dist/components/Button/index.d.ts.map +1 -1
  10. package/dist/components/Checkbox/CheckboxInput/index.d.ts +11 -0
  11. package/dist/components/Checkbox/CheckboxInput/index.d.ts.map +1 -0
  12. package/dist/components/Checkbox/CheckboxWithLabel.d.ts +9 -0
  13. package/dist/components/Checkbox/CheckboxWithLabel.d.ts.map +1 -0
  14. package/dist/components/Checkbox/index.d.ts +12 -21
  15. package/dist/components/Checkbox/index.d.ts.map +1 -1
  16. package/dist/components/Clickable/index.d.ts +9 -15
  17. package/dist/components/Clickable/index.d.ts.map +1 -1
  18. package/dist/components/DropdownSelector/Divider/index.d.ts +3 -0
  19. package/dist/components/DropdownSelector/Divider/index.d.ts.map +1 -0
  20. package/dist/components/DropdownSelector/DropdownMenuItem/index.d.ts +8 -0
  21. package/dist/components/DropdownSelector/DropdownMenuItem/index.d.ts.map +1 -0
  22. package/dist/components/DropdownSelector/DropdownPopover.d.ts.map +1 -1
  23. package/dist/components/DropdownSelector/ListItem/index.d.ts +5 -13
  24. package/dist/components/DropdownSelector/ListItem/index.d.ts.map +1 -1
  25. package/dist/components/DropdownSelector/MenuItem/index.d.ts +10 -3
  26. package/dist/components/DropdownSelector/MenuItem/index.d.ts.map +1 -1
  27. package/dist/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.d.ts +1 -1
  28. package/dist/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.d.ts.map +1 -1
  29. package/dist/components/DropdownSelector/MenuItemGroup/index.d.ts +1 -3
  30. package/dist/components/DropdownSelector/MenuItemGroup/index.d.ts.map +1 -1
  31. package/dist/components/DropdownSelector/MenuList/index.d.ts +1 -4
  32. package/dist/components/DropdownSelector/MenuList/index.d.ts.map +1 -1
  33. package/dist/components/DropdownSelector/Popover/index.d.ts +2 -2
  34. package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
  35. package/dist/components/DropdownSelector/index.d.ts +3 -1
  36. package/dist/components/DropdownSelector/index.d.ts.map +1 -1
  37. package/dist/components/FieldLabel/index.d.ts +1 -0
  38. package/dist/components/FieldLabel/index.d.ts.map +1 -1
  39. package/dist/components/IconButton/index.d.ts +6 -5
  40. package/dist/components/IconButton/index.d.ts.map +1 -1
  41. package/dist/components/LoadingSpinner/index.d.ts +1 -0
  42. package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
  43. package/dist/components/Modal/Dialog/index.d.ts +6 -24
  44. package/dist/components/Modal/Dialog/index.d.ts.map +1 -1
  45. package/dist/components/Modal/ModalPlumbing.d.ts +10 -3
  46. package/dist/components/Modal/ModalPlumbing.d.ts.map +1 -1
  47. package/dist/components/Modal/index.d.ts +6 -2
  48. package/dist/components/Modal/index.d.ts.map +1 -1
  49. package/dist/components/Modal/useCustomModalOverlay.d.ts +1 -0
  50. package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -1
  51. package/dist/components/Radio/RadioGroup/index.d.ts +20 -0
  52. package/dist/components/Radio/RadioGroup/index.d.ts.map +1 -0
  53. package/dist/components/Radio/RadioGroupContext.d.ts +11 -0
  54. package/dist/components/Radio/RadioGroupContext.d.ts.map +1 -0
  55. package/dist/components/Radio/RadioInput/index.d.ts +10 -0
  56. package/dist/components/Radio/RadioInput/index.d.ts.map +1 -0
  57. package/dist/components/Radio/index.d.ts +1 -14
  58. package/dist/components/Radio/index.d.ts.map +1 -1
  59. package/dist/components/SegmentedControl/index.d.ts +1 -0
  60. package/dist/components/SegmentedControl/index.d.ts.map +1 -1
  61. package/dist/components/Switch/SwitchInput/index.d.ts +9 -0
  62. package/dist/components/Switch/SwitchInput/index.d.ts.map +1 -0
  63. package/dist/components/Switch/SwitchWithLabel.d.ts +9 -0
  64. package/dist/components/Switch/SwitchWithLabel.d.ts.map +1 -0
  65. package/dist/components/Switch/index.d.ts +4 -15
  66. package/dist/components/Switch/index.d.ts.map +1 -1
  67. package/dist/components/TagItem/index.d.ts +10 -15
  68. package/dist/components/TagItem/index.d.ts.map +1 -1
  69. package/dist/components/TextArea/index.d.ts +29 -18
  70. package/dist/components/TextArea/index.d.ts.map +1 -1
  71. package/dist/components/TextField/AssistiveText/index.d.ts +5 -0
  72. package/dist/components/TextField/AssistiveText/index.d.ts.map +1 -0
  73. package/dist/components/TextField/index.d.ts +33 -22
  74. package/dist/components/TextField/index.d.ts.map +1 -1
  75. package/dist/core/CharcoalProvider.d.ts +4 -11
  76. package/dist/core/CharcoalProvider.d.ts.map +1 -1
  77. package/dist/core/SSRProvider.d.ts +3 -1
  78. package/dist/core/SSRProvider.d.ts.map +1 -1
  79. package/dist/index.cjs.js +575 -1255
  80. package/dist/index.cjs.js.map +1 -1
  81. package/dist/index.css +1097 -3
  82. package/dist/index.css.map +1 -1
  83. package/dist/index.d.ts +4 -5
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.esm.js +554 -1231
  86. package/dist/index.esm.js.map +1 -1
  87. package/package.json +22 -24
  88. package/src/README.mdx +68 -0
  89. package/src/SSR.mdx +67 -0
  90. package/src/_lib/compat.ts +0 -11
  91. package/src/_lib/createDivComponent.tsx +11 -0
  92. package/src/_lib/index.ts +1 -1
  93. package/src/_lib/useClassNames.ts +3 -9
  94. package/src/components/Button/__snapshots__/index.story.storyshot +18 -56
  95. package/src/components/Button/index.css +2 -3
  96. package/src/components/Button/index.story.tsx +14 -67
  97. package/src/components/Button/index.tsx +7 -3
  98. package/src/components/Checkbox/CheckboxInput/__snapshots__/index.story.storyshot +77 -0
  99. package/src/components/Checkbox/CheckboxInput/index.css +110 -0
  100. package/src/components/Checkbox/CheckboxInput/index.story.tsx +51 -0
  101. package/src/components/Checkbox/CheckboxInput/index.tsx +47 -0
  102. package/src/components/Checkbox/CheckboxWithLabel.tsx +24 -0
  103. package/src/components/Checkbox/__snapshots__/index.story.storyshot +103 -538
  104. package/src/components/Checkbox/index.css +21 -0
  105. package/src/components/Checkbox/index.story.tsx +49 -79
  106. package/src/components/Checkbox/index.tsx +32 -162
  107. package/src/components/Clickable/__snapshots__/index.story.storyshot +4 -80
  108. package/src/components/Clickable/index.css +41 -0
  109. package/src/components/Clickable/index.story.tsx +2 -2
  110. package/src/components/Clickable/index.tsx +19 -84
  111. package/src/components/DropdownSelector/Divider/index.css +11 -0
  112. package/src/components/DropdownSelector/Divider/index.tsx +5 -0
  113. package/src/components/DropdownSelector/DropdownMenuItem/index.css +20 -0
  114. package/src/components/DropdownSelector/DropdownMenuItem/index.tsx +34 -0
  115. package/src/components/DropdownSelector/DropdownPopover.tsx +16 -9
  116. package/src/components/DropdownSelector/ListItem/__snapshots__/index.story.storyshot +41 -224
  117. package/src/components/DropdownSelector/ListItem/index.css +24 -0
  118. package/src/components/DropdownSelector/ListItem/index.story.tsx +12 -6
  119. package/src/components/DropdownSelector/ListItem/index.tsx +14 -53
  120. package/src/components/DropdownSelector/MenuItem/index.tsx +17 -12
  121. package/src/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.tsx +2 -2
  122. package/src/components/DropdownSelector/MenuItemGroup/index.css +19 -0
  123. package/src/components/DropdownSelector/MenuItemGroup/index.tsx +6 -28
  124. package/src/components/DropdownSelector/MenuList/__snapshots__/index.story.storyshot +162 -416
  125. package/src/components/DropdownSelector/MenuList/index.css +4 -0
  126. package/src/components/DropdownSelector/MenuList/index.story.tsx +1 -1
  127. package/src/components/DropdownSelector/MenuList/index.tsx +4 -12
  128. package/src/components/DropdownSelector/Popover/__snapshots__/index.story.storyshot +1 -1
  129. package/src/components/DropdownSelector/Popover/index.css +11 -0
  130. package/src/components/DropdownSelector/Popover/index.story.tsx +1 -1
  131. package/src/components/DropdownSelector/Popover/index.tsx +7 -17
  132. package/src/components/DropdownSelector/__snapshots__/index.story.storyshot +432 -2458
  133. package/src/components/DropdownSelector/index.css +84 -0
  134. package/src/components/DropdownSelector/index.story.tsx +2 -6
  135. package/src/components/DropdownSelector/index.tsx +61 -137
  136. package/src/components/FieldLabel/index.css +35 -0
  137. package/src/components/FieldLabel/index.tsx +15 -105
  138. package/src/components/Icon/__snapshots__/index.story.storyshot +1 -1
  139. package/src/components/Icon/index.story.tsx +1 -1
  140. package/src/components/IconButton/__snapshots__/index.story.storyshot +19 -297
  141. package/src/components/IconButton/index.css +118 -0
  142. package/src/components/IconButton/index.story.tsx +17 -40
  143. package/src/components/IconButton/index.tsx +38 -118
  144. package/src/components/LoadingSpinner/__snapshots__/LoadingSpinnerIcon.story.storyshot +2 -17
  145. package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +80 -30
  146. package/src/components/LoadingSpinner/index.css +42 -0
  147. package/src/components/LoadingSpinner/index.story.tsx +19 -8
  148. package/src/components/LoadingSpinner/index.tsx +26 -52
  149. package/src/components/Modal/Dialog/index.css +44 -0
  150. package/src/components/Modal/Dialog/index.tsx +14 -57
  151. package/src/components/Modal/ModalPlumbing.css +40 -0
  152. package/src/components/Modal/ModalPlumbing.tsx +13 -61
  153. package/src/components/Modal/__snapshots__/index.story.storyshot +289 -2212
  154. package/src/components/Modal/index.css +36 -0
  155. package/src/components/Modal/index.story.tsx +28 -13
  156. package/src/components/Modal/index.tsx +42 -78
  157. package/src/components/Modal/useCustomModalOverlay.tsx +19 -4
  158. package/src/components/Radio/RadioGroup/index.css +5 -0
  159. package/src/components/Radio/RadioGroup/index.tsx +80 -0
  160. package/src/components/Radio/RadioGroupContext.ts +23 -0
  161. package/src/components/Radio/RadioInput/index.css +82 -0
  162. package/src/components/Radio/RadioInput/index.tsx +41 -0
  163. package/src/components/Radio/__snapshots__/index.story.storyshot +111 -855
  164. package/src/components/Radio/index.css +18 -0
  165. package/src/components/Radio/index.story.tsx +47 -40
  166. package/src/components/Radio/index.test.tsx +22 -29
  167. package/src/components/Radio/index.tsx +16 -208
  168. package/src/components/SegmentedControl/__snapshots__/index.story.storyshot +32 -262
  169. package/src/components/SegmentedControl/index.css +50 -0
  170. package/src/components/SegmentedControl/index.story.tsx +1 -1
  171. package/src/components/SegmentedControl/index.tsx +20 -89
  172. package/src/components/Switch/SwitchInput/index.css +82 -0
  173. package/src/components/Switch/SwitchInput/index.tsx +40 -0
  174. package/src/components/Switch/SwitchWithLabel.tsx +24 -0
  175. package/src/components/Switch/__snapshots__/index.story.storyshot +35 -539
  176. package/src/components/Switch/index.css +23 -0
  177. package/src/components/Switch/index.story.tsx +16 -19
  178. package/src/components/Switch/index.tsx +43 -140
  179. package/src/components/TagItem/__snapshots__/index.story.storyshot +212 -1063
  180. package/src/components/TagItem/index.css +140 -0
  181. package/src/components/TagItem/index.story.tsx +45 -162
  182. package/src/components/TagItem/index.tsx +72 -220
  183. package/src/components/TextArea/TextArea.story.tsx +63 -25
  184. package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +615 -1055
  185. package/src/components/TextArea/index.css +78 -0
  186. package/src/components/TextArea/index.tsx +83 -174
  187. package/src/components/TextField/AssistiveText/index.css +10 -0
  188. package/src/components/TextField/AssistiveText/index.tsx +6 -0
  189. package/src/components/TextField/TextField.story.tsx +85 -76
  190. package/src/components/TextField/__snapshots__/TextField.story.storyshot +631 -1709
  191. package/src/components/TextField/index.css +87 -0
  192. package/src/components/TextField/index.tsx +92 -211
  193. package/src/core/CharcoalProvider.tsx +5 -29
  194. package/src/core/SSRProvider.tsx +12 -1
  195. package/src/index.ts +7 -19
  196. package/src/type.d.ts +3 -8
  197. package/dist/components/Button/index.story.d.ts +0 -24
  198. package/dist/components/Button/index.story.d.ts.map +0 -1
  199. package/dist/components/Checkbox/index.story.d.ts +0 -8
  200. package/dist/components/Checkbox/index.story.d.ts.map +0 -1
  201. package/dist/components/Clickable/index.story.d.ts +0 -6
  202. package/dist/components/Clickable/index.story.d.ts.map +0 -1
  203. package/dist/components/DropdownSelector/Divider.d.ts +0 -7
  204. package/dist/components/DropdownSelector/Divider.d.ts.map +0 -1
  205. package/dist/components/DropdownSelector/DropdownMenuItem.d.ts +0 -7
  206. package/dist/components/DropdownSelector/DropdownMenuItem.d.ts.map +0 -1
  207. package/dist/components/DropdownSelector/ListItem/index.story.d.ts +0 -9
  208. package/dist/components/DropdownSelector/ListItem/index.story.d.ts.map +0 -1
  209. package/dist/components/DropdownSelector/MenuList/index.story.d.ts +0 -8
  210. package/dist/components/DropdownSelector/MenuList/index.story.d.ts.map +0 -1
  211. package/dist/components/DropdownSelector/Popover/index.story.d.ts +0 -5
  212. package/dist/components/DropdownSelector/Popover/index.story.d.ts.map +0 -1
  213. package/dist/components/DropdownSelector/index.story.d.ts +0 -19
  214. package/dist/components/DropdownSelector/index.story.d.ts.map +0 -1
  215. package/dist/components/Icon/index.story.d.ts +0 -6
  216. package/dist/components/Icon/index.story.d.ts.map +0 -1
  217. package/dist/components/IconButton/index.story.d.ts +0 -9
  218. package/dist/components/IconButton/index.story.d.ts.map +0 -1
  219. package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts +0 -8
  220. package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts.map +0 -1
  221. package/dist/components/LoadingSpinner/index.story.d.ts +0 -6
  222. package/dist/components/LoadingSpinner/index.story.d.ts.map +0 -1
  223. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts +0 -4
  224. package/dist/components/Modal/__stories__/InternalScrollStory.d.ts.map +0 -1
  225. package/dist/components/Modal/index.story.d.ts +0 -21
  226. package/dist/components/Modal/index.story.d.ts.map +0 -1
  227. package/dist/components/MultiSelect/context.d.ts +0 -14
  228. package/dist/components/MultiSelect/context.d.ts.map +0 -1
  229. package/dist/components/MultiSelect/index.d.ts +0 -36
  230. package/dist/components/MultiSelect/index.d.ts.map +0 -1
  231. package/dist/components/MultiSelect/index.story.d.ts +0 -82
  232. package/dist/components/MultiSelect/index.story.d.ts.map +0 -1
  233. package/dist/components/MultiSelect/index.test.d.ts +0 -2
  234. package/dist/components/MultiSelect/index.test.d.ts.map +0 -1
  235. package/dist/components/Radio/index.story.d.ts +0 -26
  236. package/dist/components/Radio/index.story.d.ts.map +0 -1
  237. package/dist/components/Radio/index.test.d.ts +0 -2
  238. package/dist/components/Radio/index.test.d.ts.map +0 -1
  239. package/dist/components/SegmentedControl/index.story.d.ts +0 -7
  240. package/dist/components/SegmentedControl/index.story.d.ts.map +0 -1
  241. package/dist/components/Switch/index.story.d.ts +0 -9
  242. package/dist/components/Switch/index.story.d.ts.map +0 -1
  243. package/dist/components/TagItem/index.story.d.ts +0 -16
  244. package/dist/components/TagItem/index.story.d.ts.map +0 -1
  245. package/dist/components/TextArea/TextArea.story.d.ts +0 -9
  246. package/dist/components/TextArea/TextArea.story.d.ts.map +0 -1
  247. package/dist/components/TextField/TextField.story.d.ts +0 -22
  248. package/dist/components/TextField/TextField.story.d.ts.map +0 -1
  249. package/dist/components/a11y.test.d.ts +0 -2
  250. package/dist/components/a11y.test.d.ts.map +0 -1
  251. package/dist/core/ComponentAbstraction.d.ts +0 -24
  252. package/dist/core/ComponentAbstraction.d.ts.map +0 -1
  253. package/dist/styled.d.ts +0 -95
  254. package/dist/styled.d.ts.map +0 -1
  255. package/src/components/DropdownSelector/Divider.tsx +0 -16
  256. package/src/components/DropdownSelector/DropdownMenuItem.tsx +0 -43
  257. package/src/components/LoadingSpinner/LoadingSpinnerIcon.story.tsx +0 -13
  258. package/src/components/Modal/__stories__/InternalScrollStory.tsx +0 -75
  259. package/src/components/MultiSelect/__snapshots__/index.story.storyshot +0 -1066
  260. package/src/components/MultiSelect/context.ts +0 -23
  261. package/src/components/MultiSelect/index.story.tsx +0 -216
  262. package/src/components/MultiSelect/index.test.tsx +0 -263
  263. package/src/components/MultiSelect/index.tsx +0 -281
  264. package/src/components/a11y.test.tsx +0 -99
  265. package/src/core/ComponentAbstraction.tsx +0 -48
  266. package/src/styled.ts +0 -3
@@ -1,1786 +1,733 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`Storybook Tests TextField Default 1`] = `
4
- .c7 {
5
- cursor: pointer;
6
- -webkit-appearance: none;
7
- -moz-appearance: none;
8
- appearance: none;
9
- background: transparent;
10
- padding: 0;
11
- border-style: none;
12
- outline: none;
13
- color: inherit;
14
- text-rendering: inherit;
15
- -webkit-letter-spacing: inherit;
16
- -moz-letter-spacing: inherit;
17
- -ms-letter-spacing: inherit;
18
- letter-spacing: inherit;
19
- word-spacing: inherit;
20
- -webkit-text-decoration: none;
21
- text-decoration: none;
22
- font: inherit;
23
- margin: 0;
24
- overflow: visible;
25
- text-transform: none;
26
- }
27
-
28
- .c7:disabled,
29
- .c7[aria-disabled]:not([aria-disabled=false]) {
30
- cursor: default;
31
- }
32
-
33
- .c7:focus {
34
- outline: none;
35
- }
36
-
37
- .c7::-moz-focus-inner {
38
- border-style: none;
39
- padding: 0;
40
- }
41
-
42
- .c4 {
43
- font-size: 14px;
44
- line-height: 22px;
45
- font-weight: bold;
46
- display: flow-root;
47
- color: var(--charcoal-text1);
48
- }
49
-
50
- .c4::before {
51
- display: block;
52
- width: 0;
53
- height: 0;
54
- content: '';
55
- margin-top: -4px;
56
- }
57
-
58
- .c4::after {
59
- display: block;
60
- width: 0;
61
- height: 0;
62
- content: '';
63
- margin-bottom: -4px;
64
- }
65
-
66
- .c6 {
67
- font-size: 14px;
68
- line-height: 22px;
69
- display: flow-root;
70
- color: var(--charcoal-text3);
71
- -webkit-transition: 0.2s color,0.2s box-shadow;
72
- transition: 0.2s color,0.2s box-shadow;
73
- }
74
-
75
- .c6::before {
76
- display: block;
77
- width: 0;
78
- height: 0;
79
- content: '';
80
- margin-top: -4px;
81
- }
82
-
83
- .c6::after {
84
- display: block;
85
- width: 0;
86
- height: 0;
87
- content: '';
88
- margin-bottom: -4px;
89
- }
90
-
91
- .c6:not(:disabled):not([aria-disabled]):hover,
92
- .c6[aria-disabled='false']:hover {
93
- color: var(--charcoal-text3-hover);
94
- }
95
-
96
- .c6:not(:disabled):not([aria-disabled]):active,
97
- .c6[aria-disabled='false']:active {
98
- color: var(--charcoal-text3-press);
99
- }
100
-
101
- .c6:not(:disabled):not([aria-disabled]):active,
102
- .c6[aria-disabled='false']:active,
103
- .c6:not(:disabled):not([aria-disabled]):focus,
104
- .c6[aria-disabled='false']:focus,
105
- .c6:not(:disabled):not([aria-disabled]):focus-visible,
106
- .c6[aria-disabled='false']:focus-visible {
107
- outline: none;
108
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
109
- }
110
-
111
- .c2 {
112
- display: -webkit-inline-box;
113
- display: -webkit-inline-flex;
114
- display: -ms-inline-flexbox;
115
- display: inline-flex;
116
- -webkit-align-items: center;
117
- -webkit-box-align: center;
118
- -ms-flex-align: center;
119
- align-items: center;
120
- }
121
-
122
- .c2 > .c5 {
123
- margin-left: auto;
124
- }
125
-
126
- .c1 {
127
- display: -webkit-box;
128
- display: -webkit-flex;
129
- display: -ms-flexbox;
130
- display: flex;
131
- -webkit-flex-direction: column;
132
- -ms-flex-direction: column;
133
- flex-direction: column;
134
- }
135
-
136
- .c3 {
137
- margin-bottom: 8px;
138
- }
139
-
140
- .c8 {
141
- display: grid;
142
- grid-template-columns: 1fr;
143
- height: 40px;
144
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
145
- transition: 0.2s background-color,0.2s box-shadow;
146
- color: var(--charcoal-text2);
147
- background-color: var(--charcoal-surface3);
148
- border-radius: 4px;
149
- gap: 4px;
150
- padding: 0 8px;
151
- line-height: 22px;
152
- font-size: 14px;
153
- }
154
-
155
- .c8:not(:disabled):not([aria-disabled]):hover,
156
- .c8 [aria-disabled='false']:hover {
157
- background-color: var(--charcoal-surface3-hover);
158
- }
159
-
160
- .c8:focus-within {
161
- outline: none;
162
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
163
- }
164
-
165
- .c9 {
166
- border: none;
167
- box-sizing: border-box;
168
- outline: none;
169
- font-family: inherit;
170
- -webkit-transform-origin: top left;
171
- -ms-transform-origin: top left;
172
- transform-origin: top left;
173
- -webkit-transform: scale(0.875);
174
- -ms-transform: scale(0.875);
175
- transform: scale(0.875);
176
- width: calc(100% / 0.875);
177
- height: calc(100% / 0.875);
178
- font-size: calc(14px / 0.875);
179
- line-height: calc(22px / 0.875);
180
- padding-left: 0;
181
- padding-right: 0;
182
- border-radius: calc(4px / 0.875);
183
- -webkit-appearance: none;
184
- -moz-appearance: none;
185
- appearance: none;
186
- background: transparent;
187
- color: var(--charcoal-text2);
188
- }
189
-
190
- .c9::-webkit-input-placeholder {
191
- color: var(--charcoal-text3);
192
- }
193
-
194
- .c9::-moz-placeholder {
195
- color: var(--charcoal-text3);
196
- }
197
-
198
- .c9:-ms-input-placeholder {
199
- color: var(--charcoal-text3);
200
- }
201
-
202
- .c9::placeholder {
203
- color: var(--charcoal-text3);
204
- }
205
-
206
- .c0 {
207
- display: grid;
208
- gap: 24px;
209
- }
210
-
3
+ exports[`Storybook Tests > react/TextField > Affix 1`] = `
211
4
  <div
212
5
  data-dark={false}
213
6
  >
214
7
  <div
215
- className="c0"
8
+ aria-disabled={false}
9
+ className="charcoal-text-field-root"
216
10
  >
217
11
  <div
218
- className="c1"
12
+ className="charcoal-field-label-root"
13
+ style={
14
+ Object {
15
+ "border": 0,
16
+ "clip": "rect(0 0 0 0)",
17
+ "clipPath": "inset(50%)",
18
+ "height": "1px",
19
+ "margin": "-1px",
20
+ "overflow": "hidden",
21
+ "padding": 0,
22
+ "position": "absolute",
23
+ "whiteSpace": "nowrap",
24
+ "width": "1px",
25
+ }
26
+ }
219
27
  >
28
+ <label
29
+ className="charcoal-field-label"
30
+ htmlFor="test-id"
31
+ id="test-id"
32
+ >
33
+ Label
34
+ </label>
220
35
  <div
221
- className="c2 c3"
222
- style={
223
- Object {
224
- "border": 0,
225
- "clip": "rect(0 0 0 0)",
226
- "clipPath": "inset(50%)",
227
- "height": "1px",
228
- "margin": "-1px",
229
- "overflow": "hidden",
230
- "padding": 0,
231
- "position": "absolute",
232
- "whiteSpace": "nowrap",
233
- "width": "1px",
234
- }
235
- }
36
+ className="charcoal-field-label-sub-label"
236
37
  >
237
- <label
238
- className="c4"
239
- htmlFor="test-id"
240
- id="test-id"
241
- >
242
- Label
243
- </label>
244
- <div
245
- className="c5 c6"
246
- >
247
- <span>
248
- <button
249
- className="c7"
250
- >
251
- Text Link
252
- </button>
253
- </span>
254
- </div>
38
+ <span />
255
39
  </div>
40
+ </div>
41
+ <div
42
+ className="charcoal-text-field-container"
43
+ data-invalid={false}
44
+ >
256
45
  <div
257
- className="c8"
46
+ className="charcoal-text-field-prefix"
258
47
  >
259
- <input
260
- aria-labelledby="test-id"
261
- className="c9"
262
- disabled={false}
263
- id="test-id"
264
- onChange={[Function]}
265
- placeholder="TextField"
266
- readOnly={false}
267
- required={false}
268
- type="text"
269
- value=""
270
- />
48
+ /home/john/
49
+ </div>
50
+ <input
51
+ aria-labelledby="test-id"
52
+ className="charcoal-text-field-input"
53
+ data-invalid={false}
54
+ disabled={false}
55
+ id="test-id"
56
+ onChange={[Function]}
57
+ type="text"
58
+ />
59
+ <div
60
+ className="charcoal-text-field-suffix"
61
+ >
62
+ .png
271
63
  </div>
272
64
  </div>
273
65
  </div>
274
66
  </div>
275
67
  `;
276
68
 
277
- exports[`Storybook Tests TextField HasAffix 1`] = `
278
- .c7 {
279
- cursor: pointer;
280
- -webkit-appearance: none;
281
- -moz-appearance: none;
282
- appearance: none;
283
- background: transparent;
284
- padding: 0;
285
- border-style: none;
286
- outline: none;
287
- color: inherit;
288
- text-rendering: inherit;
289
- -webkit-letter-spacing: inherit;
290
- -moz-letter-spacing: inherit;
291
- -ms-letter-spacing: inherit;
292
- letter-spacing: inherit;
293
- word-spacing: inherit;
294
- -webkit-text-decoration: none;
295
- text-decoration: none;
296
- font: inherit;
297
- margin: 0;
298
- overflow: visible;
299
- text-transform: none;
300
- }
301
-
302
- .c7:disabled,
303
- .c7[aria-disabled]:not([aria-disabled=false]) {
304
- cursor: default;
305
- }
306
-
307
- .c7:focus {
308
- outline: none;
309
- }
310
-
311
- .c7::-moz-focus-inner {
312
- border-style: none;
313
- padding: 0;
314
- }
315
-
316
- .c4 {
317
- font-size: 14px;
318
- line-height: 22px;
319
- font-weight: bold;
320
- display: flow-root;
321
- color: var(--charcoal-text1);
322
- }
323
-
324
- .c4::before {
325
- display: block;
326
- width: 0;
327
- height: 0;
328
- content: '';
329
- margin-top: -4px;
330
- }
331
-
332
- .c4::after {
333
- display: block;
334
- width: 0;
335
- height: 0;
336
- content: '';
337
- margin-bottom: -4px;
338
- }
339
-
340
- .c6 {
341
- font-size: 14px;
342
- line-height: 22px;
343
- display: flow-root;
344
- color: var(--charcoal-text3);
345
- -webkit-transition: 0.2s color,0.2s box-shadow;
346
- transition: 0.2s color,0.2s box-shadow;
347
- }
348
-
349
- .c6::before {
350
- display: block;
351
- width: 0;
352
- height: 0;
353
- content: '';
354
- margin-top: -4px;
355
- }
356
-
357
- .c6::after {
358
- display: block;
359
- width: 0;
360
- height: 0;
361
- content: '';
362
- margin-bottom: -4px;
363
- }
364
-
365
- .c6:not(:disabled):not([aria-disabled]):hover,
366
- .c6[aria-disabled='false']:hover {
367
- color: var(--charcoal-text3-hover);
368
- }
369
-
370
- .c6:not(:disabled):not([aria-disabled]):active,
371
- .c6[aria-disabled='false']:active {
372
- color: var(--charcoal-text3-press);
373
- }
374
-
375
- .c6:not(:disabled):not([aria-disabled]):active,
376
- .c6[aria-disabled='false']:active,
377
- .c6:not(:disabled):not([aria-disabled]):focus,
378
- .c6[aria-disabled='false']:focus,
379
- .c6:not(:disabled):not([aria-disabled]):focus-visible,
380
- .c6[aria-disabled='false']:focus-visible {
381
- outline: none;
382
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
383
- }
384
-
385
- .c2 {
386
- display: -webkit-inline-box;
387
- display: -webkit-inline-flex;
388
- display: -ms-inline-flexbox;
389
- display: inline-flex;
390
- -webkit-align-items: center;
391
- -webkit-box-align: center;
392
- -ms-flex-align: center;
393
- align-items: center;
394
- }
395
-
396
- .c2 > .c5 {
397
- margin-left: auto;
398
- }
399
-
400
- .c1 {
401
- display: -webkit-box;
402
- display: -webkit-flex;
403
- display: -ms-flexbox;
404
- display: flex;
405
- -webkit-flex-direction: column;
406
- -ms-flex-direction: column;
407
- flex-direction: column;
408
- }
409
-
410
- .c3 {
411
- margin-bottom: 8px;
412
- }
413
-
414
- .c8 {
415
- display: grid;
416
- grid-template-columns: auto 1fr auto;
417
- height: 40px;
418
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
419
- transition: 0.2s background-color,0.2s box-shadow;
420
- color: var(--charcoal-text2);
421
- background-color: var(--charcoal-surface3);
422
- border-radius: 4px;
423
- gap: 4px;
424
- padding: 0 8px;
425
- line-height: 22px;
426
- font-size: 14px;
427
- }
428
-
429
- .c8:not(:disabled):not([aria-disabled]):hover,
430
- .c8 [aria-disabled='false']:hover {
431
- background-color: var(--charcoal-surface3-hover);
432
- }
433
-
434
- .c8:focus-within {
435
- outline: none;
436
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
437
- }
438
-
439
- .c9 {
440
- display: -webkit-box;
441
- display: -webkit-flex;
442
- display: -ms-flexbox;
443
- display: flex;
444
- -webkit-align-items: center;
445
- -webkit-box-align: center;
446
- -ms-flex-align: center;
447
- align-items: center;
448
- }
449
-
450
- .c11 {
451
- display: -webkit-box;
452
- display: -webkit-flex;
453
- display: -ms-flexbox;
454
- display: flex;
455
- -webkit-align-items: center;
456
- -webkit-box-align: center;
457
- -ms-flex-align: center;
458
- align-items: center;
459
- gap: 8px;
460
- }
461
-
462
- .c10 {
463
- border: none;
464
- box-sizing: border-box;
465
- outline: none;
466
- font-family: inherit;
467
- -webkit-transform-origin: top left;
468
- -ms-transform-origin: top left;
469
- transform-origin: top left;
470
- -webkit-transform: scale(0.875);
471
- -ms-transform: scale(0.875);
472
- transform: scale(0.875);
473
- width: calc(100% / 0.875);
474
- height: calc(100% / 0.875);
475
- font-size: calc(14px / 0.875);
476
- line-height: calc(22px / 0.875);
477
- padding-left: 0;
478
- padding-right: 0;
479
- border-radius: calc(4px / 0.875);
480
- -webkit-appearance: none;
481
- -moz-appearance: none;
482
- appearance: none;
483
- background: transparent;
484
- color: var(--charcoal-text2);
485
- }
486
-
487
- .c10::-webkit-input-placeholder {
488
- color: var(--charcoal-text3);
489
- }
69
+ exports[`Storybook Tests > react/TextField > AssistiveText 1`] = `
70
+ <div
71
+ data-dark={false}
72
+ >
73
+ <div
74
+ aria-disabled={false}
75
+ className="charcoal-text-field-root"
76
+ >
77
+ <div
78
+ className="charcoal-field-label-root"
79
+ style={
80
+ Object {
81
+ "border": 0,
82
+ "clip": "rect(0 0 0 0)",
83
+ "clipPath": "inset(50%)",
84
+ "height": "1px",
85
+ "margin": "-1px",
86
+ "overflow": "hidden",
87
+ "padding": 0,
88
+ "position": "absolute",
89
+ "whiteSpace": "nowrap",
90
+ "width": "1px",
91
+ }
92
+ }
93
+ >
94
+ <label
95
+ className="charcoal-field-label"
96
+ htmlFor="test-id"
97
+ id="test-id"
98
+ >
99
+ Label
100
+ </label>
101
+ <div
102
+ className="charcoal-field-label-sub-label"
103
+ >
104
+ <span />
105
+ </div>
106
+ </div>
107
+ <div
108
+ className="charcoal-text-field-container"
109
+ data-invalid={false}
110
+ >
111
+ <input
112
+ aria-describedby="test-id"
113
+ aria-labelledby="test-id"
114
+ className="charcoal-text-field-input"
115
+ data-invalid={false}
116
+ disabled={false}
117
+ id="test-id"
118
+ onChange={[Function]}
119
+ type="text"
120
+ />
121
+ </div>
122
+ <div
123
+ className="charcoal-text-field-assistive-text"
124
+ data-invalid={false}
125
+ id="test-id"
126
+ >
127
+ 説明が入ります
128
+ </div>
129
+ </div>
130
+ </div>
131
+ `;
490
132
 
491
- .c10::-moz-placeholder {
492
- color: var(--charcoal-text3);
493
- }
133
+ exports[`Storybook Tests > react/TextField > Default 1`] = `
134
+ <div
135
+ data-dark={false}
136
+ >
137
+ <div
138
+ aria-disabled={false}
139
+ className="charcoal-text-field-root"
140
+ >
141
+ <div
142
+ className="charcoal-field-label-root"
143
+ style={
144
+ Object {
145
+ "border": 0,
146
+ "clip": "rect(0 0 0 0)",
147
+ "clipPath": "inset(50%)",
148
+ "height": "1px",
149
+ "margin": "-1px",
150
+ "overflow": "hidden",
151
+ "padding": 0,
152
+ "position": "absolute",
153
+ "whiteSpace": "nowrap",
154
+ "width": "1px",
155
+ }
156
+ }
157
+ >
158
+ <label
159
+ className="charcoal-field-label"
160
+ htmlFor="test-id"
161
+ id="test-id"
162
+ >
163
+ Label
164
+ </label>
165
+ <div
166
+ className="charcoal-field-label-sub-label"
167
+ >
168
+ <span>
169
+ <button
170
+ className="charcoal-clickable"
171
+ >
172
+ Text Link
173
+ </button>
174
+ </span>
175
+ </div>
176
+ </div>
177
+ <div
178
+ className="charcoal-text-field-container"
179
+ data-invalid={false}
180
+ >
181
+ <input
182
+ aria-invalid={false}
183
+ aria-labelledby="test-id"
184
+ className="charcoal-text-field-input"
185
+ data-invalid={false}
186
+ disabled={false}
187
+ id="test-id"
188
+ onChange={[Function]}
189
+ placeholder="TextField"
190
+ readOnly={false}
191
+ type="text"
192
+ />
193
+ </div>
194
+ </div>
195
+ </div>
196
+ `;
494
197
 
495
- .c10:-ms-input-placeholder {
496
- color: var(--charcoal-text3);
497
- }
198
+ exports[`Storybook Tests > react/TextField > Disabled 1`] = `
199
+ <div
200
+ data-dark={false}
201
+ >
202
+ <div
203
+ aria-disabled={true}
204
+ className="charcoal-text-field-root"
205
+ >
206
+ <div
207
+ className="charcoal-field-label-root"
208
+ style={
209
+ Object {
210
+ "border": 0,
211
+ "clip": "rect(0 0 0 0)",
212
+ "clipPath": "inset(50%)",
213
+ "height": "1px",
214
+ "margin": "-1px",
215
+ "overflow": "hidden",
216
+ "padding": 0,
217
+ "position": "absolute",
218
+ "whiteSpace": "nowrap",
219
+ "width": "1px",
220
+ }
221
+ }
222
+ >
223
+ <label
224
+ className="charcoal-field-label"
225
+ htmlFor="test-id"
226
+ id="test-id"
227
+ >
228
+ Label
229
+ </label>
230
+ <div
231
+ className="charcoal-field-label-sub-label"
232
+ >
233
+ <span />
234
+ </div>
235
+ </div>
236
+ <div
237
+ aria-disabled={true}
238
+ className="charcoal-text-field-container"
239
+ data-invalid={false}
240
+ >
241
+ <input
242
+ aria-labelledby="test-id"
243
+ className="charcoal-text-field-input"
244
+ data-invalid={false}
245
+ disabled={true}
246
+ id="test-id"
247
+ onChange={[Function]}
248
+ type="text"
249
+ />
250
+ </div>
251
+ </div>
252
+ </div>
253
+ `;
498
254
 
499
- .c10::placeholder {
500
- color: var(--charcoal-text3);
501
- }
255
+ exports[`Storybook Tests > react/TextField > Invalid 1`] = `
256
+ <div
257
+ data-dark={false}
258
+ >
259
+ <div
260
+ aria-disabled={false}
261
+ className="charcoal-text-field-root"
262
+ >
263
+ <div
264
+ className="charcoal-field-label-root"
265
+ style={
266
+ Object {
267
+ "border": 0,
268
+ "clip": "rect(0 0 0 0)",
269
+ "clipPath": "inset(50%)",
270
+ "height": "1px",
271
+ "margin": "-1px",
272
+ "overflow": "hidden",
273
+ "padding": 0,
274
+ "position": "absolute",
275
+ "whiteSpace": "nowrap",
276
+ "width": "1px",
277
+ }
278
+ }
279
+ >
280
+ <label
281
+ className="charcoal-field-label"
282
+ htmlFor="test-id"
283
+ id="test-id"
284
+ >
285
+ Label
286
+ </label>
287
+ <div
288
+ className="charcoal-field-label-sub-label"
289
+ >
290
+ <span />
291
+ </div>
292
+ </div>
293
+ <div
294
+ className="charcoal-text-field-container"
295
+ data-invalid={true}
296
+ >
297
+ <input
298
+ aria-describedby="test-id"
299
+ aria-invalid={true}
300
+ aria-labelledby="test-id"
301
+ className="charcoal-text-field-input"
302
+ data-invalid={true}
303
+ disabled={false}
304
+ id="test-id"
305
+ onChange={[Function]}
306
+ type="text"
307
+ />
308
+ </div>
309
+ <div
310
+ className="charcoal-text-field-assistive-text"
311
+ data-invalid={true}
312
+ id="test-id"
313
+ >
314
+ エラーメッセージ
315
+ </div>
316
+ </div>
317
+ </div>
318
+ `;
502
319
 
503
- .c12 {
504
- line-height: 22px;
505
- font-size: 14px;
506
- color: var(--charcoal-text3);
507
- }
320
+ exports[`Storybook Tests > react/TextField > Label 1`] = `
321
+ <div
322
+ data-dark={false}
323
+ >
324
+ <div
325
+ aria-disabled={false}
326
+ className="charcoal-text-field-root"
327
+ >
328
+ <div
329
+ className="charcoal-field-label-root"
330
+ >
331
+ <label
332
+ className="charcoal-field-label"
333
+ htmlFor="test-id"
334
+ id="test-id"
335
+ >
336
+ Label
337
+ </label>
338
+ <div
339
+ className="charcoal-field-label-sub-label"
340
+ >
341
+ <span />
342
+ </div>
343
+ </div>
344
+ <div
345
+ className="charcoal-text-field-container"
346
+ data-invalid={false}
347
+ >
348
+ <input
349
+ aria-labelledby="test-id"
350
+ className="charcoal-text-field-input"
351
+ data-invalid={false}
352
+ disabled={false}
353
+ id="test-id"
354
+ onChange={[Function]}
355
+ type="text"
356
+ />
357
+ </div>
358
+ </div>
359
+ </div>
360
+ `;
508
361
 
509
- .c0 {
510
- display: grid;
511
- gap: 24px;
512
- }
362
+ exports[`Storybook Tests > react/TextField > Number 1`] = `
363
+ <div
364
+ data-dark={false}
365
+ >
366
+ <div
367
+ aria-disabled={false}
368
+ className="charcoal-text-field-root"
369
+ >
370
+ <div
371
+ className="charcoal-field-label-root"
372
+ style={
373
+ Object {
374
+ "border": 0,
375
+ "clip": "rect(0 0 0 0)",
376
+ "clipPath": "inset(50%)",
377
+ "height": "1px",
378
+ "margin": "-1px",
379
+ "overflow": "hidden",
380
+ "padding": 0,
381
+ "position": "absolute",
382
+ "whiteSpace": "nowrap",
383
+ "width": "1px",
384
+ }
385
+ }
386
+ >
387
+ <label
388
+ className="charcoal-field-label"
389
+ htmlFor="test-id"
390
+ id="test-id"
391
+ >
392
+
393
+ </label>
394
+ <div
395
+ className="charcoal-field-label-sub-label"
396
+ >
397
+ <span />
398
+ </div>
399
+ </div>
400
+ <div
401
+ className="charcoal-text-field-container"
402
+ data-invalid={false}
403
+ >
404
+ <input
405
+ aria-labelledby="test-id"
406
+ className="charcoal-text-field-input"
407
+ data-invalid={false}
408
+ disabled={false}
409
+ id="test-id"
410
+ onChange={[Function]}
411
+ onWheel={[Function]}
412
+ type="number"
413
+ value="0"
414
+ />
415
+ </div>
416
+ </div>
417
+ </div>
418
+ `;
513
419
 
420
+ exports[`Storybook Tests > react/TextField > Placeholder 1`] = `
514
421
  <div
515
422
  data-dark={false}
516
423
  >
517
424
  <div
518
- className="c0"
425
+ aria-disabled={false}
426
+ className="charcoal-text-field-root"
519
427
  >
520
428
  <div
521
- className="c1"
429
+ className="charcoal-field-label-root"
430
+ style={
431
+ Object {
432
+ "border": 0,
433
+ "clip": "rect(0 0 0 0)",
434
+ "clipPath": "inset(50%)",
435
+ "height": "1px",
436
+ "margin": "-1px",
437
+ "overflow": "hidden",
438
+ "padding": 0,
439
+ "position": "absolute",
440
+ "whiteSpace": "nowrap",
441
+ "width": "1px",
442
+ }
443
+ }
522
444
  >
445
+ <label
446
+ className="charcoal-field-label"
447
+ htmlFor="test-id"
448
+ id="test-id"
449
+ >
450
+ Label
451
+ </label>
523
452
  <div
524
- className="c2 c3"
525
- style={
526
- Object {
527
- "border": 0,
528
- "clip": "rect(0 0 0 0)",
529
- "clipPath": "inset(50%)",
530
- "height": "1px",
531
- "margin": "-1px",
532
- "overflow": "hidden",
533
- "padding": 0,
534
- "position": "absolute",
535
- "whiteSpace": "nowrap",
536
- "width": "1px",
537
- }
453
+ className="charcoal-field-label-sub-label"
454
+ >
455
+ <span />
456
+ </div>
457
+ </div>
458
+ <div
459
+ className="charcoal-text-field-container"
460
+ data-invalid={false}
461
+ >
462
+ <input
463
+ aria-labelledby="test-id"
464
+ className="charcoal-text-field-input"
465
+ data-invalid={false}
466
+ disabled={false}
467
+ id="test-id"
468
+ onChange={[Function]}
469
+ placeholder="Placeholder"
470
+ type="text"
471
+ />
472
+ </div>
473
+ </div>
474
+ </div>
475
+ `;
476
+
477
+ exports[`Storybook Tests > react/TextField > Prefix 1`] = `
478
+ <div
479
+ data-dark={false}
480
+ >
481
+ <div
482
+ aria-disabled={false}
483
+ className="charcoal-text-field-root"
484
+ >
485
+ <div
486
+ className="charcoal-field-label-root"
487
+ style={
488
+ Object {
489
+ "border": 0,
490
+ "clip": "rect(0 0 0 0)",
491
+ "clipPath": "inset(50%)",
492
+ "height": "1px",
493
+ "margin": "-1px",
494
+ "overflow": "hidden",
495
+ "padding": 0,
496
+ "position": "absolute",
497
+ "whiteSpace": "nowrap",
498
+ "width": "1px",
538
499
  }
500
+ }
501
+ >
502
+ <label
503
+ className="charcoal-field-label"
504
+ htmlFor="test-id"
505
+ id="test-id"
539
506
  >
540
- <label
541
- className="c4"
542
- htmlFor="test-id"
543
- id="test-id"
544
- >
545
- Label
546
- </label>
547
- <div
548
- className="c5 c6"
549
- >
550
- <span>
551
- <button
552
- className="c7"
553
- >
554
- Text Link
555
- </button>
556
- </span>
557
- </div>
507
+ Label
508
+ </label>
509
+ <div
510
+ className="charcoal-field-label-sub-label"
511
+ >
512
+ <span />
558
513
  </div>
514
+ </div>
515
+ <div
516
+ className="charcoal-text-field-container"
517
+ data-invalid={false}
518
+ >
559
519
  <div
560
- className="c8"
520
+ className="charcoal-text-field-prefix"
561
521
  >
562
522
  <div
563
- className="c9"
523
+ style={
524
+ Object {
525
+ "alignItems": "center",
526
+ "color": "var(--charcoal-text3)",
527
+ "display": "flex",
528
+ }
529
+ }
564
530
  >
565
- /home/john/
531
+ <pixiv-icon
532
+ name="16/Search"
533
+ />
566
534
  </div>
567
- <input
568
- aria-labelledby="test-id"
569
- className="c10"
570
- disabled={false}
571
- id="test-id"
572
- maxLength={200}
573
- onChange={[Function]}
574
- placeholder="TextField"
575
- readOnly={false}
576
- required={false}
577
- type="text"
578
- value=""
579
- />
580
- <span
581
- className="c11"
582
- >
583
- .png
584
- <span
585
- className="c12"
586
- >
587
- 0/200
588
- </span>
589
- </span>
590
535
  </div>
536
+ <input
537
+ aria-labelledby="test-id"
538
+ className="charcoal-text-field-input"
539
+ data-invalid={false}
540
+ disabled={false}
541
+ id="test-id"
542
+ onChange={[Function]}
543
+ type="text"
544
+ />
591
545
  </div>
592
546
  </div>
593
547
  </div>
594
548
  `;
595
549
 
596
- exports[`Storybook Tests TextField HasCount 1`] = `
597
- .c7 {
598
- cursor: pointer;
599
- -webkit-appearance: none;
600
- -moz-appearance: none;
601
- appearance: none;
602
- background: transparent;
603
- padding: 0;
604
- border-style: none;
605
- outline: none;
606
- color: inherit;
607
- text-rendering: inherit;
608
- -webkit-letter-spacing: inherit;
609
- -moz-letter-spacing: inherit;
610
- -ms-letter-spacing: inherit;
611
- letter-spacing: inherit;
612
- word-spacing: inherit;
613
- -webkit-text-decoration: none;
614
- text-decoration: none;
615
- font: inherit;
616
- margin: 0;
617
- overflow: visible;
618
- text-transform: none;
619
- }
620
-
621
- .c7:disabled,
622
- .c7[aria-disabled]:not([aria-disabled=false]) {
623
- cursor: default;
624
- }
625
-
626
- .c7:focus {
627
- outline: none;
628
- }
629
-
630
- .c7::-moz-focus-inner {
631
- border-style: none;
632
- padding: 0;
633
- }
634
-
635
- .c4 {
636
- font-size: 14px;
637
- line-height: 22px;
638
- font-weight: bold;
639
- display: flow-root;
640
- color: var(--charcoal-text1);
641
- }
642
-
643
- .c4::before {
644
- display: block;
645
- width: 0;
646
- height: 0;
647
- content: '';
648
- margin-top: -4px;
649
- }
650
-
651
- .c4::after {
652
- display: block;
653
- width: 0;
654
- height: 0;
655
- content: '';
656
- margin-bottom: -4px;
657
- }
658
-
659
- .c6 {
660
- font-size: 14px;
661
- line-height: 22px;
662
- display: flow-root;
663
- color: var(--charcoal-text3);
664
- -webkit-transition: 0.2s color,0.2s box-shadow;
665
- transition: 0.2s color,0.2s box-shadow;
666
- }
667
-
668
- .c6::before {
669
- display: block;
670
- width: 0;
671
- height: 0;
672
- content: '';
673
- margin-top: -4px;
674
- }
675
-
676
- .c6::after {
677
- display: block;
678
- width: 0;
679
- height: 0;
680
- content: '';
681
- margin-bottom: -4px;
682
- }
683
-
684
- .c6:not(:disabled):not([aria-disabled]):hover,
685
- .c6[aria-disabled='false']:hover {
686
- color: var(--charcoal-text3-hover);
687
- }
688
-
689
- .c6:not(:disabled):not([aria-disabled]):active,
690
- .c6[aria-disabled='false']:active {
691
- color: var(--charcoal-text3-press);
692
- }
693
-
694
- .c6:not(:disabled):not([aria-disabled]):active,
695
- .c6[aria-disabled='false']:active,
696
- .c6:not(:disabled):not([aria-disabled]):focus,
697
- .c6[aria-disabled='false']:focus,
698
- .c6:not(:disabled):not([aria-disabled]):focus-visible,
699
- .c6[aria-disabled='false']:focus-visible {
700
- outline: none;
701
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
702
- }
703
-
704
- .c2 {
705
- display: -webkit-inline-box;
706
- display: -webkit-inline-flex;
707
- display: -ms-inline-flexbox;
708
- display: inline-flex;
709
- -webkit-align-items: center;
710
- -webkit-box-align: center;
711
- -ms-flex-align: center;
712
- align-items: center;
713
- }
714
-
715
- .c2 > .c5 {
716
- margin-left: auto;
717
- }
718
-
719
- .c1 {
720
- display: -webkit-box;
721
- display: -webkit-flex;
722
- display: -ms-flexbox;
723
- display: flex;
724
- -webkit-flex-direction: column;
725
- -ms-flex-direction: column;
726
- flex-direction: column;
727
- }
728
-
729
- .c3 {
730
- margin-bottom: 8px;
731
- }
732
-
733
- .c8 {
734
- display: grid;
735
- grid-template-columns: 1fr auto;
736
- height: 40px;
737
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
738
- transition: 0.2s background-color,0.2s box-shadow;
739
- color: var(--charcoal-text2);
740
- background-color: var(--charcoal-surface3);
741
- border-radius: 4px;
742
- gap: 4px;
743
- padding: 0 8px;
744
- line-height: 22px;
745
- font-size: 14px;
746
- }
747
-
748
- .c8:not(:disabled):not([aria-disabled]):hover,
749
- .c8 [aria-disabled='false']:hover {
750
- background-color: var(--charcoal-surface3-hover);
751
- }
752
-
753
- .c8:focus-within {
754
- outline: none;
755
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
756
- }
757
-
758
- .c10 {
759
- display: -webkit-box;
760
- display: -webkit-flex;
761
- display: -ms-flexbox;
762
- display: flex;
763
- -webkit-align-items: center;
764
- -webkit-box-align: center;
765
- -ms-flex-align: center;
766
- align-items: center;
767
- gap: 8px;
768
- }
769
-
770
- .c9 {
771
- border: none;
772
- box-sizing: border-box;
773
- outline: none;
774
- font-family: inherit;
775
- -webkit-transform-origin: top left;
776
- -ms-transform-origin: top left;
777
- transform-origin: top left;
778
- -webkit-transform: scale(0.875);
779
- -ms-transform: scale(0.875);
780
- transform: scale(0.875);
781
- width: calc(100% / 0.875);
782
- height: calc(100% / 0.875);
783
- font-size: calc(14px / 0.875);
784
- line-height: calc(22px / 0.875);
785
- padding-left: 0;
786
- padding-right: 0;
787
- border-radius: calc(4px / 0.875);
788
- -webkit-appearance: none;
789
- -moz-appearance: none;
790
- appearance: none;
791
- background: transparent;
792
- color: var(--charcoal-text2);
793
- }
794
-
795
- .c9::-webkit-input-placeholder {
796
- color: var(--charcoal-text3);
797
- }
798
-
799
- .c9::-moz-placeholder {
800
- color: var(--charcoal-text3);
801
- }
802
-
803
- .c9:-ms-input-placeholder {
804
- color: var(--charcoal-text3);
805
- }
806
-
807
- .c9::placeholder {
808
- color: var(--charcoal-text3);
809
- }
810
-
811
- .c11 {
812
- line-height: 22px;
813
- font-size: 14px;
814
- color: var(--charcoal-text3);
815
- }
816
-
817
- .c0 {
818
- display: grid;
819
- gap: 24px;
820
- }
821
-
550
+ exports[`Storybook Tests > react/TextField > ReadOnly 1`] = `
822
551
  <div
823
552
  data-dark={false}
824
553
  >
825
554
  <div
826
- className="c0"
555
+ aria-disabled={false}
556
+ className="charcoal-text-field-root"
827
557
  >
828
558
  <div
829
- className="c1"
830
- >
831
- <div
832
- className="c2 c3"
833
- style={
834
- Object {
835
- "border": 0,
836
- "clip": "rect(0 0 0 0)",
837
- "clipPath": "inset(50%)",
838
- "height": "1px",
839
- "margin": "-1px",
840
- "overflow": "hidden",
841
- "padding": 0,
842
- "position": "absolute",
843
- "whiteSpace": "nowrap",
844
- "width": "1px",
845
- }
559
+ className="charcoal-field-label-root"
560
+ style={
561
+ Object {
562
+ "border": 0,
563
+ "clip": "rect(0 0 0 0)",
564
+ "clipPath": "inset(50%)",
565
+ "height": "1px",
566
+ "margin": "-1px",
567
+ "overflow": "hidden",
568
+ "padding": 0,
569
+ "position": "absolute",
570
+ "whiteSpace": "nowrap",
571
+ "width": "1px",
846
572
  }
573
+ }
574
+ >
575
+ <label
576
+ className="charcoal-field-label"
577
+ htmlFor="test-id"
578
+ id="test-id"
847
579
  >
848
- <label
849
- className="c4"
850
- htmlFor="test-id"
851
- id="test-id"
852
- >
853
- Label
854
- </label>
855
- <div
856
- className="c5 c6"
857
- >
858
- <span>
859
- <button
860
- className="c7"
861
- >
862
- Text Link
863
- </button>
864
- </span>
865
- </div>
866
- </div>
580
+ Label
581
+ </label>
867
582
  <div
868
- className="c8"
583
+ className="charcoal-field-label-sub-label"
869
584
  >
870
- <input
871
- aria-labelledby="test-id"
872
- className="c9"
873
- disabled={false}
874
- id="test-id"
875
- maxLength={100}
876
- onChange={[Function]}
877
- placeholder="TextField"
878
- readOnly={false}
879
- required={false}
880
- type="text"
881
- value=""
882
- />
883
- <span
884
- className="c10"
885
- >
886
- <span
887
- className="c11"
888
- >
889
- 0/100
890
- </span>
891
- </span>
585
+ <span />
892
586
  </div>
893
587
  </div>
588
+ <div
589
+ className="charcoal-text-field-container"
590
+ data-invalid={false}
591
+ >
592
+ <input
593
+ aria-labelledby="test-id"
594
+ className="charcoal-text-field-input"
595
+ data-invalid={false}
596
+ disabled={false}
597
+ id="test-id"
598
+ onChange={[Function]}
599
+ readOnly={true}
600
+ type="text"
601
+ value="読み取り専用"
602
+ />
603
+ </div>
894
604
  </div>
895
605
  </div>
896
606
  `;
897
607
 
898
- exports[`Storybook Tests TextField HasLabel 1`] = `
899
- .c9 {
900
- cursor: pointer;
901
- -webkit-appearance: none;
902
- -moz-appearance: none;
903
- appearance: none;
904
- background: transparent;
905
- padding: 0;
906
- border-style: none;
907
- outline: none;
908
- color: inherit;
909
- text-rendering: inherit;
910
- -webkit-letter-spacing: inherit;
911
- -moz-letter-spacing: inherit;
912
- -ms-letter-spacing: inherit;
913
- letter-spacing: inherit;
914
- word-spacing: inherit;
915
- -webkit-text-decoration: none;
916
- text-decoration: none;
917
- font: inherit;
918
- margin: 0;
919
- overflow: visible;
920
- text-transform: none;
921
- }
922
-
923
- .c9:disabled,
924
- .c9[aria-disabled]:not([aria-disabled=false]) {
925
- cursor: default;
926
- }
927
-
928
- .c9:focus {
929
- outline: none;
930
- }
931
-
932
- .c9::-moz-focus-inner {
933
- border-style: none;
934
- padding: 0;
935
- }
936
-
937
- .c4 {
938
- font-size: 14px;
939
- line-height: 22px;
940
- font-weight: bold;
941
- display: flow-root;
942
- color: var(--charcoal-text1);
943
- }
944
-
945
- .c4::before {
946
- display: block;
947
- width: 0;
948
- height: 0;
949
- content: '';
950
- margin-top: -4px;
951
- }
952
-
953
- .c4::after {
954
- display: block;
955
- width: 0;
956
- height: 0;
957
- content: '';
958
- margin-bottom: -4px;
959
- }
960
-
961
- .c6 {
962
- font-size: 14px;
963
- line-height: 22px;
964
- display: flow-root;
965
- color: var(--charcoal-text2);
966
- }
967
-
968
- .c6::before {
969
- display: block;
970
- width: 0;
971
- height: 0;
972
- content: '';
973
- margin-top: -4px;
974
- }
975
-
976
- .c6::after {
977
- display: block;
978
- width: 0;
979
- height: 0;
980
- content: '';
981
- margin-bottom: -4px;
982
- }
983
-
984
- .c8 {
985
- font-size: 14px;
986
- line-height: 22px;
987
- display: flow-root;
988
- color: var(--charcoal-text3);
989
- -webkit-transition: 0.2s color,0.2s box-shadow;
990
- transition: 0.2s color,0.2s box-shadow;
991
- }
992
-
993
- .c8::before {
994
- display: block;
995
- width: 0;
996
- height: 0;
997
- content: '';
998
- margin-top: -4px;
999
- }
1000
-
1001
- .c8::after {
1002
- display: block;
1003
- width: 0;
1004
- height: 0;
1005
- content: '';
1006
- margin-bottom: -4px;
1007
- }
1008
-
1009
- .c8:not(:disabled):not([aria-disabled]):hover,
1010
- .c8[aria-disabled='false']:hover {
1011
- color: var(--charcoal-text3-hover);
1012
- }
1013
-
1014
- .c8:not(:disabled):not([aria-disabled]):active,
1015
- .c8[aria-disabled='false']:active {
1016
- color: var(--charcoal-text3-press);
1017
- }
1018
-
1019
- .c8:not(:disabled):not([aria-disabled]):active,
1020
- .c8[aria-disabled='false']:active,
1021
- .c8:not(:disabled):not([aria-disabled]):focus,
1022
- .c8[aria-disabled='false']:focus,
1023
- .c8:not(:disabled):not([aria-disabled]):focus-visible,
1024
- .c8[aria-disabled='false']:focus-visible {
1025
- outline: none;
1026
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1027
- }
1028
-
1029
- .c2 {
1030
- display: -webkit-inline-box;
1031
- display: -webkit-inline-flex;
1032
- display: -ms-inline-flexbox;
1033
- display: inline-flex;
1034
- -webkit-align-items: center;
1035
- -webkit-box-align: center;
1036
- -ms-flex-align: center;
1037
- align-items: center;
1038
- }
1039
-
1040
- .c2 > .c5 {
1041
- margin-left: 4px;
1042
- }
1043
-
1044
- .c2 > .c7 {
1045
- margin-left: auto;
1046
- }
1047
-
1048
- .c1 {
1049
- display: -webkit-box;
1050
- display: -webkit-flex;
1051
- display: -ms-flexbox;
1052
- display: flex;
1053
- -webkit-flex-direction: column;
1054
- -ms-flex-direction: column;
1055
- flex-direction: column;
1056
- }
1057
-
1058
- .c3 {
1059
- margin-bottom: 8px;
1060
- }
1061
-
1062
- .c10 {
1063
- display: grid;
1064
- grid-template-columns: 1fr;
1065
- height: 40px;
1066
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1067
- transition: 0.2s background-color,0.2s box-shadow;
1068
- color: var(--charcoal-text2);
1069
- background-color: var(--charcoal-surface3);
1070
- border-radius: 4px;
1071
- gap: 4px;
1072
- padding: 0 8px;
1073
- line-height: 22px;
1074
- font-size: 14px;
1075
- }
1076
-
1077
- .c10:not(:disabled):not([aria-disabled]):hover,
1078
- .c10 [aria-disabled='false']:hover {
1079
- background-color: var(--charcoal-surface3-hover);
1080
- }
1081
-
1082
- .c10:focus-within {
1083
- outline: none;
1084
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1085
- }
1086
-
1087
- .c11 {
1088
- border: none;
1089
- box-sizing: border-box;
1090
- outline: none;
1091
- font-family: inherit;
1092
- -webkit-transform-origin: top left;
1093
- -ms-transform-origin: top left;
1094
- transform-origin: top left;
1095
- -webkit-transform: scale(0.875);
1096
- -ms-transform: scale(0.875);
1097
- transform: scale(0.875);
1098
- width: calc(100% / 0.875);
1099
- height: calc(100% / 0.875);
1100
- font-size: calc(14px / 0.875);
1101
- line-height: calc(22px / 0.875);
1102
- padding-left: 0;
1103
- padding-right: 0;
1104
- border-radius: calc(4px / 0.875);
1105
- -webkit-appearance: none;
1106
- -moz-appearance: none;
1107
- appearance: none;
1108
- background: transparent;
1109
- color: var(--charcoal-text2);
1110
- }
1111
-
1112
- .c11::-webkit-input-placeholder {
1113
- color: var(--charcoal-text3);
1114
- }
1115
-
1116
- .c11::-moz-placeholder {
1117
- color: var(--charcoal-text3);
1118
- }
1119
-
1120
- .c11:-ms-input-placeholder {
1121
- color: var(--charcoal-text3);
1122
- }
1123
-
1124
- .c11::placeholder {
1125
- color: var(--charcoal-text3);
1126
- }
1127
-
1128
- .c12 {
1129
- font-size: 14px;
1130
- line-height: 22px;
1131
- margin-top: 4px;
1132
- margin-bottom: -4px;
1133
- color: var(--charcoal-text2);
1134
- }
1135
-
1136
- .c0 {
1137
- display: grid;
1138
- gap: 24px;
1139
- }
1140
-
608
+ exports[`Storybook Tests > react/TextField > RequiredText 1`] = `
1141
609
  <div
1142
610
  data-dark={false}
1143
611
  >
1144
612
  <div
1145
- className="c0"
613
+ aria-disabled={false}
614
+ className="charcoal-text-field-root"
1146
615
  >
1147
616
  <div
1148
- className="c1"
617
+ className="charcoal-field-label-root"
1149
618
  >
619
+ <label
620
+ className="charcoal-field-label"
621
+ htmlFor="test-id"
622
+ id="test-id"
623
+ >
624
+ Label
625
+ </label>
1150
626
  <div
1151
- className="c2 c3"
627
+ className="charcoal-field-label-required-text"
1152
628
  >
1153
- <label
1154
- className="c4"
1155
- htmlFor="test-id"
1156
- id="test-id"
1157
- >
1158
- Label
1159
- </label>
1160
- <span
1161
- className="c5 c6"
1162
- >
1163
- *必須
1164
- </span>
1165
- <div
1166
- className="c7 c8"
1167
- >
1168
- <span>
1169
- <button
1170
- className="c9"
1171
- >
1172
- Text Link
1173
- </button>
1174
- </span>
1175
- </div>
629
+ *必須
1176
630
  </div>
1177
631
  <div
1178
- className="c10"
632
+ className="charcoal-field-label-sub-label"
1179
633
  >
1180
- <input
1181
- aria-labelledby="test-id"
1182
- aria-required={true}
1183
- className="c11"
1184
- disabled={false}
1185
- id="test-id"
1186
- onChange={[Function]}
1187
- placeholder="TextField"
1188
- readOnly={false}
1189
- required={false}
1190
- type="text"
1191
- value=""
1192
- />
634
+ <span />
1193
635
  </div>
1194
- <p
1195
- className="c12"
1196
- >
1197
- Assistive text
1198
- </p>
636
+ </div>
637
+ <div
638
+ className="charcoal-text-field-container"
639
+ data-invalid={false}
640
+ >
641
+ <input
642
+ aria-labelledby="test-id"
643
+ className="charcoal-text-field-input"
644
+ data-invalid={false}
645
+ disabled={false}
646
+ id="test-id"
647
+ onChange={[Function]}
648
+ type="text"
649
+ />
1199
650
  </div>
1200
651
  </div>
1201
652
  </div>
1202
653
  `;
1203
654
 
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
-
655
+ exports[`Storybook Tests > react/TextField > ShowCount 1`] = `
1412
656
  <div
1413
657
  data-dark={false}
1414
658
  >
1415
659
  <div
1416
- className="c0"
660
+ aria-disabled={false}
661
+ className="charcoal-text-field-root"
1417
662
  >
1418
663
  <div
1419
- className="c1"
664
+ className="charcoal-field-label-root"
665
+ style={
666
+ Object {
667
+ "border": 0,
668
+ "clip": "rect(0 0 0 0)",
669
+ "clipPath": "inset(50%)",
670
+ "height": "1px",
671
+ "margin": "-1px",
672
+ "overflow": "hidden",
673
+ "padding": 0,
674
+ "position": "absolute",
675
+ "whiteSpace": "nowrap",
676
+ "width": "1px",
677
+ }
678
+ }
1420
679
  >
680
+ <label
681
+ className="charcoal-field-label"
682
+ htmlFor="test-id"
683
+ id="test-id"
684
+ >
685
+ Label
686
+ </label>
1421
687
  <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
- }
688
+ className="charcoal-field-label-sub-label"
1437
689
  >
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>
690
+ <span />
1456
691
  </div>
692
+ </div>
693
+ <div
694
+ className="charcoal-text-field-container"
695
+ data-invalid={false}
696
+ >
697
+ <input
698
+ aria-labelledby="test-id"
699
+ className="charcoal-text-field-input"
700
+ data-invalid={false}
701
+ disabled={false}
702
+ id="test-id"
703
+ maxLength={100}
704
+ onChange={[Function]}
705
+ type="text"
706
+ />
1457
707
  <div
1458
- className="c8"
708
+ className="charcoal-text-field-suffix"
1459
709
  >
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
- />
710
+ <span
711
+ className="charcoal-text-field-line-counter"
712
+ >
713
+ 0/100
714
+ </span>
1473
715
  </div>
1474
716
  </div>
1475
717
  </div>
1476
718
  </div>
1477
719
  `;
1478
720
 
1479
- exports[`Storybook Tests TextField PrefixIcon 1`] = `
1480
- .c6 {
1481
- cursor: pointer;
1482
- -webkit-appearance: none;
1483
- -moz-appearance: none;
1484
- appearance: none;
1485
- background: transparent;
1486
- padding: 0;
1487
- border-style: none;
1488
- outline: none;
1489
- color: inherit;
1490
- text-rendering: inherit;
1491
- -webkit-letter-spacing: inherit;
1492
- -moz-letter-spacing: inherit;
1493
- -ms-letter-spacing: inherit;
1494
- letter-spacing: inherit;
1495
- word-spacing: inherit;
1496
- -webkit-text-decoration: none;
1497
- text-decoration: none;
1498
- font: inherit;
1499
- margin: 0;
1500
- overflow: visible;
1501
- text-transform: none;
1502
- }
1503
-
1504
- .c6:disabled,
1505
- .c6[aria-disabled]:not([aria-disabled=false]) {
1506
- cursor: default;
1507
- }
1508
-
1509
- .c6:focus {
1510
- outline: none;
1511
- }
1512
-
1513
- .c6::-moz-focus-inner {
1514
- border-style: none;
1515
- padding: 0;
1516
- }
1517
-
1518
- .c3 {
1519
- font-size: 14px;
1520
- line-height: 22px;
1521
- font-weight: bold;
1522
- display: flow-root;
1523
- color: var(--charcoal-text1);
1524
- }
1525
-
1526
- .c3::before {
1527
- display: block;
1528
- width: 0;
1529
- height: 0;
1530
- content: '';
1531
- margin-top: -4px;
1532
- }
1533
-
1534
- .c3::after {
1535
- display: block;
1536
- width: 0;
1537
- height: 0;
1538
- content: '';
1539
- margin-bottom: -4px;
1540
- }
1541
-
1542
- .c5 {
1543
- font-size: 14px;
1544
- line-height: 22px;
1545
- display: flow-root;
1546
- color: var(--charcoal-text3);
1547
- -webkit-transition: 0.2s color,0.2s box-shadow;
1548
- transition: 0.2s color,0.2s box-shadow;
1549
- }
1550
-
1551
- .c5::before {
1552
- display: block;
1553
- width: 0;
1554
- height: 0;
1555
- content: '';
1556
- margin-top: -4px;
1557
- }
1558
-
1559
- .c5::after {
1560
- display: block;
1561
- width: 0;
1562
- height: 0;
1563
- content: '';
1564
- margin-bottom: -4px;
1565
- }
1566
-
1567
- .c5:not(:disabled):not([aria-disabled]):hover,
1568
- .c5[aria-disabled='false']:hover {
1569
- color: var(--charcoal-text3-hover);
1570
- }
1571
-
1572
- .c5:not(:disabled):not([aria-disabled]):active,
1573
- .c5[aria-disabled='false']:active {
1574
- color: var(--charcoal-text3-press);
1575
- }
1576
-
1577
- .c5:not(:disabled):not([aria-disabled]):active,
1578
- .c5[aria-disabled='false']:active,
1579
- .c5:not(:disabled):not([aria-disabled]):focus,
1580
- .c5[aria-disabled='false']:focus,
1581
- .c5:not(:disabled):not([aria-disabled]):focus-visible,
1582
- .c5[aria-disabled='false']:focus-visible {
1583
- outline: none;
1584
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1585
- }
1586
-
1587
- .c1 {
1588
- display: -webkit-inline-box;
1589
- display: -webkit-inline-flex;
1590
- display: -ms-inline-flexbox;
1591
- display: inline-flex;
1592
- -webkit-align-items: center;
1593
- -webkit-box-align: center;
1594
- -ms-flex-align: center;
1595
- align-items: center;
1596
- }
1597
-
1598
- .c1 > .c4 {
1599
- margin-left: auto;
1600
- }
1601
-
1602
- .c12 {
1603
- -webkit-user-select: none;
1604
- -moz-user-select: none;
1605
- -ms-user-select: none;
1606
- user-select: none;
1607
- width: 20px;
1608
- height: 20px;
1609
- display: -webkit-box;
1610
- display: -webkit-flex;
1611
- display: -ms-flexbox;
1612
- display: flex;
1613
- -webkit-align-items: center;
1614
- -webkit-box-align: center;
1615
- -ms-flex-align: center;
1616
- align-items: center;
1617
- -webkit-box-pack: center;
1618
- -webkit-justify-content: center;
1619
- -ms-flex-pack: center;
1620
- justify-content: center;
1621
- color: var(--charcoal-text5);
1622
- background-color: var(--charcoal-surface4);
1623
- border-radius: 999999px;
1624
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1625
- transition: 0.2s background-color,0.2s box-shadow;
1626
- }
1627
-
1628
- .c12:not(:disabled):not([aria-disabled]):hover,
1629
- .c12[aria-disabled='false']:hover {
1630
- color: var(--charcoal-text5-hover);
1631
- background-color: var(--charcoal-surface4-hover);
1632
- }
1633
-
1634
- .c12:not(:disabled):not([aria-disabled]):active,
1635
- .c12[aria-disabled='false']:active {
1636
- color: var(--charcoal-text5-press);
1637
- background-color: var(--charcoal-surface4-press);
1638
- }
1639
-
1640
- .c12:not(:disabled):not([aria-disabled]):focus,
1641
- .c12[aria-disabled='false']:focus {
1642
- outline: none;
1643
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1644
- }
1645
-
1646
- .c12:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
1647
- .c12[aria-disabled='false']:focus:not(:focus-visible) {
1648
- box-shadow: none;
1649
- }
1650
-
1651
- .c12:not(:disabled):not([aria-disabled]):focus-visible,
1652
- .c12[aria-disabled='false']:focus-visible {
1653
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1654
- }
1655
-
1656
- .c12:disabled,
1657
- .c12[aria-disabled]:not([aria-disabled='false']) {
1658
- opacity: 0.32;
1659
- }
1660
-
1661
- .c0 {
1662
- display: -webkit-box;
1663
- display: -webkit-flex;
1664
- display: -ms-flexbox;
1665
- display: flex;
1666
- -webkit-flex-direction: column;
1667
- -ms-flex-direction: column;
1668
- flex-direction: column;
1669
- }
1670
-
1671
- .c2 {
1672
- margin-bottom: 8px;
1673
- }
1674
-
1675
- .c7 {
1676
- display: grid;
1677
- grid-template-columns: auto 1fr auto;
1678
- height: 40px;
1679
- -webkit-transition: 0.2s background-color,0.2s box-shadow;
1680
- transition: 0.2s background-color,0.2s box-shadow;
1681
- color: var(--charcoal-text2);
1682
- background-color: var(--charcoal-surface3);
1683
- border-radius: 4px;
1684
- gap: 4px;
1685
- padding: 0 8px;
1686
- line-height: 22px;
1687
- font-size: 14px;
1688
- }
1689
-
1690
- .c7:not(:disabled):not([aria-disabled]):hover,
1691
- .c7 [aria-disabled='false']:hover {
1692
- background-color: var(--charcoal-surface3-hover);
1693
- }
1694
-
1695
- .c7:focus-within {
1696
- outline: none;
1697
- box-shadow: 0 0 0 4px rgba(0,150,250,0.32);
1698
- }
1699
-
1700
- .c8 {
1701
- display: -webkit-box;
1702
- display: -webkit-flex;
1703
- display: -ms-flexbox;
1704
- display: flex;
1705
- -webkit-align-items: center;
1706
- -webkit-box-align: center;
1707
- -ms-flex-align: center;
1708
- align-items: center;
1709
- }
1710
-
1711
- .c11 {
1712
- display: -webkit-box;
1713
- display: -webkit-flex;
1714
- display: -ms-flexbox;
1715
- display: flex;
1716
- -webkit-align-items: center;
1717
- -webkit-box-align: center;
1718
- -ms-flex-align: center;
1719
- align-items: center;
1720
- gap: 8px;
1721
- }
1722
-
1723
- .c10 {
1724
- border: none;
1725
- box-sizing: border-box;
1726
- outline: none;
1727
- font-family: inherit;
1728
- -webkit-transform-origin: top left;
1729
- -ms-transform-origin: top left;
1730
- transform-origin: top left;
1731
- -webkit-transform: scale(0.875);
1732
- -ms-transform: scale(0.875);
1733
- transform: scale(0.875);
1734
- width: calc(100% / 0.875);
1735
- height: calc(100% / 0.875);
1736
- font-size: calc(14px / 0.875);
1737
- line-height: calc(22px / 0.875);
1738
- padding-left: 0;
1739
- padding-right: 0;
1740
- border-radius: calc(4px / 0.875);
1741
- -webkit-appearance: none;
1742
- -moz-appearance: none;
1743
- appearance: none;
1744
- background: transparent;
1745
- color: var(--charcoal-text2);
1746
- }
1747
-
1748
- .c10::-webkit-input-placeholder {
1749
- color: var(--charcoal-text3);
1750
- }
1751
-
1752
- .c10::-moz-placeholder {
1753
- color: var(--charcoal-text3);
1754
- }
1755
-
1756
- .c10:-ms-input-placeholder {
1757
- color: var(--charcoal-text3);
1758
- }
1759
-
1760
- .c10::placeholder {
1761
- color: var(--charcoal-text3);
1762
- }
1763
-
1764
- .c9 {
1765
- display: -webkit-box;
1766
- display: -webkit-flex;
1767
- display: -ms-flexbox;
1768
- display: flex;
1769
- -webkit-align-items: center;
1770
- -webkit-box-align: center;
1771
- -ms-flex-align: center;
1772
- align-items: center;
1773
- color: #858585;
1774
- }
1775
-
721
+ exports[`Storybook Tests > react/TextField > SubLabel 1`] = `
1776
722
  <div
1777
723
  data-dark={false}
1778
724
  >
1779
725
  <div
1780
- className="c0"
726
+ aria-disabled={false}
727
+ className="charcoal-text-field-root"
1781
728
  >
1782
729
  <div
1783
- className="c1 c2"
730
+ className="charcoal-field-label-root"
1784
731
  style={
1785
732
  Object {
1786
733
  "border": 0,
@@ -1797,18 +744,18 @@ exports[`Storybook Tests TextField PrefixIcon 1`] = `
1797
744
  }
1798
745
  >
1799
746
  <label
1800
- className="c3"
747
+ className="charcoal-field-label"
1801
748
  htmlFor="test-id"
1802
749
  id="test-id"
1803
750
  >
1804
751
  Label
1805
752
  </label>
1806
753
  <div
1807
- className="c4 c5"
754
+ className="charcoal-field-label-sub-label"
1808
755
  >
1809
756
  <span>
1810
757
  <button
1811
- className="c6"
758
+ className="charcoal-clickable"
1812
759
  >
1813
760
  Text Link
1814
761
  </button>
@@ -1816,43 +763,18 @@ exports[`Storybook Tests TextField PrefixIcon 1`] = `
1816
763
  </div>
1817
764
  </div>
1818
765
  <div
1819
- className="c7"
766
+ className="charcoal-text-field-container"
767
+ data-invalid={false}
1820
768
  >
1821
- <div
1822
- className="c8"
1823
- >
1824
- <div
1825
- className="c9"
1826
- >
1827
- <pixiv-icon
1828
- name="16/Search"
1829
- />
1830
- </div>
1831
- </div>
1832
769
  <input
1833
770
  aria-labelledby="test-id"
1834
- className="c10"
771
+ className="charcoal-text-field-input"
772
+ data-invalid={false}
1835
773
  disabled={false}
1836
774
  id="test-id"
1837
775
  onChange={[Function]}
1838
- placeholder="作品を検索"
1839
- readOnly={false}
1840
- required={false}
1841
776
  type="text"
1842
- value=""
1843
777
  />
1844
- <span
1845
- className="c11"
1846
- >
1847
- <button
1848
- className="c6 c12"
1849
- onClick={[Function]}
1850
- >
1851
- <pixiv-icon
1852
- name="16/Remove"
1853
- />
1854
- </button>
1855
- </span>
1856
778
  </div>
1857
779
  </div>
1858
780
  </div>