@workday/canvas-kit-preview-react 6.8.9 → 6.9.0-next.2

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 (478) hide show
  1. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +52 -26
  2. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +5 -6
  3. package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
  4. package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +7 -9
  5. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +22 -20
  6. package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +1 -1
  7. package/breadcrumbs/package.json +2 -1
  8. package/color-picker/lib/ColorPicker.tsx +3 -3
  9. package/color-picker/package.json +2 -1
  10. package/dist/commonjs/breadcrumbs/index.js +13 -5
  11. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
  12. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
  13. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +38 -9
  14. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -1
  15. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
  16. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +14 -8
  17. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +20 -7
  18. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +1 -2
  19. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
  20. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +5 -2
  21. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +1 -1
  22. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +3 -1
  23. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
  24. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +22 -8
  25. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
  26. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +4 -2
  27. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +1 -1
  28. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +3 -1
  29. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -1
  30. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
  31. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +10 -8
  32. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  33. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +1 -1
  34. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +21 -5
  35. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +1 -2
  36. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
  37. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +13 -16
  38. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +1 -1
  39. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +1 -1
  40. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +3 -1
  41. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +1 -1
  42. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +3 -1
  43. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +3 -1
  44. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +1 -2
  45. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +1 -1
  46. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +1 -0
  47. package/dist/commonjs/color-picker/index.js +6 -2
  48. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
  49. package/dist/commonjs/color-picker/lib/ColorPicker.js +21 -9
  50. package/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
  51. package/dist/commonjs/color-picker/lib/parts/ColorReset.js +17 -3
  52. package/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
  53. package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +17 -3
  54. package/dist/commonjs/form-field/index.js +12 -5
  55. package/dist/commonjs/form-field/lib/FormField.d.ts +47 -13
  56. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  57. package/dist/commonjs/form-field/lib/FormField.js +8 -11
  58. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +8 -12
  59. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
  60. package/dist/commonjs/form-field/lib/FormFieldHint.js +18 -16
  61. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -7
  62. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -1
  63. package/dist/commonjs/form-field/lib/FormFieldInput.js +7 -20
  64. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +9 -4
  65. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  66. package/dist/commonjs/form-field/lib/FormFieldLabel.js +21 -22
  67. package/dist/commonjs/form-field/lib/hooks/index.js +15 -8
  68. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +8 -6
  69. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  70. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +3 -1
  71. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +8 -6
  72. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  73. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +3 -1
  74. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -6
  75. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  76. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +3 -1
  77. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
  78. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  79. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +42 -14
  80. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +5 -4
  81. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  82. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +3 -1
  83. package/dist/commonjs/index.d.ts +1 -0
  84. package/dist/commonjs/index.d.ts.map +1 -1
  85. package/dist/commonjs/index.js +19 -11
  86. package/dist/commonjs/menu/index.js +12 -4
  87. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  88. package/dist/commonjs/menu/lib/Menu.js +21 -9
  89. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  90. package/dist/commonjs/menu/lib/MenuItem.js +20 -8
  91. package/dist/commonjs/pill/index.d.ts +3 -0
  92. package/dist/commonjs/pill/index.d.ts.map +1 -0
  93. package/dist/commonjs/pill/index.js +14 -0
  94. package/dist/commonjs/pill/lib/Pill.d.ts +65 -0
  95. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -0
  96. package/dist/commonjs/pill/lib/Pill.js +171 -0
  97. package/dist/commonjs/pill/lib/PillAvatar.d.ts +12 -0
  98. package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +1 -0
  99. package/dist/commonjs/pill/lib/PillAvatar.js +29 -0
  100. package/dist/commonjs/pill/lib/PillCount.d.ts +5 -0
  101. package/dist/commonjs/pill/lib/PillCount.d.ts.map +1 -0
  102. package/dist/commonjs/pill/lib/PillCount.js +45 -0
  103. package/dist/commonjs/pill/lib/PillIcon.d.ts +18 -0
  104. package/dist/commonjs/pill/lib/PillIcon.d.ts.map +1 -0
  105. package/dist/commonjs/pill/lib/PillIcon.js +40 -0
  106. package/dist/commonjs/pill/lib/PillIconButton.d.ts +23 -0
  107. package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -0
  108. package/dist/commonjs/pill/lib/PillIconButton.js +81 -0
  109. package/dist/commonjs/pill/lib/PillLabel.d.ts +14 -0
  110. package/dist/commonjs/pill/lib/PillLabel.d.ts.map +1 -0
  111. package/dist/commonjs/pill/lib/PillLabel.js +47 -0
  112. package/dist/commonjs/pill/lib/usePillModel.d.ts +71 -0
  113. package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -0
  114. package/dist/commonjs/pill/lib/usePillModel.js +37 -0
  115. package/dist/commonjs/select/index.d.ts +1 -1
  116. package/dist/commonjs/select/index.d.ts.map +1 -1
  117. package/dist/commonjs/select/index.js +12 -4
  118. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  119. package/dist/commonjs/select/lib/Select.js +22 -8
  120. package/dist/commonjs/select/lib/SelectBase.d.ts +20 -1
  121. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  122. package/dist/commonjs/select/lib/SelectBase.js +26 -11
  123. package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
  124. package/dist/commonjs/select/lib/SelectMenu.js +20 -7
  125. package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
  126. package/dist/commonjs/select/lib/SelectOption.js +19 -7
  127. package/dist/commonjs/select/lib/scrolling.d.ts.map +1 -1
  128. package/dist/commonjs/select/lib/scrolling.js +3 -1
  129. package/dist/commonjs/select/lib/utils.d.ts.map +1 -1
  130. package/dist/commonjs/select/lib/utils.js +5 -2
  131. package/dist/commonjs/side-panel/index.js +13 -5
  132. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +18 -5
  133. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  134. package/dist/commonjs/side-panel/lib/SidePanel.js +32 -16
  135. package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
  136. package/dist/commonjs/side-panel/lib/hooks.js +17 -3
  137. package/dist/commonjs/text-area/index.js +11 -4
  138. package/dist/commonjs/text-area/lib/TextArea.d.ts +52 -11
  139. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  140. package/dist/commonjs/text-area/lib/TextArea.js +10 -15
  141. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +15 -7
  142. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  143. package/dist/commonjs/text-area/lib/TextAreaField.js +19 -18
  144. package/dist/commonjs/text-area/lib/hooks/index.js +11 -4
  145. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
  146. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
  147. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +1 -0
  148. package/dist/commonjs/text-input/index.js +12 -5
  149. package/dist/commonjs/text-input/lib/TextInput.d.ts +59 -11
  150. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  151. package/dist/commonjs/text-input/lib/TextInput.js +10 -15
  152. package/dist/commonjs/text-input/lib/TextInputField.d.ts +15 -7
  153. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  154. package/dist/commonjs/text-input/lib/TextInputField.js +18 -30
  155. package/dist/commonjs/text-input/lib/hooks/index.js +12 -5
  156. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +8 -2
  157. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  158. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -1
  159. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
  160. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  161. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +1 -0
  162. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
  163. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
  164. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +36 -11
  165. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -1
  166. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
  167. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +8 -7
  168. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +1 -2
  169. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
  170. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +1 -1
  171. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
  172. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
  173. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
  174. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +1 -1
  175. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -1
  176. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
  177. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +4 -7
  178. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
  179. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +1 -1
  180. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +1 -2
  181. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
  182. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +9 -16
  183. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +1 -1
  184. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +1 -1
  185. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +1 -1
  186. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +1 -2
  187. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +1 -1
  188. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +1 -0
  189. package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
  190. package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
  191. package/dist/es6/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
  192. package/dist/es6/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
  193. package/dist/es6/form-field/lib/FormField.d.ts +47 -13
  194. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  195. package/dist/es6/form-field/lib/FormField.js +9 -13
  196. package/dist/es6/form-field/lib/FormFieldHint.d.ts +8 -12
  197. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
  198. package/dist/es6/form-field/lib/FormFieldHint.js +17 -19
  199. package/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -7
  200. package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -1
  201. package/dist/es6/form-field/lib/FormFieldInput.js +8 -22
  202. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +9 -4
  203. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  204. package/dist/es6/form-field/lib/FormFieldLabel.js +19 -24
  205. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +8 -6
  206. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  207. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +3 -2
  208. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +8 -6
  209. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  210. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -2
  211. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -6
  212. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  213. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +3 -2
  214. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
  215. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  216. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +42 -15
  217. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +5 -4
  218. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  219. package/dist/es6/index.d.ts +1 -0
  220. package/dist/es6/index.d.ts.map +1 -1
  221. package/dist/es6/index.js +1 -0
  222. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  223. package/dist/es6/menu/lib/Menu.js +2 -2
  224. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  225. package/dist/es6/menu/lib/MenuItem.js +1 -1
  226. package/dist/es6/pill/index.d.ts +3 -0
  227. package/dist/es6/pill/index.d.ts.map +1 -0
  228. package/dist/es6/pill/index.js +2 -0
  229. package/dist/es6/pill/lib/Pill.d.ts +65 -0
  230. package/dist/es6/pill/lib/Pill.d.ts.map +1 -0
  231. package/dist/es6/pill/lib/Pill.js +165 -0
  232. package/dist/es6/pill/lib/PillAvatar.d.ts +13 -0
  233. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -0
  234. package/dist/es6/pill/lib/PillAvatar.js +23 -0
  235. package/dist/es6/pill/lib/PillCount.d.ts +5 -0
  236. package/dist/es6/pill/lib/PillCount.d.ts.map +1 -0
  237. package/dist/es6/pill/lib/PillCount.js +39 -0
  238. package/dist/es6/pill/lib/PillIcon.d.ts +19 -0
  239. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -0
  240. package/dist/es6/pill/lib/PillIcon.js +34 -0
  241. package/dist/es6/pill/lib/PillIconButton.d.ts +24 -0
  242. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -0
  243. package/dist/es6/pill/lib/PillIconButton.js +75 -0
  244. package/dist/es6/pill/lib/PillLabel.d.ts +15 -0
  245. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -0
  246. package/dist/es6/pill/lib/PillLabel.js +41 -0
  247. package/dist/es6/pill/lib/usePillModel.d.ts +71 -0
  248. package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -0
  249. package/dist/es6/pill/lib/usePillModel.js +34 -0
  250. package/dist/es6/select/index.d.ts +1 -1
  251. package/dist/es6/select/index.d.ts.map +1 -1
  252. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  253. package/dist/es6/select/lib/Select.js +2 -1
  254. package/dist/es6/select/lib/SelectBase.d.ts +20 -1
  255. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  256. package/dist/es6/select/lib/SelectBase.js +6 -4
  257. package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
  258. package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
  259. package/dist/es6/select/lib/scrolling.d.ts.map +1 -1
  260. package/dist/es6/select/lib/types.js +1 -0
  261. package/dist/es6/select/lib/utils.d.ts.map +1 -1
  262. package/dist/es6/side-panel/lib/SidePanel.d.ts +18 -5
  263. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  264. package/dist/es6/side-panel/lib/SidePanel.js +9 -6
  265. package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
  266. package/dist/es6/text-area/lib/TextArea.d.ts +52 -11
  267. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  268. package/dist/es6/text-area/lib/TextArea.js +11 -17
  269. package/dist/es6/text-area/lib/TextAreaField.d.ts +15 -7
  270. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  271. package/dist/es6/text-area/lib/TextAreaField.js +19 -19
  272. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
  273. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
  274. package/dist/es6/text-input/lib/TextInput.d.ts +59 -11
  275. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  276. package/dist/es6/text-input/lib/TextInput.js +11 -17
  277. package/dist/es6/text-input/lib/TextInputField.d.ts +15 -7
  278. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  279. package/dist/es6/text-input/lib/TextInputField.js +19 -32
  280. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +8 -2
  281. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  282. package/dist/es6/text-input/lib/hooks/useTextInputField.js +3 -2
  283. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
  284. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  285. package/form-field/lib/FormField.tsx +14 -29
  286. package/form-field/lib/FormFieldHint.tsx +28 -38
  287. package/form-field/lib/FormFieldInput.tsx +8 -15
  288. package/form-field/lib/FormFieldLabel.tsx +30 -39
  289. package/form-field/lib/hooks/useFormFieldHint.tsx +3 -3
  290. package/form-field/lib/hooks/useFormFieldInput.tsx +3 -3
  291. package/form-field/lib/hooks/useFormFieldLabel.tsx +3 -3
  292. package/form-field/lib/hooks/useFormFieldModel.tsx +32 -53
  293. package/form-field/lib/hooks/useFormFieldOrientation.tsx +1 -1
  294. package/form-field/package.json +2 -1
  295. package/index.ts +1 -0
  296. package/menu/lib/Menu.tsx +1 -1
  297. package/menu/package.json +2 -1
  298. package/package.json +14 -22
  299. package/pill/LICENSE +52 -0
  300. package/pill/README.md +5 -0
  301. package/pill/index.ts +2 -0
  302. package/pill/lib/Pill.tsx +226 -0
  303. package/pill/lib/PillAvatar.tsx +27 -0
  304. package/pill/lib/PillCount.tsx +39 -0
  305. package/pill/lib/PillIcon.tsx +34 -0
  306. package/pill/lib/PillIconButton.tsx +100 -0
  307. package/pill/lib/PillLabel.tsx +36 -0
  308. package/pill/lib/usePillModel.tsx +28 -0
  309. package/pill/package.json +6 -0
  310. package/select/index.ts +6 -1
  311. package/select/lib/Select.tsx +1 -0
  312. package/select/lib/SelectBase.tsx +27 -3
  313. package/select/lib/SelectMenu.tsx +1 -1
  314. package/select/lib/SelectOption.tsx +1 -1
  315. package/select/package.json +2 -1
  316. package/side-panel/lib/SidePanel.tsx +28 -9
  317. package/side-panel/package.json +2 -1
  318. package/text-area/lib/TextArea.tsx +16 -30
  319. package/text-area/lib/TextAreaField.tsx +32 -45
  320. package/text-area/lib/hooks/useTextAreaModel.ts +1 -3
  321. package/text-area/package.json +2 -1
  322. package/text-input/lib/TextInput.tsx +16 -30
  323. package/text-input/lib/TextInputField.tsx +33 -44
  324. package/text-input/lib/hooks/useTextInputField.tsx +3 -2
  325. package/text-input/lib/hooks/useTextInputModel.ts +1 -3
  326. package/text-input/package.json +2 -1
  327. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
  328. package/dist/commonjs/text-area/lib/TextAreaHint.d.ts.map +0 -1
  329. package/dist/commonjs/text-area/lib/TextAreaHint.js +0 -4
  330. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
  331. package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts.map +0 -1
  332. package/dist/commonjs/text-area/lib/TextAreaLabel.js +0 -4
  333. package/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
  334. package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +0 -1
  335. package/dist/commonjs/text-input/lib/TextInputHint.js +0 -4
  336. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
  337. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +0 -1
  338. package/dist/commonjs/text-input/lib/TextInputLabel.js +0 -4
  339. package/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
  340. package/dist/es6/text-area/lib/TextAreaHint.d.ts.map +0 -1
  341. package/dist/es6/text-area/lib/TextAreaHint.js +0 -2
  342. package/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
  343. package/dist/es6/text-area/lib/TextAreaLabel.d.ts.map +0 -1
  344. package/dist/es6/text-area/lib/TextAreaLabel.js +0 -2
  345. package/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
  346. package/dist/es6/text-input/lib/TextInputHint.d.ts.map +0 -1
  347. package/dist/es6/text-input/lib/TextInputHint.js +0 -2
  348. package/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
  349. package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +0 -1
  350. package/dist/es6/text-input/lib/TextInputLabel.js +0 -2
  351. package/text-area/lib/TextAreaHint.tsx +0 -6
  352. package/text-area/lib/TextAreaLabel.tsx +0 -6
  353. package/text-input/lib/TextInputHint.tsx +0 -6
  354. package/text-input/lib/TextInputLabel.tsx +0 -6
  355. package/ts3.5/dist/commonjs/breadcrumbs/index.d.ts +0 -5
  356. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  357. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -39
  358. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  359. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -14
  360. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  361. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  362. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  363. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  364. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -5
  365. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  366. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -5
  367. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  368. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  369. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  370. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -10
  371. package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  372. package/ts3.5/dist/commonjs/color-picker/index.d.ts +0 -2
  373. package/ts3.5/dist/commonjs/color-picker/lib/ColorPicker.d.ts +0 -55
  374. package/ts3.5/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts +0 -7
  375. package/ts3.5/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts +0 -7
  376. package/ts3.5/dist/commonjs/form-field/index.d.ts +0 -3
  377. package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +0 -31
  378. package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +0 -13
  379. package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +0 -8
  380. package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +0 -18
  381. package/ts3.5/dist/commonjs/form-field/lib/hooks/index.d.ts +0 -6
  382. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +0 -15
  383. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +0 -18
  384. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -15
  385. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
  386. package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -9
  387. package/ts3.5/dist/commonjs/index.d.ts +0 -9
  388. package/ts3.5/dist/commonjs/menu/index.d.ts +0 -6
  389. package/ts3.5/dist/commonjs/menu/lib/Menu.d.ts +0 -61
  390. package/ts3.5/dist/commonjs/menu/lib/MenuItem.d.ts +0 -53
  391. package/ts3.5/dist/commonjs/select/index.d.ts +0 -6
  392. package/ts3.5/dist/commonjs/select/lib/Select.d.ts +0 -25
  393. package/ts3.5/dist/commonjs/select/lib/SelectBase.d.ts +0 -123
  394. package/ts3.5/dist/commonjs/select/lib/SelectMenu.d.ts +0 -42
  395. package/ts3.5/dist/commonjs/select/lib/SelectOption.d.ts +0 -33
  396. package/ts3.5/dist/commonjs/select/lib/scrolling.d.ts +0 -2
  397. package/ts3.5/dist/commonjs/select/lib/types.d.ts +0 -33
  398. package/ts3.5/dist/commonjs/select/lib/utils.d.ts +0 -4
  399. package/ts3.5/dist/commonjs/side-panel/index.d.ts +0 -6
  400. package/ts3.5/dist/commonjs/side-panel/lib/SidePanel.d.ts +0 -73
  401. package/ts3.5/dist/commonjs/side-panel/lib/hooks.d.ts +0 -80
  402. package/ts3.5/dist/commonjs/text-area/index.d.ts +0 -2
  403. package/ts3.5/dist/commonjs/text-area/lib/TextArea.d.ts +0 -22
  404. package/ts3.5/dist/commonjs/text-area/lib/TextAreaField.d.ts +0 -8
  405. package/ts3.5/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
  406. package/ts3.5/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
  407. package/ts3.5/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
  408. package/ts3.5/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
  409. package/ts3.5/dist/commonjs/text-input/index.d.ts +0 -3
  410. package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +0 -22
  411. package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
  412. package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
  413. package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
  414. package/ts3.5/dist/commonjs/text-input/lib/hooks/index.d.ts +0 -3
  415. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -10
  416. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
  417. package/ts3.5/dist/es6/breadcrumbs/index.d.ts +0 -5
  418. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  419. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -39
  420. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  421. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -14
  422. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  423. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  424. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  425. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  426. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -5
  427. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  428. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -5
  429. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  430. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  431. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  432. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -10
  433. package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  434. package/ts3.5/dist/es6/color-picker/index.d.ts +0 -2
  435. package/ts3.5/dist/es6/color-picker/lib/ColorPicker.d.ts +0 -55
  436. package/ts3.5/dist/es6/color-picker/lib/parts/ColorReset.d.ts +0 -7
  437. package/ts3.5/dist/es6/color-picker/lib/parts/SwatchBook.d.ts +0 -7
  438. package/ts3.5/dist/es6/form-field/index.d.ts +0 -3
  439. package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +0 -31
  440. package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +0 -13
  441. package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +0 -8
  442. package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +0 -18
  443. package/ts3.5/dist/es6/form-field/lib/hooks/index.d.ts +0 -6
  444. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +0 -15
  445. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +0 -18
  446. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -15
  447. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
  448. package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -9
  449. package/ts3.5/dist/es6/index.d.ts +0 -9
  450. package/ts3.5/dist/es6/menu/index.d.ts +0 -6
  451. package/ts3.5/dist/es6/menu/lib/Menu.d.ts +0 -61
  452. package/ts3.5/dist/es6/menu/lib/MenuItem.d.ts +0 -53
  453. package/ts3.5/dist/es6/select/index.d.ts +0 -6
  454. package/ts3.5/dist/es6/select/lib/Select.d.ts +0 -25
  455. package/ts3.5/dist/es6/select/lib/SelectBase.d.ts +0 -123
  456. package/ts3.5/dist/es6/select/lib/SelectMenu.d.ts +0 -42
  457. package/ts3.5/dist/es6/select/lib/SelectOption.d.ts +0 -33
  458. package/ts3.5/dist/es6/select/lib/scrolling.d.ts +0 -2
  459. package/ts3.5/dist/es6/select/lib/types.d.ts +0 -33
  460. package/ts3.5/dist/es6/select/lib/utils.d.ts +0 -4
  461. package/ts3.5/dist/es6/side-panel/index.d.ts +0 -6
  462. package/ts3.5/dist/es6/side-panel/lib/SidePanel.d.ts +0 -73
  463. package/ts3.5/dist/es6/side-panel/lib/hooks.d.ts +0 -80
  464. package/ts3.5/dist/es6/text-area/index.d.ts +0 -2
  465. package/ts3.5/dist/es6/text-area/lib/TextArea.d.ts +0 -22
  466. package/ts3.5/dist/es6/text-area/lib/TextAreaField.d.ts +0 -8
  467. package/ts3.5/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
  468. package/ts3.5/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
  469. package/ts3.5/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
  470. package/ts3.5/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
  471. package/ts3.5/dist/es6/text-input/index.d.ts +0 -3
  472. package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +0 -22
  473. package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
  474. package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
  475. package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
  476. package/ts3.5/dist/es6/text-input/lib/hooks/index.d.ts +0 -3
  477. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -10
  478. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
@@ -1,13 +1,15 @@
1
- /// <reference types="@emotion/core" />
2
1
  /**
3
2
  * Adds the necessary props to an `Input` component.
4
3
  * Used by the FormField.Input subcomponent and other input type components
5
4
  */
6
- export declare const useFormFieldInput: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
7
- hasError?: boolean | undefined;
8
- id?: string | undefined;
9
- isRequired?: boolean | undefined;
10
- }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
5
+ export declare const useFormFieldInput: <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) => {
11
13
  required: boolean | undefined;
12
14
  'aria-invalid': boolean | undefined;
13
15
  'aria-describedby': string;
@@ -1 +1 @@
1
- {"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":";AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;OAO5B,CAAC"}
1
+ {"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;OAO5B,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 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,
@@ -1,13 +1,15 @@
1
- /// <reference types="@emotion/core" />
2
1
  /**
3
2
  * Adds the necessary props to a `Label` component.
4
3
  * Used by the FormField.Label subcomponent and other input type components
5
4
  */
6
- export declare const useFormFieldLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
7
- hasError?: boolean | undefined;
8
- id?: string | undefined;
9
- isRequired?: boolean | undefined;
10
- }, {}>, 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) => {
11
13
  htmlFor: string;
12
14
  } & P & (R extends HTMLOrSVGElement ? {
13
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) => Model<FormFieldState, FormFieldEvents>;
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,2EAe7B,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,9 +1,10 @@
1
+ import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
1
2
  /**
2
3
  * Adds the necessary layout props to a `FormField` component.
3
4
  */
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";
5
+ export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
6
+ flexDirection: StackProps['flexDirection'];
7
+ alignItems: StackProps['alignItems'];
8
+ spacing: StackSpacing;
8
9
  };
9
10
  //# sourceMappingURL=useFormFieldOrientation.d.ts.map
@@ -1 +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"}
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';
@@ -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,EAAmB,MAAM,kCAAkC,CAAC;AAElG,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,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"}
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,EAAmB,MAAM,kCAAkC,CAAC;AAElG,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,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,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;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"}
@@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
@@ -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)) {
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC1E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwLD,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD,GAAG,iCAAoC;IAEvC,kBAAkB,qCAMhB;IAEF,MAAM,IAAI,KAAK,CAAC,SAAS;IAyCzB,OAAO,CAAC,WAAW,CAOjB;CACH;AAcD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC1E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwLD,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD,GAAG,iCAAoC;IAEvC,kBAAkB,cAAe,aAAa,UAM5C;IAEF,MAAM,IAAI,KAAK,CAAC,SAAS;IAyCzB,OAAO,CAAC,WAAW,CAOjB;CACH;AAcD,eAAe,QAAQ,CAAC"}
@@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
@@ -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,65 @@
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
+ id: string;
14
+ }> & {} & {}, {
15
+ state: {
16
+ id: string;
17
+ maxWidth: React.ReactText;
18
+ disabled: boolean;
19
+ };
20
+ events: {};
21
+ }> & {
22
+ Context: React.Context<{
23
+ state: {
24
+ id: string;
25
+ maxWidth: React.ReactText;
26
+ disabled: boolean;
27
+ };
28
+ events: {};
29
+ }>;
30
+ } & {
31
+ Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillIcon").PillIconProps, {
32
+ state: {
33
+ id: string;
34
+ maxWidth: React.ReactText;
35
+ disabled: boolean;
36
+ };
37
+ events: {};
38
+ }>;
39
+ Avatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillAvatar").PillAvatarProps, {
40
+ state: {
41
+ id: string;
42
+ maxWidth: React.ReactText;
43
+ disabled: boolean;
44
+ };
45
+ events: {};
46
+ }>;
47
+ Count: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./PillCount").PillCountProps>;
48
+ Label: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillLabel").PillLabelProps, {
49
+ state: {
50
+ id: string;
51
+ maxWidth: React.ReactText;
52
+ disabled: boolean;
53
+ };
54
+ events: {};
55
+ }>;
56
+ IconButton: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillIconButton").PillIconButtonProps, {
57
+ state: {
58
+ id: string;
59
+ maxWidth: React.ReactText;
60
+ disabled: boolean;
61
+ };
62
+ events: {};
63
+ }>;
64
+ };
65
+ //# 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;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
@@ -0,0 +1,165 @@
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
+ 'span[data-count="ck-pill-count"]': {
109
+ borderTop: "1px solid " + colors.blueberry400,
110
+ borderBottom: "1px solid " + colors.blueberry400,
111
+ borderRight: "1px solid " + colors.blueberry400,
112
+ },
113
+ }, '&:active, &:active:hover, &:active:focus': {
114
+ 'span[data-count="ck-pill-count"]': {
115
+ backgroundColor: colors.soap600,
116
+ border: 'none',
117
+ },
118
+ } }), mouseFocusBehavior({
119
+ '&:focus': {
120
+ 'span[data-count="ck-pill-count"]': {
121
+ border: 'none',
122
+ },
123
+ },
124
+ })), function (_a) {
125
+ var variant = _a.variant;
126
+ return ({
127
+ '&:focus': {
128
+ borderColor: variant === 'removable' ? undefined : colors.blueberry400,
129
+ },
130
+ });
131
+ }, boxStyleFn);
132
+ var StyledNonInteractivePill = styled(StyledBasePill)({
133
+ cursor: 'default',
134
+ overflow: 'revert',
135
+ position: 'relative',
136
+ });
137
+ export var Pill = createContainer('button')({
138
+ modelHook: usePillModel,
139
+ subComponents: {
140
+ Icon: PillIcon,
141
+ Avatar: PillAvatar,
142
+ Count: PillCount,
143
+ Label: PillLabel,
144
+ IconButton: PillIconButton,
145
+ },
146
+ })(function (_a, Element, model) {
147
+ var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, maxWidth = _a.maxWidth, elemProps = __rest(_a, ["variant", "maxWidth"]);
148
+ return (React.createElement(React.Fragment, null,
149
+ variant === 'readOnly' && (React.createElement(StyledNonInteractivePill, __assign({ maxWidth: model.state.maxWidth, as: Element !== 'button' ? Element : 'span', border: "1px solid " + colors.licorice200, id: model.state.id }, elemProps),
150
+ React.createElement(PillLabel, null, elemProps.children))),
151
+ variant === 'default' && (React.createElement(StyledBasePill, __assign({ colors: getButtonPillColors(), as: Element }, elemProps, { disabled: model.state.disabled }),
152
+ React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "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, display: "inline-flex" }, child));
157
+ })))),
158
+ variant === 'removable' && (React.createElement(StyledNonInteractivePill, __assign({ colors: getRemovablePillColors(model.state.disabled), as: Element !== 'button' ? Element : 'span', variant: variant }, elemProps),
159
+ React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, React.Children.map(elemProps.children, function (child, index) {
160
+ if (typeof child === 'string') {
161
+ return React.createElement(PillLabel, { key: index }, child);
162
+ }
163
+ return React.createElement(Stack.Item, { key: index }, child);
164
+ }))))));
165
+ });
@@ -0,0 +1,13 @@
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
+ id: string;
8
+ maxWidth: React.ReactText;
9
+ disabled: boolean;
10
+ };
11
+ events: {};
12
+ }>;
13
+ //# 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;;;;;;;EAerB,CAAC"}