@workday/canvas-kit-preview-react 5.3.15 → 5.4.0-next.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 (292) hide show
  1. package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +5 -5
  2. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  3. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +4 -4
  4. package/dist/commonjs/form-field/index.d.ts +3 -0
  5. package/dist/commonjs/form-field/index.d.ts.map +1 -0
  6. package/dist/commonjs/form-field/index.js +7 -0
  7. package/dist/commonjs/form-field/lib/FormField.d.ts +31 -0
  8. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -0
  9. package/dist/commonjs/form-field/lib/FormField.js +51 -0
  10. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +13 -0
  11. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -0
  12. package/dist/commonjs/form-field/lib/FormFieldHint.js +45 -0
  13. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -0
  14. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -0
  15. package/dist/commonjs/form-field/lib/FormFieldInput.js +41 -0
  16. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +18 -0
  17. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -0
  18. package/dist/commonjs/form-field/lib/FormFieldLabel.js +51 -0
  19. package/dist/commonjs/form-field/lib/hooks/index.d.ts +6 -0
  20. package/dist/commonjs/form-field/lib/hooks/index.d.ts.map +1 -0
  21. package/dist/commonjs/form-field/lib/hooks/index.js +10 -0
  22. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
  23. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -0
  24. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +13 -0
  25. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
  26. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -0
  27. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +16 -0
  28. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
  29. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -0
  30. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +13 -0
  31. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
  32. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -0
  33. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +21 -0
  34. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
  35. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -0
  36. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +24 -0
  37. package/dist/commonjs/index.d.ts +3 -0
  38. package/dist/commonjs/index.d.ts.map +1 -1
  39. package/dist/commonjs/index.js +4 -0
  40. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  41. package/dist/commonjs/menu/lib/Menu.js +1 -2
  42. package/dist/commonjs/menu/lib/MenuItem.js +1 -1
  43. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  44. package/dist/commonjs/select/lib/Select.js +2 -3
  45. package/dist/commonjs/select/lib/SelectBase.d.ts +20 -1
  46. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  47. package/dist/commonjs/select/lib/SelectBase.js +6 -4
  48. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  49. package/dist/commonjs/side-panel/lib/SidePanel.js +0 -1
  50. package/dist/commonjs/side-panel/lib/hooks.d.ts +7 -7
  51. package/dist/commonjs/text-area/index.d.ts +2 -0
  52. package/dist/commonjs/text-area/index.d.ts.map +1 -0
  53. package/dist/commonjs/text-area/index.js +6 -0
  54. package/dist/commonjs/text-area/lib/TextArea.d.ts +22 -0
  55. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -0
  56. package/dist/commonjs/text-area/lib/TextArea.js +52 -0
  57. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +8 -0
  58. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -0
  59. package/dist/commonjs/text-area/lib/TextAreaField.js +65 -0
  60. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts +5 -0
  61. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts.map +1 -0
  62. package/dist/commonjs/text-area/lib/TextAreaHint.js +4 -0
  63. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +5 -0
  64. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts.map +1 -0
  65. package/dist/commonjs/text-area/lib/TextAreaLabel.js +4 -0
  66. package/dist/commonjs/text-area/lib/hooks/index.d.ts +2 -0
  67. package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +1 -0
  68. package/dist/commonjs/text-area/lib/hooks/index.js +6 -0
  69. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
  70. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -0
  71. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +4 -0
  72. package/dist/commonjs/text-input/index.d.ts +3 -0
  73. package/dist/commonjs/text-input/index.d.ts.map +1 -0
  74. package/dist/commonjs/text-input/index.js +7 -0
  75. package/dist/commonjs/text-input/lib/TextInput.d.ts +22 -0
  76. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -0
  77. package/dist/commonjs/text-input/lib/TextInput.js +52 -0
  78. package/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
  79. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -0
  80. package/dist/commonjs/text-input/lib/TextInputField.js +67 -0
  81. package/dist/commonjs/text-input/lib/TextInputHint.d.ts +5 -0
  82. package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +1 -0
  83. package/dist/commonjs/text-input/lib/TextInputHint.js +4 -0
  84. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +5 -0
  85. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +1 -0
  86. package/dist/commonjs/text-input/lib/TextInputLabel.js +4 -0
  87. package/dist/commonjs/text-input/lib/hooks/index.d.ts +3 -0
  88. package/dist/commonjs/text-input/lib/hooks/index.d.ts.map +1 -0
  89. package/dist/commonjs/text-input/lib/hooks/index.js +7 -0
  90. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +10 -0
  91. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
  92. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +11 -0
  93. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
  94. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
  95. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +4 -0
  96. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  97. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +4 -4
  98. package/dist/es6/form-field/index.d.ts +3 -0
  99. package/dist/es6/form-field/index.d.ts.map +1 -0
  100. package/dist/es6/form-field/index.js +2 -0
  101. package/dist/es6/form-field/lib/FormField.d.ts +31 -0
  102. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -0
  103. package/dist/es6/form-field/lib/FormField.js +46 -0
  104. package/dist/es6/form-field/lib/FormFieldHint.d.ts +13 -0
  105. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -0
  106. package/dist/es6/form-field/lib/FormFieldHint.js +43 -0
  107. package/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -0
  108. package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -0
  109. package/dist/es6/form-field/lib/FormFieldInput.js +36 -0
  110. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +18 -0
  111. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -0
  112. package/dist/es6/form-field/lib/FormFieldLabel.js +49 -0
  113. package/dist/es6/form-field/lib/hooks/index.d.ts +6 -0
  114. package/dist/es6/form-field/lib/hooks/index.d.ts.map +1 -0
  115. package/dist/es6/form-field/lib/hooks/index.js +5 -0
  116. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
  117. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -0
  118. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +11 -0
  119. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
  120. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -0
  121. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +14 -0
  122. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
  123. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -0
  124. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +11 -0
  125. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
  126. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -0
  127. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +19 -0
  128. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
  129. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -0
  130. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +22 -0
  131. package/dist/es6/index.d.ts +3 -0
  132. package/dist/es6/index.d.ts.map +1 -1
  133. package/dist/es6/index.js +4 -0
  134. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  135. package/dist/es6/menu/lib/Menu.js +2 -3
  136. package/dist/es6/menu/lib/MenuItem.js +1 -1
  137. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  138. package/dist/es6/select/lib/Select.js +3 -4
  139. package/dist/es6/select/lib/SelectBase.d.ts +20 -1
  140. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  141. package/dist/es6/select/lib/SelectBase.js +6 -4
  142. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  143. package/dist/es6/side-panel/lib/SidePanel.js +0 -1
  144. package/dist/es6/side-panel/lib/hooks.d.ts +7 -7
  145. package/dist/es6/text-area/index.d.ts +2 -0
  146. package/dist/es6/text-area/index.d.ts.map +1 -0
  147. package/dist/es6/text-area/index.js +1 -0
  148. package/dist/es6/text-area/lib/TextArea.d.ts +22 -0
  149. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -0
  150. package/dist/es6/text-area/lib/TextArea.js +47 -0
  151. package/dist/es6/text-area/lib/TextAreaField.d.ts +8 -0
  152. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -0
  153. package/dist/es6/text-area/lib/TextAreaField.js +63 -0
  154. package/dist/es6/text-area/lib/TextAreaHint.d.ts +5 -0
  155. package/dist/es6/text-area/lib/TextAreaHint.d.ts.map +1 -0
  156. package/dist/es6/text-area/lib/TextAreaHint.js +2 -0
  157. package/dist/es6/text-area/lib/TextAreaLabel.d.ts +5 -0
  158. package/dist/es6/text-area/lib/TextAreaLabel.d.ts.map +1 -0
  159. package/dist/es6/text-area/lib/TextAreaLabel.js +2 -0
  160. package/dist/es6/text-area/lib/hooks/index.d.ts +2 -0
  161. package/dist/es6/text-area/lib/hooks/index.d.ts.map +1 -0
  162. package/dist/es6/text-area/lib/hooks/index.js +1 -0
  163. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
  164. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -0
  165. package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +2 -0
  166. package/dist/es6/text-input/index.d.ts +3 -0
  167. package/dist/es6/text-input/index.d.ts.map +1 -0
  168. package/dist/es6/text-input/index.js +2 -0
  169. package/dist/es6/text-input/lib/TextInput.d.ts +22 -0
  170. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -0
  171. package/dist/es6/text-input/lib/TextInput.js +47 -0
  172. package/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
  173. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -0
  174. package/dist/es6/text-input/lib/TextInputField.js +65 -0
  175. package/dist/es6/text-input/lib/TextInputHint.d.ts +5 -0
  176. package/dist/es6/text-input/lib/TextInputHint.d.ts.map +1 -0
  177. package/dist/es6/text-input/lib/TextInputHint.js +2 -0
  178. package/dist/es6/text-input/lib/TextInputLabel.d.ts +5 -0
  179. package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +1 -0
  180. package/dist/es6/text-input/lib/TextInputLabel.js +2 -0
  181. package/dist/es6/text-input/lib/hooks/index.d.ts +3 -0
  182. package/dist/es6/text-input/lib/hooks/index.d.ts.map +1 -0
  183. package/dist/es6/text-input/lib/hooks/index.js +2 -0
  184. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +10 -0
  185. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
  186. package/dist/es6/text-input/lib/hooks/useTextInputField.js +9 -0
  187. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
  188. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
  189. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -0
  190. package/form-field/LICENSE +52 -0
  191. package/form-field/README.md +8 -0
  192. package/form-field/index.ts +2 -0
  193. package/form-field/lib/FormField.tsx +58 -0
  194. package/form-field/lib/FormFieldHint.tsx +50 -0
  195. package/form-field/lib/FormFieldInput.tsx +21 -0
  196. package/form-field/lib/FormFieldLabel.tsx +64 -0
  197. package/form-field/lib/hooks/index.ts +5 -0
  198. package/form-field/lib/hooks/useFormFieldHint.tsx +12 -0
  199. package/form-field/lib/hooks/useFormFieldInput.tsx +15 -0
  200. package/form-field/lib/hooks/useFormFieldLabel.tsx +12 -0
  201. package/form-field/lib/hooks/useFormFieldModel.tsx +62 -0
  202. package/form-field/lib/hooks/useFormFieldOrientation.tsx +29 -0
  203. package/form-field/package.json +5 -0
  204. package/index.ts +5 -0
  205. package/menu/lib/Menu.tsx +3 -3
  206. package/menu/lib/MenuItem.tsx +1 -1
  207. package/package.json +7 -7
  208. package/select/lib/Select.tsx +9 -4
  209. package/select/lib/SelectBase.tsx +27 -3
  210. package/side-panel/lib/SidePanel.tsx +0 -1
  211. package/side-panel/lib/hooks.ts +7 -7
  212. package/text-area/LICENSE +52 -0
  213. package/text-area/README.md +7 -0
  214. package/text-area/index.ts +1 -0
  215. package/text-area/lib/TextArea.tsx +47 -0
  216. package/text-area/lib/TextAreaField.tsx +87 -0
  217. package/text-area/lib/TextAreaHint.tsx +6 -0
  218. package/text-area/lib/TextAreaLabel.tsx +6 -0
  219. package/text-area/lib/hooks/index.ts +1 -0
  220. package/text-area/lib/hooks/useTextAreaModel.ts +5 -0
  221. package/text-area/package.json +5 -0
  222. package/text-input/LICENSE +52 -0
  223. package/text-input/README.md +7 -0
  224. package/text-input/index.ts +2 -0
  225. package/text-input/lib/TextInput.tsx +47 -0
  226. package/text-input/lib/TextInputField.tsx +86 -0
  227. package/text-input/lib/TextInputHint.tsx +6 -0
  228. package/text-input/lib/TextInputLabel.tsx +6 -0
  229. package/text-input/lib/hooks/index.ts +2 -0
  230. package/text-input/lib/hooks/useTextInputField.tsx +10 -0
  231. package/text-input/lib/hooks/useTextInputModel.ts +5 -0
  232. package/text-input/package.json +5 -0
  233. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  234. package/ts3.5/dist/commonjs/form-field/index.d.ts +3 -0
  235. package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +31 -0
  236. package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +13 -0
  237. package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -0
  238. package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +18 -0
  239. package/ts3.5/dist/commonjs/form-field/lib/hooks/index.d.ts +6 -0
  240. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
  241. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
  242. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
  243. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
  244. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
  245. package/ts3.5/dist/commonjs/index.d.ts +3 -0
  246. package/ts3.5/dist/commonjs/select/lib/SelectBase.d.ts +20 -1
  247. package/ts3.5/dist/commonjs/side-panel/lib/hooks.d.ts +7 -7
  248. package/ts3.5/dist/commonjs/text-area/index.d.ts +2 -0
  249. package/ts3.5/dist/commonjs/text-area/lib/TextArea.d.ts +22 -0
  250. package/ts3.5/dist/commonjs/text-area/lib/TextAreaField.d.ts +8 -0
  251. package/ts3.5/dist/commonjs/text-area/lib/TextAreaHint.d.ts +5 -0
  252. package/ts3.5/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +5 -0
  253. package/ts3.5/dist/commonjs/text-area/lib/hooks/index.d.ts +2 -0
  254. package/ts3.5/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
  255. package/ts3.5/dist/commonjs/text-input/index.d.ts +3 -0
  256. package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +22 -0
  257. package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
  258. package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +5 -0
  259. package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +5 -0
  260. package/ts3.5/dist/commonjs/text-input/lib/hooks/index.d.ts +3 -0
  261. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +10 -0
  262. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
  263. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  264. package/ts3.5/dist/es6/form-field/index.d.ts +3 -0
  265. package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +31 -0
  266. package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +13 -0
  267. package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -0
  268. package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +18 -0
  269. package/ts3.5/dist/es6/form-field/lib/hooks/index.d.ts +6 -0
  270. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
  271. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
  272. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
  273. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
  274. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
  275. package/ts3.5/dist/es6/index.d.ts +3 -0
  276. package/ts3.5/dist/es6/select/lib/SelectBase.d.ts +20 -1
  277. package/ts3.5/dist/es6/side-panel/lib/hooks.d.ts +7 -7
  278. package/ts3.5/dist/es6/text-area/index.d.ts +2 -0
  279. package/ts3.5/dist/es6/text-area/lib/TextArea.d.ts +22 -0
  280. package/ts3.5/dist/es6/text-area/lib/TextAreaField.d.ts +8 -0
  281. package/ts3.5/dist/es6/text-area/lib/TextAreaHint.d.ts +5 -0
  282. package/ts3.5/dist/es6/text-area/lib/TextAreaLabel.d.ts +5 -0
  283. package/ts3.5/dist/es6/text-area/lib/hooks/index.d.ts +2 -0
  284. package/ts3.5/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
  285. package/ts3.5/dist/es6/text-input/index.d.ts +3 -0
  286. package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +22 -0
  287. package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
  288. package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +5 -0
  289. package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +5 -0
  290. package/ts3.5/dist/es6/text-input/lib/hooks/index.d.ts +3 -0
  291. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +10 -0
  292. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
@@ -0,0 +1,36 @@
1
+ import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
2
+ declare type FormFieldState = {
3
+ /**
4
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
5
+ * `required` set to true, and usually some subcomponents will have a error color applied.
6
+ * @default false
7
+ */
8
+ hasError?: boolean;
9
+ /**
10
+ * Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
11
+ * - `FormField.Input` will set `aria-describedby` to `hint-${id}`
12
+ * - `FormField.Input` will set `id` to `input-${id}`
13
+ * - `FormField.Label` will set `htmlFor` to `input-${id}`
14
+ * - `FormField.Hint` will set `id` to `hint-${id}`
15
+ *
16
+ * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
17
+ * @default `useUniqueId()`
18
+ */
19
+ id?: string;
20
+ /**
21
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
22
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
23
+ * @default false
24
+ */
25
+ isRequired?: boolean;
26
+ };
27
+ declare type FormFieldEvents = {};
28
+ export declare type FormFieldModel = Model<FormFieldState, FormFieldEvents>;
29
+ declare const formFieldEventMap: {
30
+ guards: {};
31
+ callbacks: {};
32
+ };
33
+ export declare type FormFieldModelConfig = FormFieldState & Partial<ToModelConfig<FormFieldState, FormFieldEvents, typeof formFieldEventMap>>;
34
+ export declare const useFormFieldModel: (config?: FormFieldModelConfig) => Model<FormFieldState, FormFieldEvents>;
35
+ export {};
36
+ //# sourceMappingURL=useFormFieldModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,aAAa,EAGd,MAAM,kCAAkC,CAAC;AAE1C,aAAK,cAAc,GAAG;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,aAAK,eAAe,GAAG,EAAE,CAAC;AAE1B,oBAAY,cAAc,GAAG,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAEpE,QAAA,MAAM,iBAAiB;;;CAGrB,CAAC;AAEH,oBAAY,oBAAoB,GAAG,cAAc,GAC/C,OAAO,CAAC,aAAa,CAAC,cAAc,EAAE,eAAe,EAAE,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,iBAAiB,2EAe7B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { createEventMap, useEventMap, useUniqueId, } from '@workday/canvas-kit-react/common';
2
+ var formFieldEventMap = createEventMap()({
3
+ guards: {},
4
+ callbacks: {},
5
+ });
6
+ export var useFormFieldModel = function (config) {
7
+ if (config === void 0) { config = {}; }
8
+ var id = useUniqueId(config.id);
9
+ var state = {
10
+ hasError: config.hasError,
11
+ isRequired: config.isRequired,
12
+ id: id,
13
+ };
14
+ var events = useEventMap(formFieldEventMap, state, config, {});
15
+ return {
16
+ state: state,
17
+ events: events,
18
+ };
19
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Adds the necessary layout props to a `FormField` component.
3
+ */
4
+ export declare const useFormFieldOrientation: (orientation: "horizontal" | "vertical") => {
5
+ flexDirection: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
6
+ alignItems: (string & {}) | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | undefined;
7
+ spacing: number | (string & {}) | "s" | "zero" | "m" | "l" | "xl" | "xxxs" | "xxs" | "xs" | "xxl" | "xxxl";
8
+ };
9
+ //# sourceMappingURL=useFormFieldOrientation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;CAsBnC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { space } from '@workday/canvas-kit-react/tokens';
2
+ /**
3
+ * Adds the necessary layout props to a `FormField` component.
4
+ */
5
+ export var useFormFieldOrientation = function (orientation) {
6
+ var layoutProps;
7
+ if (orientation === 'horizontal') {
8
+ layoutProps = {
9
+ flexDirection: 'row',
10
+ spacing: space.l,
11
+ alignItems: 'center',
12
+ };
13
+ }
14
+ else {
15
+ layoutProps = {
16
+ flexDirection: 'column',
17
+ spacing: space.xxxs,
18
+ alignItems: 'flex-start',
19
+ };
20
+ }
21
+ return layoutProps;
22
+ };
@@ -1,6 +1,9 @@
1
1
  export * from './breadcrumbs';
2
2
  export * from './color-picker';
3
+ export * from './form-field';
3
4
  export * from './menu';
4
5
  export * from './select';
5
6
  export * from './side-panel';
7
+ export * from './text-area';
8
+ export * from './text-input';
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
package/dist/es6/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  export * from './breadcrumbs';
2
2
  export * from './color-picker';
3
+ export * from './form-field';
3
4
  export * from './menu';
4
5
  export * from './select';
5
6
  export * from './side-panel';
7
+ export * from './text-area';
8
+ export * from './text-input';
9
+ /// <reference types="@types/node" />
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhF,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CA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H,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrE,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,SAAS;IAe5B,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAevC,iBAAiB;IAKjB,oBAAoB;IAIb,MAAM;IAmDN,sBAAsB,wCAQ3B;IAEK,sBAAsB,sCAE3B;IAEF,OAAO,CAAC,uBAAuB,CA4E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA+BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
@@ -35,10 +35,9 @@ var __rest = (this && this.__rest) || function (s, e) {
35
35
  };
36
36
  import * as React from 'react';
37
37
  import styled from '@emotion/styled';
38
- import uuid from 'uuid/v4';
39
38
  import { Card } from '@workday/canvas-kit-react/card';
40
39
  import { commonColors, space, borderRadius } from '@workday/canvas-kit-react/tokens';
41
- import { hideMouseFocus } from '@workday/canvas-kit-react/common';
40
+ import { hideMouseFocus, generateUniqueId } from '@workday/canvas-kit-react/common';
42
41
  var List = styled('ul')(__assign({ background: commonColors.background, borderRadius: borderRadius.m, padding: 0, margin: space.xxs + " 0", '&:focus': {
43
42
  outline: 'none',
44
43
  } }, hideMouseFocus));
@@ -46,7 +45,7 @@ var Menu = /** @class */ (function (_super) {
46
45
  __extends(Menu, _super);
47
46
  function Menu(props) {
48
47
  var _this = _super.call(this, props) || this;
49
- _this.id = uuid();
48
+ _this.id = generateUniqueId();
50
49
  _this.getNormalizedItemIndex = function (index) {
51
50
  var itemCount = React.Children.count(_this.props.children);
52
51
  var firstItem = 0;
@@ -196,7 +196,7 @@ var MenuItem = /** @class */ (function (_super) {
196
196
  secondaryIconProps = setIconProps(secondaryIcon, isDisabled, isFocused);
197
197
  return (React.createElement(React.Fragment, null,
198
198
  hasDivider && React.createElement(Divider, null),
199
- React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: role, onClick: this.handleClick, "aria-disabled": !!isDisabled, isDisabled: !!isDisabled, isFocused: !!isFocused }, elemProps),
199
+ React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: role, onClick: this.handleClick, "aria-disabled": isDisabled ? true : undefined, isDisabled: !!isDisabled, isFocused: !!isFocused }, elemProps),
200
200
  icon && iconProps && React.createElement(StyledSystemIcon, __assign({}, iconProps)),
201
201
  React.createElement(LabelContainer, null, children),
202
202
  secondaryIcon && secondaryIconProps && (React.createElement(SecondaryStyledSystemIcon, __assign({}, secondaryIconProps))))));
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAA0C,MAAM,kCAAkC,CAAC;AAEpG,OAAmB,EAAC,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAKvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;OAcG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAmiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAmB,EAAC,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;OAcG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAmiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -34,11 +34,10 @@ var __rest = (this && this.__rest) || function (s, e) {
34
34
  return t;
35
35
  };
36
36
  import * as React from 'react';
37
- import { ErrorType, createComponent, useForkRef } from '@workday/canvas-kit-react/common';
37
+ import { ErrorType, createComponent, useForkRef, generateUniqueId, } from '@workday/canvas-kit-react/common';
38
38
  import { menuAnimationDuration } from './SelectMenu';
39
39
  import SelectBase from './SelectBase';
40
40
  import { getCorrectedIndexByValue } from './utils';
41
- import uuid from 'uuid/v4';
42
41
  var SelectContainer = /** @class */ (function (_super) {
43
42
  __extends(SelectContainer, _super);
44
43
  function SelectContainer(props) {
@@ -76,14 +75,14 @@ var SelectContainer = /** @class */ (function (_super) {
76
75
  var disabled, id, label, value;
77
76
  if (typeof option === 'string') {
78
77
  disabled = false;
79
- id = uuid();
78
+ id = generateUniqueId();
80
79
  value = option;
81
80
  label = option;
82
81
  }
83
82
  else {
84
83
  data = option.data || data;
85
84
  disabled = !!option.disabled;
86
- id = option.id || uuid();
85
+ id = option.id || generateUniqueId();
87
86
  value = option.value;
88
87
  label = option.label || option.value;
89
88
  }
@@ -17,6 +17,9 @@ export interface NormalizedOption extends Option {
17
17
  id: string;
18
18
  label: string;
19
19
  }
20
+ export interface RenderSelectedFunction {
21
+ (option: NormalizedOption): React.ReactNode;
22
+ }
20
23
  export interface RenderableOption extends NormalizedOption {
21
24
  focused: boolean;
22
25
  selected: boolean;
@@ -47,6 +50,22 @@ export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<Rea
47
50
  * @default defaultRenderOption
48
51
  */
49
52
  renderOption?: RenderOptionFunction;
53
+ /**
54
+ * The function called to render the selected option.
55
+ *
56
+ * The `option` argument passed to the function is an object which contains the following:
57
+ *
58
+ * * `data: object` (data object carried over from the corresponding option originally passed into the component)
59
+ * * `disabled: boolean`
60
+ * * `id: string`
61
+ * * `label: string`
62
+ * * `value: string`
63
+ *
64
+ * If you omit the `renderSelected` prop, each option will be rendered using a `defaultRenderSelected` function provided by the component.
65
+ *
66
+ * @default defaultRenderSelected
67
+ */
68
+ renderSelected?: RenderSelectedFunction;
50
69
  /**
51
70
  * The value of the Select.
52
71
  */
@@ -118,6 +137,6 @@ export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
118
137
  }
119
138
  export declare const buttonBorderWidth = 1;
120
139
  export declare const buttonDefaultWidth = 280;
121
- declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onClose, onOptionSelection, options, renderOption, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
140
+ declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onClose, onOptionSelection, options, renderOption, renderSelected, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
122
141
  export default SelectBase;
123
142
  //# sourceMappingURL=SelectBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/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M,CAAC;AA8GtC,QAAA,MAAM,UAAU,6YA0Lf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -101,10 +101,13 @@ var SelectWrapper = styled('div')({
101
101
  });
102
102
  });
103
103
  var defaultRenderOption = function (option) {
104
- return React.createElement("div", null, option.label);
104
+ return React.createElement("div", null, defaultRenderSelected(option));
105
+ };
106
+ var defaultRenderSelected = function (option) {
107
+ return option.label;
105
108
  };
106
109
  var SelectBase = function (_a) {
107
- var ariaLabelledBy = _a["aria-labelledby"], ariaRequired = _a["aria-required"], as = _a.as, forwardedButtonRef = _a.forwardedButtonRef, localButtonRef = _a.localButtonRef, disabled = _a.disabled, error = _a.error, _b = _a.focusedOptionIndex, focusedOptionIndex = _b === void 0 ? 0 : _b, grow = _a.grow, inputRef = _a.inputRef, _c = _a.menuPlacement, menuPlacement = _c === void 0 ? 'bottom' : _c, menuRef = _a.menuRef, _d = _a.menuVisibility, menuVisibility = _d === void 0 ? 'closed' : _d, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onClose = _a.onClose, onOptionSelection = _a.onOptionSelection, options = _a.options, _e = _a.renderOption, renderOption = _e === void 0 ? defaultRenderOption : _e, required = _a.required, _f = _a.shouldMenuAutoFlip, shouldMenuAutoFlip = _f === void 0 ? true : _f, _g = _a.shouldMenuAutoFocus, shouldMenuAutoFocus = _g === void 0 ? true : _g, value = _a.value, elemProps = __rest(_a, ['aria-labelledby', 'aria-required', "as", "forwardedButtonRef", "localButtonRef", "disabled", "error", "focusedOptionIndex", "grow", "inputRef", "menuPlacement", "menuRef", "menuVisibility", "onChange", "onKeyDown", "onClose", "onOptionSelection", "options", "renderOption", "required", "shouldMenuAutoFlip", "shouldMenuAutoFocus", "value"]);
110
+ var ariaLabelledBy = _a["aria-labelledby"], ariaRequired = _a["aria-required"], as = _a.as, forwardedButtonRef = _a.forwardedButtonRef, localButtonRef = _a.localButtonRef, disabled = _a.disabled, error = _a.error, _b = _a.focusedOptionIndex, focusedOptionIndex = _b === void 0 ? 0 : _b, grow = _a.grow, inputRef = _a.inputRef, _c = _a.menuPlacement, menuPlacement = _c === void 0 ? 'bottom' : _c, menuRef = _a.menuRef, _d = _a.menuVisibility, menuVisibility = _d === void 0 ? 'closed' : _d, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onClose = _a.onClose, onOptionSelection = _a.onOptionSelection, options = _a.options, _e = _a.renderOption, renderOption = _e === void 0 ? defaultRenderOption : _e, _f = _a.renderSelected, renderSelected = _f === void 0 ? defaultRenderSelected : _f, required = _a.required, _g = _a.shouldMenuAutoFlip, shouldMenuAutoFlip = _g === void 0 ? true : _g, _h = _a.shouldMenuAutoFocus, shouldMenuAutoFocus = _h === void 0 ? true : _h, value = _a.value, elemProps = __rest(_a, ['aria-labelledby', 'aria-required', "as", "forwardedButtonRef", "localButtonRef", "disabled", "error", "focusedOptionIndex", "grow", "inputRef", "menuPlacement", "menuRef", "menuVisibility", "onChange", "onKeyDown", "onClose", "onOptionSelection", "options", "renderOption", "renderSelected", "required", "shouldMenuAutoFlip", "shouldMenuAutoFocus", "value"]);
108
111
  var focusedOptionRef = React.useRef(null);
109
112
  var menuId = useUniqueId();
110
113
  var renderOptions = function (renderOption) {
@@ -179,7 +182,6 @@ var SelectBase = function (_a) {
179
182
  // Do a bit of error-checking in case options weren't provided
180
183
  var hasOptions = options.length > 0;
181
184
  var selectedOption = hasOptions ? options[getCorrectedIndexByValue(options, value)] : null;
182
- var selectedOptionLabel = selectedOption ? selectedOption.label : '';
183
185
  var selectedOptionValue = selectedOption ? selectedOption.value : '';
184
186
  return (React.createElement(SelectWrapper, { grow: grow, disabled: disabled },
185
187
  React.createElement(SelectButton, __assign({ "aria-expanded": menuVisibility !== 'closed' ? 'true' : undefined, "aria-haspopup": "listbox", "aria-controls": menuVisibility !== 'closed' ? menuId : undefined, as: as, disabled: disabled, error: error, grow: grow, menuVisibility: menuVisibility, onKeyDown: onKeyDown,
@@ -188,7 +190,7 @@ var SelectBase = function (_a) {
188
190
  // the menu)
189
191
  onKeyUp: function (e) {
190
192
  e.preventDefault();
191
- }, ref: forwardedButtonRef, type: "button", value: selectedOptionValue }, elemProps), selectedOptionLabel),
193
+ }, ref: forwardedButtonRef, type: "button", value: selectedOptionValue }, elemProps), !!selectedOption && renderSelected(selectedOption)),
192
194
  React.createElement(SelectInput, { onChange: onChange, ref: inputRef, type: "text", value: selectedOptionValue }),
193
195
  hasOptions && menuVisibility !== 'closed' && (React.createElement(SelectMenu, { "aria-activedescendant": options[focusedOptionIndex].id, "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired || required ? true : undefined, buttonRef: localButtonRef, id: menuId, error: error, menuRef: menuRef, onKeyDown: onKeyDown, onClose: onClose, placement: menuPlacement, shouldAutoFlip: shouldMenuAutoFlip, shouldAutoFocus: shouldMenuAutoFocus, visibility: menuVisibility }, renderOptions(renderOption))),
194
196
  React.createElement(SelectMenuIcon, { className: "menu-icon", icon: caretDownSmallIcon, color: disabled ? colors.licorice100 : colors.licorice200, colorHover: disabled ? colors.licorice100 : colors.licorice500, size: menuIconSize })));
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../../../side-panel/lib/SidePanel.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAa,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAI7E,oBAAY,gBAAgB,GAAG,UAAU,GAAG,WAAW,CAAC;AACxD,oBAAY,yBAAyB,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAE9F,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;;OAIG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,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AChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAChE;;;;OAIG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAsCD,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,QAAA,MAAM,SAAS;;;CAgGd,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AA0CpE,eAAe,SAAS,CAAC"}
@@ -120,7 +120,6 @@ var ToggleButton = function (_a) {
120
120
  var context = React.useContext(SidePanelContext);
121
121
  var useRTLOrigin = function () {
122
122
  var isRTL = useIsRTL();
123
- console.log('is RTL?', isRTL);
124
123
  // if the direction is set to RTl, flip the origin
125
124
  if (isRTL) {
126
125
  return context.origin === 'left' ? 'right' : 'left';
@@ -9,12 +9,12 @@ export interface UseSidePanelProps {
9
9
  initialExpanded?: boolean;
10
10
  /**
11
11
  * sets the `id` for the panel
12
- * @default `uuid`-generated string
12
+ * @default unique identifier
13
13
  */
14
14
  panelId?: string;
15
15
  /**
16
16
  * sets the `id` for the label
17
- * @default `uuid`-generated string
17
+ * @default unique identifier
18
18
  */
19
19
  labelId?: string;
20
20
  }
@@ -28,12 +28,12 @@ export interface PanelProps {
28
28
  expanded: boolean;
29
29
  /**
30
30
  * the accessible `id`
31
- * - this will either be a `uuid`-generated value or the `panelId` provided in the config
31
+ * - this will either be a unique identifier value or the `panelId` provided in the config
32
32
  */
33
33
  id: string;
34
34
  /**
35
35
  * the accessible label `id`
36
- * - this will either be a `uuid`-generated value or the `labelId` provided in the config
36
+ * - this will either be a unique identifier value or the `labelId` provided in the config
37
37
  */
38
38
  'aria-labelledby': string;
39
39
  /**
@@ -45,14 +45,14 @@ export interface PanelProps {
45
45
  export interface LabelProps {
46
46
  /**
47
47
  * the accessible `id`
48
- * - this will either be a `uuid`-generated value or the `labelId` provided in the config
48
+ * - this will either be a unique identifier value or the `labelId` provided in the config
49
49
  */
50
50
  id: string;
51
51
  }
52
52
  export interface ControlProps {
53
53
  /**
54
54
  * the accessible `id` that connects the panel to this control
55
- * - this will either be a `uuid`-generated value or the `panelId` provided in the config
55
+ * - this will either be a unique identifier value or the `panelId` provided in the config
56
56
  */
57
57
  'aria-controls': string;
58
58
  /**
@@ -62,7 +62,7 @@ export interface ControlProps {
62
62
  'aria-expanded': boolean;
63
63
  /**
64
64
  * the accessible label `id`
65
- * - this will either be a `uuid`-generated value or the `labelId` provided in the config
65
+ * - this will either be a unique identifier value or the `labelId` provided in the config
66
66
  */
67
67
  'aria-labelledby': string;
68
68
  /**
@@ -0,0 +1,2 @@
1
+ export * from './lib/TextArea';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text-area/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './lib/TextArea';
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
3
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
4
+ import { TextAreaModel } from './hooks';
5
+ export declare const TextAreaModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
6
+ hasError?: boolean | undefined;
7
+ id?: string | undefined;
8
+ isRequired?: boolean | undefined;
9
+ }, {}>>;
10
+ export interface TextAreaProps extends ExtractProps<typeof FormField, never> {
11
+ model?: TextAreaModel;
12
+ /**
13
+ * Children of the Text Input. Should contain a `<TextArea.Field>`, a `<TextArea.Label>` and an optional `<TextArea.Hint>`
14
+ */
15
+ children: React.ReactNode;
16
+ }
17
+ export declare const TextArea: import("@workday/canvas-kit-react/common").Component<TextAreaProps> & {
18
+ Field: import("@workday/canvas-kit-react/common").ElementComponent<"textarea", import("./TextAreaField").TextAreaFieldProps>;
19
+ Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps>;
20
+ Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("../../form-field/lib/FormFieldHint").FormFieldHintProps>;
21
+ };
22
+ //# sourceMappingURL=TextArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAChG,OAAO,EACL,SAAS,EAGV,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAC,aAAa,EAAmB,MAAM,SAAS,CAAC;AAKxD,eAAO,MAAM,oBAAoB;;;;OAAwB,CAAC;AAE1D,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC1E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ;;;;CAqBnB,CAAC"}
@@ -0,0 +1,47 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { createComponent, useDefaultModel } from '@workday/canvas-kit-react/common';
25
+ import { FormFieldModelContext, useFormFieldOrientation, } from '@workday/canvas-kit-preview-react/form-field';
26
+ import { Stack } from '@workday/canvas-kit-labs-react/layout';
27
+ import { useTextAreaModel } from './hooks';
28
+ import { TextAreaField } from './TextAreaField';
29
+ import { TextAreaLabel } from './TextAreaLabel';
30
+ import { TextAreaHint } from './TextAreaHint';
31
+ export var TextAreaModelContext = FormFieldModelContext;
32
+ export var TextArea = createComponent()({
33
+ displayName: 'TextArea',
34
+ Component: function (_a, ref) {
35
+ var children = _a.children, model = _a.model, orientation = _a.orientation, props = __rest(_a, ["children", "model", "orientation"]);
36
+ var hasError = props.hasError, id = props.id, isRequired = props.isRequired, elemProps = __rest(props, ["hasError", "id", "isRequired"]);
37
+ var value = useDefaultModel(model, { hasError: hasError, id: id, isRequired: isRequired }, useTextAreaModel);
38
+ var layoutProps = useFormFieldOrientation(orientation);
39
+ return (React.createElement(TextAreaModelContext.Provider, { value: value },
40
+ React.createElement(Stack, __assign({ ref: ref }, layoutProps, elemProps), children)));
41
+ },
42
+ subComponents: {
43
+ Field: TextAreaField,
44
+ Label: TextAreaLabel,
45
+ Hint: TextAreaHint,
46
+ },
47
+ });
@@ -0,0 +1,8 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
3
+ import { TextAreaModel } from './hooks';
4
+ export interface TextAreaFieldProps extends ExtractProps<typeof FormField.Input, never> {
5
+ model?: TextAreaModel;
6
+ }
7
+ export declare const TextAreaField: import("@workday/canvas-kit-react/common").ElementComponent<"textarea", TextAreaFieldProps>;
8
+ //# sourceMappingURL=TextAreaField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAGvE,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACrF,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AA4BD,eAAO,MAAM,aAAa,6FAkCxB,CAAC"}
@@ -0,0 +1,63 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ /** @jsx jsx */
24
+ import { jsx } from '@emotion/core';
25
+ import { borderRadius, inputColors, spaceNumbers, type, } from '@workday/canvas-kit-react/tokens';
26
+ import { createComponent, useModelContext, useTheme, } from '@workday/canvas-kit-react/common';
27
+ import { useThemedRing } from '@workday/canvas-kit-labs-react/common';
28
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
29
+ import { TextAreaModelContext } from './TextArea';
30
+ var baseStyles = __assign(__assign({}, type.levels.subtext.large), { transition: '0.2s box-shadow, 0.2s border-color', resize: 'both', '&::webkit-resizer': {
31
+ display: 'none',
32
+ }, '&::placeholder': {
33
+ color: inputColors.placeholder,
34
+ }, '&:hover': {
35
+ borderColor: inputColors.hoverBorder,
36
+ }, '&:focus:not([disabled])': {
37
+ outline: 'none',
38
+ }, '&:disabled': {
39
+ backgroundColor: inputColors.disabled.background,
40
+ borderColor: inputColors.disabled.border,
41
+ color: inputColors.disabled.text,
42
+ '&::placeholder': {
43
+ color: inputColors.disabled.text,
44
+ },
45
+ } });
46
+ export var TextAreaField = createComponent('textarea')({
47
+ displayName: 'TextArea.Field',
48
+ Component: function (_a, ref) {
49
+ var model = _a.model, elemProps = __rest(_a, ["model"]);
50
+ var localModel = useModelContext(TextAreaModelContext, model);
51
+ var theme = useTheme();
52
+ var errorRing = useThemedRing('error');
53
+ var focusStyles = localModel.state.hasError
54
+ ? errorRing
55
+ : {
56
+ '&:focus:not([disabled])': {
57
+ borderColor: theme.canvas.palette.common.focusOutline,
58
+ boxShadow: "inset 0 0 0 1px " + theme.canvas.palette.common.focusOutline,
59
+ },
60
+ };
61
+ return (jsx(FormField.Input, __assign({ as: "textarea", ref: ref, css: [baseStyles, focusStyles] }, elemProps, { border: "1px solid " + inputColors.border, display: "block", backgroundColor: inputColors.background, borderRadius: borderRadius.m, minHeight: 64, minWidth: 280, padding: spaceNumbers.xxs, margin: 0 })));
62
+ },
63
+ });
@@ -0,0 +1,5 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
3
+ export declare type TextAreaHintProps = ExtractProps<typeof FormField.Hint, never>;
4
+ export declare const TextAreaHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("../../form-field/lib/FormFieldHint").FormFieldHintProps>;
5
+ //# sourceMappingURL=TextAreaHint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAreaHint.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaHint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAEvE,oBAAY,iBAAiB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAE3E,eAAO,MAAM,YAAY,mIAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
2
+ export var TextAreaHint = FormField.Hint;
@@ -0,0 +1,5 @@
1
+ import { ExtractProps } from '@workday/canvas-kit-react/common';
2
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
3
+ export declare type TextAreaLabelProps = ExtractProps<typeof FormField.Label, never>;
4
+ export declare const TextAreaLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps>;
5
+ //# sourceMappingURL=TextAreaLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAreaLabel.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAEvE,oBAAY,kBAAkB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE7E,eAAO,MAAM,aAAa,yIAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { FormField } from '@workday/canvas-kit-preview-react/form-field';
2
+ export var TextAreaLabel = FormField.Label;
@@ -0,0 +1,2 @@
1
+ export * from './useTextAreaModel';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './useTextAreaModel';
@@ -0,0 +1,8 @@
1
+ import { FormFieldModel } from '@workday/canvas-kit-preview-react/form-field';
2
+ export declare const useTextAreaModel: (config?: import("../../../form-field").FormFieldModelConfig) => import("@workday/canvas-kit-react/common").Model<{
3
+ hasError?: boolean | undefined;
4
+ id?: string | undefined;
5
+ isRequired?: boolean | undefined;
6
+ }, {}>;
7
+ export declare type TextAreaModel = FormFieldModel;
8
+ //# sourceMappingURL=useTextAreaModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTextAreaModel.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/useTextAreaModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,cAAc,EAAC,MAAM,8CAA8C,CAAC;AAE/F,eAAO,MAAM,gBAAgB;;;;MAAoB,CAAC;AAElD,oBAAY,aAAa,GAAG,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { useFormFieldModel } from '@workday/canvas-kit-preview-react/form-field';
2
+ export var useTextAreaModel = useFormFieldModel;
@@ -0,0 +1,3 @@
1
+ export * from './lib/TextInput';
2
+ export * from './lib/hooks';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './lib/TextInput';
2
+ export * from './lib/hooks';