@metamask-previews/design-system-react-native 0.53.0-preview.f03faa2 → 0.56.0-preview.12867efa
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.
- package/CHANGELOG.md +51 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +7 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +7 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +7 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +7 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +7 -1
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +7 -1
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.cjs +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.cts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.mts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.mjs +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +32 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +32 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/assets/baseball.svg +1 -0
- package/dist/components/Icon/assets/basketball.svg +1 -0
- package/dist/components/Icon/assets/bicycle.svg +1 -0
- package/dist/components/Icon/assets/boxing-glove.svg +1 -0
- package/dist/components/Icon/assets/cricket.svg +1 -0
- package/dist/components/Icon/assets/feed-post.svg +1 -0
- package/dist/components/Icon/assets/flag-checkered.svg +1 -0
- package/dist/components/Icon/assets/football.svg +1 -0
- package/dist/components/Icon/assets/game-controller.svg +1 -0
- package/dist/components/Icon/assets/golf.svg +1 -0
- package/dist/components/Icon/assets/hockey.svg +1 -0
- package/dist/components/Icon/assets/horse.svg +1 -0
- package/dist/components/Icon/assets/medal.svg +1 -0
- package/dist/components/Icon/assets/ping-pong.svg +1 -0
- package/dist/components/Icon/assets/soccer-ball.svg +1 -0
- package/dist/components/Icon/assets/tennis-ball.svg +1 -0
- package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +2 -2
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.mjs +2 -2
- package/dist/components/RadioButton/RadioButton.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs +5 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs +5 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.cts +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.mts +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M208,112a47.81,47.81,0,0,0-16.93,3.09L165.93,72H192a8,8,0,0,1,8,8,8,8,0,0,0,16,0,24,24,0,0,0-24-24H152a8,8,0,0,0-6.91,12l11.65,20H99.26L82.91,60A8,8,0,0,0,76,56H48a8,8,0,0,0,0,16H71.41L85.12,95.51,69.41,117.06a48.13,48.13,0,1,0,12.92,9.44l11.59-15.9L125.09,164A8,8,0,1,0,138.91,156l-30.32-52h57.48l11.19,19.17A48,48,0,1,0,208,112ZM80,160a32,32,0,1,1-20.21-29.74l-18.25,25a8,8,0,1,0,12.92,9.42l18.25-25A31.88,31.88,0,0,1,80,160Zm128,32a32,32,0,0,1-22.51-54.72L201.09,164A8,8,0,1,0,214.91,156L199.3,129.21A32,32,0,1,1,208,192Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M168,16H120A56.06,56.06,0,0,0,64,72H56a32,32,0,0,0-32,32v29.19a16.09,16.09,0,0,0,3.51,10,8,8,0,0,0,.62.69L64,179.34V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V177.12l15.38-53.85a15.89,15.89,0,0,0,.62-4.39V72A56.06,56.06,0,0,0,168,16Zm40,102.88L192.31,173.8A7.85,7.85,0,0,0,192,176v40H80V176a8,8,0,0,0-2.38-5.69L40,133.12V104A16,16,0,0,1,56,88h8v16a8,8,0,0,0,16,0V72a40,40,0,0,1,40-40h48a40,40,0,0,1,40,40Zm-36.42,48.28L153.89,176l17.69,8.84a8,8,0,0,1-7.16,14.32L136,184.94l-28.42,14.22a8,8,0,1,1-7.16-14.32L118.11,176l-17.69-8.84a8,8,0,1,1,7.16-14.32L136,167.06l28.42-14.22a8,8,0,1,1,7.16,14.32Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M243.31,81.37,190.63,28.69a16,16,0,0,0-22.63,0L60.69,136a16,16,0,0,0,0,22.63l20.68,20.68-47,47a8,8,0,0,0,11.32,11.32l47-47,20.68,20.68a16,16,0,0,0,22.63,0L243.31,104a16,16,0,0,0,0-22.63ZM124.69,200,104,179.31l29.66-29.65a8,8,0,0,0-11.32-11.32L92.69,168,72,147.31,107.31,112H160v52.69ZM232,92.69l-56,56V104a8,8,0,0,0-8-8H123.31l56-56L232,92.68ZM60,88A28,28,0,1,0,32,60,28,28,0,0,0,60,88Zm0-40A12,12,0,1,1,48,60,12,12,0,0,1,60,48Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.0605 2.24902C16.2575 2.24902 16.4528 2.28793 16.6348 2.36328C16.8166 2.43862 16.9819 2.54933 17.1211 2.68848L21.3105 6.87891C21.4497 7.01812 21.5604 7.18338 21.6357 7.36523C21.7111 7.5472 21.75 7.7425 21.75 7.93945C21.75 8.13638 21.7111 8.33173 21.6357 8.51367C21.5604 8.69554 21.4497 8.86079 21.3105 9L9.74999 20.5605C9.61124 20.7004 9.44563 20.8113 9.26366 20.8867C9.08173 20.9621 8.88638 21.0006 8.68945 21H4.49999C4.10218 21 3.72074 20.8418 3.43945 20.5605C3.15815 20.2792 2.99999 19.8978 2.99999 19.5V15.3105C2.99936 15.1136 3.03788 14.9183 3.11327 14.7363C3.18873 14.5544 3.29961 14.3888 3.43945 14.25L4.5205 13.168A0.76 0.76 0 0 1 5.7246 14.085L4.49999 15.3105V19.5H8.68945L16.9394 11.25L12.75 7.06055L12.085 7.72461A0.76 0.76 0 0 1 11.168 6.52051L15 2.68848C15.1392 2.54928 15.3045 2.43866 15.4863 2.36328C15.6683 2.28791 15.8636 2.24906 16.0605 2.24902ZM13.8105 6L18 10.1885L20.25 7.93848L16.0605 3.75L13.8105 6ZM11.5 10C11.5 10.4142 11.1642 10.75 10.75 10.75H8.75V12.75C8.75 13.1642 8.4142 13.5 8 13.5C7.58579 13.5 7.25 13.1642 7.25 12.75V10.75H5.25C4.83579 10.75 4.5 10.4142 4.5 10C4.5 9.58579 4.83579 9.25 5.25 9.25H7.25V7.25C7.25 6.83579 7.58579 6.5 8 6.5C8.4142 6.5 8.75 6.83579 8.75 7.25V9.25H10.75C11.1642 9.25 11.5 9.58579 11.5 10Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,28.49,14.09,60.77,30.06,96.79-1.13a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM216,71.6v40.65c-14,11.06-27,13.22-40,10.88V79.34A60.05,60.05,0,0,0,216,71.6Zm-56,3.76v43c-6.66-2.67-13.43-6-20.45-9.48-8.82-4.37-18-8.91-27.55-12.18v-43c6.66,2.66,13.43,6,20.45,9.48C141.27,67.55,150.46,72.09,160,75.36ZM96,48.91V92.69a60.06,60.06,0,0,0-40,7.75V59.78C70,48.72,83,46.57,96,48.91ZM86.58,152A60.06,60.06,0,0,0,56,160.43V119.78c14-11.06,27-13.22,40-10.88v43.8A65.61,65.61,0,0,0,86.58,152ZM112,156.67v-43c6.66,2.66,13.43,6,20.45,9.48,8.82,4.37,18,8.9,27.55,12.17v43c-6.66-2.67-13.43-6-20.45-9.48C130.73,164.47,121.54,159.94,112,156.67Zm64,26.45v-43.8a65.61,65.61,0,0,0,9.42.72A60.11,60.11,0,0,0,216,131.57v40.68C202,183.31,189,185.46,176,183.12Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M229.06,53.89a32.92,32.92,0,0,0-26.95-26.95c-32.37-5.49-93.39-8-138.27,36.9s-42.39,105.9-36.9,138.27a32.92,32.92,0,0,0,27,26.95A206.58,206.58,0,0,0,88.27,232c32.09,0,72.05-8,103.89-39.84C237.05,147.28,234.55,86.26,229.06,53.89Zm-61.61-14a192,192,0,0,1,32,2.8A16.94,16.94,0,0,1,213.3,56.56,188.59,188.59,0,0,1,216,92.78L163.21,40C164.61,39.92,166,39.9,167.45,39.9ZM56.56,213.3A16.94,16.94,0,0,1,42.7,199.44,188.59,188.59,0,0,1,40,163.22L92.78,216A187.79,187.79,0,0,1,56.56,213.3Zm124.3-32.44c-11.61,11.6-33.27,27.73-67.37,33.27L41.87,142.51c5.54-34.1,21.67-55.76,33.27-67.37S108.4,47.4,142.5,41.86l71.63,71.63C208.59,147.59,192.46,169.25,180.86,180.86Zm-15.22-90.5a8,8,0,0,1,0,11.31L151.3,116l6.34,6.34a8,8,0,1,1-11.31,11.3L140,127.31,127.31,140l6.34,6.34a8,8,0,1,1-11.3,11.31L116,151.3l-14.34,14.34a8,8,0,1,1-11.31-11.31L104.7,140l-6.34-6.34a8,8,0,0,1,11.31-11.3l6.34,6.34L128.69,116l-6.34-6.34a8,8,0,0,1,11.3-11.31L140,104.7l14.34-14.34A8,8,0,0,1,165.64,90.36Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M176,100a12,12,0,1,1-12-12A12,12,0,0,1,176,100Zm-44,20a12,12,0,1,0,12,12A12,12,0,0,0,132,120Zm84-24A88,88,0,1,1,128,8,88.1,88.1,0,0,1,216,96Zm-16,0a72,72,0,1,0-72,72A72.08,72.08,0,0,0,200,96Zm-34.86,96.53C152,197.56,139.85,200,128,200s-24-2.44-37.14-7.47a8,8,0,1,0-5.72,14.94A125.91,125.91,0,0,0,120,215.68V248a8,8,0,0,0,16,0V215.68a125.91,125.91,0,0,0,34.86-8.21,8,8,0,1,0-5.72-14.94Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M224,152H130.9L38.1,42.82A8,8,0,0,0,25.9,53.18L159.51,210.36A16,16,0,0,0,171.7,216H224a16,16,0,0,0,16-16V168A16,16,0,0,0,224,152Zm-79.5,16H192v32H171.7ZM224,200H208V168h16ZM112.18,179.55a8,8,0,0,0-11.27.91L84.3,200H64V168H85.2a8,8,0,0,0,0-16H32a16,16,0,0,0-16,16v32a16,16,0,0,0,16,16H84.3a16,16,0,0,0,12.19-5.64l16.61-19.53A8,8,0,0,0,112.18,179.55ZM32,168H48v32H32Zm117.9-45.18,68-80a8,8,0,0,1,12.2,10.36l-68,80a8,8,0,1,1-12.2-10.36Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M136,100a12,12,0,1,1-12-12A12,12,0,0,1,136,100Zm96,29.48A104.29,104.29,0,0,1,130.1,232l-2.17,0a103.32,103.32,0,0,1-69.26-26A8,8,0,1,1,69.34,194a84.71,84.71,0,0,0,20.1,13.37L116,170.84c-22.78-9.83-47.47-5.65-61.4-3.29A31.84,31.84,0,0,1,23.3,154.72l-.3-.43-13.78-22a8,8,0,0,1,2.59-11.05L112,59.53V32a8,8,0,0,1,8-8h8A104,104,0,0,1,232,129.48Zm-16-.22A88,88,0,0,0,128,40V64a8,8,0,0,1-3.81,6.81L27.06,130.59l9.36,15A15.92,15.92,0,0,0,52,151.77c16-2.7,48.77-8.24,78.07,8.18A40.06,40.06,0,0,0,168,120a8,8,0,0,1,16,0,56.07,56.07,0,0,1-51.8,55.83l-27.11,37.28A90.89,90.89,0,0,0,129.78,216,88.29,88.29,0,0,0,216,129.26Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M216,96A88,88,0,1,0,72,163.83V240a8,8,0,0,0,11.58,7.16L128,225l44.43,22.21A8.07,8.07,0,0,0,176,248a8,8,0,0,0,8-8V163.83A87.85,87.85,0,0,0,216,96ZM56,96a72,72,0,1,1,72,72A72.08,72.08,0,0,1,56,96ZM168,227.06l-36.43-18.21a8,8,0,0,0-7.16,0L88,227.06V174.37a87.89,87.89,0,0,0,80,0ZM128,152A56,56,0,1,0,72,96,56.06,56.06,0,0,0,128,152Zm0-96A40,40,0,1,1,88,96,40,40,0,0,1,128,56Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M240,196a16,16,0,0,0-6.65-11.7l-38-27.15,17-16.95a39.67,39.67,0,0,0,11-35.79,99.52,99.52,0,0,0-35.4-57.89A101.93,101.93,0,0,0,122.58,24,100.29,100.29,0,0,0,24,122.58a102.12,102.12,0,0,0,22.55,65.28,99.52,99.52,0,0,0,57.89,35.4,39.68,39.68,0,0,0,35.79-11l16.95-17,27.15,38A16,16,0,0,0,196,240c.44,0,.88.05,1.32.05a16,16,0,0,0,11.31-4.69l26.64-26.64A16,16,0,0,0,240,196ZM59,177.83a86.09,86.09,0,0,1-19-55A84.27,84.27,0,0,1,122.8,40a86.28,86.28,0,0,1,55,19A85.08,85.08,0,0,1,196.58,80.1L80.1,196.58A85.08,85.08,0,0,1,59,177.83ZM197.35,224l-32.63-45.69a8,8,0,0,0-5.85-3.32q-.33,0-.66,0a8,8,0,0,0-5.66,2.34l-23.63,23.63a23.68,23.68,0,0,1-21.36,6.63,80.3,80.3,0,0,1-12.3-3.5l108.8-108.8a80.63,80.63,0,0,1,3.5,12.3,23.67,23.67,0,0,1-6.63,21.36L177.3,152.55a8,8,0,0,0,1,12.17L224,197.35Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm76.52,147.42H170.9l-9.26-12.76,12.63-36.78,15-4.89,26.24,20.13A87.38,87.38,0,0,1,204.52,171.42Zm-164-34.3L66.71,117l15,4.89,12.63,36.78L85.1,171.42H51.48A87.38,87.38,0,0,1,40.47,137.12Zm10-50.64,5.51,18.6L40.71,116.77A87.33,87.33,0,0,1,50.43,86.48ZM109,152,97.54,118.65,128,97.71l30.46,20.94L147,152Zm91.07-46.92,5.51-18.6a87.33,87.33,0,0,1,9.72,30.29Zm-6.2-35.38-9.51,32.08-15.07,4.89L136,83.79V68.21l29.09-20A88.58,88.58,0,0,1,193.86,69.7ZM146.07,41.87,128,54.29,109.93,41.87a88.24,88.24,0,0,1,36.14,0ZM90.91,48.21l29.09,20V83.79L86.72,106.67l-15.07-4.89L62.14,69.7A88.58,88.58,0,0,1,90.91,48.21ZM63.15,187.42H83.52l7.17,20.27A88.4,88.4,0,0,1,63.15,187.42ZM110,214.13,98.12,180.71,107.35,168h41.3l9.23,12.71-11.83,33.42a88,88,0,0,1-36.1,0Zm55.36-6.44,7.17-20.27h20.37A88.4,88.4,0,0,1,165.31,207.69Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><g transform="scale(0.09375)"><path d="M201.57,54.46a104,104,0,1,0,0,147.08A103.4,103.4,0,0,0,201.57,54.46ZM65.75,65.77a87.63,87.63,0,0,1,53.66-25.31A87.31,87.31,0,0,1,94,94.06a87.42,87.42,0,0,1-53.62,25.35A87.58,87.58,0,0,1,65.75,65.77ZM40.33,135.48a103.29,103.29,0,0,0,65-30.11,103.24,103.24,0,0,0,30.13-65,87.78,87.78,0,0,1,80.18,80.14,104,104,0,0,0-95.16,95.1,87.78,87.78,0,0,1-80.18-80.14Zm149.92,54.75a87.69,87.69,0,0,1-53.66,25.31,88,88,0,0,1,79-78.95A87.58,87.58,0,0,1,190.25,190.23Z"/></g></svg>
|
|
@@ -5,7 +5,7 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
|
|
|
5
5
|
exports.ICON_ALERT_SEVERITY_MAP = {
|
|
6
6
|
[design_system_shared_1.IconAlertSeverity.Info]: {
|
|
7
7
|
name: design_system_shared_1.IconName.Info,
|
|
8
|
-
color: design_system_shared_1.IconColor.
|
|
8
|
+
color: design_system_shared_1.IconColor.IconDefault,
|
|
9
9
|
},
|
|
10
10
|
[design_system_shared_1.IconAlertSeverity.Success]: {
|
|
11
11
|
name: design_system_shared_1.IconName.Confirmation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAIiD;AAEpC,QAAA,uBAAuB,GAGhC;IACF,CAAC,wCAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,gCAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAIiD;AAEpC,QAAA,uBAAuB,GAGhC;IACF,CAAC,wCAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,gCAAS,CAAC,WAAW;KAC7B;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,+BAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,gCAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask-previews/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.IconDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -2,7 +2,7 @@ import { IconAlertSeverity, IconColor, IconName } from "@metamask-previews/desig
|
|
|
2
2
|
export const ICON_ALERT_SEVERITY_MAP = {
|
|
3
3
|
[IconAlertSeverity.Info]: {
|
|
4
4
|
name: IconName.Info,
|
|
5
|
-
color: IconColor.
|
|
5
|
+
color: IconColor.IconDefault,
|
|
6
6
|
},
|
|
7
7
|
[IconAlertSeverity.Success]: {
|
|
8
8
|
name: IconName.Confirmation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,gDAAgD;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,gDAAgD;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,SAAS,CAAC,WAAW;KAC7B;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,QAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,SAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask-previews/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.IconDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -16,7 +16,7 @@ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
|
|
|
16
16
|
return 'border-error-default';
|
|
17
17
|
}
|
|
18
18
|
if (isChecked) {
|
|
19
|
-
return 'border-
|
|
19
|
+
return 'border-icon-default';
|
|
20
20
|
}
|
|
21
21
|
return 'border-default';
|
|
22
22
|
};
|
|
@@ -27,7 +27,7 @@ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
|
|
|
27
27
|
if (isDanger) {
|
|
28
28
|
return 'bg-error-default';
|
|
29
29
|
}
|
|
30
|
-
return 'bg-
|
|
30
|
+
return 'bg-icon-default';
|
|
31
31
|
};
|
|
32
32
|
const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
|
|
33
33
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,qBAAqB,CAAC;KAC9B;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,qBAAqB,CAAC;KAC9B;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,kBAAkB,CAAC;KAC3B;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,QAAQ,GAAG,KAAK,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACS,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uBAAuB,EACvB,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EACzC,WAAW,CACZ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AW,eAuEtB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
|
|
@@ -17,7 +17,7 @@ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
|
|
|
17
17
|
return 'border-error-default';
|
|
18
18
|
}
|
|
19
19
|
if (isChecked) {
|
|
20
|
-
return 'border-
|
|
20
|
+
return 'border-icon-default';
|
|
21
21
|
}
|
|
22
22
|
return 'border-default';
|
|
23
23
|
};
|
|
@@ -28,7 +28,7 @@ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
|
|
|
28
28
|
if (isDanger) {
|
|
29
29
|
return 'bg-error-default';
|
|
30
30
|
}
|
|
31
|
-
return 'bg-
|
|
31
|
+
return 'bg-icon-default';
|
|
32
32
|
};
|
|
33
33
|
export const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
|
|
34
34
|
const tw = useTailwind();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,qBAAqB;AAEtD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton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C,gBAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,CACnC,UAAU,CACV,iBAAiB,CAAC,OAAO,CACzB,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAClE,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;YACjC,qBAAqB,EAAE,KAAK;SAC7B,CAAC,CAEF;QAAA,CAAC,IAAI,CACH,IAAI,yBAAyB,CAAC,CAC9B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,qEAAqE,EACrE,yBAAyB,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAC3D;YACD,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAEF;UAAA,CAAC,SAAS,IAAI,CACZ,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
|
|
@@ -29,7 +29,7 @@ const react_1 = __importStar(require("react"));
|
|
|
29
29
|
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
30
30
|
const Icon_1 = require("../Icon/index.cjs");
|
|
31
31
|
const TextField_1 = require("../TextField/index.cjs");
|
|
32
|
-
exports.TextFieldSearch = (0, react_1.forwardRef)(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, ...props }, ref) => {
|
|
32
|
+
exports.TextFieldSearch = (0, react_1.forwardRef)(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, inputAccessibilityLabel, inputProps, ...props }, ref) => {
|
|
33
33
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
34
34
|
const containerStyle = tw.style('rounded-full');
|
|
35
35
|
const searchIcon = (<Icon_1.Icon name={Icon_1.IconName.Search} size={Icon_1.IconSize.Md} color={Icon_1.IconColor.IconAlternative}/>);
|
|
@@ -37,7 +37,10 @@ exports.TextFieldSearch = (0, react_1.forwardRef)(({ onPressClearButton, clearBu
|
|
|
37
37
|
onPressClearButton();
|
|
38
38
|
}, [onPressClearButton]);
|
|
39
39
|
const clearButton = (<ButtonIcon_1.ButtonIcon size={ButtonIcon_1.ButtonIconSize.Md} iconName={Icon_1.IconName.CircleX} iconProps={{ color: Icon_1.IconColor.IconAlternative }} onPress={clearButtonHandler} {...clearButtonProps}/>);
|
|
40
|
-
return (<TextField_1.TextField ref={ref} {...props}
|
|
40
|
+
return (<TextField_1.TextField ref={ref} {...props} inputProps={{
|
|
41
|
+
...inputProps,
|
|
42
|
+
accessibilityLabel: inputAccessibilityLabel,
|
|
43
|
+
}} value={value} startAccessory={startAccessory !== undefined ? startAccessory : searchIcon} endAccessory={endAccessory !== undefined
|
|
41
44
|
? endAccessory
|
|
42
45
|
: Boolean(value) && clearButton} testID="textfieldsearch" style={[containerStyle, style]}/>);
|
|
43
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAuD;AAGvD,wDAA2D;AAC3D,4CAA8D;AAC9D,sDAAyC;AAI5B,QAAA,eAAe,GAAG,IAAA,kBAAU,EACvC,CACE,EACE,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CACjB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,eAAQ,CAAC,MAAM,CAAC,CACtB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAS,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;IAEF,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC1C,kBAAkB,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,WAAW,GAAG,CAClB,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,2BAAc,CAAC,EAAE,CAAC,CACxB,QAAQ,CAAC,CAAC,eAAQ,CAAC,OAAO,CAAC,CAC3B,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAS,CAAC,eAAe,EAAE,CAAC,CAChD,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC5B,IAAI,gBAAgB,CAAC,EACrB,CACH,CAAC;IAEF,OAAO,CACL,CAAC,qBAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,cAAc,CAAC,CACb,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAC3D,CACD,YAAY,CAAC,CACX,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAClC,CACD,MAAM,CAAC,iBAAiB,CACxB,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAuD;AAGvD,wDAA2D;AAC3D,4CAA8D;AAC9D,sDAAyC;AAI5B,QAAA,eAAe,GAAG,IAAA,kBAAU,EACvC,CACE,EACE,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CACjB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,eAAQ,CAAC,MAAM,CAAC,CACtB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAS,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;IAEF,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC1C,kBAAkB,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,WAAW,GAAG,CAClB,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,2BAAc,CAAC,EAAE,CAAC,CACxB,QAAQ,CAAC,CAAC,eAAQ,CAAC,OAAO,CAAC,CAC3B,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAS,CAAC,eAAe,EAAE,CAAC,CAChD,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC5B,IAAI,gBAAgB,CAAC,EACrB,CACH,CAAC;IAEF,OAAO,CACL,CAAC,qBAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,UAAU,CAAC,CAAC;YACV,GAAG,UAAU;YACb,kBAAkB,EAAE,uBAAuB;SAC5C,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,cAAc,CAAC,CACb,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAC3D,CACD,YAAY,CAAC,CACX,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAClC,CACD,MAAM,CAAC,iBAAiB,CACxB,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n inputAccessibilityLabel,\n inputProps,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n inputProps={{\n ...inputProps,\n accessibilityLabel: inputAccessibilityLabel,\n }}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
@@ -171,6 +171,7 @@ export declare const TextFieldSearch: React.ForwardRefExoticComponent<Omit<impor
|
|
|
171
171
|
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
172
172
|
testID?: string | undefined;
|
|
173
173
|
} & Omit<import("../index.cjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
|
|
174
|
+
inputAccessibilityLabel: string;
|
|
174
175
|
clearButtonProps?: Partial<import("../ButtonIcon/index.cjs").ButtonIconProps> | undefined;
|
|
175
176
|
onPressClearButton: () => void;
|
|
176
177
|
} & React.RefAttributes<View>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,cAAc;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,qBAAqB;AAQzC,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,cAAc;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,qBAAqB;AAQzC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8D3B,CAAC"}
|
|
@@ -171,6 +171,7 @@ export declare const TextFieldSearch: React.ForwardRefExoticComponent<Omit<impor
|
|
|
171
171
|
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
172
172
|
testID?: string | undefined;
|
|
173
173
|
} & Omit<import("../index.mjs").BoxProps, "children" | "style" | "testID" | "onBlur" | "onFocus" | "accessible" | "twClassName" | "startAccessory" | "endAccessory" | "isDisabled" | "placeholder" | "value" | "autoFocus" | "onChangeText" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & {
|
|
174
|
+
inputAccessibilityLabel: string;
|
|
174
175
|
clearButtonProps?: Partial<import("../ButtonIcon/index.mjs").ButtonIconProps> | undefined;
|
|
175
176
|
onPressClearButton: () => void;
|
|
176
177
|
} & React.RefAttributes<View>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,cAAc;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,qBAAqB;AAQzC,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,cAAc;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,qBAAqB;AAQzC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8D3B,CAAC"}
|
|
@@ -10,7 +10,7 @@ const React = $importDefault($React);
|
|
|
10
10
|
import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
|
|
11
11
|
import { Icon, IconColor, IconName, IconSize } from "../Icon/index.mjs";
|
|
12
12
|
import { TextField } from "../TextField/index.mjs";
|
|
13
|
-
export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, ...props }, ref) => {
|
|
13
|
+
export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProps, value, style, startAccessory, endAccessory, inputAccessibilityLabel, inputProps, ...props }, ref) => {
|
|
14
14
|
const tw = useTailwind();
|
|
15
15
|
const containerStyle = tw.style('rounded-full');
|
|
16
16
|
const searchIcon = (<Icon name={IconName.Search} size={IconSize.Md} color={IconColor.IconAlternative}/>);
|
|
@@ -18,7 +18,10 @@ export const TextFieldSearch = forwardRef(({ onPressClearButton, clearButtonProp
|
|
|
18
18
|
onPressClearButton();
|
|
19
19
|
}, [onPressClearButton]);
|
|
20
20
|
const clearButton = (<ButtonIcon size={ButtonIconSize.Md} iconName={IconName.CircleX} iconProps={{ color: IconColor.IconAlternative }} onPress={clearButtonHandler} {...clearButtonProps}/>);
|
|
21
|
-
return (<TextField ref={ref} {...props}
|
|
21
|
+
return (<TextField ref={ref} {...props} inputProps={{
|
|
22
|
+
...inputProps,
|
|
23
|
+
accessibilityLabel: inputAccessibilityLabel,
|
|
24
|
+
}} value={value} startAccessory={startAccessory !== undefined ? startAccessory : searchIcon} endAccessory={endAccessory !== undefined
|
|
22
25
|
? endAccessory
|
|
23
26
|
: Boolean(value) && clearButton} testID="textfieldsearch" style={[containerStyle, style]}/>);
|
|
24
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFie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,CAAC,EACrB,CACH,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,cAAc,CAAC,CACb,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAC3D,CACD,YAAY,CAAC,CACX,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAClC,CACD,MAAM,CAAC,iBAAiB,CACxB,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc;;AAGvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,0BAAgB;AAC9D,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAIzC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACvC,CACE,EACE,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,EACjC,CACH,CAAC;IAEF,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC1C,kBAAkB,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,WAAW,GAAG,CAClB,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAC3B,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE,CAAC,CAChD,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC5B,IAAI,gBAAgB,CAAC,EACrB,CACH,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,UAAU,CAAC,CAAC;YACV,GAAG,UAAU;YACb,kBAAkB,EAAE,uBAAuB;SAC5C,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,cAAc,CAAC,CACb,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAC3D,CACD,YAAY,CAAC,CACX,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,WAAW,CAClC,CACD,MAAM,CAAC,iBAAiB,CACxB,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { Icon, IconColor, IconName, IconSize } from '../Icon';\nimport { TextField } from '../TextField';\n\nimport type { TextFieldSearchProps } from './TextFieldSearch.types';\n\nexport const TextFieldSearch = forwardRef<View, TextFieldSearchProps>(\n (\n {\n onPressClearButton,\n clearButtonProps,\n value,\n style,\n startAccessory,\n endAccessory,\n inputAccessibilityLabel,\n inputProps,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const containerStyle = tw.style('rounded-full');\n\n const searchIcon = (\n <Icon\n name={IconName.Search}\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n />\n );\n\n const clearButtonHandler = useCallback(() => {\n onPressClearButton();\n }, [onPressClearButton]);\n\n const clearButton = (\n <ButtonIcon\n size={ButtonIconSize.Md}\n iconName={IconName.CircleX}\n iconProps={{ color: IconColor.IconAlternative }}\n onPress={clearButtonHandler}\n {...clearButtonProps}\n />\n );\n\n return (\n <TextField\n ref={ref}\n {...props}\n inputProps={{\n ...inputProps,\n accessibilityLabel: inputAccessibilityLabel,\n }}\n value={value}\n startAccessory={\n startAccessory !== undefined ? startAccessory : searchIcon\n }\n endAccessory={\n endAccessory !== undefined\n ? endAccessory\n : Boolean(value) && clearButton\n }\n testID=\"textfieldsearch\"\n style={[containerStyle, style]}\n />\n );\n },\n);\n\nTextFieldSearch.displayName = 'TextFieldSearch';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Accessible name for the inner `TextInput`. Required, including when the\n * search field does not have a visible label.\n */\n inputAccessibilityLabel: string;\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
@@ -4,6 +4,11 @@ import type { TextFieldProps } from "../TextField/index.cjs";
|
|
|
4
4
|
* TextFieldSearch component props.
|
|
5
5
|
*/
|
|
6
6
|
export type TextFieldSearchProps = TextFieldProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Accessible name for the inner `TextInput`. Required, including when the
|
|
9
|
+
* search field does not have a visible label.
|
|
10
|
+
*/
|
|
11
|
+
inputAccessibilityLabel: string;
|
|
7
12
|
/**
|
|
8
13
|
* Optional prop to pass any additional props to the clear button.
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -4,6 +4,11 @@ import type { TextFieldProps } from "../TextField/index.mjs";
|
|
|
4
4
|
* TextFieldSearch component props.
|
|
5
5
|
*/
|
|
6
6
|
export type TextFieldSearchProps = TextFieldProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Accessible name for the inner `TextInput`. Required, including when the
|
|
9
|
+
* search field does not have a visible label.
|
|
10
|
+
*/
|
|
11
|
+
inputAccessibilityLabel: string;
|
|
7
12
|
/**
|
|
8
13
|
* Optional prop to pass any additional props to the clear button.
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,+BAAqB;AAEnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAClD;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TextFieldSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/TextFieldSearch/TextFieldSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldProps } from '../TextField';\n\n/**\n * TextFieldSearch component props.\n */\nexport type TextFieldSearchProps = TextFieldProps & {\n /**\n * Accessible name for the inner `TextInput`. Required, including when the\n * search field does not have a visible label.\n */\n inputAccessibilityLabel: string;\n /**\n * Optional prop to pass any additional props to the clear button.\n */\n clearButtonProps?: Partial<ButtonIconProps>;\n /**\n * Function to trigger when pressing the clear button.\n * The clear button is automatically shown when the input has a value.\n */\n onPressClearButton: () => void;\n};\n"]}
|
|
@@ -20,7 +20,7 @@ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
|
20
20
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
21
21
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
22
22
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
23
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
23
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
24
24
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
25
25
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,sDAAyC;AACzC,gFAAmE;AAInE;;;;;;;;;;;;;;GAcG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,qBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,SAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,+BAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,gCAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,iCAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,+BAAc,CAClB;UAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,wCAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,UAAU,cAmDrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
1
|
+
{"version":3,"file":"TitleAlert.cjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,sDAAyC;AACzC,gFAAmE;AAInE;;;;;;;;;;;;;;GAcG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,oCAAa,CAA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AY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
@@ -9,7 +9,7 @@ import type { TitleAlertProps } from "./TitleAlert.types.cjs";
|
|
|
9
9
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
10
10
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
11
11
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
12
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
12
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
13
13
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
14
14
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
15
15
|
*
|
|
@@ -9,7 +9,7 @@ import type { TitleAlertProps } from "./TitleAlert.types.mjs";
|
|
|
9
9
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
10
10
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
11
11
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
12
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
12
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
13
13
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
14
14
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
15
15
|
*
|
|
@@ -21,7 +21,7 @@ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
|
21
21
|
* @param props.title - Title row content; row renders only when `title` is renderable
|
|
22
22
|
* @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}
|
|
23
23
|
* @param props.titleProps - Optional props merged into title row `Text` when `title` is a string
|
|
24
|
-
* @param props.description - Optional description below the title; uses {@link TextOrChildren}
|
|
24
|
+
* @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}
|
|
25
25
|
* @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string
|
|
26
26
|
* @param props.twClassName - Optional Tailwind classes on the root BoxColumn
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAS,CACR,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAG,CAAC,CACnE,eAAe,CAAC,CACd,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,WAAW,CAAC,cAAc,CAC7B;YAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,GAAG,gBAAgB;gBACnB,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,EAAE,KAAK,CAAC;aAC1D,CAAC,CAEF;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,cAAc,CAClB;UAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,SAAS,CACd,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CACzC,WAAW,CAAC,cAAc,CAC1B,IAAI,iBAAiB,CAAC,CACtB,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
|
1
|
+
{"version":3,"file":"TitleAlert.mjs","sourceRoot":"","sources":["../../../src/components/TitleAlert/TitleAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;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B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxJustifyContent,\n FontWeight,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { IconAlert } from '../IconAlert';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleAlertProps } from './TitleAlert.types';\n\n/**\n * Displays a severity-based {@link IconAlert} above a centered title row.\n * Remaining `View` props are forwarded to the root {@link BoxColumn}.\n *\n * @param props - Component props\n * @param props.severity - Passed to {@link IconAlert} for glyph and color\n * @param props.title - Title row content; row renders only when `title` is renderable\n * @param props.titleWrapperProps - Optional props spread onto the title row {@link BoxRow}\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.description - Optional text-centered description below the title; uses {@link TextOrChildren}\n * @param props.descriptionProps - Optional props merged into description `Text` when `description` is a string\n * @param props.twClassName - Optional Tailwind classes on the root BoxColumn\n *\n * @returns The rendered TitleAlert layout.\n */\nexport const TitleAlert: React.FC<TitleAlertProps> = ({\n severity,\n title,\n titleProps,\n titleWrapperProps,\n description,\n descriptionProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n gap={1}\n topAccessory={<IconAlert severity={severity} size={IconSize.Xl} />}\n bottomAccessory={\n description ? (\n <Box twClassName=\"self-stretch\">\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n fontWeight: FontWeight.Medium,\n ...descriptionProps,\n style: [{ textAlign: 'center' }, descriptionProps?.style],\n }}\n >\n {description}\n </TextOrChildren>\n </Box>\n ) : undefined\n }\n twClassName={twClassName}\n {...props}\n >\n {title ? (\n <BoxRow\n justifyContent={BoxJustifyContent.Center}\n twClassName=\"self-stretch\"\n {...titleWrapperProps}\n textProps={{\n variant: TextVariant.HeadingLg,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxColumn>\n );\n};\n\nTitleAlert.displayName = 'TitleAlert';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/design-system-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0-preview.12867efa",
|
|
4
4
|
"description": "Design System React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@metamask-previews/design-system-shared": "0.
|
|
50
|
+
"@metamask-previews/design-system-shared": "0.45.0-preview.12867efa",
|
|
51
51
|
"react-native-jazzicon": "^0.1.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@babel/preset-typescript": "^7.23.3",
|
|
58
58
|
"@figma/code-connect": "^1.4.9",
|
|
59
59
|
"@gorhom/bottom-sheet": "^5.1.3",
|
|
60
|
-
"@metamask-previews/design-system-twrnc-preset": "0.
|
|
61
|
-
"@metamask-previews/design-tokens": "
|
|
62
|
-
"@metamask/auto-changelog": "^
|
|
60
|
+
"@metamask-previews/design-system-twrnc-preset": "0.14.0-preview.12867efa",
|
|
61
|
+
"@metamask-previews/design-tokens": "13.0.0-preview.12867efa",
|
|
62
|
+
"@metamask/auto-changelog": "^7.1.0",
|
|
63
63
|
"@metamask/utils": "^11.12.1",
|
|
64
64
|
"@react-native/babel-preset": "0.86.3",
|
|
65
65
|
"@react-native/jest-preset": "0.86.3",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"typescript": "~5.2.2"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@metamask/design-system-twrnc-preset": "^0.
|
|
95
|
-
"@metamask/design-tokens": "^
|
|
94
|
+
"@metamask/design-system-twrnc-preset": "^0.14.0",
|
|
95
|
+
"@metamask/design-tokens": "^13.0.0",
|
|
96
96
|
"@metamask/utils": "^11.12.1",
|
|
97
97
|
"expo-image": ">=3.0.0",
|
|
98
98
|
"lodash": "^4.17.21",
|