polaris_view_components 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (608) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/icons/polaris/AbandonedCartFilledMajor.svg +1 -0
  3. data/app/assets/icons/polaris/AbandonedCartMajor.svg +1 -1
  4. data/app/assets/icons/polaris/AccessibilityMajor.svg +1 -1
  5. data/app/assets/icons/polaris/ActivitiesMajor.svg +1 -1
  6. data/app/assets/icons/polaris/AddCodeMajor.svg +1 -1
  7. data/app/assets/icons/polaris/AddImageMajor.svg +1 -1
  8. data/app/assets/icons/polaris/AddMajor.svg +1 -1
  9. data/app/assets/icons/polaris/AddNoteMajor.svg +1 -1
  10. data/app/assets/icons/polaris/AddProductMajor.svg +1 -1
  11. data/app/assets/icons/polaris/AdjustMinor.svg +1 -1
  12. data/app/assets/icons/polaris/AffiliateMajor.svg +1 -1
  13. data/app/assets/icons/polaris/AlertMinor.svg +1 -1
  14. data/app/assets/icons/polaris/AnalyticsBarHorizontalMinor.svg +1 -1
  15. data/app/assets/icons/polaris/AnalyticsBarStackedMinor.svg +1 -1
  16. data/app/assets/icons/polaris/AnalyticsCohortMinor.svg +1 -1
  17. data/app/assets/icons/polaris/AnalyticsDonutMinor.svg +1 -1
  18. data/app/assets/icons/polaris/AnalyticsFilledMinor.svg +1 -0
  19. data/app/assets/icons/polaris/AnalyticsFunnelMinor.svg +1 -1
  20. data/app/assets/icons/polaris/AnalyticsLineMinor.svg +1 -1
  21. data/app/assets/icons/polaris/AnalyticsMajor.svg +1 -1
  22. data/app/assets/icons/polaris/AnalyticsMinor.svg +1 -1
  23. data/app/assets/icons/polaris/AnalyticsTableMinor.svg +1 -1
  24. data/app/assets/icons/polaris/AnyClickModelMinor.svg +1 -1
  25. data/app/assets/icons/polaris/AppExtensionMinor.svg +1 -1
  26. data/app/assets/icons/polaris/AppsFilledMajor.svg +1 -0
  27. data/app/assets/icons/polaris/AppsMajor.svg +1 -1
  28. data/app/assets/icons/polaris/AppsMinor.svg +1 -1
  29. data/app/assets/icons/polaris/ArchiveMajor.svg +1 -1
  30. data/app/assets/icons/polaris/ArchiveMinor.svg +1 -1
  31. data/app/assets/icons/polaris/ArrowDownMinor.svg +1 -1
  32. data/app/assets/icons/polaris/ArrowLeftMinor.svg +1 -1
  33. data/app/assets/icons/polaris/ArrowRightMinor.svg +1 -1
  34. data/app/assets/icons/polaris/ArrowUpMinor.svg +1 -1
  35. data/app/assets/icons/polaris/AttachmentFilledMajor.svg +1 -0
  36. data/app/assets/icons/polaris/AttachmentMajor.svg +1 -1
  37. data/app/assets/icons/polaris/AutomationFilledMajor.svg +1 -0
  38. data/app/assets/icons/polaris/AutomationMajor.svg +1 -1
  39. data/app/assets/icons/polaris/BackspaceMajor.svg +1 -1
  40. data/app/assets/icons/polaris/BalanceFilledMajor.svg +1 -0
  41. data/app/assets/icons/polaris/BalanceMajor.svg +1 -1
  42. data/app/assets/icons/polaris/BankFilledMajor.svg +1 -0
  43. data/app/assets/icons/polaris/BankMajor.svg +1 -1
  44. data/app/assets/icons/polaris/BarcodeMajor.svg +1 -1
  45. data/app/assets/icons/polaris/BehaviorFilledMajor.svg +1 -0
  46. data/app/assets/icons/polaris/BehaviorMajor.svg +1 -1
  47. data/app/assets/icons/polaris/BehaviorMinor.svg +1 -1
  48. data/app/assets/icons/polaris/BillingStatementDollarFilledMajor.svg +1 -0
  49. data/app/assets/icons/polaris/BillingStatementDollarMajor.svg +1 -1
  50. data/app/assets/icons/polaris/BillingStatementEuroFilledMajor.svg +1 -0
  51. data/app/assets/icons/polaris/BillingStatementEuroMajor.svg +1 -1
  52. data/app/assets/icons/polaris/BillingStatementPoundFilledMajor.svg +1 -0
  53. data/app/assets/icons/polaris/BillingStatementPoundMajor.svg +1 -1
  54. data/app/assets/icons/polaris/BillingStatementRupeeFilledMajor.svg +1 -0
  55. data/app/assets/icons/polaris/BillingStatementRupeeMajor.svg +1 -1
  56. data/app/assets/icons/polaris/BillingStatementYenFilledMajor.svg +1 -0
  57. data/app/assets/icons/polaris/BillingStatementYenMajor.svg +1 -1
  58. data/app/assets/icons/polaris/BlockMinor.svg +1 -1
  59. data/app/assets/icons/polaris/BlockquoteMajor.svg +1 -1
  60. data/app/assets/icons/polaris/BlogMajor.svg +1 -1
  61. data/app/assets/icons/polaris/BoldMajor.svg +1 -0
  62. data/app/assets/icons/polaris/BoldMinor.svg +1 -0
  63. data/app/assets/icons/polaris/BugMajor.svg +1 -1
  64. data/app/assets/icons/polaris/ButtonCornerPillMajor.svg +1 -1
  65. data/app/assets/icons/polaris/ButtonCornerRoundedMajor.svg +1 -1
  66. data/app/assets/icons/polaris/ButtonCornerSquareMajor.svg +1 -1
  67. data/app/assets/icons/polaris/ButtonMinor.svg +1 -1
  68. data/app/assets/icons/polaris/BuyButtonButtonLayoutMajor.svg +1 -1
  69. data/app/assets/icons/polaris/BuyButtonHorizontalLayoutMajor.svg +1 -1
  70. data/app/assets/icons/polaris/BuyButtonMajor.svg +1 -1
  71. data/app/assets/icons/polaris/BuyButtonVerticalLayoutMajor.svg +1 -1
  72. data/app/assets/icons/polaris/CalendarMajor.svg +1 -1
  73. data/app/assets/icons/polaris/CalendarMinor.svg +1 -1
  74. data/app/assets/icons/polaris/CalendarTickMajor.svg +1 -1
  75. data/app/assets/icons/polaris/CalendarTimeMinor.svg +1 -1
  76. data/app/assets/icons/polaris/CameraMajor.svg +1 -1
  77. data/app/assets/icons/polaris/CancelMajor.svg +1 -1
  78. data/app/assets/icons/polaris/CancelMinor.svg +1 -1
  79. data/app/assets/icons/polaris/CancelSmallMinor.svg +1 -1
  80. data/app/assets/icons/polaris/CapitalFilledMajor.svg +1 -0
  81. data/app/assets/icons/polaris/CapitalMajor.svg +1 -1
  82. data/app/assets/icons/polaris/CapturePaymentMinor.svg +1 -1
  83. data/app/assets/icons/polaris/CardReaderChipMajor.svg +1 -1
  84. data/app/assets/icons/polaris/CardReaderMajor.svg +1 -1
  85. data/app/assets/icons/polaris/CardReaderTapMajor.svg +1 -1
  86. data/app/assets/icons/polaris/CaretDownMinor.svg +1 -1
  87. data/app/assets/icons/polaris/CaretUpMinor.svg +1 -1
  88. data/app/assets/icons/polaris/CartDownFilledMajor.svg +1 -0
  89. data/app/assets/icons/polaris/CartDownMajor.svg +1 -1
  90. data/app/assets/icons/polaris/CartFilledMajor.svg +1 -0
  91. data/app/assets/icons/polaris/CartMajor.svg +1 -1
  92. data/app/assets/icons/polaris/CartUpMajor.svg +1 -1
  93. data/app/assets/icons/polaris/CashDollarFilledMajor.svg +1 -0
  94. data/app/assets/icons/polaris/CashDollarMajor.svg +1 -1
  95. data/app/assets/icons/polaris/CashDollarMinor.svg +1 -1
  96. data/app/assets/icons/polaris/CashEuroMajor.svg +1 -1
  97. data/app/assets/icons/polaris/CashPoundMajor.svg +1 -1
  98. data/app/assets/icons/polaris/CashRupeeMajor.svg +1 -1
  99. data/app/assets/icons/polaris/CashYenMajor.svg +1 -1
  100. data/app/assets/icons/polaris/CategoriesMajor.svg +1 -1
  101. data/app/assets/icons/polaris/ChannelsMajor.svg +1 -1
  102. data/app/assets/icons/polaris/ChatMajor.svg +1 -1
  103. data/app/assets/icons/polaris/ChecklistAlternateMajor.svg +1 -1
  104. data/app/assets/icons/polaris/ChecklistMajor.svg +1 -1
  105. data/app/assets/icons/polaris/CheckoutMajor.svg +1 -1
  106. data/app/assets/icons/polaris/ChevronDownMinor.svg +1 -1
  107. data/app/assets/icons/polaris/ChevronLeftMinor.svg +1 -1
  108. data/app/assets/icons/polaris/ChevronRightMinor.svg +1 -1
  109. data/app/assets/icons/polaris/ChevronUpMinor.svg +1 -1
  110. data/app/assets/icons/polaris/CircleAlertMajor.svg +1 -1
  111. data/app/assets/icons/polaris/CircleCancelMajor.svg +1 -1
  112. data/app/assets/icons/polaris/CircleCancelMinor.svg +1 -1
  113. data/app/assets/icons/polaris/CircleChevronDownMinor.svg +1 -1
  114. data/app/assets/icons/polaris/CircleChevronLeftMinor.svg +1 -1
  115. data/app/assets/icons/polaris/CircleChevronRightMinor.svg +1 -1
  116. data/app/assets/icons/polaris/CircleChevronUpMinor.svg +1 -1
  117. data/app/assets/icons/polaris/CircleDisableMinor.svg +1 -1
  118. data/app/assets/icons/polaris/CircleDisabledMajor.svg +1 -1
  119. data/app/assets/icons/polaris/CircleDotsMajor.svg +1 -1
  120. data/app/assets/icons/polaris/CircleDownMajor.svg +1 -1
  121. data/app/assets/icons/polaris/CircleInformationMajor.svg +1 -1
  122. data/app/assets/icons/polaris/CircleLeftMajor.svg +1 -1
  123. data/app/assets/icons/polaris/CircleMinusMajor.svg +1 -1
  124. data/app/assets/icons/polaris/CircleMinusMinor.svg +1 -1
  125. data/app/assets/icons/polaris/CircleMinusOutlineMinor.svg +1 -1
  126. data/app/assets/icons/polaris/CirclePlusMajor.svg +1 -1
  127. data/app/assets/icons/polaris/CirclePlusMinor.svg +1 -1
  128. data/app/assets/icons/polaris/CirclePlusOutlineMinor.svg +1 -1
  129. data/app/assets/icons/polaris/CircleRightMajor.svg +1 -1
  130. data/app/assets/icons/polaris/CircleTickMajor.svg +1 -1
  131. data/app/assets/icons/polaris/CircleTickMinor.svg +1 -1
  132. data/app/assets/icons/polaris/CircleTickOutlineMinor.svg +1 -1
  133. data/app/assets/icons/polaris/CircleUpMajor.svg +1 -1
  134. data/app/assets/icons/polaris/ClipboardMinor.svg +1 -1
  135. data/app/assets/icons/polaris/ClockMajor.svg +1 -1
  136. data/app/assets/icons/polaris/ClockMinor.svg +1 -1
  137. data/app/assets/icons/polaris/CodeMajor.svg +1 -1
  138. data/app/assets/icons/polaris/CodeMinor.svg +1 -1
  139. data/app/assets/icons/polaris/CollectionReferenceMinor.svg +1 -1
  140. data/app/assets/icons/polaris/CollectionsFilledMajor.svg +1 -0
  141. data/app/assets/icons/polaris/CollectionsMajor.svg +1 -1
  142. data/app/assets/icons/polaris/ColorNoneMinor.svg +1 -1
  143. data/app/assets/icons/polaris/ColorsMajor.svg +1 -1
  144. data/app/assets/icons/polaris/Column1Major.svg +1 -1
  145. data/app/assets/icons/polaris/ColumnWithTextMajor.svg +1 -1
  146. data/app/assets/icons/polaris/Columns2Major.svg +1 -1
  147. data/app/assets/icons/polaris/Columns3Major.svg +1 -1
  148. data/app/assets/icons/polaris/Columns3Minor.svg +1 -1
  149. data/app/assets/icons/polaris/ComposeMajor.svg +1 -1
  150. data/app/assets/icons/polaris/ConfettiMajor.svg +1 -1
  151. data/app/assets/icons/polaris/ConnectMinor.svg +1 -1
  152. data/app/assets/icons/polaris/ContentFilledMinor.svg +1 -0
  153. data/app/assets/icons/polaris/ContentMinor.svg +1 -1
  154. data/app/assets/icons/polaris/ConversationMinor.svg +1 -1
  155. data/app/assets/icons/polaris/CreditCardCancelMajor.svg +1 -1
  156. data/app/assets/icons/polaris/CreditCardMajor.svg +1 -1
  157. data/app/assets/icons/polaris/CreditCardPercentMajor.svg +1 -1
  158. data/app/assets/icons/polaris/CreditCardSecureMajor.svg +1 -1
  159. data/app/assets/icons/polaris/CurrencyConvertMinor.svg +1 -1
  160. data/app/assets/icons/polaris/CustomerMinusMajor.svg +1 -1
  161. data/app/assets/icons/polaris/CustomerPlusMajor.svg +1 -1
  162. data/app/assets/icons/polaris/CustomersFilledMinor.svg +1 -0
  163. data/app/assets/icons/polaris/CustomersMajor.svg +1 -1
  164. data/app/assets/icons/polaris/CustomersMinor.svg +1 -1
  165. data/app/assets/icons/polaris/DataDrivenModelMinor.svg +1 -1
  166. data/app/assets/icons/polaris/DataVisualizationMajor.svg +1 -1
  167. data/app/assets/icons/polaris/DecimalMinor.svg +1 -1
  168. data/app/assets/icons/polaris/DeleteMajor.svg +1 -1
  169. data/app/assets/icons/polaris/DeleteMinor.svg +1 -1
  170. data/app/assets/icons/polaris/DesktopMajor.svg +1 -1
  171. data/app/assets/icons/polaris/DetailedPopUpMajor.svg +1 -1
  172. data/app/assets/icons/polaris/DiamondAlertMajor.svg +1 -1
  173. data/app/assets/icons/polaris/DiamondAlertMinor.svg +1 -1
  174. data/app/assets/icons/polaris/DigitalMediaReceiverMajor.svg +1 -1
  175. data/app/assets/icons/polaris/DiscountAutomaticMajor.svg +1 -1
  176. data/app/assets/icons/polaris/DiscountCodeMajor.svg +1 -1
  177. data/app/assets/icons/polaris/DiscountsFilledMinor.svg +1 -0
  178. data/app/assets/icons/polaris/DiscountsMajor.svg +1 -1
  179. data/app/assets/icons/polaris/DiscountsMinor.svg +1 -1
  180. data/app/assets/icons/polaris/DisputeMinor.svg +1 -1
  181. data/app/assets/icons/polaris/DnsSettingsMajor.svg +1 -1
  182. data/app/assets/icons/polaris/DockFloatingMajor.svg +1 -1
  183. data/app/assets/icons/polaris/DockSideMajor.svg +1 -1
  184. data/app/assets/icons/polaris/DomainNewMajor.svg +1 -1
  185. data/app/assets/icons/polaris/DomainRedirectMinor.svg +1 -1
  186. data/app/assets/icons/polaris/DomainsFilledMajor.svg +1 -0
  187. data/app/assets/icons/polaris/DomainsMajor.svg +1 -1
  188. data/app/assets/icons/polaris/DraftOrdersFilledMajor.svg +1 -0
  189. data/app/assets/icons/polaris/DraftOrdersMajor.svg +1 -1
  190. data/app/assets/icons/polaris/DragDropMajor.svg +1 -1
  191. data/app/assets/icons/polaris/DragHandleMinor.svg +1 -1
  192. data/app/assets/icons/polaris/DropdownMinor.svg +1 -1
  193. data/app/assets/icons/polaris/DuplicateMinor.svg +1 -1
  194. data/app/assets/icons/polaris/DynamicSourceMajor.svg +1 -1
  195. data/app/assets/icons/polaris/DynamicSourceMinor.svg +1 -1
  196. data/app/assets/icons/polaris/EditMajor.svg +1 -1
  197. data/app/assets/icons/polaris/EditMinor.svg +1 -1
  198. data/app/assets/icons/polaris/EmailMajor.svg +1 -1
  199. data/app/assets/icons/polaris/EmailNewsletterMajor.svg +1 -1
  200. data/app/assets/icons/polaris/EmbedMinor.svg +1 -1
  201. data/app/assets/icons/polaris/EnableSelectionMinor.svg +1 -1
  202. data/app/assets/icons/polaris/EnterMajor.svg +1 -1
  203. data/app/assets/icons/polaris/EnvelopeMajor.svg +1 -1
  204. data/app/assets/icons/polaris/ExchangeMajor.svg +1 -1
  205. data/app/assets/icons/polaris/ExistingInventoryMajor.svg +1 -1
  206. data/app/assets/icons/polaris/ExitMajor.svg +1 -1
  207. data/app/assets/icons/polaris/ExploreImagesMajor.svg +1 -1
  208. data/app/assets/icons/polaris/ExportMinor.svg +1 -1
  209. data/app/assets/icons/polaris/ExtendMajor.svg +1 -1
  210. data/app/assets/icons/polaris/ExtendMinor.svg +1 -1
  211. data/app/assets/icons/polaris/ExternalMinor.svg +1 -1
  212. data/app/assets/icons/polaris/ExternalSmallMinor.svg +1 -1
  213. data/app/assets/icons/polaris/EyeDropperMinor.svg +1 -1
  214. data/app/assets/icons/polaris/FacebookMinor.svg +1 -0
  215. data/app/assets/icons/polaris/FaviconMajor.svg +1 -1
  216. data/app/assets/icons/polaris/FavoriteMajor.svg +1 -1
  217. data/app/assets/icons/polaris/FeaturedCollectionMajor.svg +1 -1
  218. data/app/assets/icons/polaris/FeaturedContentMajor.svg +1 -1
  219. data/app/assets/icons/polaris/FileFilledMinor.svg +1 -0
  220. data/app/assets/icons/polaris/FileMinor.svg +1 -1
  221. data/app/assets/icons/polaris/FilterMajor.svg +1 -1
  222. data/app/assets/icons/polaris/FilterMinor.svg +1 -1
  223. data/app/assets/icons/polaris/FinancesMajor.svg +1 -1
  224. data/app/assets/icons/polaris/FinancesMinor.svg +1 -1
  225. data/app/assets/icons/polaris/FirstClickModelMinor.svg +1 -1
  226. data/app/assets/icons/polaris/FirstOrderMajor.svg +1 -1
  227. data/app/assets/icons/polaris/FirstVisitMajor.svg +1 -1
  228. data/app/assets/icons/polaris/FlagMajor.svg +1 -1
  229. data/app/assets/icons/polaris/FlipCameraMajor.svg +1 -1
  230. data/app/assets/icons/polaris/FolderDownMajor.svg +1 -1
  231. data/app/assets/icons/polaris/FolderMajor.svg +1 -1
  232. data/app/assets/icons/polaris/FolderMinusMajor.svg +1 -1
  233. data/app/assets/icons/polaris/FolderPlusMajor.svg +1 -1
  234. data/app/assets/icons/polaris/FolderUpMajor.svg +1 -1
  235. data/app/assets/icons/polaris/FollowUpEmailMajor.svg +1 -1
  236. data/app/assets/icons/polaris/FoodMajor.svg +1 -1
  237. data/app/assets/icons/polaris/FooterMajor.svg +1 -1
  238. data/app/assets/icons/polaris/FormsMajor.svg +1 -1
  239. data/app/assets/icons/polaris/FraudProtectMajor.svg +1 -1
  240. data/app/assets/icons/polaris/FraudProtectMinor.svg +1 -1
  241. data/app/assets/icons/polaris/FraudProtectPendingMajor.svg +1 -1
  242. data/app/assets/icons/polaris/FraudProtectPendingMinor.svg +1 -1
  243. data/app/assets/icons/polaris/FraudProtectUnprotectedMajor.svg +1 -1
  244. data/app/assets/icons/polaris/FraudProtectUnprotectedMinor.svg +1 -1
  245. data/app/assets/icons/polaris/FulfillmentFulfilledMajor.svg +1 -1
  246. data/app/assets/icons/polaris/FulfillmentOnHoldMajor.svg +1 -1
  247. data/app/assets/icons/polaris/GamesConsoleMajor.svg +1 -1
  248. data/app/assets/icons/polaris/GaugeMajor.svg +1 -0
  249. data/app/assets/icons/polaris/GaugeMinor.svg +1 -0
  250. data/app/assets/icons/polaris/GiftCardFilledMinor.svg +1 -0
  251. data/app/assets/icons/polaris/GiftCardMajor.svg +1 -1
  252. data/app/assets/icons/polaris/GiftCardMinor.svg +1 -1
  253. data/app/assets/icons/polaris/GlobeMajor.svg +1 -1
  254. data/app/assets/icons/polaris/GlobeMinor.svg +1 -1
  255. data/app/assets/icons/polaris/GrammarMajor.svg +1 -1
  256. data/app/assets/icons/polaris/HashtagMajor.svg +1 -1
  257. data/app/assets/icons/polaris/HashtagMinor.svg +1 -1
  258. data/app/assets/icons/polaris/HeaderMajor.svg +1 -1
  259. data/app/assets/icons/polaris/HeartMajor.svg +1 -1
  260. data/app/assets/icons/polaris/HideKeyboardMajor.svg +1 -1
  261. data/app/assets/icons/polaris/HideMinor.svg +1 -1
  262. data/app/assets/icons/polaris/HintMajor.svg +1 -1
  263. data/app/assets/icons/polaris/HomeFilledMinor.svg +1 -0
  264. data/app/assets/icons/polaris/HomeMajor.svg +1 -1
  265. data/app/assets/icons/polaris/HomeMinor.svg +1 -1
  266. data/app/assets/icons/polaris/HorizontalDotsMinor.svg +1 -1
  267. data/app/assets/icons/polaris/IconsFilledMajor.svg +1 -0
  268. data/app/assets/icons/polaris/IconsMajor.svg +1 -1
  269. data/app/assets/icons/polaris/IdentityCardFilledMajor.svg +1 -0
  270. data/app/assets/icons/polaris/IdentityCardMajor.svg +1 -1
  271. data/app/assets/icons/polaris/IllustrationMajor.svg +1 -1
  272. data/app/assets/icons/polaris/ImageAltMajor.svg +1 -1
  273. data/app/assets/icons/polaris/ImageAltMinor.svg +1 -1
  274. data/app/assets/icons/polaris/ImageMajor.svg +1 -1
  275. data/app/assets/icons/polaris/ImageWithTextMajor.svg +1 -1
  276. data/app/assets/icons/polaris/ImageWithTextOverlayMajor.svg +1 -1
  277. data/app/assets/icons/polaris/ImagesMajor.svg +1 -1
  278. data/app/assets/icons/polaris/ImportMinor.svg +1 -1
  279. data/app/assets/icons/polaris/ImportStoreMajor.svg +1 -1
  280. data/app/assets/icons/polaris/InactiveLocationMajor.svg +1 -1
  281. data/app/assets/icons/polaris/InactiveLocationMinor.svg +1 -1
  282. data/app/assets/icons/polaris/IncomingMajor.svg +1 -1
  283. data/app/assets/icons/polaris/IndentMajor.svg +1 -0
  284. data/app/assets/icons/polaris/IndentMinor.svg +1 -0
  285. data/app/assets/icons/polaris/InfoMinor.svg +1 -1
  286. data/app/assets/icons/polaris/InsertDynamicSourceMajor.svg +1 -1
  287. data/app/assets/icons/polaris/InsertDynamicSourceMinor.svg +1 -1
  288. data/app/assets/icons/polaris/InstagramMinor.svg +1 -0
  289. data/app/assets/icons/polaris/InstallMinor.svg +1 -1
  290. data/app/assets/icons/polaris/InventoryFilledMajor.svg +1 -0
  291. data/app/assets/icons/polaris/InventoryMajor.svg +1 -1
  292. data/app/assets/icons/polaris/InviteMinor.svg +1 -1
  293. data/app/assets/icons/polaris/IqMajor.svg +1 -1
  294. data/app/assets/icons/polaris/ItalicMajor.svg +1 -0
  295. data/app/assets/icons/polaris/ItalicMinor.svg +1 -0
  296. data/app/assets/icons/polaris/JobsFilledMajor.svg +1 -0
  297. data/app/assets/icons/polaris/JobsMajor.svg +1 -1
  298. data/app/assets/icons/polaris/KeyMajor.svg +1 -1
  299. data/app/assets/icons/polaris/KeyboardMajor.svg +1 -1
  300. data/app/assets/icons/polaris/KeyboardMinor.svg +1 -1
  301. data/app/assets/icons/polaris/LabelPrinterMajor.svg +1 -1
  302. data/app/assets/icons/polaris/LandingPageMajor.svg +1 -1
  303. data/app/assets/icons/polaris/LanguageFilledMinor.svg +1 -0
  304. data/app/assets/icons/polaris/LanguageMinor.svg +1 -1
  305. data/app/assets/icons/polaris/LastClickModelMinor.svg +1 -1
  306. data/app/assets/icons/polaris/LastNonDirectClickModelMinor.svg +1 -1
  307. data/app/assets/icons/polaris/LegalFilledMajor.svg +1 -0
  308. data/app/assets/icons/polaris/LegalMajor.svg +1 -1
  309. data/app/assets/icons/polaris/LinearModelMinor.svg +1 -1
  310. data/app/assets/icons/polaris/LinkMinor.svg +1 -1
  311. data/app/assets/icons/polaris/ListFilledMajor.svg +1 -0
  312. data/app/assets/icons/polaris/ListMajor.svg +1 -1
  313. data/app/assets/icons/polaris/ListMinor.svg +1 -1
  314. data/app/assets/icons/polaris/LiveViewFilledMajor.svg +1 -0
  315. data/app/assets/icons/polaris/LiveViewMajor.svg +1 -1
  316. data/app/assets/icons/polaris/LocationFilledMajor.svg +1 -0
  317. data/app/assets/icons/polaris/LocationMajor.svg +1 -1
  318. data/app/assets/icons/polaris/LocationsMinor.svg +1 -1
  319. data/app/assets/icons/polaris/LockFilledMajor.svg +1 -0
  320. data/app/assets/icons/polaris/LockMajor.svg +1 -1
  321. data/app/assets/icons/polaris/LockMinor.svg +1 -1
  322. data/app/assets/icons/polaris/LogOutMinor.svg +1 -1
  323. data/app/assets/icons/polaris/LogoBlockMajor.svg +1 -1
  324. data/app/assets/icons/polaris/MagicMajor.svg +1 -1
  325. data/app/assets/icons/polaris/MagicMinor.svg +1 -1
  326. data/app/assets/icons/polaris/ManagedStoreMajor.svg +1 -1
  327. data/app/assets/icons/polaris/MarkFulfilledMinor.svg +1 -1
  328. data/app/assets/icons/polaris/MarkPaidMinor.svg +1 -1
  329. data/app/assets/icons/polaris/MarketingFilledMinor.svg +1 -0
  330. data/app/assets/icons/polaris/MarketingMajor.svg +1 -1
  331. data/app/assets/icons/polaris/MarketingMinor.svg +1 -1
  332. data/app/assets/icons/polaris/MarketsFilledMajor.svg +1 -0
  333. data/app/assets/icons/polaris/MarketsMajor.svg +1 -1
  334. data/app/assets/icons/polaris/MaximizeMajor.svg +1 -1
  335. data/app/assets/icons/polaris/MaximizeMinor.svg +1 -1
  336. data/app/assets/icons/polaris/MeasurementMinor.svg +1 -1
  337. data/app/assets/icons/polaris/MentionMajor.svg +1 -1
  338. data/app/assets/icons/polaris/MergeMinor.svg +1 -1
  339. data/app/assets/icons/polaris/MetafieldsFilledMinor.svg +1 -0
  340. data/app/assets/icons/polaris/MetafieldsMajor.svg +1 -1
  341. data/app/assets/icons/polaris/MetafieldsMinor.svg +1 -1
  342. data/app/assets/icons/polaris/MetaobjectMinor.svg +1 -1
  343. data/app/assets/icons/polaris/MetaobjectReferenceMinor.svg +1 -1
  344. data/app/assets/icons/polaris/MicrophoneMajor.svg +1 -1
  345. data/app/assets/icons/polaris/MinimizeMajor.svg +1 -1
  346. data/app/assets/icons/polaris/MinimizeMinor.svg +1 -1
  347. data/app/assets/icons/polaris/MinusMajor.svg +1 -1
  348. data/app/assets/icons/polaris/MinusMinor.svg +1 -1
  349. data/app/assets/icons/polaris/MobileAcceptMajor.svg +1 -1
  350. data/app/assets/icons/polaris/MobileBackArrowMajor.svg +1 -1
  351. data/app/assets/icons/polaris/MobileCancelMajor.svg +1 -1
  352. data/app/assets/icons/polaris/MobileChevronMajor.svg +1 -1
  353. data/app/assets/icons/polaris/MobileHamburgerMajor.svg +1 -1
  354. data/app/assets/icons/polaris/MobileHorizontalDotsMajor.svg +1 -1
  355. data/app/assets/icons/polaris/MobileMajor.svg +1 -1
  356. data/app/assets/icons/polaris/MobilePlusMajor.svg +1 -1
  357. data/app/assets/icons/polaris/MobileVerticalDotsMajor.svg +1 -1
  358. data/app/assets/icons/polaris/MonerisMajor.svg +1 -1
  359. data/app/assets/icons/polaris/MoneyFilledMinor.svg +1 -0
  360. data/app/assets/icons/polaris/MoneyMinor.svg +1 -1
  361. data/app/assets/icons/polaris/NatureMajor.svg +1 -1
  362. data/app/assets/icons/polaris/NavigationMajor.svg +1 -1
  363. data/app/assets/icons/polaris/NoteMajor.svg +1 -1
  364. data/app/assets/icons/polaris/NoteMinor.svg +1 -1
  365. data/app/assets/icons/polaris/NotificationFilledMajor.svg +1 -0
  366. data/app/assets/icons/polaris/NotificationMajor.svg +1 -1
  367. data/app/assets/icons/polaris/OnlineStoreMajor.svg +1 -1
  368. data/app/assets/icons/polaris/OnlineStoreMinor.svg +1 -1
  369. data/app/assets/icons/polaris/OrderStatusMinor.svg +1 -1
  370. data/app/assets/icons/polaris/OrderedListMajor.svg +1 -0
  371. data/app/assets/icons/polaris/OrderedListMinor.svg +1 -0
  372. data/app/assets/icons/polaris/OrdersFilledMinor.svg +1 -0
  373. data/app/assets/icons/polaris/OrdersMajor.svg +1 -1
  374. data/app/assets/icons/polaris/OrdersMinor.svg +1 -1
  375. data/app/assets/icons/polaris/OrganizationMajor.svg +1 -1
  376. data/app/assets/icons/polaris/OutdentMajor.svg +1 -0
  377. data/app/assets/icons/polaris/OutdentMinor.svg +1 -0
  378. data/app/assets/icons/polaris/OutgoingMajor.svg +1 -1
  379. data/app/assets/icons/polaris/PackageFilledMajor.svg +1 -0
  380. data/app/assets/icons/polaris/PackageMajor.svg +1 -1
  381. data/app/assets/icons/polaris/PageDownMajor.svg +1 -1
  382. data/app/assets/icons/polaris/PageMajor.svg +1 -1
  383. data/app/assets/icons/polaris/PageMinusMajor.svg +1 -1
  384. data/app/assets/icons/polaris/PagePlusMajor.svg +1 -1
  385. data/app/assets/icons/polaris/PageReferenceMinor.svg +1 -1
  386. data/app/assets/icons/polaris/PageUpMajor.svg +1 -1
  387. data/app/assets/icons/polaris/PaginationEndMinor.svg +1 -1
  388. data/app/assets/icons/polaris/PaginationStartMinor.svg +1 -1
  389. data/app/assets/icons/polaris/PaintBrushMajor.svg +1 -1
  390. data/app/assets/icons/polaris/PaperCheckMajor.svg +1 -1
  391. data/app/assets/icons/polaris/PaperCheckMinor.svg +1 -1
  392. data/app/assets/icons/polaris/PasskeyFilledMinor.svg +1 -0
  393. data/app/assets/icons/polaris/PasskeyMajor.svg +1 -1
  394. data/app/assets/icons/polaris/PasskeyMinor.svg +1 -1
  395. data/app/assets/icons/polaris/PauseCircleMajor.svg +1 -1
  396. data/app/assets/icons/polaris/PauseMajor.svg +1 -1
  397. data/app/assets/icons/polaris/PauseMinor.svg +1 -1
  398. data/app/assets/icons/polaris/PaymentsFilledMajor.svg +1 -0
  399. data/app/assets/icons/polaris/PaymentsMajor.svg +1 -1
  400. data/app/assets/icons/polaris/PersonalizedTextMajor.svg +1 -1
  401. data/app/assets/icons/polaris/PhoneInMajor.svg +1 -1
  402. data/app/assets/icons/polaris/PhoneMajor.svg +1 -1
  403. data/app/assets/icons/polaris/PhoneOutMajor.svg +1 -1
  404. data/app/assets/icons/polaris/PinMajor.svg +1 -1
  405. data/app/assets/icons/polaris/PinMinor.svg +1 -1
  406. data/app/assets/icons/polaris/PinUnfilledMajor.svg +1 -1
  407. data/app/assets/icons/polaris/PinUnfilledMinor.svg +1 -1
  408. data/app/assets/icons/polaris/PintrestMinor.svg +1 -0
  409. data/app/assets/icons/polaris/PlanFilledMinor.svg +1 -0
  410. data/app/assets/icons/polaris/PlanMajor.svg +1 -1
  411. data/app/assets/icons/polaris/PlanMinor.svg +1 -1
  412. data/app/assets/icons/polaris/PlayCircleMajor.svg +1 -1
  413. data/app/assets/icons/polaris/PlayMajor.svg +1 -1
  414. data/app/assets/icons/polaris/PlayMinor.svg +1 -1
  415. data/app/assets/icons/polaris/PlusMinor.svg +1 -1
  416. data/app/assets/icons/polaris/PointOfSaleMajor.svg +1 -1
  417. data/app/assets/icons/polaris/PopularMajor.svg +1 -1
  418. data/app/assets/icons/polaris/PositionBasedModelMinor.svg +1 -1
  419. data/app/assets/icons/polaris/PriceLookupMinor.svg +1 -1
  420. data/app/assets/icons/polaris/PrintMajor.svg +1 -1
  421. data/app/assets/icons/polaris/PrintMinor.svg +1 -1
  422. data/app/assets/icons/polaris/ProductCostMajor.svg +1 -1
  423. data/app/assets/icons/polaris/ProductReferenceMinor.svg +1 -1
  424. data/app/assets/icons/polaris/ProductReturnsMinor.svg +1 -1
  425. data/app/assets/icons/polaris/ProductsFilledMinor.svg +1 -0
  426. data/app/assets/icons/polaris/ProductsMajor.svg +1 -1
  427. data/app/assets/icons/polaris/ProductsMinor.svg +1 -1
  428. data/app/assets/icons/polaris/ProfileMajor.svg +1 -1
  429. data/app/assets/icons/polaris/ProfileMinor.svg +1 -1
  430. data/app/assets/icons/polaris/PromoteFilledMinor.svg +1 -0
  431. data/app/assets/icons/polaris/PromoteMinor.svg +1 -1
  432. data/app/assets/icons/polaris/QuestionMarkInverseMajor.svg +1 -1
  433. data/app/assets/icons/polaris/QuestionMarkInverseMinor.svg +1 -1
  434. data/app/assets/icons/polaris/QuestionMarkMajor.svg +1 -1
  435. data/app/assets/icons/polaris/QuestionMarkMinor.svg +1 -1
  436. data/app/assets/icons/polaris/QuickSaleMajor.svg +1 -1
  437. data/app/assets/icons/polaris/ReadTimeMinor.svg +1 -1
  438. data/app/assets/icons/polaris/ReceiptMajor.svg +1 -1
  439. data/app/assets/icons/polaris/RecentSearchesMajor.svg +1 -1
  440. data/app/assets/icons/polaris/RedoMajor.svg +1 -1
  441. data/app/assets/icons/polaris/ReferralCodeMajor.svg +1 -1
  442. data/app/assets/icons/polaris/ReferralMajor.svg +1 -1
  443. data/app/assets/icons/polaris/RefreshMajor.svg +1 -1
  444. data/app/assets/icons/polaris/RefreshMinor.svg +1 -1
  445. data/app/assets/icons/polaris/RefundMajor.svg +1 -1
  446. data/app/assets/icons/polaris/RefundMinor.svg +1 -1
  447. data/app/assets/icons/polaris/RemoveProductMajor.svg +1 -1
  448. data/app/assets/icons/polaris/RepeatOrderMajor.svg +1 -1
  449. data/app/assets/icons/polaris/ReplaceMajor.svg +1 -1
  450. data/app/assets/icons/polaris/ReplayMinor.svg +1 -1
  451. data/app/assets/icons/polaris/ReportFilledMinor.svg +1 -0
  452. data/app/assets/icons/polaris/ReportMinor.svg +1 -1
  453. data/app/assets/icons/polaris/ReportsMajor.svg +1 -1
  454. data/app/assets/icons/polaris/ResetMinor.svg +1 -1
  455. data/app/assets/icons/polaris/ResourcesMajor.svg +1 -1
  456. data/app/assets/icons/polaris/ReturnMinor.svg +1 -1
  457. data/app/assets/icons/polaris/ReturnsMajor.svg +1 -1
  458. data/app/assets/icons/polaris/RichTextMinor.svg +1 -1
  459. data/app/assets/icons/polaris/RiskMajor.svg +1 -1
  460. data/app/assets/icons/polaris/RiskMinor.svg +1 -1
  461. data/app/assets/icons/polaris/Rows2Major.svg +1 -1
  462. data/app/assets/icons/polaris/SandboxMajor.svg +1 -1
  463. data/app/assets/icons/polaris/SaveMinor.svg +1 -1
  464. data/app/assets/icons/polaris/SearchMajor.svg +1 -1
  465. data/app/assets/icons/polaris/SearchMinor.svg +1 -1
  466. data/app/assets/icons/polaris/SectionMajor.svg +1 -1
  467. data/app/assets/icons/polaris/SecureMajor.svg +1 -1
  468. data/app/assets/icons/polaris/SelectMinor.svg +1 -1
  469. data/app/assets/icons/polaris/SendMajor.svg +1 -1
  470. data/app/assets/icons/polaris/SettingsFilledMinor.svg +1 -0
  471. data/app/assets/icons/polaris/SettingsMajor.svg +1 -1
  472. data/app/assets/icons/polaris/SettingsMinor.svg +1 -1
  473. data/app/assets/icons/polaris/ShareIosMinor.svg +1 -1
  474. data/app/assets/icons/polaris/ShareMinor.svg +1 -1
  475. data/app/assets/icons/polaris/ShipmentFilledMajor.svg +1 -0
  476. data/app/assets/icons/polaris/ShipmentMajor.svg +1 -1
  477. data/app/assets/icons/polaris/ShopcodesMajor.svg +1 -1
  478. data/app/assets/icons/polaris/SidebarLeftMajor.svg +1 -1
  479. data/app/assets/icons/polaris/SidebarRightMajor.svg +1 -1
  480. data/app/assets/icons/polaris/SidekickMajor.svg +1 -0
  481. data/app/assets/icons/polaris/SimplifyMajor.svg +1 -1
  482. data/app/assets/icons/polaris/SimplifyMinor.svg +1 -1
  483. data/app/assets/icons/polaris/SlideshowMajor.svg +1 -1
  484. data/app/assets/icons/polaris/SmileyHappyMajor.svg +1 -1
  485. data/app/assets/icons/polaris/SmileyJoyMajor.svg +1 -1
  486. data/app/assets/icons/polaris/SmileyNeutralMajor.svg +1 -1
  487. data/app/assets/icons/polaris/SmileySadMajor.svg +1 -1
  488. data/app/assets/icons/polaris/SnapchatMinor.svg +1 -0
  489. data/app/assets/icons/polaris/SocialAdMajor.svg +1 -1
  490. data/app/assets/icons/polaris/SocialPostMajor.svg +1 -1
  491. data/app/assets/icons/polaris/SoftPackMajor.svg +1 -1
  492. data/app/assets/icons/polaris/SortAscendingMajor.svg +1 -1
  493. data/app/assets/icons/polaris/SortDescendingMajor.svg +1 -1
  494. data/app/assets/icons/polaris/SortMinor.svg +1 -1
  495. data/app/assets/icons/polaris/SoundMajor.svg +1 -1
  496. data/app/assets/icons/polaris/StarFilledMinor.svg +1 -1
  497. data/app/assets/icons/polaris/StarOutlineMinor.svg +1 -1
  498. data/app/assets/icons/polaris/StatusActiveMajor.svg +1 -1
  499. data/app/assets/icons/polaris/StopMajor.svg +1 -0
  500. data/app/assets/icons/polaris/StoreDetailsFilledMinor.svg +1 -0
  501. data/app/assets/icons/polaris/StoreDetailsMinor.svg +1 -0
  502. data/app/assets/icons/polaris/StoreFilledMinor.svg +1 -0
  503. data/app/assets/icons/polaris/StoreMajor.svg +1 -1
  504. data/app/assets/icons/polaris/StoreMinor.svg +1 -1
  505. data/app/assets/icons/polaris/StoreStatusMajor.svg +1 -1
  506. data/app/assets/icons/polaris/TabletMajor.svg +1 -1
  507. data/app/assets/icons/polaris/TapChipMajor.svg +1 -1
  508. data/app/assets/icons/polaris/TaxFilledMajor.svg +1 -0
  509. data/app/assets/icons/polaris/TaxMajor.svg +1 -1
  510. data/app/assets/icons/polaris/TeamMajor.svg +1 -1
  511. data/app/assets/icons/polaris/TemplateMajor.svg +1 -1
  512. data/app/assets/icons/polaris/TemplateMinor.svg +1 -1
  513. data/app/assets/icons/polaris/TextAlignmentCenterMajor.svg +1 -1
  514. data/app/assets/icons/polaris/TextAlignmentLeftMajor.svg +1 -1
  515. data/app/assets/icons/polaris/TextAlignmentRightMajor.svg +1 -1
  516. data/app/assets/icons/polaris/TextBlockMajor.svg +1 -1
  517. data/app/assets/icons/polaris/TextColorMajor.svg +1 -0
  518. data/app/assets/icons/polaris/TextColorMinor.svg +1 -0
  519. data/app/assets/icons/polaris/TextMajor.svg +1 -1
  520. data/app/assets/icons/polaris/ThemeEditMajor.svg +1 -1
  521. data/app/assets/icons/polaris/ThemeStoreMajor.svg +1 -1
  522. data/app/assets/icons/polaris/ThemesMajor.svg +1 -1
  523. data/app/assets/icons/polaris/ThumbsDownMajor.svg +1 -1
  524. data/app/assets/icons/polaris/ThumbsDownMinor.svg +1 -1
  525. data/app/assets/icons/polaris/ThumbsUpMajor.svg +1 -1
  526. data/app/assets/icons/polaris/ThumbsUpMinor.svg +1 -1
  527. data/app/assets/icons/polaris/TickMinor.svg +1 -1
  528. data/app/assets/icons/polaris/TickSmallMinor.svg +1 -1
  529. data/app/assets/icons/polaris/TiktokMinor.svg +1 -0
  530. data/app/assets/icons/polaris/TimeDecayModelMinor.svg +1 -1
  531. data/app/assets/icons/polaris/TimelineAttachmentMajor.svg +1 -1
  532. data/app/assets/icons/polaris/TipsMajor.svg +1 -1
  533. data/app/assets/icons/polaris/TitleMinor.svg +1 -1
  534. data/app/assets/icons/polaris/ToggleMinor.svg +1 -1
  535. data/app/assets/icons/polaris/ToolsMajor.svg +1 -1
  536. data/app/assets/icons/polaris/TransactionFeeDollarMajor.svg +1 -1
  537. data/app/assets/icons/polaris/TransactionFeeEuroMajor.svg +1 -1
  538. data/app/assets/icons/polaris/TransactionFeePoundMajor.svg +1 -1
  539. data/app/assets/icons/polaris/TransactionFeeRupeeMajor.svg +1 -1
  540. data/app/assets/icons/polaris/TransactionFeeYenMajor.svg +1 -1
  541. data/app/assets/icons/polaris/TransactionMajor.svg +1 -1
  542. data/app/assets/icons/polaris/TransferFilledMajor.svg +1 -0
  543. data/app/assets/icons/polaris/TransferInMajor.svg +1 -1
  544. data/app/assets/icons/polaris/TransferMajor.svg +1 -1
  545. data/app/assets/icons/polaris/TransferOutMajor.svg +1 -1
  546. data/app/assets/icons/polaris/TransferWithinShopifyMajor.svg +1 -1
  547. data/app/assets/icons/polaris/TranslateMajor.svg +1 -0
  548. data/app/assets/icons/polaris/TransportMajor.svg +1 -1
  549. data/app/assets/icons/polaris/TroubleshootMajor.svg +1 -1
  550. data/app/assets/icons/polaris/TumblrMinor.svg +1 -0
  551. data/app/assets/icons/polaris/TwitchMinor.svg +1 -0
  552. data/app/assets/icons/polaris/TwitterMinor.svg +1 -0
  553. data/app/assets/icons/polaris/TypeMajor.svg +1 -1
  554. data/app/assets/icons/polaris/TypeMinor.svg +1 -1
  555. data/app/assets/icons/polaris/UnderlineMajor.svg +1 -0
  556. data/app/assets/icons/polaris/UnderlineMinor.svg +1 -0
  557. data/app/assets/icons/polaris/UndoMajor.svg +1 -1
  558. data/app/assets/icons/polaris/UnfulfilledMajor.svg +1 -1
  559. data/app/assets/icons/polaris/UnknownDeviceMajor.svg +1 -1
  560. data/app/assets/icons/polaris/UpdateInventoryMajor.svg +1 -1
  561. data/app/assets/icons/polaris/UploadMajor.svg +1 -1
  562. data/app/assets/icons/polaris/VariantMajor.svg +1 -1
  563. data/app/assets/icons/polaris/ViewMajor.svg +1 -1
  564. data/app/assets/icons/polaris/ViewMinor.svg +1 -1
  565. data/app/assets/icons/polaris/ViewportNarrowMajor.svg +1 -1
  566. data/app/assets/icons/polaris/ViewportShortMajor.svg +1 -1
  567. data/app/assets/icons/polaris/ViewportTallMajor.svg +1 -1
  568. data/app/assets/icons/polaris/ViewportWideMajor.svg +1 -1
  569. data/app/assets/icons/polaris/VimeoMinor.svg +1 -0
  570. data/app/assets/icons/polaris/VocabularyMajor.svg +1 -1
  571. data/app/assets/icons/polaris/VolumeMinor.svg +1 -1
  572. data/app/assets/icons/polaris/WandMajor.svg +1 -1
  573. data/app/assets/icons/polaris/WandMinor.svg +1 -1
  574. data/app/assets/icons/polaris/WearableMajor.svg +1 -1
  575. data/app/assets/icons/polaris/WeightMinor.svg +1 -1
  576. data/app/assets/icons/polaris/WholesaleMajor.svg +1 -1
  577. data/app/assets/icons/polaris/WifiMajor.svg +1 -1
  578. data/app/assets/icons/polaris/YoutubeMinor.svg +1 -0
  579. data/app/assets/javascripts/polaris_view_components/button_controller.js +9 -0
  580. data/app/assets/javascripts/polaris_view_components/polaris_controller.js +4 -0
  581. data/app/assets/javascripts/polaris_view_components/popover_controller.js +50 -29
  582. data/app/assets/javascripts/polaris_view_components/text_field_controller.js +12 -0
  583. data/app/assets/javascripts/polaris_view_components/tooltip_controller.js +47 -34
  584. data/app/assets/javascripts/polaris_view_components.js +1102 -1284
  585. data/app/assets/stylesheets/polaris_view_components/custom.pcss +39 -57
  586. data/app/assets/stylesheets/polaris_view_components/shopify_navigation.pcss +8 -8
  587. data/app/assets/stylesheets/polaris_view_components/tooltip_component.pcss +31 -0
  588. data/app/assets/stylesheets/polaris_view_components.css +1543 -719
  589. data/app/assets/stylesheets/polaris_view_components.pcss +1 -0
  590. data/app/components/polaris/autocomplete_component.rb +1 -0
  591. data/app/components/polaris/avatar_component.html.erb +1 -1
  592. data/app/components/polaris/base_checkbox.rb +3 -1
  593. data/app/components/polaris/checkbox_component.rb +3 -0
  594. data/app/components/polaris/choice_list_component.rb +1 -0
  595. data/app/components/polaris/filters_component.html.erb +7 -7
  596. data/app/components/polaris/filters_component.rb +5 -5
  597. data/app/components/polaris/frame/top_bar_component.html.erb +46 -22
  598. data/app/components/polaris/frame/top_bar_component.rb +0 -1
  599. data/app/components/polaris/popover_component.html.erb +2 -8
  600. data/app/components/polaris/popover_component.rb +6 -3
  601. data/app/components/polaris/select_component.html.erb +2 -2
  602. data/app/components/polaris/select_component.rb +58 -4
  603. data/app/components/polaris/text_field_component.rb +11 -2
  604. data/app/components/polaris/tooltip_component.html.erb +1 -1
  605. data/app/components/polaris/tooltip_component.rb +6 -1
  606. data/app/helpers/polaris/form_builder.rb +25 -0
  607. data/lib/polaris/view_components/version.rb +1 -1
  608. metadata +89 -3
@@ -159,7 +159,7 @@ function isEmpty(str) {
159
159
  return str.length === 0 || !str.trim();
160
160
  }
161
161
 
162
- function debounce$1(fn, wait) {
162
+ function debounce(fn, wait) {
163
163
  let timeoutId;
164
164
  return (...args) => {
165
165
  clearTimeout(timeoutId);
@@ -210,7 +210,7 @@ class Autocomplete extends Controller {
210
210
  if (this.hasHiddenInputTarget) this.hiddenInputTarget.value = input.value;
211
211
  }
212
212
  }
213
- onInputChange=debounce$1((() => {
213
+ onInputChange=debounce((() => {
214
214
  if (this.isRemote) {
215
215
  this.fetchResults();
216
216
  } else {
@@ -307,6 +307,14 @@ class Button extends Controller {
307
307
  this.buttonContent.insertAdjacentHTML("afterbegin", this.spinnerHTML);
308
308
  }
309
309
  }
310
+ disableWithoutLoader(event) {
311
+ if (this.button.disabled) {
312
+ event.preventDefault();
313
+ } else {
314
+ this.button.disabled = true;
315
+ this.button.classList.add("Polaris-Button--disabled");
316
+ }
317
+ }
310
318
  enable() {
311
319
  if (this.button.disabled) {
312
320
  this.button.disabled = false;
@@ -431,7 +439,7 @@ class Dropzone extends Controller {
431
439
  event.preventDefault();
432
440
  this.onClick();
433
441
  };
434
- onWindowResize=debounce$1((() => {
442
+ onWindowResize=debounce((() => {
435
443
  const size = this.calculateSize();
436
444
  if (size !== this.size) {
437
445
  this.size = size;
@@ -873,6 +881,9 @@ class Polaris extends Controller {
873
881
  disableButton() {
874
882
  this.findElement("button").disable();
875
883
  }
884
+ disableButtonWithoutLoader() {
885
+ this.findElement("button").disableWithoutLoader();
886
+ }
876
887
  enableButton() {
877
888
  this.findElement("button").enable();
878
889
  }
@@ -890,624 +901,873 @@ class Polaris extends Controller {
890
901
  }
891
902
  }
892
903
 
893
- var top = "top";
894
-
895
- var bottom = "bottom";
896
-
897
- var right = "right";
898
-
899
- var left = "left";
900
-
901
- var auto = "auto";
902
-
903
- var basePlacements = [ top, bottom, right, left ];
904
-
905
- var start = "start";
906
-
907
- var end = "end";
908
-
909
- var clippingParents = "clippingParents";
910
-
911
- var viewport = "viewport";
904
+ const min = Math.min;
912
905
 
913
- var popper = "popper";
906
+ const max = Math.max;
914
907
 
915
- var reference = "reference";
908
+ const round = Math.round;
916
909
 
917
- var variationPlacements = basePlacements.reduce((function(acc, placement) {
918
- return acc.concat([ placement + "-" + start, placement + "-" + end ]);
919
- }), []);
910
+ const floor = Math.floor;
920
911
 
921
- var placements = [].concat(basePlacements, [ auto ]).reduce((function(acc, placement) {
922
- return acc.concat([ placement, placement + "-" + start, placement + "-" + end ]);
923
- }), []);
924
-
925
- var beforeRead = "beforeRead";
912
+ const createCoords = v => ({
913
+ x: v,
914
+ y: v
915
+ });
926
916
 
927
- var read = "read";
917
+ const oppositeSideMap = {
918
+ left: "right",
919
+ right: "left",
920
+ bottom: "top",
921
+ top: "bottom"
922
+ };
928
923
 
929
- var afterRead = "afterRead";
924
+ const oppositeAlignmentMap = {
925
+ start: "end",
926
+ end: "start"
927
+ };
930
928
 
931
- var beforeMain = "beforeMain";
929
+ function clamp(start, value, end) {
930
+ return max(start, min(value, end));
931
+ }
932
932
 
933
- var main = "main";
933
+ function evaluate(value, param) {
934
+ return typeof value === "function" ? value(param) : value;
935
+ }
934
936
 
935
- var afterMain = "afterMain";
937
+ function getSide(placement) {
938
+ return placement.split("-")[0];
939
+ }
936
940
 
937
- var beforeWrite = "beforeWrite";
941
+ function getAlignment(placement) {
942
+ return placement.split("-")[1];
943
+ }
938
944
 
939
- var write = "write";
945
+ function getOppositeAxis(axis) {
946
+ return axis === "x" ? "y" : "x";
947
+ }
940
948
 
941
- var afterWrite = "afterWrite";
949
+ function getAxisLength(axis) {
950
+ return axis === "y" ? "height" : "width";
951
+ }
942
952
 
943
- var modifierPhases = [ beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite ];
953
+ function getSideAxis(placement) {
954
+ return [ "top", "bottom" ].includes(getSide(placement)) ? "y" : "x";
955
+ }
944
956
 
945
- function getNodeName(element) {
946
- return element ? (element.nodeName || "").toLowerCase() : null;
957
+ function getAlignmentAxis(placement) {
958
+ return getOppositeAxis(getSideAxis(placement));
947
959
  }
948
960
 
949
- function getWindow(node) {
950
- if (node == null) {
951
- return window;
961
+ function getAlignmentSides(placement, rects, rtl) {
962
+ if (rtl === void 0) {
963
+ rtl = false;
952
964
  }
953
- if (node.toString() !== "[object Window]") {
954
- var ownerDocument = node.ownerDocument;
955
- return ownerDocument ? ownerDocument.defaultView || window : window;
965
+ const alignment = getAlignment(placement);
966
+ const alignmentAxis = getAlignmentAxis(placement);
967
+ const length = getAxisLength(alignmentAxis);
968
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
969
+ if (rects.reference[length] > rects.floating[length]) {
970
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
956
971
  }
957
- return node;
972
+ return [ mainAlignmentSide, getOppositePlacement(mainAlignmentSide) ];
958
973
  }
959
974
 
960
- function isElement(node) {
961
- var OwnElement = getWindow(node).Element;
962
- return node instanceof OwnElement || node instanceof Element;
975
+ function getExpandedPlacements(placement) {
976
+ const oppositePlacement = getOppositePlacement(placement);
977
+ return [ getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement) ];
963
978
  }
964
979
 
965
- function isHTMLElement(node) {
966
- var OwnElement = getWindow(node).HTMLElement;
967
- return node instanceof OwnElement || node instanceof HTMLElement;
980
+ function getOppositeAlignmentPlacement(placement) {
981
+ return placement.replace(/start|end/g, (alignment => oppositeAlignmentMap[alignment]));
968
982
  }
969
983
 
970
- function isShadowRoot(node) {
971
- if (typeof ShadowRoot === "undefined") {
972
- return false;
984
+ function getSideList(side, isStart, rtl) {
985
+ const lr = [ "left", "right" ];
986
+ const rl = [ "right", "left" ];
987
+ const tb = [ "top", "bottom" ];
988
+ const bt = [ "bottom", "top" ];
989
+ switch (side) {
990
+ case "top":
991
+ case "bottom":
992
+ if (rtl) return isStart ? rl : lr;
993
+ return isStart ? lr : rl;
994
+
995
+ case "left":
996
+ case "right":
997
+ return isStart ? tb : bt;
998
+
999
+ default:
1000
+ return [];
973
1001
  }
974
- var OwnElement = getWindow(node).ShadowRoot;
975
- return node instanceof OwnElement || node instanceof ShadowRoot;
976
1002
  }
977
1003
 
978
- function applyStyles(_ref) {
979
- var state = _ref.state;
980
- Object.keys(state.elements).forEach((function(name) {
981
- var style = state.styles[name] || {};
982
- var attributes = state.attributes[name] || {};
983
- var element = state.elements[name];
984
- if (!isHTMLElement(element) || !getNodeName(element)) {
985
- return;
1004
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
1005
+ const alignment = getAlignment(placement);
1006
+ let list = getSideList(getSide(placement), direction === "start", rtl);
1007
+ if (alignment) {
1008
+ list = list.map((side => side + "-" + alignment));
1009
+ if (flipAlignment) {
1010
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
986
1011
  }
987
- Object.assign(element.style, style);
988
- Object.keys(attributes).forEach((function(name) {
989
- var value = attributes[name];
990
- if (value === false) {
991
- element.removeAttribute(name);
992
- } else {
993
- element.setAttribute(name, value === true ? "" : value);
994
- }
995
- }));
996
- }));
1012
+ }
1013
+ return list;
997
1014
  }
998
1015
 
999
- function effect$2(_ref2) {
1000
- var state = _ref2.state;
1001
- var initialStyles = {
1002
- popper: {
1003
- position: state.options.strategy,
1004
- left: "0",
1005
- top: "0",
1006
- margin: "0"
1007
- },
1008
- arrow: {
1009
- position: "absolute"
1010
- },
1011
- reference: {}
1012
- };
1013
- Object.assign(state.elements.popper.style, initialStyles.popper);
1014
- state.styles = initialStyles;
1015
- if (state.elements.arrow) {
1016
- Object.assign(state.elements.arrow.style, initialStyles.arrow);
1017
- }
1018
- return function() {
1019
- Object.keys(state.elements).forEach((function(name) {
1020
- var element = state.elements[name];
1021
- var attributes = state.attributes[name] || {};
1022
- var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
1023
- var style = styleProperties.reduce((function(style, property) {
1024
- style[property] = "";
1025
- return style;
1026
- }), {});
1027
- if (!isHTMLElement(element) || !getNodeName(element)) {
1028
- return;
1029
- }
1030
- Object.assign(element.style, style);
1031
- Object.keys(attributes).forEach((function(attribute) {
1032
- element.removeAttribute(attribute);
1033
- }));
1034
- }));
1016
+ function getOppositePlacement(placement) {
1017
+ return placement.replace(/left|right|bottom|top/g, (side => oppositeSideMap[side]));
1018
+ }
1019
+
1020
+ function expandPaddingObject(padding) {
1021
+ return {
1022
+ top: 0,
1023
+ right: 0,
1024
+ bottom: 0,
1025
+ left: 0,
1026
+ ...padding
1035
1027
  };
1036
1028
  }
1037
1029
 
1038
- var applyStyles$1 = {
1039
- name: "applyStyles",
1040
- enabled: true,
1041
- phase: "write",
1042
- fn: applyStyles,
1043
- effect: effect$2,
1044
- requires: [ "computeStyles" ]
1045
- };
1030
+ function getPaddingObject(padding) {
1031
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
1032
+ top: padding,
1033
+ right: padding,
1034
+ bottom: padding,
1035
+ left: padding
1036
+ };
1037
+ }
1046
1038
 
1047
- function getBasePlacement(placement) {
1048
- return placement.split("-")[0];
1039
+ function rectToClientRect(rect) {
1040
+ return {
1041
+ ...rect,
1042
+ top: rect.y,
1043
+ left: rect.x,
1044
+ right: rect.x + rect.width,
1045
+ bottom: rect.y + rect.height
1046
+ };
1049
1047
  }
1050
1048
 
1051
- var max = Math.max;
1049
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
1050
+ let {reference: reference, floating: floating} = _ref;
1051
+ const sideAxis = getSideAxis(placement);
1052
+ const alignmentAxis = getAlignmentAxis(placement);
1053
+ const alignLength = getAxisLength(alignmentAxis);
1054
+ const side = getSide(placement);
1055
+ const isVertical = sideAxis === "y";
1056
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
1057
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
1058
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
1059
+ let coords;
1060
+ switch (side) {
1061
+ case "top":
1062
+ coords = {
1063
+ x: commonX,
1064
+ y: reference.y - floating.height
1065
+ };
1066
+ break;
1067
+
1068
+ case "bottom":
1069
+ coords = {
1070
+ x: commonX,
1071
+ y: reference.y + reference.height
1072
+ };
1073
+ break;
1052
1074
 
1053
- var min = Math.min;
1075
+ case "right":
1076
+ coords = {
1077
+ x: reference.x + reference.width,
1078
+ y: commonY
1079
+ };
1080
+ break;
1054
1081
 
1055
- var round = Math.round;
1082
+ case "left":
1083
+ coords = {
1084
+ x: reference.x - floating.width,
1085
+ y: commonY
1086
+ };
1087
+ break;
1056
1088
 
1057
- function getUAString() {
1058
- var uaData = navigator.userAgentData;
1059
- if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
1060
- return uaData.brands.map((function(item) {
1061
- return item.brand + "/" + item.version;
1062
- })).join(" ");
1089
+ default:
1090
+ coords = {
1091
+ x: reference.x,
1092
+ y: reference.y
1093
+ };
1063
1094
  }
1064
- return navigator.userAgent;
1065
- }
1095
+ switch (getAlignment(placement)) {
1096
+ case "start":
1097
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
1098
+ break;
1066
1099
 
1067
- function isLayoutViewport() {
1068
- return !/^((?!chrome|android).)*safari/i.test(getUAString());
1100
+ case "end":
1101
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
1102
+ break;
1103
+ }
1104
+ return coords;
1069
1105
  }
1070
1106
 
1071
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
1072
- if (includeScale === void 0) {
1073
- includeScale = false;
1074
- }
1075
- if (isFixedStrategy === void 0) {
1076
- isFixedStrategy = false;
1107
+ const computePosition$1 = async (reference, floating, config) => {
1108
+ const {placement: placement = "bottom", strategy: strategy = "absolute", middleware: middleware = [], platform: platform} = config;
1109
+ const validMiddleware = middleware.filter(Boolean);
1110
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
1111
+ let rects = await platform.getElementRects({
1112
+ reference: reference,
1113
+ floating: floating,
1114
+ strategy: strategy
1115
+ });
1116
+ let {x: x, y: y} = computeCoordsFromPlacement(rects, placement, rtl);
1117
+ let statefulPlacement = placement;
1118
+ let middlewareData = {};
1119
+ let resetCount = 0;
1120
+ for (let i = 0; i < validMiddleware.length; i++) {
1121
+ const {name: name, fn: fn} = validMiddleware[i];
1122
+ const {x: nextX, y: nextY, data: data, reset: reset} = await fn({
1123
+ x: x,
1124
+ y: y,
1125
+ initialPlacement: placement,
1126
+ placement: statefulPlacement,
1127
+ strategy: strategy,
1128
+ middlewareData: middlewareData,
1129
+ rects: rects,
1130
+ platform: platform,
1131
+ elements: {
1132
+ reference: reference,
1133
+ floating: floating
1134
+ }
1135
+ });
1136
+ x = nextX != null ? nextX : x;
1137
+ y = nextY != null ? nextY : y;
1138
+ middlewareData = {
1139
+ ...middlewareData,
1140
+ [name]: {
1141
+ ...middlewareData[name],
1142
+ ...data
1143
+ }
1144
+ };
1145
+ if (reset && resetCount <= 50) {
1146
+ resetCount++;
1147
+ if (typeof reset === "object") {
1148
+ if (reset.placement) {
1149
+ statefulPlacement = reset.placement;
1150
+ }
1151
+ if (reset.rects) {
1152
+ rects = reset.rects === true ? await platform.getElementRects({
1153
+ reference: reference,
1154
+ floating: floating,
1155
+ strategy: strategy
1156
+ }) : reset.rects;
1157
+ }
1158
+ ({x: x, y: y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
1159
+ }
1160
+ i = -1;
1161
+ continue;
1162
+ }
1077
1163
  }
1078
- var clientRect = element.getBoundingClientRect();
1079
- var scaleX = 1;
1080
- var scaleY = 1;
1081
- if (includeScale && isHTMLElement(element)) {
1082
- scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
1083
- scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
1084
- }
1085
- var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
1086
- var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
1087
- var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
1088
- var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
1089
- var width = clientRect.width / scaleX;
1090
- var height = clientRect.height / scaleY;
1091
1164
  return {
1092
- width: width,
1093
- height: height,
1094
- top: y,
1095
- right: x + width,
1096
- bottom: y + height,
1097
- left: x,
1165
+ x: x,
1166
+ y: y,
1167
+ placement: statefulPlacement,
1168
+ strategy: strategy,
1169
+ middlewareData: middlewareData
1170
+ };
1171
+ };
1172
+
1173
+ async function detectOverflow(state, options) {
1174
+ var _await$platform$isEle;
1175
+ if (options === void 0) {
1176
+ options = {};
1177
+ }
1178
+ const {x: x, y: y, platform: platform, rects: rects, elements: elements, strategy: strategy} = state;
1179
+ const {boundary: boundary = "clippingAncestors", rootBoundary: rootBoundary = "viewport", elementContext: elementContext = "floating", altBoundary: altBoundary = false, padding: padding = 0} = evaluate(options, state);
1180
+ const paddingObject = getPaddingObject(padding);
1181
+ const altContext = elementContext === "floating" ? "reference" : "floating";
1182
+ const element = elements[altBoundary ? altContext : elementContext];
1183
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
1184
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
1185
+ boundary: boundary,
1186
+ rootBoundary: rootBoundary,
1187
+ strategy: strategy
1188
+ }));
1189
+ const rect = elementContext === "floating" ? {
1190
+ ...rects.floating,
1098
1191
  x: x,
1099
1192
  y: y
1193
+ } : rects.reference;
1194
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
1195
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
1196
+ x: 1,
1197
+ y: 1
1198
+ } : {
1199
+ x: 1,
1200
+ y: 1
1201
+ };
1202
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
1203
+ rect: rect,
1204
+ offsetParent: offsetParent,
1205
+ strategy: strategy
1206
+ }) : rect);
1207
+ return {
1208
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
1209
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
1210
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
1211
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
1100
1212
  };
1101
1213
  }
1102
1214
 
1103
- function getLayoutRect(element) {
1104
- var clientRect = getBoundingClientRect(element);
1105
- var width = element.offsetWidth;
1106
- var height = element.offsetHeight;
1107
- if (Math.abs(clientRect.width - width) <= 1) {
1108
- width = clientRect.width;
1215
+ const arrow = options => ({
1216
+ name: "arrow",
1217
+ options: options,
1218
+ async fn(state) {
1219
+ const {x: x, y: y, placement: placement, rects: rects, platform: platform, elements: elements, middlewareData: middlewareData} = state;
1220
+ const {element: element, padding: padding = 0} = evaluate(options, state) || {};
1221
+ if (element == null) {
1222
+ return {};
1223
+ }
1224
+ const paddingObject = getPaddingObject(padding);
1225
+ const coords = {
1226
+ x: x,
1227
+ y: y
1228
+ };
1229
+ const axis = getAlignmentAxis(placement);
1230
+ const length = getAxisLength(axis);
1231
+ const arrowDimensions = await platform.getDimensions(element);
1232
+ const isYAxis = axis === "y";
1233
+ const minProp = isYAxis ? "top" : "left";
1234
+ const maxProp = isYAxis ? "bottom" : "right";
1235
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
1236
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
1237
+ const startDiff = coords[axis] - rects.reference[axis];
1238
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
1239
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
1240
+ if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) {
1241
+ clientSize = elements.floating[clientProp] || rects.floating[length];
1242
+ }
1243
+ const centerToReference = endDiff / 2 - startDiff / 2;
1244
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
1245
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
1246
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
1247
+ const min$1 = minPadding;
1248
+ const max = clientSize - arrowDimensions[length] - maxPadding;
1249
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
1250
+ const offset = clamp(min$1, center, max);
1251
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
1252
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
1253
+ return {
1254
+ [axis]: coords[axis] + alignmentOffset,
1255
+ data: {
1256
+ [axis]: offset,
1257
+ centerOffset: center - offset - alignmentOffset,
1258
+ ...shouldAddOffset && {
1259
+ alignmentOffset: alignmentOffset
1260
+ }
1261
+ },
1262
+ reset: shouldAddOffset
1263
+ };
1109
1264
  }
1110
- if (Math.abs(clientRect.height - height) <= 1) {
1111
- height = clientRect.height;
1265
+ });
1266
+
1267
+ const flip = function(options) {
1268
+ if (options === void 0) {
1269
+ options = {};
1112
1270
  }
1113
1271
  return {
1114
- x: element.offsetLeft,
1115
- y: element.offsetTop,
1116
- width: width,
1117
- height: height
1272
+ name: "flip",
1273
+ options: options,
1274
+ async fn(state) {
1275
+ var _middlewareData$arrow, _middlewareData$flip;
1276
+ const {placement: placement, middlewareData: middlewareData, rects: rects, initialPlacement: initialPlacement, platform: platform, elements: elements} = state;
1277
+ const {mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy: fallbackStrategy = "bestFit", fallbackAxisSideDirection: fallbackAxisSideDirection = "none", flipAlignment: flipAlignment = true, ...detectOverflowOptions} = evaluate(options, state);
1278
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1279
+ return {};
1280
+ }
1281
+ const side = getSide(placement);
1282
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
1283
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1284
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [ getOppositePlacement(initialPlacement) ] : getExpandedPlacements(initialPlacement));
1285
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
1286
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1287
+ }
1288
+ const placements = [ initialPlacement, ...fallbackPlacements ];
1289
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1290
+ const overflows = [];
1291
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1292
+ if (checkMainAxis) {
1293
+ overflows.push(overflow[side]);
1294
+ }
1295
+ if (checkCrossAxis) {
1296
+ const sides = getAlignmentSides(placement, rects, rtl);
1297
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1298
+ }
1299
+ overflowsData = [ ...overflowsData, {
1300
+ placement: placement,
1301
+ overflows: overflows
1302
+ } ];
1303
+ if (!overflows.every((side => side <= 0))) {
1304
+ var _middlewareData$flip2, _overflowsData$filter;
1305
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1306
+ const nextPlacement = placements[nextIndex];
1307
+ if (nextPlacement) {
1308
+ return {
1309
+ data: {
1310
+ index: nextIndex,
1311
+ overflows: overflowsData
1312
+ },
1313
+ reset: {
1314
+ placement: nextPlacement
1315
+ }
1316
+ };
1317
+ }
1318
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d => d.overflows[0] <= 0)).sort(((a, b) => a.overflows[1] - b.overflows[1]))[0]) == null ? void 0 : _overflowsData$filter.placement;
1319
+ if (!resetPlacement) {
1320
+ switch (fallbackStrategy) {
1321
+ case "bestFit":
1322
+ {
1323
+ var _overflowsData$map$so;
1324
+ const placement = (_overflowsData$map$so = overflowsData.map((d => [ d.placement, d.overflows.filter((overflow => overflow > 0)).reduce(((acc, overflow) => acc + overflow), 0) ])).sort(((a, b) => a[1] - b[1]))[0]) == null ? void 0 : _overflowsData$map$so[0];
1325
+ if (placement) {
1326
+ resetPlacement = placement;
1327
+ }
1328
+ break;
1329
+ }
1330
+
1331
+ case "initialPlacement":
1332
+ resetPlacement = initialPlacement;
1333
+ break;
1334
+ }
1335
+ }
1336
+ if (placement !== resetPlacement) {
1337
+ return {
1338
+ reset: {
1339
+ placement: resetPlacement
1340
+ }
1341
+ };
1342
+ }
1343
+ }
1344
+ return {};
1345
+ }
1346
+ };
1347
+ };
1348
+
1349
+ async function convertValueToCoords(state, options) {
1350
+ const {placement: placement, platform: platform, elements: elements} = state;
1351
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1352
+ const side = getSide(placement);
1353
+ const alignment = getAlignment(placement);
1354
+ const isVertical = getSideAxis(placement) === "y";
1355
+ const mainAxisMulti = [ "left", "top" ].includes(side) ? -1 : 1;
1356
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1357
+ const rawValue = evaluate(options, state);
1358
+ let {mainAxis: mainAxis, crossAxis: crossAxis, alignmentAxis: alignmentAxis} = typeof rawValue === "number" ? {
1359
+ mainAxis: rawValue,
1360
+ crossAxis: 0,
1361
+ alignmentAxis: null
1362
+ } : {
1363
+ mainAxis: 0,
1364
+ crossAxis: 0,
1365
+ alignmentAxis: null,
1366
+ ...rawValue
1367
+ };
1368
+ if (alignment && typeof alignmentAxis === "number") {
1369
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
1370
+ }
1371
+ return isVertical ? {
1372
+ x: crossAxis * crossAxisMulti,
1373
+ y: mainAxis * mainAxisMulti
1374
+ } : {
1375
+ x: mainAxis * mainAxisMulti,
1376
+ y: crossAxis * crossAxisMulti
1118
1377
  };
1119
1378
  }
1120
1379
 
1121
- function contains(parent, child) {
1122
- var rootNode = child.getRootNode && child.getRootNode();
1123
- if (parent.contains(child)) {
1124
- return true;
1125
- } else if (rootNode && isShadowRoot(rootNode)) {
1126
- var next = child;
1127
- do {
1128
- if (next && parent.isSameNode(next)) {
1129
- return true;
1380
+ const offset = function(options) {
1381
+ if (options === void 0) {
1382
+ options = 0;
1383
+ }
1384
+ return {
1385
+ name: "offset",
1386
+ options: options,
1387
+ async fn(state) {
1388
+ const {x: x, y: y} = state;
1389
+ const diffCoords = await convertValueToCoords(state, options);
1390
+ return {
1391
+ x: x + diffCoords.x,
1392
+ y: y + diffCoords.y,
1393
+ data: diffCoords
1394
+ };
1395
+ }
1396
+ };
1397
+ };
1398
+
1399
+ const shift = function(options) {
1400
+ if (options === void 0) {
1401
+ options = {};
1402
+ }
1403
+ return {
1404
+ name: "shift",
1405
+ options: options,
1406
+ async fn(state) {
1407
+ const {x: x, y: y, placement: placement} = state;
1408
+ const {mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter: limiter = {
1409
+ fn: _ref => {
1410
+ let {x: x, y: y} = _ref;
1411
+ return {
1412
+ x: x,
1413
+ y: y
1414
+ };
1415
+ }
1416
+ }, ...detectOverflowOptions} = evaluate(options, state);
1417
+ const coords = {
1418
+ x: x,
1419
+ y: y
1420
+ };
1421
+ const overflow = await detectOverflow(state, detectOverflowOptions);
1422
+ const crossAxis = getSideAxis(getSide(placement));
1423
+ const mainAxis = getOppositeAxis(crossAxis);
1424
+ let mainAxisCoord = coords[mainAxis];
1425
+ let crossAxisCoord = coords[crossAxis];
1426
+ if (checkMainAxis) {
1427
+ const minSide = mainAxis === "y" ? "top" : "left";
1428
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
1429
+ const min = mainAxisCoord + overflow[minSide];
1430
+ const max = mainAxisCoord - overflow[maxSide];
1431
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
1432
+ }
1433
+ if (checkCrossAxis) {
1434
+ const minSide = crossAxis === "y" ? "top" : "left";
1435
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
1436
+ const min = crossAxisCoord + overflow[minSide];
1437
+ const max = crossAxisCoord - overflow[maxSide];
1438
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
1130
1439
  }
1131
- next = next.parentNode || next.host;
1132
- } while (next);
1440
+ const limitedCoords = limiter.fn({
1441
+ ...state,
1442
+ [mainAxis]: mainAxisCoord,
1443
+ [crossAxis]: crossAxisCoord
1444
+ });
1445
+ return {
1446
+ ...limitedCoords,
1447
+ data: {
1448
+ x: limitedCoords.x - x,
1449
+ y: limitedCoords.y - y
1450
+ }
1451
+ };
1452
+ }
1453
+ };
1454
+ };
1455
+
1456
+ function getNodeName(node) {
1457
+ if (isNode(node)) {
1458
+ return (node.nodeName || "").toLowerCase();
1133
1459
  }
1134
- return false;
1460
+ return "#document";
1135
1461
  }
1136
1462
 
1137
- function getComputedStyle$1(element) {
1138
- return getWindow(element).getComputedStyle(element);
1463
+ function getWindow(node) {
1464
+ var _node$ownerDocument;
1465
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1139
1466
  }
1140
1467
 
1141
- function isTableElement(element) {
1142
- return [ "table", "td", "th" ].indexOf(getNodeName(element)) >= 0;
1468
+ function getDocumentElement(node) {
1469
+ var _ref;
1470
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1143
1471
  }
1144
1472
 
1145
- function getDocumentElement(element) {
1146
- return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
1473
+ function isNode(value) {
1474
+ return value instanceof Node || value instanceof getWindow(value).Node;
1147
1475
  }
1148
1476
 
1149
- function getParentNode(element) {
1150
- if (getNodeName(element) === "html") {
1151
- return element;
1152
- }
1153
- return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);
1477
+ function isElement(value) {
1478
+ return value instanceof Element || value instanceof getWindow(value).Element;
1154
1479
  }
1155
1480
 
1156
- function getTrueOffsetParent(element) {
1157
- if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
1158
- return null;
1481
+ function isHTMLElement(value) {
1482
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1483
+ }
1484
+
1485
+ function isShadowRoot(value) {
1486
+ if (typeof ShadowRoot === "undefined") {
1487
+ return false;
1159
1488
  }
1160
- return element.offsetParent;
1489
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1490
+ }
1491
+
1492
+ function isOverflowElement(element) {
1493
+ const {overflow: overflow, overflowX: overflowX, overflowY: overflowY, display: display} = getComputedStyle$1(element);
1494
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && ![ "inline", "contents" ].includes(display);
1495
+ }
1496
+
1497
+ function isTableElement(element) {
1498
+ return [ "table", "td", "th" ].includes(getNodeName(element));
1499
+ }
1500
+
1501
+ function isContainingBlock(element) {
1502
+ const webkit = isWebKit();
1503
+ const css = getComputedStyle$1(element);
1504
+ return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || [ "transform", "perspective", "filter" ].some((value => (css.willChange || "").includes(value))) || [ "paint", "layout", "strict", "content" ].some((value => (css.contain || "").includes(value)));
1161
1505
  }
1162
1506
 
1163
1507
  function getContainingBlock(element) {
1164
- var isFirefox = /firefox/i.test(getUAString());
1165
- var isIE = /Trident/i.test(getUAString());
1166
- if (isIE && isHTMLElement(element)) {
1167
- var elementCss = getComputedStyle$1(element);
1168
- if (elementCss.position === "fixed") {
1169
- return null;
1170
- }
1171
- }
1172
- var currentNode = getParentNode(element);
1173
- if (isShadowRoot(currentNode)) {
1174
- currentNode = currentNode.host;
1175
- }
1176
- while (isHTMLElement(currentNode) && [ "html", "body" ].indexOf(getNodeName(currentNode)) < 0) {
1177
- var css = getComputedStyle$1(currentNode);
1178
- if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || [ "transform", "perspective" ].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
1508
+ let currentNode = getParentNode(element);
1509
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1510
+ if (isContainingBlock(currentNode)) {
1179
1511
  return currentNode;
1180
1512
  } else {
1181
- currentNode = currentNode.parentNode;
1513
+ currentNode = getParentNode(currentNode);
1182
1514
  }
1183
1515
  }
1184
1516
  return null;
1185
1517
  }
1186
1518
 
1187
- function getOffsetParent(element) {
1188
- var window = getWindow(element);
1189
- var offsetParent = getTrueOffsetParent(element);
1190
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
1191
- offsetParent = getTrueOffsetParent(offsetParent);
1192
- }
1193
- if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static")) {
1194
- return window;
1195
- }
1196
- return offsetParent || getContainingBlock(element) || window;
1197
- }
1198
-
1199
- function getMainAxisFromPlacement(placement) {
1200
- return [ "top", "bottom" ].indexOf(placement) >= 0 ? "x" : "y";
1519
+ function isWebKit() {
1520
+ if (typeof CSS === "undefined" || !CSS.supports) return false;
1521
+ return CSS.supports("-webkit-backdrop-filter", "none");
1201
1522
  }
1202
1523
 
1203
- function within(min$1, value, max$1) {
1204
- return max(min$1, min(value, max$1));
1524
+ function isLastTraversableNode(node) {
1525
+ return [ "html", "body", "#document" ].includes(getNodeName(node));
1205
1526
  }
1206
1527
 
1207
- function withinMaxClamp(min, value, max) {
1208
- var v = within(min, value, max);
1209
- return v > max ? max : v;
1528
+ function getComputedStyle$1(element) {
1529
+ return getWindow(element).getComputedStyle(element);
1210
1530
  }
1211
1531
 
1212
- function getFreshSideObject() {
1532
+ function getNodeScroll(element) {
1533
+ if (isElement(element)) {
1534
+ return {
1535
+ scrollLeft: element.scrollLeft,
1536
+ scrollTop: element.scrollTop
1537
+ };
1538
+ }
1213
1539
  return {
1214
- top: 0,
1215
- right: 0,
1216
- bottom: 0,
1217
- left: 0
1540
+ scrollLeft: element.pageXOffset,
1541
+ scrollTop: element.pageYOffset
1218
1542
  };
1219
1543
  }
1220
1544
 
1221
- function mergePaddingObject(paddingObject) {
1222
- return Object.assign({}, getFreshSideObject(), paddingObject);
1223
- }
1224
-
1225
- function expandToHashMap(value, keys) {
1226
- return keys.reduce((function(hashMap, key) {
1227
- hashMap[key] = value;
1228
- return hashMap;
1229
- }), {});
1545
+ function getParentNode(node) {
1546
+ if (getNodeName(node) === "html") {
1547
+ return node;
1548
+ }
1549
+ const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
1550
+ return isShadowRoot(result) ? result.host : result;
1230
1551
  }
1231
1552
 
1232
- var toPaddingObject = function toPaddingObject(padding, state) {
1233
- padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, {
1234
- placement: state.placement
1235
- })) : padding;
1236
- return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
1237
- };
1238
-
1239
- function arrow(_ref) {
1240
- var _state$modifiersData$;
1241
- var state = _ref.state, name = _ref.name, options = _ref.options;
1242
- var arrowElement = state.elements.arrow;
1243
- var popperOffsets = state.modifiersData.popperOffsets;
1244
- var basePlacement = getBasePlacement(state.placement);
1245
- var axis = getMainAxisFromPlacement(basePlacement);
1246
- var isVertical = [ left, right ].indexOf(basePlacement) >= 0;
1247
- var len = isVertical ? "height" : "width";
1248
- if (!arrowElement || !popperOffsets) {
1249
- return;
1250
- }
1251
- var paddingObject = toPaddingObject(options.padding, state);
1252
- var arrowRect = getLayoutRect(arrowElement);
1253
- var minProp = axis === "y" ? top : left;
1254
- var maxProp = axis === "y" ? bottom : right;
1255
- var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
1256
- var startDiff = popperOffsets[axis] - state.rects.reference[axis];
1257
- var arrowOffsetParent = getOffsetParent(arrowElement);
1258
- var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
1259
- var centerToReference = endDiff / 2 - startDiff / 2;
1260
- var min = paddingObject[minProp];
1261
- var max = clientSize - arrowRect[len] - paddingObject[maxProp];
1262
- var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
1263
- var offset = within(min, center, max);
1264
- var axisProp = axis;
1265
- state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset,
1266
- _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
1267
- }
1268
-
1269
- function effect$1(_ref2) {
1270
- var state = _ref2.state, options = _ref2.options;
1271
- var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
1272
- if (arrowElement == null) {
1273
- return;
1274
- }
1275
- if (typeof arrowElement === "string") {
1276
- arrowElement = state.elements.popper.querySelector(arrowElement);
1277
- if (!arrowElement) {
1278
- return;
1279
- }
1553
+ function getNearestOverflowAncestor(node) {
1554
+ const parentNode = getParentNode(node);
1555
+ if (isLastTraversableNode(parentNode)) {
1556
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1280
1557
  }
1281
- if (!contains(state.elements.popper, arrowElement)) {
1282
- return;
1558
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1559
+ return parentNode;
1283
1560
  }
1284
- state.elements.arrow = arrowElement;
1561
+ return getNearestOverflowAncestor(parentNode);
1285
1562
  }
1286
1563
 
1287
- var arrow$1 = {
1288
- name: "arrow",
1289
- enabled: true,
1290
- phase: "main",
1291
- fn: arrow,
1292
- effect: effect$1,
1293
- requires: [ "popperOffsets" ],
1294
- requiresIfExists: [ "preventOverflow" ]
1295
- };
1296
-
1297
- function getVariation(placement) {
1298
- return placement.split("-")[1];
1564
+ function getOverflowAncestors(node, list, traverseIframes) {
1565
+ var _node$ownerDocument2;
1566
+ if (list === void 0) {
1567
+ list = [];
1568
+ }
1569
+ if (traverseIframes === void 0) {
1570
+ traverseIframes = true;
1571
+ }
1572
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1573
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1574
+ const win = getWindow(scrollableAncestor);
1575
+ if (isBody) {
1576
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
1577
+ }
1578
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1299
1579
  }
1300
1580
 
1301
- var unsetSides = {
1302
- top: "auto",
1303
- right: "auto",
1304
- bottom: "auto",
1305
- left: "auto"
1306
- };
1307
-
1308
- function roundOffsetsByDPR(_ref, win) {
1309
- var x = _ref.x, y = _ref.y;
1310
- var dpr = win.devicePixelRatio || 1;
1581
+ function getCssDimensions(element) {
1582
+ const css = getComputedStyle$1(element);
1583
+ let width = parseFloat(css.width) || 0;
1584
+ let height = parseFloat(css.height) || 0;
1585
+ const hasOffset = isHTMLElement(element);
1586
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1587
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1588
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1589
+ if (shouldFallback) {
1590
+ width = offsetWidth;
1591
+ height = offsetHeight;
1592
+ }
1311
1593
  return {
1312
- x: round(x * dpr) / dpr || 0,
1313
- y: round(y * dpr) / dpr || 0
1594
+ width: width,
1595
+ height: height,
1596
+ $: shouldFallback
1314
1597
  };
1315
1598
  }
1316
1599
 
1317
- function mapToStyles(_ref2) {
1318
- var _Object$assign2;
1319
- var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
1320
- var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y;
1321
- var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
1322
- x: x,
1323
- y: y
1324
- }) : {
1325
- x: x,
1326
- y: y
1327
- };
1328
- x = _ref3.x;
1329
- y = _ref3.y;
1330
- var hasX = offsets.hasOwnProperty("x");
1331
- var hasY = offsets.hasOwnProperty("y");
1332
- var sideX = left;
1333
- var sideY = top;
1334
- var win = window;
1335
- if (adaptive) {
1336
- var offsetParent = getOffsetParent(popper);
1337
- var heightProp = "clientHeight";
1338
- var widthProp = "clientWidth";
1339
- if (offsetParent === getWindow(popper)) {
1340
- offsetParent = getDocumentElement(popper);
1341
- if (getComputedStyle$1(offsetParent).position !== "static" && position === "absolute") {
1342
- heightProp = "scrollHeight";
1343
- widthProp = "scrollWidth";
1344
- }
1345
- }
1346
- offsetParent = offsetParent;
1347
- if (placement === top || (placement === left || placement === right) && variation === end) {
1348
- sideY = bottom;
1349
- var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
1350
- y -= offsetY - popperRect.height;
1351
- y *= gpuAcceleration ? 1 : -1;
1352
- }
1353
- if (placement === left || (placement === top || placement === bottom) && variation === end) {
1354
- sideX = right;
1355
- var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
1356
- x -= offsetX - popperRect.width;
1357
- x *= gpuAcceleration ? 1 : -1;
1358
- }
1600
+ function unwrapElement(element) {
1601
+ return !isElement(element) ? element.contextElement : element;
1602
+ }
1603
+
1604
+ function getScale(element) {
1605
+ const domElement = unwrapElement(element);
1606
+ if (!isHTMLElement(domElement)) {
1607
+ return createCoords(1);
1359
1608
  }
1360
- var commonStyles = Object.assign({
1361
- position: position
1362
- }, adaptive && unsetSides);
1363
- var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
1364
- x: x,
1365
- y: y
1366
- }, getWindow(popper)) : {
1609
+ const rect = domElement.getBoundingClientRect();
1610
+ const {width: width, height: height, $: $} = getCssDimensions(domElement);
1611
+ let x = ($ ? round(rect.width) : rect.width) / width;
1612
+ let y = ($ ? round(rect.height) : rect.height) / height;
1613
+ if (!x || !Number.isFinite(x)) {
1614
+ x = 1;
1615
+ }
1616
+ if (!y || !Number.isFinite(y)) {
1617
+ y = 1;
1618
+ }
1619
+ return {
1367
1620
  x: x,
1368
1621
  y: y
1369
1622
  };
1370
- x = _ref4.x;
1371
- y = _ref4.y;
1372
- if (gpuAcceleration) {
1373
- var _Object$assign;
1374
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "",
1375
- _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)",
1376
- _Object$assign));
1377
- }
1378
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "",
1379
- _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
1380
- }
1381
-
1382
- function computeStyles(_ref5) {
1383
- var state = _ref5.state, options = _ref5.options;
1384
- var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
1385
- var commonStyles = {
1386
- placement: getBasePlacement(state.placement),
1387
- variation: getVariation(state.placement),
1388
- popper: state.elements.popper,
1389
- popperRect: state.rects.popper,
1390
- gpuAcceleration: gpuAcceleration,
1391
- isFixed: state.options.strategy === "fixed"
1392
- };
1393
- if (state.modifiersData.popperOffsets != null) {
1394
- state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
1395
- offsets: state.modifiersData.popperOffsets,
1396
- position: state.options.strategy,
1397
- adaptive: adaptive,
1398
- roundOffsets: roundOffsets
1399
- })));
1400
- }
1401
- if (state.modifiersData.arrow != null) {
1402
- state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
1403
- offsets: state.modifiersData.arrow,
1404
- position: "absolute",
1405
- adaptive: false,
1406
- roundOffsets: roundOffsets
1407
- })));
1408
- }
1409
- state.attributes.popper = Object.assign({}, state.attributes.popper, {
1410
- "data-popper-placement": state.placement
1411
- });
1412
1623
  }
1413
1624
 
1414
- var computeStyles$1 = {
1415
- name: "computeStyles",
1416
- enabled: true,
1417
- phase: "beforeWrite",
1418
- fn: computeStyles,
1419
- data: {}
1420
- };
1421
-
1422
- var passive = {
1423
- passive: true
1424
- };
1625
+ const noOffsets = createCoords(0);
1425
1626
 
1426
- function effect(_ref) {
1427
- var state = _ref.state, instance = _ref.instance, options = _ref.options;
1428
- var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
1429
- var window = getWindow(state.elements.popper);
1430
- var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
1431
- if (scroll) {
1432
- scrollParents.forEach((function(scrollParent) {
1433
- scrollParent.addEventListener("scroll", instance.update, passive);
1434
- }));
1435
- }
1436
- if (resize) {
1437
- window.addEventListener("resize", instance.update, passive);
1627
+ function getVisualOffsets(element) {
1628
+ const win = getWindow(element);
1629
+ if (!isWebKit() || !win.visualViewport) {
1630
+ return noOffsets;
1438
1631
  }
1439
- return function() {
1440
- if (scroll) {
1441
- scrollParents.forEach((function(scrollParent) {
1442
- scrollParent.removeEventListener("scroll", instance.update, passive);
1443
- }));
1444
- }
1445
- if (resize) {
1446
- window.removeEventListener("resize", instance.update, passive);
1447
- }
1632
+ return {
1633
+ x: win.visualViewport.offsetLeft,
1634
+ y: win.visualViewport.offsetTop
1448
1635
  };
1449
1636
  }
1450
1637
 
1451
- var eventListeners = {
1452
- name: "eventListeners",
1453
- enabled: true,
1454
- phase: "write",
1455
- fn: function fn() {},
1456
- effect: effect,
1457
- data: {}
1458
- };
1459
-
1460
- var hash$1 = {
1461
- left: "right",
1462
- right: "left",
1463
- bottom: "top",
1464
- top: "bottom"
1465
- };
1466
-
1467
- function getOppositePlacement(placement) {
1468
- return placement.replace(/left|right|bottom|top/g, (function(matched) {
1469
- return hash$1[matched];
1470
- }));
1638
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1639
+ if (isFixed === void 0) {
1640
+ isFixed = false;
1641
+ }
1642
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1643
+ return false;
1644
+ }
1645
+ return isFixed;
1471
1646
  }
1472
1647
 
1473
- var hash = {
1474
- start: "end",
1475
- end: "start"
1476
- };
1477
-
1478
- function getOppositeVariationPlacement(placement) {
1479
- return placement.replace(/start|end/g, (function(matched) {
1480
- return hash[matched];
1481
- }));
1648
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1649
+ if (includeScale === void 0) {
1650
+ includeScale = false;
1651
+ }
1652
+ if (isFixedStrategy === void 0) {
1653
+ isFixedStrategy = false;
1654
+ }
1655
+ const clientRect = element.getBoundingClientRect();
1656
+ const domElement = unwrapElement(element);
1657
+ let scale = createCoords(1);
1658
+ if (includeScale) {
1659
+ if (offsetParent) {
1660
+ if (isElement(offsetParent)) {
1661
+ scale = getScale(offsetParent);
1662
+ }
1663
+ } else {
1664
+ scale = getScale(element);
1665
+ }
1666
+ }
1667
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1668
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1669
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1670
+ let width = clientRect.width / scale.x;
1671
+ let height = clientRect.height / scale.y;
1672
+ if (domElement) {
1673
+ const win = getWindow(domElement);
1674
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1675
+ let currentIFrame = win.frameElement;
1676
+ while (currentIFrame && offsetParent && offsetWin !== win) {
1677
+ const iframeScale = getScale(currentIFrame);
1678
+ const iframeRect = currentIFrame.getBoundingClientRect();
1679
+ const css = getComputedStyle$1(currentIFrame);
1680
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1681
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1682
+ x *= iframeScale.x;
1683
+ y *= iframeScale.y;
1684
+ width *= iframeScale.x;
1685
+ height *= iframeScale.y;
1686
+ x += left;
1687
+ y += top;
1688
+ currentIFrame = getWindow(currentIFrame).frameElement;
1689
+ }
1690
+ }
1691
+ return rectToClientRect({
1692
+ width: width,
1693
+ height: height,
1694
+ x: x,
1695
+ y: y
1696
+ });
1482
1697
  }
1483
1698
 
1484
- function getWindowScroll(node) {
1485
- var win = getWindow(node);
1486
- var scrollLeft = win.pageXOffset;
1487
- var scrollTop = win.pageYOffset;
1699
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1700
+ let {rect: rect, offsetParent: offsetParent, strategy: strategy} = _ref;
1701
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1702
+ const documentElement = getDocumentElement(offsetParent);
1703
+ if (offsetParent === documentElement) {
1704
+ return rect;
1705
+ }
1706
+ let scroll = {
1707
+ scrollLeft: 0,
1708
+ scrollTop: 0
1709
+ };
1710
+ let scale = createCoords(1);
1711
+ const offsets = createCoords(0);
1712
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
1713
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1714
+ scroll = getNodeScroll(offsetParent);
1715
+ }
1716
+ if (isHTMLElement(offsetParent)) {
1717
+ const offsetRect = getBoundingClientRect(offsetParent);
1718
+ scale = getScale(offsetParent);
1719
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1720
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1721
+ }
1722
+ }
1488
1723
  return {
1489
- scrollLeft: scrollLeft,
1490
- scrollTop: scrollTop
1724
+ width: rect.width * scale.x,
1725
+ height: rect.height * scale.y,
1726
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
1727
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
1491
1728
  };
1492
1729
  }
1493
1730
 
1731
+ function getClientRects(element) {
1732
+ return Array.from(element.getClientRects());
1733
+ }
1734
+
1494
1735
  function getWindowScrollBarX(element) {
1495
- return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
1736
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
1737
+ }
1738
+
1739
+ function getDocumentRect(element) {
1740
+ const html = getDocumentElement(element);
1741
+ const scroll = getNodeScroll(element);
1742
+ const body = element.ownerDocument.body;
1743
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1744
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1745
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1746
+ const y = -scroll.scrollTop;
1747
+ if (getComputedStyle$1(body).direction === "rtl") {
1748
+ x += max(html.clientWidth, body.clientWidth) - width;
1749
+ }
1750
+ return {
1751
+ width: width,
1752
+ height: height,
1753
+ x: x,
1754
+ y: y
1755
+ };
1496
1756
  }
1497
1757
 
1498
1758
  function getViewportRect(element, strategy) {
1499
- var win = getWindow(element);
1500
- var html = getDocumentElement(element);
1501
- var visualViewport = win.visualViewport;
1502
- var width = html.clientWidth;
1503
- var height = html.clientHeight;
1504
- var x = 0;
1505
- var y = 0;
1759
+ const win = getWindow(element);
1760
+ const html = getDocumentElement(element);
1761
+ const visualViewport = win.visualViewport;
1762
+ let width = html.clientWidth;
1763
+ let height = html.clientHeight;
1764
+ let x = 0;
1765
+ let y = 0;
1506
1766
  if (visualViewport) {
1507
1767
  width = visualViewport.width;
1508
1768
  height = visualViewport.height;
1509
- var layoutViewport = isLayoutViewport();
1510
- if (layoutViewport || !layoutViewport && strategy === "fixed") {
1769
+ const visualViewportBased = isWebKit();
1770
+ if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
1511
1771
  x = visualViewport.offsetLeft;
1512
1772
  y = visualViewport.offsetTop;
1513
1773
  }
@@ -1515,23 +1775,20 @@ function getViewportRect(element, strategy) {
1515
1775
  return {
1516
1776
  width: width,
1517
1777
  height: height,
1518
- x: x + getWindowScrollBarX(element),
1778
+ x: x,
1519
1779
  y: y
1520
1780
  };
1521
1781
  }
1522
1782
 
1523
- function getDocumentRect(element) {
1524
- var _element$ownerDocumen;
1525
- var html = getDocumentElement(element);
1526
- var winScroll = getWindowScroll(element);
1527
- var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
1528
- var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
1529
- var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
1530
- var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
1531
- var y = -winScroll.scrollTop;
1532
- if (getComputedStyle$1(body || html).direction === "rtl") {
1533
- x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
1534
- }
1783
+ function getInnerBoundingClientRect(element, strategy) {
1784
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
1785
+ const top = clientRect.top + element.clientTop;
1786
+ const left = clientRect.left + element.clientLeft;
1787
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1788
+ const width = element.clientWidth * scale.x;
1789
+ const height = element.clientHeight * scale.y;
1790
+ const x = left * scale.x;
1791
+ const y = top * scale.y;
1535
1792
  return {
1536
1793
  width: width,
1537
1794
  height: height,
@@ -1540,578 +1797,103 @@ function getDocumentRect(element) {
1540
1797
  };
1541
1798
  }
1542
1799
 
1543
- function isScrollParent(element) {
1544
- var _getComputedStyle = getComputedStyle$1(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
1545
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
1546
- }
1547
-
1548
- function getScrollParent(node) {
1549
- if ([ "html", "body", "#document" ].indexOf(getNodeName(node)) >= 0) {
1550
- return node.ownerDocument.body;
1551
- }
1552
- if (isHTMLElement(node) && isScrollParent(node)) {
1553
- return node;
1800
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1801
+ let rect;
1802
+ if (clippingAncestor === "viewport") {
1803
+ rect = getViewportRect(element, strategy);
1804
+ } else if (clippingAncestor === "document") {
1805
+ rect = getDocumentRect(getDocumentElement(element));
1806
+ } else if (isElement(clippingAncestor)) {
1807
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1808
+ } else {
1809
+ const visualOffsets = getVisualOffsets(element);
1810
+ rect = {
1811
+ ...clippingAncestor,
1812
+ x: clippingAncestor.x - visualOffsets.x,
1813
+ y: clippingAncestor.y - visualOffsets.y
1814
+ };
1554
1815
  }
1555
- return getScrollParent(getParentNode(node));
1816
+ return rectToClientRect(rect);
1556
1817
  }
1557
1818
 
1558
- function listScrollParents(element, list) {
1559
- var _element$ownerDocumen;
1560
- if (list === void 0) {
1561
- list = [];
1819
+ function hasFixedPositionAncestor(element, stopNode) {
1820
+ const parentNode = getParentNode(element);
1821
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1822
+ return false;
1562
1823
  }
1563
- var scrollParent = getScrollParent(element);
1564
- var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
1565
- var win = getWindow(scrollParent);
1566
- var target = isBody ? [ win ].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
1567
- var updatedList = list.concat(target);
1568
- return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
1569
- }
1570
-
1571
- function rectToClientRect(rect) {
1572
- return Object.assign({}, rect, {
1573
- left: rect.x,
1574
- top: rect.y,
1575
- right: rect.x + rect.width,
1576
- bottom: rect.y + rect.height
1577
- });
1824
+ return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
1578
1825
  }
1579
1826
 
1580
- function getInnerBoundingClientRect(element, strategy) {
1581
- var rect = getBoundingClientRect(element, false, strategy === "fixed");
1582
- rect.top = rect.top + element.clientTop;
1583
- rect.left = rect.left + element.clientLeft;
1584
- rect.bottom = rect.top + element.clientHeight;
1585
- rect.right = rect.left + element.clientWidth;
1586
- rect.width = element.clientWidth;
1587
- rect.height = element.clientHeight;
1588
- rect.x = rect.left;
1589
- rect.y = rect.top;
1590
- return rect;
1591
- }
1592
-
1593
- function getClientRectFromMixedType(element, clippingParent, strategy) {
1594
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
1595
- }
1596
-
1597
- function getClippingParents(element) {
1598
- var clippingParents = listScrollParents(getParentNode(element));
1599
- var canEscapeClipping = [ "absolute", "fixed" ].indexOf(getComputedStyle$1(element).position) >= 0;
1600
- var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
1601
- if (!isElement(clipperElement)) {
1602
- return [];
1827
+ function getClippingElementAncestors(element, cache) {
1828
+ const cachedResult = cache.get(element);
1829
+ if (cachedResult) {
1830
+ return cachedResult;
1603
1831
  }
1604
- return clippingParents.filter((function(clippingParent) {
1605
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
1606
- }));
1832
+ let result = getOverflowAncestors(element, [], false).filter((el => isElement(el) && getNodeName(el) !== "body"));
1833
+ let currentContainingBlockComputedStyle = null;
1834
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
1835
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1836
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1837
+ const computedStyle = getComputedStyle$1(currentNode);
1838
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1839
+ if (!currentNodeIsContaining && computedStyle.position === "fixed") {
1840
+ currentContainingBlockComputedStyle = null;
1841
+ }
1842
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && [ "absolute", "fixed" ].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1843
+ if (shouldDropCurrentNode) {
1844
+ result = result.filter((ancestor => ancestor !== currentNode));
1845
+ } else {
1846
+ currentContainingBlockComputedStyle = computedStyle;
1847
+ }
1848
+ currentNode = getParentNode(currentNode);
1849
+ }
1850
+ cache.set(element, result);
1851
+ return result;
1607
1852
  }
1608
1853
 
1609
- function getClippingRect(element, boundary, rootBoundary, strategy) {
1610
- var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary);
1611
- var clippingParents = [].concat(mainClippingParents, [ rootBoundary ]);
1612
- var firstClippingParent = clippingParents[0];
1613
- var clippingRect = clippingParents.reduce((function(accRect, clippingParent) {
1614
- var rect = getClientRectFromMixedType(element, clippingParent, strategy);
1854
+ function getClippingRect(_ref) {
1855
+ let {element: element, boundary: boundary, rootBoundary: rootBoundary, strategy: strategy} = _ref;
1856
+ const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
1857
+ const clippingAncestors = [ ...elementClippingAncestors, rootBoundary ];
1858
+ const firstClippingAncestor = clippingAncestors[0];
1859
+ const clippingRect = clippingAncestors.reduce(((accRect, clippingAncestor) => {
1860
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1615
1861
  accRect.top = max(rect.top, accRect.top);
1616
1862
  accRect.right = min(rect.right, accRect.right);
1617
1863
  accRect.bottom = min(rect.bottom, accRect.bottom);
1618
1864
  accRect.left = max(rect.left, accRect.left);
1619
1865
  return accRect;
1620
- }), getClientRectFromMixedType(element, firstClippingParent, strategy));
1621
- clippingRect.width = clippingRect.right - clippingRect.left;
1622
- clippingRect.height = clippingRect.bottom - clippingRect.top;
1623
- clippingRect.x = clippingRect.left;
1624
- clippingRect.y = clippingRect.top;
1625
- return clippingRect;
1626
- }
1627
-
1628
- function computeOffsets(_ref) {
1629
- var reference = _ref.reference, element = _ref.element, placement = _ref.placement;
1630
- var basePlacement = placement ? getBasePlacement(placement) : null;
1631
- var variation = placement ? getVariation(placement) : null;
1632
- var commonX = reference.x + reference.width / 2 - element.width / 2;
1633
- var commonY = reference.y + reference.height / 2 - element.height / 2;
1634
- var offsets;
1635
- switch (basePlacement) {
1636
- case top:
1637
- offsets = {
1638
- x: commonX,
1639
- y: reference.y - element.height
1640
- };
1641
- break;
1642
-
1643
- case bottom:
1644
- offsets = {
1645
- x: commonX,
1646
- y: reference.y + reference.height
1647
- };
1648
- break;
1649
-
1650
- case right:
1651
- offsets = {
1652
- x: reference.x + reference.width,
1653
- y: commonY
1654
- };
1655
- break;
1656
-
1657
- case left:
1658
- offsets = {
1659
- x: reference.x - element.width,
1660
- y: commonY
1661
- };
1662
- break;
1663
-
1664
- default:
1665
- offsets = {
1666
- x: reference.x,
1667
- y: reference.y
1668
- };
1669
- }
1670
- var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
1671
- if (mainAxis != null) {
1672
- var len = mainAxis === "y" ? "height" : "width";
1673
- switch (variation) {
1674
- case start:
1675
- offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
1676
- break;
1677
-
1678
- case end:
1679
- offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
1680
- break;
1681
- }
1682
- }
1683
- return offsets;
1684
- }
1685
-
1686
- function detectOverflow(state, options) {
1687
- if (options === void 0) {
1688
- options = {};
1689
- }
1690
- var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
1691
- var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
1692
- var altContext = elementContext === popper ? reference : popper;
1693
- var popperRect = state.rects.popper;
1694
- var element = state.elements[altBoundary ? altContext : elementContext];
1695
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
1696
- var referenceClientRect = getBoundingClientRect(state.elements.reference);
1697
- var popperOffsets = computeOffsets({
1698
- reference: referenceClientRect,
1699
- element: popperRect,
1700
- strategy: "absolute",
1701
- placement: placement
1702
- });
1703
- var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
1704
- var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
1705
- var overflowOffsets = {
1706
- top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
1707
- bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
1708
- left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
1709
- right: elementClientRect.right - clippingClientRect.right + paddingObject.right
1710
- };
1711
- var offsetData = state.modifiersData.offset;
1712
- if (elementContext === popper && offsetData) {
1713
- var offset = offsetData[placement];
1714
- Object.keys(overflowOffsets).forEach((function(key) {
1715
- var multiply = [ right, bottom ].indexOf(key) >= 0 ? 1 : -1;
1716
- var axis = [ top, bottom ].indexOf(key) >= 0 ? "y" : "x";
1717
- overflowOffsets[key] += offset[axis] * multiply;
1718
- }));
1719
- }
1720
- return overflowOffsets;
1721
- }
1722
-
1723
- function computeAutoPlacement(state, options) {
1724
- if (options === void 0) {
1725
- options = {};
1726
- }
1727
- var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
1728
- var variation = getVariation(placement);
1729
- var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter((function(placement) {
1730
- return getVariation(placement) === variation;
1731
- })) : basePlacements;
1732
- var allowedPlacements = placements$1.filter((function(placement) {
1733
- return allowedAutoPlacements.indexOf(placement) >= 0;
1734
- }));
1735
- if (allowedPlacements.length === 0) {
1736
- allowedPlacements = placements$1;
1737
- }
1738
- var overflows = allowedPlacements.reduce((function(acc, placement) {
1739
- acc[placement] = detectOverflow(state, {
1740
- placement: placement,
1741
- boundary: boundary,
1742
- rootBoundary: rootBoundary,
1743
- padding: padding
1744
- })[getBasePlacement(placement)];
1745
- return acc;
1746
- }), {});
1747
- return Object.keys(overflows).sort((function(a, b) {
1748
- return overflows[a] - overflows[b];
1749
- }));
1750
- }
1751
-
1752
- function getExpandedFallbackPlacements(placement) {
1753
- if (getBasePlacement(placement) === auto) {
1754
- return [];
1755
- }
1756
- var oppositePlacement = getOppositePlacement(placement);
1757
- return [ getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement) ];
1758
- }
1759
-
1760
- function flip(_ref) {
1761
- var state = _ref.state, options = _ref.options, name = _ref.name;
1762
- if (state.modifiersData[name]._skip) {
1763
- return;
1764
- }
1765
- var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;
1766
- var preferredPlacement = state.options.placement;
1767
- var basePlacement = getBasePlacement(preferredPlacement);
1768
- var isBasePlacement = basePlacement === preferredPlacement;
1769
- var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [ getOppositePlacement(preferredPlacement) ] : getExpandedFallbackPlacements(preferredPlacement));
1770
- var placements = [ preferredPlacement ].concat(fallbackPlacements).reduce((function(acc, placement) {
1771
- return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
1772
- placement: placement,
1773
- boundary: boundary,
1774
- rootBoundary: rootBoundary,
1775
- padding: padding,
1776
- flipVariations: flipVariations,
1777
- allowedAutoPlacements: allowedAutoPlacements
1778
- }) : placement);
1779
- }), []);
1780
- var referenceRect = state.rects.reference;
1781
- var popperRect = state.rects.popper;
1782
- var checksMap = new Map;
1783
- var makeFallbackChecks = true;
1784
- var firstFittingPlacement = placements[0];
1785
- for (var i = 0; i < placements.length; i++) {
1786
- var placement = placements[i];
1787
- var _basePlacement = getBasePlacement(placement);
1788
- var isStartVariation = getVariation(placement) === start;
1789
- var isVertical = [ top, bottom ].indexOf(_basePlacement) >= 0;
1790
- var len = isVertical ? "width" : "height";
1791
- var overflow = detectOverflow(state, {
1792
- placement: placement,
1793
- boundary: boundary,
1794
- rootBoundary: rootBoundary,
1795
- altBoundary: altBoundary,
1796
- padding: padding
1797
- });
1798
- var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1799
- if (referenceRect[len] > popperRect[len]) {
1800
- mainVariationSide = getOppositePlacement(mainVariationSide);
1801
- }
1802
- var altVariationSide = getOppositePlacement(mainVariationSide);
1803
- var checks = [];
1804
- if (checkMainAxis) {
1805
- checks.push(overflow[_basePlacement] <= 0);
1806
- }
1807
- if (checkAltAxis) {
1808
- checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1809
- }
1810
- if (checks.every((function(check) {
1811
- return check;
1812
- }))) {
1813
- firstFittingPlacement = placement;
1814
- makeFallbackChecks = false;
1815
- break;
1816
- }
1817
- checksMap.set(placement, checks);
1818
- }
1819
- if (makeFallbackChecks) {
1820
- var numberOfChecks = flipVariations ? 3 : 1;
1821
- var _loop = function _loop(_i) {
1822
- var fittingPlacement = placements.find((function(placement) {
1823
- var checks = checksMap.get(placement);
1824
- if (checks) {
1825
- return checks.slice(0, _i).every((function(check) {
1826
- return check;
1827
- }));
1828
- }
1829
- }));
1830
- if (fittingPlacement) {
1831
- firstFittingPlacement = fittingPlacement;
1832
- return "break";
1833
- }
1834
- };
1835
- for (var _i = numberOfChecks; _i > 0; _i--) {
1836
- var _ret = _loop(_i);
1837
- if (_ret === "break") break;
1838
- }
1839
- }
1840
- if (state.placement !== firstFittingPlacement) {
1841
- state.modifiersData[name]._skip = true;
1842
- state.placement = firstFittingPlacement;
1843
- state.reset = true;
1844
- }
1845
- }
1846
-
1847
- var flip$1 = {
1848
- name: "flip",
1849
- enabled: true,
1850
- phase: "main",
1851
- fn: flip,
1852
- requiresIfExists: [ "offset" ],
1853
- data: {
1854
- _skip: false
1855
- }
1856
- };
1857
-
1858
- function getSideOffsets(overflow, rect, preventedOffsets) {
1859
- if (preventedOffsets === void 0) {
1860
- preventedOffsets = {
1861
- x: 0,
1862
- y: 0
1863
- };
1864
- }
1866
+ }), getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1865
1867
  return {
1866
- top: overflow.top - rect.height - preventedOffsets.y,
1867
- right: overflow.right - rect.width + preventedOffsets.x,
1868
- bottom: overflow.bottom - rect.height + preventedOffsets.y,
1869
- left: overflow.left - rect.width - preventedOffsets.x
1868
+ width: clippingRect.right - clippingRect.left,
1869
+ height: clippingRect.bottom - clippingRect.top,
1870
+ x: clippingRect.left,
1871
+ y: clippingRect.top
1870
1872
  };
1871
1873
  }
1872
1874
 
1873
- function isAnySideFullyClipped(overflow) {
1874
- return [ top, right, bottom, left ].some((function(side) {
1875
- return overflow[side] >= 0;
1876
- }));
1875
+ function getDimensions(element) {
1876
+ return getCssDimensions(element);
1877
1877
  }
1878
1878
 
1879
- function hide(_ref) {
1880
- var state = _ref.state, name = _ref.name;
1881
- var referenceRect = state.rects.reference;
1882
- var popperRect = state.rects.popper;
1883
- var preventedOffsets = state.modifiersData.preventOverflow;
1884
- var referenceOverflow = detectOverflow(state, {
1885
- elementContext: "reference"
1886
- });
1887
- var popperAltOverflow = detectOverflow(state, {
1888
- altBoundary: true
1889
- });
1890
- var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
1891
- var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
1892
- var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
1893
- var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
1894
- state.modifiersData[name] = {
1895
- referenceClippingOffsets: referenceClippingOffsets,
1896
- popperEscapeOffsets: popperEscapeOffsets,
1897
- isReferenceHidden: isReferenceHidden,
1898
- hasPopperEscaped: hasPopperEscaped
1899
- };
1900
- state.attributes.popper = Object.assign({}, state.attributes.popper, {
1901
- "data-popper-reference-hidden": isReferenceHidden,
1902
- "data-popper-escaped": hasPopperEscaped
1903
- });
1904
- }
1905
-
1906
- var hide$1 = {
1907
- name: "hide",
1908
- enabled: true,
1909
- phase: "main",
1910
- requiresIfExists: [ "preventOverflow" ],
1911
- fn: hide
1912
- };
1913
-
1914
- function distanceAndSkiddingToXY(placement, rects, offset) {
1915
- var basePlacement = getBasePlacement(placement);
1916
- var invertDistance = [ left, top ].indexOf(basePlacement) >= 0 ? -1 : 1;
1917
- var _ref = typeof offset === "function" ? offset(Object.assign({}, rects, {
1918
- placement: placement
1919
- })) : offset, skidding = _ref[0], distance = _ref[1];
1920
- skidding = skidding || 0;
1921
- distance = (distance || 0) * invertDistance;
1922
- return [ left, right ].indexOf(basePlacement) >= 0 ? {
1923
- x: distance,
1924
- y: skidding
1925
- } : {
1926
- x: skidding,
1927
- y: distance
1928
- };
1929
- }
1930
-
1931
- function offset(_ref2) {
1932
- var state = _ref2.state, options = _ref2.options, name = _ref2.name;
1933
- var _options$offset = options.offset, offset = _options$offset === void 0 ? [ 0, 0 ] : _options$offset;
1934
- var data = placements.reduce((function(acc, placement) {
1935
- acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1936
- return acc;
1937
- }), {});
1938
- var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
1939
- if (state.modifiersData.popperOffsets != null) {
1940
- state.modifiersData.popperOffsets.x += x;
1941
- state.modifiersData.popperOffsets.y += y;
1942
- }
1943
- state.modifiersData[name] = data;
1944
- }
1945
-
1946
- var offset$1 = {
1947
- name: "offset",
1948
- enabled: true,
1949
- phase: "main",
1950
- requires: [ "popperOffsets" ],
1951
- fn: offset
1952
- };
1953
-
1954
- function popperOffsets(_ref) {
1955
- var state = _ref.state, name = _ref.name;
1956
- state.modifiersData[name] = computeOffsets({
1957
- reference: state.rects.reference,
1958
- element: state.rects.popper,
1959
- strategy: "absolute",
1960
- placement: state.placement
1961
- });
1962
- }
1963
-
1964
- var popperOffsets$1 = {
1965
- name: "popperOffsets",
1966
- enabled: true,
1967
- phase: "read",
1968
- fn: popperOffsets,
1969
- data: {}
1970
- };
1971
-
1972
- function getAltAxis(axis) {
1973
- return axis === "x" ? "y" : "x";
1974
- }
1975
-
1976
- function preventOverflow(_ref) {
1977
- var state = _ref.state, options = _ref.options, name = _ref.name;
1978
- var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1979
- var overflow = detectOverflow(state, {
1980
- boundary: boundary,
1981
- rootBoundary: rootBoundary,
1982
- padding: padding,
1983
- altBoundary: altBoundary
1984
- });
1985
- var basePlacement = getBasePlacement(state.placement);
1986
- var variation = getVariation(state.placement);
1987
- var isBasePlacement = !variation;
1988
- var mainAxis = getMainAxisFromPlacement(basePlacement);
1989
- var altAxis = getAltAxis(mainAxis);
1990
- var popperOffsets = state.modifiersData.popperOffsets;
1991
- var referenceRect = state.rects.reference;
1992
- var popperRect = state.rects.popper;
1993
- var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, {
1994
- placement: state.placement
1995
- })) : tetherOffset;
1996
- var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? {
1997
- mainAxis: tetherOffsetValue,
1998
- altAxis: tetherOffsetValue
1999
- } : Object.assign({
2000
- mainAxis: 0,
2001
- altAxis: 0
2002
- }, tetherOffsetValue);
2003
- var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
2004
- var data = {
2005
- x: 0,
2006
- y: 0
2007
- };
2008
- if (!popperOffsets) {
2009
- return;
2010
- }
2011
- if (checkMainAxis) {
2012
- var _offsetModifierState$;
2013
- var mainSide = mainAxis === "y" ? top : left;
2014
- var altSide = mainAxis === "y" ? bottom : right;
2015
- var len = mainAxis === "y" ? "height" : "width";
2016
- var offset = popperOffsets[mainAxis];
2017
- var min$1 = offset + overflow[mainSide];
2018
- var max$1 = offset - overflow[altSide];
2019
- var additive = tether ? -popperRect[len] / 2 : 0;
2020
- var minLen = variation === start ? referenceRect[len] : popperRect[len];
2021
- var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
2022
- var arrowElement = state.elements.arrow;
2023
- var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
2024
- width: 0,
2025
- height: 0
2026
- };
2027
- var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject();
2028
- var arrowPaddingMin = arrowPaddingObject[mainSide];
2029
- var arrowPaddingMax = arrowPaddingObject[altSide];
2030
- var arrowLen = within(0, referenceRect[len], arrowRect[len]);
2031
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
2032
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
2033
- var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
2034
- var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
2035
- var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
2036
- var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
2037
- var tetherMax = offset + maxOffset - offsetModifierValue;
2038
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
2039
- popperOffsets[mainAxis] = preventedOffset;
2040
- data[mainAxis] = preventedOffset - offset;
2041
- }
2042
- if (checkAltAxis) {
2043
- var _offsetModifierState$2;
2044
- var _mainSide = mainAxis === "x" ? top : left;
2045
- var _altSide = mainAxis === "x" ? bottom : right;
2046
- var _offset = popperOffsets[altAxis];
2047
- var _len = altAxis === "y" ? "height" : "width";
2048
- var _min = _offset + overflow[_mainSide];
2049
- var _max = _offset - overflow[_altSide];
2050
- var isOriginSide = [ top, left ].indexOf(basePlacement) !== -1;
2051
- var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
2052
- var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
2053
- var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
2054
- var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
2055
- popperOffsets[altAxis] = _preventedOffset;
2056
- data[altAxis] = _preventedOffset - _offset;
2057
- }
2058
- state.modifiersData[name] = data;
2059
- }
2060
-
2061
- var preventOverflow$1 = {
2062
- name: "preventOverflow",
2063
- enabled: true,
2064
- phase: "main",
2065
- fn: preventOverflow,
2066
- requiresIfExists: [ "offset" ]
2067
- };
2068
-
2069
- function getHTMLElementScroll(element) {
2070
- return {
2071
- scrollLeft: element.scrollLeft,
2072
- scrollTop: element.scrollTop
2073
- };
2074
- }
2075
-
2076
- function getNodeScroll(node) {
2077
- if (node === getWindow(node) || !isHTMLElement(node)) {
2078
- return getWindowScroll(node);
2079
- } else {
2080
- return getHTMLElementScroll(node);
2081
- }
2082
- }
2083
-
2084
- function isElementScaled(element) {
2085
- var rect = element.getBoundingClientRect();
2086
- var scaleX = round(rect.width) / element.offsetWidth || 1;
2087
- var scaleY = round(rect.height) / element.offsetHeight || 1;
2088
- return scaleX !== 1 || scaleY !== 1;
2089
- }
2090
-
2091
- function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2092
- if (isFixed === void 0) {
2093
- isFixed = false;
2094
- }
2095
- var isOffsetParentAnElement = isHTMLElement(offsetParent);
2096
- var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
2097
- var documentElement = getDocumentElement(offsetParent);
2098
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
2099
- var scroll = {
1879
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1880
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1881
+ const documentElement = getDocumentElement(offsetParent);
1882
+ const isFixed = strategy === "fixed";
1883
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1884
+ let scroll = {
2100
1885
  scrollLeft: 0,
2101
1886
  scrollTop: 0
2102
1887
  };
2103
- var offsets = {
2104
- x: 0,
2105
- y: 0
2106
- };
1888
+ const offsets = createCoords(0);
2107
1889
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2108
- if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
1890
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
2109
1891
  scroll = getNodeScroll(offsetParent);
2110
1892
  }
2111
- if (isHTMLElement(offsetParent)) {
2112
- offsets = getBoundingClientRect(offsetParent, true);
2113
- offsets.x += offsetParent.clientLeft;
2114
- offsets.y += offsetParent.clientTop;
1893
+ if (isOffsetParentAnElement) {
1894
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1895
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1896
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2115
1897
  } else if (documentElement) {
2116
1898
  offsets.x = getWindowScrollBarX(documentElement);
2117
1899
  }
@@ -2124,210 +1906,202 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
2124
1906
  };
2125
1907
  }
2126
1908
 
2127
- function order(modifiers) {
2128
- var map = new Map;
2129
- var visited = new Set;
2130
- var result = [];
2131
- modifiers.forEach((function(modifier) {
2132
- map.set(modifier.name, modifier);
2133
- }));
2134
- function sort(modifier) {
2135
- visited.add(modifier.name);
2136
- var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
2137
- requires.forEach((function(dep) {
2138
- if (!visited.has(dep)) {
2139
- var depModifier = map.get(dep);
2140
- if (depModifier) {
2141
- sort(depModifier);
2142
- }
2143
- }
2144
- }));
2145
- result.push(modifier);
1909
+ function getTrueOffsetParent(element, polyfill) {
1910
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
1911
+ return null;
2146
1912
  }
2147
- modifiers.forEach((function(modifier) {
2148
- if (!visited.has(modifier.name)) {
2149
- sort(modifier);
2150
- }
2151
- }));
2152
- return result;
1913
+ if (polyfill) {
1914
+ return polyfill(element);
1915
+ }
1916
+ return element.offsetParent;
2153
1917
  }
2154
1918
 
2155
- function orderModifiers(modifiers) {
2156
- var orderedModifiers = order(modifiers);
2157
- return modifierPhases.reduce((function(acc, phase) {
2158
- return acc.concat(orderedModifiers.filter((function(modifier) {
2159
- return modifier.phase === phase;
2160
- })));
2161
- }), []);
1919
+ function getOffsetParent(element, polyfill) {
1920
+ const window = getWindow(element);
1921
+ if (!isHTMLElement(element)) {
1922
+ return window;
1923
+ }
1924
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1925
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
1926
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1927
+ }
1928
+ if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
1929
+ return window;
1930
+ }
1931
+ return offsetParent || getContainingBlock(element) || window;
2162
1932
  }
2163
1933
 
2164
- function debounce(fn) {
2165
- var pending;
2166
- return function() {
2167
- if (!pending) {
2168
- pending = new Promise((function(resolve) {
2169
- Promise.resolve().then((function() {
2170
- pending = undefined;
2171
- resolve(fn());
2172
- }));
2173
- }));
1934
+ const getElementRects = async function(_ref) {
1935
+ let {reference: reference, floating: floating, strategy: strategy} = _ref;
1936
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1937
+ const getDimensionsFn = this.getDimensions;
1938
+ return {
1939
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
1940
+ floating: {
1941
+ x: 0,
1942
+ y: 0,
1943
+ ...await getDimensionsFn(floating)
2174
1944
  }
2175
- return pending;
2176
1945
  };
2177
- }
2178
-
2179
- function mergeByName(modifiers) {
2180
- var merged = modifiers.reduce((function(merged, current) {
2181
- var existing = merged[current.name];
2182
- merged[current.name] = existing ? Object.assign({}, existing, current, {
2183
- options: Object.assign({}, existing.options, current.options),
2184
- data: Object.assign({}, existing.data, current.data)
2185
- }) : current;
2186
- return merged;
2187
- }), {});
2188
- return Object.keys(merged).map((function(key) {
2189
- return merged[key];
2190
- }));
2191
- }
2192
-
2193
- var DEFAULT_OPTIONS = {
2194
- placement: "bottom",
2195
- modifiers: [],
2196
- strategy: "absolute"
2197
1946
  };
2198
1947
 
2199
- function areValidElements() {
2200
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2201
- args[_key] = arguments[_key];
2202
- }
2203
- return !args.some((function(element) {
2204
- return !(element && typeof element.getBoundingClientRect === "function");
2205
- }));
2206
- }
1948
+ function isRTL(element) {
1949
+ return getComputedStyle$1(element).direction === "rtl";
1950
+ }
1951
+
1952
+ const platform = {
1953
+ convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect,
1954
+ getDocumentElement: getDocumentElement,
1955
+ getClippingRect: getClippingRect,
1956
+ getOffsetParent: getOffsetParent,
1957
+ getElementRects: getElementRects,
1958
+ getClientRects: getClientRects,
1959
+ getDimensions: getDimensions,
1960
+ getScale: getScale,
1961
+ isElement: isElement,
1962
+ isRTL: isRTL
1963
+ };
2207
1964
 
2208
- function popperGenerator(generatorOptions) {
2209
- if (generatorOptions === void 0) {
2210
- generatorOptions = {};
1965
+ function observeMove(element, onMove) {
1966
+ let io = null;
1967
+ let timeoutId;
1968
+ const root = getDocumentElement(element);
1969
+ function cleanup() {
1970
+ clearTimeout(timeoutId);
1971
+ io && io.disconnect();
1972
+ io = null;
2211
1973
  }
2212
- var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
2213
- return function createPopper(reference, popper, options) {
2214
- if (options === void 0) {
2215
- options = defaultOptions;
1974
+ function refresh(skip, threshold) {
1975
+ if (skip === void 0) {
1976
+ skip = false;
2216
1977
  }
2217
- var state = {
2218
- placement: "bottom",
2219
- orderedModifiers: [],
2220
- options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
2221
- modifiersData: {},
2222
- elements: {
2223
- reference: reference,
2224
- popper: popper
2225
- },
2226
- attributes: {},
2227
- styles: {}
1978
+ if (threshold === void 0) {
1979
+ threshold = 1;
1980
+ }
1981
+ cleanup();
1982
+ const {left: left, top: top, width: width, height: height} = element.getBoundingClientRect();
1983
+ if (!skip) {
1984
+ onMove();
1985
+ }
1986
+ if (!width || !height) {
1987
+ return;
1988
+ }
1989
+ const insetTop = floor(top);
1990
+ const insetRight = floor(root.clientWidth - (left + width));
1991
+ const insetBottom = floor(root.clientHeight - (top + height));
1992
+ const insetLeft = floor(left);
1993
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1994
+ const options = {
1995
+ rootMargin: rootMargin,
1996
+ threshold: max(0, min(1, threshold)) || 1
2228
1997
  };
2229
- var effectCleanupFns = [];
2230
- var isDestroyed = false;
2231
- var instance = {
2232
- state: state,
2233
- setOptions: function setOptions(setOptionsAction) {
2234
- var options = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
2235
- cleanupModifierEffects();
2236
- state.options = Object.assign({}, defaultOptions, state.options, options);
2237
- state.scrollParents = {
2238
- reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
2239
- popper: listScrollParents(popper)
2240
- };
2241
- var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers)));
2242
- state.orderedModifiers = orderedModifiers.filter((function(m) {
2243
- return m.enabled;
2244
- }));
2245
- runModifierEffects();
2246
- return instance.update();
2247
- },
2248
- forceUpdate: function forceUpdate() {
2249
- if (isDestroyed) {
2250
- return;
1998
+ let isFirstUpdate = true;
1999
+ function handleObserve(entries) {
2000
+ const ratio = entries[0].intersectionRatio;
2001
+ if (ratio !== threshold) {
2002
+ if (!isFirstUpdate) {
2003
+ return refresh();
2251
2004
  }
2252
- var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper;
2253
- if (!areValidElements(reference, popper)) {
2254
- return;
2255
- }
2256
- state.rects = {
2257
- reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === "fixed"),
2258
- popper: getLayoutRect(popper)
2259
- };
2260
- state.reset = false;
2261
- state.placement = state.options.placement;
2262
- state.orderedModifiers.forEach((function(modifier) {
2263
- return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
2264
- }));
2265
- for (var index = 0; index < state.orderedModifiers.length; index++) {
2266
- if (state.reset === true) {
2267
- state.reset = false;
2268
- index = -1;
2269
- continue;
2270
- }
2271
- var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
2272
- if (typeof fn === "function") {
2273
- state = fn({
2274
- state: state,
2275
- options: _options,
2276
- name: name,
2277
- instance: instance
2278
- }) || state;
2279
- }
2005
+ if (!ratio) {
2006
+ timeoutId = setTimeout((() => {
2007
+ refresh(false, 1e-7);
2008
+ }), 100);
2009
+ } else {
2010
+ refresh(false, ratio);
2280
2011
  }
2281
- },
2282
- update: debounce((function() {
2283
- return new Promise((function(resolve) {
2284
- instance.forceUpdate();
2285
- resolve(state);
2286
- }));
2287
- })),
2288
- destroy: function destroy() {
2289
- cleanupModifierEffects();
2290
- isDestroyed = true;
2291
2012
  }
2292
- };
2293
- if (!areValidElements(reference, popper)) {
2294
- return instance;
2013
+ isFirstUpdate = false;
2014
+ }
2015
+ try {
2016
+ io = new IntersectionObserver(handleObserve, {
2017
+ ...options,
2018
+ root: root.ownerDocument
2019
+ });
2020
+ } catch (e) {
2021
+ io = new IntersectionObserver(handleObserve, options);
2295
2022
  }
2296
- instance.setOptions(options).then((function(state) {
2297
- if (!isDestroyed && options.onFirstUpdate) {
2298
- options.onFirstUpdate(state);
2023
+ io.observe(element);
2024
+ }
2025
+ refresh(true);
2026
+ return cleanup;
2027
+ }
2028
+
2029
+ function autoUpdate(reference, floating, update, options) {
2030
+ if (options === void 0) {
2031
+ options = {};
2032
+ }
2033
+ const {ancestorScroll: ancestorScroll = true, ancestorResize: ancestorResize = true, elementResize: elementResize = typeof ResizeObserver === "function", layoutShift: layoutShift = typeof IntersectionObserver === "function", animationFrame: animationFrame = false} = options;
2034
+ const referenceEl = unwrapElement(reference);
2035
+ const ancestors = ancestorScroll || ancestorResize ? [ ...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating) ] : [];
2036
+ ancestors.forEach((ancestor => {
2037
+ ancestorScroll && ancestor.addEventListener("scroll", update, {
2038
+ passive: true
2039
+ });
2040
+ ancestorResize && ancestor.addEventListener("resize", update);
2041
+ }));
2042
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2043
+ let reobserveFrame = -1;
2044
+ let resizeObserver = null;
2045
+ if (elementResize) {
2046
+ resizeObserver = new ResizeObserver((_ref => {
2047
+ let [firstEntry] = _ref;
2048
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
2049
+ resizeObserver.unobserve(floating);
2050
+ cancelAnimationFrame(reobserveFrame);
2051
+ reobserveFrame = requestAnimationFrame((() => {
2052
+ resizeObserver && resizeObserver.observe(floating);
2053
+ }));
2299
2054
  }
2055
+ update();
2300
2056
  }));
2301
- function runModifierEffects() {
2302
- state.orderedModifiers.forEach((function(_ref) {
2303
- var name = _ref.name, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options, effect = _ref.effect;
2304
- if (typeof effect === "function") {
2305
- var cleanupFn = effect({
2306
- state: state,
2307
- name: name,
2308
- instance: instance,
2309
- options: options
2310
- });
2311
- var noopFn = function noopFn() {};
2312
- effectCleanupFns.push(cleanupFn || noopFn);
2313
- }
2314
- }));
2057
+ if (referenceEl && !animationFrame) {
2058
+ resizeObserver.observe(referenceEl);
2315
2059
  }
2316
- function cleanupModifierEffects() {
2317
- effectCleanupFns.forEach((function(fn) {
2318
- return fn();
2319
- }));
2320
- effectCleanupFns = [];
2060
+ resizeObserver.observe(floating);
2061
+ }
2062
+ let frameId;
2063
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2064
+ if (animationFrame) {
2065
+ frameLoop();
2066
+ }
2067
+ function frameLoop() {
2068
+ const nextRefRect = getBoundingClientRect(reference);
2069
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2070
+ update();
2071
+ }
2072
+ prevRefRect = nextRefRect;
2073
+ frameId = requestAnimationFrame(frameLoop);
2074
+ }
2075
+ update();
2076
+ return () => {
2077
+ ancestors.forEach((ancestor => {
2078
+ ancestorScroll && ancestor.removeEventListener("scroll", update);
2079
+ ancestorResize && ancestor.removeEventListener("resize", update);
2080
+ }));
2081
+ cleanupIo && cleanupIo();
2082
+ resizeObserver && resizeObserver.disconnect();
2083
+ resizeObserver = null;
2084
+ if (animationFrame) {
2085
+ cancelAnimationFrame(frameId);
2321
2086
  }
2322
- return instance;
2323
2087
  };
2324
2088
  }
2325
2089
 
2326
- var defaultModifiers = [ eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1 ];
2327
-
2328
- var createPopper = popperGenerator({
2329
- defaultModifiers: defaultModifiers
2330
- });
2090
+ const computePosition = (reference, floating, options) => {
2091
+ const cache = new Map;
2092
+ const mergedOptions = {
2093
+ platform: platform,
2094
+ ...options
2095
+ };
2096
+ const platformWithCache = {
2097
+ ...mergedOptions.platform,
2098
+ _c: cache
2099
+ };
2100
+ return computePosition$1(reference, floating, {
2101
+ ...mergedOptions,
2102
+ platform: platformWithCache
2103
+ });
2104
+ };
2331
2105
 
2332
2106
  class Popover extends Controller {
2333
2107
  static targets=[ "activator", "popover", "template" ];
@@ -2335,43 +2109,55 @@ class Popover extends Controller {
2335
2109
  static values={
2336
2110
  appendToBody: Boolean,
2337
2111
  placement: String,
2338
- active: Boolean
2112
+ active: Boolean,
2113
+ textFieldActivator: Boolean
2339
2114
  };
2340
2115
  connect() {
2341
- const popperOptions = {
2342
- placement: this.placementValue,
2343
- modifiers: [ {
2344
- name: "offset",
2345
- options: {
2346
- offset: [ 0, 5 ]
2347
- }
2348
- }, {
2349
- name: "flip",
2350
- options: {
2351
- allowedAutoPlacements: [ "top-start", "bottom-start", "top-end", "bottom-end" ]
2352
- }
2353
- } ]
2354
- };
2355
2116
  if (this.appendToBodyValue) {
2356
2117
  const clonedTemplate = this.templateTarget.content.cloneNode(true);
2357
2118
  this.target = clonedTemplate.firstElementChild;
2358
- popperOptions["strategy"] = "fixed";
2359
2119
  document.body.appendChild(clonedTemplate);
2360
2120
  }
2361
- this.popper = createPopper(this.activatorTarget, this.target, popperOptions);
2121
+ this.target.style.display = "none";
2362
2122
  if (this.activeValue) {
2363
2123
  this.show();
2364
2124
  }
2365
2125
  }
2366
- async toggle() {
2367
- this.target.classList.toggle(this.closedClass);
2368
- this.target.classList.toggle(this.openClass);
2369
- await this.popper.update();
2126
+ disconnect() {
2127
+ if (this.cleanup) {
2128
+ this.cleanup();
2129
+ }
2130
+ }
2131
+ updatePosition() {
2132
+ if (this.cleanup) {
2133
+ this.cleanup();
2134
+ }
2135
+ this.cleanup = autoUpdate(this.activator, this.target, (() => {
2136
+ computePosition(this.activator, this.target, {
2137
+ placement: this.placementValue,
2138
+ middleware: [ offset(5), flip(), shift({
2139
+ padding: 5
2140
+ }) ]
2141
+ }).then((({x: x, y: y}) => {
2142
+ Object.assign(this.target.style, {
2143
+ left: `${x}px`,
2144
+ top: `${y}px`
2145
+ });
2146
+ }));
2147
+ }));
2148
+ }
2149
+ toggle() {
2150
+ if (this.target.classList.contains(this.openClass)) {
2151
+ this.forceHide();
2152
+ } else {
2153
+ this.show();
2154
+ }
2370
2155
  }
2371
- async show() {
2156
+ show() {
2157
+ this.target.style.display = "block";
2372
2158
  this.target.classList.remove(this.closedClass);
2373
2159
  this.target.classList.add(this.openClass);
2374
- await this.popper.update();
2160
+ this.updatePosition();
2375
2161
  }
2376
2162
  hide(event) {
2377
2163
  if (this.element.contains(event.target)) return;
@@ -2380,9 +2166,17 @@ class Popover extends Controller {
2380
2166
  this.forceHide();
2381
2167
  }
2382
2168
  forceHide() {
2169
+ this.target.style.display = "none";
2383
2170
  this.target.classList.remove(this.openClass);
2384
2171
  this.target.classList.add(this.closedClass);
2385
2172
  }
2173
+ get activator() {
2174
+ if (this.textFieldActivatorValue) {
2175
+ return this.activatorTarget.querySelector('[data-controller="polaris-text-field"]');
2176
+ } else {
2177
+ return this.activatorTarget;
2178
+ }
2179
+ }
2386
2180
  get target() {
2387
2181
  if (this.hasPopoverTarget) {
2388
2182
  return this.popoverTarget;
@@ -2497,6 +2291,16 @@ class TextField extends Controller {
2497
2291
  this.inputTarget.dispatchEvent(new Event("change"));
2498
2292
  }
2499
2293
  }
2294
+ clearErrorMessages() {
2295
+ const wrapper = this.inputTarget.parentElement;
2296
+ const inlineError = this.inputTarget.closest(".polaris-text-field-wrapper").querySelector(".Polaris-InlineError");
2297
+ if (wrapper) {
2298
+ wrapper.classList.remove("Polaris-TextField--error");
2299
+ }
2300
+ if (inlineError) {
2301
+ inlineError.remove();
2302
+ }
2303
+ }
2500
2304
  increase() {
2501
2305
  this.changeNumber(1);
2502
2306
  }
@@ -2622,42 +2426,56 @@ class Tooltip extends Controller {
2622
2426
  active: Boolean,
2623
2427
  position: String
2624
2428
  };
2625
- initialize() {
2626
- this.shownTooltip = null;
2627
- }
2628
- getOffset() {
2629
- switch (this.positionValue) {
2630
- case "bottom":
2631
- return [ 0, 8 ];
2632
-
2633
- case "right":
2634
- return [ 0, 6 ];
2635
-
2636
- default:
2637
- return [ 0, 8 ];
2638
- }
2639
- }
2640
2429
  show(event) {
2641
2430
  if (!this.activeValue) return;
2642
- const popperOptions = {
2643
- placement: this.positionValue,
2644
- modifiers: [ {
2645
- name: "offset",
2646
- options: {
2647
- offset: this.getOffset()
2648
- }
2649
- } ]
2650
- };
2651
2431
  const element = event.currentTarget;
2652
2432
  let tooltip = document.createElement("span");
2653
2433
  tooltip.className = "Polaris-Tooltip";
2654
2434
  tooltip.innerHTML = this.templateTarget.innerHTML;
2655
- this.shownTooltip = element.appendChild(tooltip);
2656
- this.popper = createPopper(element, this.shownTooltip, popperOptions);
2435
+ this.tooltip = element.appendChild(tooltip);
2436
+ const arrowElement = element.querySelector("[data-tooltip-arrow]");
2437
+ computePosition(element, this.tooltip, {
2438
+ placement: this.positionValue,
2439
+ middleware: [ offset(this.offsetValue), flip(), shift({
2440
+ padding: 5
2441
+ }), arrow({
2442
+ element: arrowElement
2443
+ }) ]
2444
+ }).then((({x: x, y: y, placement: placement, middlewareData: middlewareData}) => {
2445
+ Object.assign(this.tooltip.style, {
2446
+ left: `${x}px`,
2447
+ top: `${y}px`
2448
+ });
2449
+ const {x: arrowX, y: arrowY} = middlewareData.arrow;
2450
+ const staticSide = {
2451
+ top: "bottom",
2452
+ right: "left",
2453
+ bottom: "top",
2454
+ left: "right"
2455
+ }[placement.split("-")[0]];
2456
+ Object.assign(arrowElement.style, {
2457
+ left: arrowX != null ? `${arrowX}px` : "",
2458
+ top: arrowY != null ? `${arrowY}px` : "",
2459
+ right: "",
2460
+ bottom: "",
2461
+ [staticSide]: "-4px"
2462
+ });
2463
+ }));
2657
2464
  }
2658
2465
  hide() {
2659
- if (this.shownTooltip) {
2660
- this.shownTooltip.remove();
2466
+ if (this.tooltip) {
2467
+ this.tooltip.remove();
2468
+ }
2469
+ }
2470
+ get offsetValue() {
2471
+ switch (this.positionValue) {
2472
+ case "top":
2473
+ case "bottom":
2474
+ case "left":
2475
+ return 8;
2476
+
2477
+ case "right":
2478
+ return 6;
2661
2479
  }
2662
2480
  }
2663
2481
  }