@@ -710,6 +710,10 @@ function Icon(props) {
710710 case 'three-dots-vertical' :
711711 icon = /*#__PURE__*/ React__default [ "default" ] . createElement ( ThreeDotsVertical , null ) ;
712712 break ;
713+
714+ case 'box-arrow-up-right' :
715+ icon = /*#__PURE__*/ React__default [ "default" ] . createElement ( BoxArrowUpRight , null ) ;
716+ break ;
713717 }
714718
715719 return /*#__PURE__*/ React__default [ "default" ] . createElement ( "svg" , {
@@ -763,6 +767,16 @@ function ThreeDotsVertical(props) {
763767 } ) ;
764768}
765769
770+ function BoxArrowUpRight ( props ) {
771+ return /*#__PURE__*/ React__default [ "default" ] . createElement ( React__default [ "default" ] . Fragment , null , /*#__PURE__*/ React__default [ "default" ] . createElement ( "path" , {
772+ "fill-rule" : "evenodd" ,
773+ d : "M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"
774+ } ) , /*#__PURE__*/ React__default [ "default" ] . createElement ( "path" , {
775+ "fill-rule" : "evenodd" ,
776+ d : "M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"
777+ } ) ) ;
778+ }
779+
766780class TimePicker extends React__default [ "default" ] . Component {
767781 constructor ( ...args ) {
768782 super ( ...args ) ;
@@ -1752,6 +1766,22 @@ class FormDateTimeInput extends React__default["default"].Component {
17521766 }
17531767
17541768}
1769+ function FormURLInput ( props ) {
1770+ return /*#__PURE__*/ React__default [ "default" ] . createElement ( "div" , {
1771+ className : props . label ? 'rjf-url-field has-label' : 'rjf-url-field'
1772+ } , /*#__PURE__*/ React__default [ "default" ] . createElement ( FormInput , _extends ( { } , props , {
1773+ type : "url" ,
1774+ className : "rjf-url-field-input"
1775+ } ) ) , props . value && /*#__PURE__*/ React__default [ "default" ] . createElement ( "a" , {
1776+ href : props . value ,
1777+ target : "_blank" ,
1778+ rel : "noopener noreferrer" ,
1779+ className : "rjf-url-field-link" ,
1780+ title : "Open in new tab"
1781+ } , /*#__PURE__*/ React__default [ "default" ] . createElement ( Icon , {
1782+ name : "box-arrow-up-right"
1783+ } ) , " " , /*#__PURE__*/ React__default [ "default" ] . createElement ( "span" , null , "Open link" ) ) ) ;
1784+ }
17551785
17561786class AutoCompleteInput extends React__default [ "default" ] . Component {
17571787 constructor ( props ) {
@@ -2653,15 +2683,19 @@ function FormField(props) {
26532683 InputField = FormInput ;
26542684
26552685 if ( props . schema . format ) {
2656- if ( props . schema . format === 'data-url' ) {
2686+ let format = props . schema . format ;
2687+
2688+ if ( format === 'data-url' ) {
26572689 InputField = FormFileInput ;
2658- } else if ( props . schema . format === 'file-url' ) {
2690+ } else if ( format === 'file-url' ) {
26592691 InputField = FileUploader ;
2660- } else if ( normalizeKeyword ( props . schema . format ) === 'date-time' ) {
2692+ } else if ( normalizeKeyword ( format ) === 'date-time' ) {
26612693 InputField = FormDateTimeInput ;
2694+ } else if ( format === 'uri' || format === 'uri-reference' ) {
2695+ InputField = FormURLInput ;
26622696 }
26632697
2664- inputProps . type = props . schema . format ;
2698+ inputProps . type = format ;
26652699 } else if ( props . schema . widget === 'hidden' ) {
26662700 inputProps . type = 'hidden' ;
26672701 } else {
0 commit comments