@webority/mobile-ui 0.130.2 → 0.131.0
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/README.md +6 -0
- package/dist/canvas-kit/kit.js +7990 -7853
- package/dist/canvas-kit/manifest.json +29 -4
- package/dist/canvas-kit/release.json +6 -6
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/AppIcon/catalog.g.js +1 -1
- package/lib/commonjs/components/AppIcon/glyphs.g.js +1 -1
- package/lib/commonjs/components/AppIcon/variants.g.js +1 -1
- package/lib/commonjs/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Composer/Composer.js +1 -1
- package/lib/commonjs/components/Confetti/Confetti.js +1 -1
- package/lib/commonjs/components/Drawer/Drawer.js +1 -1
- package/lib/commonjs/components/FileViewer/useFileViewerZoom.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/Markdown/Markdown.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/commonjs/components/Slider/Slider.js +1 -1
- package/lib/commonjs/components/SortableList/SortableList.js +1 -1
- package/lib/commonjs/components/StatTile/StatTile.js +1 -1
- package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
- package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/commonjs/components/ZoomableImage/ZoomableImage.js +1 -1
- package/lib/module/components/AppBar/AppBar.js +1 -1
- package/lib/module/components/AppIcon/catalog.g.js +1 -1
- package/lib/module/components/AppIcon/glyphs.g.js +1 -1
- package/lib/module/components/AppIcon/variants.g.js +1 -1
- package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/Composer/Composer.js +1 -1
- package/lib/module/components/Confetti/Confetti.js +1 -1
- package/lib/module/components/Drawer/Drawer.js +1 -1
- package/lib/module/components/FileViewer/useFileViewerZoom.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/IconButton/IconButton.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/Markdown/Markdown.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/module/components/Slider/Slider.js +1 -1
- package/lib/module/components/SortableList/SortableList.js +1 -1
- package/lib/module/components/StatTile/StatTile.js +1 -1
- package/lib/module/components/Swipeable/Swipeable.js +1 -1
- package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/module/components/ZoomableImage/ZoomableImage.js +1 -1
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +4 -4
- package/lib/typescript/commonjs/components/AppIcon/catalog.g.d.ts +1 -1
- package/lib/typescript/commonjs/components/AppIcon/glyphs.g.d.ts +1 -0
- package/lib/typescript/commonjs/components/Composer/Composer.d.ts +2 -0
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +5 -1
- package/lib/typescript/commonjs/components/Markdown/Markdown.d.ts +5 -3
- package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +2 -2
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +4 -4
- package/lib/typescript/module/components/AppIcon/catalog.g.d.ts +1 -1
- package/lib/typescript/module/components/AppIcon/glyphs.g.d.ts +1 -0
- package/lib/typescript/module/components/Composer/Composer.d.ts +2 -0
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +5 -1
- package/lib/typescript/module/components/Markdown/Markdown.d.ts +5 -3
- package/lib/typescript/module/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/module/components/StatTile/StatTile.d.ts +2 -2
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Slider=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../hooks/index.js"),_index2=require("../../theme/index.js"),_index3=require("../../utils/index.js"),_corners=require("../../utils/corners.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index4=require("../Text/index.js"),_valueText=require("./valueText.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,i,r=Object.defineProperty,n={__proto__:null,default:e};if(Object(e)!==e)return n;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,n)}for(i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=r&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?r(n,i,a):n[i]=e[i]);return n}const VARIANT_SIZE_MAP={inset:{sm:{trackHeight:14,thumbDiameter:10},md:{trackHeight:20,thumbDiameter:14},lg:{trackHeight:26,thumbDiameter:18}},minimal:{sm:{trackHeight:2,thumbDiameter:14},md:{trackHeight:3,thumbDiameter:18},lg:{trackHeight:4,thumbDiameter:22}},bar:{sm:{trackHeight:20,thumbDiameter:20},md:{trackHeight:28,thumbDiameter:28},lg:{trackHeight:36,thumbDiameter:36}}},INSET_RING_RATIO=.3,MIN_THUMB_TOUCH=44,clamp=(e,t,a)=>Math.min(Math.max(e,t),a),snapToStep=(e,t,a,i)=>{if(i<=0)return clamp(e,t,a);const r=Math.round((e-t)/i)*i+t,n=String(i).split(".")[1]?.length??0,s=n>0?Number(r.toFixed(n)):r;return clamp(s,t,a)},BUBBLE_GAP=2,BUBBLE_CARET=8,BUBBLE_WRAP_WIDTH=160,NO_SHADOW={shadowOpacity:0,elevation:0},defaultFormatLabel=e=>String(e),Slider=exports.Slider=(0,_react.forwardRef)((e,t)=>{const{min:a=0,max:i=100,step:r=1,disabled:n=!1,tone:s="primary",size:l="md",variant:c="default",showLabel:o=!1,snapThumb:u=!1,formatLabel:d=defaultFormatLabel,renderLabel:m,accessibilityLabel:h,haptic:_,style:v,containerStyle:b,trackStyle:p,fillStyle:f,thumbStyle:g,labelStyle:R,thumbPressScale:w,labelShowDuration:x,labelOpacity:y,testID:N}=e;(0,_warnInvalidValue.warnInvalidValue)("Slider","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Slider","size",e.size,["sm","md","lg"]),(0,_warnInvalidValue.warnInvalidValue)("Slider","variant",e.variant,["default","inset","minimal","bar"]);const S=(0,_index2.useTheme)(),k=(0,_react.useMemo)(()=>{const e=(0,_index2.resolveSliderSize)(S,l);return{trackHeight:e["track-height"],thumbDiameter:e["thumb-diameter"]}},[S,l]),j=(0,_react.useMemo)(()=>"default"===c?k:VARIANT_SIZE_MAP[c][l],[k,l,c]),C="inset"===c?j.trackHeight/2:0,M=S.settings.components.slider?.thumbPressAnimation??!1,V=w??1.1,H=x??S.motion.duration.fast,O=y??1,D=(0,_react.useMemo)(()=>buildStyles(S,j),[S,j]),A=(0,_react.useMemo)(()=>({damping:S.motion.spring.snappy.damping,stiffness:S.motion.spring.snappy.stiffness,mass:S.motion.spring.snappy.mass}),[S.motion.spring.snappy]),[E,T]=(0,_react.useState)(0),I=S.colors[s],W=(0,_valueText.sliderToneInk)(S,s),q=!0===e.range,[P,L]=(0,_index.useControllableState)({value:e.value,defaultValue:e.defaultValue??(q?[a,i]:a),onChange:e.onChange}),X=(0,_reactNativeReanimated.useSharedValue)(0),B=(0,_reactNativeReanimated.useSharedValue)(0),G=(0,_reactNativeReanimated.useSharedValue)(q?P[0]:P),F=(0,_reactNativeReanimated.useSharedValue)(q?P[1]:P),z=(0,_reactNativeReanimated.useSharedValue)(0),J=(0,_reactNativeReanimated.useSharedValue)(0),U=(0,_reactNativeReanimated.useSharedValue)(1),Z=(0,_reactNativeReanimated.useSharedValue)(1),$="always"===o,K=(0,_reactNativeReanimated.useSharedValue)($?1:0),Q=(0,_reactNativeReanimated.useSharedValue)($?1:0),Y=(0,_react.useMemo)(()=>10**(String(r).split(".")[1]?.length??0),[r]);(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(X),(0,_reactNativeReanimated.cancelAnimation)(B),(0,_reactNativeReanimated.cancelAnimation)(U),(0,_reactNativeReanimated.cancelAnimation)(Z),(0,_reactNativeReanimated.cancelAnimation)(K),(0,_reactNativeReanimated.cancelAnimation)(Q)},[X,B,U,Z,K,Q]);const ee=(0,_react.useCallback)((e,t)=>{const r=t-2*C;return i===a||r<=0?C:C+(e-a)/(i-a)*r},[a,i,C]),te=(0,_react.useCallback)((e,t)=>{const n=t-2*C;if(n<=0)return a;const s=clamp((e-C)/n,0,1);return snapToStep(a+s*(i-a),a,i,r)},[a,i,r,C]),ae=(0,_react.useRef)(!1),ie=S.motion.duration.fast,re=(0,_react.useRef)(P);re.current=P;const ne=(0,_react.useRef)(E);ne.current=E;const se=(0,_react.useCallback)((e=!1)=>{const t=ne.current;if(t<=0)return;const place=t=>e?(0,_reactNativeReanimated.withTiming)(t,{duration:ie,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}):t,a=re.current;if(q){const[e,i]=a,r=Math.min(e,i),n=Math.max(e,i);G.value=r,F.value=n,X.value=place(ee(r,t)),B.value=place(ee(n,t))}else{const e=a;G.value=e,F.value=e,X.value=place(ee(e,t))}},[q,ee,G,F,X,B,ie]),[le,ce]=(0,_react.useState)(0),oe=(0,_react.useRef)(!1),ue=(0,_react.useCallback)(e=>{ae.current=e,e||(oe.current=!0,ce(e=>e+1))},[]);(0,_react.useEffect)(()=>{if(ae.current)return;const e=oe.current;oe.current=!1,se(e)},[JSON.stringify(P),E,le,se]);const de=(0,_react.useCallback)(e=>{const t=e.nativeEvent.layout.width;J.value=t,T(t)},[J]),me=(0,_react.useCallback)((e,t)=>{L(q?[e,t]:e)},[q,L]),he=(0,_react.useCallback)(()=>{const e=(0,_index3.resolveHaptic)(_,"selection");e&&(0,_index3.triggerHaptic)(e)},[_]),ve=(0,_react.useRef)(me);ve.current=me;const be=(0,_react.useRef)(he);be.current=he;const pe=(0,_react.useCallback)((e,t)=>ve.current(e,t),[]),fe=(0,_react.useCallback)(()=>be.current(),[]),ge=Math.max(0,(44-j.thumbDiameter)/2),Re=ge>0?ge:void 0,we=(0,_react.useCallback)(e=>{const t="low"===e?X:B,s="low"===e?G:F,l="low"===e?F:G,c="low"===e?U:Z,d="low"===e?K:Q,m="low"===e,h=a,_=i,v=r,b=Y,p=q,f=V,g=M,R=!0===o,w=u,x=O,y=H,N=A,S=C,follow=e=>{"worklet";const a=J.value-2*S;if(a<=0||!Number.isFinite(e))return;const i=Math.min(Math.max(z.value+e,S),J.value-S);let r=h+(i-S)/a*(_-h);v>0&&(r=Math.round((r-h)/v)*v+h,r=Math.round(r*b)/b),r=Math.min(Math.max(r,h),_),p&&(m&&r>l.value&&(r=l.value),!m&&r<l.value&&(r=l.value)),t.value=w||_===h?_===h?S:S+(r-h)/(_-h)*a:p?m?Math.min(i,B.value):Math.max(i,X.value):i,r!==s.value&&(s.value=r,r!==h&&r!==_||(0,_reactNativeReanimated.runOnJS)(fe)(),(0,_reactNativeReanimated.runOnJS)(pe)(G.value,F.value))},k=_reactNativeGestureHandler.Gesture.Pan().enabled(!n).minDistance(0);return(void 0===Re?k:k.hitSlop(Re)).onStart(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(ue)(!0),z.value=t.value,g&&(c.value=(0,_reactNativeReanimated.withSpring)(f,N)),R&&(d.value=(0,_reactNativeReanimated.withTiming)(x,{duration:y,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)})),(0,_reactNativeReanimated.runOnJS)(fe)()}).onUpdate(e=>{"worklet";follow(e.translationX)}).onEnd(e=>{"worklet";follow(e.translationX),g&&(c.value=(0,_reactNativeReanimated.withSpring)(1,N)),R&&(d.value=(0,_reactNativeReanimated.withTiming)(0,{duration:y,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}))}).onFinalize(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(ue)(!1)})},[n,a,i,r,Y,q,V,M,o,u,O,H,A,C,Re,pe,fe,ue,X,B,G,F,U,Z,K,Q,z,J]),xe=(0,_react.useMemo)(()=>we("low"),[we]),ye=(0,_react.useMemo)(()=>we("high"),[we]),Ne=(0,_react.useCallback)(e=>{if(n||q||E<=0)return;const t=clamp(e.nativeEvent.locationX,0,E),a=te(t,E);a!==G.value&&(he(),G.value=a,X.value=(0,_reactNativeReanimated.withTiming)(ee(a,E),{duration:S.motion.duration.fast,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}),me(a,a))},[n,q,E,te,ee,me,he,X,G,S.motion.duration.fast]),Se=(0,_react.useCallback)(e=>{if(n)return;const t="increment"===e.nativeEvent.actionName?r:-r,s=r>0?Math.round(t*Y)/Y:t;if(q){const e=Math.round((G.value+s)*Y)/Y,t=clamp(e,a,F.value);t!==G.value&&(G.value=t,X.value=ee(t,E),he(),me(t,F.value))}else{const e=Math.round((G.value+s)*Y)/Y,t=clamp(e,a,i);t!==G.value&&(G.value=t,X.value=ee(t,E),he(),me(t,t))}},[n,r,Y,q,a,i,ee,E,X,G,F,me,he]),ke=j.thumbDiameter/2,je=n?S.colors["surface-disabled"]:I,Ce="inset"===c?{backgroundColor:je,borderColor:S.colors.surface,borderWidth:Math.max(2,Math.round(.3*j.thumbDiameter)),...NO_SHADOW}:"minimal"===c?{backgroundColor:je,borderWidth:0}:"bar"===c?{backgroundColor:"transparent",borderWidth:0,...NO_SHADOW}:{backgroundColor:S.colors.surface,borderColor:je},Me=(0,_reactNativeReanimated.useAnimatedStyle)(()=>{const e=J.value;if(e<=0)return{opacity:0,transform:[{translateX:0},{scaleX:1}]};const t=n?.55:1;if(q){const a=Math.max(0,B.value-X.value+2*C);return{opacity:t,transform:[{translateX:X.value-C},{scaleX:a/e}]}}return{opacity:t,transform:[{translateX:X.value+C-e},{scaleX:1}]}}),Ve=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:X.value-ke},{scale:U.value}]})),He=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:B.value-ke},{scale:Z.value}]})),Oe=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:K.value})),De=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:Q.value})),clampDisplay=e=>clamp(e,a,i),Ae=clampDisplay(q?Math.min(...P):P),Ee=clampDisplay(q?Math.max(...P):P);return(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,style:[D.container,b,v],testID:N,accessibilityRole:"adjustable",accessibilityLabel:h,accessibilityState:{disabled:n},"aria-disabled":n,accessibilityValue:q?{min:a,max:i,now:Ae,text:`${Ae} to ${Ee}`}:{min:a,max:i,now:Ae},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:Se,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:Ne,disabled:n||q,style:D.trackTouch,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:D.trackWrap,onLayout:de,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:D.trackClip,pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.track,{backgroundColor:n?S.colors["surface-disabled"]:S.colors.border},p]}),(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.fill,{backgroundColor:n?S.colors["surface-disabled"]:I},f,Me]})]}),(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:xe,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:ke,..._corners.smoothCorners,opacity:n?.55:1},Ce,g,Ve],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:o?(0,_jsxRuntime.jsxs)(_reactNativeReanimated.default.View,{style:[D.bubbleWrap,Oe],pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubble,{backgroundColor:I}],children:m?m(Ae):(0,_jsxRuntime.jsx)(_index4.Text,{variant:"caption",weight:"semibold",style:[{color:W},R],numberOfLines:1,children:d(Ae)})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubbleCaret,{backgroundColor:I}]})]}):null})}),q?(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:ye,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:ke,..._corners.smoothCorners,opacity:n?.55:1},Ce,g,He],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:o?(0,_jsxRuntime.jsxs)(_reactNativeReanimated.default.View,{style:[D.bubbleWrap,De],pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubble,{backgroundColor:I}],children:m?m(Ee):(0,_jsxRuntime.jsx)(_index4.Text,{variant:"caption",weight:"semibold",style:[{color:W},R],numberOfLines:1,children:d(Ee)})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubbleCaret,{backgroundColor:I}]})]}):null})}):null]})})})});Slider.displayName="Slider";const buildStyles=(e,t)=>{const a=e.shadow.elevated,i=Math.max(t.thumbDiameter,t.trackHeight),r=i/2+e.space.xs;return _reactNative.StyleSheet.create({container:{width:"100%",paddingVertical:r,justifyContent:"center"},trackTouch:{width:"100%",justifyContent:"center"},trackWrap:{width:"100%",height:i,justifyContent:"center"},trackClip:{position:"absolute",left:0,right:0,height:t.trackHeight,top:(i-t.trackHeight)/2,borderRadius:t.trackHeight/2,..._corners.smoothCorners,overflow:"hidden"},track:{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:t.trackHeight/2,..._corners.smoothCorners},fill:{position:"absolute",top:0,left:0,width:"100%",height:t.trackHeight,borderRadius:t.trackHeight/2,..._corners.smoothCorners,transformOrigin:"left"},thumb:{position:"absolute",top:(i-t.thumbDiameter)/2,left:0,borderWidth:2,shadowColor:a.shadowColor,shadowOffset:a.shadowOffset,shadowOpacity:a.shadowOpacity,shadowRadius:a.shadowRadius,elevation:a.elevation,alignItems:"center",justifyContent:"center"},bubbleWrap:{position:"absolute",bottom:t.thumbDiameter+2,left:t.thumbDiameter/2-80,width:160,alignItems:"center"},bubbleCaret:{width:8,height:8,marginTop:-5,borderRadius:e.radius.none,..._corners.smoothCorners,transform:[{rotate:"45deg"}]},bubble:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xxs,borderRadius:e.radius.md,..._corners.smoothCorners,minWidth:36,alignItems:"center",justifyContent:"center",..._reactNative.Platform.select({ios:{shadowColor:e.shadow.card.shadowColor,shadowOffset:e.shadow.card.shadowOffset,shadowOpacity:e.shadow.card.shadowOpacity,shadowRadius:e.shadow.card.shadowRadius},android:{elevation:e.shadow.card.elevation},default:{}})}})};var _default=exports.default=Slider;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Slider=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../hooks/index.js"),_index2=require("../../theme/index.js"),_index3=require("../../utils/index.js"),_corners=require("../../utils/corners.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index4=require("../Text/index.js"),_valueText=require("./valueText.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,i,r=Object.defineProperty,n={__proto__:null,default:e};if(Object(e)!==e)return n;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,n)}for(i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=r&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?r(n,i,a):n[i]=e[i]);return n}const VARIANT_SIZE_MAP={inset:{sm:{trackHeight:14,thumbDiameter:10},md:{trackHeight:20,thumbDiameter:14},lg:{trackHeight:26,thumbDiameter:18}},minimal:{sm:{trackHeight:2,thumbDiameter:14},md:{trackHeight:3,thumbDiameter:18},lg:{trackHeight:4,thumbDiameter:22}},bar:{sm:{trackHeight:20,thumbDiameter:20},md:{trackHeight:28,thumbDiameter:28},lg:{trackHeight:36,thumbDiameter:36}}},INSET_RING_RATIO=.3,MIN_THUMB_TOUCH=44,clamp=(e,t,a)=>Math.min(Math.max(e,t),a),snapToStep=(e,t,a,i)=>{if(i<=0)return clamp(e,t,a);const r=Math.round((e-t)/i)*i+t,n=String(i).split(".")[1]?.length??0,s=n>0?Number(r.toFixed(n)):r;return clamp(s,t,a)},BUBBLE_GAP=2,BUBBLE_CARET=8,BUBBLE_WRAP_WIDTH=160,NO_SHADOW={shadowOpacity:0,elevation:0},defaultFormatLabel=e=>String(e),Slider=exports.Slider=(0,_react.forwardRef)((e,t)=>{const{min:a=0,max:i=100,step:r=1,disabled:n=!1,tone:s="primary",size:l="md",variant:c="default",showLabel:o=!1,snapThumb:u=!1,formatLabel:d=defaultFormatLabel,renderLabel:m,accessibilityLabel:h,haptic:_,style:v,containerStyle:b,trackStyle:p,fillStyle:f,thumbStyle:g,labelStyle:R,thumbPressScale:w,labelShowDuration:x,labelOpacity:y,testID:N}=e;(0,_warnInvalidValue.warnInvalidValue)("Slider","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Slider","size",e.size,["sm","md","lg"]),(0,_warnInvalidValue.warnInvalidValue)("Slider","variant",e.variant,["default","inset","minimal","bar"]);const S=(0,_index2.useTheme)(),k=(0,_react.useMemo)(()=>{const e=(0,_index2.resolveSliderSize)(S,l);return{trackHeight:e["track-height"],thumbDiameter:e["thumb-diameter"]}},[S,l]),j=(0,_react.useMemo)(()=>"default"===c?k:VARIANT_SIZE_MAP[c][l],[k,l,c]),C="inset"===c?j.trackHeight/2:0,M=S.settings.components.slider?.thumbPressAnimation??!1,V=w??1.1,H=x??S.motion.duration.fast,O=y??1,D=(0,_react.useMemo)(()=>buildStyles(S,j),[S,j]),A=(0,_react.useMemo)(()=>({damping:S.motion.spring.snappy.damping,stiffness:S.motion.spring.snappy.stiffness,mass:S.motion.spring.snappy.mass}),[S.motion.spring.snappy]),[E,T]=(0,_react.useState)(0),I=S.colors[s],W=(0,_valueText.sliderToneInk)(S,s),q=!0===e.range,[P,L]=(0,_index.useControllableState)({value:e.value,defaultValue:e.defaultValue??(q?[a,i]:a),onChange:e.onChange}),X=(0,_reactNativeReanimated.useSharedValue)(0),B=(0,_reactNativeReanimated.useSharedValue)(0),G=(0,_reactNativeReanimated.useSharedValue)(q?P[0]:P),F=(0,_reactNativeReanimated.useSharedValue)(q?P[1]:P),z=(0,_reactNativeReanimated.useSharedValue)(0),J=(0,_reactNativeReanimated.useSharedValue)(0),U=(0,_reactNativeReanimated.useSharedValue)(1),Z=(0,_reactNativeReanimated.useSharedValue)(1),$="always"===o,K=(0,_reactNativeReanimated.useSharedValue)($?1:0),Q=(0,_reactNativeReanimated.useSharedValue)($?1:0),Y=(0,_react.useMemo)(()=>10**(String(r).split(".")[1]?.length??0),[r]);(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(X),(0,_reactNativeReanimated.cancelAnimation)(B),(0,_reactNativeReanimated.cancelAnimation)(U),(0,_reactNativeReanimated.cancelAnimation)(Z),(0,_reactNativeReanimated.cancelAnimation)(K),(0,_reactNativeReanimated.cancelAnimation)(Q)},[X,B,U,Z,K,Q]);const ee=(0,_react.useCallback)((e,t)=>{const r=t-2*C;return i===a||r<=0?C:C+(e-a)/(i-a)*r},[a,i,C]),te=(0,_react.useCallback)((e,t)=>{const n=t-2*C;if(n<=0)return a;const s=clamp((e-C)/n,0,1);return snapToStep(a+s*(i-a),a,i,r)},[a,i,r,C]),ae=(0,_react.useRef)(!1),ie=S.motion.duration.fast,re=(0,_react.useRef)(P);re.current=P;const ne=(0,_react.useRef)(E);ne.current=E;const se=(0,_react.useCallback)((e=!1)=>{const t=ne.current;if(t<=0)return;const place=t=>e?(0,_reactNativeReanimated.withTiming)(t,{duration:ie,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}):t,a=re.current;if(q){const[e,i]=a,r=Math.min(e,i),n=Math.max(e,i);G.value=r,F.value=n,X.value=place(ee(r,t)),B.value=place(ee(n,t))}else{const e=a;G.value=e,F.value=e,X.value=place(ee(e,t))}},[q,ee,G,F,X,B,ie]),[le,ce]=(0,_react.useState)(0),oe=(0,_react.useRef)(!1),ue=(0,_react.useCallback)(e=>{ae.current=e,e||(oe.current=!0,ce(e=>e+1))},[]);(0,_react.useEffect)(()=>{if(ae.current)return;const e=oe.current;oe.current=!1,se(e)},[JSON.stringify(P),E,le,se]);const de=(0,_react.useCallback)(e=>{const t=e.nativeEvent.layout.width;J.value=t,T(t)},[J]),me=(0,_react.useCallback)((e,t)=>{L(q?[e,t]:e)},[q,L]),he=(0,_react.useCallback)(()=>{const e=(0,_index3.resolveHaptic)(_,"selection");e&&(0,_index3.triggerHaptic)(e)},[_]),ve=(0,_react.useRef)(me);ve.current=me;const be=(0,_react.useRef)(he);be.current=he;const pe=(0,_react.useCallback)((e,t)=>ve.current(e,t),[]),fe=(0,_react.useCallback)(()=>be.current(),[]),ge=Math.max(0,(44-j.thumbDiameter)/2),Re=ge>0?ge:void 0,we=(0,_react.useCallback)(e=>{const t="low"===e?X:B,s="low"===e?G:F,l="low"===e?F:G,c="low"===e?U:Z,d="low"===e?K:Q,m="low"===e,h=a,_=i,v=r,b=Y,p=q,f=V,g=M,R=!0===o,w=u,x=O,y=H,N=A,S=C,follow=e=>{"worklet";const a=J.value-2*S;if(a<=0||!Number.isFinite(e))return;const i=Math.min(Math.max(z.value+e,S),J.value-S);let r=h+(i-S)/a*(_-h);v>0&&(r=Math.round((r-h)/v)*v+h,r=Math.round(r*b)/b),r=Math.min(Math.max(r,h),_),p&&(m&&r>l.value&&(r=l.value),!m&&r<l.value&&(r=l.value)),t.value=w||_===h?_===h?S:S+(r-h)/(_-h)*a:p?m?Math.min(i,B.value):Math.max(i,X.value):i,r!==s.value&&(s.value=r,r!==h&&r!==_||(0,_reactNativeReanimated.runOnJS)(fe)(),(0,_reactNativeReanimated.runOnJS)(pe)(G.value,F.value))},k=_reactNativeGestureHandler.Gesture.Pan().enabled(!n).minDistance(0);return(void 0===Re?k:k.hitSlop(Re)).onStart(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(ue)(!0),z.value=t.value,g&&(c.value=(0,_reactNativeReanimated.withSpring)(f,N)),R&&(d.value=(0,_reactNativeReanimated.withTiming)(x,{duration:y,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)})),(0,_reactNativeReanimated.runOnJS)(fe)()}).onUpdate(e=>{"worklet";follow(e.translationX)}).onEnd(e=>{"worklet";follow(e.translationX),g&&(c.value=(0,_reactNativeReanimated.withSpring)(1,N)),R&&(d.value=(0,_reactNativeReanimated.withTiming)(0,{duration:y,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}))}).onFinalize(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(ue)(!1)})},[n,a,i,r,Y,q,V,M,o,u,O,H,A,C,Re,pe,fe,ue,X,B,G,F,U,Z,K,Q,z,J]),xe=(0,_react.useMemo)(()=>we("low"),[we]),ye=(0,_react.useMemo)(()=>we("high"),[we]),Ne=(0,_react.useCallback)(e=>{if(n||q||E<=0)return;const t=clamp(e.nativeEvent.locationX,0,E),a=te(t,E);a!==G.value&&(he(),G.value=a,X.value=(0,_reactNativeReanimated.withTiming)(ee(a,E),{duration:S.motion.duration.fast,easing:_reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic)}),me(a,a))},[n,q,E,te,ee,me,he,X,G,S.motion.duration.fast]),Se=(0,_react.useCallback)(e=>{if(n)return;const t="increment"===e.nativeEvent.actionName?r:-r,s=r>0?Math.round(t*Y)/Y:t;if(q){const e=Math.round((G.value+s)*Y)/Y,t=clamp(e,a,F.value);t!==G.value&&(G.value=t,X.value=ee(t,E),he(),me(t,F.value))}else{const e=Math.round((G.value+s)*Y)/Y,t=clamp(e,a,i);t!==G.value&&(G.value=t,X.value=ee(t,E),he(),me(t,t))}},[n,r,Y,q,a,i,ee,E,X,G,F,me,he]),ke=j.thumbDiameter/2,je=n?S.colors["surface-disabled"]:I,Ce="inset"===c?{backgroundColor:je,borderColor:S.colors.surface,borderWidth:Math.max(2,Math.round(.3*j.thumbDiameter)),...NO_SHADOW}:"minimal"===c?{backgroundColor:je,borderWidth:0}:"bar"===c?{backgroundColor:"transparent",borderWidth:0,...NO_SHADOW}:{backgroundColor:S.colors.surface,borderColor:je},Me=(0,_reactNativeReanimated.useAnimatedStyle)(()=>{const e=J.value;if(e<=0)return{opacity:0,transform:[{translateX:0},{scaleX:1}]};const t=n?.55:1;if(q){const a=Math.max(0,B.value-X.value+2*C);return{opacity:t,transform:[{translateX:X.value-C},{scaleX:a/e}]}}return{opacity:t,transform:[{translateX:X.value+C-e},{scaleX:1}]}},[J,n,q,B,X,C]),Ve=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:X.value-ke},{scale:U.value}]}),[X,ke,U]),He=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:B.value-ke},{scale:Z.value}]}),[B,ke,Z]),Oe=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:K.value}),[K]),De=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:Q.value}),[Q]),clampDisplay=e=>clamp(e,a,i),Ae=clampDisplay(q?Math.min(...P):P),Ee=clampDisplay(q?Math.max(...P):P);return(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,style:[D.container,b,v],testID:N,accessibilityRole:"adjustable",accessibilityLabel:h,accessibilityState:{disabled:n},"aria-disabled":n,accessibilityValue:q?{min:a,max:i,now:Ae,text:`${Ae} to ${Ee}`}:{min:a,max:i,now:Ae},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:Se,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:Ne,disabled:n||q,style:D.trackTouch,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:D.trackWrap,onLayout:de,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:D.trackClip,pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.track,{backgroundColor:n?S.colors["surface-disabled"]:S.colors.border},p]}),(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.fill,{backgroundColor:n?S.colors["surface-disabled"]:I},f,Me]})]}),(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:xe,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:ke,..._corners.smoothCorners,opacity:n?.55:1},Ce,g,Ve],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:o?(0,_jsxRuntime.jsxs)(_reactNativeReanimated.default.View,{style:[D.bubbleWrap,Oe],pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubble,{backgroundColor:I}],children:m?m(Ae):(0,_jsxRuntime.jsx)(_index4.Text,{variant:"caption",weight:"semibold",style:[{color:W},R],numberOfLines:1,children:d(Ae)})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubbleCaret,{backgroundColor:I}]})]}):null})}),q?(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:ye,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[D.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:ke,..._corners.smoothCorners,opacity:n?.55:1},Ce,g,He],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:o?(0,_jsxRuntime.jsxs)(_reactNativeReanimated.default.View,{style:[D.bubbleWrap,De],pointerEvents:"none",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubble,{backgroundColor:I}],children:m?m(Ee):(0,_jsxRuntime.jsx)(_index4.Text,{variant:"caption",weight:"semibold",style:[{color:W},R],numberOfLines:1,children:d(Ee)})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[D.bubbleCaret,{backgroundColor:I}]})]}):null})}):null]})})})});Slider.displayName="Slider";const buildStyles=(e,t)=>{const a=e.shadow.elevated,i=Math.max(t.thumbDiameter,t.trackHeight),r=i/2+e.space.xs;return _reactNative.StyleSheet.create({container:{width:"100%",paddingVertical:r,justifyContent:"center"},trackTouch:{width:"100%",justifyContent:"center"},trackWrap:{width:"100%",height:i,justifyContent:"center"},trackClip:{position:"absolute",left:0,right:0,height:t.trackHeight,top:(i-t.trackHeight)/2,borderRadius:t.trackHeight/2,..._corners.smoothCorners,overflow:"hidden"},track:{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:t.trackHeight/2,..._corners.smoothCorners},fill:{position:"absolute",top:0,left:0,width:"100%",height:t.trackHeight,borderRadius:t.trackHeight/2,..._corners.smoothCorners,transformOrigin:"left"},thumb:{position:"absolute",top:(i-t.thumbDiameter)/2,left:0,borderWidth:2,shadowColor:a.shadowColor,shadowOffset:a.shadowOffset,shadowOpacity:a.shadowOpacity,shadowRadius:a.shadowRadius,elevation:a.elevation,alignItems:"center",justifyContent:"center"},bubbleWrap:{position:"absolute",bottom:t.thumbDiameter+2,left:t.thumbDiameter/2-80,width:160,alignItems:"center"},bubbleCaret:{width:8,height:8,marginTop:-5,borderRadius:e.radius.none,..._corners.smoothCorners,transform:[{rotate:"45deg"}]},bubble:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xxs,borderRadius:e.radius.md,..._corners.smoothCorners,minWidth:36,alignItems:"center",justifyContent:"center",..._reactNative.Platform.select({ios:{shadowColor:e.shadow.card.shadowColor,shadowOffset:e.shadow.card.shadowOffset,shadowOpacity:e.shadow.card.shadowOpacity,shadowRadius:e.shadow.card.shadowRadius},android:{elevation:e.shadow.card.elevation},default:{}})}})};var _default=exports.default=Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_SORTABLE_LIST_LABELS=void 0,exports.SortableList=SortableList,exports.default=void 0,exports.dropIndex=dropIndex,exports.moveItem=moveItem,exports.rowShifts=rowShifts,exports.slotTop=slotTop,exports.topOf=topOf;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../theme/index.js"),_index2=require("../../utils/index.js"),_ScrollHost=require("../Screen/ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,r,l=Object.defineProperty,n={__proto__:null,default:e};if(Object(e)!==e)return n;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,n)}for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((a=l&&Object.getOwnPropertyDescriptor(e,r))&&(a.get||a.set)?l(n,r,a):n[r]=e[r]);return n}const DEFAULT_SORTABLE_LIST_LABELS=exports.DEFAULT_SORTABLE_LIST_LABELS=Object.freeze({moveUp:"Move up",moveDown:"Move down"}),LONG_PRESS_MS=350,EDGE_PX=48,SCROLL_STEP_PX=12,SCROLL_SLACK_PX=1,SPRING_CONFIG={damping:22,stiffness:260,mass:1},ACTION_STEP={moveUp:-1,moveDown:1},noop=e=>{};function moveItem(e,t,a){const r=e.slice();if(t<0||t>=r.length)return r;const[l]=r.splice(t,1);return r.splice(a,0,l),r}function topOf(e,t){"worklet";let a=0;for(let r=0;r<t;r++)a+=e[r]??0;return a}function slotTop(e,t,a){"worklet";let r=0,l=0;for(let n=0;n<e.length&&l<a;n++)n!==t&&(r+=e[n]??0,l++);return r}function dropIndex(e,t,a){"worklet";const r=topOf(e,t)+(e[t]??0)/2+a;let l=0,n=0;for(let a=0;a<e.length;a++){const i=e[a]??0;a!==t&&n+i/2<r&&l++,n+=i}return l}function rowShifts(e,t,a){const r=[];let l=0;for(const t of e)r.push(l),l+=t;const n=e.map(()=>0),i=moveItem(e.map((e,t)=>t),t,a);let o=0;for(const t of i)n[t]=o-(r[t]??0),o+=e[t]??0;return n}const buildStyles=e=>_reactNative.StyleSheet.create({handleRow:{flexDirection:"row",alignItems:"center"},handle:{paddingHorizontal:e.space.sm,paddingVertical:e.space.md,gap:e.space.xxs},bar:{width:e.space.md,height:e.space.xxs,backgroundColor:e.colors["text-muted"]},body:{flex:1}});function SortableRow({rowKey:e,index:t,count:a,shift:r,isActive:l,dragging:n,handle:i,disabled:o,shared:s,callbacks:c,labels:u,children:d}){const v=(0,_index.useTheme)(),_=(0,_react.useMemo)(()=>buildStyles(v),[v]),m=(0,_reactNativeReanimated.useSharedValue)(0);(0,_react.useEffect)(()=>{m.value=n&&!l?(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG):r},[n,l,r,m]),(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(m)},[m]);const S=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateY:l?s.dragY.value:m.value}],zIndex:l?1:0})),h=(0,_react.useMemo)(()=>{const{dragIndex:e,dropTo:a,dragY:r,translation:l,absoluteY:n,scrollY:u,scrollStart:d,hostOffset:v,hostStart:_,hostTarget:m,heights:S}=s,{onLift:h,onDrop:f,onSettled:p}=c,R=_reactNativeGestureHandler.Gesture.Pan().enabled(!o).onStart(i=>{"worklet";n.value=i.absoluteY,e.value=t,a.value=t,d.value=u.value,_.value=v.value,m.value=v.value,l.value=0,r.value=0,(0,_reactNativeReanimated.runOnJS)(h)(t)}).onUpdate(a=>{"worklet";e.value===t&&(l.value=a.translationY,n.value=a.absoluteY)}).onFinalize(()=>{"worklet";if(e.value!==t)return;const l=a.value,n=S.value;e.value=-1,r.value=topOf(n,t)+r.value-slotTop(n,t,l),r.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG,e=>{"worklet";e&&(0,_reactNativeReanimated.runOnJS)(p)()}),(0,_reactNativeReanimated.runOnJS)(f)(t,l)});return i?R:R.activateAfterLongPress(350)},[o,i,t,c,s]),f=o?[]:[...t>0?[{name:"moveUp",label:u.moveUp}]:[],...t<a-1?[{name:"moveDown",label:u.moveDown}]:[]];return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:S,onLayout:t=>c.onHeight(e,t.nativeEvent.layout.height),accessibilityActions:f,onAccessibilityAction:e=>{if(o)return;const r=t+(ACTION_STEP[e.nativeEvent.actionName]??0);r!==t&&r>=0&&r<a&&c.onMove(t,r)},testID:`sortable-row-${e}`,children:i?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_.handleRow,children:[(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:h,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_.handle,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar})]})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.body,children:d})]}):(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:h,children:(0,_jsxRuntime.jsx)(_reactNative.View,{children:d})})})}function SortableList(e){const{data:t,keyExtractor:a,renderItem:r,onReorder:l,handle:n=!1,disabled:i=!1,accessibilityLabel:o,labels:s,testID:c}=e,u=(0,_react.useMemo)(()=>({...DEFAULT_SORTABLE_LIST_LABELS,...s}),[s]),d=(0,_react.useMemo)(()=>t.map((e,t)=>({key:a(e,t),item:e})),[t,a]),v=(0,_react.useMemo)(()=>d.map(e=>e.key),[d]),_=(0,_reactNativeReanimated.useAnimatedRef)(),m=(0,_reactNativeReanimated.useSharedValue)(0),S=(0,_reactNativeReanimated.useSharedValue)(0),h=(0,_reactNativeReanimated.useSharedValue)(0),f=(0,_ScrollHost.useScrollHost)(),p=(0,_reactNativeReanimated.useSharedValue)(0),R=null!==f,g=f?.top??p,x=f?.bottom??p,N=f?.offset??p,b=f?.maxOffset??p,L=f?.scrollTo??noop,w=(0,_reactNativeReanimated.useSharedValue)(0),O=(0,_reactNativeReanimated.useSharedValue)(0),y=(0,_reactNativeReanimated.useSharedValue)(0),E=(0,_reactNativeReanimated.useSharedValue)(0),j=(0,_reactNativeReanimated.useSharedValue)(-1),T=(0,_reactNativeReanimated.useSharedValue)(-1),k=(0,_reactNativeReanimated.useSharedValue)(0),A=(0,_reactNativeReanimated.useSharedValue)([]),I=(0,_react.useRef)(new Map),P=(0,_react.useRef)(v),[C,M]=(0,_react.useState)(null),V=(0,_react.useCallback)(()=>{A.value=P.current.map(e=>I.current.get(e)??0)},[A]);(0,_react.useEffect)(()=>{P.current=v,V()},[v,V]),(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(k)},[k]);const D=(0,_react.useCallback)(e=>{M(t=>t?.dragging?{...t,to:e}:t)},[]),G=(0,_reactNativeReanimated.useFrameCallback)(()=>{"worklet";const e=j.value;if(e<0)return;const t=(0,_reactNativeReanimated.measure)(_);if(t){const e=R?Math.max(t.pageY,g.value):t.pageY,a=R?Math.min(t.pageY+t.height,x.value):t.pageY+t.height,r=Math.max(0,h.value-t.height-SCROLL_SLACK_PX);E.value<e+EDGE_PX?m.value>SCROLL_SLACK_PX?(0,_reactNativeReanimated.scrollTo)(_,0,Math.max(0,m.value-SCROLL_STEP_PX),!1):R&&O.value>0&&(O.value=Math.max(0,O.value-SCROLL_STEP_PX),(0,_reactNativeReanimated.runOnJS)(L)(O.value)):E.value>a-EDGE_PX&&(m.value<r?(0,_reactNativeReanimated.scrollTo)(_,0,Math.min(r,m.value+SCROLL_STEP_PX),!1):R&&O.value<b.value&&(O.value=Math.min(b.value,O.value+SCROLL_STEP_PX),(0,_reactNativeReanimated.runOnJS)(L)(O.value)))}k.value=y.value+m.value-S.value+N.value-w.value;const a=dropIndex(A.value,e,k.value);a!==T.value&&(T.value=a,(0,_reactNativeReanimated.runOnJS)(D)(a))},!1),Y=(0,_react.useCallback)(e=>{(0,_index2.triggerHaptic)("longPress"),G.setActive(!0),M({key:v[e]??"",from:e,to:e,dragging:!0})},[G,v]),H=(0,_react.useCallback)((e,t)=>{G.setActive(!1),M(e=>e?{...e,to:t,dragging:!1}:e),t!==e&&l(moveItem(v,e,t))},[G,v,l]),X=(0,_react.useCallback)(()=>{M(e=>e&&!e.dragging?null:e)},[]),q=(0,_react.useCallback)((e,t)=>{l(moveItem(v,e,t))},[v,l]),F=(0,_react.useCallback)((e,t)=>{I.current.set(e,t),V()},[V]),U=(0,_reactNativeReanimated.useAnimatedScrollHandler)({onScroll:e=>{"worklet";m.value=e.contentOffset.y}}),B=(0,_react.useCallback)((e,t)=>{h.value=t},[h]),J=(0,_react.useMemo)(()=>({scrollRef:_,scrollY:m,scrollStart:S,hostOffset:N,hostStart:w,hostTarget:O,translation:y,absoluteY:E,dragIndex:j,dropTo:T,dragY:k,heights:A}),[_,m,S,N,w,O,y,E,j,T,k,A]),z=(0,_react.useMemo)(()=>({onLift:Y,onDrop:H,onSettled:X,onMove:q,onHeight:F}),[Y,H,X,q,F]),K=!0===C?.dragging,W=K&&C?rowShifts(v.map(e=>I.current.get(e)??0),C.from,C.to):null;return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView,{ref:_,onScroll:U,onContentSizeChange:B,scrollEventThrottle:16,scrollEnabled:!K,accessibilityLabel:o,testID:c,children:d.map((e,t)=>{const a=C?.key===e.key;return(0,_jsxRuntime.jsx)(SortableRow,{rowKey:e.key,index:t,count:d.length,shift:W?.[t]??0,isActive:a,dragging:K,handle:n,disabled:i,shared:J,callbacks:z,labels:u,children:r({item:e.item,index:t,isActive:a})},e.key)})})}SortableList.displayName="SortableList";var _default=exports.default=SortableList;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_SORTABLE_LIST_LABELS=void 0,exports.SortableList=SortableList,exports.default=void 0,exports.dropIndex=dropIndex,exports.moveItem=moveItem,exports.rowShifts=rowShifts,exports.slotTop=slotTop,exports.topOf=topOf;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../theme/index.js"),_index2=require("../../utils/index.js"),_ScrollHost=require("../Screen/ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,r,l=Object.defineProperty,n={__proto__:null,default:e};if(Object(e)!==e)return n;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,n)}for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((a=l&&Object.getOwnPropertyDescriptor(e,r))&&(a.get||a.set)?l(n,r,a):n[r]=e[r]);return n}const DEFAULT_SORTABLE_LIST_LABELS=exports.DEFAULT_SORTABLE_LIST_LABELS=Object.freeze({moveUp:"Move up",moveDown:"Move down"}),LONG_PRESS_MS=350,EDGE_PX=48,SCROLL_STEP_PX=12,SCROLL_SLACK_PX=1,SPRING_CONFIG={damping:22,stiffness:260,mass:1},ACTION_STEP={moveUp:-1,moveDown:1},noop=e=>{};function moveItem(e,t,a){const r=e.slice();if(t<0||t>=r.length)return r;const[l]=r.splice(t,1);return r.splice(a,0,l),r}function topOf(e,t){"worklet";let a=0;for(let r=0;r<t;r++)a+=e[r]??0;return a}function slotTop(e,t,a){"worklet";let r=0,l=0;for(let n=0;n<e.length&&l<a;n++)n!==t&&(r+=e[n]??0,l++);return r}function dropIndex(e,t,a){"worklet";const r=topOf(e,t)+(e[t]??0)/2+a;let l=0,n=0;for(let a=0;a<e.length;a++){const i=e[a]??0;a!==t&&n+i/2<r&&l++,n+=i}return l}function rowShifts(e,t,a){const r=[];let l=0;for(const t of e)r.push(l),l+=t;const n=e.map(()=>0),i=moveItem(e.map((e,t)=>t),t,a);let o=0;for(const t of i)n[t]=o-(r[t]??0),o+=e[t]??0;return n}const buildStyles=e=>_reactNative.StyleSheet.create({handleRow:{flexDirection:"row",alignItems:"center"},handle:{paddingHorizontal:e.space.sm,paddingVertical:e.space.md,gap:e.space.xxs},bar:{width:e.space.md,height:e.space.xxs,backgroundColor:e.colors["text-muted"]},body:{flex:1}});function SortableRow({rowKey:e,index:t,count:a,shift:r,isActive:l,dragging:n,handle:i,disabled:o,shared:s,callbacks:c,labels:u,children:d}){const v=(0,_index.useTheme)(),_=(0,_react.useMemo)(()=>buildStyles(v),[v]),m=(0,_reactNativeReanimated.useSharedValue)(0);(0,_react.useEffect)(()=>{m.value=n&&!l?(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG):r},[n,l,r,m]),(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(m)},[m]);const S=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateY:l?s.dragY.value:m.value}],zIndex:l?1:0}),[l,s,m]),h=(0,_react.useMemo)(()=>{const{dragIndex:e,dropTo:a,dragY:r,translation:l,absoluteY:n,scrollY:u,scrollStart:d,hostOffset:v,hostStart:_,hostTarget:m,heights:S}=s,{onLift:h,onDrop:f,onSettled:p}=c,R=_reactNativeGestureHandler.Gesture.Pan().enabled(!o).onStart(i=>{"worklet";n.value=i.absoluteY,e.value=t,a.value=t,d.value=u.value,_.value=v.value,m.value=v.value,l.value=0,r.value=0,(0,_reactNativeReanimated.runOnJS)(h)(t)}).onUpdate(a=>{"worklet";e.value===t&&(l.value=a.translationY,n.value=a.absoluteY)}).onFinalize(()=>{"worklet";if(e.value!==t)return;const l=a.value,n=S.value;e.value=-1,r.value=topOf(n,t)+r.value-slotTop(n,t,l),r.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG,e=>{"worklet";e&&(0,_reactNativeReanimated.runOnJS)(p)()}),(0,_reactNativeReanimated.runOnJS)(f)(t,l)});return i?R:R.activateAfterLongPress(350)},[o,i,t,c,s]),f=o?[]:[...t>0?[{name:"moveUp",label:u.moveUp}]:[],...t<a-1?[{name:"moveDown",label:u.moveDown}]:[]];return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:S,onLayout:t=>c.onHeight(e,t.nativeEvent.layout.height),accessibilityActions:f,onAccessibilityAction:e=>{if(o)return;const r=t+(ACTION_STEP[e.nativeEvent.actionName]??0);r!==t&&r>=0&&r<a&&c.onMove(t,r)},testID:`sortable-row-${e}`,children:i?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_.handleRow,children:[(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:h,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_.handle,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.bar})]})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:_.body,children:d})]}):(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:h,children:(0,_jsxRuntime.jsx)(_reactNative.View,{children:d})})})}function SortableList(e){const{data:t,keyExtractor:a,renderItem:r,onReorder:l,handle:n=!1,disabled:i=!1,accessibilityLabel:o,labels:s,testID:c}=e,u=(0,_react.useMemo)(()=>({...DEFAULT_SORTABLE_LIST_LABELS,...s}),[s]),d=(0,_react.useMemo)(()=>t.map((e,t)=>({key:a(e,t),item:e})),[t,a]),v=(0,_react.useMemo)(()=>d.map(e=>e.key),[d]),_=(0,_reactNativeReanimated.useAnimatedRef)(),m=(0,_reactNativeReanimated.useSharedValue)(0),S=(0,_reactNativeReanimated.useSharedValue)(0),h=(0,_reactNativeReanimated.useSharedValue)(0),f=(0,_ScrollHost.useScrollHost)(),p=(0,_reactNativeReanimated.useSharedValue)(0),R=null!==f,g=f?.top??p,x=f?.bottom??p,N=f?.offset??p,b=f?.maxOffset??p,L=f?.scrollTo??noop,w=(0,_reactNativeReanimated.useSharedValue)(0),O=(0,_reactNativeReanimated.useSharedValue)(0),y=(0,_reactNativeReanimated.useSharedValue)(0),E=(0,_reactNativeReanimated.useSharedValue)(0),j=(0,_reactNativeReanimated.useSharedValue)(-1),T=(0,_reactNativeReanimated.useSharedValue)(-1),k=(0,_reactNativeReanimated.useSharedValue)(0),A=(0,_reactNativeReanimated.useSharedValue)([]),I=(0,_react.useRef)(new Map),P=(0,_react.useRef)(v),[C,M]=(0,_react.useState)(null),V=(0,_react.useCallback)(()=>{A.value=P.current.map(e=>I.current.get(e)??0)},[A]);(0,_react.useEffect)(()=>{P.current=v,V()},[v,V]),(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(k)},[k]);const D=(0,_react.useCallback)(e=>{M(t=>t?.dragging?{...t,to:e}:t)},[]),G=(0,_reactNativeReanimated.useFrameCallback)(()=>{"worklet";const e=j.value;if(e<0)return;const t=(0,_reactNativeReanimated.measure)(_);if(t){const e=R?Math.max(t.pageY,g.value):t.pageY,a=R?Math.min(t.pageY+t.height,x.value):t.pageY+t.height,r=Math.max(0,h.value-t.height-SCROLL_SLACK_PX);E.value<e+EDGE_PX?m.value>SCROLL_SLACK_PX?(0,_reactNativeReanimated.scrollTo)(_,0,Math.max(0,m.value-SCROLL_STEP_PX),!1):R&&O.value>0&&(O.value=Math.max(0,O.value-SCROLL_STEP_PX),(0,_reactNativeReanimated.runOnJS)(L)(O.value)):E.value>a-EDGE_PX&&(m.value<r?(0,_reactNativeReanimated.scrollTo)(_,0,Math.min(r,m.value+SCROLL_STEP_PX),!1):R&&O.value<b.value&&(O.value=Math.min(b.value,O.value+SCROLL_STEP_PX),(0,_reactNativeReanimated.runOnJS)(L)(O.value)))}k.value=y.value+m.value-S.value+N.value-w.value;const a=dropIndex(A.value,e,k.value);a!==T.value&&(T.value=a,(0,_reactNativeReanimated.runOnJS)(D)(a))},!1),Y=(0,_react.useCallback)(e=>{(0,_index2.triggerHaptic)("longPress"),G.setActive(!0),M({key:v[e]??"",from:e,to:e,dragging:!0})},[G,v]),H=(0,_react.useCallback)((e,t)=>{G.setActive(!1),M(e=>e?{...e,to:t,dragging:!1}:e),t!==e&&l(moveItem(v,e,t))},[G,v,l]),X=(0,_react.useCallback)(()=>{M(e=>e&&!e.dragging?null:e)},[]),q=(0,_react.useCallback)((e,t)=>{l(moveItem(v,e,t))},[v,l]),F=(0,_react.useCallback)((e,t)=>{I.current.set(e,t),V()},[V]),U=(0,_reactNativeReanimated.useAnimatedScrollHandler)({onScroll:e=>{"worklet";m.value=e.contentOffset.y}}),B=(0,_react.useCallback)((e,t)=>{h.value=t},[h]),J=(0,_react.useMemo)(()=>({scrollRef:_,scrollY:m,scrollStart:S,hostOffset:N,hostStart:w,hostTarget:O,translation:y,absoluteY:E,dragIndex:j,dropTo:T,dragY:k,heights:A}),[_,m,S,N,w,O,y,E,j,T,k,A]),z=(0,_react.useMemo)(()=>({onLift:Y,onDrop:H,onSettled:X,onMove:q,onHeight:F}),[Y,H,X,q,F]),K=!0===C?.dragging,W=K&&C?rowShifts(v.map(e=>I.current.get(e)??0),C.from,C.to):null;return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView,{ref:_,onScroll:U,onContentSizeChange:B,scrollEventThrottle:16,scrollEnabled:!K,accessibilityLabel:o,testID:c,children:d.map((e,t)=>{const a=C?.key===e.key;return(0,_jsxRuntime.jsx)(SortableRow,{rowKey:e.key,index:t,count:d.length,shift:W?.[t]??0,isActive:a,dragging:K,handle:n,disabled:i,shared:J,callbacks:z,labels:u,children:r({item:e.item,index:t,isActive:a})},e.key)})})}SortableList.displayName="SortableList";var _default=exports.default=SortableList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StatTile=exports.DEFAULT_STAT_TILE_LABELS=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index2=require("../AppIcon/index.js"),_index3=require("../Card/index.js"),_index4=require("../IconBadge/index.js"),_index5=require("../Skeleton/index.js"),_index6=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_STAT_TILE_LABELS=exports.DEFAULT_STAT_TILE_LABELS=Object.freeze({trendUp:"up",trendDown:"down",trendFlat:"no change"}),isText=e=>"string"==typeof e||"number"==typeof e,TREND_ICON={up:"arrow-up",down:"arrow-down",flat:"minus"},TREND_SIGN={up:"+",down:"-",flat:""},percentText=e=>(0,_mobileCore.formatPercent)(Math.abs(e),{scale:"percent",maximumFractionDigits:1}),trendFigure=e=>"number"==typeof e.value?`${TREND_SIGN[e.direction]}${percentText(e.value)}`:e.value,trendSpoken=(e,t)=>{const n=[{up:t.trendUp,down:t.trendDown,flat:t.trendFlat}[e.direction]];return"flat"!==e.direction&&n.push("number"==typeof e.value?percentText(e.value):e.value),e.period&&n.push(e.period),n.join(" ")},StatTile=exports.StatTile=(0,_react.forwardRef)((e,t)=>{const{label:n,value:i,icon:r,iconVariant:a,tone:s="primary",caption:l,trend:o,sparkline:d,onPress:x,loading:c=!1,accessibilityLabel:u,labels:_,style:p,testID:m}=e,j=(0,_index.useTheme)();(0,_warnInvalidValue.warnInvalidValue)("StatTile","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("StatTile","trend.direction",o?.direction,["up","down","flat"]),(0,_warnInvalidValue.warnInvalidValue)("StatTile","trend.goodWhen",o?.goodWhen,["up","down"]);const T=(0,_react.useMemo)(()=>({...DEFAULT_STAT_TILE_LABELS,..._}),[_]),v=o?`, ${trendSpoken(o,T)}`:"",h=u??(isText(i)?`${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StatTile=exports.DEFAULT_STAT_TILE_LABELS=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index2=require("../AppIcon/index.js"),_index3=require("../Card/index.js"),_index4=require("../IconBadge/index.js"),_index5=require("../Skeleton/index.js"),_index6=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_STAT_TILE_LABELS=exports.DEFAULT_STAT_TILE_LABELS=Object.freeze({trendUp:"up",trendDown:"down",trendFlat:"no change"}),isText=e=>"string"==typeof e||"number"==typeof e,TREND_ICON={up:"arrow-up",down:"arrow-down",flat:"minus"},TREND_SIGN={up:"+",down:"-",flat:""},percentText=e=>(0,_mobileCore.formatPercent)(Math.abs(e),{scale:"percent",maximumFractionDigits:1}),trendFigure=e=>"number"==typeof e.value?`${TREND_SIGN[e.direction]}${percentText(e.value)}`:e.value,trendSpoken=(e,t)=>{const n=[{up:t.trendUp,down:t.trendDown,flat:t.trendFlat}[e.direction]];return"flat"!==e.direction&&n.push("number"==typeof e.value?percentText(e.value):e.value),e.period&&n.push(e.period),n.join(" ")},StatTile=exports.StatTile=(0,_react.forwardRef)((e,t)=>{const{label:n,value:i,icon:r,iconVariant:a,tone:s="primary",caption:l,trend:o,sparkline:d,onPress:x,loading:c=!1,accessibilityLabel:u,labels:_,style:p,testID:m}=e,j=(0,_index.useTheme)();(0,_warnInvalidValue.warnInvalidValue)("StatTile","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("StatTile","trend.direction",o?.direction,["up","down","flat"]),(0,_warnInvalidValue.warnInvalidValue)("StatTile","trend.goodWhen",o?.goodWhen,["up","down"]);const T=(0,_react.useMemo)(()=>({...DEFAULT_STAT_TILE_LABELS,..._}),[_]),v=o?`, ${trendSpoken(o,T)}`:"",h=isText(n)?`${n}, `:"",w=u??(isText(i)?`${h}${i}${v}`:void 0),y=!!o&&o.direction===(o.goodWhen??"up"),f=o&&"flat"!==o.direction?y?"success":"danger":"secondary",S="secondary"===f?j.colors["text-muted"]:j.colors[`${f}-text`];return c?(0,_jsxRuntime.jsx)(_index3.Card,{ref:t,variant:"outline",style:p,testID:m,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.row,{columnGap:j.space.md}],children:[void 0===r?null:(0,_jsxRuntime.jsx)(_index5.Skeleton,{shape:"circle",width:40,height:40}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.text,children:[(0,_jsxRuntime.jsx)(_index5.Skeleton,{shape:"text",width:"50%",height:12}),(0,_jsxRuntime.jsx)(_index5.Skeleton,{shape:"text",width:"35%",height:24,style:{marginTop:j.space.xs}})]})]})}):(0,_jsxRuntime.jsx)(_index3.Card,{ref:t,variant:"outline",onPress:x,accessibilityLabel:w,style:p,testID:m,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.row,{columnGap:j.space.md}],children:[void 0===r?null:(0,_jsxRuntime.jsx)(_index4.IconBadge,{icon:r,iconVariant:a,tone:s}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.text,children:[(0,_jsxRuntime.jsx)(_index6.Text,{variant:"caption",color:"secondary",numberOfLines:1,children:n}),isText(i)?(0,_jsxRuntime.jsx)(_index6.Text,{variant:"h3",numberOfLines:1,children:i}):i,o?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.trend,{columnGap:j.space.xxs}],testID:m?`${m}-trend`:void 0,children:[(0,_jsxRuntime.jsx)(_index2.AppIcon,{name:TREND_ICON[o.direction],size:"xs",color:S}),(0,_jsxRuntime.jsxs)(_index6.Text,{variant:"caption",color:f,numberOfLines:2,style:styles.text,children:[trendFigure(o),o.period?(0,_jsxRuntime.jsx)(_index6.Text,{variant:"caption",color:"tertiary",children:` ${o.period}`}):null]})]}):null,null==l||""===l?null:isText(l)?(0,_jsxRuntime.jsx)(_index6.Text,{variant:"caption",color:"tertiary",numberOfLines:1,children:l}):l,null==d?null:(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginTop:j.space.sm},children:d})]})]})})});StatTile.displayName="StatTile";const styles=_reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},text:{flex:1,minWidth:0},trend:{flexDirection:"row",alignItems:"center"}});var _default=exports.default=StatTile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Swipeable=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../theme/index.js"),_index2=require("../../utils/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_slotIcon=require("../AppIcon/slotIcon.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,n,i=Object.defineProperty,r={__proto__:null,default:e};if(Object(e)!==e)return r;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,r)}for(n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=i&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?i(r,n,a):r[n]=e[n]);return r}const SPRING_CONFIG={damping:22,stiffness:260,mass:1},DRAG_ACTIVATION_OFFSET=10,RUBBER_BAND_FACTOR=.35,FAIL_OFFSET_Y=15,ACTION_ICON_SIZE=20,toneToBg=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"success":return e.colors.success;case"warning":return e.colors.warning;case"danger":return e.colors.danger;case"info":return e.colors.info;default:return e.colors.neutral}},toneToOnColor=(e,t)=>{switch(t){case"primary":return e.colors["on-primary"];case"success":return e.colors["on-success"];case"warning":return e.colors["on-warning"];case"danger":return e.colors["on-danger"];case"info":return e.colors["on-info"];default:return e.colors["on-neutral"]}},Swipeable=e=>{const{children:t,leftActions:a,rightActions:n,threshold:i,fullSwipeThreshold:r,onSwipeOpen:s,onSwipeClose:c,disabled:o=!1,haptic:l,containerStyle:u,contentStyle:d,actionStyle:_,accessibilityLabel:m,testID:v}=e,h=(0,_index.useTheme)(),p=i??80,w=r??200,S=(0,_react.useMemo)(()=>buildStyles(h),[h]),b=(0,_react.useMemo)(()=>buildActionStyles(h),[h]),f=!!a&&a.length>0,N=!!n&&n.length>0,R=_reactNative.Dimensions.get("window").width,x=f?p*(a?.length??0):0,g=N?p*(n?.length??0):0,y=(0,_reactNativeReanimated.useSharedValue)(0),I=(0,_reactNativeReanimated.useSharedValue)(0),j=(0,_react.useRef)(null);(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(y),(0,_reactNativeReanimated.cancelAnimation)(I)},[y,I]);const O=(0,_react.useCallback)(e=>{j.current!==e&&(j.current=e,s?.(e))},[s]),C=(0,_react.useCallback)(()=>{null!==j.current&&(j.current=null,c?.())},[c]),A=(0,_react.useCallback)(e=>{const t="left"===e?a:n,i=t?.[0];i&&(!1!==l&&(0,_index2.triggerHaptic)("notificationSuccess"),i.onPress(),y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),j.current=null,c?.())},[a,n,y,c,l]),G=(0,_react.useCallback)(()=>{y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),C()},[y,C]),P=(0,_react.useCallback)(e=>{const t=(0,_index2.resolveHaptic)(l,"selection");t&&(0,_index2.triggerHaptic)(t),e.onPress(),G()},[G,l]),k=(0,_react.useMemo)(()=>{const e=x,t=g,a=w,n=-w,i=R,r=-R,s=p,c=f,l=N;return _reactNativeGestureHandler.Gesture.Pan().enabled(!o).withTestId(v?`${v}-gesture`:"swipeable-gesture").activeOffsetX([-10,10]).failOffsetY([-15,15]).onStart(()=>{"worklet";I.value=y.value}).onUpdate(a=>{"worklet";const n=I.value+a.translationX;y.value=n>0&&!c||n<0&&!l?0:n>e&&c?e+.35*(n-e):n<-t&&l?.35*(n+t)-t:n}).onEnd(()=>{"worklet";const o=y.value;return c&&o>=a?(y.value=(0,_reactNativeReanimated.withSpring)(i,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(A)("left")):l&&o<=n?(y.value=(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(A)("right")):c&&o>=s?(y.value=(0,_reactNativeReanimated.withSpring)(e,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(O)("left")):l&&o<=-s?(y.value=(0,_reactNativeReanimated.withSpring)(-t,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(O)("right")):(y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(C)())})},[o,I,A,w,f,N,x,C,O,g,R,p,y,v]),T=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:y.value}]})),F=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:x>0?Math.min(1,Math.max(0,y.value/x)):0})),V=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:g>0?Math.min(1,Math.max(0,-y.value/g)):0})),q=(0,_react.useMemo)(()=>{const e=[];return a?.forEach(t=>{e.push({name:t.key,label:t.label})}),n?.forEach(t=>{e.push({name:t.key,label:t.label})}),e},[a,n]),M=(0,_react.useCallback)(e=>{const t=e.nativeEvent.actionName,i=[...a??[],...n??[]].find(e=>e.key===t);i&&(!1!==l&&(0,_index2.triggerHaptic)("selection"),i.onPress())},[a,n,l]);return f||N?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[S.root,u],testID:v,accessibilityLabel:m,accessibilityActions:q,onAccessibilityAction:M,children:[f?(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.actionsRow,S.actionsLeft,{width:x},_,F],pointerEvents:"box-none",children:a?.map(e=>(0,_jsxRuntime.jsx)(ActionButton,{action:e,theme:h,actionStyles:b,width:p,onPress:P},e.key))}):null,N?(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.actionsRow,S.actionsRight,{width:g},_,V],pointerEvents:"box-none",children:n?.map(e=>(0,_jsxRuntime.jsx)(ActionButton,{action:e,theme:h,actionStyles:b,width:p,onPress:P},e.key))}):null,(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:k,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.content,d,T],children:t})})]}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:u,testID:v,children:t})};exports.Swipeable=Swipeable,Swipeable.displayName="Swipeable";const ActionButton=({action:e,theme:t,actionStyles:a,width:n,onPress:i})=>{(0,_warnInvalidValue.warnInvalidValue)("Swipeable","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const r=e.tone??"neutral",s=toneToBg(t,r),c=(0,_slotIcon.renderSlotIcon)(e.icon,{color:toneToOnColor(t,r),size:20,disabled:!1});return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>i(e),accessibilityRole:"button",accessibilityLabel:e.label,style:[a.button,{width:n,backgroundColor:s,paddingHorizontal:t.space.sm}],children:[c?(0,_jsxRuntime.jsx)(_reactNative.View,{style:a.icon,children:c}):null,(0,_jsxRuntime.jsx)(_index3.Text,{variant:"bodySmall",weight:"semibold",style:[a.label,{color:toneToOnColor(t,r)}],numberOfLines:1,children:e.label})]})},buildActionStyles=e=>_reactNative.StyleSheet.create({button:{flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center"},icon:{marginBottom:e.space.xxs},label:{textAlign:"center"}}),buildStyles=e=>_reactNative.StyleSheet.create({root:{position:"relative",overflow:"hidden"},content:{backgroundColor:"transparent"},actionsRow:{position:"absolute",top:0,bottom:0,flexDirection:"row"},actionsLeft:{left:0},actionsRight:{right:0,justifyContent:"flex-end"}});var _default=exports.default=Swipeable;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Swipeable=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../theme/index.js"),_index2=require("../../utils/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_slotIcon=require("../AppIcon/slotIcon.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var a,n,i=Object.defineProperty,r={__proto__:null,default:e};if(Object(e)!==e)return r;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,r)}for(n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=i&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?i(r,n,a):r[n]=e[n]);return r}const SPRING_CONFIG={damping:22,stiffness:260,mass:1},DRAG_ACTIVATION_OFFSET=10,RUBBER_BAND_FACTOR=.35,FAIL_OFFSET_Y=15,ACTION_ICON_SIZE=20,toneToBg=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"success":return e.colors.success;case"warning":return e.colors.warning;case"danger":return e.colors.danger;case"info":return e.colors.info;default:return e.colors.neutral}},toneToOnColor=(e,t)=>{switch(t){case"primary":return e.colors["on-primary"];case"success":return e.colors["on-success"];case"warning":return e.colors["on-warning"];case"danger":return e.colors["on-danger"];case"info":return e.colors["on-info"];default:return e.colors["on-neutral"]}},Swipeable=e=>{const{children:t,leftActions:a,rightActions:n,threshold:i,fullSwipeThreshold:r,onSwipeOpen:s,onSwipeClose:c,disabled:o=!1,haptic:l,containerStyle:u,contentStyle:d,actionStyle:_,accessibilityLabel:m,testID:v}=e,h=(0,_index.useTheme)(),p=i??80,w=r??200,S=(0,_react.useMemo)(()=>buildStyles(h),[h]),b=(0,_react.useMemo)(()=>buildActionStyles(h),[h]),f=!!a&&a.length>0,N=!!n&&n.length>0,R=_reactNative.Dimensions.get("window").width,x=f?p*(a?.length??0):0,g=N?p*(n?.length??0):0,y=(0,_reactNativeReanimated.useSharedValue)(0),I=(0,_reactNativeReanimated.useSharedValue)(0),j=(0,_react.useRef)(null);(0,_react.useEffect)(()=>()=>{(0,_reactNativeReanimated.cancelAnimation)(y),(0,_reactNativeReanimated.cancelAnimation)(I)},[y,I]);const O=(0,_react.useCallback)(e=>{j.current!==e&&(j.current=e,s?.(e))},[s]),C=(0,_react.useCallback)(()=>{null!==j.current&&(j.current=null,c?.())},[c]),A=(0,_react.useCallback)(e=>{const t="left"===e?a:n,i=t?.[0];i&&(!1!==l&&(0,_index2.triggerHaptic)("notificationSuccess"),i.onPress(),y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),j.current=null,c?.())},[a,n,y,c,l]),G=(0,_react.useCallback)(()=>{y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),C()},[y,C]),P=(0,_react.useCallback)(e=>{const t=(0,_index2.resolveHaptic)(l,"selection");t&&(0,_index2.triggerHaptic)(t),e.onPress(),G()},[G,l]),k=(0,_react.useMemo)(()=>{const e=x,t=g,a=w,n=-w,i=R,r=-R,s=p,c=f,l=N;return _reactNativeGestureHandler.Gesture.Pan().enabled(!o).withTestId(v?`${v}-gesture`:"swipeable-gesture").activeOffsetX([-10,10]).failOffsetY([-15,15]).onStart(()=>{"worklet";I.value=y.value}).onUpdate(a=>{"worklet";const n=I.value+a.translationX;y.value=n>0&&!c||n<0&&!l?0:n>e&&c?e+.35*(n-e):n<-t&&l?.35*(n+t)-t:n}).onEnd(()=>{"worklet";const o=y.value;return c&&o>=a?(y.value=(0,_reactNativeReanimated.withSpring)(i,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(A)("left")):l&&o<=n?(y.value=(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(A)("right")):c&&o>=s?(y.value=(0,_reactNativeReanimated.withSpring)(e,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(O)("left")):l&&o<=-s?(y.value=(0,_reactNativeReanimated.withSpring)(-t,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(O)("right")):(y.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),void(0,_reactNativeReanimated.runOnJS)(C)())})},[o,I,A,w,f,N,x,C,O,g,R,p,y,v]),T=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:y.value}]}),[y]),F=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:x>0?Math.min(1,Math.max(0,y.value/x)):0}),[x,y]),V=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:g>0?Math.min(1,Math.max(0,-y.value/g)):0}),[g,y]),q=(0,_react.useMemo)(()=>{const e=[];return a?.forEach(t=>{e.push({name:t.key,label:t.label})}),n?.forEach(t=>{e.push({name:t.key,label:t.label})}),e},[a,n]),M=(0,_react.useCallback)(e=>{const t=e.nativeEvent.actionName,i=[...a??[],...n??[]].find(e=>e.key===t);i&&(!1!==l&&(0,_index2.triggerHaptic)("selection"),i.onPress())},[a,n,l]);return f||N?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[S.root,u],testID:v,accessibilityLabel:m,accessibilityActions:q,onAccessibilityAction:M,children:[f?(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.actionsRow,S.actionsLeft,{width:x},_,F],pointerEvents:"box-none",children:a?.map(e=>(0,_jsxRuntime.jsx)(ActionButton,{action:e,theme:h,actionStyles:b,width:p,onPress:P},e.key))}):null,N?(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.actionsRow,S.actionsRight,{width:g},_,V],pointerEvents:"box-none",children:n?.map(e=>(0,_jsxRuntime.jsx)(ActionButton,{action:e,theme:h,actionStyles:b,width:p,onPress:P},e.key))}):null,(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:k,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[S.content,d,T],children:t})})]}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:u,testID:v,children:t})};exports.Swipeable=Swipeable,Swipeable.displayName="Swipeable";const ActionButton=({action:e,theme:t,actionStyles:a,width:n,onPress:i})=>{(0,_warnInvalidValue.warnInvalidValue)("Swipeable","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const r=e.tone??"neutral",s=toneToBg(t,r),c=(0,_slotIcon.renderSlotIcon)(e.icon,{color:toneToOnColor(t,r),size:20,disabled:!1});return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>i(e),accessibilityRole:"button",accessibilityLabel:e.label,style:[a.button,{width:n,backgroundColor:s,paddingHorizontal:t.space.sm}],children:[c?(0,_jsxRuntime.jsx)(_reactNative.View,{style:a.icon,children:c}):null,(0,_jsxRuntime.jsx)(_index3.Text,{variant:"bodySmall",weight:"semibold",style:[a.label,{color:toneToOnColor(t,r)}],numberOfLines:1,children:e.label})]})},buildActionStyles=e=>_reactNative.StyleSheet.create({button:{flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center"},icon:{marginBottom:e.space.xxs},label:{textAlign:"center"}}),buildStyles=e=>_reactNative.StyleSheet.create({root:{position:"relative",overflow:"hidden"},content:{backgroundColor:"transparent"},actionsRow:{position:"absolute",top:0,bottom:0,flexDirection:"row"},actionsLeft:{left:0},actionsRight:{right:0,justifyContent:"flex-end"}});var _default=exports.default=Swipeable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TypingIndicator=exports.DEFAULT_TYPING_INDICATOR_LABELS=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_useReducedMotion=require("../../hooks/useReducedMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_index2=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var i,a,r=Object.defineProperty,s={__proto__:null,default:e};if(Object(e)!==e)return s;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,s)}for(a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((i=r&&Object.getOwnPropertyDescriptor(e,a))&&(i.get||i.set)?r(s,a,i):s[a]=e[a]);return s}const DEFAULT_TYPING_INDICATOR_LABELS=exports.DEFAULT_TYPING_INDICATOR_LABELS=Object.freeze({typing:"Typing"}),DOT=6,DIM=.3,PULSE_MS=400,STAGGER_MS=160,STILL_OPACITY=[1,.65,.3],DOT_NAMES=["first","second","third"],Dot=({index:e,still:t,colour:i,dotStyle:a})=>{const r=(0,_reactNativeReanimated.useSharedValue)(.3);(0,_react.useEffect)(()=>{if(!t)return r.value=(0,_reactNativeReanimated.withDelay)(160*e,(0,_reactNativeReanimated.withRepeat)((0,_reactNativeReanimated.withSequence)((0,_reactNativeReanimated.withTiming)(1,{duration:400}),(0,_reactNativeReanimated.withTiming)(.3,{duration:400})),-1)),()=>(0,_reactNativeReanimated.cancelAnimation)(r)},[t,e,r]);const s=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:r.value}));return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[a,{backgroundColor:i},t?{opacity:STILL_OPACITY[e]}:s]})},TypingIndicator=({label:e,accessibilityLabel:t,labels:i,bubble:a=!0,style:r,testID:s})=>{const c=(0,_index.useTheme)(),n=(0,_react.useMemo)(()=>buildStyles(c),[c]),o=(0,_useReducedMotion.useReducedMotion)(),l=c.colors["text-subtle"],d=(0,_react.useMemo)(()=>({...DEFAULT_TYPING_INDICATOR_LABELS,...i}),[i]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[n.root,a?n.bubble:null,r],accessible:!0,accessibilityRole:"progressbar",accessibilityLabel:e??t??d.typing,accessibilityState:{busy:!0},"aria-busy":!0,testID:s,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:n.dots,children:DOT_NAMES.map((e,t)=>(0,_jsxRuntime.jsx)(Dot,{index:t,still:o,colour:l,dotStyle:n.dot},e))}),e?(0,_jsxRuntime.jsx)(_index2.Text,{variant:"bodySmall",color:"secondary",children:e}):null]})};exports.TypingIndicator=TypingIndicator;const buildStyles=e=>_reactNative.StyleSheet.create({dot:{width:6,height:6,borderRadius:e.radius.pill,..._corners.smoothCorners},root:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:e.space.sm,marginTop:e.space.sm},bubble:{backgroundColor:e.colors["bg-subtle"],borderRadius:e.radius.xl,..._corners.smoothCorners,paddingHorizontal:e.space.md,paddingVertical:e.space.sm+e.space.xs},dots:{flexDirection:"row",alignItems:"center",gap:e.space.xs}});var _default=exports.default=TypingIndicator;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TypingIndicator=exports.DEFAULT_TYPING_INDICATOR_LABELS=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_useReducedMotion=require("../../hooks/useReducedMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_index2=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var i,a,r=Object.defineProperty,s={__proto__:null,default:e};if(Object(e)!==e)return s;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,s)}for(a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((i=r&&Object.getOwnPropertyDescriptor(e,a))&&(i.get||i.set)?r(s,a,i):s[a]=e[a]);return s}const DEFAULT_TYPING_INDICATOR_LABELS=exports.DEFAULT_TYPING_INDICATOR_LABELS=Object.freeze({typing:"Typing"}),DOT=6,DIM=.3,PULSE_MS=400,STAGGER_MS=160,STILL_OPACITY=[1,.65,.3],DOT_NAMES=["first","second","third"],Dot=({index:e,still:t,colour:i,dotStyle:a})=>{const r=(0,_reactNativeReanimated.useSharedValue)(.3);(0,_react.useEffect)(()=>{if(!t)return r.value=(0,_reactNativeReanimated.withDelay)(160*e,(0,_reactNativeReanimated.withRepeat)((0,_reactNativeReanimated.withSequence)((0,_reactNativeReanimated.withTiming)(1,{duration:400}),(0,_reactNativeReanimated.withTiming)(.3,{duration:400})),-1)),()=>(0,_reactNativeReanimated.cancelAnimation)(r)},[t,e,r]);const s=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({opacity:r.value}),[r]);return(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[a,{backgroundColor:i},t?{opacity:STILL_OPACITY[e]}:s]})},TypingIndicator=({label:e,accessibilityLabel:t,labels:i,bubble:a=!0,style:r,testID:s})=>{const c=(0,_index.useTheme)(),n=(0,_react.useMemo)(()=>buildStyles(c),[c]),o=(0,_useReducedMotion.useReducedMotion)(),l=c.colors["text-subtle"],d=(0,_react.useMemo)(()=>({...DEFAULT_TYPING_INDICATOR_LABELS,...i}),[i]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[n.root,a?n.bubble:null,r],accessible:!0,accessibilityRole:"progressbar",accessibilityLabel:e??t??d.typing,accessibilityState:{busy:!0},"aria-busy":!0,testID:s,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:n.dots,children:DOT_NAMES.map((e,t)=>(0,_jsxRuntime.jsx)(Dot,{index:t,still:o,colour:l,dotStyle:n.dot},e))}),e?(0,_jsxRuntime.jsx)(_index2.Text,{variant:"bodySmall",color:"secondary",children:e}):null]})};exports.TypingIndicator=TypingIndicator;const buildStyles=e=>_reactNative.StyleSheet.create({dot:{width:6,height:6,borderRadius:e.radius.pill,..._corners.smoothCorners},root:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:e.space.sm,marginTop:e.space.sm},bubble:{backgroundColor:e.colors["bg-subtle"],borderRadius:e.radius.xl,..._corners.smoothCorners,paddingHorizontal:e.space.md,paddingVertical:e.space.sm+e.space.xs},dots:{flexDirection:"row",alignItems:"center",gap:e.space.xs}});var _default=exports.default=TypingIndicator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ZoomableImage=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../utils/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,a){if(!a&&e&&e.__esModule)return e;var t,r,i=Object.defineProperty,l={__proto__:null,default:e};if(Object(e)!==e)return l;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,l)}for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((t=i&&Object.getOwnPropertyDescriptor(e,r))&&(t.get||t.set)?i(l,r,t):l[r]=e[r]);return l}const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1},ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:r=2,disabled:i=!1,haptic:l,style:n,accessibilityLabel:u,testID:c})=>{const s=(0,_reactNativeReanimated.useSharedValue)(1),v=(0,_reactNativeReanimated.useSharedValue)(1),d=(0,_reactNativeReanimated.useSharedValue)(0),o=(0,_reactNativeReanimated.useSharedValue)(0),_=(0,_reactNativeReanimated.useSharedValue)(0),m=(0,_reactNativeReanimated.useSharedValue)(0),N=(0,_react.useCallback)(()=>{s.value=(0,_reactNativeReanimated.withSpring)(1,SPRING_CONFIG),v.value=1,d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),_.value=0,m.value=0},[s,v,d,o,_,m]);(0,_react.useEffect)(()=>{i&&N()},[i,N]);const S=(0,_react.useCallback)(()=>{const e=(0,_index.resolveHaptic)(l,"impactLight");e&&(0,_index.triggerHaptic)(e)},[l]),R=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Pinch().enabled(!i).onStart(()=>{"worklet";v.value=s.value}).onUpdate(e=>{"worklet";const r=v.value*e.scale;s.value=r<t?t+.3*(r-t):r>a?a+.2*(r-a):r}).onEnd(()=>{"worklet";return s.value<t?(s.value=(0,_reactNativeReanimated.withSpring)(t,SPRING_CONFIG),d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),v.value=t,_.value=0,void(m.value=0)):s.value>a?(s.value=(0,_reactNativeReanimated.withSpring)(a,SPRING_CONFIG),void(v.value=a)):void(v.value=s.value)}),[i,s,v,d,o,_,m,t,a]),h=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Pan().enabled(!i).minPointers(1).maxPointers(1).onStart(()=>{"worklet";_.value=d.value,m.value=o.value}).onUpdate(e=>{"worklet";s.value<=1||(d.value=_.value+e.translationX,o.value=m.value+e.translationY)}).onEnd(()=>{"worklet";_.value=d.value,m.value=o.value}),[i,s,d,o,_,m]),p=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Tap().enabled(!i).numberOfTaps(2).onEnd(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(S)(),s.value>1?(s.value=(0,_reactNativeReanimated.withSpring)(1,SPRING_CONFIG),d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),v.value=1,_.value=0,m.value=0):(s.value=(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG),v.value=r)}),[i,s,v,d,o,_,m,S,r]),I=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Race(R,h,p),[R,h,p]),G=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:d.value},{translateY:o.value},{scale:s.value}]}));return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:I,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[styles.container,n],testID:c,accessibilityLabel:u,accessibilityState:{disabled:i},"aria-disabled":i,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[styles.content,G],children:e})})})};exports.ZoomableImage=ZoomableImage,ZoomableImage.displayName="ZoomableImage";const styles=_reactNative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});var _default=exports.default=ZoomableImage;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ZoomableImage=void 0;var cache,_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated")),_index=require("../../utils/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,a){if(!a&&e&&e.__esModule)return e;var t,r,i=Object.defineProperty,l={__proto__:null,default:e};if(Object(e)!==e)return l;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,l)}for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((t=i&&Object.getOwnPropertyDescriptor(e,r))&&(t.get||t.set)?i(l,r,t):l[r]=e[r]);return l}const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1},ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:r=2,disabled:i=!1,haptic:l,style:n,accessibilityLabel:u,testID:c})=>{const s=(0,_reactNativeReanimated.useSharedValue)(1),v=(0,_reactNativeReanimated.useSharedValue)(1),d=(0,_reactNativeReanimated.useSharedValue)(0),o=(0,_reactNativeReanimated.useSharedValue)(0),_=(0,_reactNativeReanimated.useSharedValue)(0),m=(0,_reactNativeReanimated.useSharedValue)(0),N=(0,_react.useCallback)(()=>{s.value=(0,_reactNativeReanimated.withSpring)(1,SPRING_CONFIG),v.value=1,d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),_.value=0,m.value=0},[s,v,d,o,_,m]);(0,_react.useEffect)(()=>{i&&N()},[i,N]);const S=(0,_react.useCallback)(()=>{const e=(0,_index.resolveHaptic)(l,"impactLight");e&&(0,_index.triggerHaptic)(e)},[l]),R=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Pinch().enabled(!i).onStart(()=>{"worklet";v.value=s.value}).onUpdate(e=>{"worklet";const r=v.value*e.scale;s.value=r<t?t+.3*(r-t):r>a?a+.2*(r-a):r}).onEnd(()=>{"worklet";return s.value<t?(s.value=(0,_reactNativeReanimated.withSpring)(t,SPRING_CONFIG),d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),v.value=t,_.value=0,void(m.value=0)):s.value>a?(s.value=(0,_reactNativeReanimated.withSpring)(a,SPRING_CONFIG),void(v.value=a)):void(v.value=s.value)}),[i,s,v,d,o,_,m,t,a]),h=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Pan().enabled(!i).minPointers(1).maxPointers(1).onStart(()=>{"worklet";_.value=d.value,m.value=o.value}).onUpdate(e=>{"worklet";s.value<=1||(d.value=_.value+e.translationX,o.value=m.value+e.translationY)}).onEnd(()=>{"worklet";_.value=d.value,m.value=o.value}),[i,s,d,o,_,m]),p=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Tap().enabled(!i).numberOfTaps(2).onEnd(()=>{"worklet";(0,_reactNativeReanimated.runOnJS)(S)(),s.value>1?(s.value=(0,_reactNativeReanimated.withSpring)(1,SPRING_CONFIG),d.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),o.value=(0,_reactNativeReanimated.withSpring)(0,SPRING_CONFIG),v.value=1,_.value=0,m.value=0):(s.value=(0,_reactNativeReanimated.withSpring)(r,SPRING_CONFIG),v.value=r)}),[i,s,v,d,o,_,m,S,r]),I=(0,_react.useMemo)(()=>_reactNativeGestureHandler.Gesture.Race(R,h,p),[R,h,p]),G=(0,_reactNativeReanimated.useAnimatedStyle)(()=>({transform:[{translateX:d.value},{translateY:o.value},{scale:s.value}]}),[d,o,s]);return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:I,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[styles.container,n],testID:c,accessibilityLabel:u,accessibilityState:{disabled:i},"aria-disabled":i,children:(0,_jsxRuntime.jsx)(_reactNativeReanimated.default.View,{style:[styles.content,G],children:e})})})};exports.ZoomableImage=ZoomableImage,ZoomableImage.displayName="ZoomableImage";const styles=_reactNative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});var _default=exports.default=ZoomableImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Fragment,forwardRef,useMemo}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{AppIcon}from"../AppIcon/AppIcon.js";import{Menu}from"../Menu/index.js";import{Text as ThemedText}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const ACTION_BUTTON_SIZE=44,DOT_OFFSET=10,DOT_SIZE=8,BADGE_OFFSET=4;export const DEFAULT_APP_BAR_LABELS=Object.freeze({back:"Back"});const variantSize=(e,t)=>{switch(t){case"compact":return{height:44,titleSize:e.text.lg.size,titleWeight:"semibold",
|
|
1
|
+
"use strict";import{Fragment,forwardRef,useCallback,useMemo,useState}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePressAnimation}from"../../hooks/usePressAnimation.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{AppIcon}from"../AppIcon/AppIcon.js";import{Menu}from"../Menu/index.js";import{Text as ThemedText}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const ACTION_BUTTON_SIZE=44,DOT_OFFSET=10,DOT_SIZE=8,BADGE_OFFSET=4;export const DEFAULT_APP_BAR_LABELS=Object.freeze({back:"Back"});const variantSize=(e,t)=>{switch(t){case"compact":return{height:44,titleSize:e.text.lg.size,titleWeight:"semibold",subtitleLines:1};case"large":return{height:56,titleSize:e.text["2xl"].size,titleWeight:"bold",subtitleLines:2};default:return{height:56,titleSize:e.text.lg.size,titleWeight:"semibold",subtitleLines:1}}},ActionButton=forwardRef(({action:e,side:t,badgeStyle:i,haptic:n,flush:o,onPress:l},s)=>{const r=useTheme(),{style:a,pressIn:c,pressOut:d}=usePressAnimation({enabled:!0}),p=useMemo(()=>buildActionStyles(r),[r]),u=e.badge,h=void 0!==u&&0!==u,g=void 0!==e.label;return _jsx(Animated.View,{style:a,children:_jsxs(Pressable,{ref:s,onPress:t=>{const i=resolveHaptic(n,"selection");i&&triggerHaptic(i),"onPress"in e&&e.onPress(),l?.(t)},onPressIn:c,onPressOut:d,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,testID:e.testID,android_ripple:{color:r.colors["surface-pressed"],borderless:!g},style:({pressed:e})=>[g?p.textButton:p.actionButton,o?null:"left"===t?p.actionLeft:p.actionRight,e&&!g?p.actionPressed:null,e&&g?p.textPressed:null],children:[g?_jsx(ThemedText,{variant:"body",weight:"semibold",color:"link",numberOfLines:1,children:e.label}):_jsx(View,{style:p.iconWrap,children:e.icon}),h?_jsx(View,{style:[p.badge,i],pointerEvents:"none",children:_jsx(ThemedText,{variant:"caption",weight:"semibold",numberOfLines:1,style:p.badgeText,children:String(u)})}):null,e.dot?_jsx(View,{testID:e.testID?`${e.testID}-dot`:"appbar-action-dot",style:p.dot,pointerEvents:"none"}):null]})})}),COLLAPSE_RANGE=60,AppBar=forwardRef((e,t)=>{const{title:i,subtitle:n,titleAlignment:o="left",leftAction:l,rightActions:s,leading:r,trailing:a,onBack:c,gutter:d,titleVariant:p,titleOffset:u,height:h,divider:g,variant:m="default",transparent:x=!1,scrollY:b,style:f,containerStyle:y,titleStyle:A,subtitleStyle:S,badgeStyle:j,haptic:w,labels:_,testID:v}=e;warnInvalidValue("AppBar","variant",e.variant,["default","large","compact"]),warnInvalidValue("AppBar","titleAlignment",e.titleAlignment,["left","center"]);const I=useMemo(()=>({...DEFAULT_APP_BAR_LABELS,..._}),[_]),T=useTheme(),B=useSafeAreaInsets(),L=useMemo(()=>variantSize(T,m),[T,m]),R=useMemo(()=>buildStyles(T),[T]),C="large"===m,z=C&&void 0!==b,[V,O]=useState(40),P=useCallback(e=>O(e.nativeEvent.layout.height),[]),D=l??(c?{icon:_jsx(AppIcon,{name:"arrow-left",size:24,color:T.colors["text-body"]}),onPress:c,accessibilityLabel:I.back}:void 0),W=a?void 0:s?.[s.length-1],opticalInset=e=>void 0===e?0:void 0!==e.label?T.space.sm:Math.max((44-(e.glyphSize??24))/2,0),E=void 0===d?null:{paddingLeft:Math.max(d-opticalInset(D),0),paddingRight:Math.max(d-opticalInset(W),0)},H=void 0!==u,k=Boolean(D)||Boolean(r),M=H||!k&&"left"===o,F=g??!x,N=StyleSheet.hairlineWidth,$=useMemo(()=>b?{rootHeight:b.interpolate({inputRange:[0,60],outputRange:[B.top+L.height+V,B.top+L.height],extrapolate:"clamp"}),titleRowOpacity:b.interpolate({inputRange:[0,30],outputRange:[1,0],extrapolate:"clamp"}),compactTitleOpacity:b.interpolate({inputRange:[30,60],outputRange:[0,1],extrapolate:"clamp"}),borderOpacity:b.interpolate({inputRange:[0,60],outputRange:[0,1],extrapolate:"clamp"})}:null,[b,B.top,L.height,V]),U=i?p?_jsx(ThemedText,{variant:p,align:"center"===o?"center":"left",accessibilityRole:"header",numberOfLines:1,style:[R.titleVariant,A],children:i}):_jsx(Animated.Text,{accessibilityRole:"header",style:[R.title,{fontSize:L.titleSize,fontWeight:T.weight[L.titleWeight],textAlign:"center"===o?"center":"left"},A],numberOfLines:1,children:i}):null,G=z&&$&&i?_jsx(Animated.Text,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:[R.title,{fontSize:T.text.lg.size,fontWeight:T.weight.semibold,textAlign:"center"===o?"center":"left",opacity:$.compactTitleOpacity}],numberOfLines:1,children:i}):null,Z=n?_jsx(Animated.Text,{style:[R.subtitle,{textAlign:"center"===o?"center":"left"},S],numberOfLines:L.subtitleLines,children:n}):null,Y=_jsxs(View,{style:[R.titleColumn,"center"===o?R.titleColumnCenter:null],children:[U,Z]}),q=z?Animated.View:View,J=z&&$?{height:$.rootHeight,overflow:"hidden"}:C&&void 0===h?null:{height:(h??L.height)+B.top};return _jsxs(q,{ref:t,testID:v,style:[R.root,{paddingTop:B.top,backgroundColor:x?"transparent":T.colors.surface},J,!z&&F?{borderBottomWidth:N,borderBottomColor:T.colors.border}:null,y,f],children:[z&&$&&F?_jsx(Animated.View,{pointerEvents:"none",style:[R.animatedBorder,{backgroundColor:T.colors.border,opacity:$.borderOpacity}]}):null,_jsxs(View,{testID:C&&v?`${v}-bar-row`:void 0,style:[R.row,C?{height:L.height}:{flex:1},E],children:[_jsxs(View,{testID:v?`${v}-leading-slot`:void 0,style:[R.sideSlot,M?R.sideSlotCompact:null],children:[D?_jsx(ActionButton,{action:D,side:"left",haptic:w,flush:H}):null,null!=r&&!1!==r?_jsx(View,{style:R.slotNode,children:r}):null]}),_jsx(View,{pointerEvents:"none",style:[R.center,"center"===o?R.centerAligned:R.centerLeft,H?{paddingLeft:k?u:T.space.none,paddingRight:T.space.none}:M?{paddingLeft:T.space.none}:null],children:C?G:Y}),_jsxs(View,{style:[R.sideSlot,R.sideSlotRight,H?R.sideSlotCompact:null],children:[s?.map((e,t)=>_jsx(Fragment,{children:"menu"in e?_jsx(Menu,{items:e.menu,title:e.menuTitle,haptic:w,trigger:_jsx(ActionButton,{action:e,side:"right",badgeStyle:j,haptic:w,flush:H})}):_jsx(ActionButton,{action:e,side:"right",badgeStyle:j,haptic:w,flush:H})},`appbar-right-${t}`)),null!=a&&!1!==a?_jsx(View,{style:R.slotNode,children:a}):null]})]}),C?_jsx(Animated.View,{testID:v?`${v}-title-row`:void 0,onLayout:z?P:void 0,pointerEvents:"none",style:[{paddingHorizontal:d??T.space.md,paddingBottom:T.space.sm},z&&$?{opacity:$.titleRowOpacity}:null],children:Y}):null]})});AppBar.displayName="AppBar";const buildStyles=e=>StyleSheet.create({root:{width:"100%"},row:{flexDirection:"row",alignItems:"center",paddingHorizontal:e.space.xs},sideSlot:{flexDirection:"row",alignItems:"center",minWidth:48},sideSlotRight:{justifyContent:"flex-end"},sideSlotCompact:{minWidth:0},slotNode:{flexDirection:"row",alignItems:"center"},center:{flex:1,minWidth:0,paddingHorizontal:e.space.xs},centerAligned:{alignItems:"center"},centerLeft:{alignItems:"flex-start"},titleColumn:{flexDirection:"column",maxWidth:"100%"},titleColumnCenter:{alignItems:"center"},title:{color:e.colors["text-body"]},titleVariant:{includeFontPadding:!1,textAlignVertical:"center"},subtitle:{marginTop:e.space.xxs,color:e.colors["text-subtle"],fontSize:e.text.sm.size,fontWeight:e.weight.normal},animatedBorder:{position:"absolute",left:0,right:0,bottom:0,height:StyleSheet.hairlineWidth}}),buildActionStyles=e=>StyleSheet.create({actionButton:{width:44,height:44,borderRadius:e.radius.pill,...smoothCorners,alignItems:"center",justifyContent:"center"},actionLeft:{marginRight:e.space.xs},actionRight:{marginLeft:e.space.xs},actionPressed:{backgroundColor:e.colors["surface-pressed"]},textButton:{minWidth:44,minHeight:44,paddingHorizontal:e.space.sm,alignItems:"center",justifyContent:"center"},textPressed:{opacity:.6},dot:{position:"absolute",top:10,right:10,width:8,height:8,borderRadius:e.radius.pill,backgroundColor:e.colors.danger},iconWrap:{alignItems:"center",justifyContent:"center"},badge:{position:"absolute",top:4,right:4,minWidth:16,height:16,paddingHorizontal:e.space.xs,borderRadius:e.radius.pill,...smoothCorners,backgroundColor:e.colors.danger,alignItems:"center",justifyContent:"center"},badgeText:{color:e.colors["on-danger"],fontSize:e.text.xs.size,fontWeight:e.weight.semibold,lineHeight:13}});export{AppBar};export default AppBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const ICON_NAMES=["aave","activity","add","add-circle","add-square","additem","airdrop","airplane","airplane-square","airpod","airpods","alarm","alert-circle","alert-triangle","align-bottom","align-horizontally","align-left","align-right","align-top","align-vertically","android","ankr","apple","aquarius","archive","archive-add","archive-book","archive-box","archive-minus","archive-slash","archive-tick","arrange-horizontal","arrange-horizontal-circle","arrange-horizontal-square","arrange-vertical","arrange-vertical-circle","arrange-vertical-square","arrow","arrow-circle-down","arrow-circle-down-2","arrow-circle-left","arrow-circle-left-2","arrow-circle-right","arrow-circle-right-2","arrow-circle-up","arrow-circle-up-2","arrow-down","arrow-down-2","arrow-down-3","arrow-down-up","arrow-forward","arrow-forward-square","arrow-left","arrow-left-2","arrow-left-3","arrow-right","arrow-right-2","arrow-right-3","arrow-rotate-left","arrow-rotate-right","arrow-square","arrow-square-down","arrow-square-left","arrow-square-right","arrow-square-up","arrow-swap-horizontal","arrow-swap-vertical","arrow-up","arrow-up-2","arrow-up-3","arrow-up-right","at","attach-circle","attach-square","audio-square","augur","autobrightness","autonio","avalanche","award","back","back-square","backward","backward-10-seconds","backward-15-seconds","backward-5-seconds","backward-item","badge-check","bag","bag-2","bag-cross","bag-cross-1","bag-happy","bag-tick","bag-tick-2","bag-timer","ban","bank","barcode","battery-charging","battery-disable","battery-empty","battery-empty-1","battery-full","be","bell","bezier","bill","binance-coin","binance-usd","bitcoin","bitcoin-card","bitcoin-convert","bitcoin-refresh","blend","blend-2","blogger","bluetooth","bluetooth-2","bluetooth-circle","bluetooth-rectangle","blur","bolt","book","book-1","book-saved","book-square","bookmark","bookmark-2","bootstrap","box","box-1","box-2","box-add","box-remove","box-seam","box-search","box-tick","box-time","briefcase","briefcase-cross","briefcase-tick","briefcase-timer","brifecase-cross","brifecase-tick","brifecase-timer","brodcast","broom","brush","brush-2","brush-3","brush-big","brush-square","bubble","bucket","bucket-circle","bucket-square","bug","building","building-2","building-3","building-4","buildings","buildings-2","buliding","bullseye","bus","buy-crypto","cake","calculator","calendar","calendar-1","calendar-2","calendar-add","calendar-check","calendar-circle","calendar-dots","calendar-edit","calendar-remove","calendar-search","calendar-tick","call","call-add","call-calling","call-incoming","call-minus","call-outgoing","call-received","call-remove","call-slash","camera","camera-slash","candle","candle-2","car","card","card-add","card-coin","card-edit","card-pos","card-receive","card-remove","card-remove-1","card-send","card-slash","card-tick","card-tick-1","cardano","cards","cash-stack","category","category-2","cd","celo","celsius","chainlink","chart","chart-1","chart-2","chart-21","chart-circle","chart-column","chart-fail","chart-square","chart-success","chat","chat-dots","check","check-check","check-circle","chemical-glass","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-left","chevrons-right","chevrons-up-down","chrome","circle","circle-help","civic","clipboard","clipboard-check","clipboard-close","clipboard-export","clipboard-import","clipboard-text","clipboard-tick","clock","close-circle","close-square","cloud","cloud-add","cloud-change","cloud-connection","cloud-cross","cloud-drizzle","cloud-fog","cloud-lightning","cloud-minus","cloud-notif","cloud-plus","cloud-remove","cloud-snow","cloud-sunny","code","code-1","code-circle","coffee","coin","coin-1","coins","color-swatch","colorfilter","colors-square","command","command-square","comment","component","computing","contact","convert","convert-3-d-cube","convert-card","convertshape","convertshape-2","copy","copy-success","copyright","courthouse","cpu","cpu-charge","cpu-setting","creative-commons","credit-card","crop","crown","crown-1","cup","cursor","cut","dai","danger","dash","data","data-2","decred","dent","designtools","device-message","devices","diagram","diagram-3","diamonds","direct","direct-down","direct-inbox","direct-left","direct-normal","direct-notification","direct-right","direct-send","direct-up","directbox-default","directbox-notif","directbox-receive","directbox-send","discount-circle","discount-shape","discover","dislike","display","document","document-cloud","document-code","document-code-2","document-copy","document-download","document-favorite","document-filter","document-forward","document-like","document-previous","document-sketch","document-text","document-text-1","document-upload","dollar-circle","dollar-square","download","dribbble","driver","driver-2","driver-refresh","driving","drop","dropbox","edit","edit-2","educare","electricity","element","element-2","element-3","element-4","element-equal","element-plus","emercoin","emoji-happy","emoji-normal","emoji-sad","emoji-smile","empty-wallet","empty-wallet-add","empty-wallet-change","empty-wallet-remove","empty-wallet-tick","empty-wallet-time","enjin-coin","eos","eraser","eraser-square","ethereum","ethereum-classic","export","export-circle","export-curve","export-square","external-drive","external-link","eye","eye-off","eye-slash","facebook","factory","fatrows","favorite-chart","figma","figma-1","file-plus-2","file-text","files","filter","filter-add","filter-edit","filter-remove","filter-search","filter-square","filter-tick","finger-cricle","finger-scan","firstline","flag","flag-2","flame","flash","flash-circle","flash-slash","flashy","folder","folder-2","folder-add","folder-cloud","folder-connection","folder-cross","folder-favorite","folder-kanban","folder-minus","folder-open","folder-plus","forbidden","forbidden-2","format-circle","format-square","forward","forward-10-seconds","forward-15-seconds","forward-5-seconds","forward-item","framer","ftx-token","gallery","gallery-add","gallery-edit","gallery-export","gallery-favorite","gallery-import","gallery-remove","gallery-slash","gallery-tick","game","gameboy","gas-station","gauge","gemini","gemini-2","ghost","gift","github","glass","global","global-edit","global-refresh","global-search","globe","globe2","google","google-drive","google-play","gps","gps-slash","grammerly","graph","grid","grid-1","grid-2","grid-3","grid-4","grid-5","grid-6","grid-7","grid-8","grid-9","grid-edit","grid-eraser","grid-lock","hamberger-menu","hamburger-menu","hand","happyemoji","hard-hat","harmony","hashtag","hashtag-down","hashtag-square","hashtag-up","headphone","headphones","health","heart","heart-add","heart-circle","heart-edit","heart-remove","heart-search","heart-slash","heart-tick","hedera-hashgraph","hex","hierarchy","hierarchy-2","hierarchy-3","hierarchy-square","hierarchy-square-2","hierarchy-square-3","history","home","home-2","home-3","home-hashtag","home-trend-down","home-trend-up","home-wifi","hospital","house","house-2","html-3","html-5","huobi-token","i-24-support","i-3-d-cube-scan","i-3-d-rotate","i-3-d-square","i-3-dcube","i-3-square","icon","illustrator","image","import","import-circle","import-curve","import-square","inbox","info","info-circle","information","instagram","iost","java-script","js","judge","kanban","key","key-square","keyboard","keyboard-open","kyber-network","lamp","lamp-charge","lamp-on","lamp-slash","language-circle","language-square","layer","layout-dashboard","layout-grid","layout-maximize","level","lifebuoy","lightbulb","like","like-1","like-dislike","like-shapes","like-tag","link","link-1","link-2","link-21","link-circle","link-square","linkedin","list","litecoin","location","location-add","location-cross","location-discover","location-minus","location-slash","location-tick","lock","lock-1","lock-circle","lock-slash","log-out","login","login-curve","logout","logout-curve","lovely","magic-star","magicpen","mail","main-component","maker","man","map","map-1","map-pin","mask","mask-left","mask-right","math","maximize","maximize-1","maximize-2","maximize-3","maximize-4","maximize-circle","medal","medal-star","menu","menu-board","message","message-2","message-add","message-add-1","message-circle","message-edit","message-favorite","message-minus","message-notif","message-programming","message-question","message-remove","message-search","message-square","message-text","message-text-1","message-tick","message-time","messages","messages-1","messages-2","messages-3","messenger","microphone","microphone-2","microphone-slash","microphone-slash-1","microscope","microsoft","milk","mini-music-sqaure","minus","minus-circle","minus-cirlce","minus-square","mirror","mirroring-screen","mobile","mobile-programming","monero","money","money-2","money-3","money-4","money-add","money-archive","money-change","money-forbidden","money-receive","money-recive","money-remove","money-send","money-tick","money-time","moneys","monitor","monitor-mobbile","monitor-recorder","moon","more","more-2","more-circle","more-horizontal","more-square","mouse","mouse-circle","mouse-square","music","music-circle","music-dashboard","music-filter","music-library-2","music-play","music-playlist","music-square","music-square-add","music-square-remove","music-square-search","musicnote","nebulas","nem","nexo","next","note","note-1","note-add","note-favorite","note-remove","note-square","note-text","notepad","notepad-2","notification","notification-1","notification-bing","notification-circle","notification-favorite","notification-status","ocean-protocol","okb","okru","omega-circle","omega-square","ontology","paintbucket","palette","panel-left-close","panel-left-open","paperclip","paperclip-2","password-check","path-tool","path-tool-2","path-tool-square","pause","pause-circle","paypal","pen-add","pen-close","pen-remove","pen-tool","pen-tool-2","pencil","people","percentage-circle","percentage-square","personalcard","pet","pharagraphspacing","phone","photoshop","picture-frame","play","play-add","play-circle","play-cricle","play-remove","plug","plus","plus-circle","pointer","polkadot","polygon","polyswarm","presentation-chart","presention-chart","previous","printer","printer-slash","profile","profile-2-user","profile-add","profile-circle","profile-delete","profile-remove","profile-tick","programming-arrow","programming-arrows","python","quant","quote-down","quote-down-circle","quote-down-square","quote-up","quote-up-circle","quote-up-square","radar","radar-2","radio","ram","ram-2","rank","ranking","receipt","receipt-1","receipt-2","receipt-21","receipt-add","receipt-discount","receipt-disscount","receipt-edit","receipt-item","receipt-minus","receipt-search","receipt-square","receipt-text","receive","receive-square","receive-square-2","record","record-circle","recovery-convert","reddit","refresh","refresh-2","refresh-circle","refresh-cw","refresh-left-square","refresh-right-square","refresh-square","repeat","repeat-circle","repeate-music","repeate-one","reserve","robot","rotate-ccw","rotate-cw","rotate-left","rotate-right","route-square","routing","routing-2","row-horizontal","row-vertical","ruler","ruler-pen","safe-home","sagittarius","save-2","save-add","save-minus","save-remove","scan","scan-barcode","scanner","scanning","scissor","screenmirroring","scroll","search","search-favorite","search-favorite-1","search-normal","search-normal-1","search-status","search-status-1","search-zoom-in","search-zoom-in-1","search-zoom-out","search-zoom-out-1","security","security-card","security-safe","security-time","security-user","send","send-2","server","setting","setting-2","setting-3","setting-4","setting-5","settings","shapes","shapes-1","share","share-2","shield","shield-check","shield-cross","shield-lock","shield-plus","shield-search","shield-security","shield-slash","shield-tick","ship","shop","shop-add","shop-remove","shopping-bag","shopping-cart","shuffle","shutterstock","siacoin","sidebar-bottom","sidebar-left","sidebar-right","sidebar-top","signpost","simcard","simcard-1","simcard-2","size","slack","slash","slider","slider-horizontal","slider-horizontal-1","slider-vertical","slider-vertical-1","smallcaps","smart-car","smart-home","smileys","sms","sms-edit","sms-notification","sms-search","sms-star","sms-tracking","snapchat","snowflake","solana","sort","sound","sparkles","speaker","speedometer","spotify","stacks","star","star-1","star-slash","stars","status","status-up","stellar","sticker","stickynote","stop","stop-circle","story","strongbox","strongbox-2","subtitle","sun","sun-1","sun-fog","table-document","table-lamp","tag","tag-2","tag-cross","tag-right","tag-user","task","task-square","teacher","telephone","tenx","tether","text","text-block","text-bold","text-italic","text-underline","textalign-center","textalign-justifycenter","textalign-justifyleft","textalign-justifyright","textalign-left","textalign-right","the-graph","theta","thorchain","thumbs-up","tick-circle","tick-square","ticket","ticket-2","ticket-discount","ticket-expired","ticket-star","timer","timer-1","timer-pause","timer-start","toggle-off","toggle-off-circle","toggle-on","toggle-on-circle","trade","transaction-minus","translate","transmit","transmit-sqaure-2","transmit-square","trash","trash-2","tree","trello","trend-down","trend-up","trending-up","triangle","triangle-logo","trontron","truck","truck-fast","truck-remove","truck-tick","truck-time","trush-square","twitch","two-page","ui-8","unlimited","unlock","upload","usd-coin","user","user-add","user-check","user-cirlce-add","user-edit","user-minus","user-octagon","user-plus","user-remove","user-search","user-square","user-tag","user-tick","users","velas","verify","vibe","video","video-add","video-circle","video-horizontal","video-octagon","video-play","video-remove","video-slash","video-square","video-tick","video-time","video-vertical","voice-circle","voice-cricle","voice-square","volume","volume-cross","volume-high","volume-low","volume-low-1","volume-mute","volume-slash","volume-up","wallet","wallet-1","wallet-2","wallet-3","wallet-add","wallet-add-1","wallet-check","wallet-minus","wallet-money","wallet-remove","wallet-search","wallet2","wanchain","wanchain-1","wand-sparkles","warning-2","watch","watch-status","weight","weight-meter","whatsapp","wifi","wifi-square","wind","wind-2","windows","wing","woman","wrist-clock","x","x-circle","xd","xiaomi","xrp","youtube","zap","zel","zoom","zoom-in","zoom-out"];export const CATALOG_LOADERS={linear:{a:()=>require("./catalog/linear/a.g").SHARD,b:()=>require("./catalog/linear/b.g").SHARD,c:()=>require("./catalog/linear/c.g").SHARD,d:()=>require("./catalog/linear/d.g").SHARD,e:()=>require("./catalog/linear/e.g").SHARD,f:()=>require("./catalog/linear/f.g").SHARD,g:()=>require("./catalog/linear/g.g").SHARD,h:()=>require("./catalog/linear/h.g").SHARD,i:()=>require("./catalog/linear/i.g").SHARD,j:()=>require("./catalog/linear/j.g").SHARD,k:()=>require("./catalog/linear/k.g").SHARD,l:()=>require("./catalog/linear/l.g").SHARD,m:()=>require("./catalog/linear/m.g").SHARD,n:()=>require("./catalog/linear/n.g").SHARD,o:()=>require("./catalog/linear/o.g").SHARD,p:()=>require("./catalog/linear/p.g").SHARD,q:()=>require("./catalog/linear/q.g").SHARD,r:()=>require("./catalog/linear/r.g").SHARD,s:()=>require("./catalog/linear/s.g").SHARD,t:()=>require("./catalog/linear/t.g").SHARD,u:()=>require("./catalog/linear/u.g").SHARD,v:()=>require("./catalog/linear/v.g").SHARD,w:()=>require("./catalog/linear/w.g").SHARD,x:()=>require("./catalog/linear/x.g").SHARD,y:()=>require("./catalog/linear/y.g").SHARD,z:()=>require("./catalog/linear/z.g").SHARD},bold:{a:()=>require("./catalog/bold/a.g").SHARD,b:()=>require("./catalog/bold/b.g").SHARD,c:()=>require("./catalog/bold/c.g").SHARD,d:()=>require("./catalog/bold/d.g").SHARD,e:()=>require("./catalog/bold/e.g").SHARD,f:()=>require("./catalog/bold/f.g").SHARD,g:()=>require("./catalog/bold/g.g").SHARD,h:()=>require("./catalog/bold/h.g").SHARD,i:()=>require("./catalog/bold/i.g").SHARD,j:()=>require("./catalog/bold/j.g").SHARD,k:()=>require("./catalog/bold/k.g").SHARD,l:()=>require("./catalog/bold/l.g").SHARD,m:()=>require("./catalog/bold/m.g").SHARD,n:()=>require("./catalog/bold/n.g").SHARD,o:()=>require("./catalog/bold/o.g").SHARD,p:()=>require("./catalog/bold/p.g").SHARD,q:()=>require("./catalog/bold/q.g").SHARD,r:()=>require("./catalog/bold/r.g").SHARD,s:()=>require("./catalog/bold/s.g").SHARD,t:()=>require("./catalog/bold/t.g").SHARD,u:()=>require("./catalog/bold/u.g").SHARD,v:()=>require("./catalog/bold/v.g").SHARD,w:()=>require("./catalog/bold/w.g").SHARD,x:()=>require("./catalog/bold/x.g").SHARD,y:()=>require("./catalog/bold/y.g").SHARD,z:()=>require("./catalog/bold/z.g").SHARD},broken:{a:()=>require("./catalog/broken/a.g").SHARD,b:()=>require("./catalog/broken/b.g").SHARD,c:()=>require("./catalog/broken/c.g").SHARD,d:()=>require("./catalog/broken/d.g").SHARD,e:()=>require("./catalog/broken/e.g").SHARD,f:()=>require("./catalog/broken/f.g").SHARD,g:()=>require("./catalog/broken/g.g").SHARD,h:()=>require("./catalog/broken/h.g").SHARD,i:()=>require("./catalog/broken/i.g").SHARD,j:()=>require("./catalog/broken/j.g").SHARD,k:()=>require("./catalog/broken/k.g").SHARD,l:()=>require("./catalog/broken/l.g").SHARD,m:()=>require("./catalog/broken/m.g").SHARD,n:()=>require("./catalog/broken/n.g").SHARD,o:()=>require("./catalog/broken/o.g").SHARD,p:()=>require("./catalog/broken/p.g").SHARD,q:()=>require("./catalog/broken/q.g").SHARD,r:()=>require("./catalog/broken/r.g").SHARD,s:()=>require("./catalog/broken/s.g").SHARD,t:()=>require("./catalog/broken/t.g").SHARD,u:()=>require("./catalog/broken/u.g").SHARD,v:()=>require("./catalog/broken/v.g").SHARD,w:()=>require("./catalog/broken/w.g").SHARD,x:()=>require("./catalog/broken/x.g").SHARD,y:()=>require("./catalog/broken/y.g").SHARD,z:()=>require("./catalog/broken/z.g").SHARD},bulk:{a:()=>require("./catalog/bulk/a.g").SHARD,b:()=>require("./catalog/bulk/b.g").SHARD,c:()=>require("./catalog/bulk/c.g").SHARD,d:()=>require("./catalog/bulk/d.g").SHARD,e:()=>require("./catalog/bulk/e.g").SHARD,f:()=>require("./catalog/bulk/f.g").SHARD,g:()=>require("./catalog/bulk/g.g").SHARD,h:()=>require("./catalog/bulk/h.g").SHARD,i:()=>require("./catalog/bulk/i.g").SHARD,j:()=>require("./catalog/bulk/j.g").SHARD,k:()=>require("./catalog/bulk/k.g").SHARD,l:()=>require("./catalog/bulk/l.g").SHARD,m:()=>require("./catalog/bulk/m.g").SHARD,n:()=>require("./catalog/bulk/n.g").SHARD,o:()=>require("./catalog/bulk/o.g").SHARD,p:()=>require("./catalog/bulk/p.g").SHARD,q:()=>require("./catalog/bulk/q.g").SHARD,r:()=>require("./catalog/bulk/r.g").SHARD,s:()=>require("./catalog/bulk/s.g").SHARD,t:()=>require("./catalog/bulk/t.g").SHARD,u:()=>require("./catalog/bulk/u.g").SHARD,v:()=>require("./catalog/bulk/v.g").SHARD,w:()=>require("./catalog/bulk/w.g").SHARD,x:()=>require("./catalog/bulk/x.g").SHARD,y:()=>require("./catalog/bulk/y.g").SHARD,z:()=>require("./catalog/bulk/z.g").SHARD},outline:{a:()=>require("./catalog/outline/a.g").SHARD,b:()=>require("./catalog/outline/b.g").SHARD,c:()=>require("./catalog/outline/c.g").SHARD,d:()=>require("./catalog/outline/d.g").SHARD,e:()=>require("./catalog/outline/e.g").SHARD,f:()=>require("./catalog/outline/f.g").SHARD,g:()=>require("./catalog/outline/g.g").SHARD,h:()=>require("./catalog/outline/h.g").SHARD,i:()=>require("./catalog/outline/i.g").SHARD,j:()=>require("./catalog/outline/j.g").SHARD,k:()=>require("./catalog/outline/k.g").SHARD,l:()=>require("./catalog/outline/l.g").SHARD,m:()=>require("./catalog/outline/m.g").SHARD,n:()=>require("./catalog/outline/n.g").SHARD,o:()=>require("./catalog/outline/o.g").SHARD,p:()=>require("./catalog/outline/p.g").SHARD,q:()=>require("./catalog/outline/q.g").SHARD,r:()=>require("./catalog/outline/r.g").SHARD,s:()=>require("./catalog/outline/s.g").SHARD,t:()=>require("./catalog/outline/t.g").SHARD,u:()=>require("./catalog/outline/u.g").SHARD,v:()=>require("./catalog/outline/v.g").SHARD,w:()=>require("./catalog/outline/w.g").SHARD,x:()=>require("./catalog/outline/x.g").SHARD,y:()=>require("./catalog/outline/y.g").SHARD,z:()=>require("./catalog/outline/z.g").SHARD},twotone:{a:()=>require("./catalog/twotone/a.g").SHARD,b:()=>require("./catalog/twotone/b.g").SHARD,c:()=>require("./catalog/twotone/c.g").SHARD,d:()=>require("./catalog/twotone/d.g").SHARD,e:()=>require("./catalog/twotone/e.g").SHARD,f:()=>require("./catalog/twotone/f.g").SHARD,g:()=>require("./catalog/twotone/g.g").SHARD,h:()=>require("./catalog/twotone/h.g").SHARD,i:()=>require("./catalog/twotone/i.g").SHARD,j:()=>require("./catalog/twotone/j.g").SHARD,k:()=>require("./catalog/twotone/k.g").SHARD,l:()=>require("./catalog/twotone/l.g").SHARD,m:()=>require("./catalog/twotone/m.g").SHARD,n:()=>require("./catalog/twotone/n.g").SHARD,o:()=>require("./catalog/twotone/o.g").SHARD,p:()=>require("./catalog/twotone/p.g").SHARD,q:()=>require("./catalog/twotone/q.g").SHARD,r:()=>require("./catalog/twotone/r.g").SHARD,s:()=>require("./catalog/twotone/s.g").SHARD,t:()=>require("./catalog/twotone/t.g").SHARD,u:()=>require("./catalog/twotone/u.g").SHARD,v:()=>require("./catalog/twotone/v.g").SHARD,w:()=>require("./catalog/twotone/w.g").SHARD,x:()=>require("./catalog/twotone/x.g").SHARD,y:()=>require("./catalog/twotone/y.g").SHARD,z:()=>require("./catalog/twotone/z.g").SHARD}};
|
|
1
|
+
"use strict";export const ICON_NAMES=["aave","activity","add","add-circle","add-square","additem","airdrop","airplane","airplane-square","airpod","airpods","alarm","alert-circle","alert-triangle","align-bottom","align-horizontally","align-left","align-right","align-top","align-vertically","android","ankr","apple","aquarius","archive","archive-add","archive-book","archive-box","archive-minus","archive-slash","archive-tick","arrange-horizontal","arrange-horizontal-circle","arrange-horizontal-square","arrange-vertical","arrange-vertical-circle","arrange-vertical-square","arrow","arrow-circle-down","arrow-circle-down-2","arrow-circle-left","arrow-circle-left-2","arrow-circle-right","arrow-circle-right-2","arrow-circle-up","arrow-circle-up-2","arrow-down","arrow-down-2","arrow-down-3","arrow-down-up","arrow-forward","arrow-forward-square","arrow-left","arrow-left-2","arrow-left-3","arrow-right","arrow-right-2","arrow-right-3","arrow-rotate-left","arrow-rotate-right","arrow-square","arrow-square-down","arrow-square-left","arrow-square-right","arrow-square-up","arrow-swap-horizontal","arrow-swap-vertical","arrow-up","arrow-up-2","arrow-up-3","arrow-up-right","at","attach-circle","attach-square","audio-square","augur","autobrightness","autonio","avalanche","award","back","back-square","backward","backward-10-seconds","backward-15-seconds","backward-5-seconds","backward-item","badge-check","bag","bag-2","bag-cross","bag-cross-1","bag-happy","bag-tick","bag-tick-2","bag-timer","ban","bank","barcode","battery-charging","battery-disable","battery-empty","battery-empty-1","battery-full","be","bell","bezier","bill","binance-coin","binance-usd","bitcoin","bitcoin-card","bitcoin-convert","bitcoin-refresh","blend","blend-2","blogger","bluetooth","bluetooth-2","bluetooth-circle","bluetooth-rectangle","blur","bolt","book","book-1","book-saved","book-square","bookmark","bookmark-2","bootstrap","box","box-1","box-2","box-add","box-remove","box-seam","box-search","box-tick","box-time","briefcase","briefcase-cross","briefcase-tick","briefcase-timer","brifecase-cross","brifecase-tick","brifecase-timer","brodcast","broom","brush","brush-2","brush-3","brush-big","brush-square","bubble","bucket","bucket-circle","bucket-square","bug","building","building-2","building-3","building-4","buildings","buildings-2","buliding","bullseye","bus","buy-crypto","cake","calculator","calendar","calendar-1","calendar-2","calendar-add","calendar-check","calendar-circle","calendar-dots","calendar-edit","calendar-remove","calendar-search","calendar-tick","call","call-add","call-calling","call-incoming","call-minus","call-outgoing","call-received","call-remove","call-slash","camera","camera-slash","candle","candle-2","car","card","card-add","card-coin","card-edit","card-pos","card-receive","card-remove","card-remove-1","card-send","card-slash","card-tick","card-tick-1","cardano","cards","cash-stack","category","category-2","cd","celo","celsius","chainlink","chart","chart-1","chart-2","chart-21","chart-circle","chart-column","chart-fail","chart-square","chart-success","chat","chat-dots","check","check-check","check-circle","chemical-glass","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-left","chevrons-right","chevrons-up-down","chrome","circle","circle-help","civic","clipboard","clipboard-check","clipboard-close","clipboard-export","clipboard-import","clipboard-text","clipboard-tick","clock","close-circle","close-square","cloud","cloud-add","cloud-change","cloud-connection","cloud-cross","cloud-drizzle","cloud-fog","cloud-lightning","cloud-minus","cloud-notif","cloud-plus","cloud-remove","cloud-snow","cloud-sunny","code","code-1","code-circle","coffee","coin","coin-1","coins","color-swatch","colorfilter","colors-square","command","command-square","comment","component","computing","contact","convert","convert-3-d-cube","convert-card","convertshape","convertshape-2","copy","copy-success","copyright","courthouse","cpu","cpu-charge","cpu-setting","creative-commons","credit-card","crop","crown","crown-1","cup","cursor","cut","dai","danger","dash","data","data-2","decred","dent","designtools","device-message","devices","diagram","diagram-3","diamonds","direct","direct-down","direct-inbox","direct-left","direct-normal","direct-notification","direct-right","direct-send","direct-up","directbox-default","directbox-notif","directbox-receive","directbox-send","discount-circle","discount-shape","discover","dislike","display","document","document-cloud","document-code","document-code-2","document-copy","document-download","document-favorite","document-filter","document-forward","document-like","document-previous","document-sketch","document-text","document-text-1","document-upload","dollar-circle","dollar-square","download","dribbble","driver","driver-2","driver-refresh","driving","drop","dropbox","edit","edit-2","educare","electricity","element","element-2","element-3","element-4","element-equal","element-plus","emercoin","emoji-happy","emoji-normal","emoji-sad","emoji-smile","empty-wallet","empty-wallet-add","empty-wallet-change","empty-wallet-remove","empty-wallet-tick","empty-wallet-time","enjin-coin","eos","eraser","eraser-square","ethereum","ethereum-classic","export","export-circle","export-curve","export-square","external-drive","external-link","eye","eye-off","eye-slash","facebook","factory","fatrows","favorite-chart","figma","figma-1","file-plus-2","file-text","files","filter","filter-add","filter-edit","filter-remove","filter-search","filter-square","filter-tick","finger-cricle","finger-scan","firstline","flag","flag-2","flame","flash","flash-circle","flash-slash","flashy","folder","folder-2","folder-add","folder-cloud","folder-connection","folder-cross","folder-favorite","folder-kanban","folder-minus","folder-open","folder-plus","forbidden","forbidden-2","format-circle","format-square","forward","forward-10-seconds","forward-15-seconds","forward-5-seconds","forward-item","framer","ftx-token","gallery","gallery-add","gallery-edit","gallery-export","gallery-favorite","gallery-import","gallery-remove","gallery-slash","gallery-tick","game","gameboy","gas-station","gauge","gemini","gemini-2","ghost","gift","github","glass","global","global-edit","global-refresh","global-search","globe","globe2","google","google-drive","google-play","gps","gps-slash","grammerly","graph","grid","grid-1","grid-2","grid-3","grid-4","grid-5","grid-6","grid-7","grid-8","grid-9","grid-edit","grid-eraser","grid-lock","hamberger-menu","hamburger-menu","hand","happyemoji","hard-hat","harmony","hashtag","hashtag-down","hashtag-square","hashtag-up","headphone","headphones","health","heart","heart-add","heart-circle","heart-edit","heart-remove","heart-search","heart-slash","heart-tick","hedera-hashgraph","hex","hierarchy","hierarchy-2","hierarchy-3","hierarchy-square","hierarchy-square-2","hierarchy-square-3","history","home","home-2","home-3","home-hashtag","home-trend-down","home-trend-up","home-wifi","hospital","house","house-2","html-3","html-5","huobi-token","i-24-support","i-3-d-cube-scan","i-3-d-rotate","i-3-d-square","i-3-dcube","i-3-square","icon","illustrator","image","import","import-circle","import-curve","import-square","inbox","info","info-circle","information","instagram","iost","java-script","js","judge","kanban","key","key-square","keyboard","keyboard-open","kyber-network","lamp","lamp-charge","lamp-on","lamp-slash","language-circle","language-square","layer","layout-dashboard","layout-grid","layout-maximize","level","lifebuoy","lightbulb","like","like-1","like-dislike","like-shapes","like-tag","link","link-1","link-2","link-21","link-circle","link-square","linkedin","list","litecoin","location","location-add","location-cross","location-discover","location-minus","location-slash","location-tick","lock","lock-1","lock-circle","lock-slash","log-out","login","login-curve","logout","logout-curve","lovely","magic-star","magicpen","mail","main-component","maker","man","map","map-1","map-pin","mask","mask-left","mask-right","math","maximize","maximize-1","maximize-2","maximize-3","maximize-4","maximize-circle","medal","medal-star","menu","menu-board","message","message-2","message-add","message-add-1","message-circle","message-edit","message-favorite","message-minus","message-notif","message-programming","message-question","message-remove","message-search","message-square","message-text","message-text-1","message-tick","message-time","messages","messages-1","messages-2","messages-3","messenger","microphone","microphone-2","microphone-slash","microphone-slash-1","microscope","microsoft","milk","mini-music-sqaure","minus","minus-circle","minus-cirlce","minus-square","mirror","mirroring-screen","mobile","mobile-programming","monero","money","money-2","money-3","money-4","money-add","money-archive","money-change","money-forbidden","money-receive","money-recive","money-remove","money-send","money-tick","money-time","moneys","monitor","monitor-mobbile","monitor-recorder","moon","more","more-2","more-circle","more-horizontal","more-square","mouse","mouse-circle","mouse-square","music","music-circle","music-dashboard","music-filter","music-library-2","music-play","music-playlist","music-square","music-square-add","music-square-remove","music-square-search","musicnote","nebulas","nem","nexo","next","note","note-1","note-add","note-favorite","note-remove","note-square","note-text","notepad","notepad-2","notification","notification-1","notification-bing","notification-circle","notification-favorite","notification-status","ocean-protocol","okb","okru","omega-circle","omega-square","ontology","paintbucket","palette","panel-left-close","panel-left-open","paperclip","paperclip-2","password-check","path-tool","path-tool-2","path-tool-square","pause","pause-circle","paypal","pen-add","pen-close","pen-remove","pen-tool","pen-tool-2","pencil","people","percentage-circle","percentage-square","personalcard","pet","pharagraphspacing","phone","photoshop","picture-frame","play","play-add","play-circle","play-cricle","play-remove","plug","plus","plus-circle","pointer","polkadot","polygon","polyswarm","presentation-chart","presention-chart","previous","printer","printer-slash","profile","profile-2-user","profile-add","profile-circle","profile-delete","profile-remove","profile-tick","programming-arrow","programming-arrows","python","quant","quote-down","quote-down-circle","quote-down-square","quote-up","quote-up-circle","quote-up-square","radar","radar-2","radio","ram","ram-2","rank","ranking","receipt","receipt-1","receipt-2","receipt-21","receipt-add","receipt-discount","receipt-disscount","receipt-edit","receipt-item","receipt-minus","receipt-search","receipt-square","receipt-text","receive","receive-square","receive-square-2","record","record-circle","recovery-convert","reddit","refresh","refresh-2","refresh-circle","refresh-cw","refresh-left-square","refresh-right-square","refresh-square","repeat","repeat-circle","repeate-music","repeate-one","reserve","robot","rotate-ccw","rotate-cw","rotate-left","rotate-right","route-square","routing","routing-2","row-horizontal","row-vertical","ruler","ruler-pen","safe-home","sagittarius","save-2","save-add","save-minus","save-remove","scan","scan-barcode","scanner","scanning","scissor","screenmirroring","scroll","search","search-favorite","search-favorite-1","search-normal","search-normal-1","search-status","search-status-1","search-zoom-in","search-zoom-in-1","search-zoom-out","search-zoom-out-1","security","security-card","security-safe","security-time","security-user","send","send-2","server","setting","setting-2","setting-3","setting-4","setting-5","settings","shapes","shapes-1","share","share-2","shield","shield-check","shield-cross","shield-lock","shield-plus","shield-search","shield-security","shield-slash","shield-tick","ship","shop","shop-add","shop-remove","shopping-bag","shopping-cart","shuffle","shutterstock","siacoin","sidebar-bottom","sidebar-left","sidebar-right","sidebar-top","signpost","simcard","simcard-1","simcard-2","size","slack","slash","slider","slider-horizontal","slider-horizontal-1","slider-vertical","slider-vertical-1","smallcaps","smart-car","smart-home","smileys","sms","sms-edit","sms-notification","sms-search","sms-star","sms-tracking","snapchat","snowflake","solana","sort","sound","sparkles","speaker","speedometer","spotify","stacks","star","star-1","star-slash","stars","status","status-up","stellar","sticker","stickynote","stop","stop-circle","story","strongbox","strongbox-2","subtitle","sun","sun-1","sun-fog","table-document","table-lamp","tag","tag-2","tag-cross","tag-right","tag-user","task","task-square","teacher","telephone","tenx","tether","text","text-block","text-bold","text-italic","text-underline","textalign-center","textalign-justifycenter","textalign-justifyleft","textalign-justifyright","textalign-left","textalign-right","the-graph","theta","thorchain","thumbs-down","thumbs-up","tick-circle","tick-square","ticket","ticket-2","ticket-discount","ticket-expired","ticket-star","timer","timer-1","timer-pause","timer-start","toggle-off","toggle-off-circle","toggle-on","toggle-on-circle","trade","transaction-minus","translate","transmit","transmit-sqaure-2","transmit-square","trash","trash-2","tree","trello","trend-down","trend-up","trending-up","triangle","triangle-logo","trontron","truck","truck-fast","truck-remove","truck-tick","truck-time","trush-square","twitch","two-page","ui-8","unlimited","unlock","upload","usd-coin","user","user-add","user-check","user-cirlce-add","user-edit","user-minus","user-octagon","user-plus","user-remove","user-search","user-square","user-tag","user-tick","users","velas","verify","vibe","video","video-add","video-circle","video-horizontal","video-octagon","video-play","video-remove","video-slash","video-square","video-tick","video-time","video-vertical","voice-circle","voice-cricle","voice-square","volume","volume-cross","volume-high","volume-low","volume-low-1","volume-mute","volume-slash","volume-up","wallet","wallet-1","wallet-2","wallet-3","wallet-add","wallet-add-1","wallet-check","wallet-minus","wallet-money","wallet-remove","wallet-search","wallet2","wanchain","wanchain-1","wand-sparkles","warning-2","watch","watch-status","weight","weight-meter","whatsapp","wifi","wifi-square","wind","wind-2","windows","wing","woman","wrist-clock","x","x-circle","xd","xiaomi","xrp","youtube","zap","zel","zoom","zoom-in","zoom-out"];export const CATALOG_LOADERS={linear:{a:()=>require("./catalog/linear/a.g").SHARD,b:()=>require("./catalog/linear/b.g").SHARD,c:()=>require("./catalog/linear/c.g").SHARD,d:()=>require("./catalog/linear/d.g").SHARD,e:()=>require("./catalog/linear/e.g").SHARD,f:()=>require("./catalog/linear/f.g").SHARD,g:()=>require("./catalog/linear/g.g").SHARD,h:()=>require("./catalog/linear/h.g").SHARD,i:()=>require("./catalog/linear/i.g").SHARD,j:()=>require("./catalog/linear/j.g").SHARD,k:()=>require("./catalog/linear/k.g").SHARD,l:()=>require("./catalog/linear/l.g").SHARD,m:()=>require("./catalog/linear/m.g").SHARD,n:()=>require("./catalog/linear/n.g").SHARD,o:()=>require("./catalog/linear/o.g").SHARD,p:()=>require("./catalog/linear/p.g").SHARD,q:()=>require("./catalog/linear/q.g").SHARD,r:()=>require("./catalog/linear/r.g").SHARD,s:()=>require("./catalog/linear/s.g").SHARD,t:()=>require("./catalog/linear/t.g").SHARD,u:()=>require("./catalog/linear/u.g").SHARD,v:()=>require("./catalog/linear/v.g").SHARD,w:()=>require("./catalog/linear/w.g").SHARD,x:()=>require("./catalog/linear/x.g").SHARD,y:()=>require("./catalog/linear/y.g").SHARD,z:()=>require("./catalog/linear/z.g").SHARD},bold:{a:()=>require("./catalog/bold/a.g").SHARD,b:()=>require("./catalog/bold/b.g").SHARD,c:()=>require("./catalog/bold/c.g").SHARD,d:()=>require("./catalog/bold/d.g").SHARD,e:()=>require("./catalog/bold/e.g").SHARD,f:()=>require("./catalog/bold/f.g").SHARD,g:()=>require("./catalog/bold/g.g").SHARD,h:()=>require("./catalog/bold/h.g").SHARD,i:()=>require("./catalog/bold/i.g").SHARD,j:()=>require("./catalog/bold/j.g").SHARD,k:()=>require("./catalog/bold/k.g").SHARD,l:()=>require("./catalog/bold/l.g").SHARD,m:()=>require("./catalog/bold/m.g").SHARD,n:()=>require("./catalog/bold/n.g").SHARD,o:()=>require("./catalog/bold/o.g").SHARD,p:()=>require("./catalog/bold/p.g").SHARD,q:()=>require("./catalog/bold/q.g").SHARD,r:()=>require("./catalog/bold/r.g").SHARD,s:()=>require("./catalog/bold/s.g").SHARD,t:()=>require("./catalog/bold/t.g").SHARD,u:()=>require("./catalog/bold/u.g").SHARD,v:()=>require("./catalog/bold/v.g").SHARD,w:()=>require("./catalog/bold/w.g").SHARD,x:()=>require("./catalog/bold/x.g").SHARD,y:()=>require("./catalog/bold/y.g").SHARD,z:()=>require("./catalog/bold/z.g").SHARD},broken:{a:()=>require("./catalog/broken/a.g").SHARD,b:()=>require("./catalog/broken/b.g").SHARD,c:()=>require("./catalog/broken/c.g").SHARD,d:()=>require("./catalog/broken/d.g").SHARD,e:()=>require("./catalog/broken/e.g").SHARD,f:()=>require("./catalog/broken/f.g").SHARD,g:()=>require("./catalog/broken/g.g").SHARD,h:()=>require("./catalog/broken/h.g").SHARD,i:()=>require("./catalog/broken/i.g").SHARD,j:()=>require("./catalog/broken/j.g").SHARD,k:()=>require("./catalog/broken/k.g").SHARD,l:()=>require("./catalog/broken/l.g").SHARD,m:()=>require("./catalog/broken/m.g").SHARD,n:()=>require("./catalog/broken/n.g").SHARD,o:()=>require("./catalog/broken/o.g").SHARD,p:()=>require("./catalog/broken/p.g").SHARD,q:()=>require("./catalog/broken/q.g").SHARD,r:()=>require("./catalog/broken/r.g").SHARD,s:()=>require("./catalog/broken/s.g").SHARD,t:()=>require("./catalog/broken/t.g").SHARD,u:()=>require("./catalog/broken/u.g").SHARD,v:()=>require("./catalog/broken/v.g").SHARD,w:()=>require("./catalog/broken/w.g").SHARD,x:()=>require("./catalog/broken/x.g").SHARD,y:()=>require("./catalog/broken/y.g").SHARD,z:()=>require("./catalog/broken/z.g").SHARD},bulk:{a:()=>require("./catalog/bulk/a.g").SHARD,b:()=>require("./catalog/bulk/b.g").SHARD,c:()=>require("./catalog/bulk/c.g").SHARD,d:()=>require("./catalog/bulk/d.g").SHARD,e:()=>require("./catalog/bulk/e.g").SHARD,f:()=>require("./catalog/bulk/f.g").SHARD,g:()=>require("./catalog/bulk/g.g").SHARD,h:()=>require("./catalog/bulk/h.g").SHARD,i:()=>require("./catalog/bulk/i.g").SHARD,j:()=>require("./catalog/bulk/j.g").SHARD,k:()=>require("./catalog/bulk/k.g").SHARD,l:()=>require("./catalog/bulk/l.g").SHARD,m:()=>require("./catalog/bulk/m.g").SHARD,n:()=>require("./catalog/bulk/n.g").SHARD,o:()=>require("./catalog/bulk/o.g").SHARD,p:()=>require("./catalog/bulk/p.g").SHARD,q:()=>require("./catalog/bulk/q.g").SHARD,r:()=>require("./catalog/bulk/r.g").SHARD,s:()=>require("./catalog/bulk/s.g").SHARD,t:()=>require("./catalog/bulk/t.g").SHARD,u:()=>require("./catalog/bulk/u.g").SHARD,v:()=>require("./catalog/bulk/v.g").SHARD,w:()=>require("./catalog/bulk/w.g").SHARD,x:()=>require("./catalog/bulk/x.g").SHARD,y:()=>require("./catalog/bulk/y.g").SHARD,z:()=>require("./catalog/bulk/z.g").SHARD},outline:{a:()=>require("./catalog/outline/a.g").SHARD,b:()=>require("./catalog/outline/b.g").SHARD,c:()=>require("./catalog/outline/c.g").SHARD,d:()=>require("./catalog/outline/d.g").SHARD,e:()=>require("./catalog/outline/e.g").SHARD,f:()=>require("./catalog/outline/f.g").SHARD,g:()=>require("./catalog/outline/g.g").SHARD,h:()=>require("./catalog/outline/h.g").SHARD,i:()=>require("./catalog/outline/i.g").SHARD,j:()=>require("./catalog/outline/j.g").SHARD,k:()=>require("./catalog/outline/k.g").SHARD,l:()=>require("./catalog/outline/l.g").SHARD,m:()=>require("./catalog/outline/m.g").SHARD,n:()=>require("./catalog/outline/n.g").SHARD,o:()=>require("./catalog/outline/o.g").SHARD,p:()=>require("./catalog/outline/p.g").SHARD,q:()=>require("./catalog/outline/q.g").SHARD,r:()=>require("./catalog/outline/r.g").SHARD,s:()=>require("./catalog/outline/s.g").SHARD,t:()=>require("./catalog/outline/t.g").SHARD,u:()=>require("./catalog/outline/u.g").SHARD,v:()=>require("./catalog/outline/v.g").SHARD,w:()=>require("./catalog/outline/w.g").SHARD,x:()=>require("./catalog/outline/x.g").SHARD,y:()=>require("./catalog/outline/y.g").SHARD,z:()=>require("./catalog/outline/z.g").SHARD},twotone:{a:()=>require("./catalog/twotone/a.g").SHARD,b:()=>require("./catalog/twotone/b.g").SHARD,c:()=>require("./catalog/twotone/c.g").SHARD,d:()=>require("./catalog/twotone/d.g").SHARD,e:()=>require("./catalog/twotone/e.g").SHARD,f:()=>require("./catalog/twotone/f.g").SHARD,g:()=>require("./catalog/twotone/g.g").SHARD,h:()=>require("./catalog/twotone/h.g").SHARD,i:()=>require("./catalog/twotone/i.g").SHARD,j:()=>require("./catalog/twotone/j.g").SHARD,k:()=>require("./catalog/twotone/k.g").SHARD,l:()=>require("./catalog/twotone/l.g").SHARD,m:()=>require("./catalog/twotone/m.g").SHARD,n:()=>require("./catalog/twotone/n.g").SHARD,o:()=>require("./catalog/twotone/o.g").SHARD,p:()=>require("./catalog/twotone/p.g").SHARD,q:()=>require("./catalog/twotone/q.g").SHARD,r:()=>require("./catalog/twotone/r.g").SHARD,s:()=>require("./catalog/twotone/s.g").SHARD,t:()=>require("./catalog/twotone/t.g").SHARD,u:()=>require("./catalog/twotone/u.g").SHARD,v:()=>require("./catalog/twotone/v.g").SHARD,w:()=>require("./catalog/twotone/w.g").SHARD,x:()=>require("./catalog/twotone/x.g").SHARD,y:()=>require("./catalog/twotone/y.g").SHARD,z:()=>require("./catalog/twotone/z.g").SHARD}};
|