@webority/mobile-ui 0.112.3 → 0.113.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.
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityPhone",
3
3
  "library": {
4
4
  "name": "@webority/mobile-ui",
5
- "version": "0.112.3"
5
+ "version": "0.113.0"
6
6
  },
7
7
  "rendererProtocolVersion": 13,
8
8
  "platform": "Phone",
@@ -7453,6 +7453,12 @@
7453
7453
  "description": "Dialog title.",
7454
7454
  "default": "Update available"
7455
7455
  },
7456
+ {
7457
+ "name": "updateFallbackUrl",
7458
+ "type": "string",
7459
+ "required": false,
7460
+ "description": "Address shown as a tappable link when the store cannot be opened; nothing extra shows when left out."
7461
+ },
7456
7462
  {
7457
7463
  "name": "updateUrl",
7458
7464
  "type": "string",
@@ -13348,12 +13354,25 @@
13348
13354
  "bottom"
13349
13355
  ]
13350
13356
  },
13357
+ {
13358
+ "name": "floatingAction",
13359
+ "type": "node",
13360
+ "required": false,
13361
+ "description": "A floating action button. The page lifts it above the tab bar and footer and keeps room under the content for it."
13362
+ },
13351
13363
  {
13352
13364
  "name": "footer",
13353
13365
  "type": "node",
13354
13366
  "required": false,
13355
13367
  "description": "Content pinned under the page, above the keyboard."
13356
13368
  },
13369
+ {
13370
+ "name": "gutter",
13371
+ "type": "boolean",
13372
+ "required": false,
13373
+ "description": "Keeps the content inside the page's side margin. List pages default to false, because their rows carry their own padding.",
13374
+ "default": true
13375
+ },
13357
13376
  {
13358
13377
  "name": "keyboardToolbar",
13359
13378
  "type": "boolean",
@@ -20452,16 +20471,16 @@
20452
20471
  "dark": "#84848d"
20453
20472
  },
20454
20473
  "field-placeholder-disabled": {
20455
- "light": "#c4cada",
20456
- "dark": "#52525b"
20474
+ "light": "#7a8197",
20475
+ "dark": "#71717a"
20457
20476
  },
20458
20477
  "field-text": {
20459
20478
  "light": "#252f4a",
20460
20479
  "dark": "#fafafa"
20461
20480
  },
20462
20481
  "field-text-disabled": {
20463
- "light": "#c4cada",
20464
- "dark": "#52525b"
20482
+ "light": "#7a8197",
20483
+ "dark": "#71717a"
20465
20484
  },
20466
20485
  "focus-ring": {
20467
20486
  "light": "#5b5bd6",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-phone",
3
- "version": "0.112.3",
3
+ "version": "0.113.0",
4
4
  "platform": "Phone",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 13,
7
7
  "library": {
8
8
  "name": "@webority/mobile-ui",
9
- "version": "0.112.3"
9
+ "version": "0.113.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "fe4432fcd914dc8a71a527c09ef12d7651ed0ff1bddd7a33942a094b64eebf96",
14
- "bytes": 636210
13
+ "sha256": "720e9aec84e4bdffbcb60b7cd1981fd3d5821b374b8d2fb202d82e2bcf9255c8",
14
+ "bytes": 636991
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "7951b50758a28d49ec77a27e7f94d60e3501672e236b8e68e0ca84a0373243b2",
18
- "bytes": 5956881
17
+ "sha256": "5381a25aecdd7590720aab6fc690d16339911058c5b25416b575cfbae9f4ab44",
18
+ "bytes": 5959242
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DEFAULT_BANNER_LABELS=exports.Banner=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePresenceMotion=require("../../hooks/usePresenceMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_hitSlop=require("../../utils/hitSlop.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_slotIcon=require("../AppIcon/slotIcon.js"),_index2=require("../IconBadge/index.js"),_index3=require("../Skeleton/index.js"),_index4=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_BANNER_LABELS=exports.DEFAULT_BANNER_LABELS=Object.freeze({dismiss:"Dismiss banner"}),Banner=exports.Banner=(0,_react.forwardRef)((e,t)=>{const{title:r,message:n,tone:i="neutral",variant:s="bar",icon:a,actions:o,dismissible:l=!1,onClose:c,haptic:d,visible:u=!0,animateMount:x=!0,loading:m=!1,accessibilityRole:p="alert",accessibilityLabel:_,labels:g,style:h,containerStyle:y,iconCircleStyle:b,tintBarStyle:v,closeButtonStyle:f,actionButtonStyle:j,testID:w}=e;(0,_warnInvalidValue.warnInvalidValue)("Banner","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","variant",e.variant,["bar","wash","tint"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","accessibilityRole",e.accessibilityRole,["alert","summary","none"]);const R=(0,_index.useTheme)(),B=(0,_usePresenceMotion.usePresenceMotion)(),S=(0,_react.useMemo)(()=>buildStyles(R),[R]),N=(0,_react.useMemo)(()=>tintFor(R,i),[R,i]),I=(0,_react.useMemo)(()=>({...DEFAULT_BANNER_LABELS,...g}),[g]),[V,k]=B.range(-20,0),C=(0,_react.useRef)((0,_index.createAnimatedValue)(x&&u?V:0)).current,L=(0,_react.useRef)((0,_index.createAnimatedValue)(x&&u?0:u?1:0)).current,[A,D]=(0,_react.useState)(u),E=(0,_react.useRef)(!0);if((0,_react.useEffect)(()=>{if(E.current&&(E.current=!1,!x))return;let e;return u?(D(!0),e=_reactNative.Animated.parallel([_reactNative.Animated.timing(C,{toValue:k,duration:R.motion.duration.default,useNativeDriver:!0}),_reactNative.Animated.timing(L,{toValue:1,duration:B.duration("default"),useNativeDriver:!0})]),e.start()):A&&(e=_reactNative.Animated.parallel([_reactNative.Animated.timing(C,{toValue:V,duration:R.motion.duration.fast,useNativeDriver:!0}),_reactNative.Animated.timing(L,{toValue:0,duration:B.duration("fast"),useNativeDriver:!0})]),e.start(()=>{D(!1)})),()=>e?.stop()},[u]),!A)return null;const T=r??" ",q="string"==typeof n?n??" ":"",M="wash"===s,H="bar"!==s,z="alert"===p?"danger"===i?"assertive":"polite":"none",P=(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{ref:t,accessibilityRole:p,accessibilityLiveRegion:z,accessibilityLabel:_,testID:w,style:[S.container,{backgroundColor:H?N.soft:R.colors["bg-subtle"],borderRadius:M?R.radius.sm:R.radius.md,..._corners.smoothCorners,padding:R.space.md,opacity:L,transform:[{translateY:C}]},h,y],children:[!M&&R.components.banner["tint-bar-width"]>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[S.tintBar,{backgroundColor:N.bar},v]}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:S.row,children:[!1===a?null:a?(0,_jsxRuntime.jsx)(_reactNative.View,{style:S.iconWrap,children:(0,_slotIcon.renderSlotIcon)(a,{color:N.ink,size:R.text.xl.size,disabled:!1})}):(0,_jsxRuntime.jsx)(_index2.IconBadge,{dimension:ICON_CIRCLE_SIZE,color:N.bar,icon:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"body",weight:"bold",accessible:!1,style:[S.iconGlyph,{color:N.ink}],children:N.glyph}),style:[S.iconCircle,b]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:S.textBlock,children:[r||m?(0,_jsxRuntime.jsx)(_index4.Text,{variant:"body",weight:"semibold",numberOfLines:2,style:{lineHeight:20,...M?{color:N.ink}:null},children:T}):null,"string"==typeof n||m?(0,_jsxRuntime.jsx)(_index4.Text,{variant:"bodySmall",color:"secondary",style:{lineHeight:18,marginTop:r?R.space.xxs:0},children:q||" "}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginTop:r?R.space.xxs:0},children:n})]}),l?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:I.dismiss,onPress:()=>{const e=(0,_hapticUtils.resolveHaptic)(d,"selection");e&&(0,_hapticUtils.triggerHaptic)(e),c?.()},hitSlop:8,...(0,_hitSlop.hitSlopMarker)(8),style:({pressed:e})=>[S.closeBtn,{backgroundColor:e?R.colors["surface-pressed"]:"transparent"},f],children:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"title",weight:"bold",color:"secondary",accessible:!1,style:{lineHeight:17},children:"×"})}):null]}),o&&o.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:S.actionsRow,children:o.map((e,t)=>{(0,_warnInvalidValue.warnInvalidValue)("Banner","action.tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","action.variant",e.variant,["solid","outline","ghost"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","action.size",e.size,["sm","md"]);const r=e.tone??"primary",n=e.variant??"ghost",i="primary"===r?N.glyphColor:"neutral"===r?R.colors["text-muted"]:R.colors[r],s="primary"===r?N.ink:"neutral"===r?R.colors["text-muted"]:R.colors[`${r}-text`],a="primary"===r?N.on:"neutral"===r?R.colors["on-neutral-strong"]:R.colors[`on-${r}`],o="solid"===n;return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:e.label,testID:e.testID,onPress:()=>{const t=(0,_hapticUtils.resolveHaptic)(d,"selection");t&&(0,_hapticUtils.triggerHaptic)(t),e.onPress()},style:({pressed:t})=>[S.actionBtn,"md"===e.size&&S.actionBtnMd,"outline"===n&&{borderWidth:1,borderColor:s},{backgroundColor:o?i:t?R.colors["surface-pressed"]:"transparent",opacity:o&&t?.85:1},j],children:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"bodySmall",weight:"semibold",align:"center",style:{color:o?a:s},children:e.label})},`${e.label}-${t}`)})}):null]});return m?(0,_jsxRuntime.jsx)(BannerSkeleton,{...e}):P});Banner.displayName="Banner";const BannerSkeleton=({title:e,actions:t,icon:r,containerStyle:n,style:i})=>{const s=(0,_index.useTheme)(),a=!1!==r;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[{flexDirection:"row",alignItems:"flex-start",backgroundColor:s.colors.surface,borderRadius:s.radius.md,..._corners.smoothCorners,padding:s.space.md,borderWidth:1,borderColor:s.colors.border},n,i],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:[a?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginRight:s.space.sm},children:(0,_jsxRuntime.jsx)(_index3.Skeleton,{shape:"circle",width:32,height:32})}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[void 0!==e?(0,_jsxRuntime.jsx)(_index3.Skeleton,{shape:"text",width:"55%",height:16,style:{marginBottom:s.space.xs}}):null,(0,_jsxRuntime.jsx)(_index3.SkeletonText,{lines:2,fontSize:s.text.sm.size,lastLineWidth:"70%"}),t&&t.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flexDirection:"row",marginTop:s.space.sm},children:t.map((e,t)=>(0,_jsxRuntime.jsx)(_index3.Skeleton,{width:72,height:28,shape:"rounded",style:{marginRight:s.space.sm}},`sk-banner-action-${t}`))}):null]})]})};BannerSkeleton.displayName="BannerSkeleton",Banner.Skeleton=BannerSkeleton;const tintFor=(e,t)=>{switch(t){case"success":return{soft:e.colors["success-soft"],bar:e.colors.success,glyphColor:e.colors.success,ink:e.colors["success-text"],on:e.colors["on-success"],glyph:"✓"};case"warning":return{soft:e.colors["warning-soft"],bar:e.colors.warning,glyphColor:e.colors.warning,ink:e.colors["warning-text"],on:e.colors["on-warning"],glyph:"⚠"};case"danger":return{soft:e.colors["danger-soft"],bar:e.colors.danger,glyphColor:e.colors.danger,ink:e.colors["danger-text"],on:e.colors["on-danger"],glyph:"✗"};case"neutral":return{soft:e.colors["bg-subtle"],bar:e.colors["text-subtle"],glyphColor:e.colors["text-muted"],ink:e.colors["text-muted"],on:e.colors["on-neutral-strong"],glyph:"i"};case"primary":return{soft:e.colors["primary-soft"],bar:e.colors.primary,glyphColor:e.colors.primary,ink:e.colors["primary-text"],on:e.colors["on-primary"],glyph:"i"};case"info":return{soft:e.colors["info-soft"],bar:e.colors.info,glyphColor:e.colors.info,ink:e.colors["info-text"],on:e.colors["on-info"],glyph:"i"};default:return tintFor(e,"neutral")}},ICON_CIRCLE_SIZE=28,buildStyles=e=>{const t=e.components.banner,r=e.space.sm;return _reactNative.StyleSheet.create({container:{overflow:"hidden",paddingLeft:e.space.md},tintBar:{position:"absolute",left:0,top:0,bottom:0,width:t["tint-bar-width"]},row:{flexDirection:"row",alignItems:"flex-start"},iconWrap:{marginRight:r},iconCircle:{marginRight:r},iconGlyph:{lineHeight:17},textBlock:{flex:1,paddingRight:e.space.xs},closeBtn:{width:28,height:28,borderRadius:e.radius.pill,..._corners.smoothCorners,alignItems:"center",justifyContent:"center",marginLeft:e.space.xxs},actionsRow:{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",marginTop:e.space.xs,columnGap:e.space.xs,rowGap:e.space.xs},actionBtn:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xs,borderRadius:e.radius.sm,..._corners.smoothCorners,maxWidth:"100%",alignItems:"center",justifyContent:"center"},actionBtnMd:{minHeight:44,paddingHorizontal:e.space.md}})};var _default=exports.default=Banner;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DEFAULT_BANNER_LABELS=exports.Banner=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePresenceMotion=require("../../hooks/usePresenceMotion.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_hitSlop=require("../../utils/hitSlop.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_slotIcon=require("../AppIcon/slotIcon.js"),_index2=require("../IconBadge/index.js"),_index3=require("../Skeleton/index.js"),_index4=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_BANNER_LABELS=exports.DEFAULT_BANNER_LABELS=Object.freeze({dismiss:"Dismiss banner"}),Banner=exports.Banner=(0,_react.forwardRef)((e,t)=>{const{title:r,message:n,tone:i="neutral",variant:s="bar",icon:a,actions:o,dismissible:l=!1,onClose:c,haptic:d,visible:u=!0,animateMount:x=!0,loading:m=!1,accessibilityRole:p="alert",accessibilityLabel:_,labels:g,style:h,containerStyle:y,iconCircleStyle:b,tintBarStyle:v,closeButtonStyle:f,actionButtonStyle:j,testID:w}=e;(0,_warnInvalidValue.warnInvalidValue)("Banner","tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","variant",e.variant,["bar","wash","tint"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","accessibilityRole",e.accessibilityRole,["alert","summary","none"]);const R=(0,_index.useTheme)(),B=(0,_usePresenceMotion.usePresenceMotion)(),S=(0,_react.useMemo)(()=>buildStyles(R),[R]),N=(0,_react.useMemo)(()=>tintFor(R,i),[R,i]),I=(0,_react.useMemo)(()=>({...DEFAULT_BANNER_LABELS,...g}),[g]),[C,V]=B.range(-20,0),k=(0,_react.useRef)((0,_index.createAnimatedValue)(x&&u?C:0)).current,L=(0,_react.useRef)((0,_index.createAnimatedValue)(x&&u?0:u?1:0)).current,[A,D]=(0,_react.useState)(u),E=(0,_react.useRef)(!0);if((0,_react.useEffect)(()=>{if(E.current&&(E.current=!1,!x))return;let e;return u?(D(!0),e=_reactNative.Animated.parallel([_reactNative.Animated.timing(k,{toValue:V,duration:R.motion.duration.default,useNativeDriver:!0}),_reactNative.Animated.timing(L,{toValue:1,duration:B.duration("default"),useNativeDriver:!0})]),e.start()):A&&(e=_reactNative.Animated.parallel([_reactNative.Animated.timing(k,{toValue:C,duration:R.motion.duration.fast,useNativeDriver:!0}),_reactNative.Animated.timing(L,{toValue:0,duration:B.duration("fast"),useNativeDriver:!0})]),e.start(()=>{D(!1)})),()=>e?.stop()},[u]),!A)return null;const T=r??" ",q="string"==typeof n?n??" ":"",M="wash"===s,H="bar"!==s,z="alert"===p?"danger"===i?"assertive":"polite":"none",P=(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{ref:t,accessibilityRole:p,accessibilityLiveRegion:z,accessibilityLabel:_,testID:w,style:[S.container,{backgroundColor:H?N.soft:R.colors["bg-subtle"],borderRadius:M?R.radius.sm:R.radius.md,..._corners.smoothCorners,padding:R.space.md,opacity:L,transform:[{translateY:k}]},h,y],children:[!M&&R.components.banner["tint-bar-width"]>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[S.tintBar,{backgroundColor:N.bar},v]}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[S.row,void 0===r&&S.rowCentred],children:[!1===a?null:a?(0,_jsxRuntime.jsx)(_reactNative.View,{style:S.iconWrap,children:(0,_slotIcon.renderSlotIcon)(a,{color:N.ink,size:R.text.xl.size,disabled:!1})}):(0,_jsxRuntime.jsx)(_index2.IconBadge,{dimension:ICON_CIRCLE_SIZE,color:N.bar,icon:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"body",weight:"bold",accessible:!1,style:[S.iconGlyph,{color:N.ink}],children:N.glyph}),style:[S.iconCircle,b]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:S.textBlock,children:[r||m?(0,_jsxRuntime.jsx)(_index4.Text,{variant:"body",weight:"semibold",numberOfLines:2,style:{lineHeight:20,...M?{color:N.ink}:null},children:T}):null,"string"==typeof n||m?(0,_jsxRuntime.jsx)(_index4.Text,{variant:"bodySmall",color:"secondary",style:{lineHeight:18,marginTop:r?R.space.xxs:0},children:q||" "}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginTop:r?R.space.xxs:0},children:n})]}),l?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:I.dismiss,onPress:()=>{const e=(0,_hapticUtils.resolveHaptic)(d,"selection");e&&(0,_hapticUtils.triggerHaptic)(e),c?.()},hitSlop:8,...(0,_hitSlop.hitSlopMarker)(8),style:({pressed:e})=>[S.closeBtn,{backgroundColor:e?R.colors["surface-pressed"]:"transparent"},f],children:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"title",weight:"bold",color:"secondary",accessible:!1,style:{lineHeight:17},children:"×"})}):null]}),o&&o.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:S.actionsRow,children:o.map((e,t)=>{(0,_warnInvalidValue.warnInvalidValue)("Banner","action.tone",e.tone,["primary","success","warning","danger","info","neutral"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","action.variant",e.variant,["solid","outline","ghost"]),(0,_warnInvalidValue.warnInvalidValue)("Banner","action.size",e.size,["sm","md"]);const r=e.tone??"primary",n=e.variant??"ghost",i="primary"===r?N.glyphColor:"neutral"===r?R.colors["text-muted"]:R.colors[r],s="primary"===r?N.ink:"neutral"===r?R.colors["text-muted"]:R.colors[`${r}-text`],a="primary"===r?N.on:"neutral"===r?R.colors["on-neutral-strong"]:R.colors[`on-${r}`],o="solid"===n;return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:e.label,testID:e.testID,onPress:()=>{const t=(0,_hapticUtils.resolveHaptic)(d,"selection");t&&(0,_hapticUtils.triggerHaptic)(t),e.onPress()},style:({pressed:t})=>[S.actionBtn,"md"===e.size&&S.actionBtnMd,"outline"===n&&{borderWidth:1,borderColor:s},{backgroundColor:o?i:t?R.colors["surface-pressed"]:"transparent",opacity:o&&t?.85:1},j],children:(0,_jsxRuntime.jsx)(_index4.Text,{variant:"bodySmall",weight:"semibold",align:"center",style:{color:o?a:s},children:e.label})},`${e.label}-${t}`)})}):null]});return m?(0,_jsxRuntime.jsx)(BannerSkeleton,{...e}):P});Banner.displayName="Banner";const BannerSkeleton=({title:e,actions:t,icon:r,containerStyle:n,style:i})=>{const s=(0,_index.useTheme)(),a=!1!==r;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[{flexDirection:"row",alignItems:"flex-start",backgroundColor:s.colors.surface,borderRadius:s.radius.md,..._corners.smoothCorners,padding:s.space.md,borderWidth:1,borderColor:s.colors.border},n,i],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:[a?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginRight:s.space.sm},children:(0,_jsxRuntime.jsx)(_index3.Skeleton,{shape:"circle",width:32,height:32})}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[void 0!==e?(0,_jsxRuntime.jsx)(_index3.Skeleton,{shape:"text",width:"55%",height:16,style:{marginBottom:s.space.xs}}):null,(0,_jsxRuntime.jsx)(_index3.SkeletonText,{lines:2,fontSize:s.text.sm.size,lastLineWidth:"70%"}),t&&t.length>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flexDirection:"row",marginTop:s.space.sm},children:t.map((e,t)=>(0,_jsxRuntime.jsx)(_index3.Skeleton,{width:72,height:28,shape:"rounded",style:{marginRight:s.space.sm}},`sk-banner-action-${t}`))}):null]})]})};BannerSkeleton.displayName="BannerSkeleton",Banner.Skeleton=BannerSkeleton;const tintFor=(e,t)=>{switch(t){case"success":return{soft:e.colors["success-soft"],bar:e.colors.success,glyphColor:e.colors.success,ink:e.colors["success-text"],on:e.colors["on-success"],glyph:"✓"};case"warning":return{soft:e.colors["warning-soft"],bar:e.colors.warning,glyphColor:e.colors.warning,ink:e.colors["warning-text"],on:e.colors["on-warning"],glyph:"⚠"};case"danger":return{soft:e.colors["danger-soft"],bar:e.colors.danger,glyphColor:e.colors.danger,ink:e.colors["danger-text"],on:e.colors["on-danger"],glyph:"✗"};case"neutral":return{soft:e.colors["bg-subtle"],bar:e.colors["text-subtle"],glyphColor:e.colors["text-muted"],ink:e.colors["text-muted"],on:e.colors["on-neutral-strong"],glyph:"i"};case"primary":return{soft:e.colors["primary-soft"],bar:e.colors.primary,glyphColor:e.colors.primary,ink:e.colors["primary-text"],on:e.colors["on-primary"],glyph:"i"};case"info":return{soft:e.colors["info-soft"],bar:e.colors.info,glyphColor:e.colors.info,ink:e.colors["info-text"],on:e.colors["on-info"],glyph:"i"};default:return tintFor(e,"neutral")}},ICON_CIRCLE_SIZE=28,buildStyles=e=>{const t=e.components.banner,r=e.space.sm;return _reactNative.StyleSheet.create({container:{overflow:"hidden",paddingLeft:e.space.md},tintBar:{position:"absolute",left:0,top:0,bottom:0,width:t["tint-bar-width"]},row:{flexDirection:"row",alignItems:"flex-start"},rowCentred:{alignItems:"center"},iconWrap:{marginRight:r},iconCircle:{marginRight:r},iconGlyph:{lineHeight:17},textBlock:{flex:1,paddingRight:e.space.xs},closeBtn:{width:28,height:28,borderRadius:e.radius.pill,..._corners.smoothCorners,alignItems:"center",justifyContent:"center",marginLeft:e.space.xxs},actionsRow:{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",marginTop:e.space.xs,columnGap:e.space.xs,rowGap:e.space.xs},actionBtn:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xs,borderRadius:e.radius.sm,..._corners.smoothCorners,maxWidth:"100%",alignItems:"center",justifyContent:"center"},actionBtnMd:{minHeight:44,paddingHorizontal:e.space.md}})};var _default=exports.default=Banner;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ForceUpdateDialog=exports.DEFAULT_FORCE_UPDATE_DIALOG_LABELS=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_index=require("../Dialog/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_FORCE_UPDATE_DIALOG_LABELS=exports.DEFAULT_FORCE_UPDATE_DIALOG_LABELS={title:"Update available",message:"A new version of the app is available. Please update to continue using the latest features and security improvements.",update:"Update now",later:"Later"},ForceUpdateDialog=({visible:e,onClose:t,mandatory:a=!1,updateUrl:o,title:r,message:l,labels:i,containerStyle:s,titleStyle:n,messageStyle:_,testID:c})=>{const[u,d]=(0,_react.useState)(!1),p=(0,_react.useMemo)(()=>({...DEFAULT_FORCE_UPDATE_DIALOG_LABELS,...i}),[i]),D=(0,_react.useCallback)(()=>{d(!0),(async()=>{try{await _mobileCore.VersionCheck.openUpdateUrl(o??null)}catch(e){_mobileCore.Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the store URL.",e)}finally{d(!1)}})()},[o]),U=(0,_react.useCallback)(()=>{a||t?.()},[a,t]),g=a?[{label:p.update,onPress:D,tone:"info",loading:u}]:[{label:p.later,onPress:U,tone:"neutral"},{label:p.update,onPress:D,tone:"info",loading:u}];return(0,_jsxRuntime.jsx)(_index.Dialog,{visible:e,onClose:U,title:r??p.title,message:l??p.message,tone:"info",actions:g,dismissOnAction:!1,containerStyle:s,titleStyle:n,messageStyle:_,testID:c})};exports.ForceUpdateDialog=ForceUpdateDialog;var _default=exports.default=ForceUpdateDialog;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ForceUpdateDialog=exports.DEFAULT_FORCE_UPDATE_DIALOG_LABELS=void 0;var _mobileCore=require("@webority/mobile-core"),_react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_index2=require("../Dialog/index.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_FORCE_UPDATE_DIALOG_LABELS=exports.DEFAULT_FORCE_UPDATE_DIALOG_LABELS={title:"Update available",message:"A new version of the app is available. Please update to continue using the latest features and security improvements.",update:"Update now",later:"Later"},STORE_FALLBACK_COPY="We could not open the store. Update from this address instead.",styles=_reactNative.StyleSheet.create({fallback:{alignItems:"center"},fallbackCopy:{textAlign:"center"},fallbackLink:{textAlign:"center",textDecorationLine:"underline"}}),ForceUpdateDialog=({visible:e,onClose:t,mandatory:a=!1,updateUrl:l,updateFallbackUrl:i,title:o,message:r,labels:s,containerStyle:n,titleStyle:c,messageStyle:d,testID:_})=>{const u=(0,_index.useTheme)(),[p,b]=(0,_react.useState)(!1),[x,m]=(0,_react.useState)(!1),g=(0,_react.useMemo)(()=>({...DEFAULT_FORCE_UPDATE_DIALOG_LABELS,...s}),[s]),L=(0,_react.useCallback)(()=>{b(!0),m(!1),(async()=>{let e=!1;try{e=await _mobileCore.VersionCheck.openUpdateUrl(l??null)}catch(e){_mobileCore.Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the store URL.",e)}finally{b(!1),m(!e)}})()},[l]),y=(0,_react.useCallback)(e=>{_reactNative.Linking.openURL(e).catch(e=>{_mobileCore.Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the fallback address.",e)})},[]),A=x?i:null,D=A?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.fallback,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.fallbackCopy,{color:u.colors["text-muted"],fontSize:u.text.base.size,lineHeight:u.text.base.size*u.leading.body}],children:STORE_FALLBACK_COPY}),(0,_jsxRuntime.jsx)(_reactNative.Text,{accessibilityRole:"link",onPress:()=>y(A),style:[styles.fallbackLink,{color:u.colors.link,fontSize:u.text.base.size,marginTop:u.space.xs}],children:A})]}):null,U=(0,_react.useCallback)(()=>{a||t?.()},[a,t]),f=a?[{label:g.update,onPress:L,tone:"info",loading:p}]:[{label:g.later,onPress:U,tone:"neutral"},{label:g.update,onPress:L,tone:"info",loading:p}];return(0,_jsxRuntime.jsx)(_index2.Dialog,{visible:e,onClose:U,title:o??g.title,message:r??g.message,tone:"info",actions:f,dismissOnAction:!1,containerStyle:n,titleStyle:c,messageStyle:d,testID:_,children:D})};exports.ForceUpdateDialog=ForceUpdateDialog;var _default=exports.default=ForceUpdateDialog;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.KeyboardAwareScrollView=void 0;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_index=require("../../theme/index.js"),_jsxRuntime=require("react/jsx-runtime");const tapAreaStyle={flexGrow:1},KeyboardAwareScrollView=exports.KeyboardAwareScrollView=(0,_react.forwardRef)((e,r)=>{const{children:t,bottomOffset:o=24,extraKeyboardSpace:a=0,safeAreaEdges:i=["bottom"],refreshing:s=!1,onRefresh:l,dismissOnTapOutside:n=!1,contentContainerStyle:d,refreshControl:c,...u}=e,f=(0,_index.useTheme)(),b=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),y=i.includes("bottom"),p={paddingBottom:y?b.bottom:0,...i.includes("top")?{paddingTop:b.top}:null,...i.includes("left")?{paddingLeft:b.left}:null,...i.includes("right")?{paddingRight:b.right}:null},x=c??(l?(0,_jsxRuntime.jsx)(_reactNative.RefreshControl,{refreshing:s,onRefresh:l,tintColor:f.colors.primary,colors:[f.colors.primary],progressBackgroundColor:f.colors.surface,titleColor:f.colors["text-muted"]}):void 0);return(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardAwareScrollView,{ref:r,bottomOffset:o,extraKeyboardSpace:a-(y?b.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,p],refreshControl:x,...u,children:n?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessible:!1,onPress:_reactNative.Keyboard.dismiss,style:tapAreaStyle,children:t}):t})});KeyboardAwareScrollView.displayName="KeyboardAwareScrollView";var _default=exports.default=KeyboardAwareScrollView;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.KeyboardAwareScrollView=void 0;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_index=require("../../theme/index.js"),_jsxRuntime=require("react/jsx-runtime");const tapAreaStyle={flexGrow:1},KeyboardAwareScrollView=exports.KeyboardAwareScrollView=(0,_react.forwardRef)((e,r)=>{const{children:t,bottomOffset:o=24,extraKeyboardSpace:a=0,safeAreaEdges:i=["bottom"],refreshing:s=!1,onRefresh:l,dismissOnTapOutside:n=!0,contentContainerStyle:d,refreshControl:c,...u}=e,f=(0,_index.useTheme)(),b=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),y=i.includes("bottom"),p={paddingBottom:y?b.bottom:0,...i.includes("top")?{paddingTop:b.top}:null,...i.includes("left")?{paddingLeft:b.left}:null,...i.includes("right")?{paddingRight:b.right}:null},x=c??(l?(0,_jsxRuntime.jsx)(_reactNative.RefreshControl,{refreshing:s,onRefresh:l,tintColor:f.colors.primary,colors:[f.colors.primary],progressBackgroundColor:f.colors.surface,titleColor:f.colors["text-muted"]}):void 0);return(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardAwareScrollView,{ref:r,bottomOffset:o,extraKeyboardSpace:a-(y?b.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,p],refreshControl:x,...u,children:n?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessible:!1,onPress:_reactNative.Keyboard.dismiss,style:tapAreaStyle,children:t}):t})});KeyboardAwareScrollView.displayName="KeyboardAwareScrollView";var _default=exports.default=KeyboardAwareScrollView;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Screen=Screen;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeReanimated=require("react-native-reanimated"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_useRefreshControl=require("../../hooks/useRefreshControl.js"),_index=require("../../theme/index.js"),_index2=require("../AppBar/index.js"),_index3=require("../AsyncBlock/index.js"),_index4=require("../EmptyState/index.js"),_index5=require("../KeyboardAwareScrollView/index.js"),_index6=require("../KeyboardToolbar/index.js"),_index7=require("../PagedListFooter/index.js"),_ScrollHost=require("./ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{};function renderFooter(e){return(0,_react.isValidElement)(e)?e:e?(0,_react.createElement)(e):null}const buildStyles=e=>_reactNative.StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},footer:{backgroundColor:e.colors.bg,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});function Screen(e){const{title:t,subtitle:r,largeTitle:o=!0,onBack:n,rightActions:a,leading:i,children:l,onRefresh:s,refreshing:c=!1,footer:d,scroll:u=!0,list:_,edges:x=DEFAULT_EDGES,keyboardToolbar:f=!0,bottomInset:v=0,scrollRef:h,onScroll:m,contentContainerStyle:g,testID:R}=e,p=(0,_index.useTheme)(),y=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),S=(0,_react.useMemo)(()=>buildStyles(p),[p]),[j]=(0,_react.useState)(()=>new _reactNative.Animated.Value(0)),[C,b]=(0,_react.useState)(0),E=void 0!==n,T=(0,_react.useRef)(n);T.current=n;const L=Boolean(t||r||n||i||a?.length),N=o&&void 0!==t,k=N&&(void 0!==_||u),V=k?C:0,A=void 0!==d,{refreshControl:q}=(0,_useRefreshControl.useRefreshControl)({onRefresh:s??noop,refreshing:c}),w=s?(0,_react.cloneElement)(q,{progressViewOffset:V}):void 0,B=(0,_reactNativeReanimated.useSharedValue)(0),F=(0,_reactNativeReanimated.useSharedValue)(0),O=(0,_reactNativeReanimated.useSharedValue)(0),H=(0,_reactNativeReanimated.useSharedValue)(0),M=(0,_react.useRef)(null),D=(0,_react.useRef)(0),K=(0,_react.useRef)(0),P=(0,_react.useMemo)(()=>({top:B,bottom:F,offset:O,maxOffset:H,scrollTo:e=>{const t=M.current;t instanceof _reactNative.FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[B,F,O,H]),I=(0,_react.useCallback)(e=>{M.current=e,"function"==typeof h?h(e):h&&(h.current=e)},[h]),z=(0,_react.useCallback)(()=>{H.value=Math.max(0,D.current-K.current)},[H]),W=(0,_react.useRef)(m);W.current=m;const G=(0,_react.useMemo)(()=>_reactNative.Animated.event([{nativeEvent:{contentOffset:{y:j}}}],{useNativeDriver:!1,listener:e=>{O.value=e.nativeEvent.contentOffset.y,W.current?.(e)}}),[j,O]),U=(0,_react.useCallback)(e=>{const{height:t}=e.nativeEvent.layout;b(e=>Math.max(e,t))},[]);(0,_react.useEffect)(()=>{if(!E)return;const e=_reactNative.BackHandler.addEventListener("hardwareBackPress",()=>(T.current?.(),!0));return()=>e.remove()},[E]);const Y=x.includes("left")?y.left:0,J=x.includes("right")?y.right:0,Q=x.includes("bottom")?y.bottom:0,X=x.includes("top")&&!L?y.top:0,Z=x.filter(e=>"top"!==e&&!("bottom"===e&&A)),$=L?(0,_jsxRuntime.jsx)(_reactNative.View,{style:k?S.overlay:void 0,onLayout:k?U:void 0,children:(0,_jsxRuntime.jsx)(_index2.AppBar,{title:t,subtitle:r,variant:N?"large":"default",scrollY:k?j:void 0,onBack:n,rightActions:a,leading:i})}):null,ee=(0,_react.useCallback)(()=>{const e=M.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,r,o)=>{K.current=o,B.value=t+V,F.value=t+o,z()})},[V,B,F,z]);(0,_react.useEffect)(()=>{ee()},[ee]);const te=(0,_react.useCallback)((e,t)=>{D.current=t,z()},[z]);let re;if(void 0!==_){const{state:e,paging:t,...r}=_,handleEndReached=e=>{t?.hasMore&&!t.loadingMore&&null==t.errorMore&&t.loadMore(),r.onEndReached?.(e)},o=(0,_jsxRuntime.jsx)(_reactNative.FlatList,{keyboardShouldPersistTaps:"handled",onEndReachedThreshold:t?.5:void 0,...r,ref:I,refreshControl:w,onScroll:G,onLayout:e=>{ee(),r.onLayout?.(e)},onContentSizeChange:(e,t)=>{te(e,t),r.onContentSizeChange?.(e,t)},onEndReached:t?handleEndReached:r.onEndReached,ListEmptyComponent:e?.empty?(0,_jsxRuntime.jsx)(_index4.EmptyState,{...e.empty}):void 0,ListFooterComponent:t||r.ListFooterComponent?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[renderFooter(r.ListFooterComponent),t?(0,_jsxRuntime.jsx)(_index7.PagedListFooter,{paging:t}):null]}):void 0,scrollEventThrottle:SCROLL_EVENT_THROTTLE,style:S.flex,contentContainerStyle:[{paddingTop:V,paddingLeft:Y,paddingRight:J},{paddingBottom:(A?0:Q)+v},r.contentContainerStyle,g]});re=(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext.Provider,{value:P,children:e?(0,_jsxRuntime.jsx)(_index3.AsyncBlock,{loading:e.loading,error:e.error,errorTitle:e.errorTitle,onRetry:e.onRetry,skeleton:e.skeleton,style:[S.flex,{paddingTop:V}],children:o}):o})}else re=u?(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext.Provider,{value:P,children:(0,_jsxRuntime.jsxs)(_index5.KeyboardAwareScrollView,{ref:I,refreshControl:w,onScroll:G,scrollEventThrottle:SCROLL_EVENT_THROTTLE,onLayout:ee,onContentSizeChange:te,safeAreaEdges:Z,style:S.flex,contentContainerStyle:[{paddingTop:V},g],children:[l,v>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{height:v}}):null]})}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:[S.flex,{paddingLeft:Y,paddingRight:J,paddingBottom:(A?0:Q)+v},g],children:l});const oe=A?(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardStickyView,{style:[S.footer,{paddingLeft:Y,paddingRight:J,paddingBottom:Q+v}],children:d}):null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:R,style:[S.root,{paddingTop:X}],children:[k?null:$,re,oe,void 0!==_?l:null,k?$:null,f?(0,_jsxRuntime.jsx)(_index6.KeyboardToolbar,{}):null]})}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Screen=Screen;var _react=require("react"),_reactNative=require("react-native"),_reactNativeKeyboardController=require("react-native-keyboard-controller"),_reactNativeReanimated=require("react-native-reanimated"),_reactNativeSafeAreaContext=require("react-native-safe-area-context"),_useRefreshControl=require("../../hooks/useRefreshControl.js"),_index=require("../../theme/index.js"),_index2=require("../AppBar/index.js"),_index3=require("../AsyncBlock/index.js"),_index4=require("../EmptyState/index.js"),_index5=require("../KeyboardAwareScrollView/index.js"),_index6=require("../KeyboardToolbar/index.js"),_index7=require("../PagedListFooter/index.js"),_ScrollHost=require("./ScrollHost.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{};function renderFooter(e){return(0,_react.isValidElement)(e)?e:e?(0,_react.createElement)(e):null}const buildStyles=e=>_reactNative.StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},footer:{backgroundColor:e.colors.bg,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});function Screen(e){const{title:t,subtitle:r,largeTitle:o=!0,onBack:n,rightActions:a,leading:i,children:l,onRefresh:s,refreshing:c=!1,footer:d,scroll:u=!0,list:_,edges:f=DEFAULT_EDGES,keyboardToolbar:x=!0,bottomInset:m=0,gutter:v,floatingAction:h,scrollRef:g,onScroll:p,contentContainerStyle:y,testID:R}=e,S=(0,_index.useTheme)(),b=v??void 0===_,j=S.space[S.components.screen.gutter],C=b?j:0,E=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)(),T=(0,_react.useMemo)(()=>buildStyles(S),[S]),[L]=(0,_react.useState)(()=>new _reactNative.Animated.Value(0)),[N,k]=(0,_react.useState)(0),[A,V]=(0,_react.useState)(0),q=void 0!==n,O=(0,_react.useRef)(n);O.current=n;const w=Boolean(t||r||n||i||a?.length),B=o&&void 0!==t,F=B&&(void 0!==_||u),H=F?N:0,M=void 0!==d,{refreshControl:D}=(0,_useRefreshControl.useRefreshControl)({onRefresh:s??noop,refreshing:c}),K=s?(0,_react.cloneElement)(D,{progressViewOffset:H}):void 0,P=(0,_reactNativeReanimated.useSharedValue)(0),z=(0,_reactNativeReanimated.useSharedValue)(0),I=(0,_reactNativeReanimated.useSharedValue)(0),W=(0,_reactNativeReanimated.useSharedValue)(0),G=(0,_react.useRef)(null),U=(0,_react.useRef)(0),Y=(0,_react.useRef)(0),J=(0,_react.useMemo)(()=>({top:P,bottom:z,offset:I,maxOffset:W,scrollTo:e=>{const t=G.current;t instanceof _reactNative.FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[P,z,I,W]),Q=(0,_react.useCallback)(e=>{G.current=e,"function"==typeof g?g(e):g&&(g.current=e)},[g]),X=(0,_react.useCallback)(()=>{W.value=Math.max(0,U.current-Y.current)},[W]),Z=(0,_react.useRef)(p);Z.current=p;const $=(0,_react.useMemo)(()=>_reactNative.Animated.event([{nativeEvent:{contentOffset:{y:L}}}],{useNativeDriver:!1,listener:e=>{I.value=e.nativeEvent.contentOffset.y,Z.current?.(e)}}),[L,I]),ee=(0,_react.useCallback)(e=>{const{height:t}=e.nativeEvent.layout;k(e=>Math.max(e,t))},[]),te=(0,_react.useCallback)(e=>{V(e.nativeEvent.layout.height)},[]);(0,_react.useEffect)(()=>{if(!q)return;const e=_reactNative.BackHandler.addEventListener("hardwareBackPress",()=>(O.current?.(),!0));return()=>e.remove()},[q]);const re=f.includes("left")?E.left:0,oe=f.includes("right")?E.right:0,ne=f.includes("bottom")?E.bottom:0,ae=f.includes("top")&&!w?E.top:0,ie=S.space[S.components["floating-action-button"]["bottom-offset"]],le=h?(0,_index.resolveFloatingActionButtonSize)(S,h.props.size??"md").diameter+ie+S.space.lg:0,se=M?Math.max(0,A-E.bottom):m,ce=h?(0,_react.cloneElement)(h,{bottomOffset:(h.props.bottomOffset??ie)+se}):null,de=f.filter(e=>"top"!==e&&!("bottom"===e&&M)),ue=w?(0,_jsxRuntime.jsx)(_reactNative.View,{style:F?T.overlay:void 0,onLayout:F?ee:void 0,children:(0,_jsxRuntime.jsx)(_index2.AppBar,{title:t,subtitle:r,variant:B?"large":"default",scrollY:F?L:void 0,onBack:n,rightActions:a,leading:i})}):null,fe=(0,_react.useCallback)(()=>{const e=G.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,r,o)=>{Y.current=o,P.value=t+H,z.value=t+o,X()})},[H,P,z,X]);(0,_react.useEffect)(()=>{fe()},[fe]);const xe=(0,_react.useCallback)((e,t)=>{U.current=t,X()},[X]);let me;if(void 0!==_){const{state:e,paging:t,...r}=_,handleEndReached=e=>{t?.hasMore&&!t.loadingMore&&null==t.errorMore&&t.loadMore(),r.onEndReached?.(e)},o=(0,_jsxRuntime.jsx)(_reactNative.FlatList,{keyboardShouldPersistTaps:"handled",onEndReachedThreshold:t?.5:void 0,...r,ref:Q,refreshControl:K,onScroll:$,onLayout:e=>{fe(),r.onLayout?.(e)},onContentSizeChange:(e,t)=>{xe(e,t),r.onContentSizeChange?.(e,t)},onEndReached:t?handleEndReached:r.onEndReached,ListEmptyComponent:e?.empty?(0,_jsxRuntime.jsx)(_index4.EmptyState,{...e.empty}):void 0,ListFooterComponent:t||r.ListFooterComponent?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[renderFooter(r.ListFooterComponent),t?(0,_jsxRuntime.jsx)(_index7.PagedListFooter,{paging:t}):null]}):void 0,scrollEventThrottle:SCROLL_EVENT_THROTTLE,style:T.flex,contentContainerStyle:[{paddingTop:H,paddingLeft:re+C,paddingRight:oe+C},{paddingBottom:(M?0:ne)+m+le},r.contentContainerStyle,y]});me=(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext.Provider,{value:J,children:e?(0,_jsxRuntime.jsx)(_index3.AsyncBlock,{loading:e.loading,error:e.error,errorTitle:e.errorTitle,onRetry:e.onRetry,skeleton:e.skeleton,style:[T.flex,{paddingTop:H}],children:o}):o})}else me=u?(0,_jsxRuntime.jsx)(_ScrollHost.ScrollHostContext.Provider,{value:J,children:(0,_jsxRuntime.jsxs)(_index5.KeyboardAwareScrollView,{ref:Q,refreshControl:K,onScroll:$,scrollEventThrottle:SCROLL_EVENT_THROTTLE,onLayout:fe,onContentSizeChange:xe,safeAreaEdges:de,style:T.flex,contentContainerStyle:[{paddingTop:H,paddingHorizontal:C},y],children:[l,m+le>0?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{height:m+le}}):null]})}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:[T.flex,{paddingLeft:re+C,paddingRight:oe+C,paddingBottom:(M?0:ne)+m+le},y],children:l});const ve=M?(0,_jsxRuntime.jsx)(_reactNativeKeyboardController.KeyboardStickyView,{onLayout:te,style:[T.footer,{paddingLeft:re+j,paddingRight:oe+j,paddingBottom:ne+m}],children:d}):null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:R,style:[T.root,{paddingTop:ae}],children:[F?null:ue,me,ve,ce,void 0!==_?l:null,F?ue:null,x?(0,_jsxRuntime.jsx)(_index6.KeyboardToolbar,{}):null]})}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lightTokens=exports.darkTokens=exports.WEIGHT_NAMES=exports.TEXT_NAMES=exports.SPACE_NAMES=exports.SIZE_NAMES=exports.SHADOW_NAMES=exports.RADIUS_NAMES=exports.LETTER_SPACING_NAMES=exports.LEADING_NAMES=exports.FONT_NAMES=exports.EASE_NAMES=exports.DURATION_NAMES=exports.COMPONENT_KINDS=exports.COLOR_NAMES=void 0;const COLOR_NAMES=exports.COLOR_NAMES=["bg","bg-subtle","bg-muted","surface","surface-inverse","surface-dark","surface-dark-border","on-surface-dark","on-surface-dark-muted","text","text-body","text-muted","text-subtle","text-inverse","link","border","border-subtle","field-bg","field-border","field-border-focus","focus-ring","scrim","on-scrim","thumb","primary","primary-hover","primary-soft","primary-text","on-primary","primary-wash","primary-wash-strong","neutral","neutral-hover","neutral-text","on-neutral","success","success-soft","success-text","on-success","warning","warning-soft","warning-text","on-warning","danger","danger-soft","danger-border","danger-text","on-danger","info","info-soft","info-text","on-info","primary-pressed","on-neutral-strong","text-disabled","surface-pressed","surface-hover","surface-selected","surface-disabled","skeleton","skeleton-highlight","glass-fill","glass-border","on-glass","glass-badge","field-bg-focus","field-bg-disabled","field-border-error","field-label","field-text","field-text-disabled","field-placeholder","field-placeholder-disabled","field-icon","field-icon-focus","field-icon-disabled","field-caret","field-message","avatar-1","avatar-2","avatar-3","avatar-4","avatar-5","avatar-6","avatar-7","avatar-8"],SPACE_NAMES=exports.SPACE_NAMES=["none","xxs","xs","sm","md","lg","xl","2xl","3xl","4xl"],RADIUS_NAMES=exports.RADIUS_NAMES=["none","sm","md","lg","xl","pill"],TEXT_NAMES=exports.TEXT_NAMES=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl"],WEIGHT_NAMES=exports.WEIGHT_NAMES=["normal","medium","semibold","bold"],LEADING_NAMES=exports.LEADING_NAMES=["heading","body","display"],LETTER_SPACING_NAMES=exports.LETTER_SPACING_NAMES=["tight","normal","wide"],FONT_NAMES=exports.FONT_NAMES=["ui","display","mono"],SHADOW_NAMES=exports.SHADOW_NAMES=["card","elevated","popover","modal","drawer"],DURATION_NAMES=exports.DURATION_NAMES=["instant","fast","default","slow","slower"],EASE_NAMES=exports.EASE_NAMES=["in-out","accelerate","decelerate","sharp"],SIZE_NAMES=exports.SIZE_NAMES=["border"],COMPONENT_KINDS=exports.COMPONENT_KINDS={field:{radius:"radius","padding-x":"space","padding-y":"space","min-height":"px",text:"text",icon:"px","label-text":"text","label-gap":"space","message-text":"text","message-gap":"space"},press:{opacity:"number"},disabled:{opacity:"number"},button:{"padding-x":"space","padding-y":"space","min-height":"px",text:"text",radius:"radius",icon:"px","badge-icon":"px"},input:{"multiline-min-height":"px"},"search-bar":{radius:"radius"},"empty-state":{icon:"px","illustration-size":"px","title-text":"text","description-text":"text","padding-y":"space","title-gap":"space","description-gap":"space"},"list-item":{"padding-y":"space","title-text":"text","subtitle-text":"text","min-height":"px"},badge:{text:"text","min-width":"px",height:"px","padding-x":"space","dot-size":"px","border-width":"px","anchor-offset":"px"},chip:{"padding-x":"space","padding-y":"space",text:"text","min-height":"px","close-size":"px","close-text":"text",gap:"space",icon:"px"},checkbox:{"box-size":"px","label-gap":"space"},radio:{outer:"px",inner:"px","label-gap":"space"},switch:{"track-width":"px","track-height":"px","thumb-size":"px",padding:"space"},"otp-input":{cell:"px",text:"text",radius:"radius",gap:"space"},"segmented-control":{height:"px",text:"text","padding-x":"space",icon:"px","track-padding":"space","underline-height":"px","pill-inset":"space"},tabs:{text:"text","padding-y":"space","padding-x":"space","scrollable-padding-x":"space",icon:"px","icon-gap":"space","track-padding":"space","underline-height":"px","pill-inset":"space","disabled-opacity":"number","badge-gap":"space"},slider:{"track-height":"px","thumb-diameter":"px"},"floating-action-button":{diameter:"px",icon:"px",text:"text","label-padding-x":"space","edge-offset":"space","bottom-offset":"space","secondary-gap":"space","stagger-ms":"ms"},dialog:{"icon-wrapper-size":"px","action-button-min-height":"px"},toast:{"icon-circle-size":"px","icon-glyph-text":"text","tint-bar-width":"px","action-min-height":"px"},banner:{"tint-bar-width":"px"}},lightTokens=exports.lightTokens={mode:"light",colors:{bg:"#ffffff","bg-subtle":"#f8f8fb","bg-muted":"#f1f1f5",surface:"#ffffff","surface-inverse":"#0f0f1a","surface-dark":"#071437","surface-dark-border":"#2a3553","on-surface-dark":"#ffffff","on-surface-dark-muted":"#babdc7",text:"#252f4a","text-body":"#0f0f1a","text-muted":"#52525b","text-subtle":"#62626b","text-inverse":"#ffffff",link:"#5b5bd6",border:"#e5e5ec","border-subtle":"#efeff3","field-bg":"#f9fbfc","field-border":"#ebedf3","field-border-focus":"#bed2f9","focus-ring":"#5b5bd6",scrim:"#0f0f1a80","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#5b5bd6","primary-hover":"#4f4fbf","primary-soft":"#eeeefc","primary-text":"#4f4fd3","on-primary":"#ffffff","primary-wash":"#5b5bd614","primary-wash-strong":"#5b5bd633",neutral:"#f4f4f8","neutral-hover":"#e9e9f0","neutral-text":"#52525b","on-neutral":"#0f0f1a",success:"#18864f","success-soft":"#e8faee","success-text":"#147042","on-success":"#ffffff",warning:"#f59e0b","warning-soft":"#fff8e6","warning-text":"#8f5c06","on-warning":"#0f0f1a",danger:"#e12c32","danger-soft":"#ffeaef","danger-border":"#e5484d","danger-text":"#bc1b20","on-danger":"#ffffff",info:"#1b6ef5","info-soft":"#e9f3ff","info-text":"#0958d9","on-info":"#ffffff","primary-pressed":"#4040a8","on-neutral-strong":"#ffffff","text-disabled":"#b4b4bb","surface-pressed":"#0f0f1a0f","surface-hover":"#0f0f1a0a","surface-selected":"#5b5bd61a","surface-disabled":"#f1f1f5",skeleton:"#ebedf3","skeleton-highlight":"#f5f6fa","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#ffffff","field-bg-disabled":"#f5f6fa","field-border-error":"#fdbfce","field-label":"#242f4a","field-text":"#252f4a","field-text-disabled":"#c4cada","field-placeholder":"#626d8b","field-placeholder-disabled":"#c4cada","field-icon":"#7a849f","field-icon-focus":"#4b5675","field-icon-disabled":"#c4cada","field-caret":"#5b8dee","field-message":"#d81736","avatar-1":"#5b5bd6","avatar-2":"#0a7979","avatar-3":"#a45a05","avatar-4":"#cd226e","avatar-5":"#2462eb","avatar-6":"#7c3aed","avatar-7":"#047c57","avatar-8":"#d42222"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11},sm:{size:13},base:{size:15},lg:{size:17},xl:{size:20},"2xl":{size:24},"3xl":{size:30},"4xl":{size:36},"5xl":{size:45},"6xl":{size:57},"7xl":{size:64},"8xl":{size:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{heading:1.2,body:1.4,display:1.2},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.059,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.078,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.102,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"illustration-size":96,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"illustration-size":160,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"illustration-size":240,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0}}},darkTokens=exports.darkTokens={mode:"dark",colors:{bg:"#0b0b12","bg-subtle":"#13131c","bg-muted":"#1c1c26",surface:"#1c1c26","surface-inverse":"#fafafa","surface-dark":"#071437","surface-dark-border":"#2a3553","on-surface-dark":"#ffffff","on-surface-dark-muted":"#babdc7",text:"#e2e2e2","text-body":"#fafafa","text-muted":"#b4b4bb","text-subtle":"#919199","text-inverse":"#0f0f1a",link:"#9292ee",border:"#27272f","border-subtle":"#1c1c26","field-bg":"#13131c","field-border":"#27272f","field-border-focus":"#3d5fb0","focus-ring":"#7c7ce8",scrim:"#000000a6","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#7c7ce8","primary-hover":"#9292ee","primary-soft":"#1f1f3d","primary-text":"#8989ea","on-primary":"#0f0f1a","primary-wash":"#7c7ce814","primary-wash-strong":"#7c7ce833",neutral:"#1f1f26","neutral-hover":"#2a2a33","neutral-text":"#b4b4bb","on-neutral":"#fafafa",success:"#30c780","success-soft":"#04b4402e","success-text":"#30c780","on-success":"#0f0f1a",warning:"#fbbf24","warning-soft":"#dfa0002e","warning-text":"#fbbf24","on-warning":"#0f0f1a",danger:"#f87171","danger-soft":"#e826462e","danger-border":"#f87171","danger-text":"#f87171","on-danger":"#0f0f1a",info:"#60a5fa","info-soft":"#056ee92e","info-text":"#60a5fa","on-info":"#0f0f1a","primary-pressed":"#a8a8f2","on-neutral-strong":"#0f0f1a","text-disabled":"#52525b","surface-pressed":"#ffffff14","surface-hover":"#ffffff0d","surface-selected":"#7c7ce82e","surface-disabled":"#1c1c26",skeleton:"#1c1c26","skeleton-highlight":"#27272f","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#0b0b12","field-bg-disabled":"#1c1c26","field-border-error":"#8a2f42","field-label":"#e4e6ee","field-text":"#fafafa","field-text-disabled":"#52525b","field-placeholder":"#84848d","field-placeholder-disabled":"#52525b","field-icon":"#8b8b95","field-icon-focus":"#d4d4db","field-icon-disabled":"#52525b","field-caret":"#7c9ef0","field-message":"#f87171","avatar-1":"#8b8bee","avatar-2":"#2dd4bf","avatar-3":"#fcd34d","avatar-4":"#f472b6","avatar-5":"#60a5fa","avatar-6":"#a78bfa","avatar-7":"#34d399","avatar-8":"#f87171"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11},sm:{size:13},base:{size:15},lg:{size:17},xl:{size:20},"2xl":{size:24},"3xl":{size:30},"4xl":{size:36},"5xl":{size:45},"6xl":{size:57},"7xl":{size:64},"8xl":{size:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{heading:1.2,body:1.4,display:1.2},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.502,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.549,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"illustration-size":96,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"illustration-size":160,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"illustration-size":240,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lightTokens=exports.darkTokens=exports.WEIGHT_NAMES=exports.TEXT_NAMES=exports.SPACE_NAMES=exports.SIZE_NAMES=exports.SHADOW_NAMES=exports.RADIUS_NAMES=exports.LETTER_SPACING_NAMES=exports.LEADING_NAMES=exports.FONT_NAMES=exports.EASE_NAMES=exports.DURATION_NAMES=exports.COMPONENT_KINDS=exports.COLOR_NAMES=void 0;const COLOR_NAMES=exports.COLOR_NAMES=["bg","bg-subtle","bg-muted","surface","surface-inverse","surface-dark","surface-dark-border","on-surface-dark","on-surface-dark-muted","text","text-body","text-muted","text-subtle","text-inverse","link","border","border-subtle","field-bg","field-border","field-border-focus","focus-ring","scrim","on-scrim","thumb","primary","primary-hover","primary-soft","primary-text","on-primary","primary-wash","primary-wash-strong","neutral","neutral-hover","neutral-text","on-neutral","success","success-soft","success-text","on-success","warning","warning-soft","warning-text","on-warning","danger","danger-soft","danger-border","danger-text","on-danger","info","info-soft","info-text","on-info","primary-pressed","on-neutral-strong","text-disabled","surface-pressed","surface-hover","surface-selected","surface-disabled","skeleton","skeleton-highlight","glass-fill","glass-border","on-glass","glass-badge","field-bg-focus","field-bg-disabled","field-border-error","field-label","field-text","field-text-disabled","field-placeholder","field-placeholder-disabled","field-icon","field-icon-focus","field-icon-disabled","field-caret","field-message","avatar-1","avatar-2","avatar-3","avatar-4","avatar-5","avatar-6","avatar-7","avatar-8"],SPACE_NAMES=exports.SPACE_NAMES=["none","xxs","xs","sm","md","lg","xl","2xl","3xl","4xl"],RADIUS_NAMES=exports.RADIUS_NAMES=["none","sm","md","lg","xl","pill"],TEXT_NAMES=exports.TEXT_NAMES=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl"],WEIGHT_NAMES=exports.WEIGHT_NAMES=["normal","medium","semibold","bold"],LEADING_NAMES=exports.LEADING_NAMES=["heading","body","display"],LETTER_SPACING_NAMES=exports.LETTER_SPACING_NAMES=["tight","normal","wide"],FONT_NAMES=exports.FONT_NAMES=["ui","display","mono"],SHADOW_NAMES=exports.SHADOW_NAMES=["card","elevated","popover","modal","drawer"],DURATION_NAMES=exports.DURATION_NAMES=["instant","fast","default","slow","slower"],EASE_NAMES=exports.EASE_NAMES=["in-out","accelerate","decelerate","sharp"],SIZE_NAMES=exports.SIZE_NAMES=["border"],COMPONENT_KINDS=exports.COMPONENT_KINDS={field:{radius:"radius","padding-x":"space","padding-y":"space","min-height":"px",text:"text",icon:"px","label-text":"text","label-gap":"space","message-text":"text","message-gap":"space"},press:{opacity:"number"},disabled:{opacity:"number"},button:{"padding-x":"space","padding-y":"space","min-height":"px",text:"text",radius:"radius",icon:"px","badge-icon":"px"},input:{"multiline-min-height":"px"},"search-bar":{radius:"radius"},"empty-state":{icon:"px","illustration-size":"px","title-text":"text","description-text":"text","padding-y":"space","title-gap":"space","description-gap":"space"},"list-item":{"padding-y":"space","title-text":"text","subtitle-text":"text","min-height":"px"},badge:{text:"text","min-width":"px",height:"px","padding-x":"space","dot-size":"px","border-width":"px","anchor-offset":"px"},chip:{"padding-x":"space","padding-y":"space",text:"text","min-height":"px","close-size":"px","close-text":"text",gap:"space",icon:"px"},checkbox:{"box-size":"px","label-gap":"space"},radio:{outer:"px",inner:"px","label-gap":"space"},switch:{"track-width":"px","track-height":"px","thumb-size":"px",padding:"space"},"otp-input":{cell:"px",text:"text",radius:"radius",gap:"space"},"segmented-control":{height:"px",text:"text","padding-x":"space",icon:"px","track-padding":"space","underline-height":"px","pill-inset":"space"},tabs:{text:"text","padding-y":"space","padding-x":"space","scrollable-padding-x":"space",icon:"px","icon-gap":"space","track-padding":"space","underline-height":"px","pill-inset":"space","disabled-opacity":"number","badge-gap":"space"},slider:{"track-height":"px","thumb-diameter":"px"},"floating-action-button":{diameter:"px",icon:"px",text:"text","label-padding-x":"space","edge-offset":"space","bottom-offset":"space","secondary-gap":"space","stagger-ms":"ms"},dialog:{"icon-wrapper-size":"px","action-button-min-height":"px"},toast:{"icon-circle-size":"px","icon-glyph-text":"text","tint-bar-width":"px","action-min-height":"px"},banner:{"tint-bar-width":"px"},screen:{gutter:"space"}},lightTokens=exports.lightTokens={mode:"light",colors:{bg:"#ffffff","bg-subtle":"#f8f8fb","bg-muted":"#f1f1f5",surface:"#ffffff","surface-inverse":"#0f0f1a","surface-dark":"#071437","surface-dark-border":"#2a3553","on-surface-dark":"#ffffff","on-surface-dark-muted":"#babdc7",text:"#252f4a","text-body":"#0f0f1a","text-muted":"#52525b","text-subtle":"#62626b","text-inverse":"#ffffff",link:"#5b5bd6",border:"#e5e5ec","border-subtle":"#efeff3","field-bg":"#f9fbfc","field-border":"#ebedf3","field-border-focus":"#bed2f9","focus-ring":"#5b5bd6",scrim:"#0f0f1a80","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#5b5bd6","primary-hover":"#4f4fbf","primary-soft":"#eeeefc","primary-text":"#4f4fd3","on-primary":"#ffffff","primary-wash":"#5b5bd614","primary-wash-strong":"#5b5bd633",neutral:"#f4f4f8","neutral-hover":"#e9e9f0","neutral-text":"#52525b","on-neutral":"#0f0f1a",success:"#18864f","success-soft":"#e8faee","success-text":"#147042","on-success":"#ffffff",warning:"#f59e0b","warning-soft":"#fff8e6","warning-text":"#8f5c06","on-warning":"#0f0f1a",danger:"#e12c32","danger-soft":"#ffeaef","danger-border":"#e5484d","danger-text":"#bc1b20","on-danger":"#ffffff",info:"#1b6ef5","info-soft":"#e9f3ff","info-text":"#0958d9","on-info":"#ffffff","primary-pressed":"#4040a8","on-neutral-strong":"#ffffff","text-disabled":"#b4b4bb","surface-pressed":"#0f0f1a0f","surface-hover":"#0f0f1a0a","surface-selected":"#5b5bd61a","surface-disabled":"#f1f1f5",skeleton:"#ebedf3","skeleton-highlight":"#f5f6fa","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#ffffff","field-bg-disabled":"#f5f6fa","field-border-error":"#fdbfce","field-label":"#242f4a","field-text":"#252f4a","field-text-disabled":"#7a8197","field-placeholder":"#626d8b","field-placeholder-disabled":"#7a8197","field-icon":"#7a849f","field-icon-focus":"#4b5675","field-icon-disabled":"#c4cada","field-caret":"#5b8dee","field-message":"#d81736","avatar-1":"#5b5bd6","avatar-2":"#0a7979","avatar-3":"#a45a05","avatar-4":"#cd226e","avatar-5":"#2462eb","avatar-6":"#7c3aed","avatar-7":"#047c57","avatar-8":"#d42222"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11},sm:{size:13},base:{size:15},lg:{size:17},xl:{size:20},"2xl":{size:24},"3xl":{size:30},"4xl":{size:36},"5xl":{size:45},"6xl":{size:57},"7xl":{size:64},"8xl":{size:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{heading:1.2,body:1.4,display:1.2},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.059,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.078,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.102,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"illustration-size":96,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"illustration-size":160,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"illustration-size":240,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0},screen:{gutter:"lg"}}},darkTokens=exports.darkTokens={mode:"dark",colors:{bg:"#0b0b12","bg-subtle":"#13131c","bg-muted":"#1c1c26",surface:"#1c1c26","surface-inverse":"#fafafa","surface-dark":"#071437","surface-dark-border":"#2a3553","on-surface-dark":"#ffffff","on-surface-dark-muted":"#babdc7",text:"#e2e2e2","text-body":"#fafafa","text-muted":"#b4b4bb","text-subtle":"#919199","text-inverse":"#0f0f1a",link:"#9292ee",border:"#27272f","border-subtle":"#1c1c26","field-bg":"#13131c","field-border":"#27272f","field-border-focus":"#3d5fb0","focus-ring":"#7c7ce8",scrim:"#000000a6","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#7c7ce8","primary-hover":"#9292ee","primary-soft":"#1f1f3d","primary-text":"#8989ea","on-primary":"#0f0f1a","primary-wash":"#7c7ce814","primary-wash-strong":"#7c7ce833",neutral:"#1f1f26","neutral-hover":"#2a2a33","neutral-text":"#b4b4bb","on-neutral":"#fafafa",success:"#30c780","success-soft":"#04b4402e","success-text":"#30c780","on-success":"#0f0f1a",warning:"#fbbf24","warning-soft":"#dfa0002e","warning-text":"#fbbf24","on-warning":"#0f0f1a",danger:"#f87171","danger-soft":"#e826462e","danger-border":"#f87171","danger-text":"#f87171","on-danger":"#0f0f1a",info:"#60a5fa","info-soft":"#056ee92e","info-text":"#60a5fa","on-info":"#0f0f1a","primary-pressed":"#a8a8f2","on-neutral-strong":"#0f0f1a","text-disabled":"#52525b","surface-pressed":"#ffffff14","surface-hover":"#ffffff0d","surface-selected":"#7c7ce82e","surface-disabled":"#1c1c26",skeleton:"#1c1c26","skeleton-highlight":"#27272f","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#0b0b12","field-bg-disabled":"#1c1c26","field-border-error":"#8a2f42","field-label":"#e4e6ee","field-text":"#fafafa","field-text-disabled":"#71717a","field-placeholder":"#84848d","field-placeholder-disabled":"#71717a","field-icon":"#8b8b95","field-icon-focus":"#d4d4db","field-icon-disabled":"#52525b","field-caret":"#7c9ef0","field-message":"#f87171","avatar-1":"#8b8bee","avatar-2":"#2dd4bf","avatar-3":"#fcd34d","avatar-4":"#f472b6","avatar-5":"#60a5fa","avatar-6":"#a78bfa","avatar-7":"#34d399","avatar-8":"#f87171"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11},sm:{size:13},base:{size:15},lg:{size:17},xl:{size:20},"2xl":{size:24},"3xl":{size:30},"4xl":{size:36},"5xl":{size:45},"6xl":{size:57},"7xl":{size:64},"8xl":{size:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{heading:1.2,body:1.4,display:1.2},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.502,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.549,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"illustration-size":96,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"illustration-size":160,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"illustration-size":240,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0},screen:{gutter:"lg"}}};
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useEffect,useMemo,useRef,useState}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{IconBadge}from"../IconBadge/index.js";import{Skeleton,SkeletonText}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_BANNER_LABELS=Object.freeze({dismiss:"Dismiss banner"});const Banner=forwardRef((e,t)=>{const{title:r,message:o,tone:n="neutral",variant:s="bar",icon:i,actions:a,dismissible:l=!1,onClose:c,haptic:d,visible:u=!0,animateMount:m=!0,loading:p=!1,accessibilityRole:g="alert",accessibilityLabel:h,labels:y,style:x,containerStyle:b,iconCircleStyle:f,tintBarStyle:w,closeButtonStyle:j,actionButtonStyle:S,testID:B}=e;warnInvalidValue("Banner","tone",e.tone,["primary","success","warning","danger","info","neutral"]),warnInvalidValue("Banner","variant",e.variant,["bar","wash","tint"]),warnInvalidValue("Banner","accessibilityRole",e.accessibilityRole,["alert","summary","none"]);const v=useTheme(),k=usePresenceMotion(),_=useMemo(()=>buildStyles(v),[v]),C=useMemo(()=>tintFor(v,n),[v,n]),I=useMemo(()=>({...DEFAULT_BANNER_LABELS,...y}),[y]),[R,V]=k.range(-20,0),A=useRef(createAnimatedValue(m&&u?R:0)).current,T=useRef(createAnimatedValue(m&&u?0:u?1:0)).current,[L,D]=useState(u),H=useRef(!0);if(useEffect(()=>{if(H.current&&(H.current=!1,!m))return;let e;return u?(D(!0),e=Animated.parallel([Animated.timing(A,{toValue:V,duration:v.motion.duration.default,useNativeDriver:!0}),Animated.timing(T,{toValue:1,duration:k.duration("default"),useNativeDriver:!0})]),e.start()):L&&(e=Animated.parallel([Animated.timing(A,{toValue:R,duration:v.motion.duration.fast,useNativeDriver:!0}),Animated.timing(T,{toValue:0,duration:k.duration("fast"),useNativeDriver:!0})]),e.start(()=>{D(!1)})),()=>e?.stop()},[u]),!L)return null;const E=r??" ",M="string"==typeof o?o??" ":"",N="wash"===s,z="bar"!==s,P="alert"===g?"danger"===n?"assertive":"polite":"none",W=_jsxs(Animated.View,{ref:t,accessibilityRole:g,accessibilityLiveRegion:P,accessibilityLabel:h,testID:B,style:[_.container,{backgroundColor:z?C.soft:v.colors["bg-subtle"],borderRadius:N?v.radius.sm:v.radius.md,...smoothCorners,padding:v.space.md,opacity:T,transform:[{translateY:A}]},x,b],children:[!N&&v.components.banner["tint-bar-width"]>0?_jsx(View,{style:[_.tintBar,{backgroundColor:C.bar},w]}):null,_jsxs(View,{style:_.row,children:[!1===i?null:i?_jsx(View,{style:_.iconWrap,children:renderSlotIcon(i,{color:C.ink,size:v.text.xl.size,disabled:!1})}):_jsx(IconBadge,{dimension:ICON_CIRCLE_SIZE,color:C.bar,icon:_jsx(Text,{variant:"body",weight:"bold",accessible:!1,style:[_.iconGlyph,{color:C.ink}],children:C.glyph}),style:[_.iconCircle,f]}),_jsxs(View,{style:_.textBlock,children:[r||p?_jsx(Text,{variant:"body",weight:"semibold",numberOfLines:2,style:{lineHeight:20,...N?{color:C.ink}:null},children:E}):null,"string"==typeof o||p?_jsx(Text,{variant:"bodySmall",color:"secondary",style:{lineHeight:18,marginTop:r?v.space.xxs:0},children:M||" "}):_jsx(View,{style:{marginTop:r?v.space.xxs:0},children:o})]}),l?_jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:I.dismiss,onPress:()=>{const e=resolveHaptic(d,"selection");e&&triggerHaptic(e),c?.()},hitSlop:8,...hitSlopMarker(8),style:({pressed:e})=>[_.closeBtn,{backgroundColor:e?v.colors["surface-pressed"]:"transparent"},j],children:_jsx(Text,{variant:"title",weight:"bold",color:"secondary",accessible:!1,style:{lineHeight:17},children:"×"})}):null]}),a&&a.length>0?_jsx(View,{style:_.actionsRow,children:a.map((e,t)=>{warnInvalidValue("Banner","action.tone",e.tone,["primary","success","warning","danger","info","neutral"]),warnInvalidValue("Banner","action.variant",e.variant,["solid","outline","ghost"]),warnInvalidValue("Banner","action.size",e.size,["sm","md"]);const r=e.tone??"primary",o=e.variant??"ghost",n="primary"===r?C.glyphColor:"neutral"===r?v.colors["text-muted"]:v.colors[r],s="primary"===r?C.ink:"neutral"===r?v.colors["text-muted"]:v.colors[`${r}-text`],i="primary"===r?C.on:"neutral"===r?v.colors["on-neutral-strong"]:v.colors[`on-${r}`],a="solid"===o;return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:e.label,testID:e.testID,onPress:()=>{const t=resolveHaptic(d,"selection");t&&triggerHaptic(t),e.onPress()},style:({pressed:t})=>[_.actionBtn,"md"===e.size&&_.actionBtnMd,"outline"===o&&{borderWidth:1,borderColor:s},{backgroundColor:a?n:t?v.colors["surface-pressed"]:"transparent",opacity:a&&t?.85:1},S],children:_jsx(Text,{variant:"bodySmall",weight:"semibold",align:"center",style:{color:a?i:s},children:e.label})},`${e.label}-${t}`)})}):null]});return p?_jsx(BannerSkeleton,{...e}):W});Banner.displayName="Banner";const BannerSkeleton=({title:e,actions:t,icon:r,containerStyle:o,style:n})=>{const s=useTheme(),i=!1!==r;return _jsxs(View,{style:[{flexDirection:"row",alignItems:"flex-start",backgroundColor:s.colors.surface,borderRadius:s.radius.md,...smoothCorners,padding:s.space.md,borderWidth:1,borderColor:s.colors.border},o,n],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:[i?_jsx(View,{style:{marginRight:s.space.sm},children:_jsx(Skeleton,{shape:"circle",width:32,height:32})}):null,_jsxs(View,{style:{flex:1},children:[void 0!==e?_jsx(Skeleton,{shape:"text",width:"55%",height:16,style:{marginBottom:s.space.xs}}):null,_jsx(SkeletonText,{lines:2,fontSize:s.text.sm.size,lastLineWidth:"70%"}),t&&t.length>0?_jsx(View,{style:{flexDirection:"row",marginTop:s.space.sm},children:t.map((e,t)=>_jsx(Skeleton,{width:72,height:28,shape:"rounded",style:{marginRight:s.space.sm}},`sk-banner-action-${t}`))}):null]})]})};BannerSkeleton.displayName="BannerSkeleton",Banner.Skeleton=BannerSkeleton;const tintFor=(e,t)=>{switch(t){case"success":return{soft:e.colors["success-soft"],bar:e.colors.success,glyphColor:e.colors.success,ink:e.colors["success-text"],on:e.colors["on-success"],glyph:"✓"};case"warning":return{soft:e.colors["warning-soft"],bar:e.colors.warning,glyphColor:e.colors.warning,ink:e.colors["warning-text"],on:e.colors["on-warning"],glyph:"⚠"};case"danger":return{soft:e.colors["danger-soft"],bar:e.colors.danger,glyphColor:e.colors.danger,ink:e.colors["danger-text"],on:e.colors["on-danger"],glyph:"✗"};case"neutral":return{soft:e.colors["bg-subtle"],bar:e.colors["text-subtle"],glyphColor:e.colors["text-muted"],ink:e.colors["text-muted"],on:e.colors["on-neutral-strong"],glyph:"i"};case"primary":return{soft:e.colors["primary-soft"],bar:e.colors.primary,glyphColor:e.colors.primary,ink:e.colors["primary-text"],on:e.colors["on-primary"],glyph:"i"};case"info":return{soft:e.colors["info-soft"],bar:e.colors.info,glyphColor:e.colors.info,ink:e.colors["info-text"],on:e.colors["on-info"],glyph:"i"};default:return tintFor(e,"neutral")}},ICON_CIRCLE_SIZE=28,buildStyles=e=>{const t=e.components.banner,r=e.space.sm;return StyleSheet.create({container:{overflow:"hidden",paddingLeft:e.space.md},tintBar:{position:"absolute",left:0,top:0,bottom:0,width:t["tint-bar-width"]},row:{flexDirection:"row",alignItems:"flex-start"},iconWrap:{marginRight:r},iconCircle:{marginRight:r},iconGlyph:{lineHeight:17},textBlock:{flex:1,paddingRight:e.space.xs},closeBtn:{width:28,height:28,borderRadius:e.radius.pill,...smoothCorners,alignItems:"center",justifyContent:"center",marginLeft:e.space.xxs},actionsRow:{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",marginTop:e.space.xs,columnGap:e.space.xs,rowGap:e.space.xs},actionBtn:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xs,borderRadius:e.radius.sm,...smoothCorners,maxWidth:"100%",alignItems:"center",justifyContent:"center"},actionBtnMd:{minHeight:44,paddingHorizontal:e.space.md}})};export{Banner};export default Banner;
1
+ "use strict";import{forwardRef,useEffect,useMemo,useRef,useState}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{IconBadge}from"../IconBadge/index.js";import{Skeleton,SkeletonText}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_BANNER_LABELS=Object.freeze({dismiss:"Dismiss banner"});const Banner=forwardRef((e,t)=>{const{title:r,message:o,tone:n="neutral",variant:s="bar",icon:i,actions:a,dismissible:l=!1,onClose:c,haptic:d,visible:u=!0,animateMount:m=!0,loading:p=!1,accessibilityRole:g="alert",accessibilityLabel:h,labels:y,style:x,containerStyle:b,iconCircleStyle:f,tintBarStyle:w,closeButtonStyle:j,actionButtonStyle:S,testID:B}=e;warnInvalidValue("Banner","tone",e.tone,["primary","success","warning","danger","info","neutral"]),warnInvalidValue("Banner","variant",e.variant,["bar","wash","tint"]),warnInvalidValue("Banner","accessibilityRole",e.accessibilityRole,["alert","summary","none"]);const v=useTheme(),k=usePresenceMotion(),C=useMemo(()=>buildStyles(v),[v]),_=useMemo(()=>tintFor(v,n),[v,n]),I=useMemo(()=>({...DEFAULT_BANNER_LABELS,...y}),[y]),[R,V]=k.range(-20,0),A=useRef(createAnimatedValue(m&&u?R:0)).current,T=useRef(createAnimatedValue(m&&u?0:u?1:0)).current,[L,D]=useState(u),H=useRef(!0);if(useEffect(()=>{if(H.current&&(H.current=!1,!m))return;let e;return u?(D(!0),e=Animated.parallel([Animated.timing(A,{toValue:V,duration:v.motion.duration.default,useNativeDriver:!0}),Animated.timing(T,{toValue:1,duration:k.duration("default"),useNativeDriver:!0})]),e.start()):L&&(e=Animated.parallel([Animated.timing(A,{toValue:R,duration:v.motion.duration.fast,useNativeDriver:!0}),Animated.timing(T,{toValue:0,duration:k.duration("fast"),useNativeDriver:!0})]),e.start(()=>{D(!1)})),()=>e?.stop()},[u]),!L)return null;const E=r??" ",M="string"==typeof o?o??" ":"",N="wash"===s,z="bar"!==s,P="alert"===g?"danger"===n?"assertive":"polite":"none",W=_jsxs(Animated.View,{ref:t,accessibilityRole:g,accessibilityLiveRegion:P,accessibilityLabel:h,testID:B,style:[C.container,{backgroundColor:z?_.soft:v.colors["bg-subtle"],borderRadius:N?v.radius.sm:v.radius.md,...smoothCorners,padding:v.space.md,opacity:T,transform:[{translateY:A}]},x,b],children:[!N&&v.components.banner["tint-bar-width"]>0?_jsx(View,{style:[C.tintBar,{backgroundColor:_.bar},w]}):null,_jsxs(View,{style:[C.row,void 0===r&&C.rowCentred],children:[!1===i?null:i?_jsx(View,{style:C.iconWrap,children:renderSlotIcon(i,{color:_.ink,size:v.text.xl.size,disabled:!1})}):_jsx(IconBadge,{dimension:ICON_CIRCLE_SIZE,color:_.bar,icon:_jsx(Text,{variant:"body",weight:"bold",accessible:!1,style:[C.iconGlyph,{color:_.ink}],children:_.glyph}),style:[C.iconCircle,f]}),_jsxs(View,{style:C.textBlock,children:[r||p?_jsx(Text,{variant:"body",weight:"semibold",numberOfLines:2,style:{lineHeight:20,...N?{color:_.ink}:null},children:E}):null,"string"==typeof o||p?_jsx(Text,{variant:"bodySmall",color:"secondary",style:{lineHeight:18,marginTop:r?v.space.xxs:0},children:M||" "}):_jsx(View,{style:{marginTop:r?v.space.xxs:0},children:o})]}),l?_jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:I.dismiss,onPress:()=>{const e=resolveHaptic(d,"selection");e&&triggerHaptic(e),c?.()},hitSlop:8,...hitSlopMarker(8),style:({pressed:e})=>[C.closeBtn,{backgroundColor:e?v.colors["surface-pressed"]:"transparent"},j],children:_jsx(Text,{variant:"title",weight:"bold",color:"secondary",accessible:!1,style:{lineHeight:17},children:"×"})}):null]}),a&&a.length>0?_jsx(View,{style:C.actionsRow,children:a.map((e,t)=>{warnInvalidValue("Banner","action.tone",e.tone,["primary","success","warning","danger","info","neutral"]),warnInvalidValue("Banner","action.variant",e.variant,["solid","outline","ghost"]),warnInvalidValue("Banner","action.size",e.size,["sm","md"]);const r=e.tone??"primary",o=e.variant??"ghost",n="primary"===r?_.glyphColor:"neutral"===r?v.colors["text-muted"]:v.colors[r],s="primary"===r?_.ink:"neutral"===r?v.colors["text-muted"]:v.colors[`${r}-text`],i="primary"===r?_.on:"neutral"===r?v.colors["on-neutral-strong"]:v.colors[`on-${r}`],a="solid"===o;return _jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:e.label,testID:e.testID,onPress:()=>{const t=resolveHaptic(d,"selection");t&&triggerHaptic(t),e.onPress()},style:({pressed:t})=>[C.actionBtn,"md"===e.size&&C.actionBtnMd,"outline"===o&&{borderWidth:1,borderColor:s},{backgroundColor:a?n:t?v.colors["surface-pressed"]:"transparent",opacity:a&&t?.85:1},S],children:_jsx(Text,{variant:"bodySmall",weight:"semibold",align:"center",style:{color:a?i:s},children:e.label})},`${e.label}-${t}`)})}):null]});return p?_jsx(BannerSkeleton,{...e}):W});Banner.displayName="Banner";const BannerSkeleton=({title:e,actions:t,icon:r,containerStyle:o,style:n})=>{const s=useTheme(),i=!1!==r;return _jsxs(View,{style:[{flexDirection:"row",alignItems:"flex-start",backgroundColor:s.colors.surface,borderRadius:s.radius.md,...smoothCorners,padding:s.space.md,borderWidth:1,borderColor:s.colors.border},o,n],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:[i?_jsx(View,{style:{marginRight:s.space.sm},children:_jsx(Skeleton,{shape:"circle",width:32,height:32})}):null,_jsxs(View,{style:{flex:1},children:[void 0!==e?_jsx(Skeleton,{shape:"text",width:"55%",height:16,style:{marginBottom:s.space.xs}}):null,_jsx(SkeletonText,{lines:2,fontSize:s.text.sm.size,lastLineWidth:"70%"}),t&&t.length>0?_jsx(View,{style:{flexDirection:"row",marginTop:s.space.sm},children:t.map((e,t)=>_jsx(Skeleton,{width:72,height:28,shape:"rounded",style:{marginRight:s.space.sm}},`sk-banner-action-${t}`))}):null]})]})};BannerSkeleton.displayName="BannerSkeleton",Banner.Skeleton=BannerSkeleton;const tintFor=(e,t)=>{switch(t){case"success":return{soft:e.colors["success-soft"],bar:e.colors.success,glyphColor:e.colors.success,ink:e.colors["success-text"],on:e.colors["on-success"],glyph:"✓"};case"warning":return{soft:e.colors["warning-soft"],bar:e.colors.warning,glyphColor:e.colors.warning,ink:e.colors["warning-text"],on:e.colors["on-warning"],glyph:"⚠"};case"danger":return{soft:e.colors["danger-soft"],bar:e.colors.danger,glyphColor:e.colors.danger,ink:e.colors["danger-text"],on:e.colors["on-danger"],glyph:"✗"};case"neutral":return{soft:e.colors["bg-subtle"],bar:e.colors["text-subtle"],glyphColor:e.colors["text-muted"],ink:e.colors["text-muted"],on:e.colors["on-neutral-strong"],glyph:"i"};case"primary":return{soft:e.colors["primary-soft"],bar:e.colors.primary,glyphColor:e.colors.primary,ink:e.colors["primary-text"],on:e.colors["on-primary"],glyph:"i"};case"info":return{soft:e.colors["info-soft"],bar:e.colors.info,glyphColor:e.colors.info,ink:e.colors["info-text"],on:e.colors["on-info"],glyph:"i"};default:return tintFor(e,"neutral")}},ICON_CIRCLE_SIZE=28,buildStyles=e=>{const t=e.components.banner,r=e.space.sm;return StyleSheet.create({container:{overflow:"hidden",paddingLeft:e.space.md},tintBar:{position:"absolute",left:0,top:0,bottom:0,width:t["tint-bar-width"]},row:{flexDirection:"row",alignItems:"flex-start"},rowCentred:{alignItems:"center"},iconWrap:{marginRight:r},iconCircle:{marginRight:r},iconGlyph:{lineHeight:17},textBlock:{flex:1,paddingRight:e.space.xs},closeBtn:{width:28,height:28,borderRadius:e.radius.pill,...smoothCorners,alignItems:"center",justifyContent:"center",marginLeft:e.space.xxs},actionsRow:{flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",marginTop:e.space.xs,columnGap:e.space.xs,rowGap:e.space.xs},actionBtn:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xs,borderRadius:e.radius.sm,...smoothCorners,maxWidth:"100%",alignItems:"center",justifyContent:"center"},actionBtnMd:{minHeight:44,paddingHorizontal:e.space.md}})};export{Banner};export default Banner;
@@ -1 +1 @@
1
- "use strict";import{Logger,VersionCheck}from"@webority/mobile-core";import{useCallback,useMemo,useState}from"react";import{Dialog}from"../Dialog/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const DEFAULT_FORCE_UPDATE_DIALOG_LABELS={title:"Update available",message:"A new version of the app is available. Please update to continue using the latest features and security improvements.",update:"Update now",later:"Later"};export const ForceUpdateDialog=({visible:e,onClose:t,mandatory:a=!1,updateUrl:o,title:s,message:l,labels:i,containerStyle:r,titleStyle:n,messageStyle:c,testID:m})=>{const[p,u]=useState(!1),d=useMemo(()=>({...DEFAULT_FORCE_UPDATE_DIALOG_LABELS,...i}),[i]),g=useCallback(()=>{u(!0),(async()=>{try{await VersionCheck.openUpdateUrl(o??null)}catch(e){Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the store URL.",e)}finally{u(!1)}})()},[o]),b=useCallback(()=>{a||t?.()},[a,t]),D=a?[{label:d.update,onPress:g,tone:"info",loading:p}]:[{label:d.later,onPress:b,tone:"neutral"},{label:d.update,onPress:g,tone:"info",loading:p}];return _jsx(Dialog,{visible:e,onClose:b,title:s??d.title,message:l??d.message,tone:"info",actions:D,dismissOnAction:!1,containerStyle:r,titleStyle:n,messageStyle:c,testID:m})};export default ForceUpdateDialog;
1
+ "use strict";import{Logger,VersionCheck}from"@webority/mobile-core";import{useCallback,useMemo,useState}from"react";import{Linking,StyleSheet,Text,View}from"react-native";import{useTheme}from"../../theme/index.js";import{Dialog}from"../Dialog/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_FORCE_UPDATE_DIALOG_LABELS={title:"Update available",message:"A new version of the app is available. Please update to continue using the latest features and security improvements.",update:"Update now",later:"Later"};const STORE_FALLBACK_COPY="We could not open the store. Update from this address instead.",styles=StyleSheet.create({fallback:{alignItems:"center"},fallbackCopy:{textAlign:"center"},fallbackLink:{textAlign:"center",textDecorationLine:"underline"}});export const ForceUpdateDialog=({visible:e,onClose:t,mandatory:l=!1,updateUrl:a,updateFallbackUrl:s,title:o,message:i,labels:n,containerStyle:r,titleStyle:c,messageStyle:d,testID:m})=>{const p=useTheme(),[u,b]=useState(!1),[g,y]=useState(!1),f=useMemo(()=>({...DEFAULT_FORCE_UPDATE_DIALOG_LABELS,...n}),[n]),x=useCallback(()=>{b(!0),y(!1),(async()=>{let e=!1;try{e=await VersionCheck.openUpdateUrl(a??null)}catch(e){Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the store URL.",e)}finally{b(!1),y(!e)}})()},[a]),L=useCallback(e=>{Linking.openURL(e).catch(e=>{Logger.error("[@webority/mobile-ui] ForceUpdateDialog failed to open the fallback address.",e)})},[]),h=g?s:null,k=h?_jsxs(View,{style:styles.fallback,children:[_jsx(Text,{style:[styles.fallbackCopy,{color:p.colors["text-muted"],fontSize:p.text.base.size,lineHeight:p.text.base.size*p.leading.body}],children:STORE_FALLBACK_COPY}),_jsx(Text,{accessibilityRole:"link",onPress:()=>L(h),style:[styles.fallbackLink,{color:p.colors.link,fontSize:p.text.base.size,marginTop:p.space.xs}],children:h})]}):null,S=useCallback(()=>{l||t?.()},[l,t]),_=l?[{label:f.update,onPress:x,tone:"info",loading:u}]:[{label:f.later,onPress:S,tone:"neutral"},{label:f.update,onPress:x,tone:"info",loading:u}];return _jsx(Dialog,{visible:e,onClose:S,title:o??f.title,message:i??f.message,tone:"info",actions:_,dismissOnAction:!1,containerStyle:r,titleStyle:c,messageStyle:d,testID:m,children:k})};export default ForceUpdateDialog;
@@ -1 +1 @@
1
- "use strict";import{forwardRef}from"react";import{Keyboard,Pressable,RefreshControl}from"react-native";import{KeyboardAwareScrollView as ControllerScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useTheme}from"../../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const tapAreaStyle={flexGrow:1},KeyboardAwareScrollView=forwardRef((e,r)=>{const{children:o,bottomOffset:t=24,extraKeyboardSpace:s=0,safeAreaEdges:a=["bottom"],refreshing:l=!1,onRefresh:i,dismissOnTapOutside:n=!1,contentContainerStyle:d,refreshControl:c,...f}=e,m=useTheme(),p=useSafeAreaInsets(),b=a.includes("bottom"),y={paddingBottom:b?p.bottom:0,...a.includes("top")?{paddingTop:p.top}:null,...a.includes("left")?{paddingLeft:p.left}:null,...a.includes("right")?{paddingRight:p.right}:null},u=c??(i?_jsx(RefreshControl,{refreshing:l,onRefresh:i,tintColor:m.colors.primary,colors:[m.colors.primary],progressBackgroundColor:m.colors.surface,titleColor:m.colors["text-muted"]}):void 0);return _jsx(ControllerScrollView,{ref:r,bottomOffset:t,extraKeyboardSpace:s-(b?p.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,y],refreshControl:u,...f,children:n?_jsx(Pressable,{accessible:!1,onPress:Keyboard.dismiss,style:tapAreaStyle,children:o}):o})});KeyboardAwareScrollView.displayName="KeyboardAwareScrollView";export{KeyboardAwareScrollView};export default KeyboardAwareScrollView;
1
+ "use strict";import{forwardRef}from"react";import{Keyboard,Pressable,RefreshControl}from"react-native";import{KeyboardAwareScrollView as ControllerScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useTheme}from"../../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const tapAreaStyle={flexGrow:1},KeyboardAwareScrollView=forwardRef((e,r)=>{const{children:o,bottomOffset:t=24,extraKeyboardSpace:s=0,safeAreaEdges:a=["bottom"],refreshing:l=!1,onRefresh:i,dismissOnTapOutside:n=!0,contentContainerStyle:d,refreshControl:c,...f}=e,m=useTheme(),p=useSafeAreaInsets(),b=a.includes("bottom"),y={paddingBottom:b?p.bottom:0,...a.includes("top")?{paddingTop:p.top}:null,...a.includes("left")?{paddingLeft:p.left}:null,...a.includes("right")?{paddingRight:p.right}:null},u=c??(i?_jsx(RefreshControl,{refreshing:l,onRefresh:i,tintColor:m.colors.primary,colors:[m.colors.primary],progressBackgroundColor:m.colors.surface,titleColor:m.colors["text-muted"]}):void 0);return _jsx(ControllerScrollView,{ref:r,bottomOffset:t,extraKeyboardSpace:s-(b?p.bottom:0),disableScrollOnKeyboardHide:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"none",contentContainerStyle:[d,y],refreshControl:u,...f,children:n?_jsx(Pressable,{accessible:!1,onPress:Keyboard.dismiss,style:tapAreaStyle,children:o}):o})});KeyboardAwareScrollView.displayName="KeyboardAwareScrollView";export{KeyboardAwareScrollView};export default KeyboardAwareScrollView;
@@ -1 +1 @@
1
- "use strict";import{cloneElement,createElement,isValidElement,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,BackHandler,FlatList,StyleSheet,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSharedValue}from"react-native-reanimated";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useRefreshControl}from"../../hooks/useRefreshControl.js";import{useTheme}from"../../theme/index.js";import{AppBar}from"../AppBar/index.js";import{AsyncBlock}from"../AsyncBlock/index.js";import{EmptyState}from"../EmptyState/index.js";import{KeyboardAwareScrollView}from"../KeyboardAwareScrollView/index.js";import{KeyboardToolbar}from"../KeyboardToolbar/index.js";import{PagedListFooter}from"../PagedListFooter/index.js";import{ScrollHostContext}from"./ScrollHost.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{};function renderFooter(e){return isValidElement(e)?e:e?createElement(e):null}const buildStyles=e=>StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},footer:{backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});export function Screen(e){const{title:t,subtitle:o,largeTitle:r=!0,onBack:n,rightActions:l,leading:s,children:a,onRefresh:i,refreshing:d=!1,footer:c,scroll:u=!0,list:f,edges:m=DEFAULT_EDGES,keyboardToolbar:h=!0,bottomInset:p=0,scrollRef:g,onScroll:y,contentContainerStyle:S,testID:v}=e,x=useTheme(),b=useSafeAreaInsets(),C=useMemo(()=>buildStyles(x),[x]),[E]=useState(()=>new Animated.Value(0)),[j,T]=useState(0),k=void 0!==n,R=useRef(n);R.current=n;const L=Boolean(t||o||n||s||l?.length),_=r&&void 0!==t,V=_&&(void 0!==f||u),A=V?j:0,w=void 0!==c,{refreshControl:F}=useRefreshControl({onRefresh:i??noop,refreshing:d}),B=i?cloneElement(F,{progressViewOffset:A}):void 0,M=useSharedValue(0),K=useSharedValue(0),D=useSharedValue(0),H=useSharedValue(0),O=useRef(null),P=useRef(0),I=useRef(0),z=useMemo(()=>({top:M,bottom:K,offset:D,maxOffset:H,scrollTo:e=>{const t=O.current;t instanceof FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[M,K,D,H]),N=useCallback(e=>{O.current=e,"function"==typeof g?g(e):g&&(g.current=e)},[g]),W=useCallback(()=>{H.value=Math.max(0,P.current-I.current)},[H]),G=useRef(y);G.current=y;const U=useMemo(()=>Animated.event([{nativeEvent:{contentOffset:{y:E}}}],{useNativeDriver:!1,listener:e=>{D.value=e.nativeEvent.contentOffset.y,G.current?.(e)}}),[E,D]),Y=useCallback(e=>{const{height:t}=e.nativeEvent.layout;T(e=>Math.max(e,t))},[]);useEffect(()=>{if(!k)return;const e=BackHandler.addEventListener("hardwareBackPress",()=>(R.current?.(),!0));return()=>e.remove()},[k]);const q=m.includes("left")?b.left:0,J=m.includes("right")?b.right:0,Q=m.includes("bottom")?b.bottom:0,X=m.includes("top")&&!L?b.top:0,Z=m.filter(e=>"top"!==e&&!("bottom"===e&&w)),$=L?_jsx(View,{style:V?C.overlay:void 0,onLayout:V?Y:void 0,children:_jsx(AppBar,{title:t,subtitle:o,variant:_?"large":"default",scrollY:V?E:void 0,onBack:n,rightActions:l,leading:s})}):null,ee=useCallback(()=>{const e=O.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,o,r)=>{I.current=r,M.value=t+A,K.value=t+r,W()})},[A,M,K,W]);useEffect(()=>{ee()},[ee]);const te=useCallback((e,t)=>{P.current=t,W()},[W]);let oe;if(void 0!==f){const{state:e,paging:t,...o}=f,handleEndReached=e=>{t?.hasMore&&!t.loadingMore&&null==t.errorMore&&t.loadMore(),o.onEndReached?.(e)},r=_jsx(FlatList,{keyboardShouldPersistTaps:"handled",onEndReachedThreshold:t?.5:void 0,...o,ref:N,refreshControl:B,onScroll:U,onLayout:e=>{ee(),o.onLayout?.(e)},onContentSizeChange:(e,t)=>{te(e,t),o.onContentSizeChange?.(e,t)},onEndReached:t?handleEndReached:o.onEndReached,ListEmptyComponent:e?.empty?_jsx(EmptyState,{...e.empty}):void 0,ListFooterComponent:t||o.ListFooterComponent?_jsxs(_Fragment,{children:[renderFooter(o.ListFooterComponent),t?_jsx(PagedListFooter,{paging:t}):null]}):void 0,scrollEventThrottle:16,style:C.flex,contentContainerStyle:[{paddingTop:A,paddingLeft:q,paddingRight:J},{paddingBottom:(w?0:Q)+p},o.contentContainerStyle,S]});oe=_jsx(ScrollHostContext.Provider,{value:z,children:e?_jsx(AsyncBlock,{loading:e.loading,error:e.error,errorTitle:e.errorTitle,onRetry:e.onRetry,skeleton:e.skeleton,style:[C.flex,{paddingTop:A}],children:r}):r})}else oe=u?_jsx(ScrollHostContext.Provider,{value:z,children:_jsxs(KeyboardAwareScrollView,{ref:N,refreshControl:B,onScroll:U,scrollEventThrottle:16,onLayout:ee,onContentSizeChange:te,safeAreaEdges:Z,style:C.flex,contentContainerStyle:[{paddingTop:A},S],children:[a,p>0?_jsx(View,{style:{height:p}}):null]})}):_jsx(View,{style:[C.flex,{paddingLeft:q,paddingRight:J,paddingBottom:(w?0:Q)+p},S],children:a});const re=w?_jsx(KeyboardStickyView,{style:[C.footer,{paddingLeft:q,paddingRight:J,paddingBottom:Q+p}],children:c}):null;return _jsxs(View,{testID:v,style:[C.root,{paddingTop:X}],children:[V?null:$,oe,re,void 0!==f?a:null,V?$:null,h?_jsx(KeyboardToolbar,{}):null]})}
1
+ "use strict";import{cloneElement,createElement,isValidElement,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,BackHandler,FlatList,StyleSheet,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSharedValue}from"react-native-reanimated";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useRefreshControl}from"../../hooks/useRefreshControl.js";import{resolveFloatingActionButtonSize,useTheme}from"../../theme/index.js";import{AppBar}from"../AppBar/index.js";import{AsyncBlock}from"../AsyncBlock/index.js";import{EmptyState}from"../EmptyState/index.js";import{KeyboardAwareScrollView}from"../KeyboardAwareScrollView/index.js";import{KeyboardToolbar}from"../KeyboardToolbar/index.js";import{PagedListFooter}from"../PagedListFooter/index.js";import{ScrollHostContext}from"./ScrollHost.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const DEFAULT_EDGES=["top","bottom"],SCROLL_EVENT_THROTTLE=16,noop=()=>{};function renderFooter(e){return isValidElement(e)?e:e?createElement(e):null}const buildStyles=e=>StyleSheet.create({flex:{flex:1},root:{flex:1,backgroundColor:e.colors.bg},overlay:{position:"absolute",top:0,left:0,right:0},footer:{backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors.border}});export function Screen(e){const{title:t,subtitle:o,largeTitle:r=!0,onBack:n,rightActions:l,leading:s,children:a,onRefresh:i,refreshing:d=!1,footer:c,scroll:u=!0,list:f,edges:m=DEFAULT_EDGES,keyboardToolbar:p=!0,bottomInset:h=0,gutter:g,floatingAction:y,scrollRef:S,onScroll:v,contentContainerStyle:b,testID:x}=e,E=useTheme(),C=g??void 0===f,j=E.space[E.components.screen.gutter],T=C?j:0,k=useSafeAreaInsets(),L=useMemo(()=>buildStyles(E),[E]),[R]=useState(()=>new Animated.Value(0)),[_,A]=useState(0),[V,F]=useState(0),w=void 0!==n,B=useRef(n);B.current=n;const M=Boolean(t||o||n||s||l?.length),O=r&&void 0!==t,H=O&&(void 0!==f||u),K=H?_:0,z=void 0!==c,{refreshControl:D}=useRefreshControl({onRefresh:i??noop,refreshing:d}),P=i?cloneElement(D,{progressViewOffset:K}):void 0,I=useSharedValue(0),N=useSharedValue(0),W=useSharedValue(0),G=useSharedValue(0),U=useRef(null),Y=useRef(0),q=useRef(0),J=useMemo(()=>({top:I,bottom:N,offset:W,maxOffset:G,scrollTo:e=>{const t=U.current;t instanceof FlatList?t.scrollToOffset({offset:e,animated:!1}):t?.scrollTo({y:e,animated:!1})}}),[I,N,W,G]),Q=useCallback(e=>{U.current=e,"function"==typeof S?S(e):S&&(S.current=e)},[S]),X=useCallback(()=>{G.value=Math.max(0,Y.current-q.current)},[G]),Z=useRef(v);Z.current=v;const $=useMemo(()=>Animated.event([{nativeEvent:{contentOffset:{y:R}}}],{useNativeDriver:!1,listener:e=>{W.value=e.nativeEvent.contentOffset.y,Z.current?.(e)}}),[R,W]),ee=useCallback(e=>{const{height:t}=e.nativeEvent.layout;A(e=>Math.max(e,t))},[]),te=useCallback(e=>{F(e.nativeEvent.layout.height)},[]);useEffect(()=>{if(!w)return;const e=BackHandler.addEventListener("hardwareBackPress",()=>(B.current?.(),!0));return()=>e.remove()},[w]);const oe=m.includes("left")?k.left:0,re=m.includes("right")?k.right:0,ne=m.includes("bottom")?k.bottom:0,le=m.includes("top")&&!M?k.top:0,se=E.space[E.components["floating-action-button"]["bottom-offset"]],ae=y?resolveFloatingActionButtonSize(E,y.props.size??"md").diameter+se+E.space.lg:0,ie=z?Math.max(0,V-k.bottom):h,de=y?cloneElement(y,{bottomOffset:(y.props.bottomOffset??se)+ie}):null,ce=m.filter(e=>"top"!==e&&!("bottom"===e&&z)),ue=M?_jsx(View,{style:H?L.overlay:void 0,onLayout:H?ee:void 0,children:_jsx(AppBar,{title:t,subtitle:o,variant:O?"large":"default",scrollY:H?R:void 0,onBack:n,rightActions:l,leading:s})}):null,fe=useCallback(()=>{const e=U.current?.getNativeScrollRef();e&&e.measureInWindow((e,t,o,r)=>{q.current=r,I.value=t+K,N.value=t+r,X()})},[K,I,N,X]);useEffect(()=>{fe()},[fe]);const me=useCallback((e,t)=>{Y.current=t,X()},[X]);let pe;if(void 0!==f){const{state:e,paging:t,...o}=f,handleEndReached=e=>{t?.hasMore&&!t.loadingMore&&null==t.errorMore&&t.loadMore(),o.onEndReached?.(e)},r=_jsx(FlatList,{keyboardShouldPersistTaps:"handled",onEndReachedThreshold:t?.5:void 0,...o,ref:Q,refreshControl:P,onScroll:$,onLayout:e=>{fe(),o.onLayout?.(e)},onContentSizeChange:(e,t)=>{me(e,t),o.onContentSizeChange?.(e,t)},onEndReached:t?handleEndReached:o.onEndReached,ListEmptyComponent:e?.empty?_jsx(EmptyState,{...e.empty}):void 0,ListFooterComponent:t||o.ListFooterComponent?_jsxs(_Fragment,{children:[renderFooter(o.ListFooterComponent),t?_jsx(PagedListFooter,{paging:t}):null]}):void 0,scrollEventThrottle:16,style:L.flex,contentContainerStyle:[{paddingTop:K,paddingLeft:oe+T,paddingRight:re+T},{paddingBottom:(z?0:ne)+h+ae},o.contentContainerStyle,b]});pe=_jsx(ScrollHostContext.Provider,{value:J,children:e?_jsx(AsyncBlock,{loading:e.loading,error:e.error,errorTitle:e.errorTitle,onRetry:e.onRetry,skeleton:e.skeleton,style:[L.flex,{paddingTop:K}],children:r}):r})}else pe=u?_jsx(ScrollHostContext.Provider,{value:J,children:_jsxs(KeyboardAwareScrollView,{ref:Q,refreshControl:P,onScroll:$,scrollEventThrottle:16,onLayout:fe,onContentSizeChange:me,safeAreaEdges:ce,style:L.flex,contentContainerStyle:[{paddingTop:K,paddingHorizontal:T},b],children:[a,h+ae>0?_jsx(View,{style:{height:h+ae}}):null]})}):_jsx(View,{style:[L.flex,{paddingLeft:oe+T,paddingRight:re+T,paddingBottom:(z?0:ne)+h+ae},b],children:a});const he=z?_jsx(KeyboardStickyView,{onLayout:te,style:[L.footer,{paddingLeft:oe+j,paddingRight:re+j,paddingBottom:ne+h}],children:c}):null;return _jsxs(View,{testID:x,style:[L.root,{paddingTop:le}],children:[H?null:ue,pe,he,de,void 0!==f?a:null,H?ue:null,p?_jsx(KeyboardToolbar,{}):null]})}