@workday/canvas-kit-preview-react 7.0.0-alpha.0-next.6 → 7.0.0-alpha.101-next.26

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 (361) hide show
  1. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +51 -22
  2. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +2 -2
  3. package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
  4. package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +5 -1
  5. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +1 -1
  6. package/color-picker/lib/ColorPicker.tsx +3 -3
  7. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
  8. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
  9. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +33 -5
  10. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +2 -2
  11. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
  12. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
  13. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
  14. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +2 -2
  15. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
  16. package/dist/commonjs/color-picker/lib/ColorPicker.js +2 -2
  17. package/dist/commonjs/form-field/lib/FormField.d.ts +47 -13
  18. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  19. package/dist/commonjs/form-field/lib/FormField.js +8 -12
  20. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +8 -12
  21. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
  22. package/dist/commonjs/form-field/lib/FormFieldHint.js +13 -15
  23. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -7
  24. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -1
  25. package/dist/commonjs/form-field/lib/FormFieldInput.js +6 -20
  26. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +9 -4
  27. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  28. package/dist/commonjs/form-field/lib/FormFieldLabel.js +11 -14
  29. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +8 -5
  30. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  31. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +2 -1
  32. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +8 -5
  33. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  34. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +2 -1
  35. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -5
  36. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  37. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +2 -1
  38. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
  39. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  40. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +41 -15
  41. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
  42. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  43. package/dist/commonjs/index.d.ts +1 -0
  44. package/dist/commonjs/index.d.ts.map +1 -1
  45. package/dist/commonjs/index.js +1 -0
  46. package/dist/commonjs/menu/lib/Menu.js +1 -1
  47. package/dist/commonjs/pill/index.d.ts +3 -0
  48. package/dist/commonjs/pill/index.d.ts.map +1 -0
  49. package/dist/commonjs/pill/index.js +14 -0
  50. package/dist/commonjs/pill/lib/Pill.d.ts +58 -0
  51. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -0
  52. package/dist/commonjs/pill/lib/Pill.js +164 -0
  53. package/dist/commonjs/pill/lib/PillAvatar.d.ts +11 -0
  54. package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +1 -0
  55. package/dist/commonjs/pill/lib/PillAvatar.js +29 -0
  56. package/dist/commonjs/pill/lib/PillCount.d.ts +5 -0
  57. package/dist/commonjs/pill/lib/PillCount.d.ts.map +1 -0
  58. package/dist/commonjs/pill/lib/PillCount.js +45 -0
  59. package/dist/commonjs/pill/lib/PillIcon.d.ts +17 -0
  60. package/dist/commonjs/pill/lib/PillIcon.d.ts.map +1 -0
  61. package/dist/commonjs/pill/lib/PillIcon.js +40 -0
  62. package/dist/commonjs/pill/lib/PillIconButton.d.ts +17 -0
  63. package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -0
  64. package/dist/commonjs/pill/lib/PillIconButton.js +88 -0
  65. package/dist/commonjs/pill/lib/PillLabel.d.ts +13 -0
  66. package/dist/commonjs/pill/lib/PillLabel.d.ts.map +1 -0
  67. package/dist/commonjs/pill/lib/PillLabel.js +47 -0
  68. package/dist/commonjs/pill/lib/usePillModel.d.ts +58 -0
  69. package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -0
  70. package/dist/commonjs/pill/lib/usePillModel.js +31 -0
  71. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +4 -4
  72. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  73. package/dist/commonjs/side-panel/lib/SidePanel.js +24 -9
  74. package/dist/commonjs/text-area/lib/TextArea.d.ts +52 -11
  75. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  76. package/dist/commonjs/text-area/lib/TextArea.js +10 -16
  77. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +15 -7
  78. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  79. package/dist/commonjs/text-area/lib/TextAreaField.js +16 -17
  80. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
  81. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
  82. package/dist/commonjs/text-input/lib/TextInput.d.ts +59 -11
  83. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  84. package/dist/commonjs/text-input/lib/TextInput.js +10 -16
  85. package/dist/commonjs/text-input/lib/TextInputField.d.ts +15 -7
  86. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  87. package/dist/commonjs/text-input/lib/TextInputField.js +15 -29
  88. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +8 -1
  89. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  90. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +2 -1
  91. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
  92. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  93. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
  94. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
  95. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +35 -7
  96. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +2 -2
  97. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
  98. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
  99. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
  100. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +2 -2
  101. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
  102. package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
  103. package/dist/es6/form-field/lib/FormField.d.ts +47 -13
  104. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  105. package/dist/es6/form-field/lib/FormField.js +9 -13
  106. package/dist/es6/form-field/lib/FormFieldHint.d.ts +8 -12
  107. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
  108. package/dist/es6/form-field/lib/FormFieldHint.js +14 -16
  109. package/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -7
  110. package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -1
  111. package/dist/es6/form-field/lib/FormFieldInput.js +8 -22
  112. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +9 -4
  113. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  114. package/dist/es6/form-field/lib/FormFieldLabel.js +12 -15
  115. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +8 -5
  116. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  117. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +3 -2
  118. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +8 -5
  119. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  120. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -2
  121. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -5
  122. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  123. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +3 -2
  124. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
  125. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  126. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +42 -15
  127. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
  128. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  129. package/dist/es6/index.d.ts +1 -0
  130. package/dist/es6/index.d.ts.map +1 -1
  131. package/dist/es6/index.js +1 -0
  132. package/dist/es6/menu/lib/Menu.js +1 -1
  133. package/dist/es6/pill/index.d.ts +3 -0
  134. package/dist/es6/pill/index.d.ts.map +1 -0
  135. package/dist/es6/pill/index.js +2 -0
  136. package/dist/es6/pill/lib/Pill.d.ts +58 -0
  137. package/dist/es6/pill/lib/Pill.d.ts.map +1 -0
  138. package/dist/es6/pill/lib/Pill.js +158 -0
  139. package/dist/es6/pill/lib/PillAvatar.d.ts +12 -0
  140. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -0
  141. package/dist/es6/pill/lib/PillAvatar.js +23 -0
  142. package/dist/es6/pill/lib/PillCount.d.ts +5 -0
  143. package/dist/es6/pill/lib/PillCount.d.ts.map +1 -0
  144. package/dist/es6/pill/lib/PillCount.js +39 -0
  145. package/dist/es6/pill/lib/PillIcon.d.ts +18 -0
  146. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -0
  147. package/dist/es6/pill/lib/PillIcon.js +34 -0
  148. package/dist/es6/pill/lib/PillIconButton.d.ts +18 -0
  149. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -0
  150. package/dist/es6/pill/lib/PillIconButton.js +82 -0
  151. package/dist/es6/pill/lib/PillLabel.d.ts +14 -0
  152. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -0
  153. package/dist/es6/pill/lib/PillLabel.js +41 -0
  154. package/dist/es6/pill/lib/usePillModel.d.ts +58 -0
  155. package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -0
  156. package/dist/es6/pill/lib/usePillModel.js +28 -0
  157. package/dist/es6/side-panel/lib/SidePanel.d.ts +4 -4
  158. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  159. package/dist/es6/side-panel/lib/SidePanel.js +26 -11
  160. package/dist/es6/text-area/lib/TextArea.d.ts +52 -11
  161. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  162. package/dist/es6/text-area/lib/TextArea.js +11 -17
  163. package/dist/es6/text-area/lib/TextAreaField.d.ts +15 -7
  164. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  165. package/dist/es6/text-area/lib/TextAreaField.js +17 -18
  166. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
  167. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
  168. package/dist/es6/text-input/lib/TextInput.d.ts +59 -11
  169. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  170. package/dist/es6/text-input/lib/TextInput.js +11 -17
  171. package/dist/es6/text-input/lib/TextInputField.d.ts +15 -7
  172. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  173. package/dist/es6/text-input/lib/TextInputField.js +17 -31
  174. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +8 -1
  175. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  176. package/dist/es6/text-input/lib/hooks/useTextInputField.js +3 -2
  177. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
  178. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  179. package/form-field/lib/FormField.tsx +14 -29
  180. package/form-field/lib/FormFieldHint.tsx +22 -33
  181. package/form-field/lib/FormFieldInput.tsx +8 -15
  182. package/form-field/lib/FormFieldLabel.tsx +18 -23
  183. package/form-field/lib/hooks/useFormFieldHint.tsx +3 -3
  184. package/form-field/lib/hooks/useFormFieldInput.tsx +3 -3
  185. package/form-field/lib/hooks/useFormFieldLabel.tsx +3 -3
  186. package/form-field/lib/hooks/useFormFieldModel.tsx +32 -53
  187. package/form-field/lib/hooks/useFormFieldOrientation.tsx +1 -1
  188. package/index.ts +1 -0
  189. package/menu/lib/Menu.tsx +1 -1
  190. package/package.json +9 -18
  191. package/pill/LICENSE +52 -0
  192. package/pill/README.md +5 -0
  193. package/pill/index.ts +2 -0
  194. package/pill/lib/Pill.tsx +218 -0
  195. package/pill/lib/PillAvatar.tsx +26 -0
  196. package/pill/lib/PillCount.tsx +39 -0
  197. package/pill/lib/PillIcon.tsx +32 -0
  198. package/pill/lib/PillIconButton.tsx +96 -0
  199. package/pill/lib/PillLabel.tsx +35 -0
  200. package/pill/lib/usePillModel.tsx +21 -0
  201. package/pill/package.json +5 -0
  202. package/side-panel/lib/SidePanel.tsx +36 -21
  203. package/text-area/lib/TextArea.tsx +16 -30
  204. package/text-area/lib/TextAreaField.tsx +30 -44
  205. package/text-area/lib/hooks/useTextAreaModel.ts +1 -3
  206. package/text-input/lib/TextInput.tsx +16 -30
  207. package/text-input/lib/TextInputField.tsx +31 -43
  208. package/text-input/lib/hooks/useTextInputField.tsx +3 -2
  209. package/text-input/lib/hooks/useTextInputModel.ts +1 -3
  210. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
  211. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts.map +0 -1
  212. package/dist/commonjs/text-area/lib/TextAreaHint.js +0 -5
  213. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
  214. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts.map +0 -1
  215. package/dist/commonjs/text-area/lib/TextAreaLabel.js +0 -5
  216. package/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
  217. package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +0 -1
  218. package/dist/commonjs/text-input/lib/TextInputHint.js +0 -5
  219. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
  220. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +0 -1
  221. package/dist/commonjs/text-input/lib/TextInputLabel.js +0 -5
  222. package/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
  223. package/dist/es6/text-area/lib/TextAreaHint.d.ts.map +0 -1
  224. package/dist/es6/text-area/lib/TextAreaHint.js +0 -2
  225. package/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
  226. package/dist/es6/text-area/lib/TextAreaLabel.d.ts.map +0 -1
  227. package/dist/es6/text-area/lib/TextAreaLabel.js +0 -2
  228. package/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
  229. package/dist/es6/text-input/lib/TextInputHint.d.ts.map +0 -1
  230. package/dist/es6/text-input/lib/TextInputHint.js +0 -2
  231. package/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
  232. package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +0 -1
  233. package/dist/es6/text-input/lib/TextInputLabel.js +0 -2
  234. package/text-area/lib/TextAreaHint.tsx +0 -6
  235. package/text-area/lib/TextAreaLabel.tsx +0 -6
  236. package/text-input/lib/TextInputHint.tsx +0 -6
  237. package/text-input/lib/TextInputLabel.tsx +0 -6
  238. package/ts3.5/dist/commonjs/breadcrumbs/index.d.ts +0 -5
  239. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  240. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  241. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  242. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  243. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  244. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  245. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  246. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  247. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  248. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  249. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  250. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  251. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  252. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  253. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  254. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  255. package/ts3.5/dist/commonjs/color-picker/index.d.ts +0 -2
  256. package/ts3.5/dist/commonjs/color-picker/lib/ColorPicker.d.ts +0 -55
  257. package/ts3.5/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts +0 -7
  258. package/ts3.5/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts +0 -7
  259. package/ts3.5/dist/commonjs/form-field/index.d.ts +0 -3
  260. package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +0 -31
  261. package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +0 -13
  262. package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +0 -8
  263. package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +0 -18
  264. package/ts3.5/dist/commonjs/form-field/lib/hooks/index.d.ts +0 -6
  265. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +0 -14
  266. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +0 -17
  267. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -14
  268. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
  269. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -10
  270. package/ts3.5/dist/commonjs/index.d.ts +0 -9
  271. package/ts3.5/dist/commonjs/menu/index.d.ts +0 -6
  272. package/ts3.5/dist/commonjs/menu/lib/Menu.d.ts +0 -61
  273. package/ts3.5/dist/commonjs/menu/lib/MenuItem.d.ts +0 -53
  274. package/ts3.5/dist/commonjs/select/index.d.ts +0 -6
  275. package/ts3.5/dist/commonjs/select/lib/Select.d.ts +0 -25
  276. package/ts3.5/dist/commonjs/select/lib/SelectBase.d.ts +0 -123
  277. package/ts3.5/dist/commonjs/select/lib/SelectMenu.d.ts +0 -42
  278. package/ts3.5/dist/commonjs/select/lib/SelectOption.d.ts +0 -33
  279. package/ts3.5/dist/commonjs/select/lib/scrolling.d.ts +0 -2
  280. package/ts3.5/dist/commonjs/select/lib/types.d.ts +0 -33
  281. package/ts3.5/dist/commonjs/select/lib/utils.d.ts +0 -4
  282. package/ts3.5/dist/commonjs/side-panel/index.d.ts +0 -6
  283. package/ts3.5/dist/commonjs/side-panel/lib/SidePanel.d.ts +0 -86
  284. package/ts3.5/dist/commonjs/side-panel/lib/hooks.d.ts +0 -80
  285. package/ts3.5/dist/commonjs/text-area/index.d.ts +0 -2
  286. package/ts3.5/dist/commonjs/text-area/lib/TextArea.d.ts +0 -22
  287. package/ts3.5/dist/commonjs/text-area/lib/TextAreaField.d.ts +0 -8
  288. package/ts3.5/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
  289. package/ts3.5/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
  290. package/ts3.5/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
  291. package/ts3.5/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
  292. package/ts3.5/dist/commonjs/text-input/index.d.ts +0 -3
  293. package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +0 -22
  294. package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
  295. package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
  296. package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
  297. package/ts3.5/dist/commonjs/text-input/lib/hooks/index.d.ts +0 -3
  298. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -9
  299. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
  300. package/ts3.5/dist/es6/breadcrumbs/index.d.ts +0 -5
  301. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  302. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  303. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  304. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  305. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  306. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  307. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  308. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  309. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  310. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  311. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  312. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  313. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  314. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  315. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  316. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  317. package/ts3.5/dist/es6/color-picker/index.d.ts +0 -2
  318. package/ts3.5/dist/es6/color-picker/lib/ColorPicker.d.ts +0 -55
  319. package/ts3.5/dist/es6/color-picker/lib/parts/ColorReset.d.ts +0 -7
  320. package/ts3.5/dist/es6/color-picker/lib/parts/SwatchBook.d.ts +0 -7
  321. package/ts3.5/dist/es6/form-field/index.d.ts +0 -3
  322. package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +0 -31
  323. package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +0 -13
  324. package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +0 -8
  325. package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +0 -18
  326. package/ts3.5/dist/es6/form-field/lib/hooks/index.d.ts +0 -6
  327. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +0 -14
  328. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +0 -17
  329. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -14
  330. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
  331. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -10
  332. package/ts3.5/dist/es6/index.d.ts +0 -9
  333. package/ts3.5/dist/es6/menu/index.d.ts +0 -6
  334. package/ts3.5/dist/es6/menu/lib/Menu.d.ts +0 -61
  335. package/ts3.5/dist/es6/menu/lib/MenuItem.d.ts +0 -53
  336. package/ts3.5/dist/es6/select/index.d.ts +0 -6
  337. package/ts3.5/dist/es6/select/lib/Select.d.ts +0 -25
  338. package/ts3.5/dist/es6/select/lib/SelectBase.d.ts +0 -123
  339. package/ts3.5/dist/es6/select/lib/SelectMenu.d.ts +0 -42
  340. package/ts3.5/dist/es6/select/lib/SelectOption.d.ts +0 -33
  341. package/ts3.5/dist/es6/select/lib/scrolling.d.ts +0 -2
  342. package/ts3.5/dist/es6/select/lib/types.d.ts +0 -33
  343. package/ts3.5/dist/es6/select/lib/utils.d.ts +0 -4
  344. package/ts3.5/dist/es6/side-panel/index.d.ts +0 -6
  345. package/ts3.5/dist/es6/side-panel/lib/SidePanel.d.ts +0 -86
  346. package/ts3.5/dist/es6/side-panel/lib/hooks.d.ts +0 -80
  347. package/ts3.5/dist/es6/text-area/index.d.ts +0 -2
  348. package/ts3.5/dist/es6/text-area/lib/TextArea.d.ts +0 -22
  349. package/ts3.5/dist/es6/text-area/lib/TextAreaField.d.ts +0 -8
  350. package/ts3.5/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
  351. package/ts3.5/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
  352. package/ts3.5/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
  353. package/ts3.5/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
  354. package/ts3.5/dist/es6/text-input/index.d.ts +0 -3
  355. package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +0 -22
  356. package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
  357. package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
  358. package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
  359. package/ts3.5/dist/es6/text-input/lib/hooks/index.d.ts +0 -3
  360. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -9
  361. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
@@ -1,9 +1,10 @@
1
- import { createHook } from '@workday/canvas-kit-react/common';
1
+ import { createElemPropsHook } from '@workday/canvas-kit-react/common';
2
+ import { useFormFieldModel } from './useFormFieldModel';
2
3
  /**
3
4
  * Adds the necessary props to an `Input` component.
4
5
  * Used by the FormField.Input subcomponent and other input type components
5
6
  */
6
- export var useFormFieldInput = createHook(function (_a) {
7
+ export var useFormFieldInput = createElemPropsHook(useFormFieldModel)(function (_a) {
7
8
  var state = _a.state;
8
9
  return {
9
10
  required: state.isRequired ? true : undefined,
@@ -2,11 +2,14 @@
2
2
  * Adds the necessary props to a `Label` component.
3
3
  * Used by the FormField.Label subcomponent and other input type components
4
4
  */
5
- export declare const useFormFieldLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
6
- hasError?: boolean | undefined;
7
- id?: string | undefined;
8
- isRequired?: boolean | undefined;
9
- }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
5
+ export declare const useFormFieldLabel: <P extends {}, R>(model: {
6
+ state: {
7
+ id: string;
8
+ hasError: boolean;
9
+ isRequired: boolean;
10
+ };
11
+ events: {};
12
+ }, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
10
13
  htmlFor: string;
11
14
  } & P & (R extends HTMLOrSVGElement ? {
12
15
  ref: import("react").Ref<R>;
@@ -1 +1 @@
1
- {"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;OAI5B,CAAC"}
1
+ {"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;OAI5B,CAAC"}
@@ -1,9 +1,10 @@
1
- import { createHook } from '@workday/canvas-kit-react/common';
1
+ import { createElemPropsHook } from '@workday/canvas-kit-react/common';
2
+ import { useFormFieldModel } from './useFormFieldModel';
2
3
  /**
3
4
  * Adds the necessary props to a `Label` component.
4
5
  * Used by the FormField.Label subcomponent and other input type components
5
6
  */
6
- export var useFormFieldLabel = createHook(function (_a) {
7
+ export var useFormFieldLabel = createElemPropsHook(useFormFieldModel)(function (_a) {
7
8
  var state = _a.state;
8
9
  return {
9
10
  htmlFor: "input-" + state.id,
@@ -1,11 +1,10 @@
1
- import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
2
- declare type FormFieldState = {
1
+ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<{
3
2
  /**
4
3
  * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
5
4
  * `required` set to true, and usually some subcomponents will have a error color applied.
6
5
  * @default false
7
6
  */
8
- hasError?: boolean;
7
+ hasError: boolean;
9
8
  /**
10
9
  * Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
11
10
  * - `FormField.Input` will set `aria-describedby` to `hint-${id}`
@@ -16,21 +15,84 @@ declare type FormFieldState = {
16
15
  * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
17
16
  * @default `useUniqueId()`
18
17
  */
19
- id?: string;
18
+ id: string;
20
19
  /**
21
20
  * Optional flag to denote if this field is required. When true the `FormField.Input` will have
22
21
  * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
23
22
  * @default false
24
23
  */
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) => FormFieldModel;
35
- export {};
24
+ isRequired: boolean;
25
+ }> & {} & {}) | undefined) => {
26
+ state: {
27
+ id: string;
28
+ /**
29
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
30
+ * `required` set to true, and usually some subcomponents will have a error color applied.
31
+ * @default false
32
+ */
33
+ hasError: boolean;
34
+ /**
35
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
36
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
37
+ * @default false
38
+ */
39
+ isRequired: boolean;
40
+ };
41
+ events: {};
42
+ }) & import("@workday/canvas-kit-react/common").ModelExtras<{
43
+ /**
44
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
45
+ * `required` set to true, and usually some subcomponents will have a error color applied.
46
+ * @default false
47
+ */
48
+ hasError: boolean;
49
+ /**
50
+ * Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
51
+ * - `FormField.Input` will set `aria-describedby` to `hint-${id}`
52
+ * - `FormField.Input` will set `id` to `input-${id}`
53
+ * - `FormField.Label` will set `htmlFor` to `input-${id}`
54
+ * - `FormField.Hint` will set `id` to `hint-${id}`
55
+ *
56
+ * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
57
+ * @default `useUniqueId()`
58
+ */
59
+ id: string;
60
+ /**
61
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
62
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
63
+ * @default false
64
+ */
65
+ isRequired: boolean;
66
+ }, {}, {
67
+ id: string;
68
+ /**
69
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
70
+ * `required` set to true, and usually some subcomponents will have a error color applied.
71
+ * @default false
72
+ */
73
+ hasError: boolean;
74
+ /**
75
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
76
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
77
+ * @default false
78
+ */
79
+ isRequired: boolean;
80
+ }, {}, {
81
+ state: {
82
+ id: string;
83
+ /**
84
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
85
+ * `required` set to true, and usually some subcomponents will have a error color applied.
86
+ * @default false
87
+ */
88
+ hasError: boolean;
89
+ /**
90
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
91
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
92
+ * @default false
93
+ */
94
+ isRequired: boolean;
95
+ };
96
+ events: {};
97
+ }>;
36
98
  //# sourceMappingURL=useFormFieldModel.d.ts.map
@@ -1 +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,YAAY,oBAAoB,KAAQ,cAerE,CAAC"}
1
+ {"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;IAE1B;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;;IArBH;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;IArBH;;;;OAIG;;IAaH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;EAeL,CAAC"}
@@ -1,19 +1,46 @@
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,
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;
13
9
  };
14
- var events = useEventMap(formFieldEventMap, state, config, {});
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { createModelHook, useUniqueId } from '@workday/canvas-kit-react/common';
13
+ export var useFormFieldModel = createModelHook({
14
+ defaultConfig: {
15
+ /**
16
+ * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
17
+ * `required` set to true, and usually some subcomponents will have a error color applied.
18
+ * @default false
19
+ */
20
+ hasError: false,
21
+ /**
22
+ * Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
23
+ * - `FormField.Input` will set `aria-describedby` to `hint-${id}`
24
+ * - `FormField.Input` will set `id` to `input-${id}`
25
+ * - `FormField.Label` will set `htmlFor` to `input-${id}`
26
+ * - `FormField.Hint` will set `id` to `hint-${id}`
27
+ *
28
+ * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
29
+ * @default `useUniqueId()`
30
+ */
31
+ id: '',
32
+ /**
33
+ * Optional flag to denote if this field is required. When true the `FormField.Input` will have
34
+ * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
35
+ * @default false
36
+ */
37
+ isRequired: false,
38
+ },
39
+ })(function (config) {
40
+ var id = useUniqueId(config.id);
41
+ var state = __assign(__assign({}, config), { id: id });
15
42
  return {
16
43
  state: state,
17
- events: events,
44
+ events: {},
18
45
  };
19
- };
46
+ });
@@ -1,4 +1,4 @@
1
- import { StackSpacing, StackProps } from '@workday/canvas-kit-labs-react/layout';
1
+ import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
2
2
  /**
3
3
  * Adds the necessary layout props to a `FormField` component.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,uCAAuC,CAAC;AAG/E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,UAAU,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC;aAC3B,YAAY;CAkBxB,CAAC"}
1
+ {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,UAAU,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC;aAC3B,YAAY;CAkBxB,CAAC"}
@@ -2,6 +2,7 @@ export * from './breadcrumbs';
2
2
  export * from './color-picker';
3
3
  export * from './form-field';
4
4
  export * from './menu';
5
+ export * from './pill';
5
6
  export * from './select';
6
7
  export * from './side-panel';
7
8
  export * from './text-area';
@@ -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,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,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,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
package/dist/es6/index.js CHANGED
@@ -2,6 +2,7 @@ export * from './breadcrumbs';
2
2
  export * from './color-picker';
3
3
  export * from './form-field';
4
4
  export * from './menu';
5
+ export * from './pill';
5
6
  export * from './select';
6
7
  export * from './side-panel';
7
8
  export * from './text-area';
@@ -244,7 +244,7 @@ var Menu = /** @class */ (function (_super) {
244
244
  var _a = this.props, _b = _a.id, id = _b === void 0 ? this.id : _b, _c = _a.isOpen, isOpen = _c === void 0 ? true : _c, children = _a.children, ariaLabelledby = _a["aria-labelledby"], grow = _a.grow, width = _a.width, onSelect = _a.onSelect, onClose = _a.onClose, initialSelectedItem = _a.initialSelectedItem, elemProps = __rest(_a, ["id", "isOpen", "children", 'aria-labelledby', "grow", "width", "onSelect", "onClose", "initialSelectedItem"]);
245
245
  var selectedItemIndex = this.state.selectedItemIndex;
246
246
  var cardWidth = grow ? '100%' : width;
247
- return (React.createElement(Card, { style: { display: 'inline-block' }, padding: space.zero, width: cardWidth },
247
+ return (React.createElement(Card, { display: "inline-block", padding: space.zero, width: cardWidth, depth: 3 },
248
248
  React.createElement(Card.Body, null,
249
249
  React.createElement(List, __assign({ role: "menu", tabIndex: 0, id: id, "aria-labelledby": ariaLabelledby, "aria-activedescendant": id + "-" + selectedItemIndex, onKeyDown: this.handleKeyboardShortcuts, ref: this.menuRef }, elemProps), React.Children.map(children, function (menuItem, index) {
250
250
  if (!React.isValidElement(menuItem)) {
@@ -0,0 +1,3 @@
1
+ export * from './lib/Pill';
2
+ export * from './lib/usePillModel';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../pill/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './lib/Pill';
2
+ export * from './lib/usePillModel';
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { BoxProps } from '@workday/canvas-kit-react/layout';
3
+ export interface PillProps extends BoxProps {
4
+ /**
5
+ * Defines what kind of pill to render stylistically and its interaction states
6
+ * @default 'default'
7
+ */
8
+ variant?: 'default' | 'readOnly' | 'removable';
9
+ }
10
+ export declare const Pill: import("@workday/canvas-kit-react/common").ElementComponentM<"button", PillProps & Partial<{
11
+ maxWidth: React.ReactText;
12
+ disabled: boolean;
13
+ }> & {} & {}, {
14
+ state: {
15
+ maxWidth: React.ReactText;
16
+ disabled: boolean;
17
+ };
18
+ events: {};
19
+ }> & {
20
+ Context: React.Context<{
21
+ state: {
22
+ maxWidth: React.ReactText;
23
+ disabled: boolean;
24
+ };
25
+ events: {};
26
+ }>;
27
+ } & {
28
+ Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillIcon").PillIconProps, {
29
+ state: {
30
+ maxWidth: React.ReactText;
31
+ disabled: boolean;
32
+ };
33
+ events: {};
34
+ }>;
35
+ Avatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillAvatar").PillAvatarProps, {
36
+ state: {
37
+ maxWidth: React.ReactText;
38
+ disabled: boolean;
39
+ };
40
+ events: {};
41
+ }>;
42
+ Count: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./PillCount").PillCountProps>;
43
+ Label: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillLabel").PillLabelProps, {
44
+ state: {
45
+ maxWidth: React.ReactText;
46
+ disabled: boolean;
47
+ };
48
+ events: {};
49
+ }>;
50
+ IconButton: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillIconButton").PillIconButtonProps, {
51
+ state: {
52
+ maxWidth: React.ReactText;
53
+ disabled: boolean;
54
+ };
55
+ events: {};
56
+ }>;
57
+ };
58
+ //# sourceMappingURL=Pill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAC,QAAQ,EAA4B,MAAM,kCAAkC,CAAC;AAWrF,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAgID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Df,CAAC"}
@@ -0,0 +1,158 @@
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 { BaseButton } from '@workday/canvas-kit-react/button';
25
+ import { createContainer, focusRing, mouseFocusBehavior, styled, } from '@workday/canvas-kit-react/common';
26
+ import { boxStyleFn, HStack, Stack } from '@workday/canvas-kit-react/layout';
27
+ import { borderRadius, colors, space, type } from '@workday/canvas-kit-react/tokens';
28
+ import { usePillModel } from './usePillModel';
29
+ import { PillIcon } from './PillIcon';
30
+ import { PillIconButton } from './PillIconButton';
31
+ import { PillCount } from './PillCount';
32
+ import { PillAvatar } from './PillAvatar';
33
+ import { PillLabel } from './PillLabel';
34
+ var getButtonPillColors = function () {
35
+ return {
36
+ default: {
37
+ background: colors.soap300,
38
+ icon: colors.licorice200,
39
+ label: colors.blackPepper400,
40
+ border: colors.licorice200,
41
+ },
42
+ hover: {
43
+ icon: colors.licorice500,
44
+ background: colors.soap400,
45
+ border: colors.licorice400,
46
+ },
47
+ active: {
48
+ icon: colors.licorice500,
49
+ background: colors.soap500,
50
+ border: colors.licorice500,
51
+ },
52
+ focus: {
53
+ icon: colors.licorice500,
54
+ background: colors.soap300,
55
+ border: colors.blueberry400,
56
+ focusRing: focusRing({
57
+ width: 0,
58
+ inset: 'inner',
59
+ innerColor: colors.blueberry400,
60
+ outerColor: colors.blueberry400,
61
+ separation: 1,
62
+ }),
63
+ },
64
+ disabled: {
65
+ icon: colors.licorice100,
66
+ label: colors.licorice100,
67
+ background: colors.soap100,
68
+ border: colors.licorice100,
69
+ opacity: '1',
70
+ },
71
+ };
72
+ };
73
+ var getRemovablePillColors = function (disabled) {
74
+ return {
75
+ default: {
76
+ background: disabled ? colors.soap100 : colors.soap300,
77
+ icon: disabled ? colors.licorice100 : colors.licorice200,
78
+ label: disabled ? colors.licorice100 : colors.blackPepper400,
79
+ border: disabled ? colors.licorice100 : colors.licorice200,
80
+ },
81
+ hover: {
82
+ icon: disabled ? colors.licorice100 : colors.licorice500,
83
+ background: disabled ? colors.soap100 : colors.soap300,
84
+ border: disabled ? colors.licorice100 : colors.licorice200,
85
+ label: disabled ? colors.licorice100 : colors.blackPepper400,
86
+ },
87
+ active: {
88
+ icon: disabled ? colors.licorice100 : colors.licorice500,
89
+ background: disabled ? colors.soap100 : colors.soap500,
90
+ border: disabled ? colors.licorice100 : colors.licorice500,
91
+ label: disabled ? colors.licorice100 : colors.blackPepper400,
92
+ },
93
+ focus: {
94
+ icon: colors.licorice200,
95
+ background: colors.soap300,
96
+ label: colors.blackPepper400,
97
+ focusRing: focusRing({
98
+ width: 0,
99
+ innerColor: 'transparent',
100
+ outerColor: 'transparent',
101
+ }),
102
+ },
103
+ disabled: {},
104
+ };
105
+ };
106
+ var pillBaseStyles = __assign(__assign({ display: 'inline-flex', alignItems: 'center', borderRadius: borderRadius.m, flexShrink: 0 }, type.levels.subtext.large), { color: colors.blackPepper400, boxShadow: 'none', outline: 'none', fontWeight: type.properties.fontWeights.medium, WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale', width: 'fit-content', padding: "2px " + space.xxs, height: space.m, position: 'relative' });
107
+ var StyledBasePill = styled(BaseButton.as('button'))(__assign(__assign(__assign({}, pillBaseStyles), { '&:focus': {
108
+ borderColor: colors.blueberry400,
109
+ 'span[data-count="ck-pill-count"]': {
110
+ borderTop: "1px solid " + colors.blueberry400,
111
+ borderBottom: "1px solid " + colors.blueberry400,
112
+ borderRight: "1px solid " + colors.blueberry400,
113
+ },
114
+ }, '&:active, &:active:hover, &:active:focus': {
115
+ 'span[data-count="ck-pill-count"]': {
116
+ backgroundColor: colors.soap600,
117
+ border: 'none',
118
+ },
119
+ } }), mouseFocusBehavior({
120
+ '&:focus': {
121
+ 'span[data-count="ck-pill-count"]': {
122
+ border: 'none',
123
+ },
124
+ },
125
+ })), boxStyleFn);
126
+ var StyledNonInteractivePill = styled(StyledBasePill)({
127
+ cursor: 'default',
128
+ overflow: 'revert',
129
+ });
130
+ export var Pill = createContainer('button')({
131
+ modelHook: usePillModel,
132
+ subComponents: {
133
+ Icon: PillIcon,
134
+ Avatar: PillAvatar,
135
+ Count: PillCount,
136
+ Label: PillLabel,
137
+ IconButton: PillIconButton,
138
+ },
139
+ })(function (_a, Element, model) {
140
+ var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, maxWidth = _a.maxWidth, elemProps = __rest(_a, ["variant", "maxWidth"]);
141
+ return (React.createElement(React.Fragment, null,
142
+ variant === 'readOnly' && (React.createElement(StyledNonInteractivePill, __assign({ maxWidth: model.state.maxWidth, as: Element !== 'button' ? Element : 'span', border: "1px solid " + colors.licorice200 }, elemProps),
143
+ React.createElement(PillLabel, null, elemProps.children))),
144
+ variant === 'default' && (React.createElement(StyledBasePill, __assign({ colors: getButtonPillColors(), as: Element }, elemProps, { disabled: model.state.disabled }),
145
+ React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center" }, React.Children.map(elemProps.children, function (child, index) {
146
+ if (typeof child === 'string') {
147
+ return React.createElement(PillLabel, { key: index }, child);
148
+ }
149
+ return (React.createElement(Stack.Item, { key: index, display: "inline-flex" }, child));
150
+ })))),
151
+ variant === 'removable' && (React.createElement(StyledNonInteractivePill, __assign({ colors: getRemovablePillColors(model.state.disabled), as: Element !== 'button' ? Element : 'span' }, elemProps),
152
+ React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, React.Children.map(elemProps.children, function (child, index) {
153
+ if (typeof child === 'string') {
154
+ return React.createElement(PillLabel, { key: index }, child);
155
+ }
156
+ return React.createElement(Stack.Item, { key: index }, child);
157
+ }))))));
158
+ });
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { AvatarProps } from '@workday/canvas-kit-react/avatar';
3
+ export interface PillAvatarProps extends AvatarProps {
4
+ }
5
+ export declare const PillAvatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", PillAvatarProps, {
6
+ state: {
7
+ maxWidth: React.ReactText;
8
+ disabled: boolean;
9
+ };
10
+ events: {};
11
+ }>;
12
+ //# sourceMappingURL=PillAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PillAvatar.d.ts","sourceRoot":"","sources":["../../../../pill/lib/PillAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAS,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGrE,MAAM,WAAW,eAAgB,SAAQ,WAAW;CAAG;AAKvD,eAAO,MAAM,UAAU;;;;;;EAcrB,CAAC"}
@@ -0,0 +1,23 @@
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
+ import React from 'react';
13
+ import { createSubcomponent } from '@workday/canvas-kit-react/common';
14
+ import { Avatar } from '@workday/canvas-kit-react/avatar';
15
+ import { usePillModel } from './usePillModel';
16
+ // When the component is created, it needs to be a button element to match AvatarProps.
17
+ // Once Avatar becomes a `createComponent` we can default the element type to a `div`
18
+ // and the types should be properly extracted
19
+ export var PillAvatar = createSubcomponent('button')({
20
+ modelHook: usePillModel,
21
+ })(function (elemProps, Element, model) {
22
+ return (React.createElement(Avatar, __assign({ style: { opacity: model.state.disabled ? '.7' : '1' }, as: "div", size: 18 }, elemProps, { disabled: model.state.disabled }), elemProps.children));
23
+ });
@@ -0,0 +1,5 @@
1
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
2
+ export interface PillCountProps extends FlexProps {
3
+ }
4
+ export declare const PillCount: import("@workday/canvas-kit-react/common").ElementComponent<"span", PillCountProps>;
5
+ //# sourceMappingURL=PillCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PillCount.d.ts","sourceRoot":"","sources":["../../../../pill/lib/PillCount.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAGjE,MAAM,WAAW,cAAe,SAAQ,SAAS;CAAG;AASpD,eAAO,MAAM,SAAS,qFAuBpB,CAAC"}
@@ -0,0 +1,39 @@
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, styled } from '@workday/canvas-kit-react/common';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
+ import { borderRadius, colors, space } from '@workday/canvas-kit-react/tokens';
27
+ var StyledCountContainer = styled(Flex.as('span'))({
28
+ borderTopLeftRadius: borderRadius.zero,
29
+ borderTopRightRadius: borderRadius.m,
30
+ borderBottomLeftRadius: borderRadius.zero,
31
+ borderBottomRightRadius: borderRadius.m,
32
+ });
33
+ export var PillCount = createComponent('span')({
34
+ displayName: 'Pill.Avatar',
35
+ Component: function (_a, ref, Element) {
36
+ var children = _a.children, elemProps = __rest(_a, ["children"]);
37
+ return (React.createElement(StyledCountContainer, __assign({ display: "inline-flex", alignItems: "center", justifyContent: "center", as: Element, height: 22, minWidth: 22, padding: "0 " + space.xxxs, marginInlineEnd: "-" + space.xxs, marginInlineStart: "" + space.xxxs, backgroundColor: colors.soap500, "data-count": "ck-pill-count", ref: ref }, elemProps), children));
38
+ },
39
+ });
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { SystemIconProps } from '@workday/canvas-kit-react/icon';
3
+ import { CanvasSystemIcon } from '@workday/design-assets-types';
4
+ export interface PillIconProps extends Omit<SystemIconProps, 'icon'> {
5
+ /**
6
+ * The system icon rendered by the component
7
+ * @default `plusIcon`
8
+ */
9
+ icon?: CanvasSystemIcon;
10
+ }
11
+ export declare const PillIcon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", PillIconProps, {
12
+ state: {
13
+ maxWidth: React.ReactText;
14
+ disabled: boolean;
15
+ };
16
+ events: {};
17
+ }>;
18
+ //# sourceMappingURL=PillIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PillIcon.d.ts","sourceRoot":"","sources":["../../../../pill/lib/PillIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAa,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAG3E,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ;;;;;;EAanB,CAAC"}