@magiclabs/ui-components 1.23.0 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/cjs/components/containers/card.js +1 -1
  2. package/dist/cjs/components/containers/card.js.map +1 -1
  3. package/dist/cjs/components/containers/drawer.js +1 -1
  4. package/dist/cjs/components/containers/drawer.js.map +1 -1
  5. package/dist/cjs/components/external/paypal-button.js +1 -1
  6. package/dist/cjs/components/external/paypal-button.js.map +1 -1
  7. package/dist/cjs/components/feedback/toast-provider.js +1 -1
  8. package/dist/cjs/components/feedback/toast-provider.js.map +1 -1
  9. package/dist/cjs/components/feedback/tooltip.js +1 -1
  10. package/dist/cjs/components/feedback/tooltip.js.map +1 -1
  11. package/dist/cjs/components/icons/ico-caret-down.js +1 -1
  12. package/dist/cjs/components/icons/ico-caret-down.js.map +1 -1
  13. package/dist/cjs/components/icons/ico-dedicated.js +1 -1
  14. package/dist/cjs/components/icons/ico-dedicated.js.map +1 -1
  15. package/dist/cjs/components/icons/ico-polygon-gas-testnet.js +2 -0
  16. package/dist/cjs/components/icons/ico-polygon-gas-testnet.js.map +1 -0
  17. package/dist/cjs/components/icons/ico-polygon-gas.js +2 -0
  18. package/dist/cjs/components/icons/ico-polygon-gas.js.map +1 -0
  19. package/dist/cjs/components/icons/ico-swap.js +1 -1
  20. package/dist/cjs/components/icons/ico-swap.js.map +1 -1
  21. package/dist/cjs/components/icons/ico-warning.js +1 -1
  22. package/dist/cjs/components/icons/ico-warning.js.map +1 -1
  23. package/dist/cjs/components/info/text-box.js +1 -1
  24. package/dist/cjs/components/info/text-box.js.map +1 -1
  25. package/dist/cjs/components/inputs/phone-input.js +1 -1
  26. package/dist/cjs/components/inputs/phone-input.js.map +1 -1
  27. package/dist/cjs/components/inputs/text-input.js +1 -1
  28. package/dist/cjs/components/inputs/text-input.js.map +1 -1
  29. package/dist/cjs/components/list-items/navigation-button.js +1 -1
  30. package/dist/cjs/components/list-items/navigation-button.js.map +1 -1
  31. package/dist/cjs/components/list-items/token-list-item.js +1 -1
  32. package/dist/cjs/components/list-items/token-list-item.js.map +1 -1
  33. package/dist/cjs/components/logos/blc-binance.js +1 -1
  34. package/dist/cjs/components/logos/blc-binance.js.map +1 -1
  35. package/dist/cjs/components/logos/blc-celo.js +1 -1
  36. package/dist/cjs/components/logos/blc-celo.js.map +1 -1
  37. package/dist/cjs/components/logos/blc-rarichain.js +1 -1
  38. package/dist/cjs/components/logos/blc-rarichain.js.map +1 -1
  39. package/dist/cjs/components/logos/blc-stability.js +1 -1
  40. package/dist/cjs/components/logos/blc-stability.js.map +1 -1
  41. package/dist/cjs/components/logos/icon-delete.js +2 -0
  42. package/dist/cjs/components/logos/icon-delete.js.map +1 -0
  43. package/dist/cjs/components/logos/icon-email-globe.js +2 -0
  44. package/dist/cjs/components/logos/icon-email-globe.js.map +1 -0
  45. package/dist/cjs/components/logos/icon-person-dark.js +2 -0
  46. package/dist/cjs/components/logos/icon-person-dark.js.map +1 -0
  47. package/dist/cjs/components/logos/icon-person.js +2 -0
  48. package/dist/cjs/components/logos/icon-person.js.map +1 -0
  49. package/dist/cjs/components/logos/icon-reset.js +2 -0
  50. package/dist/cjs/components/logos/icon-reset.js.map +1 -0
  51. package/dist/cjs/components/logos/icon-warning-shield.js +2 -0
  52. package/dist/cjs/components/logos/icon-warning-shield.js.map +1 -0
  53. package/dist/cjs/components/logos/icon-warning.js +2 -0
  54. package/dist/cjs/components/logos/icon-warning.js.map +1 -0
  55. package/dist/cjs/components/primitives/checkbox.js +1 -1
  56. package/dist/cjs/components/primitives/checkbox.js.map +1 -1
  57. package/dist/cjs/components/primitives/dropdown-selector.js +1 -1
  58. package/dist/cjs/components/primitives/dropdown-selector.js.map +1 -1
  59. package/dist/cjs/components/primitives/radio.js +1 -1
  60. package/dist/cjs/components/primitives/radio.js.map +1 -1
  61. package/dist/cjs/components/primitives/switch.js +1 -1
  62. package/dist/cjs/components/primitives/switch.js.map +1 -1
  63. package/dist/cjs/components/primitives/text.js +1 -1
  64. package/dist/cjs/components/primitives/text.js.map +1 -1
  65. package/dist/cjs/index.js +1 -1
  66. package/dist/cjs/recipes/callout.js +1 -1
  67. package/dist/cjs/recipes/callout.js.map +1 -1
  68. package/dist/cjs/recipes/card.js +1 -1
  69. package/dist/cjs/recipes/card.js.map +1 -1
  70. package/dist/cjs/recipes/text.js +1 -1
  71. package/dist/cjs/recipes/text.js.map +1 -1
  72. package/dist/cjs/styles/semantic-tokens.js +1 -1
  73. package/dist/cjs/styles/semantic-tokens.js.map +1 -1
  74. package/dist/es/components/containers/card.js +1 -1
  75. package/dist/es/components/containers/card.js.map +1 -1
  76. package/dist/es/components/containers/drawer.js +1 -1
  77. package/dist/es/components/containers/drawer.js.map +1 -1
  78. package/dist/es/components/external/paypal-button.js +1 -1
  79. package/dist/es/components/external/paypal-button.js.map +1 -1
  80. package/dist/es/components/feedback/toast-provider.js +1 -1
  81. package/dist/es/components/feedback/toast-provider.js.map +1 -1
  82. package/dist/es/components/feedback/tooltip.js +1 -1
  83. package/dist/es/components/feedback/tooltip.js.map +1 -1
  84. package/dist/es/components/icons/ico-caret-down.js +1 -1
  85. package/dist/es/components/icons/ico-caret-down.js.map +1 -1
  86. package/dist/es/components/icons/ico-dedicated.js +1 -1
  87. package/dist/es/components/icons/ico-dedicated.js.map +1 -1
  88. package/dist/es/components/icons/ico-polygon-gas-testnet.js +2 -0
  89. package/dist/es/components/icons/ico-polygon-gas-testnet.js.map +1 -0
  90. package/dist/es/components/icons/ico-polygon-gas.js +2 -0
  91. package/dist/es/components/icons/ico-polygon-gas.js.map +1 -0
  92. package/dist/es/components/icons/ico-swap.js +1 -1
  93. package/dist/es/components/icons/ico-swap.js.map +1 -1
  94. package/dist/es/components/icons/ico-warning.js +1 -1
  95. package/dist/es/components/icons/ico-warning.js.map +1 -1
  96. package/dist/es/components/info/text-box.js +1 -1
  97. package/dist/es/components/info/text-box.js.map +1 -1
  98. package/dist/es/components/inputs/phone-input.js +1 -1
  99. package/dist/es/components/inputs/phone-input.js.map +1 -1
  100. package/dist/es/components/inputs/text-input.js +1 -1
  101. package/dist/es/components/inputs/text-input.js.map +1 -1
  102. package/dist/es/components/layouts/dialogue.js +1 -1
  103. package/dist/es/components/layouts/error.js +1 -1
  104. package/dist/es/components/list-items/navigation-button.js +1 -1
  105. package/dist/es/components/list-items/navigation-button.js.map +1 -1
  106. package/dist/es/components/list-items/token-list-item.js +1 -1
  107. package/dist/es/components/list-items/token-list-item.js.map +1 -1
  108. package/dist/es/components/logos/blc-binance.js +1 -1
  109. package/dist/es/components/logos/blc-binance.js.map +1 -1
  110. package/dist/es/components/logos/blc-celo.js +1 -1
  111. package/dist/es/components/logos/blc-celo.js.map +1 -1
  112. package/dist/es/components/logos/blc-rarichain.js +1 -1
  113. package/dist/es/components/logos/blc-rarichain.js.map +1 -1
  114. package/dist/es/components/logos/blc-stability.js +1 -1
  115. package/dist/es/components/logos/blc-stability.js.map +1 -1
  116. package/dist/es/components/logos/icon-delete.js +2 -0
  117. package/dist/es/components/logos/icon-delete.js.map +1 -0
  118. package/dist/es/components/logos/icon-email-globe.js +2 -0
  119. package/dist/es/components/logos/icon-email-globe.js.map +1 -0
  120. package/dist/es/components/logos/icon-person-dark.js +2 -0
  121. package/dist/es/components/logos/icon-person-dark.js.map +1 -0
  122. package/dist/es/components/logos/icon-person.js +2 -0
  123. package/dist/es/components/logos/icon-person.js.map +1 -0
  124. package/dist/es/components/logos/icon-reset.js +2 -0
  125. package/dist/es/components/logos/icon-reset.js.map +1 -0
  126. package/dist/es/components/logos/icon-warning-shield.js +2 -0
  127. package/dist/es/components/logos/icon-warning-shield.js.map +1 -0
  128. package/dist/es/components/logos/icon-warning.js +2 -0
  129. package/dist/es/components/logos/icon-warning.js.map +1 -0
  130. package/dist/es/components/primitives/checkbox.js +1 -1
  131. package/dist/es/components/primitives/checkbox.js.map +1 -1
  132. package/dist/es/components/primitives/dropdown-selector.js +1 -1
  133. package/dist/es/components/primitives/dropdown-selector.js.map +1 -1
  134. package/dist/es/components/primitives/radio.js +1 -1
  135. package/dist/es/components/primitives/radio.js.map +1 -1
  136. package/dist/es/components/primitives/switch.js +1 -1
  137. package/dist/es/components/primitives/switch.js.map +1 -1
  138. package/dist/es/components/primitives/text.js +1 -1
  139. package/dist/es/components/primitives/text.js.map +1 -1
  140. package/dist/es/components/sections/verify-pincode.js +1 -1
  141. package/dist/es/index.js +1 -1
  142. package/dist/es/recipes/callout.js +1 -1
  143. package/dist/es/recipes/callout.js.map +1 -1
  144. package/dist/es/recipes/card.js +1 -1
  145. package/dist/es/recipes/card.js.map +1 -1
  146. package/dist/es/recipes/text.js +1 -1
  147. package/dist/es/recipes/text.js.map +1 -1
  148. package/dist/es/styles/semantic-tokens.js +1 -1
  149. package/dist/es/styles/semantic-tokens.js.map +1 -1
  150. package/dist/panda.buildinfo.json +1 -1
  151. package/dist/types/components/containers/card.d.ts +2 -0
  152. package/dist/types/components/containers/card.d.ts.map +1 -1
  153. package/dist/types/components/external/paypal-button.d.ts.map +1 -1
  154. package/dist/types/components/feedback/toast-provider.d.ts.map +1 -1
  155. package/dist/types/components/feedback/tooltip.d.ts +2 -0
  156. package/dist/types/components/feedback/tooltip.d.ts.map +1 -1
  157. package/dist/types/components/icons/ico-polygon-gas-testnet.d.ts +14 -0
  158. package/dist/types/components/icons/ico-polygon-gas-testnet.d.ts.map +1 -0
  159. package/dist/types/components/icons/{ico-loading-fill.d.ts → ico-polygon-gas.d.ts} +3 -3
  160. package/dist/types/components/icons/ico-polygon-gas.d.ts.map +1 -0
  161. package/dist/types/components/icons/index.d.ts +2 -1
  162. package/dist/types/components/icons/index.d.ts.map +1 -1
  163. package/dist/types/components/info/text-box.d.ts +1 -0
  164. package/dist/types/components/info/text-box.d.ts.map +1 -1
  165. package/dist/types/components/inputs/phone-input.d.ts.map +1 -1
  166. package/dist/types/components/list-items/token-list-item.d.ts.map +1 -1
  167. package/dist/types/components/logos/blc-binance.d.ts.map +1 -1
  168. package/dist/types/components/logos/blc-celo.d.ts.map +1 -1
  169. package/dist/types/components/logos/icon-delete.d.ts +10 -0
  170. package/dist/types/components/logos/icon-delete.d.ts.map +1 -0
  171. package/dist/types/components/logos/icon-email-globe.d.ts +10 -0
  172. package/dist/types/components/logos/icon-email-globe.d.ts.map +1 -0
  173. package/dist/types/components/logos/icon-person-dark.d.ts +10 -0
  174. package/dist/types/components/logos/icon-person-dark.d.ts.map +1 -0
  175. package/dist/types/components/logos/icon-person.d.ts +10 -0
  176. package/dist/types/components/logos/icon-person.d.ts.map +1 -0
  177. package/dist/types/components/logos/icon-reset.d.ts +10 -0
  178. package/dist/types/components/logos/icon-reset.d.ts.map +1 -0
  179. package/dist/types/components/logos/icon-warning-shield.d.ts +10 -0
  180. package/dist/types/components/logos/icon-warning-shield.d.ts.map +1 -0
  181. package/dist/types/components/logos/icon-warning.d.ts +10 -0
  182. package/dist/types/components/logos/icon-warning.d.ts.map +1 -0
  183. package/dist/types/components/logos/index.d.ts +7 -0
  184. package/dist/types/components/logos/index.d.ts.map +1 -1
  185. package/dist/types/components/primitives/checkbox.d.ts.map +1 -1
  186. package/dist/types/components/primitives/dropdown-selector.d.ts.map +1 -1
  187. package/dist/types/components/primitives/switch.d.ts.map +1 -1
  188. package/dist/types/components/primitives/text.d.ts +5 -0
  189. package/dist/types/components/primitives/text.d.ts.map +1 -1
  190. package/dist/types/recipes/callout.d.ts.map +1 -1
  191. package/dist/types/recipes/card.d.ts +11 -0
  192. package/dist/types/recipes/card.d.ts.map +1 -1
  193. package/dist/types/recipes/text.d.ts +0 -4
  194. package/dist/types/recipes/text.d.ts.map +1 -1
  195. package/dist/types/styles/semantic-tokens.d.ts +6 -0
  196. package/dist/types/styles/semantic-tokens.d.ts.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/cjs/components/icons/ico-loading-fill.js +0 -2
  199. package/dist/cjs/components/icons/ico-loading-fill.js.map +0 -1
  200. package/dist/es/components/icons/ico-loading-fill.js +0 -2
  201. package/dist/es/components/icons/ico-loading-fill.js.map +0 -1
  202. package/dist/types/components/icons/ico-loading-fill.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("react/jsx-runtime"),o=require("../../recipes/card.js"),n=require("@styled/css"),i=require("@styled/jsx"),x=require("react");const u=x.forwardRef(({children:e,className:a,asButton:r,stack:l,...d},s)=>{const c=o.card({asButton:r,...d});return l||r?t.jsx(i.Flex,{className:n.cx(c,a),flexDirection:"column",role:r?"button":"none",ref:s,children:e}):t.jsx(i.Box,{className:n.cx(c,a),ref:s,children:e})});u.displayName="Card",exports.Card=u;
1
+ "use strict";var e=require("react/jsx-runtime");require("../feedback/callout.js");var x=require("../feedback/loading-spinner.js");require("../feedback/progress-bar.js"),require("@styled/tokens"),require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js"),require("../primitives/text.js"),require("../primitives/portal.js");var v=require("react");require("../../hooks/useToast.js"),require("../../recipes/toast.js");var s=require("@styled/jsx");require("../feedback/tooltip.js");var f=require("../../recipes/card.js"),c=require("@styled/css");const t=v.forwardRef(({children:i,className:a,asButton:r,stack:l,onClick:o,validating:u,...d},n)=>{const q=f.card({asButton:r,validating:u,...d});return l||r?e.jsx(s.Flex,{className:c.cx(q,a),flexDirection:"column",role:r?"button":"none",onClick:r?o:void 0,ref:n,children:u?e.jsx(x.LoadingSpinner,{neutral:!0}):i}):e.jsx(s.Box,{className:c.cx(q,a),ref:n,children:i})});t.displayName="Card",exports.Card=t;
2
2
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../../../../src/components/containers/card.tsx"],"sourcesContent":["import { card } from '@recipes/card';\nimport { cx } from '@styled/css';\nimport { Box, Flex } from '@styled/jsx';\nimport { ComponentProps, forwardRef } from 'react';\n\nexport interface CardProps extends ComponentProps<'div'> {\n alt?: boolean;\n className?: string;\n asButton?: boolean;\n alignment?: 'center' | 'left' | 'right';\n expand?: boolean;\n gapType?: 'none' | 'sm' | 'md' | 'lg';\n heavyShadow?: boolean;\n paddingType?: 'none' | 'sm' | 'md' | 'lg';\n stack?: boolean;\n widthMax?: boolean;\n}\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(({ children, className, asButton, stack, ...props }, ref) => {\n const classStyles = card({ asButton, ...props });\n\n return stack || asButton ? (\n <Flex className={cx(classStyles, className)} flexDirection=\"column\" role={asButton ? 'button' : 'none'} ref={ref}>\n {children}\n </Flex>\n ) : (\n <Box className={cx(classStyles, className)} ref={ref}>\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n"],"names":["Card","forwardRef","children","className","asButton","stack","props","ref","classStyles","card","_jsx","Flex","cx","Box"],"mappings":"wJAkBa,MAAAA,EAAOC,EAAAA,WAAsC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,SAAAC,EAAU,MAAAC,EAAO,GAAGC,CAAO,EAAEC,IAAO,CACpH,MAAMC,EAAcC,OAAK,CAAE,SAAAL,EAAU,GAAGE,CAAO,CAAA,EAE/C,OAAOD,GAASD,EACdM,MAACC,EAAI,KAAA,CAAC,UAAWC,EAAAA,GAAGJ,EAAaL,CAAS,EAAG,cAAc,SAAS,KAAMC,EAAW,SAAW,OAAQ,IAAKG,EAC1G,SAAAL,CACI,CAAA,EAEPQ,EAAAA,IAACG,MAAG,CAAC,UAAWD,EAAAA,GAAGJ,EAAaL,CAAS,EAAG,IAAKI,EAAG,SACjDL,CAAQ,CAAA,CAGf,CAAC,EAEDF,EAAK,YAAc"}
1
+ {"version":3,"file":"card.js","sources":["../../../../src/components/containers/card.tsx"],"sourcesContent":["import { LoadingSpinner } from '@components/feedback';\nimport { card } from '@recipes/card';\nimport { cx } from '@styled/css';\nimport { Box, Flex } from '@styled/jsx';\nimport { ComponentProps, forwardRef } from 'react';\n\nexport interface CardProps extends ComponentProps<'div'> {\n alt?: boolean;\n className?: string;\n asButton?: boolean;\n alignment?: 'center' | 'left' | 'right';\n expand?: boolean;\n gapType?: 'none' | 'sm' | 'md' | 'lg';\n heavyShadow?: boolean;\n paddingType?: 'none' | 'sm' | 'md' | 'lg';\n stack?: boolean;\n widthMax?: boolean;\n disabled?: boolean;\n validating?: boolean;\n}\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n ({ children, className, asButton, stack, onClick, validating, ...props }, ref) => {\n const classStyles = card({ asButton, validating, ...props });\n\n return stack || asButton ? (\n <Flex\n className={cx(classStyles, className)}\n flexDirection=\"column\"\n role={asButton ? 'button' : 'none'}\n onClick={asButton ? onClick : undefined}\n ref={ref}\n >\n {validating ? <LoadingSpinner neutral /> : children}\n </Flex>\n ) : (\n <Box className={cx(classStyles, className)} ref={ref}>\n {children}\n </Box>\n );\n },\n);\n\nCard.displayName = 'Card';\n"],"names":["Card","forwardRef","children","className","asButton","stack","onClick","validating","props","ref","classStyles","card","_jsx","Flex","cx","LoadingSpinner","Box"],"mappings":"+uBAqBO,MAAMA,EAAOC,EAClB,WAAA,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,SAAAC,EAAU,MAAAC,EAAO,QAAAC,EAAS,WAAAC,EAAY,GAAGC,CAAO,EAAEC,IAAO,CAC/E,MAAMC,EAAcC,EAAK,KAAA,CAAE,SAAAP,EAAU,WAAAG,EAAY,GAAGC,CAAK,CAAE,EAE3D,OAAOH,GAASD,EACdQ,MAACC,EAAAA,MACC,UAAWC,EAAAA,GAAGJ,EAAaP,CAAS,EACpC,cAAc,SACd,KAAMC,EAAW,SAAW,OAC5B,QAASA,EAAWE,EAAU,OAC9B,IAAKG,EAEJ,SAAAF,EAAaK,MAACG,EAAAA,eAAc,CAAC,QAAU,EAAA,CAAA,EAAGb,IAG7CU,EAAAA,IAACI,EAAAA,IAAG,CAAC,UAAWF,EAAAA,GAAGJ,EAAaP,CAAS,EAAG,IAAKM,WAC9CP,CAAQ,CAAA,CAGf,CAAC,EAGHF,EAAK,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("@styled/tokens");var h=require("../icons/ico-caret-down.js"),l=require("../primitives/button.js");require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var q=require("../primitives/text.js"),i=require("@styled/jsx"),t=require("react");const j=({isOpen:r=!1,title:c,onToggle:s,children:d})=>{const[x,a]=t.useState(r),[b,u]=t.useState(r),o=t.useRef(null);t.useEffect(()=>{let n;return r?(a(!0),n=setTimeout(()=>u(!0),10)):u(!1),()=>clearTimeout(n)},[r]),t.useEffect(()=>{const n=m=>{o.current&&!o.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[s]);const f=()=>{r||a(!1)},p=t.useCallback(()=>{s(!1)},[s]);return e.jsxs(e.Fragment,{children:[e.jsx(i.Box,{position:"absolute",display:r?"block":"none",h:"full",bottom:0,left:0,right:0,bg:"text.primary/20",backdropFilter:"blur(3px)"}),x&&e.jsxs(i.Box,{ref:o,position:"absolute",transform:b?"translateY(0)":"translateY(100%)",transition:"transform 0.3s",bottom:0,left:0,right:0,bg:"surface.primary",rounded:"xl",boxShadow:"0px -12px 56px 0px rgba(119, 118, 122, 0.15)",onTransitionEnd:f,children:[e.jsxs(i.HStack,{justifyContent:"space-between",p:6,pb:5,children:[e.jsx(q.default,{styles:{fontWeight:"bold"},children:c}),e.jsx(l.default,{size:"sm",variant:"neutral",onPress:p,children:e.jsx(l.default.LeadingIcon,{children:e.jsx(h.default,{})})})]}),e.jsx(i.Box,{px:6,pb:8,children:d})]})]})};exports.Drawer=j;
1
+ "use strict";var e=require("react/jsx-runtime");require("@styled/tokens");var h=require("../icons/ico-caret-down.js"),l=require("../primitives/button.js");require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var q=require("../primitives/text.js"),i=require("@styled/jsx"),t=require("react");const j=({isOpen:r=!1,title:c,onToggle:s,children:d})=>{const[x,a]=t.useState(r),[b,u]=t.useState(r),o=t.useRef(null);t.useEffect(()=>{let n;return r?(a(!0),n=setTimeout(()=>u(!0),10)):u(!1),()=>clearTimeout(n)},[r]),t.useEffect(()=>{const n=m=>{o.current&&!o.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[s]);const f=()=>{r||a(!1)},p=t.useCallback(()=>{s(!1)},[s]);return e.jsxs(e.Fragment,{children:[e.jsx(i.Box,{position:"absolute",display:r?"block":"none",h:"full",bottom:0,left:0,right:0,bg:"text.primary/20",backdropFilter:"blur(3px)"}),x&&e.jsxs(i.Box,{ref:o,position:"absolute",transform:b?"translateY(0)":"translateY(100%)",transition:"transform 0.3s",bottom:0,left:0,right:0,bg:"surface.primary",rounded:"xl",boxShadow:"0px -12px 56px 0px rgba(119, 118, 122, 0.15)",onTransitionEnd:f,children:[e.jsxs(i.HStack,{justifyContent:"space-between",p:6,pb:5,children:[e.jsx(q.default,{fontWeight:"bold",children:c}),e.jsx(l.default,{size:"sm",variant:"neutral",onPress:p,children:e.jsx(l.default.LeadingIcon,{children:e.jsx(h.default,{})})})]}),e.jsx(i.Box,{px:6,pb:8,children:d})]})]})};exports.Drawer=j;
2
2
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sources":["../../../../src/components/containers/drawer.tsx"],"sourcesContent":["import { IcoCaretDown } from '@components/icons';\nimport { Button, Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface DrawerProps extends PropsWithChildren {\n onToggle: (isOpen: boolean) => void;\n isOpen: boolean;\n title?: string;\n}\n\nexport const Drawer = ({ isOpen = false, title, onToggle, children }: DrawerProps) => {\n const [shouldRender, setShouldRender] = useState(isOpen);\n const [isVisible, setIsVisible] = useState(isOpen);\n const drawerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let timeoutId: NodeJS.Timeout;\n\n if (isOpen) {\n setShouldRender(true);\n timeoutId = setTimeout(() => setIsVisible(true), 10);\n } else {\n setIsVisible(false);\n }\n\n return () => clearTimeout(timeoutId);\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (drawerRef.current && !drawerRef.current.contains(event.target as Node)) {\n onToggle(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [onToggle]);\n\n const handleTransitionEnd = () => {\n if (!isOpen) {\n setShouldRender(false);\n }\n };\n const handleClose = useCallback(() => {\n onToggle(false);\n }, [onToggle]);\n\n return (\n <>\n <Box\n position=\"absolute\"\n display={isOpen ? 'block' : 'none'}\n h=\"full\"\n bottom={0}\n left={0}\n right={0}\n bg=\"text.primary/20\"\n backdropFilter=\"blur(3px)\"\n />\n {shouldRender && (\n <Box\n ref={drawerRef}\n position=\"absolute\"\n transform={isVisible ? 'translateY(0)' : 'translateY(100%)'}\n transition=\"transform 0.3s\"\n bottom={0}\n left={0}\n right={0}\n bg=\"surface.primary\"\n rounded=\"xl\"\n boxShadow=\"0px -12px 56px 0px rgba(119, 118, 122, 0.15)\"\n onTransitionEnd={handleTransitionEnd}\n >\n <HStack justifyContent=\"space-between\" p={6} pb={5}>\n <Text styles={{ fontWeight: 'bold' }}>{title}</Text>\n <Button size=\"sm\" variant=\"neutral\" onPress={handleClose}>\n <Button.LeadingIcon>\n <IcoCaretDown />\n </Button.LeadingIcon>\n </Button>\n </HStack>\n <Box px={6} pb={8}>\n {children}\n </Box>\n </Box>\n )}\n </>\n );\n};\n"],"names":["Drawer","isOpen","title","onToggle","children","shouldRender","setShouldRender","useState","isVisible","setIsVisible","drawerRef","useRef","useEffect","timeoutId","handleClickOutside","event","handleTransitionEnd","handleClose","useCallback","_jsxs","_Fragment","_jsx","Box","HStack","Text","Button","IcoCaretDown"],"mappings":"wdAWa,MAAAA,EAAS,CAAC,CAAE,OAAAC,EAAS,GAAO,MAAAC,EAAO,SAAAC,EAAU,SAAAC,CAAQ,IAAmB,CACnF,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAASN,SAAAA,CAAM,EACjD,CAACO,EAAWC,CAAY,EAAIF,EAASN,SAAAA,CAAM,EAC3CS,EAAYC,EAAuB,OAAA,IAAI,EAE7CC,YAAU,IAAK,CACb,IAAIC,EAEJ,OAAIZ,GACFK,EAAgB,EAAI,EACpBO,EAAY,WAAW,IAAMJ,EAAa,EAAI,EAAG,EAAE,GAEnDA,EAAa,EAAK,EAGb,IAAM,aAAaI,CAAS,CACrC,EAAG,CAACZ,CAAM,CAAC,EAEXW,EAAAA,UAAU,IAAK,CACb,MAAME,EAAsBC,GAAqB,CAC3CL,EAAU,SAAW,CAACA,EAAU,QAAQ,SAASK,EAAM,MAAc,GACvEZ,EAAS,EAAK,CAElB,EAEA,OAAS,SAAA,iBAAiB,YAAaW,CAAkB,EAClD,IAAK,CACV,SAAS,oBAAoB,YAAaA,CAAkB,CAC9D,CACF,EAAG,CAACX,CAAQ,CAAC,EAEb,MAAMa,EAAsB,IAAK,CAC1Bf,GACHK,EAAgB,EAAK,CAEzB,EACMW,EAAcC,EAAAA,YAAY,IAAK,CACnCf,EAAS,EAAK,CAChB,EAAG,CAACA,CAAQ,CAAC,EAEb,OACEgB,EAAAA,KACEC,EAAAA,SAAA,CAAA,SAAA,CAAAC,MAACC,EAAAA,IACC,CAAA,SAAS,WACT,QAASrB,EAAS,QAAU,OAC5B,EAAE,OACF,OAAQ,EACR,KAAM,EACN,MAAO,EACP,GAAG,kBACH,eAAe,WAAW,CAAA,EAE3BI,GACCc,EAACG,KAAAA,EAAAA,KACC,IAAKZ,EACL,SAAS,WACT,UAAWF,EAAY,gBAAkB,mBACzC,WAAW,iBACX,OAAQ,EACR,KAAM,EACN,MAAO,EACP,GAAG,kBACH,QAAQ,KACR,UAAU,+CACV,gBAAiBQ,EAAmB,SAAA,CAEpCG,EAACI,KAAAA,SAAM,CAAC,eAAe,gBAAgB,EAAG,EAAG,GAAI,YAC/CF,EAAAA,IAACG,WAAK,OAAQ,CAAE,WAAY,MAAQ,EAAA,SAAGtB,CAAa,CAAA,EACpDmB,EAACI,IAAAA,WAAO,KAAK,KAAK,QAAQ,UAAU,QAASR,WAC3CI,EAAAA,IAACI,UAAO,YAAW,CAAA,SACjBJ,MAACK,EAAAA,QAAY,CAAA,CAAA,CACM,CAAA,CAAA,CAAA,CACd,IAEXL,EAACC,IAAAA,MAAI,CAAA,GAAI,EAAG,GAAI,WACblB,CAAQ,CAAA,CACL,GAET,CAAA,CAAA,CAGP"}
1
+ {"version":3,"file":"drawer.js","sources":["../../../../src/components/containers/drawer.tsx"],"sourcesContent":["import { IcoCaretDown } from '@components/icons';\nimport { Button, Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';\n\nexport interface DrawerProps extends PropsWithChildren {\n onToggle: (isOpen: boolean) => void;\n isOpen: boolean;\n title?: string;\n}\n\nexport const Drawer = ({ isOpen = false, title, onToggle, children }: DrawerProps) => {\n const [shouldRender, setShouldRender] = useState(isOpen);\n const [isVisible, setIsVisible] = useState(isOpen);\n const drawerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let timeoutId: NodeJS.Timeout;\n\n if (isOpen) {\n setShouldRender(true);\n timeoutId = setTimeout(() => setIsVisible(true), 10);\n } else {\n setIsVisible(false);\n }\n\n return () => clearTimeout(timeoutId);\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (drawerRef.current && !drawerRef.current.contains(event.target as Node)) {\n onToggle(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [onToggle]);\n\n const handleTransitionEnd = () => {\n if (!isOpen) {\n setShouldRender(false);\n }\n };\n const handleClose = useCallback(() => {\n onToggle(false);\n }, [onToggle]);\n\n return (\n <>\n <Box\n position=\"absolute\"\n display={isOpen ? 'block' : 'none'}\n h=\"full\"\n bottom={0}\n left={0}\n right={0}\n bg=\"text.primary/20\"\n backdropFilter=\"blur(3px)\"\n />\n {shouldRender && (\n <Box\n ref={drawerRef}\n position=\"absolute\"\n transform={isVisible ? 'translateY(0)' : 'translateY(100%)'}\n transition=\"transform 0.3s\"\n bottom={0}\n left={0}\n right={0}\n bg=\"surface.primary\"\n rounded=\"xl\"\n boxShadow=\"0px -12px 56px 0px rgba(119, 118, 122, 0.15)\"\n onTransitionEnd={handleTransitionEnd}\n >\n <HStack justifyContent=\"space-between\" p={6} pb={5}>\n <Text fontWeight=\"bold\">{title}</Text>\n <Button size=\"sm\" variant=\"neutral\" onPress={handleClose}>\n <Button.LeadingIcon>\n <IcoCaretDown />\n </Button.LeadingIcon>\n </Button>\n </HStack>\n <Box px={6} pb={8}>\n {children}\n </Box>\n </Box>\n )}\n </>\n );\n};\n"],"names":["Drawer","isOpen","title","onToggle","children","shouldRender","setShouldRender","useState","isVisible","setIsVisible","drawerRef","useRef","useEffect","timeoutId","handleClickOutside","event","handleTransitionEnd","handleClose","useCallback","_jsxs","_Fragment","_jsx","Box","HStack","Text","Button","IcoCaretDown"],"mappings":"wdAWa,MAAAA,EAAS,CAAC,CAAE,OAAAC,EAAS,GAAO,MAAAC,EAAO,SAAAC,EAAU,SAAAC,CAAQ,IAAmB,CACnF,KAAM,CAACC,EAAcC,CAAe,EAAIC,EAAAA,SAASN,CAAM,EACjD,CAACO,EAAWC,CAAY,EAAIF,EAAAA,SAASN,CAAM,EAC3CS,EAAYC,EAAAA,OAAuB,IAAI,EAE7CC,YAAU,IAAK,CACb,IAAIC,EAEJ,OAAIZ,GACFK,EAAgB,EAAI,EACpBO,EAAY,WAAW,IAAMJ,EAAa,EAAI,EAAG,EAAE,GAEnDA,EAAa,EAAK,EAGb,IAAM,aAAaI,CAAS,CACrC,EAAG,CAACZ,CAAM,CAAC,EAEXW,YAAU,IAAK,CACb,MAAME,EAAsBC,GAAqB,CAC3CL,EAAU,SAAW,CAACA,EAAU,QAAQ,SAASK,EAAM,MAAc,GACvEZ,EAAS,EAAK,CAElB,EAEA,OAAA,SAAS,iBAAiB,YAAaW,CAAkB,EAClD,IAAK,CACV,SAAS,oBAAoB,YAAaA,CAAkB,CAC9D,CACF,EAAG,CAACX,CAAQ,CAAC,EAEb,MAAMa,EAAsB,IAAK,CAC1Bf,GACHK,EAAgB,EAAK,CAEzB,EACMW,EAAcC,cAAY,IAAK,CACnCf,EAAS,EAAK,CAChB,EAAG,CAACA,CAAQ,CAAC,EAEb,OACEgB,EAAAA,KACEC,EAAA,SAAA,CAAA,SAAA,CAAAC,EAAAA,IAACC,EACC,IAAA,CAAA,SAAS,WACT,QAASrB,EAAS,QAAU,OAC5B,EAAE,OACF,OAAQ,EACR,KAAM,EACN,MAAO,EACP,GAAG,kBACH,eAAe,cAEhBI,GACCc,EAACG,KAAAA,EAAAA,IACC,CAAA,IAAKZ,EACL,SAAS,WACT,UAAWF,EAAY,gBAAkB,mBACzC,WAAW,iBACX,OAAQ,EACR,KAAM,EACN,MAAO,EACP,GAAG,kBACH,QAAQ,KACR,UAAU,+CACV,gBAAiBQ,EAEjB,SAAA,CAAAG,EAACI,KAAAA,SAAO,CAAA,eAAe,gBAAgB,EAAG,EAAG,GAAI,EAAC,SAAA,CAChDF,EAACG,IAAAA,EAAAA,SAAK,WAAW,OAAQ,SAAAtB,IACzBmB,EAACI,IAAAA,UAAM,CAAC,KAAK,KAAK,QAAQ,UAAU,QAASR,WAC3CI,EAAAA,IAACI,UAAO,YAAW,CAAA,SACjBJ,MAACK,EAAAA,QAAY,CAAA,CAAA,CACM,CAAA,CAAA,CAAA,CACd,IAEXL,EAACC,IAAAA,MAAI,CAAA,GAAI,EAAG,GAAI,WACblB,CAAQ,CAAA,CACL,GAET,CAAA,CAAA,CAGP"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("../feedback/callout.js");var b=require("../feedback/loading-spinner.js");require("../feedback/progress-bar.js");var g=require("@styled/tokens");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var h=require("../primitives/text.js");require("../primitives/portal.js");var s=require("react");require("../../hooks/useToast.js"),require("../../recipes/toast.js");var n=require("@styled/jsx");require("../feedback/tooltip.js");var j=require("../logos/logo-pay-pal-wordmark.js"),p=require("../../recipes/button.js"),o=require("@styled/css"),r=require("react-aria");const l=s.forwardRef((i,d)=>{const{disabled:t,expand:c,validating:u}=i,q=p.button({expand:c,validating:u}),f=s.useRef(null),a=d||f,{buttonProps:v}=r.useButton({...i,isDisabled:t??!1},a),{isFocusVisible:x,focusProps:P}=r.useFocusRing();return e.jsx("button",{className:o.cx(q.button,o.css({bg:"#ffc439",outlineColor:"#ffc439",outlineWidth:"thick",outlineOffset:.5,outlineStyle:x?"solid":"none"})),ref:a,...r.mergeProps(v,P),"aria-disabled":t,children:u?e.jsx(b.LoadingSpinner,{size:24,strokeWidth:2.5,inverted:!0}):e.jsxs(n.HStack,{w:"full",gap:1,justifyContent:"center",children:[e.jsx(h.default,{styles:{fontWeight:600,color:g.token("colors.ink.90")},children:"Pay with"}),e.jsx(n.Box,{mt:.5,children:e.jsx(j.default,{width:60})})]})})});l.displayName="PayPalButton",exports.PayPalButton=l;
1
+ "use strict";var e=require("react/jsx-runtime");require("../feedback/callout.js");var b=require("../feedback/loading-spinner.js");require("../feedback/progress-bar.js");var g=require("@styled/tokens");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var h=require("../primitives/text.js");require("../primitives/portal.js");var s=require("react");require("../../hooks/useToast.js"),require("../../recipes/toast.js");var n=require("@styled/jsx");require("../feedback/tooltip.js");var j=require("../logos/logo-pay-pal-wordmark.js"),p=require("../../recipes/button.js"),o=require("@styled/css"),r=require("react-aria");const l=s.forwardRef((i,d)=>{const{disabled:t,expand:c,validating:u}=i,q=p.button({expand:c,validating:u}),f=s.useRef(null),a=d||f,{buttonProps:v}=r.useButton({...i,isDisabled:t??!1},a),{isFocusVisible:x,focusProps:P}=r.useFocusRing();return e.jsx("button",{className:o.cx(q.button,o.css({bg:"#ffc439",outlineColor:"#ffc439",outlineWidth:"thick",outlineOffset:.5,outlineStyle:x?"solid":"none"})),ref:a,...r.mergeProps(v,P),"aria-disabled":t,children:u?e.jsx(b.LoadingSpinner,{size:24,strokeWidth:2.5,inverted:!0}):e.jsxs(n.HStack,{w:"full",gap:1,justifyContent:"center",children:[e.jsx(h.default,{fontWeight:"semibold",styles:{color:g.token("colors.ink.90")},children:"Pay with"}),e.jsx(n.Box,{mt:.5,children:e.jsx(j.default,{width:60})})]})})});l.displayName="PayPalButton",exports.PayPalButton=l;
2
2
  //# sourceMappingURL=paypal-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paypal-button.js","sources":["../../../../src/components/external/paypal-button.tsx"],"sourcesContent":["import { LoadingSpinner } from '@components/feedback';\nimport { LogoPayPalWordmark } from '@components/logos';\nimport { Text } from '@components/primitives';\nimport { button } from '@recipes/button';\nimport { css, cx } from '@styled/css';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport React, { forwardRef, useRef } from 'react';\nimport { mergeProps, useButton, useFocusRing, type AriaButtonProps } from 'react-aria';\n\nexport interface PayPalButtonProps extends AriaButtonProps {\n disabled?: boolean;\n expand?: boolean;\n validating?: boolean;\n}\n\nexport const PayPalButton = forwardRef<HTMLButtonElement, PayPalButtonProps>((props, forwardedRef) => {\n const { disabled, expand, validating } = props;\n\n const classes = button({ expand, validating });\n\n const internalRef = useRef(null);\n const ref = forwardedRef || internalRef;\n\n const { buttonProps } = useButton(\n { ...props, isDisabled: disabled ?? false },\n ref as React.RefObject<HTMLButtonElement>,\n );\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n return (\n <button\n className={cx(\n classes.button,\n css({\n bg: '#ffc439',\n outlineColor: '#ffc439',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n outlineStyle: isFocusVisible ? 'solid' : 'none',\n }),\n )}\n ref={ref}\n {...mergeProps(buttonProps, focusProps)}\n aria-disabled={disabled}\n >\n {validating ? (\n <LoadingSpinner size={24} strokeWidth={2.5} inverted />\n ) : (\n <HStack w=\"full\" gap={1} justifyContent=\"center\">\n <Text styles={{ fontWeight: 600, color: token('colors.ink.90') }}>Pay with</Text>\n <Box mt={0.5}>\n <LogoPayPalWordmark width={60} />\n </Box>\n </HStack>\n )}\n </button>\n );\n});\n\nPayPalButton.displayName = 'PayPalButton';\n"],"names":["PayPalButton","forwardRef","props","forwardedRef","disabled","expand","validating","classes","button","internalRef","useRef","ref","buttonProps","useButton","isFocusVisible","focusProps","useFocusRing","_jsx","cx","css","mergeProps","LoadingSpinner","_jsxs","HStack","Text","token","Box","LogoPayPalWordmark"],"mappings":"o0BAgBO,MAAMA,EAAeC,EAAiD,WAAA,CAACC,EAAOC,IAAgB,CACnG,KAAM,CAAE,SAAAC,EAAU,OAAAC,EAAQ,WAAAC,CAAU,EAAKJ,EAEnCK,EAAUC,EAAAA,OAAO,CAAE,OAAAH,EAAQ,WAAAC,CAAY,CAAA,EAEvCG,EAAcC,SAAO,IAAI,EACzBC,EAAMR,GAAgBM,EAEtB,CAAE,YAAAG,CAAa,EAAGC,EAAAA,UACtB,CAAE,GAAGX,EAAO,WAAYE,GAAY,EAAO,EAC3CO,CAAyC,EAGrC,CAAE,eAAAG,EAAgB,WAAAC,GAAeC,iBAEvC,OACEC,MACE,SAAA,CAAA,UAAWC,EAAAA,GACTX,EAAQ,OACRY,EAAAA,IAAI,CACF,GAAI,UACJ,aAAc,UACd,aAAc,QACd,cAAe,GACf,aAAcL,EAAiB,QAAU,MAC1C,CAAA,CAAC,EAEJ,IAAKH,EAAG,GACJS,EAAAA,WAAWR,EAAaG,CAAU,kBACvBX,EAAQ,SAEtBE,EACCW,EAAAA,IAACI,iBAAe,CAAA,KAAM,GAAI,YAAa,IAAK,SAAQ,EAAA,CAAA,EAEpDC,OAACC,EAAO,OAAA,CAAA,EAAE,OAAO,IAAK,EAAG,eAAe,SACtC,SAAA,CAAAN,EAAAA,IAACO,EAAAA,QAAK,CAAA,OAAQ,CAAE,WAAY,IAAK,MAAOC,EAAAA,MAAM,eAAe,GAAoB,SAAA,UAAA,CAAA,EACjFR,EAAAA,IAACS,EAAAA,IAAG,CAAC,GAAI,YACPT,EAACU,IAAAA,EAAAA,SAAmB,MAAO,EAAM,CAAA,CAAA,CAAA,CAC7B,GAET,CAAA,CAGP,CAAC,EAED3B,EAAa,YAAc"}
1
+ {"version":3,"file":"paypal-button.js","sources":["../../../../src/components/external/paypal-button.tsx"],"sourcesContent":["import { LoadingSpinner } from '@components/feedback';\nimport { LogoPayPalWordmark } from '@components/logos';\nimport { Text } from '@components/primitives';\nimport { button } from '@recipes/button';\nimport { css, cx } from '@styled/css';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport React, { forwardRef, useRef } from 'react';\nimport { mergeProps, useButton, useFocusRing, type AriaButtonProps } from 'react-aria';\n\nexport interface PayPalButtonProps extends AriaButtonProps {\n disabled?: boolean;\n expand?: boolean;\n validating?: boolean;\n}\n\nexport const PayPalButton = forwardRef<HTMLButtonElement, PayPalButtonProps>((props, forwardedRef) => {\n const { disabled, expand, validating } = props;\n\n const classes = button({ expand, validating });\n\n const internalRef = useRef(null);\n const ref = forwardedRef || internalRef;\n\n const { buttonProps } = useButton(\n { ...props, isDisabled: disabled ?? false },\n ref as React.RefObject<HTMLButtonElement>,\n );\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n return (\n <button\n className={cx(\n classes.button,\n css({\n bg: '#ffc439',\n outlineColor: '#ffc439',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n outlineStyle: isFocusVisible ? 'solid' : 'none',\n }),\n )}\n ref={ref}\n {...mergeProps(buttonProps, focusProps)}\n aria-disabled={disabled}\n >\n {validating ? (\n <LoadingSpinner size={24} strokeWidth={2.5} inverted />\n ) : (\n <HStack w=\"full\" gap={1} justifyContent=\"center\">\n <Text fontWeight=\"semibold\" styles={{ color: token('colors.ink.90') }}>\n Pay with\n </Text>\n <Box mt={0.5}>\n <LogoPayPalWordmark width={60} />\n </Box>\n </HStack>\n )}\n </button>\n );\n});\n\nPayPalButton.displayName = 'PayPalButton';\n"],"names":["PayPalButton","forwardRef","props","forwardedRef","disabled","expand","validating","classes","button","internalRef","useRef","ref","buttonProps","useButton","isFocusVisible","focusProps","useFocusRing","_jsx","cx","css","mergeProps","LoadingSpinner","_jsxs","HStack","Text","token","Box","LogoPayPalWordmark"],"mappings":"o0BAgBO,MAAMA,EAAeC,EAAiD,WAAA,CAACC,EAAOC,IAAgB,CACnG,KAAM,CAAE,SAAAC,EAAU,OAAAC,EAAQ,WAAAC,CAAU,EAAKJ,EAEnCK,EAAUC,EAAAA,OAAO,CAAE,OAAAH,EAAQ,WAAAC,CAAY,CAAA,EAEvCG,EAAcC,SAAO,IAAI,EACzBC,EAAMR,GAAgBM,EAEtB,CAAE,YAAAG,CAAa,EAAGC,EAAAA,UACtB,CAAE,GAAGX,EAAO,WAAYE,GAAY,EAAO,EAC3CO,CAAyC,EAGrC,CAAE,eAAAG,EAAgB,WAAAC,GAAeC,iBAEvC,OACEC,MACE,SAAA,CAAA,UAAWC,EAAAA,GACTX,EAAQ,OACRY,EAAAA,IAAI,CACF,GAAI,UACJ,aAAc,UACd,aAAc,QACd,cAAe,GACf,aAAcL,EAAiB,QAAU,MAC1C,CAAA,CAAC,EAEJ,IAAKH,EAAG,GACJS,EAAAA,WAAWR,EAAaG,CAAU,kBACvBX,EAAQ,SAEtBE,EACCW,EAAAA,IAACI,iBAAe,CAAA,KAAM,GAAI,YAAa,IAAK,SAAQ,EAAA,CAAA,EAEpDC,OAACC,EAAO,OAAA,CAAA,EAAE,OAAO,IAAK,EAAG,eAAe,SACtC,SAAA,CAAAN,EAAAA,IAACO,EAAAA,QAAK,CAAA,WAAW,WAAW,OAAQ,CAAE,MAAOC,EAAAA,MAAM,eAAe,GAE3D,SAAA,UAAA,CAAA,EACPR,EAAAA,IAACS,EAAAA,IAAG,CAAC,GAAI,YACPT,EAACU,IAAAA,EAAAA,SAAmB,MAAO,EAAM,CAAA,CAAA,CAAA,CAC7B,GAET,CAAA,CAGP,CAAC,EAED3B,EAAa,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),k=require("@styled/tokens"),N=require("../icons/ico-dismiss.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var b=require("../primitives/text.js"),C=require("../primitives/portal.js"),S=require("../utils/animate.js"),y=require("../../hooks/useToast.js"),x=require("../../recipes/toast.js"),f=require("@styled/jsx"),o=require("react"),P=require("./status-icon.js");let R=0;const h=t=>{const{dismissible:l,lifespan:n,message:d="",variant:s="branded"}=t,i=x.toast({variant:s}),a=t.id,c=t.removeToast,[v,u]=o.useState(!0);return n&&setTimeout(()=>{u(!1)},n),e.jsx(S.default,{"aria-live":["error"].includes(s||"")?"assertive":"polite",show:v,type:"slide",onHidden:()=>{a&&c(a)},children:e.jsxs(f.HStack,{className:i.toast,children:[t.icon&&e.jsx(P.StatusIcon,{className:i.icon,variant:s}),e.jsx(b.default,{styles:{color:k.token("colors.surface.primary")},children:d}),l&&e.jsx("button",{className:i.dismiss,onClick:()=>u(!1),"aria-label":"dismiss toast",children:e.jsx(N.default,{className:i.icon})})]})})},g=({icon:t=!1,lifespan:l=0,position:n="top-right",children:d})=>{const s=o.useRef([]),i=o.useReducer(r=>r+1,0)[1],a=o.useCallback(r=>{s.current=s.current.filter(m=>m.id!==r),i()},[]),c=o.useCallback(r=>{const{icon:m=r.icon||t,lifespan:j=r.lifespan||l,...T}=r,p=++R;return s.current.push({icon:m,lifespan:j,id:p,...T}),i(),p},[]),v=o.useMemo(()=>({createToast:c,removeToast:a}),[c,a]),u=(n?.startsWith("top")?[...s.current]:[...s.current].reverse()).map(r=>e.jsx(h,{...r,removeToast:a},r.id)),q=x.toast({position:n});return e.jsxs(y.ToastContext.Provider,{value:v,children:[d,e.jsx(C.default,{children:e.jsx("div",{className:q.portal,children:e.jsx(f.VStack,{className:q.container,children:u})})})]})};exports.Toast=h,exports.ToastProvider=g;
1
+ "use strict";var e=require("react/jsx-runtime");require("@styled/tokens");var N=require("../icons/ico-dismiss.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var b=require("../primitives/text.js"),k=require("../primitives/portal.js"),C=require("../utils/animate.js"),S=require("../../hooks/useToast.js"),p=require("../../recipes/toast.js"),h=require("@styled/jsx"),o=require("react"),P=require("./status-icon.js");let R=0;const j=t=>{const{dismissible:l,lifespan:n,message:d="",variant:s="branded"}=t,i=p.toast({variant:s}),a=t.id,u=t.removeToast,[v,c]=o.useState(!0);return n&&setTimeout(()=>{c(!1)},n),e.jsx(C.default,{"aria-live":["error"].includes(s||"")?"assertive":"polite",show:v,type:"slide",onHidden:()=>{a&&u(a)},children:e.jsxs(h.HStack,{className:i.toast,children:[t.icon&&e.jsx(P.StatusIcon,{className:i.icon,variant:s}),e.jsx(b.default,{color:"text.quaternary",children:d}),l&&e.jsx("button",{className:i.dismiss,onClick:()=>c(!1),"aria-label":"dismiss toast",children:e.jsx(N.default,{className:i.icon})})]})})},g=({icon:t=!1,lifespan:l=0,position:n="top-right",children:d})=>{const s=o.useRef([]),i=o.useReducer(r=>r+1,0)[1],a=o.useCallback(r=>{s.current=s.current.filter(m=>m.id!==r),i()},[]),u=o.useCallback(r=>{const{icon:m=r.icon||t,lifespan:f=r.lifespan||l,...T}=r,x=++R;return s.current.push({icon:m,lifespan:f,id:x,...T}),i(),x},[]),v=o.useMemo(()=>({createToast:u,removeToast:a}),[u,a]),c=(n?.startsWith("top")?[...s.current]:[...s.current].reverse()).map(r=>e.jsx(j,{...r,removeToast:a},r.id)),q=p.toast({position:n});return e.jsxs(S.ToastContext.Provider,{value:v,children:[d,e.jsx(k.default,{children:e.jsx("div",{className:q.portal,children:e.jsx(h.VStack,{className:q.container,children:c})})})]})};exports.Toast=j,exports.ToastProvider=g;
2
2
  //# sourceMappingURL=toast-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast-provider.js","sources":["../../../../src/components/feedback/toast-provider.tsx"],"sourcesContent":["import { IcoDismiss } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport Portal from '@components/primitives/portal';\nimport Animate from '@components/utils/animate';\nimport { ToastProps as BaseToastProps, ToastContext, ToastDefinition } from '@hooks/useToast';\nimport { toast as classes } from '@recipes/toast';\nimport { HStack, VStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { PropsWithChildren, useCallback, useMemo, useReducer, useRef, useState } from 'react';\nimport { StatusIcon } from './status-icon';\n\nlet toastID = 0;\n\ninterface InternalToast extends ToastDefinition {\n removeToast: ToastContext['removeToast'];\n}\n\nexport interface ToastProps extends BaseToastProps {}\nexport interface ToastProviderProps extends PropsWithChildren {\n icon?: boolean;\n lifespan?: number;\n position?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';\n}\n\nexport const Toast = (props: ToastProps | InternalToast) => {\n const { dismissible, lifespan, message = '', variant = 'branded' } = props;\n const toastClasses = classes({ variant });\n const dismissId = (props as InternalToast).id;\n const removeToast = (props as InternalToast).removeToast;\n const [show, setShow] = useState(true);\n\n if (lifespan) {\n setTimeout(() => {\n setShow(false);\n }, lifespan);\n }\n\n return (\n <Animate\n aria-live={['error'].includes(variant || '') ? 'assertive' : 'polite'}\n show={show}\n type=\"slide\"\n onHidden={() => {\n if (dismissId) {\n removeToast(dismissId);\n }\n }}\n >\n <HStack className={toastClasses.toast}>\n {props.icon && <StatusIcon className={toastClasses.icon} variant={variant} />}\n <Text styles={{ color: token('colors.surface.primary') }}>{message}</Text>\n {dismissible && (\n <button className={toastClasses.dismiss} onClick={() => setShow(false)} aria-label=\"dismiss toast\">\n <IcoDismiss className={toastClasses.icon} />\n </button>\n )}\n </HStack>\n </Animate>\n );\n};\n\nexport const ToastProvider = ({\n icon: defaultIcon = false,\n lifespan: defaultLifespan = 0,\n position = 'top-right',\n children,\n}: ToastProviderProps) => {\n const toastsRef = useRef<ToastDefinition[]>([]);\n const forceUpdate = useReducer((x: number) => x + 1, 0)[1];\n\n const removeToast: ToastContext['removeToast'] = useCallback((id: number) => {\n toastsRef.current = toastsRef.current.filter(toast => toast.id !== id);\n forceUpdate();\n }, []);\n\n const createToast: ToastContext['createToast'] = useCallback(options => {\n const { icon = options.icon || defaultIcon, lifespan = options.lifespan || defaultLifespan, ...props } = options;\n const id = ++toastID;\n\n toastsRef.current.push({ icon, lifespan, id, ...props });\n forceUpdate();\n\n return id;\n }, []);\n\n const toastCtx = useMemo(() => ({ createToast, removeToast }), [createToast, removeToast]);\n const toasts = position?.startsWith('top') ? [...toastsRef.current] : [...toastsRef.current].reverse();\n const activeToasts = toasts.map(toast => {\n return <Toast key={toast.id} {...toast} removeToast={removeToast} />;\n });\n\n const providerClasses = classes({ position });\n\n return (\n <ToastContext.Provider value={toastCtx}>\n {children}\n <Portal>\n <div className={providerClasses.portal}>\n <VStack className={providerClasses.container}>{activeToasts}</VStack>\n </div>\n </Portal>\n </ToastContext.Provider>\n );\n};\n"],"names":["toastID","Toast","props","dismissible","lifespan","message","variant","toastClasses","classes","dismissId","removeToast","show","setShow","useState","_jsx","Animate","_jsxs","HStack","StatusIcon","Text","token","IcoDismiss","ToastProvider","defaultIcon","defaultLifespan","position","children","toastsRef","useRef","forceUpdate","useReducer","x","useCallback","id","toast","createToast","options","icon","toastCtx","useMemo","activeToasts","providerClasses","ToastContext","Portal","VStack"],"mappings":"8nBAWA,IAAIA,EAAU,EAaD,MAAAC,EAASC,GAAqC,CACzD,KAAM,CAAE,YAAAC,EAAa,SAAAC,EAAU,QAAAC,EAAU,GAAI,QAAAC,EAAU,SAAW,EAAGJ,EAC/DK,EAAeC,EAAAA,MAAQ,CAAE,QAAAF,CAAO,CAAE,EAClCG,EAAaP,EAAwB,GACrCQ,EAAeR,EAAwB,YACvC,CAACS,EAAMC,CAAO,EAAIC,WAAS,EAAI,EAErC,OAAIT,GACF,WAAW,IAAK,CACdQ,EAAQ,EAAK,CACf,EAAGR,CAAQ,EAIXU,EAAAA,IAACC,UAAO,CAAA,YACK,CAAC,OAAO,EAAE,SAAST,GAAW,EAAE,EAAI,YAAc,SAC7D,KAAMK,EACN,KAAK,QACL,SAAU,IAAK,CACTF,GACFC,EAAYD,CAAS,CAEzB,WAEAO,OAACC,EAAAA,OAAO,CAAA,UAAWV,EAAa,MAAK,SAAA,CAClCL,EAAM,MAAQY,EAAAA,IAACI,cAAW,UAAWX,EAAa,KAAM,QAASD,IAClEQ,MAACK,EAAI,QAAA,CAAC,OAAQ,CAAE,MAAOC,QAAM,wBAAwB,CAAG,EAAA,SAAGf,CAAe,CAAA,EACzEF,GACCW,EAAAA,IAAQ,SAAA,CAAA,UAAWP,EAAa,QAAS,QAAS,IAAMK,EAAQ,EAAK,EAAc,aAAA,yBACjFE,MAACO,EAAAA,SAAW,UAAWd,EAAa,IAAQ,CAAA,CAAA,CAAA,CAE/C,CACM,CAAA,CAAA,CAAA,CAGf,EAEae,EAAgB,CAAC,CAC5B,KAAMC,EAAc,GACpB,SAAUC,EAAkB,EAC5B,SAAAC,EAAW,YACX,SAAAC,CACmB,IAAI,CACvB,MAAMC,EAAYC,EAAAA,OAA0B,CAAA,CAAE,EACxCC,EAAcC,EAAAA,WAAYC,GAAcA,EAAI,EAAG,CAAC,EAAE,CAAC,EAEnDrB,EAA2CsB,EAAAA,YAAaC,GAAc,CAC1EN,EAAU,QAAUA,EAAU,QAAQ,OAAOO,GAASA,EAAM,KAAOD,CAAE,EACrEJ,GACF,EAAG,CAAA,CAAE,EAECM,EAA2CH,EAAYI,YAAAA,GAAU,CACrE,KAAM,CAAE,KAAAC,EAAOD,EAAQ,MAAQb,EAAa,SAAAnB,EAAWgC,EAAQ,UAAYZ,EAAiB,GAAGtB,CAAK,EAAKkC,EACnGH,EAAK,EAAEjC,EAEb,OAAA2B,EAAU,QAAQ,KAAK,CAAE,KAAAU,EAAM,SAAAjC,EAAU,GAAA6B,EAAI,GAAG/B,CAAK,CAAE,EACvD2B,IAEOI,CACT,EAAG,CAAA,CAAE,EAECK,EAAWC,EAAQ,QAAA,KAAO,CAAE,YAAAJ,EAAa,YAAAzB,CAAW,GAAK,CAACyB,EAAazB,CAAW,CAAC,EAEnF8B,GADSf,GAAU,WAAW,KAAK,EAAI,CAAC,GAAGE,EAAU,OAAO,EAAI,CAAC,GAAGA,EAAU,OAAO,EAAE,QAAA,GACjE,IAAIO,GACvBpB,EAAAA,IAACb,EAAyB,CAAA,GAAAiC,EAAO,YAAaxB,CAAlC,EAAAwB,EAAM,EAAE,CAC5B,EAEKO,EAAkBjC,EAAQ,MAAA,CAAE,SAAAiB,CAAQ,CAAE,EAE5C,OACET,EAAAA,KAAC0B,eAAa,UAAS,MAAOJ,EAAQ,SAAA,CACnCZ,EACDZ,EAAAA,IAAC6B,EAAAA,QAAM,CAAA,SACL7B,aAAK,UAAW2B,EAAgB,OAC9B,SAAA3B,EAAC8B,IAAAA,EAAAA,OAAM,CAAC,UAAWH,EAAgB,mBAAYD,CAAY,CAAA,GAEtD,CAAA,CAAA,CAAA,CAAA,CAGf"}
1
+ {"version":3,"file":"toast-provider.js","sources":["../../../../src/components/feedback/toast-provider.tsx"],"sourcesContent":["import { IcoDismiss } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport Portal from '@components/primitives/portal';\nimport Animate from '@components/utils/animate';\nimport { ToastProps as BaseToastProps, ToastContext, ToastDefinition } from '@hooks/useToast';\nimport { toast as classes } from '@recipes/toast';\nimport { HStack, VStack } from '@styled/jsx';\nimport { PropsWithChildren, useCallback, useMemo, useReducer, useRef, useState } from 'react';\nimport { StatusIcon } from './status-icon';\n\nlet toastID = 0;\n\ninterface InternalToast extends ToastDefinition {\n removeToast: ToastContext['removeToast'];\n}\n\nexport interface ToastProps extends BaseToastProps {}\nexport interface ToastProviderProps extends PropsWithChildren {\n icon?: boolean;\n lifespan?: number;\n position?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';\n}\n\nexport const Toast = (props: ToastProps | InternalToast) => {\n const { dismissible, lifespan, message = '', variant = 'branded' } = props;\n const toastClasses = classes({ variant });\n const dismissId = (props as InternalToast).id;\n const removeToast = (props as InternalToast).removeToast;\n const [show, setShow] = useState(true);\n\n if (lifespan) {\n setTimeout(() => {\n setShow(false);\n }, lifespan);\n }\n\n return (\n <Animate\n aria-live={['error'].includes(variant || '') ? 'assertive' : 'polite'}\n show={show}\n type=\"slide\"\n onHidden={() => {\n if (dismissId) {\n removeToast(dismissId);\n }\n }}\n >\n <HStack className={toastClasses.toast}>\n {props.icon && <StatusIcon className={toastClasses.icon} variant={variant} />}\n <Text color=\"text.quaternary\">{message}</Text>\n {dismissible && (\n <button className={toastClasses.dismiss} onClick={() => setShow(false)} aria-label=\"dismiss toast\">\n <IcoDismiss className={toastClasses.icon} />\n </button>\n )}\n </HStack>\n </Animate>\n );\n};\n\nexport const ToastProvider = ({\n icon: defaultIcon = false,\n lifespan: defaultLifespan = 0,\n position = 'top-right',\n children,\n}: ToastProviderProps) => {\n const toastsRef = useRef<ToastDefinition[]>([]);\n const forceUpdate = useReducer((x: number) => x + 1, 0)[1];\n\n const removeToast: ToastContext['removeToast'] = useCallback((id: number) => {\n toastsRef.current = toastsRef.current.filter(toast => toast.id !== id);\n forceUpdate();\n }, []);\n\n const createToast: ToastContext['createToast'] = useCallback(options => {\n const { icon = options.icon || defaultIcon, lifespan = options.lifespan || defaultLifespan, ...props } = options;\n const id = ++toastID;\n\n toastsRef.current.push({ icon, lifespan, id, ...props });\n forceUpdate();\n\n return id;\n }, []);\n\n const toastCtx = useMemo(() => ({ createToast, removeToast }), [createToast, removeToast]);\n const toasts = position?.startsWith('top') ? [...toastsRef.current] : [...toastsRef.current].reverse();\n const activeToasts = toasts.map(toast => {\n return <Toast key={toast.id} {...toast} removeToast={removeToast} />;\n });\n\n const providerClasses = classes({ position });\n\n return (\n <ToastContext.Provider value={toastCtx}>\n {children}\n <Portal>\n <div className={providerClasses.portal}>\n <VStack className={providerClasses.container}>{activeToasts}</VStack>\n </div>\n </Portal>\n </ToastContext.Provider>\n );\n};\n"],"names":["toastID","Toast","props","dismissible","lifespan","message","variant","toastClasses","classes","dismissId","removeToast","show","setShow","useState","_jsx","Animate","_jsxs","HStack","StatusIcon","Text","IcoDismiss","ToastProvider","defaultIcon","defaultLifespan","position","children","toastsRef","useRef","forceUpdate","useReducer","x","useCallback","id","toast","createToast","options","icon","toastCtx","useMemo","activeToasts","providerClasses","ToastContext","Portal","VStack"],"mappings":"goBAUA,IAAIA,EAAU,EAaP,MAAMC,EAASC,GAAqC,CACzD,KAAM,CAAE,YAAAC,EAAa,SAAAC,EAAU,QAAAC,EAAU,GAAI,QAAAC,EAAU,SAAW,EAAGJ,EAC/DK,EAAeC,QAAQ,CAAE,QAAAF,CAAO,CAAE,EAClCG,EAAaP,EAAwB,GACrCQ,EAAeR,EAAwB,YACvC,CAACS,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAI,EAErC,OAAIT,GACF,WAAW,IAAK,CACdQ,EAAQ,EAAK,CACf,EAAGR,CAAQ,EAIXU,EAACC,IAAAA,EAAAA,QAAO,CAAA,YACK,CAAC,OAAO,EAAE,SAAST,GAAW,EAAE,EAAI,YAAc,SAC7D,KAAMK,EACN,KAAK,QACL,SAAU,IAAK,CACTF,GACFC,EAAYD,CAAS,CAEzB,EAEA,SAAAO,EAAAA,KAACC,EAAAA,OAAM,CAAC,UAAWV,EAAa,gBAC7BL,EAAM,MAAQY,EAAAA,IAACI,EAAAA,WAAU,CAAC,UAAWX,EAAa,KAAM,QAASD,CAAO,CAAA,EACzEQ,EAAAA,IAACK,EAAAA,QAAK,CAAA,MAAM,2BAAmBd,CAAO,CAAA,EACrCF,GACCW,EAAAA,IAAQ,SAAA,CAAA,UAAWP,EAAa,QAAS,QAAS,IAAMK,EAAQ,EAAK,EAAC,aAAa,gBACjF,SAAAE,MAACM,EAAU,QAAA,CAAC,UAAWb,EAAa,MAC7B,CAAA,CACV,CACM,CAAA,CAAA,CAAA,CAGf,EAEac,EAAgB,CAAC,CAC5B,KAAMC,EAAc,GACpB,SAAUC,EAAkB,EAC5B,SAAAC,EAAW,YACX,SAAAC,CACmB,IAAI,CACvB,MAAMC,EAAYC,EAAAA,OAA0B,CAAE,CAAA,EACxCC,EAAcC,EAAAA,WAAYC,GAAcA,EAAI,EAAG,CAAC,EAAE,CAAC,EAEnDpB,EAA2CqB,EAAAA,YAAaC,GAAc,CAC1EN,EAAU,QAAUA,EAAU,QAAQ,OAAOO,GAASA,EAAM,KAAOD,CAAE,EACrEJ,EAAAA,CACF,EAAG,EAAE,EAECM,EAA2CH,EAAYI,YAAAA,GAAU,CACrE,KAAM,CAAE,KAAAC,EAAOD,EAAQ,MAAQb,EAAa,SAAAlB,EAAW+B,EAAQ,UAAYZ,EAAiB,GAAGrB,CAAK,EAAKiC,EACnGH,EAAK,EAAEhC,EAEb,OAAA0B,EAAU,QAAQ,KAAK,CAAE,KAAAU,EAAM,SAAAhC,EAAU,GAAA4B,EAAI,GAAG9B,CAAK,CAAE,EACvD0B,EAAAA,EAEOI,CACT,EAAG,CAAE,CAAA,EAECK,EAAWC,EAAAA,QAAQ,KAAO,CAAE,YAAAJ,EAAa,YAAAxB,CAAW,GAAK,CAACwB,EAAaxB,CAAW,CAAC,EAEnF6B,GADSf,GAAU,WAAW,KAAK,EAAI,CAAC,GAAGE,EAAU,OAAO,EAAI,CAAC,GAAGA,EAAU,OAAO,EAAE,WACjE,IAAIO,GACvBnB,EAAAA,IAACb,EAAyB,CAAA,GAAAgC,EAAO,YAAavB,CAAlC,EAAAuB,EAAM,EAAE,CAC5B,EAEKO,EAAkBhC,QAAQ,CAAE,SAAAgB,CAAQ,CAAE,EAE5C,OACER,EAACyB,KAAAA,EAAAA,aAAa,UAAS,MAAOJ,EAAQ,SAAA,CACnCZ,EACDX,EAAAA,IAAC4B,EAAAA,QAAM,CAAA,SACL5B,aAAK,UAAW0B,EAAgB,OAC9B,SAAA1B,MAAC6B,EAAM,OAAA,CAAC,UAAWH,EAAgB,mBAAYD,CAAY,CAAA,GAEtD,CAAA,CAAA,CAAA,CAAA,CAGf"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var w=require("../primitives/text.js"),O=require("../../hooks/useClickAway.js"),S=require("../../hooks/useToggleState.js"),a=require("@styled/css"),o=require("react"),p=require("react-aria");const j=2500,d=o.forwardRef((s,x)=>{const m="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0,{children:f,content:v,closeDelay:g=j,defaultOpen:b,...q}=s,[i,n]=o.useState(!1),{isSelected:u,setSelected:r}=S.useToggleState({isOpen:s.isOpen,defaultSelected:b,onChange(l){l||n(!1)},...s}),e=o.useMemo(()=>({isOpen:u,open:()=>{r(!0)},close:l=>{if(l){r(!1);return}m?r(!1):(i&&setTimeout(()=>{r(!1),n(!1)},g),i||r(!1))}}),[u,i]),y=o.useRef(null),{triggerProps:c,tooltipProps:h}=p.useTooltipTrigger(s,e,y);c.onClick=()=>{e.open(),n(!0)};const T=O.useClickAway(()=>{e.close(!0)});return t.jsxs("div",{ref:T,className:a.css({position:"relative"}),onMouseLeave:()=>{e.close()},onFocus:()=>{e.open()},onBlur:()=>{e.close()},children:[o.cloneElement(f,{...c,tabIndex:0}),t.jsxs("div",{ref:x,"aria-describedby":"tooltip",role:"tooltip",className:a.cx(a.css({display:e.isOpen?"block":"none",maxW:72,w:"max",color:"text.secondary",bgColor:"surface.primary",borderColor:"neutral.secondary",position:"absolute",py:2,px:3,borderRadius:"xl",boxShadow:"0px 4px 20px 0px rgba(0, 0, 0, 0.10)",top:0,left:"50%",transform:"translateX(-50%) translateY(calc(-100% - 0.75rem))"})),onMouseEnter:()=>{e.open()},...p.mergeProps(h,q),children:[t.jsx(w.default,{size:"sm",children:v}),e.isOpen&&t.jsx("div",{onMouseEnter:()=>{e.open()},className:a.css({position:"absolute",w:72,h:4,bottom:0,left:"50%",transform:"translateX(-50%) translateY(0.75rem)"})})]})]})});d.displayName="Tooltip",exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var O=require("../primitives/text.js"),S=require("../../hooks/useClickAway.js"),j=require("../../hooks/useToggleState.js"),a=require("@styled/css"),o=require("react"),p=require("react-aria");const C=2500,x=o.forwardRef((s,m)=>{const f="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0,{children:v,content:g,width:u=288,closeDelay:h=C,defaultOpen:b,...q}=s,[i,n]=o.useState(!1),{isSelected:c,setSelected:r}=j.useToggleState({isOpen:s.isOpen,defaultSelected:b,onChange(l){l||n(!1)},...s}),e=o.useMemo(()=>({isOpen:c,open:()=>{r(!0)},close:l=>{if(l){r(!1);return}f?r(!1):(i&&setTimeout(()=>{r(!1),n(!1)},h),i||r(!1))}}),[c,i]),y=o.useRef(null),{triggerProps:d,tooltipProps:w}=p.useTooltipTrigger(s,e,y);d.onClick=()=>{e.open(),n(!0)};const T=S.useClickAway(()=>{e.close(!0)});return t.jsxs("div",{ref:T,className:a.css({position:"relative"}),onMouseLeave:()=>{e.close()},onFocus:()=>{e.open()},onBlur:()=>{e.close()},children:[o.cloneElement(v,{...d,tabIndex:0}),t.jsxs("div",{ref:m,"aria-describedby":"tooltip",role:"tooltip",style:{width:u},className:a.cx(a.css({display:e.isOpen?"block":"none",maxW:72,width:"max",color:"text.secondary",bgColor:"surface.primary",borderColor:"neutral.secondary",position:"absolute",py:2,px:3,borderRadius:"xl",boxShadow:"0px 4px 20px 0px rgba(0, 0, 0, 0.10)",top:0,left:"50%",transform:"translateX(-50%) translateY(calc(-100% - 0.75rem))",zIndex:"max"})),onMouseEnter:()=>{e.open()},...p.mergeProps(w,q),children:[t.jsx(O.default,{size:"sm",children:g}),e.isOpen&&t.jsx("div",{onMouseEnter:()=>{e.open()},style:{width:u},className:a.css({position:"absolute",h:4,bottom:0,left:"50%",transform:"translateX(-50%) translateY(0.75rem)"})})]})]})});x.displayName="Tooltip",exports.default=x;
2
2
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../../src/components/feedback/tooltip.tsx"],"sourcesContent":["import { Text } from '@components/primitives';\nimport { useClickAway } from '@hooks/useClickAway';\nimport { useToggleState } from '@hooks/useToggleState';\nimport { css, cx } from '@styled/css';\nimport { PropsWithChildren, ReactElement, ReactNode, cloneElement, forwardRef, useMemo, useRef, useState } from 'react';\nimport { TooltipTriggerProps, mergeProps, useTooltipTrigger } from 'react-aria';\n\nexport type TooltipProps = PropsWithChildren<\n {\n content: ReactNode;\n } & TooltipTriggerProps\n>;\n\nconst DEFAULT_CLOSE_DELAY = 2500;\n\nconst Tooltip = forwardRef<HTMLDivElement, TooltipProps>((props, forwardedRef) => {\n const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0;\n\n const { children, content, closeDelay = DEFAULT_CLOSE_DELAY, defaultOpen, ...restProps } = props;\n const [isClicked, setIsClicked] = useState(false);\n\n const { isSelected: isOpen, setSelected: setOpen } = useToggleState({\n isOpen: props.isOpen,\n defaultSelected: defaultOpen,\n onChange(open) {\n if (!open) {\n setIsClicked(false);\n }\n },\n ...props,\n });\n\n const state = useMemo(\n () => ({\n isOpen,\n open: () => {\n setOpen(true);\n },\n close: (immediate?: boolean) => {\n if (immediate) {\n setOpen(false);\n return;\n }\n if (!isTouchDevice) {\n if (isClicked) {\n setTimeout(() => {\n setOpen(false);\n setIsClicked(false);\n }, closeDelay);\n }\n if (!isClicked) {\n setOpen(false);\n }\n } else {\n setOpen(false);\n }\n },\n }),\n [isOpen, isClicked],\n );\n\n const triggerRef = useRef<HTMLDivElement>(null);\n const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, triggerRef);\n\n triggerProps.onClick = () => {\n state.open();\n setIsClicked(true);\n };\n\n const clickAwayRef = useClickAway<HTMLDivElement>(() => {\n state.close(true);\n });\n\n return (\n <div\n // tabIndex={0}\n ref={clickAwayRef}\n className={css({ position: 'relative' })}\n onMouseLeave={() => {\n state.close();\n }}\n onFocus={() => {\n state.open();\n }}\n onBlur={() => {\n state.close();\n }}\n >\n {cloneElement(children as ReactElement, {\n ...triggerProps,\n tabIndex: 0,\n })}\n <div\n ref={forwardedRef}\n aria-describedby=\"tooltip\"\n role=\"tooltip\"\n className={cx(\n css({\n display: state.isOpen ? 'block' : 'none',\n maxW: 72,\n w: 'max',\n color: 'text.secondary',\n bgColor: 'surface.primary',\n borderColor: 'neutral.secondary',\n position: 'absolute',\n py: 2,\n px: 3,\n borderRadius: 'xl',\n boxShadow: '0px 4px 20px 0px rgba(0, 0, 0, 0.10)',\n top: 0,\n left: '50%',\n transform: 'translateX(-50%) translateY(calc(-100% - 0.75rem))',\n }),\n )}\n onMouseEnter={() => {\n state.open();\n }}\n {...mergeProps(tooltipProps, restProps)}\n >\n <Text size=\"sm\">{content}</Text>\n {state.isOpen && (\n <div\n onMouseEnter={() => {\n state.open();\n }}\n className={css({\n position: 'absolute',\n w: 72,\n h: 4,\n bottom: 0,\n left: '50%',\n transform: 'translateX(-50%) translateY(0.75rem)',\n })}\n />\n )}\n </div>\n </div>\n );\n});\n\nTooltip.displayName = 'Tooltip';\n\nexport default Tooltip;\n"],"names":["DEFAULT_CLOSE_DELAY","Tooltip","forwardRef","props","forwardedRef","isTouchDevice","children","content","closeDelay","defaultOpen","restProps","isClicked","setIsClicked","useState","isOpen","setOpen","useToggleState","open","state","useMemo","immediate","triggerRef","useRef","triggerProps","tooltipProps","useTooltipTrigger","clickAwayRef","useClickAway","_jsxs","css","cloneElement","cx","mergeProps","_jsx","Text"],"mappings":"mjBAaA,MAAMA,EAAsB,KAEtBC,EAAUC,EAAyC,WAAA,CAACC,EAAOC,IAAgB,CAC/E,MAAMC,EAAgB,iBAAkB,QAAU,UAAU,eAAiB,GAAK,UAAU,eAAiB,EAEvG,CAAE,SAAAC,EAAU,QAAAC,EAAS,WAAAC,EAAaR,EAAqB,YAAAS,EAAa,GAAGC,CAAW,EAAGP,EACrF,CAACQ,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAE1C,CAAE,WAAYC,EAAQ,YAAaC,CAAO,EAAKC,EAAAA,eAAe,CAClE,OAAQb,EAAM,OACd,gBAAiBM,EACjB,SAASQ,EAAI,CACNA,GACHL,EAAa,EAAK,CAEtB,EACA,GAAGT,CACJ,CAAA,EAEKe,EAAQC,EAAAA,QACZ,KAAO,CACL,OAAAL,EACA,KAAM,IAAK,CACTC,EAAQ,EAAI,CACd,EACA,MAAQK,GAAuB,CAC7B,GAAIA,EAAW,CACbL,EAAQ,EAAK,EACb,MACF,CACKV,EAWHU,EAAQ,EAAK,GAVTJ,GACF,WAAW,IAAK,CACdI,EAAQ,EAAK,EACbH,EAAa,EAAK,CACpB,EAAGJ,CAAU,EAEVG,GACHI,EAAQ,EAAK,EAKnB,CACD,GACD,CAACD,EAAQH,CAAS,CAAC,EAGfU,EAAaC,EAAuB,OAAA,IAAI,EACxC,CAAE,aAAAC,EAAc,aAAAC,GAAiBC,EAAAA,kBAAkBtB,EAAOe,EAAOG,CAAU,EAEjFE,EAAa,QAAU,IAAK,CAC1BL,EAAM,OACNN,EAAa,EAAI,CACnB,EAEA,MAAMc,EAAeC,EAAAA,aAA6B,IAAK,CACrDT,EAAM,MAAM,EAAI,CAClB,CAAC,EAED,OACEU,EAAAA,KAAA,MAAA,CAEE,IAAKF,EACL,UAAWG,EAAAA,IAAI,CAAE,SAAU,UAAY,CAAA,EACvC,aAAc,IAAK,CACjBX,EAAM,MACR,CAAA,EACA,QAAS,IAAK,CACZA,EAAM,KACR,CAAA,EACA,OAAQ,IAAK,CACXA,EAAM,MACR,CAAA,EAEC,SAAA,CAAAY,EAAaxB,aAAAA,EAA0B,CACtC,GAAGiB,EACH,SAAU,CACX,CAAA,EACDK,EAAAA,KACE,MAAA,CAAA,IAAKxB,qBACY,UACjB,KAAK,UACL,UAAW2B,KACTF,EAAI,IAAA,CACF,QAASX,EAAM,OAAS,QAAU,OAClC,KAAM,GACN,EAAG,MACH,MAAO,iBACP,QAAS,kBACT,YAAa,oBACb,SAAU,WACV,GAAI,EACJ,GAAI,EACJ,aAAc,KACd,UAAW,uCACX,IAAK,EACL,KAAM,MACN,UAAW,oDACZ,CAAA,CAAC,EAEJ,aAAc,IAAK,CACjBA,EAAM,KACR,CAAA,EAAC,GACGc,aAAWR,EAAcd,CAAS,EAEtC,SAAA,CAAAuB,EAACC,IAAAA,EAAAA,QAAI,CAAC,KAAK,KAAI,SAAE3B,CAAO,CAAA,EACvBW,EAAM,QACLe,EACE,IAAA,MAAA,CAAA,aAAc,IAAK,CACjBf,EAAM,KACR,CAAA,EACA,UAAWW,EAAAA,IAAI,CACb,SAAU,WACV,EAAG,GACH,EAAG,EACH,OAAQ,EACR,KAAM,MACN,UAAW,sCACZ,CAAA,CACD,CAAA,CACH,CACG,CAAA,CAAA,CAAA,CAAA,CAGZ,CAAC,EAED5B,EAAQ,YAAc"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../../src/components/feedback/tooltip.tsx"],"sourcesContent":["import { Text } from '@components/primitives';\nimport { useClickAway } from '@hooks/useClickAway';\nimport { useToggleState } from '@hooks/useToggleState';\nimport { css, cx } from '@styled/css';\nimport { PropsWithChildren, ReactElement, ReactNode, cloneElement, forwardRef, useMemo, useRef, useState } from 'react';\nimport { TooltipTriggerProps, mergeProps, useTooltipTrigger } from 'react-aria';\n\nexport type TooltipProps = PropsWithChildren<\n {\n content: ReactNode;\n width?: number | string;\n } & TooltipTriggerProps\n>;\n\nconst DEFAULT_CLOSE_DELAY = 2500;\n\nconst Tooltip = forwardRef<HTMLDivElement, TooltipProps>((props, forwardedRef) => {\n const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0;\n\n const { children, content, width = 288, closeDelay = DEFAULT_CLOSE_DELAY, defaultOpen, ...restProps } = props;\n const [isClicked, setIsClicked] = useState(false);\n\n const { isSelected: isOpen, setSelected: setOpen } = useToggleState({\n isOpen: props.isOpen,\n defaultSelected: defaultOpen,\n onChange(open) {\n if (!open) {\n setIsClicked(false);\n }\n },\n ...props,\n });\n\n const state = useMemo(\n () => ({\n isOpen,\n open: () => {\n setOpen(true);\n },\n close: (immediate?: boolean) => {\n if (immediate) {\n setOpen(false);\n return;\n }\n if (!isTouchDevice) {\n if (isClicked) {\n setTimeout(() => {\n setOpen(false);\n setIsClicked(false);\n }, closeDelay);\n }\n if (!isClicked) {\n setOpen(false);\n }\n } else {\n setOpen(false);\n }\n },\n }),\n [isOpen, isClicked],\n );\n\n const triggerRef = useRef<HTMLDivElement>(null);\n const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, triggerRef);\n\n triggerProps.onClick = () => {\n state.open();\n setIsClicked(true);\n };\n\n const clickAwayRef = useClickAway<HTMLDivElement>(() => {\n state.close(true);\n });\n\n return (\n <div\n ref={clickAwayRef}\n className={css({ position: 'relative' })}\n onMouseLeave={() => {\n state.close();\n }}\n onFocus={() => {\n state.open();\n }}\n onBlur={() => {\n state.close();\n }}\n >\n {cloneElement(children as ReactElement, {\n ...triggerProps,\n tabIndex: 0,\n })}\n <div\n ref={forwardedRef}\n aria-describedby=\"tooltip\"\n role=\"tooltip\"\n style={{ width }}\n className={cx(\n css({\n display: state.isOpen ? 'block' : 'none',\n maxW: 72,\n width: 'max',\n color: 'text.secondary',\n bgColor: 'surface.primary',\n borderColor: 'neutral.secondary',\n position: 'absolute',\n py: 2,\n px: 3,\n borderRadius: 'xl',\n boxShadow: '0px 4px 20px 0px rgba(0, 0, 0, 0.10)',\n top: 0,\n left: '50%',\n transform: 'translateX(-50%) translateY(calc(-100% - 0.75rem))',\n zIndex: 'max',\n }),\n )}\n onMouseEnter={() => {\n state.open();\n }}\n {...mergeProps(tooltipProps, restProps)}\n >\n <Text size=\"sm\">{content}</Text>\n {state.isOpen && (\n <div\n onMouseEnter={() => {\n state.open();\n }}\n style={{ width }}\n className={css({\n position: 'absolute',\n h: 4,\n bottom: 0,\n left: '50%',\n transform: 'translateX(-50%) translateY(0.75rem)',\n })}\n />\n )}\n </div>\n </div>\n );\n});\n\nTooltip.displayName = 'Tooltip';\n\nexport default Tooltip;\n"],"names":["DEFAULT_CLOSE_DELAY","Tooltip","forwardRef","props","forwardedRef","isTouchDevice","children","content","width","closeDelay","defaultOpen","restProps","isClicked","setIsClicked","useState","isOpen","setOpen","useToggleState","open","state","useMemo","immediate","triggerRef","useRef","triggerProps","tooltipProps","useTooltipTrigger","clickAwayRef","useClickAway","_jsxs","css","cloneElement","cx","mergeProps","_jsx","Text"],"mappings":"yjBAcMA,EAAsB,KAEtBC,EAAUC,EAAAA,WAAyC,CAACC,EAAOC,IAAgB,CAC/E,MAAMC,EAAgB,iBAAkB,QAAU,UAAU,eAAiB,GAAK,UAAU,eAAiB,EAEvG,CAAE,SAAAC,EAAU,QAAAC,EAAS,MAAAC,EAAQ,IAAK,WAAAC,EAAaT,EAAqB,YAAAU,EAAa,GAAGC,CAAW,EAAGR,EAClG,CAACS,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAE1C,CAAE,WAAYC,EAAQ,YAAaC,CAAO,EAAKC,EAAe,eAAA,CAClE,OAAQd,EAAM,OACd,gBAAiBO,EACjB,SAASQ,EAAI,CACNA,GACHL,EAAa,EAAK,CAEtB,EACA,GAAGV,CACJ,CAAA,EAEKgB,EAAQC,UACZ,KAAO,CACL,OAAAL,EACA,KAAM,IAAK,CACTC,EAAQ,EAAI,CACd,EACA,MAAQK,GAAuB,CAC7B,GAAIA,EAAW,CACbL,EAAQ,EAAK,EACb,MACF,CACKX,EAWHW,EAAQ,EAAK,GAVTJ,GACF,WAAW,IAAK,CACdI,EAAQ,EAAK,EACbH,EAAa,EAAK,CACpB,EAAGJ,CAAU,EAEVG,GACHI,EAAQ,EAAK,EAKnB,CACD,GACD,CAACD,EAAQH,CAAS,CAAC,EAGfU,EAAaC,EAAuB,OAAA,IAAI,EACxC,CAAE,aAAAC,EAAc,aAAAC,GAAiBC,EAAkBvB,kBAAAA,EAAOgB,EAAOG,CAAU,EAEjFE,EAAa,QAAU,IAAK,CAC1BL,EAAM,KAAA,EACNN,EAAa,EAAI,CACnB,EAEA,MAAMc,EAAeC,EAAAA,aAA6B,IAAK,CACrDT,EAAM,MAAM,EAAI,CAClB,CAAC,EAED,OACEU,cACE,IAAKF,EACL,UAAWG,EAAAA,IAAI,CAAE,SAAU,UAAY,CAAA,EACvC,aAAc,IAAK,CACjBX,EAAM,MAAA,CACR,EACA,QAAS,IAAK,CACZA,EAAM,KACR,CAAA,EACA,OAAQ,IAAK,CACXA,EAAM,MACR,CAAA,EAEC,SAAA,CAAAY,EAAAA,aAAazB,EAA0B,CACtC,GAAGkB,EACH,SAAU,EACX,EACDK,cACE,IAAKzB,EACY,mBAAA,UACjB,KAAK,UACL,MAAO,CAAE,MAAAI,CAAO,EAChB,UAAWwB,EAAAA,GACTF,MAAI,CACF,QAASX,EAAM,OAAS,QAAU,OAClC,KAAM,GACN,MAAO,MACP,MAAO,iBACP,QAAS,kBACT,YAAa,oBACb,SAAU,WACV,GAAI,EACJ,GAAI,EACJ,aAAc,KACd,UAAW,uCACX,IAAK,EACL,KAAM,MACN,UAAW,qDACX,OAAQ,KACT,CAAA,CAAC,EAEJ,aAAc,IAAK,CACjBA,EAAM,KACR,CAAA,EAAC,GACGc,aAAWR,EAAcd,CAAS,EAEtC,SAAA,CAAAuB,EAAAA,IAACC,EAAAA,QAAI,CAAC,KAAK,KAAI,SAAE5B,CAAO,CAAA,EACvBY,EAAM,QACLe,EAAAA,IACE,MAAA,CAAA,aAAc,IAAK,CACjBf,EAAM,KACR,CAAA,EACA,MAAO,CAAE,MAAAX,GACT,UAAWsB,EAAAA,IAAI,CACb,SAAU,WACV,EAAG,EACH,OAAQ,EACR,KAAM,MACN,UAAW,sCACZ,CAAA,CACD,CAAA,CACH,CACG,CAAA,CAAA,CAAA,CAAA,CAGZ,CAAC,EAED7B,EAAQ,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("@styled/tokens");const s=({color:r,title:l,titleId:t,...i})=>{const o=r||n.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.84113 16.0164C11.0163 17.3279 12.9836 17.3279 14.1589 16.0164L20.7447 8.66738C21.1133 8.25608 21.0787 7.62386 20.6674 7.25528C20.2561 6.8867 19.6239 6.92132 19.2553 7.33262L12.6694 14.6817C12.2891 15.1061 11.7109 15.1061 11.3306 14.6817L4.74471 7.33262C4.37613 6.92132 3.74391 6.8867 3.33262 7.25528C2.92132 7.62386 2.88669 8.25608 3.25528 8.66738L9.84113 16.0164Z",fill:"currentColor"})]})};exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("@styled/tokens");const s=({color:r,title:l,titleId:t,...i})=>{const o=r||n.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.84114 16.0164C11.0164 17.3279 12.9836 17.3279 14.1589 16.0164L20.7447 8.66738C21.1133 8.25608 21.0787 7.62386 20.6674 7.25528C20.2561 6.8867 19.6239 6.92132 19.2553 7.33262L12.6694 14.6817C12.2891 15.1061 11.7109 15.1061 11.3306 14.6817L4.74472 7.33262C4.37614 6.92132 3.74392 6.8867 3.33262 7.25528C2.92133 7.62386 2.8867 8.25608 3.25528 8.66738L9.84114 16.0164Z",fill:"currentColor"})]})};exports.default=s;
2
2
  //# sourceMappingURL=ico-caret-down.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ico-caret-down.js","sources":["../../../../src/components/icons/ico-caret-down.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoCaretDown = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.84113 16.0164C11.0163 17.3279 12.9836 17.3279 14.1589 16.0164L20.7447 8.66738C21.1133 8.25608 21.0787 7.62386 20.6674 7.25528C20.2561 6.8867 19.6239 6.92132 19.2553 7.33262L12.6694 14.6817C12.2891 15.1061 11.7109 15.1061 11.3306 14.6817L4.74471 7.33262C4.37613 6.92132 3.74391 6.8867 3.33262 7.25528C2.92132 7.62386 2.88669 8.25608 3.25528 8.66738L9.84113 16.0164Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoCaretDown;\n"],"names":["IcoCaretDown","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAe,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE/E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OAAA,MAAA,CACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,EACb,GAAAC,YAEHF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAU,SAAAD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,kXACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
1
+ {"version":3,"file":"ico-caret-down.js","sources":["../../../../src/components/icons/ico-caret-down.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoCaretDown = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.84114 16.0164C11.0164 17.3279 12.9836 17.3279 14.1589 16.0164L20.7447 8.66738C21.1133 8.25608 21.0787 7.62386 20.6674 7.25528C20.2561 6.8867 19.6239 6.92132 19.2553 7.33262L12.6694 14.6817C12.2891 15.1061 11.7109 15.1061 11.3306 14.6817L4.74472 7.33262C4.37614 6.92132 3.74392 6.8867 3.33262 7.25528C2.92133 7.62386 2.8867 8.25608 3.25528 8.66738L9.84114 16.0164Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoCaretDown;\n"],"names":["IcoCaretDown","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAe,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE/E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OAAA,MAAA,CACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,EACb,GAAAC,YAEHF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAU,SAAAD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,iXACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("@styled/tokens");const C=({color:t,title:l,titleId:L,...r})=>{const i=t||o.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:i,"aria-labelledby":L,...r,children:[l?e.jsx("title",{id:L,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.391741 11.9197C0.136087 11.6204 0.136087 11.1797 0.391741 10.8804L6.03009 4.28041C6.18209 4.1025 6.40436 4.00005 6.63835 4.00005C6.87235 4.00005 7.09462 4.1025 7.24661 4.28041L9.30493 6.68978L11.3632 4.28041C11.5152 4.1025 11.7375 4.00005 11.9715 4.00005C12.2055 4.00005 12.4278 4.1025 12.5798 4.28041L14.6666 6.72314L16.7534 4.28041C16.9054 4.1025 17.1276 4.00005 17.3616 4.00005C17.5956 4.00005 17.8179 4.1025 17.9699 4.28041L23.6083 10.8804C23.8639 11.1797 23.8639 11.6204 23.6083 11.9197L17.9699 18.5197C17.8179 18.6976 17.5956 18.8 17.3616 18.8C17.1276 18.8 16.9054 18.6976 16.7534 18.5197L14.6666 16.077L12.5798 18.5197C12.4278 18.6976 12.2055 18.8 11.9715 18.8C11.7375 18.8 11.5152 18.6976 11.3632 18.5197L9.30493 16.1103L7.24661 18.5197C7.09462 18.6976 6.87235 18.8 6.63835 18.8C6.40436 18.8 6.18209 18.6976 6.03009 18.5197L0.391741 11.9197ZM10.3571 14.8787L11.9715 16.7684L16.5577 11.4L11.9715 6.03168L10.3571 7.92142L12.885 10.8804C13.1406 11.1797 13.1406 11.6204 12.885 11.9197L10.3571 14.8787ZM15.7188 14.8453L17.3616 16.7684L21.9478 11.4L17.3616 6.03168L15.7188 7.95478L18.2181 10.8804C18.4738 11.1797 18.4738 11.6204 18.2181 11.9197L15.7188 14.8453ZM6.63835 16.7684L11.2245 11.4L6.63835 6.03168L2.05218 11.4L6.63835 16.7684Z",fill:"currentColor"})]})};exports.default=C;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("@styled/tokens");const C=({color:t,title:l,titleId:L,...r})=>{const i=t||o.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:i,"aria-labelledby":L,...r,children:[l?e.jsx("title",{id:L,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.39174 11.9197C0.136087 11.6204 0.136087 11.1797 0.39174 10.8804L6.03009 4.28041C6.18209 4.1025 6.40435 4.00005 6.63835 4.00005C6.87235 4.00005 7.09462 4.1025 7.24661 4.28041L9.30493 6.68978L11.3632 4.28041C11.5152 4.1025 11.7375 4.00005 11.9715 4.00005C12.2055 4.00005 12.4278 4.1025 12.5798 4.28041L14.6666 6.72314L16.7534 4.28041C16.9054 4.1025 17.1276 4.00005 17.3616 4.00005C17.5956 4.00005 17.8179 4.1025 17.9699 4.28041L23.6083 10.8804C23.8639 11.1797 23.8639 11.6204 23.6083 11.9197L17.9699 18.5197C17.8179 18.6976 17.5956 18.8 17.3616 18.8C17.1276 18.8 16.9054 18.6976 16.7534 18.5197L14.6666 16.077L12.5798 18.5197C12.4278 18.6976 12.2055 18.8 11.9715 18.8C11.7375 18.8 11.5152 18.6976 11.3632 18.5197L9.30493 16.1103L7.24661 18.5197C7.09462 18.6976 6.87235 18.8 6.63835 18.8C6.40435 18.8 6.18209 18.6976 6.03009 18.5197L0.39174 11.9197ZM10.3571 14.8787L11.9715 16.7684L16.5577 11.4L11.9715 6.03168L10.3571 7.92142L12.885 10.8804C13.1406 11.1797 13.1406 11.6204 12.885 11.9197L10.3571 14.8787ZM15.7188 14.8453L17.3616 16.7684L21.9478 11.4L17.3616 6.03168L15.7188 7.95478L18.2181 10.8804C18.4738 11.1797 18.4738 11.6204 18.2181 11.9197L15.7188 14.8453ZM6.63835 16.7684L11.2245 11.4L6.63835 6.03168L2.05218 11.4L6.63835 16.7684Z",fill:"currentColor"})]})};exports.default=C;
2
2
  //# sourceMappingURL=ico-dedicated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ico-dedicated.js","sources":["../../../../src/components/icons/ico-dedicated.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoDedicated = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.391741 11.9197C0.136087 11.6204 0.136087 11.1797 0.391741 10.8804L6.03009 4.28041C6.18209 4.1025 6.40436 4.00005 6.63835 4.00005C6.87235 4.00005 7.09462 4.1025 7.24661 4.28041L9.30493 6.68978L11.3632 4.28041C11.5152 4.1025 11.7375 4.00005 11.9715 4.00005C12.2055 4.00005 12.4278 4.1025 12.5798 4.28041L14.6666 6.72314L16.7534 4.28041C16.9054 4.1025 17.1276 4.00005 17.3616 4.00005C17.5956 4.00005 17.8179 4.1025 17.9699 4.28041L23.6083 10.8804C23.8639 11.1797 23.8639 11.6204 23.6083 11.9197L17.9699 18.5197C17.8179 18.6976 17.5956 18.8 17.3616 18.8C17.1276 18.8 16.9054 18.6976 16.7534 18.5197L14.6666 16.077L12.5798 18.5197C12.4278 18.6976 12.2055 18.8 11.9715 18.8C11.7375 18.8 11.5152 18.6976 11.3632 18.5197L9.30493 16.1103L7.24661 18.5197C7.09462 18.6976 6.87235 18.8 6.63835 18.8C6.40436 18.8 6.18209 18.6976 6.03009 18.5197L0.391741 11.9197ZM10.3571 14.8787L11.9715 16.7684L16.5577 11.4L11.9715 6.03168L10.3571 7.92142L12.885 10.8804C13.1406 11.1797 13.1406 11.6204 12.885 11.9197L10.3571 14.8787ZM15.7188 14.8453L17.3616 16.7684L21.9478 11.4L17.3616 6.03168L15.7188 7.95478L18.2181 10.8804C18.4738 11.1797 18.4738 11.6204 18.2181 11.9197L15.7188 14.8453ZM6.63835 16.7684L11.2245 11.4L6.63835 6.03168L2.05218 11.4L6.63835 16.7684Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoDedicated;\n"],"names":["IcoDedicated","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAe,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE/E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OAAA,MAAA,CACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,EACb,GAAAC,YAEHF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAU,SAAAD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,4tCACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
1
+ {"version":3,"file":"ico-dedicated.js","sources":["../../../../src/components/icons/ico-dedicated.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoDedicated = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.39174 11.9197C0.136087 11.6204 0.136087 11.1797 0.39174 10.8804L6.03009 4.28041C6.18209 4.1025 6.40435 4.00005 6.63835 4.00005C6.87235 4.00005 7.09462 4.1025 7.24661 4.28041L9.30493 6.68978L11.3632 4.28041C11.5152 4.1025 11.7375 4.00005 11.9715 4.00005C12.2055 4.00005 12.4278 4.1025 12.5798 4.28041L14.6666 6.72314L16.7534 4.28041C16.9054 4.1025 17.1276 4.00005 17.3616 4.00005C17.5956 4.00005 17.8179 4.1025 17.9699 4.28041L23.6083 10.8804C23.8639 11.1797 23.8639 11.6204 23.6083 11.9197L17.9699 18.5197C17.8179 18.6976 17.5956 18.8 17.3616 18.8C17.1276 18.8 16.9054 18.6976 16.7534 18.5197L14.6666 16.077L12.5798 18.5197C12.4278 18.6976 12.2055 18.8 11.9715 18.8C11.7375 18.8 11.5152 18.6976 11.3632 18.5197L9.30493 16.1103L7.24661 18.5197C7.09462 18.6976 6.87235 18.8 6.63835 18.8C6.40435 18.8 6.18209 18.6976 6.03009 18.5197L0.39174 11.9197ZM10.3571 14.8787L11.9715 16.7684L16.5577 11.4L11.9715 6.03168L10.3571 7.92142L12.885 10.8804C13.1406 11.1797 13.1406 11.6204 12.885 11.9197L10.3571 14.8787ZM15.7188 14.8453L17.3616 16.7684L21.9478 11.4L17.3616 6.03168L15.7188 7.95478L18.2181 10.8804C18.4738 11.1797 18.4738 11.6204 18.2181 11.9197L15.7188 14.8453ZM6.63835 16.7684L11.2245 11.4L6.63835 6.03168L2.05218 11.4L6.63835 16.7684Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoDedicated;\n"],"names":["IcoDedicated","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAe,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE/E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OAAA,MAAA,CACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,EACb,GAAAC,YAEHF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAU,SAAAD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,ytCACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("react/jsx-runtime"),V=require("@styled/tokens");const L=({color:t,title:e,titleId:l,...r})=>{const i=t||V.token("colors.text.primary");return C.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:i,"aria-labelledby":l,...r,children:[e?C.jsx("title",{id:l,children:e}):null,C.jsx("g",{clipPath:"url(#clip0_11176_25357)",children:C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3C1.5 1.34531 2.84531 0 4.5 0H12C13.6547 0 15 1.34531 15 3V12H15.375C17.6531 12 19.5 13.8469 19.5 16.125V17.625C19.5 18.2484 20.0016 18.75 20.625 18.75C21.2484 18.75 21.75 18.2484 21.75 17.625V10.4062C20.4562 10.0734 19.5 8.89688 19.5 7.5V4.5L18 3C17.5875 2.5875 17.5875 1.9125 18 1.5C18.4125 1.0875 19.0875 1.0875 19.5 1.5L23.1234 5.12344C23.6859 5.68594 24 6.45 24 7.24688V17.625C24 19.4906 22.4906 21 20.625 21C18.7594 21 17.25 19.4906 17.25 17.625V16.125C17.25 15.0891 16.4109 14.25 15.375 14.25H15V21C15.8297 21 16.5 21.6703 16.5 22.5C16.5 23.3297 15.8297 24 15 24H1.5C0.670312 24 0 23.3297 0 22.5C0 21.6703 0.670312 21 1.5 21V3ZM4.35 2C3.88056 2 3.5 2.38056 3.5 2.85V4.15C3.5 4.61944 3.88056 5 4.35 5H12.15C12.6194 5 13 4.61944 13 4.15V2.85C13 2.38056 12.6194 2 12.15 2H4.35ZM9.90339 10.2923C10.0809 10.2033 10.2807 10.2033 10.436 10.2923L12.2337 11.3383C12.4112 11.4496 12.5 11.6276 12.5 11.8056V13.9199C12.5 14.1202 12.389 14.2982 12.2337 14.3872L10.436 15.4332C10.2585 15.5223 10.0587 15.5223 9.90339 15.4332L8.10574 14.3872C7.9282 14.276 7.83943 14.0979 7.83943 13.9199V13.1855L8.68277 12.6958V13.408C8.68277 13.6083 8.79373 13.7864 8.94909 13.8754L9.90339 14.4318C10.0809 14.5208 10.2807 14.5208 10.436 14.4318L11.3681 13.8754C11.5457 13.7641 11.6345 13.5861 11.6345 13.408V12.2953C11.6345 12.095 11.5235 11.9169 11.3681 11.8279L10.4138 11.2715C10.2363 11.1825 10.0366 11.1825 9.8812 11.2715L8.66057 11.9837L7.81723 12.4733L6.59661 13.1855C6.41906 13.2745 6.21932 13.2745 6.06397 13.1855L4.26632 12.1395C4.08877 12.0282 4 11.8501 4 11.6721V9.58012C4 9.40208 4.08877 9.22404 4.26632 9.13502L6.08616 8.06677C6.26371 7.97774 6.46345 7.97774 6.6188 8.06677L8.39426 9.11276C8.5718 9.22404 8.66057 9.40208 8.66057 9.58012V10.3368L7.81723 10.8264V10.092C7.81723 9.89169 7.70627 9.71365 7.55091 9.62463L6.59661 9.04599C6.41906 8.95697 6.21932 8.95697 6.06397 9.04599L5.10966 9.60237C4.93211 9.71365 4.84334 9.89169 4.84334 10.0697V11.1825C4.84334 11.3828 4.95431 11.5608 5.10966 11.6499L6.06397 12.2285C6.24151 12.3175 6.44125 12.3175 6.59661 12.2285L7.81723 11.4941L8.66057 11.0267L9.90339 10.2923ZM9.80638 18.953C9.88178 19.0085 9.92445 19.0864 9.9344 19.1867H10.4502C10.4477 19.035 10.4071 18.9016 10.3284 18.7865C10.2497 18.6713 10.1395 18.5814 9.99778 18.5167C9.85692 18.4521 9.69203 18.4198 9.50311 18.4198C9.31751 18.4198 9.15179 18.4521 9.00595 18.5167C8.86012 18.5814 8.74536 18.6713 8.66167 18.7865C8.57881 18.9016 8.53779 19.0363 8.53862 19.1904C8.53779 19.3785 8.59953 19.528 8.72381 19.6391C8.8481 19.7501 9.01755 19.8317 9.23216 19.8839L9.50933 19.9535C9.60213 19.9759 9.68043 20.0008 9.74423 20.0281C9.80886 20.0555 9.85775 20.0886 9.8909 20.1275C9.92487 20.1665 9.94185 20.2145 9.94185 20.2717C9.94185 20.333 9.92321 20.3873 9.88592 20.4345C9.84864 20.4818 9.79602 20.5186 9.72808 20.5452C9.66096 20.5717 9.58183 20.5849 9.49068 20.5849C9.39788 20.5849 9.31461 20.5708 9.24086 20.5427C9.16794 20.5137 9.10953 20.471 9.06561 20.4146C9.02252 20.3575 8.99808 20.2862 8.99228 20.2009H8.47151C8.47565 20.384 8.51998 20.5377 8.6045 20.662C8.68984 20.7854 8.80833 20.8787 8.95996 20.9416C9.11243 21.0046 9.2914 21.0361 9.4969 21.0361C9.70405 21.0361 9.88095 21.005 10.0276 20.9429C10.1751 20.8799 10.2878 20.7917 10.3657 20.6781C10.4444 20.5638 10.4842 20.4287 10.485 20.273C10.4842 20.1669 10.4647 20.0729 10.4266 19.9908C10.3893 19.9088 10.3367 19.8375 10.2687 19.777C10.2008 19.7166 10.1204 19.6656 10.0276 19.6242C9.93481 19.5827 9.83289 19.5496 9.72186 19.5247L9.49317 19.47C9.43765 19.4576 9.38545 19.4427 9.33656 19.4253C9.28768 19.4071 9.24459 19.3859 9.2073 19.3619C9.17002 19.3371 9.1406 19.3076 9.11906 19.2737C9.09834 19.2397 9.08881 19.1999 9.09047 19.1544C9.09047 19.0997 9.10621 19.0508 9.1377 19.0077C9.17001 18.9646 9.21642 18.931 9.2769 18.907C9.33739 18.8822 9.41155 18.8697 9.49938 18.8697C9.62864 18.8697 9.73098 18.8975 9.80638 18.953ZM3.34563 18.8983V18.4546H5.43619V18.8983H4.65689V21.0001H4.12493V18.8983H3.34563ZM6.09547 21.0001V18.4546H7.81067V18.8983H6.63365V19.5049H7.72242V19.9486H6.63365V20.5563H7.81564V21.0001H6.09547ZM11.065 18.8983V18.4546H13.1556V18.8983H12.3763V21.0001H11.8443V18.8983H11.065Z",fill:"currentColor"})}),C.jsx("defs",{children:C.jsx("clipPath",{id:"clip0_11176_25357",children:C.jsx("rect",{width:24,height:24,fill:"currentColor"})})})]})};exports.default=L;
2
+ //# sourceMappingURL=ico-polygon-gas-testnet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ico-polygon-gas-testnet.js","sources":["../../../../src/components/icons/ico-polygon-gas-testnet.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoPolygonGasTestnet = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <g clipPath=\"url(#clip0_11176_25357)\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M1.5 3C1.5 1.34531 2.84531 0 4.5 0H12C13.6547 0 15 1.34531 15 3V12H15.375C17.6531 12 19.5 13.8469 19.5 16.125V17.625C19.5 18.2484 20.0016 18.75 20.625 18.75C21.2484 18.75 21.75 18.2484 21.75 17.625V10.4062C20.4562 10.0734 19.5 8.89688 19.5 7.5V4.5L18 3C17.5875 2.5875 17.5875 1.9125 18 1.5C18.4125 1.0875 19.0875 1.0875 19.5 1.5L23.1234 5.12344C23.6859 5.68594 24 6.45 24 7.24688V17.625C24 19.4906 22.4906 21 20.625 21C18.7594 21 17.25 19.4906 17.25 17.625V16.125C17.25 15.0891 16.4109 14.25 15.375 14.25H15V21C15.8297 21 16.5 21.6703 16.5 22.5C16.5 23.3297 15.8297 24 15 24H1.5C0.670312 24 0 23.3297 0 22.5C0 21.6703 0.670312 21 1.5 21V3ZM4.35 2C3.88056 2 3.5 2.38056 3.5 2.85V4.15C3.5 4.61944 3.88056 5 4.35 5H12.15C12.6194 5 13 4.61944 13 4.15V2.85C13 2.38056 12.6194 2 12.15 2H4.35ZM9.90339 10.2923C10.0809 10.2033 10.2807 10.2033 10.436 10.2923L12.2337 11.3383C12.4112 11.4496 12.5 11.6276 12.5 11.8056V13.9199C12.5 14.1202 12.389 14.2982 12.2337 14.3872L10.436 15.4332C10.2585 15.5223 10.0587 15.5223 9.90339 15.4332L8.10574 14.3872C7.9282 14.276 7.83943 14.0979 7.83943 13.9199V13.1855L8.68277 12.6958V13.408C8.68277 13.6083 8.79373 13.7864 8.94909 13.8754L9.90339 14.4318C10.0809 14.5208 10.2807 14.5208 10.436 14.4318L11.3681 13.8754C11.5457 13.7641 11.6345 13.5861 11.6345 13.408V12.2953C11.6345 12.095 11.5235 11.9169 11.3681 11.8279L10.4138 11.2715C10.2363 11.1825 10.0366 11.1825 9.8812 11.2715L8.66057 11.9837L7.81723 12.4733L6.59661 13.1855C6.41906 13.2745 6.21932 13.2745 6.06397 13.1855L4.26632 12.1395C4.08877 12.0282 4 11.8501 4 11.6721V9.58012C4 9.40208 4.08877 9.22404 4.26632 9.13502L6.08616 8.06677C6.26371 7.97774 6.46345 7.97774 6.6188 8.06677L8.39426 9.11276C8.5718 9.22404 8.66057 9.40208 8.66057 9.58012V10.3368L7.81723 10.8264V10.092C7.81723 9.89169 7.70627 9.71365 7.55091 9.62463L6.59661 9.04599C6.41906 8.95697 6.21932 8.95697 6.06397 9.04599L5.10966 9.60237C4.93211 9.71365 4.84334 9.89169 4.84334 10.0697V11.1825C4.84334 11.3828 4.95431 11.5608 5.10966 11.6499L6.06397 12.2285C6.24151 12.3175 6.44125 12.3175 6.59661 12.2285L7.81723 11.4941L8.66057 11.0267L9.90339 10.2923ZM9.80638 18.953C9.88178 19.0085 9.92445 19.0864 9.9344 19.1867H10.4502C10.4477 19.035 10.4071 18.9016 10.3284 18.7865C10.2497 18.6713 10.1395 18.5814 9.99778 18.5167C9.85692 18.4521 9.69203 18.4198 9.50311 18.4198C9.31751 18.4198 9.15179 18.4521 9.00595 18.5167C8.86012 18.5814 8.74536 18.6713 8.66167 18.7865C8.57881 18.9016 8.53779 19.0363 8.53862 19.1904C8.53779 19.3785 8.59953 19.528 8.72381 19.6391C8.8481 19.7501 9.01755 19.8317 9.23216 19.8839L9.50933 19.9535C9.60213 19.9759 9.68043 20.0008 9.74423 20.0281C9.80886 20.0555 9.85775 20.0886 9.8909 20.1275C9.92487 20.1665 9.94185 20.2145 9.94185 20.2717C9.94185 20.333 9.92321 20.3873 9.88592 20.4345C9.84864 20.4818 9.79602 20.5186 9.72808 20.5452C9.66096 20.5717 9.58183 20.5849 9.49068 20.5849C9.39788 20.5849 9.31461 20.5708 9.24086 20.5427C9.16794 20.5137 9.10953 20.471 9.06561 20.4146C9.02252 20.3575 8.99808 20.2862 8.99228 20.2009H8.47151C8.47565 20.384 8.51998 20.5377 8.6045 20.662C8.68984 20.7854 8.80833 20.8787 8.95996 20.9416C9.11243 21.0046 9.2914 21.0361 9.4969 21.0361C9.70405 21.0361 9.88095 21.005 10.0276 20.9429C10.1751 20.8799 10.2878 20.7917 10.3657 20.6781C10.4444 20.5638 10.4842 20.4287 10.485 20.273C10.4842 20.1669 10.4647 20.0729 10.4266 19.9908C10.3893 19.9088 10.3367 19.8375 10.2687 19.777C10.2008 19.7166 10.1204 19.6656 10.0276 19.6242C9.93481 19.5827 9.83289 19.5496 9.72186 19.5247L9.49317 19.47C9.43765 19.4576 9.38545 19.4427 9.33656 19.4253C9.28768 19.4071 9.24459 19.3859 9.2073 19.3619C9.17002 19.3371 9.1406 19.3076 9.11906 19.2737C9.09834 19.2397 9.08881 19.1999 9.09047 19.1544C9.09047 19.0997 9.10621 19.0508 9.1377 19.0077C9.17001 18.9646 9.21642 18.931 9.2769 18.907C9.33739 18.8822 9.41155 18.8697 9.49938 18.8697C9.62864 18.8697 9.73098 18.8975 9.80638 18.953ZM3.34563 18.8983V18.4546H5.43619V18.8983H4.65689V21.0001H4.12493V18.8983H3.34563ZM6.09547 21.0001V18.4546H7.81067V18.8983H6.63365V19.5049H7.72242V19.9486H6.63365V20.5563H7.81564V21.0001H6.09547ZM11.065 18.8983V18.4546H13.1556V18.8983H12.3763V21.0001H11.8443V18.8983H11.065Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_11176_25357\">\n <rect width={24} height={24} fill=\"currentColor\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\nexport default IcoPolygonGasTestnet;\n"],"names":["IcoPolygonGasTestnet","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAuB,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAEvF,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,cACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,oBACUF,EAAO,GACpBC,EAEH,SAAA,CAAAF,EAAQM,eAAO,GAAIL,EAAU,SAAAD,IAAiB,KAC/CM,EAAAA,SAAG,SAAS,0BACV,SAAAA,EAAAA,IAAA,OAAA,CACE,SAAS,UACT,SAAS,UACT,EAAE,sjIACF,KAAK,gBAEL,CAAA,EACJA,EAAAA,qBACEA,EAAAA,IAAU,WAAA,CAAA,GAAG,oBAAmB,SAC9BA,EAAAA,YAAM,MAAO,GAAI,OAAQ,GAAI,KAAK,gBACzB,CAAA,CAAA,CAAA,CACN,CACH,CAAA,CAEV"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),L=require("@styled/tokens");const c=({color:t,title:C,titleId:l,...i})=>{const r=t||L.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:r,"aria-labelledby":l,...i,children:[C?e.jsx("title",{id:l,children:C}):null,e.jsx("g",{clipPath:"url(#clip0_11176_21224)",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 3C1.5 1.34531 2.84531 0 4.5 0H12C13.6547 0 15 1.34531 15 3V12H15.375C17.6531 12 19.5 13.8469 19.5 16.125V17.625C19.5 18.2484 20.0016 18.75 20.625 18.75C21.2484 18.75 21.75 18.2484 21.75 17.625V10.4062C20.4562 10.0734 19.5 8.89688 19.5 7.5V4.5L18 3C17.5875 2.5875 17.5875 1.9125 18 1.5C18.4125 1.0875 19.0875 1.0875 19.5 1.5L23.1234 5.12344C23.6859 5.68594 24 6.45 24 7.24688V17.625C24 19.4906 22.4906 21 20.625 21C18.7594 21 17.25 19.4906 17.25 17.625V16.125C17.25 15.0891 16.4109 14.25 15.375 14.25H15V21C15.8297 21 16.5 21.6703 16.5 22.5C16.5 23.3297 15.8297 24 15 24H1.5C0.670312 24 0 23.3297 0 22.5C0 21.6703 0.670312 21 1.5 21V3ZM3.5 2.85C3.5 2.38056 3.88056 2 4.35 2H12.15C12.6194 2 13 2.38056 13 2.85V5.15C13 5.61944 12.6194 6 12.15 6H4.35C3.88056 6 3.5 5.61944 3.5 5.15V2.85ZM10.436 13.2923C10.2807 13.2033 10.0809 13.2033 9.90339 13.2923L8.66057 14.0267L7.81723 14.4941L6.59661 15.2285C6.44125 15.3175 6.24151 15.3175 6.06397 15.2285L5.10966 14.6499C4.95431 14.5608 4.84334 14.3828 4.84334 14.1825V13.0697C4.84334 12.8917 4.93211 12.7136 5.10966 12.6024L6.06397 12.046C6.21932 11.957 6.41906 11.957 6.59661 12.046L7.55091 12.6246C7.70627 12.7136 7.81723 12.8917 7.81723 13.092V13.8264L8.66057 13.3368V12.5801C8.66057 12.4021 8.5718 12.224 8.39426 12.1128L6.6188 11.0668C6.46345 10.9777 6.26371 10.9777 6.08616 11.0668L4.26632 12.135C4.08877 12.224 4 12.4021 4 12.5801V14.6721C4 14.8501 4.08877 15.0282 4.26632 15.1395L6.06397 16.1855C6.21932 16.2745 6.41906 16.2745 6.59661 16.1855L7.81723 15.4733L8.66057 14.9837L9.8812 14.2715C10.0366 14.1825 10.2363 14.1825 10.4138 14.2715L11.3681 14.8279C11.5235 14.9169 11.6345 15.095 11.6345 15.2953V16.408C11.6345 16.5861 11.5457 16.7641 11.3681 16.8754L10.436 17.4318C10.2807 17.5208 10.0809 17.5208 9.90339 17.4318L8.94909 16.8754C8.79373 16.7864 8.68277 16.6083 8.68277 16.408V15.6958L7.83943 16.1855V16.9199C7.83943 17.0979 7.9282 17.276 8.10574 17.3872L9.90339 18.4332C10.0587 18.5223 10.2585 18.5223 10.436 18.4332L12.2337 17.3872C12.389 17.2982 12.5 17.1202 12.5 16.9199V14.8056C12.5 14.6276 12.4112 14.4496 12.2337 14.3383L10.436 13.2923Z",fill:"currentColor"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_11176_21224",children:e.jsx("rect",{width:24,height:24,fill:"currentColor"})})})]})};exports.default=c;
2
+ //# sourceMappingURL=ico-polygon-gas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ico-polygon-gas.js","sources":["../../../../src/components/icons/ico-polygon-gas.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoPolygonGas = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <g clipPath=\"url(#clip0_11176_21224)\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M1.5 3C1.5 1.34531 2.84531 0 4.5 0H12C13.6547 0 15 1.34531 15 3V12H15.375C17.6531 12 19.5 13.8469 19.5 16.125V17.625C19.5 18.2484 20.0016 18.75 20.625 18.75C21.2484 18.75 21.75 18.2484 21.75 17.625V10.4062C20.4562 10.0734 19.5 8.89688 19.5 7.5V4.5L18 3C17.5875 2.5875 17.5875 1.9125 18 1.5C18.4125 1.0875 19.0875 1.0875 19.5 1.5L23.1234 5.12344C23.6859 5.68594 24 6.45 24 7.24688V17.625C24 19.4906 22.4906 21 20.625 21C18.7594 21 17.25 19.4906 17.25 17.625V16.125C17.25 15.0891 16.4109 14.25 15.375 14.25H15V21C15.8297 21 16.5 21.6703 16.5 22.5C16.5 23.3297 15.8297 24 15 24H1.5C0.670312 24 0 23.3297 0 22.5C0 21.6703 0.670312 21 1.5 21V3ZM3.5 2.85C3.5 2.38056 3.88056 2 4.35 2H12.15C12.6194 2 13 2.38056 13 2.85V5.15C13 5.61944 12.6194 6 12.15 6H4.35C3.88056 6 3.5 5.61944 3.5 5.15V2.85ZM10.436 13.2923C10.2807 13.2033 10.0809 13.2033 9.90339 13.2923L8.66057 14.0267L7.81723 14.4941L6.59661 15.2285C6.44125 15.3175 6.24151 15.3175 6.06397 15.2285L5.10966 14.6499C4.95431 14.5608 4.84334 14.3828 4.84334 14.1825V13.0697C4.84334 12.8917 4.93211 12.7136 5.10966 12.6024L6.06397 12.046C6.21932 11.957 6.41906 11.957 6.59661 12.046L7.55091 12.6246C7.70627 12.7136 7.81723 12.8917 7.81723 13.092V13.8264L8.66057 13.3368V12.5801C8.66057 12.4021 8.5718 12.224 8.39426 12.1128L6.6188 11.0668C6.46345 10.9777 6.26371 10.9777 6.08616 11.0668L4.26632 12.135C4.08877 12.224 4 12.4021 4 12.5801V14.6721C4 14.8501 4.08877 15.0282 4.26632 15.1395L6.06397 16.1855C6.21932 16.2745 6.41906 16.2745 6.59661 16.1855L7.81723 15.4733L8.66057 14.9837L9.8812 14.2715C10.0366 14.1825 10.2363 14.1825 10.4138 14.2715L11.3681 14.8279C11.5235 14.9169 11.6345 15.095 11.6345 15.2953V16.408C11.6345 16.5861 11.5457 16.7641 11.3681 16.8754L10.436 17.4318C10.2807 17.5208 10.0809 17.5208 9.90339 17.4318L8.94909 16.8754C8.79373 16.7864 8.68277 16.6083 8.68277 16.408V15.6958L7.83943 16.1855V16.9199C7.83943 17.0979 7.9282 17.276 8.10574 17.3872L9.90339 18.4332C10.0587 18.5223 10.2585 18.5223 10.436 18.4332L12.2337 17.3872C12.389 17.2982 12.5 17.1202 12.5 16.9199V14.8056C12.5 14.6276 12.4112 14.4496 12.2337 14.3383L10.436 13.2923Z\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_11176_21224\">\n <rect width={24} height={24} fill=\"currentColor\" />\n </clipPath>\n </defs>\n </svg>\n );\n};\nexport default IcoPolygonGas;\n"],"names":["IcoPolygonGas","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAgB,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAEhF,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,cACE,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,oBACUF,EAAO,GACpBC,EAEH,SAAA,CAAAF,EAAQM,eAAO,GAAIL,EAAU,SAAAD,IAAiB,KAC/CM,EAAAA,SAAG,SAAS,0BACV,SAAAA,EAAAA,IAAA,OAAA,CACE,SAAS,UACT,SAAS,UACT,EAAE,wjEACF,KAAK,gBAEL,CAAA,EACJA,EAAAA,qBACEA,EAAAA,IAAU,WAAA,CAAA,GAAG,oBAAmB,SAC9BA,EAAAA,YAAM,MAAO,GAAI,OAAQ,GAAI,KAAK,gBACzB,CAAA,CAAA,CAAA,CACN,CACH,CAAA,CAEV"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),d=require("@styled/tokens");const n=({color:r,title:l,titleId:t,...i})=>{const o=r||d.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.6591 16.0996C24.1136 15.6451 24.1136 14.9081 23.6591 14.4535C23.2045 13.999 22.4675 13.999 22.013 14.4535L19.6096 16.8569L19.6097 5.16392C19.6097 4.52107 19.0886 3.99993 18.4458 3.99992C17.8029 3.99991 17.2818 4.52104 17.2818 5.16389L17.2816 16.8568L14.8784 14.4536C14.4238 13.9991 13.6868 13.9991 13.2323 14.4536C12.7777 14.9082 12.7777 15.6452 13.2323 16.0998L17.6226 20.49C18.0771 20.9446 18.8141 20.9446 19.2687 20.49L23.6591 16.0996Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.7677 8.74592C11.2223 9.20048 11.2223 9.93748 10.7677 10.392C10.3132 10.8466 9.57618 10.8466 9.12161 10.392L6.71823 7.98866L6.71839 19.6816C6.7184 20.3245 6.19727 20.8456 5.55442 20.8456C4.91156 20.8457 4.39042 20.3245 4.39041 19.6817L4.39025 7.98873L1.98705 10.3919C1.53249 10.8465 0.79549 10.8465 0.340924 10.3919C-0.113641 9.93737 -0.113642 9.20037 0.340924 8.74581L4.73121 4.35552C5.18578 3.90095 5.92277 3.90096 6.37734 4.35552L10.7677 8.74592Z",fill:"currentColor"})]})};exports.default=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),d=require("@styled/tokens");const n=({color:r,title:l,titleId:t,...i})=>{const o=r||d.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.6591 16.0996C24.1136 15.6451 24.1136 14.9081 23.6591 14.4535C23.2045 13.999 22.4675 13.999 22.013 14.4535L19.6096 16.8569L19.6097 5.16392C19.6097 4.52107 19.0886 3.99993 18.4458 3.99992C17.8029 3.99991 17.2818 4.52104 17.2818 5.16389L17.2816 16.8568L14.8784 14.4536C14.4238 13.9991 13.6868 13.9991 13.2323 14.4536C12.7777 14.9082 12.7777 15.6452 13.2323 16.0998L17.6225 20.49C18.0771 20.9446 18.8141 20.9446 19.2687 20.49L23.6591 16.0996Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.7677 8.74592C11.2223 9.20048 11.2223 9.93748 10.7677 10.392C10.3132 10.8466 9.57618 10.8466 9.12161 10.392L6.71823 7.98866L6.71839 19.6816C6.7184 20.3245 6.19727 20.8456 5.55442 20.8456C4.91156 20.8457 4.39042 20.3245 4.39041 19.6817L4.39025 7.98873L1.98705 10.3919C1.53249 10.8465 0.795489 10.8465 0.340924 10.3919C-0.113641 9.93737 -0.113642 9.20037 0.340923 8.74581L4.73121 4.35552C5.18577 3.90095 5.92277 3.90096 6.37734 4.35552L10.7677 8.74592Z",fill:"currentColor"})]})};exports.default=n;
2
2
  //# sourceMappingURL=ico-swap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ico-swap.js","sources":["../../../../src/components/icons/ico-swap.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoSwap = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M23.6591 16.0996C24.1136 15.6451 24.1136 14.9081 23.6591 14.4535C23.2045 13.999 22.4675 13.999 22.013 14.4535L19.6096 16.8569L19.6097 5.16392C19.6097 4.52107 19.0886 3.99993 18.4458 3.99992C17.8029 3.99991 17.2818 4.52104 17.2818 5.16389L17.2816 16.8568L14.8784 14.4536C14.4238 13.9991 13.6868 13.9991 13.2323 14.4536C12.7777 14.9082 12.7777 15.6452 13.2323 16.0998L17.6226 20.49C18.0771 20.9446 18.8141 20.9446 19.2687 20.49L23.6591 16.0996Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M10.7677 8.74592C11.2223 9.20048 11.2223 9.93748 10.7677 10.392C10.3132 10.8466 9.57618 10.8466 9.12161 10.392L6.71823 7.98866L6.71839 19.6816C6.7184 20.3245 6.19727 20.8456 5.55442 20.8456C4.91156 20.8457 4.39042 20.3245 4.39041 19.6817L4.39025 7.98873L1.98705 10.3919C1.53249 10.8465 0.79549 10.8465 0.340924 10.3919C-0.113641 9.93737 -0.113642 9.20037 0.340924 8.74581L4.73121 4.35552C5.18578 3.90095 5.92277 3.90096 6.37734 4.35552L10.7677 8.74592Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoSwap;\n"],"names":["IcoSwap","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAU,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE1E,MAAMC,EAAQJ,GAAeK,EAAM,MAAA,qBAAqB,EACxD,OACEC,EAAAA,KACE,MAAA,CAAA,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,KACbC,EAAK,SAAA,CAERF,EAAQM,EAAAA,IAAA,QAAA,CAAO,GAAIL,WAAUD,CAAK,CAAA,EAAY,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,6bACF,KAAK,cAAc,CAAA,EAErBA,EAAAA,IAAA,OAAA,CACE,SAAS,UACT,SAAS,UACT,EAAE,ucACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
1
+ {"version":3,"file":"ico-swap.js","sources":["../../../../src/components/icons/ico-swap.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoSwap = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M23.6591 16.0996C24.1136 15.6451 24.1136 14.9081 23.6591 14.4535C23.2045 13.999 22.4675 13.999 22.013 14.4535L19.6096 16.8569L19.6097 5.16392C19.6097 4.52107 19.0886 3.99993 18.4458 3.99992C17.8029 3.99991 17.2818 4.52104 17.2818 5.16389L17.2816 16.8568L14.8784 14.4536C14.4238 13.9991 13.6868 13.9991 13.2323 14.4536C12.7777 14.9082 12.7777 15.6452 13.2323 16.0998L17.6225 20.49C18.0771 20.9446 18.8141 20.9446 19.2687 20.49L23.6591 16.0996Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M10.7677 8.74592C11.2223 9.20048 11.2223 9.93748 10.7677 10.392C10.3132 10.8466 9.57618 10.8466 9.12161 10.392L6.71823 7.98866L6.71839 19.6816C6.7184 20.3245 6.19727 20.8456 5.55442 20.8456C4.91156 20.8457 4.39042 20.3245 4.39041 19.6817L4.39025 7.98873L1.98705 10.3919C1.53249 10.8465 0.795489 10.8465 0.340924 10.3919C-0.113641 9.93737 -0.113642 9.20037 0.340923 8.74581L4.73121 4.35552C5.18577 3.90095 5.92277 3.90096 6.37734 4.35552L10.7677 8.74592Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoSwap;\n"],"names":["IcoSwap","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAU,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE1E,MAAMC,EAAQJ,GAAeK,EAAM,MAAA,qBAAqB,EACxD,OACEC,EAAAA,KACE,MAAA,CAAA,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,EACU,kBAAAF,KACbC,EAAK,SAAA,CAERF,EAAQM,EAAAA,IAAA,QAAA,CAAO,GAAIL,WAAUD,CAAK,CAAA,EAAY,KAC/CM,EAAAA,YACE,SAAS,UACT,SAAS,UACT,EAAE,6bACF,KAAK,cAAc,CAAA,EAErBA,EAAAA,IAAA,OAAA,CACE,SAAS,UACT,SAAS,UACT,EAAE,wcACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("@styled/tokens");const s=({color:r,title:l,titleId:t,...i})=>{const o=r||n.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{d:"M12 9C12.5523 9 13 9.44772 13 10V14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14V10C11 9.44772 11.4477 9 12 9Z",fill:"currentColor"}),e.jsx("path",{d:"M11.9946 16.75C11.3043 16.75 10.7446 17.3096 10.7446 18C10.7446 18.6904 11.3043 19.25 11.9946 19.25H12.0036C12.694 19.25 13.2536 18.6904 13.2536 18C13.2536 17.3096 12.694 16.75 12.0036 16.75H11.9946Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36633 3.74008C10.5034 1.65549 13.4967 1.65548 14.6337 3.74008L23.2646 19.5634C24.355 21.5626 22.9081 24 20.6309 24H3.36908C1.0919 24 -0.355043 21.5625 0.735391 19.5634L9.36633 3.74008ZM12.8779 4.69778C12.4989 4.00292 11.5011 4.00292 11.1221 4.69778L2.49118 20.5211C2.1277 21.1875 2.61002 22 3.36908 22H20.6309C21.39 22 21.8723 21.1875 21.5088 20.5211L12.8779 4.69778Z",fill:"currentColor"})]})};exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("@styled/tokens");const s=({color:r,title:l,titleId:t,...i})=>{const o=r||n.token("colors.text.primary");return e.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:o,"aria-labelledby":t,...i,children:[l?e.jsx("title",{id:t,children:l}):null,e.jsx("path",{d:"M12 9C12.5523 9 13 9.44772 13 10V14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14V10C11 9.44772 11.4477 9 12 9Z",fill:"currentColor"}),e.jsx("path",{d:"M11.9947 16.75C11.3043 16.75 10.7447 17.3096 10.7447 18C10.7447 18.6904 11.3043 19.25 11.9947 19.25H12.0036C12.694 19.25 13.2536 18.6904 13.2536 18C13.2536 17.3096 12.694 16.75 12.0036 16.75H11.9947Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36637 3.74008C10.5034 1.65549 13.4967 1.65548 14.6337 3.74008L23.2646 19.5634C24.3551 21.5626 22.9081 24 20.6309 24H3.36911C1.09193 24 -0.355013 21.5625 0.735422 19.5634L9.36637 3.74008ZM12.8779 4.69778C12.4989 4.00292 11.5012 4.00292 11.1222 4.69778L2.49121 20.5211C2.12773 21.1875 2.61005 22 3.36911 22H20.6309C21.39 22 21.8723 21.1875 21.5088 20.5211L12.8779 4.69778Z",fill:"currentColor"})]})};exports.default=s;
2
2
  //# sourceMappingURL=ico-warning.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ico-warning.js","sources":["../../../../src/components/icons/ico-warning.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoWarning = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n d=\"M12 9C12.5523 9 13 9.44772 13 10V14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14V10C11 9.44772 11.4477 9 12 9Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.9946 16.75C11.3043 16.75 10.7446 17.3096 10.7446 18C10.7446 18.6904 11.3043 19.25 11.9946 19.25H12.0036C12.694 19.25 13.2536 18.6904 13.2536 18C13.2536 17.3096 12.694 16.75 12.0036 16.75H11.9946Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.36633 3.74008C10.5034 1.65549 13.4967 1.65548 14.6337 3.74008L23.2646 19.5634C24.355 21.5626 22.9081 24 20.6309 24H3.36908C1.0919 24 -0.355043 21.5625 0.735391 19.5634L9.36633 3.74008ZM12.8779 4.69778C12.4989 4.00292 11.5011 4.00292 11.1221 4.69778L2.49118 20.5211C2.1277 21.1875 2.61002 22 3.36908 22H20.6309C21.39 22 21.8723 21.1875 21.5088 20.5211L12.8779 4.69778Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoWarning;\n"],"names":["IcoWarning","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAa,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE7E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OACE,MAAA,CAAA,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,oBACUF,EAAO,GACpBC,EAEH,SAAA,CAAAF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAO,SAAGD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,IAAA,OAAA,CACE,EAAE,4HACF,KAAK,cAAc,CAAA,EAErBA,EAAAA,IACE,OAAA,CAAA,EAAE,0MACF,KAAK,cACL,CAAA,EACFA,cACE,SAAS,UACT,SAAS,UACT,EAAE,qXACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
1
+ {"version":3,"file":"ico-warning.js","sources":["../../../../src/components/icons/ico-warning.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { token } from '@styled/tokens';\ninterface SVGRProps {\n title?: string;\n titleId?: string;\n}\nexport interface Props extends SVGRProps, SVGProps<SVGSVGElement> {\n /**\n * Configures icon color on monochrome svgs.\n */\n color?: string;\n}\nconst IcoWarning = ({ color: customColor, title, titleId, ...props }: Props) => {\n // Utilize dynamic primary text color by default\n const color = customColor || token('colors.text.primary');\n return (\n <svg\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n color={color}\n aria-labelledby={titleId}\n {...props}\n >\n {title ? <title id={titleId}>{title}</title> : null}\n <path\n d=\"M12 9C12.5523 9 13 9.44772 13 10V14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14V10C11 9.44772 11.4477 9 12 9Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.9947 16.75C11.3043 16.75 10.7447 17.3096 10.7447 18C10.7447 18.6904 11.3043 19.25 11.9947 19.25H12.0036C12.694 19.25 13.2536 18.6904 13.2536 18C13.2536 17.3096 12.694 16.75 12.0036 16.75H11.9947Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M9.36637 3.74008C10.5034 1.65549 13.4967 1.65548 14.6337 3.74008L23.2646 19.5634C24.3551 21.5626 22.9081 24 20.6309 24H3.36911C1.09193 24 -0.355013 21.5625 0.735422 19.5634L9.36637 3.74008ZM12.8779 4.69778C12.4989 4.00292 11.5012 4.00292 11.1222 4.69778L2.49121 20.5211C2.12773 21.1875 2.61005 22 3.36911 22H20.6309C21.39 22 21.8723 21.1875 21.5088 20.5211L12.8779 4.69778Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\nexport default IcoWarning;\n"],"names":["IcoWarning","customColor","title","titleId","props","color","token","_jsxs","_jsx"],"mappings":"mIAYA,MAAMA,EAAa,CAAC,CAAE,MAAOC,EAAa,MAAAC,EAAO,QAAAC,EAAS,GAAGC,CAAK,IAAa,CAE7E,MAAMC,EAAQJ,GAAeK,EAAAA,MAAM,qBAAqB,EACxD,OACEC,OACE,MAAA,CAAA,MAAO,GACP,OAAQ,GACR,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAOF,oBACUF,EAAO,GACpBC,EAEH,SAAA,CAAAF,EAAQM,EAAAA,IAAO,QAAA,CAAA,GAAIL,EAAO,SAAGD,CAAc,CAAA,EAAG,KAC/CM,EAAAA,IAAA,OAAA,CACE,EAAE,4HACF,KAAK,cAAc,CAAA,EAErBA,EAAAA,IACE,OAAA,CAAA,EAAE,0MACF,KAAK,cACL,CAAA,EACFA,cACE,SAAS,UACT,SAAS,UACT,EAAE,wXACF,KAAK,cACL,CAAA,CAAA,CAAA,CAAA,CAGR"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@styled/tokens"),p=require("../icons/ico-checkmark.js"),q=require("../icons/ico-copy.js"),j=require("../icons/ico-eye-closed.js"),k=require("../icons/ico-eye-opened.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var v=require("../primitives/text.js"),u=require("@styled/css"),c=require("@styled/jsx"),w=require("@styled/patterns"),t=require("react");const h=b=>{const{content:i,onCopy:s,showHideButton:o}=b,[l,a]=t.useState(!!o),[n,d]=t.useState(!1);t.useEffect(()=>{if(n){const x=setTimeout(()=>{d(!1)},1500);return()=>clearTimeout(x)}},[n]),t.useEffect(()=>{a(!!o)},[o]);const f=t.useCallback(()=>{s&&(s(i),d(!0))},[i]);return e.jsxs(c.HStack,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[e.jsx(c.Box,{textWrap:"nowrap",overflow:"hidden",filter:l?"blur(10px)":"",children:e.jsx("p",{className:u.css({overflow:"hidden",textOverflow:"ellipsis",color:"text.primary"}),children:i})}),l&&e.jsxs("button",{className:w.center({position:"absolute",width:"full",height:"full",left:0,gap:2,cursor:"pointer",rounded:10,outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5}),onClick:()=>a(!1),"aria-label":"show",children:[e.jsx(v.default,{size:"sm",styles:{fontWeight:600,color:r.token("colors.brand.base")},children:"Show"}),e.jsx(k.default,{width:20,height:20,color:r.token("colors.brand.base")})]}),e.jsxs(c.HStack,{children:[o&&!l&&e.jsx("button",{className:u.css({cursor:"pointer",outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5}),onClick:()=>a(!0),"aria-label":"hide",children:e.jsx(j.default,{width:20,height:20,color:r.token("colors.brand.base")})}),s&&e.jsx(e.Fragment,{children:n?e.jsx(p.default,{width:20,height:20,color:r.token("colors.brand.base")}):e.jsx("button",{className:u.css({cursor:"pointer",outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5,zIndex:10}),onClick:f,"aria-label":"copy",children:e.jsx(q.default,{width:20,height:20,color:r.token("colors.brand.base")})})})]})]})};h.displayName="TextBox",exports.default=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("@styled/tokens"),q=require("../icons/ico-checkmark.js"),k=require("../icons/ico-copy.js"),v=require("../icons/ico-eye-closed.js"),w=require("../icons/ico-eye-opened.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var u=require("../primitives/text.js"),h=require("@styled/css"),c=require("@styled/jsx"),C=require("@styled/patterns"),r=require("react");const f=b=>{const{content:t,onCopy:s,showHideButton:o,mono:x}=b,[n,a]=r.useState(!!o),[l,d]=r.useState(!1);r.useEffect(()=>{if(l){const j=setTimeout(()=>{d(!1)},1500);return()=>clearTimeout(j)}},[l]),r.useEffect(()=>{a(!!o)},[o]);const p=r.useCallback(()=>{s&&(s(t),d(!0))},[t]);return e.jsxs(c.HStack,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[e.jsx(c.Box,{textWrap:"nowrap",overflow:"hidden",filter:n?"blur(10px)":"",children:x?e.jsx(u.default.Mono,{truncate:!0,children:t}):e.jsx(u.default,{truncate:!0,children:t})}),n&&e.jsxs("button",{className:C.center({position:"absolute",width:"full",height:"full",left:0,gap:2,cursor:"pointer",rounded:10,outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5}),onClick:()=>a(!1),"aria-label":"show",children:[e.jsx(u.default,{size:"sm",fontWeight:"semibold",variant:"info",children:"Show"}),e.jsx(w.default,{width:20,height:20,color:i.token("colors.brand.base")})]}),e.jsxs(c.HStack,{children:[o&&!n&&e.jsx("button",{className:h.css({cursor:"pointer",outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5}),onClick:()=>a(!0),"aria-label":"hide",children:e.jsx(v.default,{width:20,height:20,color:i.token("colors.brand.base")})}),s&&e.jsx(e.Fragment,{children:l?e.jsx(q.default,{width:20,height:20,color:i.token("colors.brand.base")}):e.jsx("button",{className:h.css({cursor:"pointer",outlineColor:"brand.base",outlineWidth:"thick",outlineOffset:.5,zIndex:10}),onClick:p,"aria-label":"copy",children:e.jsx(k.default,{width:20,height:20,color:i.token("colors.brand.base")})})})]})]})};f.displayName="TextBox",exports.default=f;
2
2
  //# sourceMappingURL=text-box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Box, HStack } from '@styled/jsx';\nimport { center } from '@styled/patterns';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box textWrap=\"nowrap\" overflow=\"hidden\" filter={isHidden ? 'blur(10px)' : ''}>\n <p className={css({ overflow: 'hidden', textOverflow: 'ellipsis', color: 'text.primary' })}>{content}</p>\n </Box>\n\n {isHidden && (\n <button\n className={center({\n position: 'absolute',\n width: 'full',\n height: 'full',\n left: 0,\n gap: 2,\n cursor: 'pointer',\n rounded: 10,\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n })}\n onClick={() => setIsHidden(false)}\n aria-label=\"show\"\n >\n <Text size=\"sm\" styles={{ fontWeight: 600, color: token('colors.brand.base') }}>\n Show\n </Text>\n <IcoEyeOpened width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n\n <HStack>\n {showHideButton && !isHidden && (\n <button\n className={css({\n cursor: 'pointer',\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n })}\n onClick={() => setIsHidden(true)}\n aria-label=\"hide\"\n >\n <IcoEyeClosed width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n {onCopy && (\n <>\n {isCopied ? (\n <IcoCheckmark width={20} height={20} color={token('colors.brand.base')} />\n ) : (\n <button\n className={css({\n cursor: 'pointer',\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n zIndex: 10,\n })}\n onClick={handleOnCopy}\n aria-label=\"copy\"\n >\n <IcoCopy width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n </>\n )}\n </HStack>\n </HStack>\n );\n};\n\nTextBox.displayName = 'TextBox';\n\nexport default TextBox;\n"],"names":["TextBox","props","content","onCopy","showHideButton","isHidden","setIsHidden","useState","isCopied","setIsCopied","useEffect","timeoutId","handleOnCopy","useCallback","_jsxs","HStack","_jsx","Box","css","center","Text","token","IcoEyeOpened","IcoEyeClosed","_Fragment","IcoCheckmark","IcoCopy"],"mappings":"yrBAcMA,EAAWC,GAAuB,CACtC,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,eAAAC,CAAc,EAAKH,EACtC,CAACI,EAAUC,CAAW,EAAIC,WAAS,CAAQH,CAAAA,CAAe,EAC1D,CAACI,EAAUC,CAAW,EAAIF,EAAAA,SAAS,EAAK,EAE9CG,EAAAA,UAAU,IAAK,CACb,GAAIF,EAAU,CACZ,MAAMG,EAAY,WAAW,IAAK,CAChCF,EAAY,EAAK,CACnB,EAAG,IAAI,EAEP,MAAO,IAAM,aAAaE,CAAS,CACrC,CACF,EAAG,CAACH,CAAQ,CAAC,EAEbE,EAAU,UAAA,IAAK,CAEXJ,EADE,CAAA,CAAAF,CACc,CAIpB,EAAG,CAACA,CAAc,CAAC,EAEnB,MAAMQ,EAAeC,EAAAA,YAAY,IAAK,CAC/BV,IACLA,EAAOD,CAAO,EACdO,EAAY,EAAI,EAClB,EAAG,CAACP,CAAO,CAAC,EAEZ,OACEY,EAACC,KAAAA,EAAAA,QACC,EAAE,OACF,GAAI,EACJ,GAAI,EACJ,QAAS,GACT,GAAG,oBACH,eAAe,gBACf,SAAS,qBAETC,MAACC,OAAI,SAAS,SAAS,SAAS,SAAS,OAAQZ,EAAW,aAAe,GACzE,SAAAW,MAAA,IAAA,CAAG,UAAWE,EAAAA,IAAI,CAAE,SAAU,SAAU,aAAc,WAAY,MAAO,cAAc,CAAE,EAAI,SAAAhB,GACzF,CAAA,EAELG,GACCS,iBACE,UAAWK,EAAAA,OAAO,CAChB,SAAU,WACV,MAAO,OACP,OAAQ,OACR,KAAM,EACN,IAAK,EACL,OAAQ,UACR,QAAS,GACT,aAAc,aACd,aAAc,QACd,cAAe,EAChB,CAAA,EACD,QAAS,IAAMb,EAAY,EAAK,EAAC,aACtB,OAAM,SAAA,CAEjBU,EAAAA,IAACI,EAAAA,QAAI,CAAC,KAAK,KAAK,OAAQ,CAAE,WAAY,IAAK,MAAOC,EAAM,MAAA,mBAAmB,CAAG,EAAA,SAAA,MAAA,CAAA,EAG9EL,EAAAA,IAACM,EAAAA,QAAY,CAAC,MAAO,GAAI,OAAQ,GAAI,MAAOD,EAAAA,MAAM,mBAAmB,CAAK,CAAA,CAAA,CAAA,CAAA,EAI9EP,EAAAA,KAACC,EAAAA,kBACEX,GAAkB,CAACC,GAClBW,EAAAA,IAAA,SAAA,CACE,UAAWE,MAAI,CACb,OAAQ,UACR,aAAc,aACd,aAAc,QACd,cAAe,EAChB,CAAA,EACD,QAAS,IAAMZ,EAAY,EAAI,EAAC,aACrB,OAAM,SAEjBU,EAAAA,IAACO,EAAAA,QAAY,CAAC,MAAO,GAAI,OAAQ,GAAI,MAAOF,QAAM,mBAAmB,CAAK,CAAA,CAAA,CAAA,EAG7ElB,GACCa,EAAAA,IACGQ,WAAA,CAAA,SAAAhB,EACCQ,EAACS,IAAAA,EAAAA,QAAY,CAAC,MAAO,GAAI,OAAQ,GAAI,MAAOJ,QAAM,mBAAmB,CAAK,CAAA,EAE1EL,EAAAA,IAAA,SAAA,CACE,UAAWE,MAAI,CACb,OAAQ,UACR,aAAc,aACd,aAAc,QACd,cAAe,GACf,OAAQ,EACT,CAAA,EACD,QAASN,eACE,OAAM,SAEjBI,EAAAA,IAACU,EAAAA,QAAQ,CAAA,MAAO,GAAI,OAAQ,GAAI,MAAOL,EAAAA,MAAM,mBAAmB,CAAC,CAAA,CAC1D,CAAA,CAEV,CAAA,CACJ,CACM,CAAA,CAAA,CAAA,CAAA,CAGf,EAEArB,EAAQ,YAAc"}
1
+ {"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Box, HStack } from '@styled/jsx';\nimport { center } from '@styled/patterns';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n mono?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton, mono } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box textWrap=\"nowrap\" overflow=\"hidden\" filter={isHidden ? 'blur(10px)' : ''}>\n {mono ? <Text.Mono truncate>{content}</Text.Mono> : <Text truncate>{content}</Text>}\n </Box>\n\n {isHidden && (\n <button\n className={center({\n position: 'absolute',\n width: 'full',\n height: 'full',\n left: 0,\n gap: 2,\n cursor: 'pointer',\n rounded: 10,\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n })}\n onClick={() => setIsHidden(false)}\n aria-label=\"show\"\n >\n <Text size=\"sm\" fontWeight=\"semibold\" variant=\"info\">\n Show\n </Text>\n <IcoEyeOpened width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n\n <HStack>\n {showHideButton && !isHidden && (\n <button\n className={css({\n cursor: 'pointer',\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n })}\n onClick={() => setIsHidden(true)}\n aria-label=\"hide\"\n >\n <IcoEyeClosed width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n {onCopy && (\n <>\n {isCopied ? (\n <IcoCheckmark width={20} height={20} color={token('colors.brand.base')} />\n ) : (\n <button\n className={css({\n cursor: 'pointer',\n outlineColor: 'brand.base',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n zIndex: 10,\n })}\n onClick={handleOnCopy}\n aria-label=\"copy\"\n >\n <IcoCopy width={20} height={20} color={token('colors.brand.base')} />\n </button>\n )}\n </>\n )}\n </HStack>\n </HStack>\n );\n};\n\nTextBox.displayName = 'TextBox';\n\nexport default TextBox;\n"],"names":["TextBox","props","content","onCopy","showHideButton","mono","isHidden","setIsHidden","useState","isCopied","setIsCopied","useEffect","timeoutId","handleOnCopy","useCallback","_jsxs","HStack","_jsx","Box","Text","center","IcoEyeOpened","token","css","IcoEyeClosed","_Fragment","IcoCheckmark","IcoCopy"],"mappings":"yrBAeMA,EAAWC,GAAuB,CACtC,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,eAAAC,EAAgB,KAAAC,CAAI,EAAKJ,EAC5C,CAACK,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAQJ,CAAe,EAC1D,CAACK,EAAUC,CAAW,EAAIF,EAAAA,SAAS,EAAK,EAE9CG,EAAU,UAAA,IAAK,CACb,GAAIF,EAAU,CACZ,MAAMG,EAAY,WAAW,IAAK,CAChCF,EAAY,EAAK,CACnB,EAAG,IAAI,EAEP,MAAO,IAAM,aAAaE,CAAS,CACrC,CACF,EAAG,CAACH,CAAQ,CAAC,EAEbE,EAAAA,UAAU,IAAK,CAEXJ,EADE,CAAAH,CAAAA,CACc,CAIpB,EAAG,CAACA,CAAc,CAAC,EAEnB,MAAMS,EAAeC,EAAAA,YAAY,IAAK,CAC/BX,IACLA,EAAOD,CAAO,EACdQ,EAAY,EAAI,EAClB,EAAG,CAACR,CAAO,CAAC,EAEZ,OACEa,EAAAA,KAACC,EAAAA,QACC,EAAE,OACF,GAAI,EACJ,GAAI,EACJ,QAAS,GACT,GAAG,oBACH,eAAe,gBACf,SAAS,qBAETC,EAAAA,IAACC,EAAAA,KAAI,SAAS,SAAS,SAAS,SAAS,OAAQZ,EAAW,aAAe,YACxED,EAAOY,EAAAA,IAACE,EAAAA,QAAK,MAAK,SAAQ,GAAA,SAAEjB,CAAO,CAAA,EAAgBe,EAACE,IAAAA,UAAI,CAAC,SAAU,GAAA,SAAAjB,GAChE,CAAA,EAELI,GACCS,EAAAA,eACE,UAAWK,EAAAA,OAAO,CAChB,SAAU,WACV,MAAO,OACP,OAAQ,OACR,KAAM,EACN,IAAK,EACL,OAAQ,UACR,QAAS,GACT,aAAc,aACd,aAAc,QACd,cAAe,EAChB,CAAA,EACD,QAAS,IAAMb,EAAY,EAAK,EACrB,aAAA,OAEX,SAAA,CAAAU,MAACE,EAAI,QAAA,CAAC,KAAK,KAAK,WAAW,WAAW,QAAQ,OAAM,SAAA,MAAA,CAAA,EAGpDF,EAAAA,IAACI,UAAa,CAAA,MAAO,GAAI,OAAQ,GAAI,MAAOC,EAAM,MAAA,mBAAmB,CAAK,CAAA,CAAA,CAAA,CAAA,EAI9EP,OAACC,SACE,CAAA,SAAA,CAAAZ,GAAkB,CAACE,GAClBW,EAAAA,IAAA,SAAA,CACE,UAAWM,MAAI,CACb,OAAQ,UACR,aAAc,aACd,aAAc,QACd,cAAe,EAChB,CAAA,EACD,QAAS,IAAMhB,EAAY,EAAI,EAAC,aACrB,OAAM,SAEjBU,MAACO,EAAY,QAAA,CAAC,MAAO,GAAI,OAAQ,GAAI,MAAOF,EAAAA,MAAM,mBAAmB,CAAK,CAAA,CAAA,CAAA,EAG7EnB,GACCc,EAAAA,IACGQ,EAAAA,SAAA,CAAA,SAAAhB,EACCQ,EAAAA,IAACS,EAAAA,QAAY,CAAC,MAAO,GAAI,OAAQ,GAAI,MAAOJ,EAAAA,MAAM,mBAAmB,CAAK,CAAA,EAE1EL,EAAA,IAAA,SAAA,CACE,UAAWM,EAAAA,IAAI,CACb,OAAQ,UACR,aAAc,aACd,aAAc,QACd,cAAe,GACf,OAAQ,EACT,CAAA,EACD,QAASV,eACE,OAAM,SAEjBI,MAACU,EAAAA,QAAQ,CAAA,MAAO,GAAI,OAAQ,GAAI,MAAOL,QAAM,mBAAmB,CAAC,CAAA,CAC1D,CAAA,CAEV,CAAA,CACJ,CACM,CAAA,CAAA,CAAA,CAAA,CAGf,EAEAtB,EAAQ,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("react/jsx-runtime"),y=require("@styled/tokens"),J=require("../icons/ico-caret-down.js"),Q=require("../icons/ico-checkmark-circle-fill.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var C=require("../primitives/text.js"),j=require("@styled/css"),u=require("@styled/jsx"),n=require("react"),d=require("react-aria"),h=require("react-international-phone");const E=({iso2:f})=>o.jsx(u.Flex,{width:"1.125rem",height:"1.125rem",borderRadius:"full",borderWidth:"thin",borderColor:"neutral.primary",overflow:"hidden",align:"center",children:o.jsx(h.FlagImage,{src:`https://flagcdn.com/${f}.svg`,iso2:f,size:16,className:j.css({objectFit:"cover"})})}),V=f=>{const{onChange:_,autoFocus:M=!0,errorMessage:q}=f,[A,H]=n.useState(""),[L,k]=n.useState(!1),[l,p]=n.useState(!1),[a,b]=n.useState(0),[w,S]=n.useState(""),N=n.useRef(null),z=n.useRef(null),m=n.useRef(null),v=n.useRef([]),P=n.useRef(void 0),{country:s,setCountry:R,inputRef:g,handlePhoneValueChange:B,inputValue:O}=h.usePhoneInput({defaultCountry:"us",value:A,onChange:e=>{H(e.phone),_(e.phone)}}),i=n.useMemo(()=>{const e=h.defaultCountries.filter(([,t])=>t!==s.iso2),r=h.defaultCountries.find(([,t])=>t===s.iso2);return r?[r,...e]:[...h.defaultCountries]},[s.iso2]),I=n.useMemo(()=>i.filter(([,e])=>e!==s.iso2),[s.iso2]),W=n.useCallback(e=>{var r;R(e),p(!1),(r=g.current)===null||r===void 0||r.focus()},[R]),K=n.useCallback(()=>{p(!l),l||(b(0),setTimeout(()=>{var e;return(e=m.current)===null||e===void 0?void 0:e.focus()}))},[l]),{buttonProps:T}=d.useButton({onPress:K},N),{focusProps:F,isFocusVisible:D}=d.useFocusRing(),{keyboardProps:U}=d.useKeyboard({onKeyDown:e=>{var r;if(l)switch(e.key){case"ArrowDown":e.preventDefault(),b(t=>(t+1)%i.length);break;case"ArrowUp":e.preventDefault(),b(t=>(t-1+i.length)%i.length);break;case"Enter":if(e.preventDefault(),a>=0){const[,t]=i[a];W(t)}break;case"Escape":p(!1),(r=g.current)===null||r===void 0||r.focus();break;default:(e.key===" "||e.key.match(/[\w]/i))&&(e.preventDefault(),clearTimeout(P.current),S(t=>t+e.key),P.current=window.setTimeout(()=>{S("")},1e3));break}}});n.useEffect(()=>{var e;M&&((e=g.current)===null||e===void 0||e.focus());const r=t=>{m.current&&!m.current.contains(t.target)&&(p(!1),k(!1))};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[]),n.useEffect(()=>{var e;if(w!==""){const r=I.findIndex(([t])=>t.toLowerCase().startsWith(w.toLowerCase()));if(r!==-1){const t=i.findIndex(([x])=>x===I[r][0]);b(t),(e=v.current[t])===null||e===void 0||e.scrollIntoView({behavior:"smooth",block:"nearest"})}}},[w,i,s.iso2]),n.useEffect(()=>{var e;a>=0&&v.current[a]&&((e=v.current[a])===null||e===void 0||e.scrollIntoView({behavior:"smooth",block:"nearest"}))},[a]);const Y=()=>{k(!0)},$=()=>{k(!1)};return o.jsxs(u.VStack,{gap:2,children:[o.jsxs(u.Flex,{...d.mergeProps(U,F),ref:z,height:"fit-content",width:"full",alignItems:"center",justify:"center",borderWidth:"thin",borderColor:"neutral.secondary",borderRadius:"input",transition:"all linear 120ms",outlineColor:"brand.base",outlineStyle:L&&!D?"solid":"none",outlineWidth:"thick",outlineOffset:.5,onFocus:Y,onBlur:$,position:"relative",_hover:{borderColor:"neutral.primary"},children:[o.jsx("button",{...d.mergeProps(T,F),className:j.css({display:"flex",justifyContent:"center",alignItems:"center",borderStartRadius:"input",h:12,w:20,px:3,outlineColor:"brand.base",outlineStyle:D?"solid":"none",outlineWidth:"thick",outlineOffset:.5,cursor:"pointer",transition:"all linear 120ms",_hover:{bg:"surface.tertiary"}}),children:o.jsxs(u.HStack,{gap:2,children:[o.jsx(E,{iso2:s.iso2}),o.jsx(J.default,{width:14,height:14,transform:l?"rotate(180)":""})]})}),l&&o.jsx(u.Box,{ref:m,tabIndex:-1,bg:"surface.primary",position:"absolute",w:"full",rounded:"input",top:55,boxShadow:"4px 8px 20px 0px rgba(0, 0, 0, 0.15)",maxHeight:"17.5rem",overflowY:"auto",outline:"none",children:i.map(([e,r,t],x)=>{const c=s.iso2===r;return o.jsxs(u.HStack,{cursor:"pointer",bg:c?"brand.base":a===x?"brand.lightest":"",_hover:c?{}:{bg:"brand.lightest"},ref:G=>v.current[x]=G,gap:2,p:4,onClick:()=>W(r),justify:"space-between",children:[o.jsxs(u.HStack,{gap:4,children:[c?o.jsx(Q.default,{width:18,height:18,color:y.token("colors.surface.primary")}):o.jsx(E,{iso2:r}),o.jsx(C.default,{styles:{color:c?y.token("colors.surface.primary"):""},children:e})]}),o.jsxs(C.default,{styles:{color:c?y.token("colors.surface.primary"):y.token("colors.text.tertiary")},children:["+",t]})]},r)})}),o.jsx("input",{type:"tel",inputMode:"tel",onChange:B,value:O,ref:g,className:j.css({transition:"all linear 120ms",width:"full",boxSizing:"border-box",borderLeftWidth:"thin",borderColor:"neutral.secondary",rounded:0,margin:0,minWidth:10,fontWeight:"medium",backgroundColor:"transparent",color:"text.primary",height:12,fontSize:"md",py:3,px:4,textAlign:"left",outline:"none",_placeholder:{color:"text.tertiary"}})})]}),q&&o.jsx(C.default,{variant:"error",size:"sm",styles:{fontWeight:"400"},children:q})]})};V.displayName="PhoneInput",exports.default=V;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("react/jsx-runtime"),G=require("@styled/tokens"),J=require("../icons/ico-caret-down.js"),Q=require("../icons/ico-checkmark-circle-fill.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var k=require("../primitives/text.js"),j=require("@styled/css"),u=require("@styled/jsx"),n=require("react"),d=require("react-aria"),h=require("react-international-phone");const D=({iso2:f})=>o.jsx(u.Flex,{width:"1.125rem",height:"1.125rem",borderRadius:"full",borderWidth:"thin",borderColor:"neutral.primary",overflow:"hidden",align:"center",children:o.jsx(h.FlagImage,{src:`https://flagcdn.com/${f}.svg`,iso2:f,size:16,className:j.css({objectFit:"cover"})})}),E=f=>{const{onChange:V,autoFocus:_=!0,errorMessage:C}=f,[M,z]=n.useState(""),[A,y]=n.useState(!1),[l,p]=n.useState(!1),[a,b]=n.useState(0),[w,q]=n.useState(""),H=n.useRef(null),L=n.useRef(null),m=n.useRef(null),v=n.useRef([]),S=n.useRef(void 0),{country:i,setCountry:P,inputRef:x,handlePhoneValueChange:N,inputValue:O}=h.usePhoneInput({defaultCountry:"us",value:M,onChange:e=>{z(e.phone),V(e.phone)}}),s=n.useMemo(()=>{const e=h.defaultCountries.filter(([,t])=>t!==i.iso2),r=h.defaultCountries.find(([,t])=>t===i.iso2);return r?[r,...e]:[...h.defaultCountries]},[i.iso2]),R=n.useMemo(()=>s.filter(([,e])=>e!==i.iso2),[i.iso2]),I=n.useCallback(e=>{var r;P(e),p(!1),(r=x.current)===null||r===void 0||r.focus()},[P]),B=n.useCallback(()=>{p(!l),l||(b(0),setTimeout(()=>{var e;return(e=m.current)===null||e===void 0?void 0:e.focus()}))},[l]),{buttonProps:K}=d.useButton({onPress:B},H),{focusProps:W,isFocusVisible:F}=d.useFocusRing(),{keyboardProps:T}=d.useKeyboard({onKeyDown:e=>{var r;if(l)switch(e.key){case"ArrowDown":e.preventDefault(),b(t=>(t+1)%s.length);break;case"ArrowUp":e.preventDefault(),b(t=>(t-1+s.length)%s.length);break;case"Enter":if(e.preventDefault(),a>=0){const[,t]=s[a];I(t)}break;case"Escape":p(!1),(r=x.current)===null||r===void 0||r.focus();break;default:(e.key===" "||e.key.match(/[\w]/i))&&(e.preventDefault(),clearTimeout(S.current),q(t=>t+e.key),S.current=window.setTimeout(()=>{q("")},1e3));break}}});n.useEffect(()=>{var e;_&&((e=x.current)===null||e===void 0||e.focus());const r=t=>{m.current&&!m.current.contains(t.target)&&(p(!1),y(!1))};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[]),n.useEffect(()=>{var e;if(w!==""){const r=R.findIndex(([t])=>t.toLowerCase().startsWith(w.toLowerCase()));if(r!==-1){const t=s.findIndex(([g])=>g===R[r][0]);b(t),(e=v.current[t])===null||e===void 0||e.scrollIntoView({behavior:"smooth",block:"nearest"})}}},[w,s,i.iso2]),n.useEffect(()=>{var e;a>=0&&v.current[a]&&((e=v.current[a])===null||e===void 0||e.scrollIntoView({behavior:"smooth",block:"nearest"}))},[a]);const U=()=>{y(!0)},Y=()=>{y(!1)};return o.jsxs(u.VStack,{gap:2,children:[o.jsxs(u.Flex,{...d.mergeProps(T,W),ref:L,height:"fit-content",width:"full",alignItems:"center",justify:"center",borderWidth:"thin",borderColor:"neutral.secondary",borderRadius:"input",transition:"all linear 120ms",outlineColor:"brand.base",outlineStyle:A&&!F?"solid":"none",outlineWidth:"thick",outlineOffset:.5,onFocus:U,onBlur:Y,position:"relative",_hover:{borderColor:"neutral.primary"},children:[o.jsx("button",{...d.mergeProps(K,W),className:j.css({display:"flex",justifyContent:"center",alignItems:"center",borderStartRadius:"input",h:12,w:20,px:3,outlineColor:"brand.base",outlineStyle:F?"solid":"none",outlineWidth:"thick",outlineOffset:.5,cursor:"pointer",transition:"all linear 120ms",_hover:{bg:"surface.tertiary"}}),children:o.jsxs(u.HStack,{gap:2,children:[o.jsx(D,{iso2:i.iso2}),o.jsx(J.default,{width:14,height:14,transform:l?"rotate(180)":""})]})}),l&&o.jsx(u.Box,{ref:m,tabIndex:-1,bg:"surface.primary",position:"absolute",w:"full",rounded:"input",top:55,boxShadow:"4px 8px 20px 0px rgba(0, 0, 0, 0.15)",maxHeight:"17.5rem",overflowY:"auto",outline:"none",children:s.map(([e,r,t],g)=>{const c=i.iso2===r;return o.jsxs(u.HStack,{cursor:"pointer",bg:c?"brand.base":a===g?"brand.lightest":"",_hover:c?{}:{bg:"brand.lightest"},ref:$=>v.current[g]=$,gap:2,p:4,onClick:()=>I(r),justify:"space-between",children:[o.jsxs(u.HStack,{gap:4,children:[c?o.jsx(Q.default,{width:18,height:18,color:G.token("colors.surface.primary")}):o.jsx(D,{iso2:r}),o.jsx(k.default,{color:c?"text.quaternary":"text.primary",children:e})]}),o.jsxs(k.default,{color:c?"text.quaternary":"text.tertiary",children:["+",t]})]},r)})}),o.jsx("input",{type:"tel",inputMode:"tel",onChange:N,value:O,ref:x,className:j.css({transition:"all linear 120ms",width:"full",boxSizing:"border-box",borderLeftWidth:"thin",borderColor:"neutral.secondary",rounded:0,margin:0,minWidth:10,fontWeight:"medium",backgroundColor:"transparent",color:"text.primary",height:12,fontSize:"md",py:3,px:4,textAlign:"left",outline:"none",_placeholder:{color:"text.tertiary"}})})]}),C&&o.jsx(k.default,{variant:"error",size:"sm",fontWeight:"normal",children:C})]})};E.displayName="PhoneInput",exports.default=E;
2
2
  //# sourceMappingURL=phone-input.js.map