@zonos/elements 1.3.286 → 1.3.288

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (657) hide show
  1. package/README.md +9 -1
  2. package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
  3. package/dist/cjs/{cart-0cf8897b.js → cart-CV4buPlT.js} +17 -27
  4. package/dist/cjs/{collect-79131e52.js → collect-jzWKzrV7.js} +17 -113
  5. package/dist/cjs/debounce-5sZmmlCI.js +9 -0
  6. package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
  7. package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
  8. package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
  9. package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
  10. package/dist/cjs/{getMissingRequiredShippingFields-a8f04267.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
  11. package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
  12. package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
  13. package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
  14. package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
  15. package/dist/cjs/index.cjs.js +17 -21
  16. package/dist/cjs/{invoice-254ae23b.js → invoice-CHw-mJdS.js} +6 -6
  17. package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
  18. package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
  19. package/dist/cjs/loader.cjs.js +3 -5
  20. package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
  21. package/dist/cjs/{paypal-8ca67278.js → paypal-BLuHeOJH.js} +10 -9
  22. package/dist/cjs/{placeTestOrder-12b63822.js → placeTestOrder-VK_CMeq0.js} +3 -3
  23. package/dist/cjs/{renderCheckoutCurrency-a1f71587.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
  24. package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
  25. package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
  26. package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
  27. package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
  28. package/dist/cjs/throttle-BcxGntLr.js +87 -0
  29. package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
  30. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
  31. package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
  32. package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
  33. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
  34. package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
  35. package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
  36. package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
  37. package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
  38. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +85 -83
  39. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
  40. package/dist/cjs/zonos-checkout.cjs.entry.js +50 -34
  41. package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
  42. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
  43. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
  44. package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
  45. package/dist/cjs/zonos-component.cjs.entry.js +3 -6
  46. package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
  47. package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
  48. package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
  49. package/dist/cjs/zonos-elements.cjs.js +7 -7
  50. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
  51. package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
  52. package/dist/cjs/zonos-input.cjs.entry.js +10 -11
  53. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
  54. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
  55. package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
  56. package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
  57. package/dist/cjs/zonos-link.cjs.entry.js +3 -6
  58. package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
  59. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
  60. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
  61. package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
  62. package/dist/cjs/zonos-text.cjs.entry.js +8 -11
  63. package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
  64. package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
  65. package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
  66. package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
  69. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
  70. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
  71. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
  72. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
  73. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -4
  74. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
  75. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
  76. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
  77. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
  78. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
  79. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +18 -14
  80. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
  81. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
  82. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
  83. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
  84. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
  85. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
  86. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
  87. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  88. package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +7 -4
  89. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
  90. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
  91. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
  92. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
  93. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
  94. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
  95. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  96. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
  97. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
  98. package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
  99. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
  100. package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
  101. package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
  102. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
  103. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
  104. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  105. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
  106. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
  107. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  108. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
  109. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
  110. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
  111. package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
  112. package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
  113. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
  114. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
  115. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
  116. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
  117. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
  118. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
  119. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
  120. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
  121. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
  122. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
  123. package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
  124. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
  125. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  126. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
  127. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
  128. package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
  129. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
  130. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
  131. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
  132. package/dist/collection/components/main/zonos-controller.js +18 -10
  133. package/dist/collection/components/store/checkout/stripe.js +1 -1
  134. package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
  135. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
  136. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
  137. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
  138. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
  139. package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
  140. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
  141. package/dist/collection/scripts/cart/_setupCartData.js +2 -2
  142. package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
  143. package/dist/collection/types/generated/graphql.internal.types.js +5 -0
  144. package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
  145. package/dist/esm/{cart-d04742f5.js → cart-ekBk_gxV.js} +18 -28
  146. package/dist/esm/{collect-4c310a16.js → collect-33rMINDo.js} +17 -113
  147. package/dist/esm/debounce-D4ko2kvZ.js +403 -0
  148. package/dist/esm/debounce-DWPsxJsW.js +7 -0
  149. package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
  150. package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
  151. package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
  152. package/dist/esm/{getMissingRequiredShippingFields-f0878e32.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
  153. package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
  154. package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
  155. package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
  156. package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
  157. package/dist/esm/index.js +20 -22
  158. package/dist/esm/{invoice-86487dac.js → invoice-BNDWuVsD.js} +6 -6
  159. package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
  160. package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
  161. package/dist/esm/loader.js +4 -4
  162. package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
  163. package/dist/esm/{paypal-997935ab.js → paypal-CW1D2XqZ.js} +10 -9
  164. package/dist/esm/{placeTestOrder-a53f2056.js → placeTestOrder-nhmsLLOA.js} +3 -3
  165. package/dist/esm/{renderCheckoutCurrency-e0e16eb7.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
  166. package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  167. package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
  168. package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
  169. package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
  170. package/dist/esm/throttle-D5GyA3yr.js +85 -0
  171. package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
  172. package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
  173. package/dist/esm/zonos-address-display_2.entry.js +13 -15
  174. package/dist/esm/zonos-address_4.entry.js +50 -38
  175. package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
  176. package/dist/esm/zonos-badge.entry.js +7 -8
  177. package/dist/esm/zonos-banner.entry.js +6 -7
  178. package/dist/esm/zonos-button_3.entry.js +18 -19
  179. package/dist/esm/zonos-card_5.entry.js +34 -33
  180. package/dist/esm/zonos-cart-items_12.entry.js +85 -81
  181. package/dist/esm/zonos-checkbox_2.entry.js +10 -12
  182. package/dist/esm/zonos-checkout.entry.js +50 -32
  183. package/dist/esm/zonos-collapse.entry.js +5 -6
  184. package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
  185. package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
  186. package/dist/esm/zonos-collect.entry.js +20 -21
  187. package/dist/esm/zonos-component.entry.js +3 -4
  188. package/dist/esm/zonos-controller.entry.js +13 -14
  189. package/dist/esm/zonos-country-flag.entry.js +8 -9
  190. package/dist/esm/zonos-country-select_4.entry.js +68 -55
  191. package/dist/esm/zonos-elements.js +6 -5
  192. package/dist/esm/zonos-hello-dialog.entry.js +22 -21
  193. package/dist/esm/zonos-hello.entry.js +19 -15
  194. package/dist/esm/zonos-input.entry.js +10 -9
  195. package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
  196. package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
  197. package/dist/esm/zonos-invoice.entry.js +19 -20
  198. package/dist/esm/zonos-language-select_2.entry.js +11 -13
  199. package/dist/esm/zonos-link.entry.js +3 -4
  200. package/dist/esm/zonos-logo.entry.js +6 -7
  201. package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
  202. package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
  203. package/dist/esm/zonos-stripe-input.entry.js +15 -12
  204. package/dist/esm/zonos-text.entry.js +8 -9
  205. package/dist/esm/zonos-tooltip.entry.js +4 -5
  206. package/dist/esm/zonos-v-stack.entry.js +6 -7
  207. package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
  208. package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
  209. package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
  210. package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
  211. package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
  212. package/dist/esm-es5/classes-BJHSB96f.js +10 -0
  213. package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
  214. package/dist/esm-es5/collect-33rMINDo.js +241 -0
  215. package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
  216. package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
  217. package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
  218. package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
  219. package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
  220. package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
  221. package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
  222. package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
  223. package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
  224. package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
  225. package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
  226. package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
  227. package/dist/esm-es5/index-_lt63o7c.js +162 -0
  228. package/dist/esm-es5/index.js +227 -1
  229. package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
  230. package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
  231. package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
  232. package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
  233. package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
  234. package/dist/esm-es5/loader.js +1 -1
  235. package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
  236. package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
  237. package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
  238. package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
  239. package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  240. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
  241. package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
  242. package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
  243. package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
  244. package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
  245. package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
  246. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
  247. package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
  248. package/dist/esm-es5/zonos-address_4.entry.js +179 -1
  249. package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
  250. package/dist/esm-es5/zonos-badge.entry.js +25 -1
  251. package/dist/esm-es5/zonos-banner.entry.js +7 -1
  252. package/dist/esm-es5/zonos-button_3.entry.js +116 -1
  253. package/dist/esm-es5/zonos-card_5.entry.js +33 -1
  254. package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
  255. package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
  256. package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
  257. package/dist/esm-es5/zonos-collapse.entry.js +15 -1
  258. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
  259. package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
  260. package/dist/esm-es5/zonos-collect.entry.js +171 -1
  261. package/dist/esm-es5/zonos-component.entry.js +10 -1
  262. package/dist/esm-es5/zonos-controller.entry.js +198 -1
  263. package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
  264. package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
  265. package/dist/esm-es5/zonos-elements.js +4 -1
  266. package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
  267. package/dist/esm-es5/zonos-hello.entry.js +121 -1
  268. package/dist/esm-es5/zonos-input.entry.js +16 -1
  269. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
  270. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
  271. package/dist/esm-es5/zonos-invoice.entry.js +115 -1
  272. package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
  273. package/dist/esm-es5/zonos-link.entry.js +4 -1
  274. package/dist/esm-es5/zonos-logo.entry.js +7 -1
  275. package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
  276. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
  277. package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
  278. package/dist/esm-es5/zonos-text.entry.js +24 -1
  279. package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
  280. package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
  281. package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
  282. package/dist/scripts/index.d.ts +1171 -521
  283. package/dist/scripts/index.js +1 -1
  284. package/dist/scripts/loadZonos.js +1 -1
  285. package/dist/scripts/zonos.js +1 -1
  286. package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
  287. package/dist/types/__tests__/vitest-globals.d.ts +1 -0
  288. package/dist/types/components/store/checkout/cart.d.ts +9 -9
  289. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
  290. package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
  291. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
  292. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
  293. package/dist/types/components.d.ts +797 -147
  294. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +127 -127
  295. package/dist/types/stencil-public-runtime.d.ts +205 -12
  296. package/dist/types/types/generated/graphql.frontend.types.d.ts +60 -60
  297. package/dist/types/types/generated/graphql.frontend.types.ts +55 -55
  298. package/dist/types/types/generated/graphql.internal.types.d.ts +1290 -1285
  299. package/dist/types/types/generated/graphql.internal.types.ts +1113 -1108
  300. package/dist/zonos-elements/index.esm.js +1 -1
  301. package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
  302. package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
  303. package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
  304. package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
  305. package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
  306. package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
  307. package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
  308. package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
  309. package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
  310. package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
  311. package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
  312. package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
  313. package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
  314. package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
  315. package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
  316. package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
  317. package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
  318. package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
  319. package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
  320. package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
  321. package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
  322. package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
  323. package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
  325. package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
  326. package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
  327. package/dist/zonos-elements/p-6f742021.entry.js +1 -0
  328. package/dist/zonos-elements/p-7681798d.entry.js +1 -0
  329. package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
  330. package/dist/zonos-elements/{p-6de2f9c9.entry.js → p-7ae48e31.entry.js} +1 -1
  331. package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
  332. package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
  333. package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
  334. package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
  335. package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
  336. package/dist/zonos-elements/p-9818f823.entry.js +1 -0
  337. package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
  338. package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
  339. package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
  340. package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
  341. package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
  342. package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
  343. package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
  344. package/dist/zonos-elements/p-BJufDgh3.js +1 -0
  345. package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
  346. package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
  347. package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
  348. package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
  349. package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
  350. package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
  351. package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
  352. package/dist/zonos-elements/p-BtMauqj_.system.js +227 -0
  353. package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
  354. package/dist/zonos-elements/p-C19J2XSh.js +1 -0
  355. package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
  356. package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
  357. package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
  358. package/dist/zonos-elements/p-CICjAi70.js +1 -0
  359. package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
  360. package/dist/zonos-elements/{p-344a6278.js → p-CJCoACvU.js} +2 -2
  361. package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
  362. package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
  363. package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
  364. package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
  365. package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
  366. package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
  367. package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
  368. package/dist/zonos-elements/p-CaAod213.system.js +8 -0
  369. package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
  370. package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
  371. package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
  372. package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
  373. package/dist/zonos-elements/p-D0erXw7p.js +1 -0
  374. package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
  375. package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
  376. package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
  377. package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
  378. package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
  379. package/dist/zonos-elements/{p-a4c7ee17.js → p-DHwpNxG9.js} +1 -1
  380. package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
  381. package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
  382. package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
  383. package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
  384. package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
  385. package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
  386. package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
  387. package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
  388. package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
  389. package/dist/zonos-elements/p-LypTHRUC.js +1 -0
  390. package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
  391. package/dist/zonos-elements/p-YdrG78th.js +1 -0
  392. package/dist/zonos-elements/p-_lt63o7c.js +3 -0
  393. package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
  394. package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
  395. package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
  396. package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
  397. package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
  398. package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
  399. package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
  400. package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
  401. package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
  402. package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
  403. package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
  404. package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
  405. package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
  406. package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
  407. package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
  408. package/dist/zonos-elements/{p-5d110c2b.entry.js → p-d4c4a00e.entry.js} +1 -1
  409. package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
  410. package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
  411. package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
  412. package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
  413. package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
  414. package/dist/zonos-elements/{p-5227aa69.entry.js → p-e9320825.entry.js} +1 -1
  415. package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
  416. package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
  417. package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
  418. package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
  419. package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
  420. package/dist/zonos-elements/p-f6ba59f6.system.entry.js +171 -0
  421. package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
  422. package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
  423. package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
  424. package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
  425. package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
  426. package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
  427. package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
  428. package/dist/zonos-elements/p-pfIceXbY.js +1 -0
  429. package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
  430. package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
  431. package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
  432. package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
  433. package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
  434. package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
  435. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  436. package/dist/zonos-elements/zonos-elements.js +1 -1
  437. package/loader/index.d.ts +1 -1
  438. package/package.json +28 -32
  439. package/dist/cjs/RemoveIcon-081ac073.js +0 -5
  440. package/dist/cjs/debounce-7ca3c878.js +0 -357
  441. package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
  442. package/dist/cjs/throttle-366c204b.js +0 -76
  443. package/dist/cjs/zonosStore-0af0b937.js +0 -3030
  444. package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
  445. package/dist/esm/debounce-84ade9c2.js +0 -355
  446. package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
  447. package/dist/esm/throttle-c4c24e86.js +0 -74
  448. package/dist/esm/zonosStore-eca1e364.js +0 -3017
  449. package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
  450. package/dist/esm-es5/cart-d04742f5.js +0 -1
  451. package/dist/esm-es5/classes-0d95c529.js +0 -1
  452. package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
  453. package/dist/esm-es5/collect-4c310a16.js +0 -1
  454. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
  455. package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
  456. package/dist/esm-es5/debounce-84ade9c2.js +0 -1
  457. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
  458. package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
  459. package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
  460. package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
  461. package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +0 -1
  462. package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
  463. package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
  464. package/dist/esm-es5/helpers-2f6955b1.js +0 -1
  465. package/dist/esm-es5/index-cfd394c8.js +0 -13
  466. package/dist/esm-es5/invoice-86487dac.js +0 -1
  467. package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
  468. package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
  469. package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
  470. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
  471. package/dist/esm-es5/localization-36a4dc22.js +0 -1
  472. package/dist/esm-es5/paypal-997935ab.js +0 -17
  473. package/dist/esm-es5/placeTestOrder-a53f2056.js +0 -1
  474. package/dist/esm-es5/renderCheckoutCurrency-e0e16eb7.js +0 -1
  475. package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
  476. package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
  477. package/dist/esm-es5/styles-6fc2fad9.js +0 -1
  478. package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
  479. package/dist/esm-es5/throttle-c4c24e86.js +0 -1
  480. package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
  481. package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
  482. package/dist/zonos-elements/p-01174496.system.js +0 -1
  483. package/dist/zonos-elements/p-06f798ee.system.js +0 -1
  484. package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
  485. package/dist/zonos-elements/p-08e7107d.js +0 -1
  486. package/dist/zonos-elements/p-0b29169b.js +0 -1
  487. package/dist/zonos-elements/p-0c327a57.system.entry.js +0 -1
  488. package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
  489. package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
  490. package/dist/zonos-elements/p-0ff845ec.js +0 -1
  491. package/dist/zonos-elements/p-117953db.system.entry.js +0 -1
  492. package/dist/zonos-elements/p-14afffa8.system.js +0 -1
  493. package/dist/zonos-elements/p-1834f486.js +0 -1
  494. package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
  495. package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
  496. package/dist/zonos-elements/p-1b8771bb.js +0 -1
  497. package/dist/zonos-elements/p-1cdd27ec.js +0 -1
  498. package/dist/zonos-elements/p-1cfb5c2a.system.entry.js +0 -1
  499. package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
  500. package/dist/zonos-elements/p-23e7c655.system.js +0 -1
  501. package/dist/zonos-elements/p-2670438c.system.js +0 -1
  502. package/dist/zonos-elements/p-27660512.js +0 -1
  503. package/dist/zonos-elements/p-277b77e3.js +0 -1
  504. package/dist/zonos-elements/p-278abdcf.entry.js +0 -1
  505. package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
  506. package/dist/zonos-elements/p-2b97f7ed.js +0 -1
  507. package/dist/zonos-elements/p-2bbe9d91.js +0 -1
  508. package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
  509. package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
  510. package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
  511. package/dist/zonos-elements/p-398d9022.system.js +0 -1
  512. package/dist/zonos-elements/p-3a26e5e7.system.entry.js +0 -1
  513. package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
  514. package/dist/zonos-elements/p-40af92a1.system.entry.js +0 -1
  515. package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
  516. package/dist/zonos-elements/p-41f1697a.system.entry.js +0 -1
  517. package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
  518. package/dist/zonos-elements/p-490d7fec.system.entry.js +0 -1
  519. package/dist/zonos-elements/p-4941c096.system.entry.js +0 -1
  520. package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
  521. package/dist/zonos-elements/p-502d6eeb.js +0 -1
  522. package/dist/zonos-elements/p-50d088f7.system.entry.js +0 -1
  523. package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
  524. package/dist/zonos-elements/p-551fa762.system.js +0 -1
  525. package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
  526. package/dist/zonos-elements/p-60832726.system.js +0 -1
  527. package/dist/zonos-elements/p-67426156.system.js +0 -1
  528. package/dist/zonos-elements/p-6890e060.system.js +0 -1
  529. package/dist/zonos-elements/p-6eaf7c9e.system.entry.js +0 -1
  530. package/dist/zonos-elements/p-7176f582.entry.js +0 -1
  531. package/dist/zonos-elements/p-7261e245.system.js +0 -13
  532. package/dist/zonos-elements/p-7352abe9.js +0 -1
  533. package/dist/zonos-elements/p-74230da8.system.js +0 -1
  534. package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
  535. package/dist/zonos-elements/p-77993ba1.entry.js +0 -1
  536. package/dist/zonos-elements/p-78f8e594.entry.js +0 -1
  537. package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
  538. package/dist/zonos-elements/p-7b525c75.system.js +0 -1
  539. package/dist/zonos-elements/p-7f688485.system.entry.js +0 -1
  540. package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
  541. package/dist/zonos-elements/p-8861d47e.js +0 -1
  542. package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
  543. package/dist/zonos-elements/p-8a6c4017.js +0 -1
  544. package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
  545. package/dist/zonos-elements/p-8d14cb66.entry.js +0 -1
  546. package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
  547. package/dist/zonos-elements/p-916228fb.system.js +0 -1
  548. package/dist/zonos-elements/p-944c1fb3.entry.js +0 -1
  549. package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
  550. package/dist/zonos-elements/p-96ab529e.entry.js +0 -1
  551. package/dist/zonos-elements/p-998975a3.system.js +0 -18
  552. package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
  553. package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
  554. package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
  555. package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
  556. package/dist/zonos-elements/p-a553e132.js +0 -1
  557. package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
  558. package/dist/zonos-elements/p-af19722c.system.js +0 -1
  559. package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
  560. package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
  561. package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
  562. package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
  563. package/dist/zonos-elements/p-c0af11fe.system.js +0 -1
  564. package/dist/zonos-elements/p-c112fa12.system.entry.js +0 -1
  565. package/dist/zonos-elements/p-c4321a1a.system.js +0 -1
  566. package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
  567. package/dist/zonos-elements/p-c7329333.entry.js +0 -1
  568. package/dist/zonos-elements/p-c756a59d.system.js +0 -1
  569. package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
  570. package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
  571. package/dist/zonos-elements/p-ce75b047.js +0 -2
  572. package/dist/zonos-elements/p-d1a51fac.js +0 -1
  573. package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
  574. package/dist/zonos-elements/p-d75726e5.system.entry.js +0 -1
  575. package/dist/zonos-elements/p-d938f42f.system.js +0 -1
  576. package/dist/zonos-elements/p-dd866ca3.system.entry.js +0 -1
  577. package/dist/zonos-elements/p-dd8a7bf4.entry.js +0 -1
  578. package/dist/zonos-elements/p-de58684b.system.js +0 -1
  579. package/dist/zonos-elements/p-e160b75f.js +0 -1
  580. package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
  581. package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
  582. package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
  583. package/dist/zonos-elements/p-e4dc24e1.system.js +0 -1
  584. package/dist/zonos-elements/p-e5865ad9.system.js +0 -1
  585. package/dist/zonos-elements/p-e7d7afda.entry.js +0 -1
  586. package/dist/zonos-elements/p-ebbda085.system.js +0 -1
  587. package/dist/zonos-elements/p-f4720b0a.js +0 -1
  588. package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
  589. package/dist/zonos-elements/p-f9346f1c.entry.js +0 -1
  590. package/dist/zonos-elements/p-fc5f6113.js +0 -1
  591. package/dist/zonos-elements/p-fe28dbe6.entry.js +0 -1
  592. package/loader/package.json +0 -11
  593. /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
  594. /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
  595. /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
  596. /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
  597. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  598. /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
  599. /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
  600. /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
  601. /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
  602. /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
  603. /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
  604. /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
  605. /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
  606. /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
  607. /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
  608. /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
  609. /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
  610. /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
  611. /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  612. /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  613. /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
  614. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  615. /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
  616. /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
  617. /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
  618. /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
  619. /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
  620. /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
  621. /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  622. /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  623. /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
  624. /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  625. /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
  626. /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
  627. /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
  628. /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  629. /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  630. /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  631. /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  632. /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  633. /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  634. /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
  635. /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
  636. /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
  637. /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
  638. /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
  639. /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
  640. /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
  641. /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
  642. /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
  643. /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
  644. /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
  645. /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
  646. /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
  647. /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
  648. /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
  649. /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
  650. /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
  651. /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  652. /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
  653. /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
  654. /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
  655. /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
  656. /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
  657. /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
@@ -1,1202 +0,0 @@
1
- 'use strict';
2
-
3
- const zonosStore = require('./zonosStore-0af0b937.js');
4
-
5
- var tinycolor$1 = {exports: {}};
6
-
7
- (function (module, exports) {
8
- // This file is autogenerated. It's used to publish CJS to npm.
9
- (function (global, factory) {
10
- module.exports = factory() ;
11
- })(zonosStore.commonjsGlobal, (function () {
12
- function _typeof(obj) {
13
- "@babel/helpers - typeof";
14
-
15
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
16
- return typeof obj;
17
- } : function (obj) {
18
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
19
- }, _typeof(obj);
20
- }
21
-
22
- // https://github.com/bgrins/TinyColor
23
- // Brian Grinstead, MIT License
24
-
25
- var trimLeft = /^\s+/;
26
- var trimRight = /\s+$/;
27
- function tinycolor(color, opts) {
28
- color = color ? color : "";
29
- opts = opts || {};
30
-
31
- // If input is already a tinycolor, return itself
32
- if (color instanceof tinycolor) {
33
- return color;
34
- }
35
- // If we are called as a function, call using new instead
36
- if (!(this instanceof tinycolor)) {
37
- return new tinycolor(color, opts);
38
- }
39
- var rgb = inputToRGB(color);
40
- this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
41
- this._gradientType = opts.gradientType;
42
-
43
- // Don't let the range of [0,255] come back in [0,1].
44
- // Potentially lose a little bit of precision here, but will fix issues where
45
- // .5 gets interpreted as half of the total, instead of half of 1
46
- // If it was supposed to be 128, this was already taken care of by `inputToRgb`
47
- if (this._r < 1) this._r = Math.round(this._r);
48
- if (this._g < 1) this._g = Math.round(this._g);
49
- if (this._b < 1) this._b = Math.round(this._b);
50
- this._ok = rgb.ok;
51
- }
52
- tinycolor.prototype = {
53
- isDark: function isDark() {
54
- return this.getBrightness() < 128;
55
- },
56
- isLight: function isLight() {
57
- return !this.isDark();
58
- },
59
- isValid: function isValid() {
60
- return this._ok;
61
- },
62
- getOriginalInput: function getOriginalInput() {
63
- return this._originalInput;
64
- },
65
- getFormat: function getFormat() {
66
- return this._format;
67
- },
68
- getAlpha: function getAlpha() {
69
- return this._a;
70
- },
71
- getBrightness: function getBrightness() {
72
- //http://www.w3.org/TR/AERT#color-contrast
73
- var rgb = this.toRgb();
74
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
75
- },
76
- getLuminance: function getLuminance() {
77
- //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
78
- var rgb = this.toRgb();
79
- var RsRGB, GsRGB, BsRGB, R, G, B;
80
- RsRGB = rgb.r / 255;
81
- GsRGB = rgb.g / 255;
82
- BsRGB = rgb.b / 255;
83
- if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
84
- if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
85
- if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
86
- return 0.2126 * R + 0.7152 * G + 0.0722 * B;
87
- },
88
- setAlpha: function setAlpha(value) {
89
- this._a = boundAlpha(value);
90
- this._roundA = Math.round(100 * this._a) / 100;
91
- return this;
92
- },
93
- toHsv: function toHsv() {
94
- var hsv = rgbToHsv(this._r, this._g, this._b);
95
- return {
96
- h: hsv.h * 360,
97
- s: hsv.s,
98
- v: hsv.v,
99
- a: this._a
100
- };
101
- },
102
- toHsvString: function toHsvString() {
103
- var hsv = rgbToHsv(this._r, this._g, this._b);
104
- var h = Math.round(hsv.h * 360),
105
- s = Math.round(hsv.s * 100),
106
- v = Math.round(hsv.v * 100);
107
- return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
108
- },
109
- toHsl: function toHsl() {
110
- var hsl = rgbToHsl(this._r, this._g, this._b);
111
- return {
112
- h: hsl.h * 360,
113
- s: hsl.s,
114
- l: hsl.l,
115
- a: this._a
116
- };
117
- },
118
- toHslString: function toHslString() {
119
- var hsl = rgbToHsl(this._r, this._g, this._b);
120
- var h = Math.round(hsl.h * 360),
121
- s = Math.round(hsl.s * 100),
122
- l = Math.round(hsl.l * 100);
123
- return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
124
- },
125
- toHex: function toHex(allow3Char) {
126
- return rgbToHex(this._r, this._g, this._b, allow3Char);
127
- },
128
- toHexString: function toHexString(allow3Char) {
129
- return "#" + this.toHex(allow3Char);
130
- },
131
- toHex8: function toHex8(allow4Char) {
132
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
133
- },
134
- toHex8String: function toHex8String(allow4Char) {
135
- return "#" + this.toHex8(allow4Char);
136
- },
137
- toRgb: function toRgb() {
138
- return {
139
- r: Math.round(this._r),
140
- g: Math.round(this._g),
141
- b: Math.round(this._b),
142
- a: this._a
143
- };
144
- },
145
- toRgbString: function toRgbString() {
146
- return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
147
- },
148
- toPercentageRgb: function toPercentageRgb() {
149
- return {
150
- r: Math.round(bound01(this._r, 255) * 100) + "%",
151
- g: Math.round(bound01(this._g, 255) * 100) + "%",
152
- b: Math.round(bound01(this._b, 255) * 100) + "%",
153
- a: this._a
154
- };
155
- },
156
- toPercentageRgbString: function toPercentageRgbString() {
157
- return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
158
- },
159
- toName: function toName() {
160
- if (this._a === 0) {
161
- return "transparent";
162
- }
163
- if (this._a < 1) {
164
- return false;
165
- }
166
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
167
- },
168
- toFilter: function toFilter(secondColor) {
169
- var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
170
- var secondHex8String = hex8String;
171
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
172
- if (secondColor) {
173
- var s = tinycolor(secondColor);
174
- secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
175
- }
176
- return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
177
- },
178
- toString: function toString(format) {
179
- var formatSet = !!format;
180
- format = format || this._format;
181
- var formattedString = false;
182
- var hasAlpha = this._a < 1 && this._a >= 0;
183
- var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
184
- if (needsAlphaFormat) {
185
- // Special case for "transparent", all other non-alpha formats
186
- // will return rgba when there is transparency.
187
- if (format === "name" && this._a === 0) {
188
- return this.toName();
189
- }
190
- return this.toRgbString();
191
- }
192
- if (format === "rgb") {
193
- formattedString = this.toRgbString();
194
- }
195
- if (format === "prgb") {
196
- formattedString = this.toPercentageRgbString();
197
- }
198
- if (format === "hex" || format === "hex6") {
199
- formattedString = this.toHexString();
200
- }
201
- if (format === "hex3") {
202
- formattedString = this.toHexString(true);
203
- }
204
- if (format === "hex4") {
205
- formattedString = this.toHex8String(true);
206
- }
207
- if (format === "hex8") {
208
- formattedString = this.toHex8String();
209
- }
210
- if (format === "name") {
211
- formattedString = this.toName();
212
- }
213
- if (format === "hsl") {
214
- formattedString = this.toHslString();
215
- }
216
- if (format === "hsv") {
217
- formattedString = this.toHsvString();
218
- }
219
- return formattedString || this.toHexString();
220
- },
221
- clone: function clone() {
222
- return tinycolor(this.toString());
223
- },
224
- _applyModification: function _applyModification(fn, args) {
225
- var color = fn.apply(null, [this].concat([].slice.call(args)));
226
- this._r = color._r;
227
- this._g = color._g;
228
- this._b = color._b;
229
- this.setAlpha(color._a);
230
- return this;
231
- },
232
- lighten: function lighten() {
233
- return this._applyModification(_lighten, arguments);
234
- },
235
- brighten: function brighten() {
236
- return this._applyModification(_brighten, arguments);
237
- },
238
- darken: function darken() {
239
- return this._applyModification(_darken, arguments);
240
- },
241
- desaturate: function desaturate() {
242
- return this._applyModification(_desaturate, arguments);
243
- },
244
- saturate: function saturate() {
245
- return this._applyModification(_saturate, arguments);
246
- },
247
- greyscale: function greyscale() {
248
- return this._applyModification(_greyscale, arguments);
249
- },
250
- spin: function spin() {
251
- return this._applyModification(_spin, arguments);
252
- },
253
- _applyCombination: function _applyCombination(fn, args) {
254
- return fn.apply(null, [this].concat([].slice.call(args)));
255
- },
256
- analogous: function analogous() {
257
- return this._applyCombination(_analogous, arguments);
258
- },
259
- complement: function complement() {
260
- return this._applyCombination(_complement, arguments);
261
- },
262
- monochromatic: function monochromatic() {
263
- return this._applyCombination(_monochromatic, arguments);
264
- },
265
- splitcomplement: function splitcomplement() {
266
- return this._applyCombination(_splitcomplement, arguments);
267
- },
268
- // Disabled until https://github.com/bgrins/TinyColor/issues/254
269
- // polyad: function (number) {
270
- // return this._applyCombination(polyad, [number]);
271
- // },
272
- triad: function triad() {
273
- return this._applyCombination(polyad, [3]);
274
- },
275
- tetrad: function tetrad() {
276
- return this._applyCombination(polyad, [4]);
277
- }
278
- };
279
-
280
- // If input is an object, force 1 into "1.0" to handle ratios properly
281
- // String input requires "1.0" as input, so 1 will be treated as 1
282
- tinycolor.fromRatio = function (color, opts) {
283
- if (_typeof(color) == "object") {
284
- var newColor = {};
285
- for (var i in color) {
286
- if (color.hasOwnProperty(i)) {
287
- if (i === "a") {
288
- newColor[i] = color[i];
289
- } else {
290
- newColor[i] = convertToPercentage(color[i]);
291
- }
292
- }
293
- }
294
- color = newColor;
295
- }
296
- return tinycolor(color, opts);
297
- };
298
-
299
- // Given a string or object, convert that input to RGB
300
- // Possible string inputs:
301
- //
302
- // "red"
303
- // "#f00" or "f00"
304
- // "#ff0000" or "ff0000"
305
- // "#ff000000" or "ff000000"
306
- // "rgb 255 0 0" or "rgb (255, 0, 0)"
307
- // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
308
- // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
309
- // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
310
- // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
311
- // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
312
- // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
313
- //
314
- function inputToRGB(color) {
315
- var rgb = {
316
- r: 0,
317
- g: 0,
318
- b: 0
319
- };
320
- var a = 1;
321
- var s = null;
322
- var v = null;
323
- var l = null;
324
- var ok = false;
325
- var format = false;
326
- if (typeof color == "string") {
327
- color = stringInputToObject(color);
328
- }
329
- if (_typeof(color) == "object") {
330
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
331
- rgb = rgbToRgb(color.r, color.g, color.b);
332
- ok = true;
333
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
334
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
335
- s = convertToPercentage(color.s);
336
- v = convertToPercentage(color.v);
337
- rgb = hsvToRgb(color.h, s, v);
338
- ok = true;
339
- format = "hsv";
340
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
341
- s = convertToPercentage(color.s);
342
- l = convertToPercentage(color.l);
343
- rgb = hslToRgb(color.h, s, l);
344
- ok = true;
345
- format = "hsl";
346
- }
347
- if (color.hasOwnProperty("a")) {
348
- a = color.a;
349
- }
350
- }
351
- a = boundAlpha(a);
352
- return {
353
- ok: ok,
354
- format: color.format || format,
355
- r: Math.min(255, Math.max(rgb.r, 0)),
356
- g: Math.min(255, Math.max(rgb.g, 0)),
357
- b: Math.min(255, Math.max(rgb.b, 0)),
358
- a: a
359
- };
360
- }
361
-
362
- // Conversion Functions
363
- // --------------------
364
-
365
- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
366
- // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
367
-
368
- // `rgbToRgb`
369
- // Handle bounds / percentage checking to conform to CSS color spec
370
- // <http://www.w3.org/TR/css3-color/>
371
- // *Assumes:* r, g, b in [0, 255] or [0, 1]
372
- // *Returns:* { r, g, b } in [0, 255]
373
- function rgbToRgb(r, g, b) {
374
- return {
375
- r: bound01(r, 255) * 255,
376
- g: bound01(g, 255) * 255,
377
- b: bound01(b, 255) * 255
378
- };
379
- }
380
-
381
- // `rgbToHsl`
382
- // Converts an RGB color value to HSL.
383
- // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
384
- // *Returns:* { h, s, l } in [0,1]
385
- function rgbToHsl(r, g, b) {
386
- r = bound01(r, 255);
387
- g = bound01(g, 255);
388
- b = bound01(b, 255);
389
- var max = Math.max(r, g, b),
390
- min = Math.min(r, g, b);
391
- var h,
392
- s,
393
- l = (max + min) / 2;
394
- if (max == min) {
395
- h = s = 0; // achromatic
396
- } else {
397
- var d = max - min;
398
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
399
- switch (max) {
400
- case r:
401
- h = (g - b) / d + (g < b ? 6 : 0);
402
- break;
403
- case g:
404
- h = (b - r) / d + 2;
405
- break;
406
- case b:
407
- h = (r - g) / d + 4;
408
- break;
409
- }
410
- h /= 6;
411
- }
412
- return {
413
- h: h,
414
- s: s,
415
- l: l
416
- };
417
- }
418
-
419
- // `hslToRgb`
420
- // Converts an HSL color value to RGB.
421
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
422
- // *Returns:* { r, g, b } in the set [0, 255]
423
- function hslToRgb(h, s, l) {
424
- var r, g, b;
425
- h = bound01(h, 360);
426
- s = bound01(s, 100);
427
- l = bound01(l, 100);
428
- function hue2rgb(p, q, t) {
429
- if (t < 0) t += 1;
430
- if (t > 1) t -= 1;
431
- if (t < 1 / 6) return p + (q - p) * 6 * t;
432
- if (t < 1 / 2) return q;
433
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
434
- return p;
435
- }
436
- if (s === 0) {
437
- r = g = b = l; // achromatic
438
- } else {
439
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
440
- var p = 2 * l - q;
441
- r = hue2rgb(p, q, h + 1 / 3);
442
- g = hue2rgb(p, q, h);
443
- b = hue2rgb(p, q, h - 1 / 3);
444
- }
445
- return {
446
- r: r * 255,
447
- g: g * 255,
448
- b: b * 255
449
- };
450
- }
451
-
452
- // `rgbToHsv`
453
- // Converts an RGB color value to HSV
454
- // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
455
- // *Returns:* { h, s, v } in [0,1]
456
- function rgbToHsv(r, g, b) {
457
- r = bound01(r, 255);
458
- g = bound01(g, 255);
459
- b = bound01(b, 255);
460
- var max = Math.max(r, g, b),
461
- min = Math.min(r, g, b);
462
- var h,
463
- s,
464
- v = max;
465
- var d = max - min;
466
- s = max === 0 ? 0 : d / max;
467
- if (max == min) {
468
- h = 0; // achromatic
469
- } else {
470
- switch (max) {
471
- case r:
472
- h = (g - b) / d + (g < b ? 6 : 0);
473
- break;
474
- case g:
475
- h = (b - r) / d + 2;
476
- break;
477
- case b:
478
- h = (r - g) / d + 4;
479
- break;
480
- }
481
- h /= 6;
482
- }
483
- return {
484
- h: h,
485
- s: s,
486
- v: v
487
- };
488
- }
489
-
490
- // `hsvToRgb`
491
- // Converts an HSV color value to RGB.
492
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
493
- // *Returns:* { r, g, b } in the set [0, 255]
494
- function hsvToRgb(h, s, v) {
495
- h = bound01(h, 360) * 6;
496
- s = bound01(s, 100);
497
- v = bound01(v, 100);
498
- var i = Math.floor(h),
499
- f = h - i,
500
- p = v * (1 - s),
501
- q = v * (1 - f * s),
502
- t = v * (1 - (1 - f) * s),
503
- mod = i % 6,
504
- r = [v, q, p, p, t, v][mod],
505
- g = [t, v, v, q, p, p][mod],
506
- b = [p, p, t, v, v, q][mod];
507
- return {
508
- r: r * 255,
509
- g: g * 255,
510
- b: b * 255
511
- };
512
- }
513
-
514
- // `rgbToHex`
515
- // Converts an RGB color to hex
516
- // Assumes r, g, and b are contained in the set [0, 255]
517
- // Returns a 3 or 6 character hex
518
- function rgbToHex(r, g, b, allow3Char) {
519
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
520
-
521
- // Return a 3 character hex if possible
522
- if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
523
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
524
- }
525
- return hex.join("");
526
- }
527
-
528
- // `rgbaToHex`
529
- // Converts an RGBA color plus alpha transparency to hex
530
- // Assumes r, g, b are contained in the set [0, 255] and
531
- // a in [0, 1]. Returns a 4 or 8 character rgba hex
532
- function rgbaToHex(r, g, b, a, allow4Char) {
533
- var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
534
-
535
- // Return a 4 character hex if possible
536
- if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
537
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
538
- }
539
- return hex.join("");
540
- }
541
-
542
- // `rgbaToArgbHex`
543
- // Converts an RGBA color to an ARGB Hex8 string
544
- // Rarely used, but required for "toFilter()"
545
- function rgbaToArgbHex(r, g, b, a) {
546
- var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
547
- return hex.join("");
548
- }
549
-
550
- // `equals`
551
- // Can be called with any tinycolor input
552
- tinycolor.equals = function (color1, color2) {
553
- if (!color1 || !color2) return false;
554
- return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
555
- };
556
- tinycolor.random = function () {
557
- return tinycolor.fromRatio({
558
- r: Math.random(),
559
- g: Math.random(),
560
- b: Math.random()
561
- });
562
- };
563
-
564
- // Modification Functions
565
- // ----------------------
566
- // Thanks to less.js for some of the basics here
567
- // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
568
-
569
- function _desaturate(color, amount) {
570
- amount = amount === 0 ? 0 : amount || 10;
571
- var hsl = tinycolor(color).toHsl();
572
- hsl.s -= amount / 100;
573
- hsl.s = clamp01(hsl.s);
574
- return tinycolor(hsl);
575
- }
576
- function _saturate(color, amount) {
577
- amount = amount === 0 ? 0 : amount || 10;
578
- var hsl = tinycolor(color).toHsl();
579
- hsl.s += amount / 100;
580
- hsl.s = clamp01(hsl.s);
581
- return tinycolor(hsl);
582
- }
583
- function _greyscale(color) {
584
- return tinycolor(color).desaturate(100);
585
- }
586
- function _lighten(color, amount) {
587
- amount = amount === 0 ? 0 : amount || 10;
588
- var hsl = tinycolor(color).toHsl();
589
- hsl.l += amount / 100;
590
- hsl.l = clamp01(hsl.l);
591
- return tinycolor(hsl);
592
- }
593
- function _brighten(color, amount) {
594
- amount = amount === 0 ? 0 : amount || 10;
595
- var rgb = tinycolor(color).toRgb();
596
- rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
597
- rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
598
- rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
599
- return tinycolor(rgb);
600
- }
601
- function _darken(color, amount) {
602
- amount = amount === 0 ? 0 : amount || 10;
603
- var hsl = tinycolor(color).toHsl();
604
- hsl.l -= amount / 100;
605
- hsl.l = clamp01(hsl.l);
606
- return tinycolor(hsl);
607
- }
608
-
609
- // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
610
- // Values outside of this range will be wrapped into this range.
611
- function _spin(color, amount) {
612
- var hsl = tinycolor(color).toHsl();
613
- var hue = (hsl.h + amount) % 360;
614
- hsl.h = hue < 0 ? 360 + hue : hue;
615
- return tinycolor(hsl);
616
- }
617
-
618
- // Combination Functions
619
- // ---------------------
620
- // Thanks to jQuery xColor for some of the ideas behind these
621
- // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
622
-
623
- function _complement(color) {
624
- var hsl = tinycolor(color).toHsl();
625
- hsl.h = (hsl.h + 180) % 360;
626
- return tinycolor(hsl);
627
- }
628
- function polyad(color, number) {
629
- if (isNaN(number) || number <= 0) {
630
- throw new Error("Argument to polyad must be a positive number");
631
- }
632
- var hsl = tinycolor(color).toHsl();
633
- var result = [tinycolor(color)];
634
- var step = 360 / number;
635
- for (var i = 1; i < number; i++) {
636
- result.push(tinycolor({
637
- h: (hsl.h + i * step) % 360,
638
- s: hsl.s,
639
- l: hsl.l
640
- }));
641
- }
642
- return result;
643
- }
644
- function _splitcomplement(color) {
645
- var hsl = tinycolor(color).toHsl();
646
- var h = hsl.h;
647
- return [tinycolor(color), tinycolor({
648
- h: (h + 72) % 360,
649
- s: hsl.s,
650
- l: hsl.l
651
- }), tinycolor({
652
- h: (h + 216) % 360,
653
- s: hsl.s,
654
- l: hsl.l
655
- })];
656
- }
657
- function _analogous(color, results, slices) {
658
- results = results || 6;
659
- slices = slices || 30;
660
- var hsl = tinycolor(color).toHsl();
661
- var part = 360 / slices;
662
- var ret = [tinycolor(color)];
663
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
664
- hsl.h = (hsl.h + part) % 360;
665
- ret.push(tinycolor(hsl));
666
- }
667
- return ret;
668
- }
669
- function _monochromatic(color, results) {
670
- results = results || 6;
671
- var hsv = tinycolor(color).toHsv();
672
- var h = hsv.h,
673
- s = hsv.s,
674
- v = hsv.v;
675
- var ret = [];
676
- var modification = 1 / results;
677
- while (results--) {
678
- ret.push(tinycolor({
679
- h: h,
680
- s: s,
681
- v: v
682
- }));
683
- v = (v + modification) % 1;
684
- }
685
- return ret;
686
- }
687
-
688
- // Utility Functions
689
- // ---------------------
690
-
691
- tinycolor.mix = function (color1, color2, amount) {
692
- amount = amount === 0 ? 0 : amount || 50;
693
- var rgb1 = tinycolor(color1).toRgb();
694
- var rgb2 = tinycolor(color2).toRgb();
695
- var p = amount / 100;
696
- var rgba = {
697
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
698
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
699
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
700
- a: (rgb2.a - rgb1.a) * p + rgb1.a
701
- };
702
- return tinycolor(rgba);
703
- };
704
-
705
- // Readability Functions
706
- // ---------------------
707
- // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
708
-
709
- // `contrast`
710
- // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
711
- tinycolor.readability = function (color1, color2) {
712
- var c1 = tinycolor(color1);
713
- var c2 = tinycolor(color2);
714
- return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
715
- };
716
-
717
- // `isReadable`
718
- // Ensure that foreground and background color combinations meet WCAG2 guidelines.
719
- // The third argument is an optional Object.
720
- // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
721
- // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
722
- // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
723
-
724
- // *Example*
725
- // tinycolor.isReadable("#000", "#111") => false
726
- // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
727
- tinycolor.isReadable = function (color1, color2, wcag2) {
728
- var readability = tinycolor.readability(color1, color2);
729
- var wcag2Parms, out;
730
- out = false;
731
- wcag2Parms = validateWCAG2Parms(wcag2);
732
- switch (wcag2Parms.level + wcag2Parms.size) {
733
- case "AAsmall":
734
- case "AAAlarge":
735
- out = readability >= 4.5;
736
- break;
737
- case "AAlarge":
738
- out = readability >= 3;
739
- break;
740
- case "AAAsmall":
741
- out = readability >= 7;
742
- break;
743
- }
744
- return out;
745
- };
746
-
747
- // `mostReadable`
748
- // Given a base color and a list of possible foreground or background
749
- // colors for that base, returns the most readable color.
750
- // Optionally returns Black or White if the most readable color is unreadable.
751
- // *Example*
752
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
753
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
754
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
755
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
756
- tinycolor.mostReadable = function (baseColor, colorList, args) {
757
- var bestColor = null;
758
- var bestScore = 0;
759
- var readability;
760
- var includeFallbackColors, level, size;
761
- args = args || {};
762
- includeFallbackColors = args.includeFallbackColors;
763
- level = args.level;
764
- size = args.size;
765
- for (var i = 0; i < colorList.length; i++) {
766
- readability = tinycolor.readability(baseColor, colorList[i]);
767
- if (readability > bestScore) {
768
- bestScore = readability;
769
- bestColor = tinycolor(colorList[i]);
770
- }
771
- }
772
- if (tinycolor.isReadable(baseColor, bestColor, {
773
- level: level,
774
- size: size
775
- }) || !includeFallbackColors) {
776
- return bestColor;
777
- } else {
778
- args.includeFallbackColors = false;
779
- return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
780
- }
781
- };
782
-
783
- // Big List of Colors
784
- // ------------------
785
- // <https://www.w3.org/TR/css-color-4/#named-colors>
786
- var names = tinycolor.names = {
787
- aliceblue: "f0f8ff",
788
- antiquewhite: "faebd7",
789
- aqua: "0ff",
790
- aquamarine: "7fffd4",
791
- azure: "f0ffff",
792
- beige: "f5f5dc",
793
- bisque: "ffe4c4",
794
- black: "000",
795
- blanchedalmond: "ffebcd",
796
- blue: "00f",
797
- blueviolet: "8a2be2",
798
- brown: "a52a2a",
799
- burlywood: "deb887",
800
- burntsienna: "ea7e5d",
801
- cadetblue: "5f9ea0",
802
- chartreuse: "7fff00",
803
- chocolate: "d2691e",
804
- coral: "ff7f50",
805
- cornflowerblue: "6495ed",
806
- cornsilk: "fff8dc",
807
- crimson: "dc143c",
808
- cyan: "0ff",
809
- darkblue: "00008b",
810
- darkcyan: "008b8b",
811
- darkgoldenrod: "b8860b",
812
- darkgray: "a9a9a9",
813
- darkgreen: "006400",
814
- darkgrey: "a9a9a9",
815
- darkkhaki: "bdb76b",
816
- darkmagenta: "8b008b",
817
- darkolivegreen: "556b2f",
818
- darkorange: "ff8c00",
819
- darkorchid: "9932cc",
820
- darkred: "8b0000",
821
- darksalmon: "e9967a",
822
- darkseagreen: "8fbc8f",
823
- darkslateblue: "483d8b",
824
- darkslategray: "2f4f4f",
825
- darkslategrey: "2f4f4f",
826
- darkturquoise: "00ced1",
827
- darkviolet: "9400d3",
828
- deeppink: "ff1493",
829
- deepskyblue: "00bfff",
830
- dimgray: "696969",
831
- dimgrey: "696969",
832
- dodgerblue: "1e90ff",
833
- firebrick: "b22222",
834
- floralwhite: "fffaf0",
835
- forestgreen: "228b22",
836
- fuchsia: "f0f",
837
- gainsboro: "dcdcdc",
838
- ghostwhite: "f8f8ff",
839
- gold: "ffd700",
840
- goldenrod: "daa520",
841
- gray: "808080",
842
- green: "008000",
843
- greenyellow: "adff2f",
844
- grey: "808080",
845
- honeydew: "f0fff0",
846
- hotpink: "ff69b4",
847
- indianred: "cd5c5c",
848
- indigo: "4b0082",
849
- ivory: "fffff0",
850
- khaki: "f0e68c",
851
- lavender: "e6e6fa",
852
- lavenderblush: "fff0f5",
853
- lawngreen: "7cfc00",
854
- lemonchiffon: "fffacd",
855
- lightblue: "add8e6",
856
- lightcoral: "f08080",
857
- lightcyan: "e0ffff",
858
- lightgoldenrodyellow: "fafad2",
859
- lightgray: "d3d3d3",
860
- lightgreen: "90ee90",
861
- lightgrey: "d3d3d3",
862
- lightpink: "ffb6c1",
863
- lightsalmon: "ffa07a",
864
- lightseagreen: "20b2aa",
865
- lightskyblue: "87cefa",
866
- lightslategray: "789",
867
- lightslategrey: "789",
868
- lightsteelblue: "b0c4de",
869
- lightyellow: "ffffe0",
870
- lime: "0f0",
871
- limegreen: "32cd32",
872
- linen: "faf0e6",
873
- magenta: "f0f",
874
- maroon: "800000",
875
- mediumaquamarine: "66cdaa",
876
- mediumblue: "0000cd",
877
- mediumorchid: "ba55d3",
878
- mediumpurple: "9370db",
879
- mediumseagreen: "3cb371",
880
- mediumslateblue: "7b68ee",
881
- mediumspringgreen: "00fa9a",
882
- mediumturquoise: "48d1cc",
883
- mediumvioletred: "c71585",
884
- midnightblue: "191970",
885
- mintcream: "f5fffa",
886
- mistyrose: "ffe4e1",
887
- moccasin: "ffe4b5",
888
- navajowhite: "ffdead",
889
- navy: "000080",
890
- oldlace: "fdf5e6",
891
- olive: "808000",
892
- olivedrab: "6b8e23",
893
- orange: "ffa500",
894
- orangered: "ff4500",
895
- orchid: "da70d6",
896
- palegoldenrod: "eee8aa",
897
- palegreen: "98fb98",
898
- paleturquoise: "afeeee",
899
- palevioletred: "db7093",
900
- papayawhip: "ffefd5",
901
- peachpuff: "ffdab9",
902
- peru: "cd853f",
903
- pink: "ffc0cb",
904
- plum: "dda0dd",
905
- powderblue: "b0e0e6",
906
- purple: "800080",
907
- rebeccapurple: "663399",
908
- red: "f00",
909
- rosybrown: "bc8f8f",
910
- royalblue: "4169e1",
911
- saddlebrown: "8b4513",
912
- salmon: "fa8072",
913
- sandybrown: "f4a460",
914
- seagreen: "2e8b57",
915
- seashell: "fff5ee",
916
- sienna: "a0522d",
917
- silver: "c0c0c0",
918
- skyblue: "87ceeb",
919
- slateblue: "6a5acd",
920
- slategray: "708090",
921
- slategrey: "708090",
922
- snow: "fffafa",
923
- springgreen: "00ff7f",
924
- steelblue: "4682b4",
925
- tan: "d2b48c",
926
- teal: "008080",
927
- thistle: "d8bfd8",
928
- tomato: "ff6347",
929
- turquoise: "40e0d0",
930
- violet: "ee82ee",
931
- wheat: "f5deb3",
932
- white: "fff",
933
- whitesmoke: "f5f5f5",
934
- yellow: "ff0",
935
- yellowgreen: "9acd32"
936
- };
937
-
938
- // Make it easy to access colors via `hexNames[hex]`
939
- var hexNames = tinycolor.hexNames = flip(names);
940
-
941
- // Utilities
942
- // ---------
943
-
944
- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
945
- function flip(o) {
946
- var flipped = {};
947
- for (var i in o) {
948
- if (o.hasOwnProperty(i)) {
949
- flipped[o[i]] = i;
950
- }
951
- }
952
- return flipped;
953
- }
954
-
955
- // Return a valid alpha value [0,1] with all invalid values being set to 1
956
- function boundAlpha(a) {
957
- a = parseFloat(a);
958
- if (isNaN(a) || a < 0 || a > 1) {
959
- a = 1;
960
- }
961
- return a;
962
- }
963
-
964
- // Take input from [0, n] and return it as [0, 1]
965
- function bound01(n, max) {
966
- if (isOnePointZero(n)) n = "100%";
967
- var processPercent = isPercentage(n);
968
- n = Math.min(max, Math.max(0, parseFloat(n)));
969
-
970
- // Automatically convert percentage into number
971
- if (processPercent) {
972
- n = parseInt(n * max, 10) / 100;
973
- }
974
-
975
- // Handle floating point rounding errors
976
- if (Math.abs(n - max) < 0.000001) {
977
- return 1;
978
- }
979
-
980
- // Convert into [0, 1] range if it isn't already
981
- return n % max / parseFloat(max);
982
- }
983
-
984
- // Force a number between 0 and 1
985
- function clamp01(val) {
986
- return Math.min(1, Math.max(0, val));
987
- }
988
-
989
- // Parse a base-16 hex value into a base-10 integer
990
- function parseIntFromHex(val) {
991
- return parseInt(val, 16);
992
- }
993
-
994
- // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
995
- // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
996
- function isOnePointZero(n) {
997
- return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
998
- }
999
-
1000
- // Check to see if string passed in is a percentage
1001
- function isPercentage(n) {
1002
- return typeof n === "string" && n.indexOf("%") != -1;
1003
- }
1004
-
1005
- // Force a hex value to have 2 characters
1006
- function pad2(c) {
1007
- return c.length == 1 ? "0" + c : "" + c;
1008
- }
1009
-
1010
- // Replace a decimal with it's percentage value
1011
- function convertToPercentage(n) {
1012
- if (n <= 1) {
1013
- n = n * 100 + "%";
1014
- }
1015
- return n;
1016
- }
1017
-
1018
- // Converts a decimal to a hex value
1019
- function convertDecimalToHex(d) {
1020
- return Math.round(parseFloat(d) * 255).toString(16);
1021
- }
1022
- // Converts a hex value to a decimal
1023
- function convertHexToDecimal(h) {
1024
- return parseIntFromHex(h) / 255;
1025
- }
1026
- var matchers = function () {
1027
- // <http://www.w3.org/TR/css3-values/#integers>
1028
- var CSS_INTEGER = "[-\\+]?\\d+%?";
1029
-
1030
- // <http://www.w3.org/TR/css3-values/#number-value>
1031
- var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
1032
-
1033
- // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
1034
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
1035
-
1036
- // Actual matching.
1037
- // Parentheses and commas are optional, but not required.
1038
- // Whitespace can take the place of commas or opening paren
1039
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
1040
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
1041
- return {
1042
- CSS_UNIT: new RegExp(CSS_UNIT),
1043
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
1044
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
1045
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
1046
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
1047
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
1048
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
1049
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1050
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
1051
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1052
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
1053
- };
1054
- }();
1055
-
1056
- // `isValidCSSUnit`
1057
- // Take in a single string / number and check to see if it looks like a CSS unit
1058
- // (see `matchers` above for definition).
1059
- function isValidCSSUnit(color) {
1060
- return !!matchers.CSS_UNIT.exec(color);
1061
- }
1062
-
1063
- // `stringInputToObject`
1064
- // Permissive string parsing. Take in a number of formats, and output an object
1065
- // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
1066
- function stringInputToObject(color) {
1067
- color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
1068
- var named = false;
1069
- if (names[color]) {
1070
- color = names[color];
1071
- named = true;
1072
- } else if (color == "transparent") {
1073
- return {
1074
- r: 0,
1075
- g: 0,
1076
- b: 0,
1077
- a: 0,
1078
- format: "name"
1079
- };
1080
- }
1081
-
1082
- // Try to match string input using regular expressions.
1083
- // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
1084
- // Just return an object and let the conversion functions handle that.
1085
- // This way the result will be the same whether the tinycolor is initialized with string or object.
1086
- var match;
1087
- if (match = matchers.rgb.exec(color)) {
1088
- return {
1089
- r: match[1],
1090
- g: match[2],
1091
- b: match[3]
1092
- };
1093
- }
1094
- if (match = matchers.rgba.exec(color)) {
1095
- return {
1096
- r: match[1],
1097
- g: match[2],
1098
- b: match[3],
1099
- a: match[4]
1100
- };
1101
- }
1102
- if (match = matchers.hsl.exec(color)) {
1103
- return {
1104
- h: match[1],
1105
- s: match[2],
1106
- l: match[3]
1107
- };
1108
- }
1109
- if (match = matchers.hsla.exec(color)) {
1110
- return {
1111
- h: match[1],
1112
- s: match[2],
1113
- l: match[3],
1114
- a: match[4]
1115
- };
1116
- }
1117
- if (match = matchers.hsv.exec(color)) {
1118
- return {
1119
- h: match[1],
1120
- s: match[2],
1121
- v: match[3]
1122
- };
1123
- }
1124
- if (match = matchers.hsva.exec(color)) {
1125
- return {
1126
- h: match[1],
1127
- s: match[2],
1128
- v: match[3],
1129
- a: match[4]
1130
- };
1131
- }
1132
- if (match = matchers.hex8.exec(color)) {
1133
- return {
1134
- r: parseIntFromHex(match[1]),
1135
- g: parseIntFromHex(match[2]),
1136
- b: parseIntFromHex(match[3]),
1137
- a: convertHexToDecimal(match[4]),
1138
- format: named ? "name" : "hex8"
1139
- };
1140
- }
1141
- if (match = matchers.hex6.exec(color)) {
1142
- return {
1143
- r: parseIntFromHex(match[1]),
1144
- g: parseIntFromHex(match[2]),
1145
- b: parseIntFromHex(match[3]),
1146
- format: named ? "name" : "hex"
1147
- };
1148
- }
1149
- if (match = matchers.hex4.exec(color)) {
1150
- return {
1151
- r: parseIntFromHex(match[1] + "" + match[1]),
1152
- g: parseIntFromHex(match[2] + "" + match[2]),
1153
- b: parseIntFromHex(match[3] + "" + match[3]),
1154
- a: convertHexToDecimal(match[4] + "" + match[4]),
1155
- format: named ? "name" : "hex8"
1156
- };
1157
- }
1158
- if (match = matchers.hex3.exec(color)) {
1159
- return {
1160
- r: parseIntFromHex(match[1] + "" + match[1]),
1161
- g: parseIntFromHex(match[2] + "" + match[2]),
1162
- b: parseIntFromHex(match[3] + "" + match[3]),
1163
- format: named ? "name" : "hex"
1164
- };
1165
- }
1166
- return false;
1167
- }
1168
- function validateWCAG2Parms(parms) {
1169
- // return valid WCAG2 parms for isReadable.
1170
- // If input parms are invalid, return {"level":"AA", "size":"small"}
1171
- var level, size;
1172
- parms = parms || {
1173
- level: "AA",
1174
- size: "small"
1175
- };
1176
- level = (parms.level || "AA").toUpperCase();
1177
- size = (parms.size || "small").toLowerCase();
1178
- if (level !== "AA" && level !== "AAA") {
1179
- level = "AA";
1180
- }
1181
- if (size !== "small" && size !== "large") {
1182
- size = "small";
1183
- }
1184
- return {
1185
- level: level,
1186
- size: size
1187
- };
1188
- }
1189
-
1190
- return tinycolor;
1191
-
1192
- }));
1193
- }(tinycolor$1));
1194
-
1195
- const tinycolor = tinycolor$1.exports;
1196
-
1197
- const isDarkColor = (color) => {
1198
- return tinycolor(color).isDark();
1199
- };
1200
-
1201
- exports.isDarkColor = isDarkColor;
1202
- exports.tinycolor = tinycolor;