@westpac/ui 0.30.0 → 0.32.0

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 (294) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/assets/icons/filled/child-care-filled.svg +1 -0
  3. package/assets/icons/filled/child-filled.svg +1 -0
  4. package/assets/icons/filled/piggy-bank-filled.svg +3 -0
  5. package/assets/icons/filled/x-filled.svg +1 -0
  6. package/assets/icons/outlined/child-care-outlined.svg +1 -0
  7. package/assets/icons/outlined/child-outlined.svg +1 -0
  8. package/assets/icons/outlined/piggy-bank-outlined.svg +6 -0
  9. package/assets/icons/outlined/x-outlined.svg +1 -0
  10. package/dist/component-type.json +1 -1
  11. package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +1 -1
  12. package/dist/components/checkbox-group/components/checkbox-group-checkbox/checkbox-group-checkbox.styles.js +4 -4
  13. package/dist/components/circle/circle.styles.d.ts +2 -2
  14. package/dist/components/circle/circle.styles.js +1 -1
  15. package/dist/components/flexi-cell/components/flexi-cell-circle/flexi-cell-circle.styles.js +1 -1
  16. package/dist/components/header/header.styles.js +1 -1
  17. package/dist/components/icon/components/child-care-icon.js +1 -1
  18. package/dist/components/icon/components/child-icon.js +1 -1
  19. package/dist/components/icon/components/piggy-bank-icon.d.ts +2 -0
  20. package/dist/components/icon/components/piggy-bank-icon.js +35 -0
  21. package/dist/components/icon/components/x-icon.js +1 -1
  22. package/dist/components/icon/icon.styles.js +5 -5
  23. package/dist/components/icon/index.d.ts +4 -0
  24. package/dist/components/icon/index.js +4 -0
  25. package/dist/components/list/components/list-item/list-item.styles.js +3 -3
  26. package/dist/components/pictogram/components/decorative/wbc-bank-card-pictogram.js +1 -1
  27. package/dist/components/pictogram/components/informative/accessibility-pictogram.js +1 -1
  28. package/dist/components/pictogram/components/informative/accounts-pictogram.js +1 -1
  29. package/dist/components/pictogram/components/informative/aeroplane-pictogram.js +1 -1
  30. package/dist/components/pictogram/components/informative/arrow-down-pictogram.js +1 -1
  31. package/dist/components/pictogram/components/informative/arrow-left-pictogram.js +1 -1
  32. package/dist/components/pictogram/components/informative/arrow-right-pictogram.js +1 -1
  33. package/dist/components/pictogram/components/informative/arrow-up-pictogram.js +1 -1
  34. package/dist/components/pictogram/components/informative/arrows-passing-pictogram.js +1 -1
  35. package/dist/components/pictogram/components/informative/atm-pictogram.js +1 -1
  36. package/dist/components/pictogram/components/informative/australia-pictogram.js +1 -1
  37. package/dist/components/pictogram/components/informative/bank-card-locked-pictogram.js +1 -1
  38. package/dist/components/pictogram/components/informative/bank-card-pictogram.js +1 -1
  39. package/dist/components/pictogram/components/informative/bank-pictogram.js +1 -1
  40. package/dist/components/pictogram/components/informative/birth-certificate-pictogram.js +1 -1
  41. package/dist/components/pictogram/components/informative/building-pictogram.js +1 -1
  42. package/dist/components/pictogram/components/informative/buoy-pictogram.js +1 -1
  43. package/dist/components/pictogram/components/informative/bus-pictogram.js +1 -1
  44. package/dist/components/pictogram/components/informative/business-person-pictogram.js +1 -1
  45. package/dist/components/pictogram/components/informative/calculator-pictogram.js +1 -1
  46. package/dist/components/pictogram/components/informative/calendar-pictogram.js +1 -1
  47. package/dist/components/pictogram/components/informative/car-pictogram.js +1 -1
  48. package/dist/components/pictogram/components/informative/cash-pictogram.js +1 -1
  49. package/dist/components/pictogram/components/informative/celebration-pictogram.js +1 -1
  50. package/dist/components/pictogram/components/informative/chat-pictogram.js +1 -1
  51. package/dist/components/pictogram/components/informative/clock-pictogram.js +1 -1
  52. package/dist/components/pictogram/components/informative/coffee-pictogram.js +1 -1
  53. package/dist/components/pictogram/components/informative/coins-pictogram.js +1 -1
  54. package/dist/components/pictogram/components/informative/compass-pictogram.js +1 -1
  55. package/dist/components/pictogram/components/informative/customer-profile-pictogram.js +1 -1
  56. package/dist/components/pictogram/components/informative/desktop-computer-pictogram.js +1 -1
  57. package/dist/components/pictogram/components/informative/document-and-pen-pictogram.js +1 -1
  58. package/dist/components/pictogram/components/informative/dollar-sign-pictogram.js +1 -1
  59. package/dist/components/pictogram/components/informative/drivers-licence-pictogram.js +1 -1
  60. package/dist/components/pictogram/components/informative/education-pictogram.js +1 -1
  61. package/dist/components/pictogram/components/informative/eftpos-pictogram.js +1 -1
  62. package/dist/components/pictogram/components/informative/envelope-email-pictogram.js +1 -1
  63. package/dist/components/pictogram/components/informative/envelope-printed-pictogram.js +1 -1
  64. package/dist/components/pictogram/components/informative/face-happy-pictogram.js +1 -1
  65. package/dist/components/pictogram/components/informative/face-unhappy-pictogram.js +1 -1
  66. package/dist/components/pictogram/components/informative/face-unsure-pictogram.js +1 -1
  67. package/dist/components/pictogram/components/informative/finger-motion-pictogram.js +1 -1
  68. package/dist/components/pictogram/components/informative/fingerprint-pictogram.js +1 -1
  69. package/dist/components/pictogram/components/informative/football-pictogram.js +1 -1
  70. package/dist/components/pictogram/components/informative/fork-knife-pictogram.js +1 -1
  71. package/dist/components/pictogram/components/informative/generic-document-pictogram.js +1 -1
  72. package/dist/components/pictogram/components/informative/gift-pictogram.js +1 -1
  73. package/dist/components/pictogram/components/informative/globe-australia-pictogram.js +1 -1
  74. package/dist/components/pictogram/components/informative/globe-pictogram.js +1 -1
  75. package/dist/components/pictogram/components/informative/graph-decreasing-pictogram.js +1 -1
  76. package/dist/components/pictogram/components/informative/graph-increasing-pictogram.js +1 -1
  77. package/dist/components/pictogram/components/informative/gym-pictogram.js +1 -1
  78. package/dist/components/pictogram/components/informative/headset-pictogram.js +1 -1
  79. package/dist/components/pictogram/components/informative/heart-pictogram.js +1 -1
  80. package/dist/components/pictogram/components/informative/house-pictogram.js +1 -1
  81. package/dist/components/pictogram/components/informative/light-bulb-pictogram.js +1 -1
  82. package/dist/components/pictogram/components/informative/loop-pictogram.js +1 -1
  83. package/dist/components/pictogram/components/informative/medicare-card-pictogram.js +1 -1
  84. package/dist/components/pictogram/components/informative/mobile-device-pictogram.js +1 -1
  85. package/dist/components/pictogram/components/informative/money-in-pictogram.js +1 -1
  86. package/dist/components/pictogram/components/informative/money-out-pictogram.js +1 -1
  87. package/dist/components/pictogram/components/informative/movie-tickets-pictogram.js +1 -1
  88. package/dist/components/pictogram/components/informative/nest-egg-pictogram.js +1 -1
  89. package/dist/components/pictogram/components/informative/noodles-pictogram.js +1 -1
  90. package/dist/components/pictogram/components/informative/number-1-pictogram.js +1 -1
  91. package/dist/components/pictogram/components/informative/number-2-pictogram.js +1 -1
  92. package/dist/components/pictogram/components/informative/number-3-pictogram.js +1 -1
  93. package/dist/components/pictogram/components/informative/number-4-pictogram.js +1 -1
  94. package/dist/components/pictogram/components/informative/number-5-pictogram.js +1 -1
  95. package/dist/components/pictogram/components/informative/padlock-locked-pictogram.js +1 -1
  96. package/dist/components/pictogram/components/informative/padlock-unlocked-pictogram.js +1 -1
  97. package/dist/components/pictogram/components/informative/passport-pictogram.js +1 -1
  98. package/dist/components/pictogram/components/informative/percent-sign-pictogram.js +1 -1
  99. package/dist/components/pictogram/components/informative/person-pictogram.js +1 -1
  100. package/dist/components/pictogram/components/informative/piggy-bank-pictogram.js +1 -1
  101. package/dist/components/pictogram/components/informative/pizza-pictogram.js +1 -1
  102. package/dist/components/pictogram/components/informative/plant-pictogram.js +1 -1
  103. package/dist/components/pictogram/components/informative/search-pictogram.js +1 -1
  104. package/dist/components/pictogram/components/informative/secure-pictogram.js +1 -1
  105. package/dist/components/pictogram/components/informative/shop-pictogram.js +1 -1
  106. package/dist/components/pictogram/components/informative/shopping-pictogram.js +1 -1
  107. package/dist/components/pictogram/components/informative/sparkle-pictogram.js +1 -1
  108. package/dist/components/pictogram/components/informative/star-pictogram.js +1 -1
  109. package/dist/components/pictogram/components/informative/stopwatch-pictogram.js +1 -1
  110. package/dist/components/pictogram/components/informative/target-pictogram.js +1 -1
  111. package/dist/components/pictogram/components/informative/tax-document-pictogram.js +1 -1
  112. package/dist/components/pictogram/components/informative/telephone-call-pictogram.js +1 -1
  113. package/dist/components/pictogram/components/informative/thumbs-up-pictogram.js +1 -1
  114. package/dist/components/pictogram/components/informative/tick-pictogram.js +1 -1
  115. package/dist/components/pictogram/components/informative/tools-pictogram.js +1 -1
  116. package/dist/components/pictogram/components/informative/tractor-pictogram.js +1 -1
  117. package/dist/components/pictogram/components/informative/truck-pictogram.js +1 -1
  118. package/dist/components/pictogram/components/informative/umbrella-pictogram.js +1 -1
  119. package/dist/components/pictogram/components/informative/unsecure-pictogram.js +1 -1
  120. package/dist/components/pictogram/components/informative/wallet-pictogram.js +1 -1
  121. package/dist/components/pictogram/components/informative/wearables-pictogram.js +1 -1
  122. package/dist/components/popover/components/panel/panel.component.d.ts +2 -1
  123. package/dist/components/popover/components/panel/panel.component.js +42 -40
  124. package/dist/components/popover/components/panel/panel.hook.d.ts +39 -0
  125. package/dist/components/popover/components/panel/panel.hook.js +83 -0
  126. package/dist/components/popover/components/panel/panel.styles.js +9 -6
  127. package/dist/components/popover/components/panel/panel.types.d.ts +4 -0
  128. package/dist/components/popover/popover.component.d.ts +1 -1
  129. package/dist/components/popover/popover.component.js +4 -3
  130. package/dist/components/popover/popover.types.d.ts +7 -0
  131. package/dist/components/progress-indicator/progress-indicator.styles.js +5 -5
  132. package/dist/components/progress-rope/components/progress-rope-group-step/progress-rope-group-step.styles.js +1 -1
  133. package/dist/components/progress-rope/components/progress-rope-step/progress-rope-step.styles.js +2 -2
  134. package/dist/components/radio-group/components/radio-group-radio/radio-group-radio.styles.js +4 -4
  135. package/dist/components/switch/switch.styles.js +4 -4
  136. package/dist/components/symbol/components/logos/red-avatar-circle-logo.js +1 -1
  137. package/dist/components/symbol/components/logos/red-avatar-circle-reversed-logo.js +1 -1
  138. package/dist/components/symbol/components/symbols/facebook-symbol.js +1 -1
  139. package/dist/components/symbol/components/symbols/google-plus-symbol.js +1 -1
  140. package/dist/components/symbol/components/symbols/instagram-symbol.js +1 -1
  141. package/dist/components/symbol/components/symbols/linked-in-symbol.js +1 -1
  142. package/dist/components/symbol/components/symbols/slack-symbol.js +1 -1
  143. package/dist/components/symbol/components/symbols/twitter-symbol.js +1 -1
  144. package/dist/components/symbol/components/symbols/x-mark-inverse-symbol.d.ts +2 -0
  145. package/dist/components/symbol/components/symbols/x-mark-inverse-symbol.js +27 -0
  146. package/dist/components/symbol/components/symbols/x-mark-symbol.d.ts +2 -0
  147. package/dist/components/symbol/components/symbols/x-mark-symbol.js +27 -0
  148. package/dist/components/symbol/components/symbols/x-symbol.d.ts +2 -0
  149. package/dist/components/symbol/components/symbols/x-symbol.js +38 -0
  150. package/dist/components/symbol/components/symbols/yammer-symbol.js +1 -1
  151. package/dist/components/symbol/components/symbols/youtube-symbol.js +1 -1
  152. package/dist/components/symbol/index.d.ts +3 -0
  153. package/dist/components/symbol/index.js +3 -0
  154. package/dist/components/textarea/textarea.styles.js +4 -4
  155. package/dist/css/westpac-ui.css +519 -515
  156. package/dist/css/westpac-ui.min.css +519 -515
  157. package/package.json +1 -1
  158. package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +1 -1
  159. package/src/components/checkbox-group/components/checkbox-group-checkbox/checkbox-group-checkbox.styles.ts +4 -4
  160. package/src/components/circle/circle.styles.ts +1 -1
  161. package/src/components/flexi-cell/components/flexi-cell-circle/flexi-cell-circle.styles.ts +1 -1
  162. package/src/components/header/header.styles.ts +1 -1
  163. package/src/components/icon/components/child-care-icon.tsx +1 -1
  164. package/src/components/icon/components/child-icon.tsx +1 -1
  165. package/src/components/icon/components/piggy-bank-icon.tsx +35 -0
  166. package/src/components/icon/components/x-icon.tsx +1 -1
  167. package/src/components/icon/icon.styles.ts +5 -5
  168. package/src/components/icon/index.ts +4 -0
  169. package/src/components/list/components/list-item/list-item.styles.ts +3 -3
  170. package/src/components/pictogram/components/decorative/wbc-bank-card-pictogram.tsx +1 -1
  171. package/src/components/pictogram/components/informative/accessibility-pictogram.tsx +1 -1
  172. package/src/components/pictogram/components/informative/accounts-pictogram.tsx +1 -1
  173. package/src/components/pictogram/components/informative/aeroplane-pictogram.tsx +1 -1
  174. package/src/components/pictogram/components/informative/arrow-down-pictogram.tsx +1 -1
  175. package/src/components/pictogram/components/informative/arrow-left-pictogram.tsx +1 -1
  176. package/src/components/pictogram/components/informative/arrow-right-pictogram.tsx +1 -1
  177. package/src/components/pictogram/components/informative/arrow-up-pictogram.tsx +1 -1
  178. package/src/components/pictogram/components/informative/arrows-passing-pictogram.tsx +1 -1
  179. package/src/components/pictogram/components/informative/atm-pictogram.tsx +1 -1
  180. package/src/components/pictogram/components/informative/australia-pictogram.tsx +1 -1
  181. package/src/components/pictogram/components/informative/bank-card-locked-pictogram.tsx +1 -1
  182. package/src/components/pictogram/components/informative/bank-card-pictogram.tsx +1 -1
  183. package/src/components/pictogram/components/informative/bank-pictogram.tsx +1 -1
  184. package/src/components/pictogram/components/informative/birth-certificate-pictogram.tsx +1 -1
  185. package/src/components/pictogram/components/informative/building-pictogram.tsx +1 -1
  186. package/src/components/pictogram/components/informative/buoy-pictogram.tsx +1 -1
  187. package/src/components/pictogram/components/informative/bus-pictogram.tsx +1 -1
  188. package/src/components/pictogram/components/informative/business-person-pictogram.tsx +1 -1
  189. package/src/components/pictogram/components/informative/calculator-pictogram.tsx +1 -1
  190. package/src/components/pictogram/components/informative/calendar-pictogram.tsx +1 -1
  191. package/src/components/pictogram/components/informative/car-pictogram.tsx +1 -1
  192. package/src/components/pictogram/components/informative/cash-pictogram.tsx +1 -1
  193. package/src/components/pictogram/components/informative/celebration-pictogram.tsx +1 -1
  194. package/src/components/pictogram/components/informative/chat-pictogram.tsx +1 -1
  195. package/src/components/pictogram/components/informative/clock-pictogram.tsx +1 -1
  196. package/src/components/pictogram/components/informative/coffee-pictogram.tsx +1 -1
  197. package/src/components/pictogram/components/informative/coins-pictogram.tsx +1 -1
  198. package/src/components/pictogram/components/informative/compass-pictogram.tsx +1 -1
  199. package/src/components/pictogram/components/informative/customer-profile-pictogram.tsx +1 -1
  200. package/src/components/pictogram/components/informative/desktop-computer-pictogram.tsx +1 -1
  201. package/src/components/pictogram/components/informative/document-and-pen-pictogram.tsx +1 -1
  202. package/src/components/pictogram/components/informative/dollar-sign-pictogram.tsx +1 -1
  203. package/src/components/pictogram/components/informative/drivers-licence-pictogram.tsx +1 -1
  204. package/src/components/pictogram/components/informative/education-pictogram.tsx +1 -1
  205. package/src/components/pictogram/components/informative/eftpos-pictogram.tsx +1 -1
  206. package/src/components/pictogram/components/informative/envelope-email-pictogram.tsx +1 -1
  207. package/src/components/pictogram/components/informative/envelope-printed-pictogram.tsx +1 -1
  208. package/src/components/pictogram/components/informative/face-happy-pictogram.tsx +1 -1
  209. package/src/components/pictogram/components/informative/face-unhappy-pictogram.tsx +1 -1
  210. package/src/components/pictogram/components/informative/face-unsure-pictogram.tsx +1 -1
  211. package/src/components/pictogram/components/informative/finger-motion-pictogram.tsx +1 -1
  212. package/src/components/pictogram/components/informative/fingerprint-pictogram.tsx +1 -1
  213. package/src/components/pictogram/components/informative/football-pictogram.tsx +1 -1
  214. package/src/components/pictogram/components/informative/fork-knife-pictogram.tsx +1 -1
  215. package/src/components/pictogram/components/informative/generic-document-pictogram.tsx +1 -1
  216. package/src/components/pictogram/components/informative/gift-pictogram.tsx +1 -1
  217. package/src/components/pictogram/components/informative/globe-australia-pictogram.tsx +1 -1
  218. package/src/components/pictogram/components/informative/globe-pictogram.tsx +1 -1
  219. package/src/components/pictogram/components/informative/graph-decreasing-pictogram.tsx +1 -1
  220. package/src/components/pictogram/components/informative/graph-increasing-pictogram.tsx +1 -1
  221. package/src/components/pictogram/components/informative/gym-pictogram.tsx +1 -1
  222. package/src/components/pictogram/components/informative/headset-pictogram.tsx +1 -1
  223. package/src/components/pictogram/components/informative/heart-pictogram.tsx +1 -1
  224. package/src/components/pictogram/components/informative/house-pictogram.tsx +1 -1
  225. package/src/components/pictogram/components/informative/light-bulb-pictogram.tsx +1 -1
  226. package/src/components/pictogram/components/informative/loop-pictogram.tsx +1 -1
  227. package/src/components/pictogram/components/informative/medicare-card-pictogram.tsx +1 -1
  228. package/src/components/pictogram/components/informative/mobile-device-pictogram.tsx +1 -1
  229. package/src/components/pictogram/components/informative/money-in-pictogram.tsx +1 -1
  230. package/src/components/pictogram/components/informative/money-out-pictogram.tsx +1 -1
  231. package/src/components/pictogram/components/informative/movie-tickets-pictogram.tsx +1 -1
  232. package/src/components/pictogram/components/informative/nest-egg-pictogram.tsx +1 -1
  233. package/src/components/pictogram/components/informative/noodles-pictogram.tsx +1 -1
  234. package/src/components/pictogram/components/informative/number-1-pictogram.tsx +1 -1
  235. package/src/components/pictogram/components/informative/number-2-pictogram.tsx +1 -1
  236. package/src/components/pictogram/components/informative/number-3-pictogram.tsx +1 -1
  237. package/src/components/pictogram/components/informative/number-4-pictogram.tsx +1 -1
  238. package/src/components/pictogram/components/informative/number-5-pictogram.tsx +1 -1
  239. package/src/components/pictogram/components/informative/padlock-locked-pictogram.tsx +1 -1
  240. package/src/components/pictogram/components/informative/padlock-unlocked-pictogram.tsx +1 -1
  241. package/src/components/pictogram/components/informative/passport-pictogram.tsx +1 -1
  242. package/src/components/pictogram/components/informative/percent-sign-pictogram.tsx +1 -1
  243. package/src/components/pictogram/components/informative/person-pictogram.tsx +1 -1
  244. package/src/components/pictogram/components/informative/piggy-bank-pictogram.tsx +1 -1
  245. package/src/components/pictogram/components/informative/pizza-pictogram.tsx +1 -1
  246. package/src/components/pictogram/components/informative/plant-pictogram.tsx +1 -1
  247. package/src/components/pictogram/components/informative/search-pictogram.tsx +1 -1
  248. package/src/components/pictogram/components/informative/secure-pictogram.tsx +1 -1
  249. package/src/components/pictogram/components/informative/shop-pictogram.tsx +1 -1
  250. package/src/components/pictogram/components/informative/shopping-pictogram.tsx +1 -1
  251. package/src/components/pictogram/components/informative/sparkle-pictogram.tsx +1 -1
  252. package/src/components/pictogram/components/informative/star-pictogram.tsx +1 -1
  253. package/src/components/pictogram/components/informative/stopwatch-pictogram.tsx +1 -1
  254. package/src/components/pictogram/components/informative/target-pictogram.tsx +1 -1
  255. package/src/components/pictogram/components/informative/tax-document-pictogram.tsx +1 -1
  256. package/src/components/pictogram/components/informative/telephone-call-pictogram.tsx +1 -1
  257. package/src/components/pictogram/components/informative/thumbs-up-pictogram.tsx +1 -1
  258. package/src/components/pictogram/components/informative/tick-pictogram.tsx +1 -1
  259. package/src/components/pictogram/components/informative/tools-pictogram.tsx +1 -1
  260. package/src/components/pictogram/components/informative/tractor-pictogram.tsx +1 -1
  261. package/src/components/pictogram/components/informative/truck-pictogram.tsx +1 -1
  262. package/src/components/pictogram/components/informative/umbrella-pictogram.tsx +1 -1
  263. package/src/components/pictogram/components/informative/unsecure-pictogram.tsx +1 -1
  264. package/src/components/pictogram/components/informative/wallet-pictogram.tsx +1 -1
  265. package/src/components/pictogram/components/informative/wearables-pictogram.tsx +1 -1
  266. package/src/components/popover/components/panel/panel.component.tsx +34 -45
  267. package/src/components/popover/components/panel/panel.hook.tsx +113 -0
  268. package/src/components/popover/components/panel/panel.styles.ts +9 -7
  269. package/src/components/popover/components/panel/panel.types.ts +4 -0
  270. package/src/components/popover/popover.component.tsx +10 -4
  271. package/src/components/popover/popover.types.ts +8 -0
  272. package/src/components/progress-indicator/progress-indicator.styles.ts +5 -5
  273. package/src/components/progress-rope/components/progress-rope-group-step/progress-rope-group-step.styles.ts +1 -1
  274. package/src/components/progress-rope/components/progress-rope-step/progress-rope-step.styles.ts +2 -2
  275. package/src/components/radio-group/components/radio-group-radio/radio-group-radio.styles.ts +4 -4
  276. package/src/components/switch/switch.styles.ts +4 -4
  277. package/src/components/symbol/components/logos/red-avatar-circle-logo.tsx +1 -1
  278. package/src/components/symbol/components/logos/red-avatar-circle-reversed-logo.tsx +1 -1
  279. package/src/components/symbol/components/symbols/facebook-symbol.tsx +1 -1
  280. package/src/components/symbol/components/symbols/google-plus-symbol.tsx +1 -1
  281. package/src/components/symbol/components/symbols/instagram-symbol.tsx +1 -1
  282. package/src/components/symbol/components/symbols/linked-in-symbol.tsx +1 -1
  283. package/src/components/symbol/components/symbols/slack-symbol.tsx +1 -1
  284. package/src/components/symbol/components/symbols/twitter-symbol.tsx +1 -1
  285. package/src/components/symbol/components/symbols/x-mark-inverse-symbol.tsx +28 -0
  286. package/src/components/symbol/components/symbols/x-mark-symbol.tsx +28 -0
  287. package/src/components/symbol/components/symbols/x-symbol.tsx +39 -0
  288. package/src/components/symbol/components/symbols/yammer-symbol.tsx +1 -1
  289. package/src/components/symbol/components/symbols/youtube-symbol.tsx +1 -1
  290. package/src/components/symbol/index.ts +3 -0
  291. package/src/components/textarea/textarea.styles.ts +4 -4
  292. package/dist/components/popover/popover.utils.d.ts +0 -3
  293. package/dist/components/popover/popover.utils.js +0 -37
  294. package/src/components/popover/popover.utils.tsx +0 -59
@@ -1,37 +0,0 @@
1
- export const getPopoverPosition = (triggerRef, popoverRef, arrowRef, placement)=>{
2
- if (!triggerRef.current || !popoverRef.current || !arrowRef.current) {
3
- throw new Error('You must pass valid refs.');
4
- }
5
- const trigger = triggerRef.current.getBoundingClientRect();
6
- const popover = popoverRef.current.getBoundingClientRect();
7
- const arrow = arrowRef.current.getBoundingClientRect();
8
- const remSize = typeof window !== 'undefined' ? parseInt(window.getComputedStyle(document.getElementsByTagName('html')[0]).fontSize) : 1;
9
- const position = {
10
- placement: placement ? placement : 'top',
11
- offset: popover.right >= window.innerWidth ? 'right' : 'left',
12
- panelPosition: trigger.width / 2 / remSize,
13
- arrowPosition: (popover.width / 2 - arrow.width / 2) / remSize
14
- };
15
- if (typeof window === 'undefined') {
16
- return position;
17
- }
18
- const offLeft = popover.left <= 0;
19
- const offRight = popover.right + remSize >= window.innerWidth;
20
- if (offLeft) {
21
- position.panelPosition = (popover.width - popover.right + trigger.width / 2 + remSize) / remSize;
22
- position.arrowPosition = (trigger.right - trigger.width / 2 - arrow.width / 2 - remSize) / remSize;
23
- }
24
- if (offRight) {
25
- position.panelPosition = (window.innerWidth - trigger.right - remSize) / remSize;
26
- position.arrowPosition = (window.innerWidth - (trigger.left + trigger.width / 2) - (remSize + arrow.width / 2)) / remSize;
27
- }
28
- if (popover.height > trigger.top) {
29
- position.placement = placement ? placement : 'bottom';
30
- return position;
31
- }
32
- if (popover.bottom > window.innerHeight) {
33
- position.placement = placement ? placement : 'top';
34
- return position;
35
- }
36
- return position;
37
- };
@@ -1,59 +0,0 @@
1
- import { RefObject } from 'react';
2
-
3
- import { Position } from './components/panel/panel.types.js';
4
-
5
- export const getPopoverPosition = (
6
- triggerRef: RefObject<HTMLDivElement>,
7
- popoverRef: RefObject<HTMLDivElement>,
8
- arrowRef: RefObject<HTMLDivElement>,
9
- placement?: 'top' | 'bottom',
10
- ): Position => {
11
- // bail early without refs
12
- if (!triggerRef.current || !popoverRef.current || !arrowRef.current) {
13
- throw new Error('You must pass valid refs.');
14
- }
15
-
16
- const trigger = triggerRef.current.getBoundingClientRect();
17
- const popover = popoverRef.current.getBoundingClientRect();
18
- const arrow = arrowRef.current.getBoundingClientRect();
19
- const remSize =
20
- typeof window !== 'undefined'
21
- ? parseInt(window.getComputedStyle(document.getElementsByTagName('html')[0]).fontSize)
22
- : 1;
23
-
24
- const position: Position = {
25
- placement: placement ? placement : 'top',
26
- offset: popover.right >= window.innerWidth ? 'right' : 'left',
27
- panelPosition: trigger.width / 2 / remSize,
28
- arrowPosition: (popover.width / 2 - arrow.width / 2) / remSize,
29
- };
30
- if (typeof window === 'undefined') {
31
- return position;
32
- }
33
-
34
- const offLeft = popover.left <= 0;
35
- const offRight = popover.right + remSize >= window.innerWidth;
36
-
37
- if (offLeft) {
38
- position.panelPosition = (popover.width - popover.right + trigger.width / 2 + remSize) / remSize;
39
- position.arrowPosition = (trigger.right - trigger.width / 2 - arrow.width / 2 - remSize) / remSize;
40
- }
41
-
42
- if (offRight) {
43
- position.panelPosition = (window.innerWidth - trigger.right - remSize) / remSize;
44
- position.arrowPosition =
45
- (window.innerWidth - (trigger.left + trigger.width / 2) - (remSize + arrow.width / 2)) / remSize;
46
- }
47
-
48
- if (popover.height > trigger.top) {
49
- position.placement = placement ? placement : 'bottom';
50
- return position;
51
- }
52
-
53
- if (popover.bottom > window.innerHeight) {
54
- position.placement = placement ? placement : 'top';
55
- return position;
56
- }
57
-
58
- return position;
59
- };