@webority/mobile-ui 0.112.3 → 0.114.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.
Files changed (34) hide show
  1. package/dist/canvas-kit/kit.js +4788 -4725
  2. package/dist/canvas-kit/manifest.json +24 -5
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/lib/commonjs/components/Banner/Banner.js +1 -1
  5. package/lib/commonjs/components/Card/Card.js +1 -1
  6. package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
  7. package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
  8. package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
  9. package/lib/commonjs/components/Screen/Screen.js +1 -1
  10. package/lib/commonjs/components/SectionHeader/SectionHeader.js +1 -1
  11. package/lib/commonjs/components/Text/Text.js +1 -1
  12. package/lib/commonjs/theme/merge.js +1 -1
  13. package/lib/commonjs/theme/tokens.generated.js +1 -1
  14. package/lib/module/components/Banner/Banner.js +1 -1
  15. package/lib/module/components/Card/Card.js +1 -1
  16. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  17. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
  18. package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
  19. package/lib/module/components/Screen/Screen.js +1 -1
  20. package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
  21. package/lib/module/components/Text/Text.js +1 -1
  22. package/lib/module/theme/merge.js +1 -1
  23. package/lib/module/theme/tokens.generated.js +1 -1
  24. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -0
  25. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +6 -4
  26. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +11 -1
  27. package/lib/typescript/commonjs/theme/tokens.generated.d.ts +6 -0
  28. package/lib/typescript/commonjs/theme/types.d.ts +20 -1
  29. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -0
  30. package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +6 -4
  31. package/lib/typescript/module/components/Screen/Screen.d.ts +11 -1
  32. package/lib/typescript/module/theme/tokens.generated.d.ts +6 -0
  33. package/lib/typescript/module/theme/types.d.ts +20 -1
  34. package/package.json +8 -8
@@ -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.114.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.114.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.114.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "fe4432fcd914dc8a71a527c09ef12d7651ed0ff1bddd7a33942a094b64eebf96",
14
- "bytes": 636210
13
+ "sha256": "2b759f1bbfc82996795cd68cbbbb096dfe0d26f3f04f1fd0ddf114a6f86ad1d1",
14
+ "bytes": 636991
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "7951b50758a28d49ec77a27e7f94d60e3501672e236b8e68e0ca84a0373243b2",
18
- "bytes": 5956881
17
+ "sha256": "136205785caf766bf13077499ba50776589ab94230d5a78d888d4dc507dca1ca",
18
+ "bytes": 5959831
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.DEFAULT_CARD_LABELS=exports.Card=void 0;var cache,_react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_useControllableState=require("../../hooks/useControllableState.js"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_mergeRefs=require("../../utils/mergeRefs.js"),_shadows=require("../../utils/shadows.js"),_squircle=require("../../utils/squircle.js"),_themeStyles=require("../../utils/themeStyles.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_AppIcon=require("../AppIcon/AppIcon.js"),_useContextMenu=require("../Menu/useContextMenu.js"),_index2=require("../Skeleton/index.js"),_SquircleFill=require("../SquircleFill/SquircleFill.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var i,s,a=Object.defineProperty,r={__proto__:null,default:e};if(Object(e)!==e)return r;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,r)}for(s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((i=a&&Object.getOwnPropertyDescriptor(e,s))&&(i.get||i.set)?a(r,s,i):r[s]=e[s]);return r}const BACKGROUND_TOKENS=["bg","bg-subtle","bg-muted","surface","scrim","surface-inverse"],DEFAULT_CARD_LABELS=exports.DEFAULT_CARD_LABELS=Object.freeze({remove:"Remove",show:"Show",hide:"Hide",loading:"Loading"}),paddingMap={none:"none",sm:"sm",md:"lg",lg:"xl",xl:"2xl"},Card=exports.Card=_react.default.memo((0,_react.forwardRef)((e,t)=>{const{children:i,variant:s="elevated",elevation:a="card",radius:r="lg",padding:n="md",interactive:o=!1,pressAnimation:l="scale",bg:d,header:c,title:u,titleFont:h="sans",lead:m,action:_,headerActions:x,collapsible:p=!1,collapsed:b,defaultCollapsed:g=!1,onCollapsedChange:j,collapsedSummary:y,onRemove:v,separatorHeight:R=_reactNative.StyleSheet.hairlineWidth,footer:f,imageSource:S,imageHeight:w=160,imageAspectRatio:C,imageOverlay:A,loading:q=!1,gradient:I,onPress:N,haptic:F,contextMenu:L,accessibilityLabel:V,accessibilityHint:k,accessibilityRole:T,style:B,containerStyle:P,headerStyle:D,bodyStyle:M,footerStyle:z,borderRadius:H,testID:E,labels:O,onLayout:W,...U}=e;(0,_warnInvalidValue.warnInvalidValue)("Card","variant",e.variant,["elevated","outline","filled","flat"]),(0,_warnInvalidValue.warnInvalidValue)("Card","radius",e.radius,["sm","md","lg","xl"]),(0,_warnInvalidValue.warnInvalidValue)("Card","padding",e.padding,["none","sm","md","lg","xl"]),(0,_warnInvalidValue.warnInvalidValue)("Card","titleFont",e.titleFont,["sans","serif"]),(0,_warnInvalidValue.warnInvalidValue)("Card","pressAnimation",e.pressAnimation,["scale","bounce","fade","sink","pulse","dim","false"]);const G=(0,_index.useTheme)(),K=(0,_react.useMemo)(()=>({...DEFAULT_CARD_LABELS,...O}),[O]),$=o||"function"==typeof N,J=(0,_useContextMenu.useContextMenu)(L,{haptic:F||!1,testID:E,accessibilityActions:U.accessibilityActions,onAccessibilityAction:U.onAccessibilityAction}),Q=(0,_react.useMemo)(()=>(0,_mergeRefs.mergeRefs)(t,J.hostRef),[t,J.hostRef]),X=$||J.enabled,{style:Y,pressIn:Z,pressOut:ee}=(0,_usePressAnimation.usePressAnimation)({preset:l||"scale",enabled:X&&!1!==l}),te=stylesFor(G),ie=Boolean(S),se=G.space[paddingMap[n]],ae=(0,_react.useMemo)(()=>I?"string"==typeof I?G.settings.gradients[I]??null:I:null,[I,G.settings.gradients]),re="flat"===s,ne=re?G.radius.none:H??G.radius[r],oe=resolveBackground(G,d),[le,de]=(0,_useControllableState.useControllableState)({value:b,defaultValue:g,onChange:j}),ce=p&&le,ue=hasBuiltInHeaderContent(e),he=Boolean(c)||ue,me=(0,_SquircleFill.useSquircle)(!ie&&!ae&&!re,ne,W),xe=_reactNative.StyleSheet.flatten([B,P])??{},pe=xe.backgroundColor,be=xe.borderColor,ge=pe??oe??("filled"===s?G.colors["bg-subtle"]:G.colors.surface),je="outline"===s?G.size.border:0,ye=be??G.colors.border,ve="none"===a?void 0:G.shadow[a],Re="elevated"===s&&(0,_shadows.supportsBoxShadow)()&&ve?(0,_shadows.toBoxShadow)(ve):void 0,fe=me.active&&"elevated"===s&&!Re,Se=me.active&&!fe?{backgroundColor:"transparent",borderColor:"transparent"}:null,we=(0,_react.useMemo)(()=>{const e={borderRadius:fe&&me.size?(0,_squircle.squircleHostRadius)(me.size.width,me.size.height,ne):ne,..._corners.smoothCorners,padding:ie||me.active?G.space.none:se,overflow:me.active?"visible":"hidden"};switch(s){case"flat":return{...e,backgroundColor:oe??G.colors.surface,borderBottomWidth:R,borderBottomColor:G.colors.border};case"outline":return{...e,backgroundColor:me.active?"transparent":oe??G.colors.surface,borderWidth:G.size.border,borderColor:me.active?"transparent":G.colors.border};case"filled":return{...e,backgroundColor:me.active?"transparent":oe??G.colors["bg-subtle"]};default:return{...e,backgroundColor:oe??G.colors.surface,...Re?{boxShadow:Re}:ve}}},[G,s,ve,ne,ie,se,me.active,me.size,Re,fe,oe,R]),Ce=(0,_react.useMemo)(()=>({..."number"==typeof C?{width:"100%",aspectRatio:C}:{width:"100%",height:w},borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomLeftRadius:G.radius.none,borderBottomRightRadius:G.radius.none,..._corners.smoothCorners}),[G,ne,C,w]),Ae=u??"",qe=(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:te.titleColumn,children:[u?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"title",accessibilityRole:"header",style:titleFaceFor(G,h),children:u}):null,m?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"bodySmall",style:te.lead,children:m}):null,ce&&y?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"caption",style:te.lead,children:y}):null]}),isCardTextAction(_)?(0,_jsxRuntime.jsx)(CardTextActionButton,{action:_,haptic:F}):_?(0,_jsxRuntime.jsx)(_reactNative.View,{style:te.actionNode,children:_}):null,x,p?(0,_jsxRuntime.jsx)(CardIconAction,{icon:ce?"chevron-down":"chevron-up",label:`${ce?K.show:K.hide} ${Ae}`.trim(),expanded:!ce,onPress:()=>de(!ce),haptic:F}):null,v?(0,_jsxRuntime.jsx)(CardIconAction,{icon:"trash",label:K.remove,onPress:v,color:G.colors["danger-text"],haptic:F}):null]}),Ie=(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[he?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[te.header,!c&&te.headerRow,ce&&te.headerFolded,D],children:c??qe}):null,ce?null:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[he||f?te.body:null,M],children:i}),f&&!ce?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[te.footer,z],children:f}):null]}),Ne=ie?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:te.imageWrapper,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:S,resizeMode:"cover",style:Ce,accessibilityLabel:"",accessible:!1}),A?(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"box-none",style:te.imageOverlay,children:A}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{padding:se},children:Ie})]}):Ie,Fe=ae?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_index.Gradient,{gradient:ae,style:_reactNative.StyleSheet.absoluteFill}),Ne]}):me.active&&me.size?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_SquircleFill.SquircleFill,{width:me.size.width,height:me.size.height,radius:ne,fill:ge,stroke:je?ye:void 0,strokeWidth:je}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[te.squircleClip,{padding:se,borderRadius:me.size?(0,_squircle.squircleHostRadius)(me.size.width,me.size.height,ne):ne}],children:Ne})]}):Ne;let Le;if(X){const handlePress=e=>{$&&(F&&(0,_hapticUtils.triggerHaptic)(F),N?.(e))};Le=(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:Y,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{ref:Q,onPress:handlePress,onPressIn:Z,onPressOut:ee,accessibilityRole:T??($?"button":void 0),accessibilityLabel:V,accessibilityHint:k,testID:E,onLayout:me.onLayout,style:[we,B,P,Se],...U,...J.hostProps,children:Fe})})}else Le=(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,accessibilityLabel:V,accessibilityHint:k,accessibilityRole:T,testID:E,onLayout:me.onLayout,style:[we,B,P,Se],...U,children:Fe});return q?(0,_jsxRuntime.jsx)(CardSkeleton,{...e}):J.enabled?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[Le,J.renderSurface((0,_jsxRuntime.jsx)(_reactNative.View,{style:[we,B,P,Se,te.preview],children:Fe}))]}):Le}));Card.displayName="Card";const CardSkeleton=({variant:e="elevated",elevation:t,radius:i="lg",padding:s="md",bg:a,header:r,footer:n,imageSource:o,imageHeight:l=160,imageAspectRatio:d,borderRadius:c,containerStyle:u,headerStyle:h,bodyStyle:m,footerStyle:_,style:x,labels:p,...b})=>{const g=(0,_index.useTheme)(),j={...DEFAULT_CARD_LABELS,...p},y=paddingMap[s],v=g.space[y],R="flat"===e?g.radius.none:c??g.radius[i],f=void 0!==r||hasBuiltInHeaderContent(b),S=resolveBackground(g,a)??g.colors.surface,w="outline"===e?1:0,C="outline"===e?g.colors.border:void 0;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[{backgroundColor:S,borderRadius:R,..._corners.smoothCorners,borderWidth:w,borderColor:C,overflow:"hidden"},u,x],accessibilityRole:"progressbar",accessibilityLabel:j.loading,accessibilityState:{busy:!0},"aria-busy":!0,children:[void 0!==o?(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:"100%",height:d?void 0:l,style:d?{aspectRatio:d,width:"100%"}:void 0}):null,f?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:v,paddingBottom:g.space.sm},h],children:(0,_jsxRuntime.jsx)(_index2.Skeleton,{shape:"text",width:"60%",height:18})}):null,(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:v},m],children:(0,_jsxRuntime.jsx)(_index2.SkeletonText,{lines:3,fontSize:g.text.base.size,lastLineWidth:"55%"})}),void 0!==n?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:v,paddingTop:g.space.sm,flexDirection:"row"},_],children:(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:88,height:32,shape:"rounded"})}):null]})};CardSkeleton.displayName="CardSkeleton",Card.Skeleton=CardSkeleton;const hasBuiltInHeaderContent=e=>Boolean(e.title||e.lead||e.action||e.headerActions||e.collapsible||e.onRemove),isCardTextAction=e=>"object"==typeof e&&null!==e&&!_react.default.isValidElement(e)&&"label"in e&&"onPress"in e,HIT_TARGET=44,CardIconAction=({icon:e,label:t,onPress:i,expanded:s,color:a,haptic:r})=>{const n=(0,_index.useTheme)();return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:t,accessibilityState:void 0===s?void 0:{expanded:s},"aria-expanded":s,onPress:()=>{r&&(0,_hapticUtils.triggerHaptic)(r),i()},style:iconActionStyle,children:(0,_jsxRuntime.jsx)(_AppIcon.AppIcon,{name:e,size:20,color:a??n.colors["text-body"]})})},CardTextActionButton=({action:e,haptic:t})=>(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,onPress:()=>{t&&(0,_hapticUtils.triggerHaptic)(t),e.onPress()},style:textActionStyle,children:(0,_jsxRuntime.jsx)(_index3.Text,{variant:"label",weight:"semibold",color:"brand",children:e.label})}),iconActionStyle={width:44,height:44,alignItems:"center",justifyContent:"center"},textActionStyle={minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},titleFaceFor=(e,t)=>"serif"===t?(0,_index.fontFor)(e,"semibold","display"):{fontFamily:void 0,...(0,_index.fontFor)(e,"semibold")},resolveBackground=(e,t)=>{if(null!=t)return BACKGROUND_TOKENS.includes(t)?e.colors[t]:t},buildStyles=e=>_reactNative.StyleSheet.create({header:{marginBottom:e.space.md},headerRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm},headerFolded:{marginBottom:e.space.none},titleColumn:{flex:1},lead:{marginTop:e.space.xs},actionNode:{flexShrink:0},body:{flexShrink:1},footer:{marginTop:e.space.md},imageWrapper:{position:"relative"},imageOverlay:{..._reactNative.StyleSheet.absoluteFill},squircleClip:{flexGrow:1,overflow:"hidden",..._corners.smoothCorners},preview:{margin:e.space.none,marginTop:e.space.none,marginBottom:e.space.none,marginLeft:e.space.none,marginRight:e.space.none,marginStart:e.space.none,marginEnd:e.space.none,marginHorizontal:e.space.none,marginVertical:e.space.none,position:"relative",top:0,left:0,width:"100%",height:"100%"}}),stylesFor=(0,_themeStyles.themeStyles)(buildStyles);var _default=exports.default=Card;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DEFAULT_CARD_LABELS=exports.Card=void 0;var cache,_react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_useControllableState=require("../../hooks/useControllableState.js"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_mergeRefs=require("../../utils/mergeRefs.js"),_shadows=require("../../utils/shadows.js"),_squircle=require("../../utils/squircle.js"),_themeStyles=require("../../utils/themeStyles.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_AppIcon=require("../AppIcon/AppIcon.js"),_useContextMenu=require("../Menu/useContextMenu.js"),_index2=require("../Skeleton/index.js"),_SquircleFill=require("../SquircleFill/SquircleFill.js"),_index3=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var i,s,a=Object.defineProperty,r={__proto__:null,default:e};if(Object(e)!==e)return r;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,r)}for(s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((i=a&&Object.getOwnPropertyDescriptor(e,s))&&(i.get||i.set)?a(r,s,i):r[s]=e[s]);return r}const BACKGROUND_TOKENS=["bg","bg-subtle","bg-muted","surface","scrim","surface-inverse"],DEFAULT_CARD_LABELS=exports.DEFAULT_CARD_LABELS=Object.freeze({remove:"Remove",show:"Show",hide:"Hide",loading:"Loading"}),paddingMap={none:"none",sm:"sm",md:"lg",lg:"xl",xl:"2xl"},Card=exports.Card=_react.default.memo((0,_react.forwardRef)((e,t)=>{const{children:i,variant:s,elevation:a="card",radius:r,padding:n,interactive:o=!1,pressAnimation:l="scale",bg:d,header:c,title:u,titleFont:h,lead:m,action:_,headerActions:x,collapsible:p=!1,collapsed:b,defaultCollapsed:g=!1,onCollapsedChange:j,collapsedSummary:y,onRemove:v,separatorHeight:R=_reactNative.StyleSheet.hairlineWidth,footer:f,imageSource:S,imageHeight:w=160,imageAspectRatio:C,imageOverlay:A,loading:q=!1,gradient:F,onPress:I,haptic:N,contextMenu:L,accessibilityLabel:V,accessibilityHint:k,accessibilityRole:T,style:B,containerStyle:P,headerStyle:D,bodyStyle:M,footerStyle:z,borderRadius:H,testID:E,labels:O,onLayout:W,...U}=e;(0,_warnInvalidValue.warnInvalidValue)("Card","variant",e.variant,["elevated","outline","filled","flat"]),(0,_warnInvalidValue.warnInvalidValue)("Card","radius",e.radius,["sm","md","lg","xl"]),(0,_warnInvalidValue.warnInvalidValue)("Card","padding",e.padding,["none","sm","md","lg","xl"]),(0,_warnInvalidValue.warnInvalidValue)("Card","titleFont",e.titleFont,["sans","serif"]),(0,_warnInvalidValue.warnInvalidValue)("Card","pressAnimation",e.pressAnimation,["scale","bounce","fade","sink","pulse","dim","false"]);const G=(0,_index.useTheme)(),K=G.settings.components.card,$=s??K?.defaultVariant??"elevated",J=r??K?.defaultRadius??"lg",Q=n??K?.defaultPadding??"md",X=h??K?.defaultTitleFont??"sans",Y=(0,_react.useMemo)(()=>({...DEFAULT_CARD_LABELS,...O}),[O]),Z=o||"function"==typeof I,ee=(0,_useContextMenu.useContextMenu)(L,{haptic:N||!1,testID:E,accessibilityActions:U.accessibilityActions,onAccessibilityAction:U.onAccessibilityAction}),te=(0,_react.useMemo)(()=>(0,_mergeRefs.mergeRefs)(t,ee.hostRef),[t,ee.hostRef]),ie=Z||ee.enabled,{style:se,pressIn:ae,pressOut:re}=(0,_usePressAnimation.usePressAnimation)({preset:l||"scale",enabled:ie&&!1!==l}),ne=stylesFor(G),oe=Boolean(S),le=G.space[paddingMap[Q]],de=(0,_react.useMemo)(()=>F?"string"==typeof F?G.settings.gradients[F]??null:F:null,[F,G.settings.gradients]),ce="flat"===$,ue=ce?G.radius.none:H??G.radius[J],he=resolveBackground(G,d),[me,xe]=(0,_useControllableState.useControllableState)({value:b,defaultValue:g,onChange:j}),pe=p&&me,be=hasBuiltInHeaderContent(e),ge=Boolean(c)||be,je=(0,_SquircleFill.useSquircle)(!oe&&!de&&!ce,ue,W),ye=_reactNative.StyleSheet.flatten([B,P])??{},ve=ye.backgroundColor,Re=ye.borderColor,fe=ve??he??("filled"===$?G.colors["bg-subtle"]:G.colors.surface),Se="outline"===$?G.size.border:0,we=Re??G.colors.border,Ce="none"===a?void 0:G.shadow[a],Ae="elevated"===$&&(0,_shadows.supportsBoxShadow)()&&Ce?(0,_shadows.toBoxShadow)(Ce):void 0,qe=je.active&&"elevated"===$&&!Ae,Fe=je.active&&!qe?{backgroundColor:"transparent",borderColor:"transparent"}:null,Ie=(0,_react.useMemo)(()=>{const e={borderRadius:qe&&je.size?(0,_squircle.squircleHostRadius)(je.size.width,je.size.height,ue):ue,..._corners.smoothCorners,padding:oe||je.active?G.space.none:le,overflow:je.active?"visible":"hidden"};switch($){case"flat":return{...e,backgroundColor:he??G.colors.surface,borderBottomWidth:R,borderBottomColor:G.colors.border};case"outline":return{...e,backgroundColor:je.active?"transparent":he??G.colors.surface,borderWidth:G.size.border,borderColor:je.active?"transparent":G.colors.border};case"filled":return{...e,backgroundColor:je.active?"transparent":he??G.colors["bg-subtle"]};default:return{...e,backgroundColor:he??G.colors.surface,...Ae?{boxShadow:Ae}:Ce}}},[G,$,Ce,ue,oe,le,je.active,je.size,Ae,qe,he,R]),Ne=(0,_react.useMemo)(()=>({..."number"==typeof C?{width:"100%",aspectRatio:C}:{width:"100%",height:w},borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomLeftRadius:G.radius.none,borderBottomRightRadius:G.radius.none,..._corners.smoothCorners}),[G,ue,C,w]),Le=u??"",Ve=(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:ne.titleColumn,children:[u?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"title",accessibilityRole:"header",style:titleFaceFor(G,X),children:u}):null,m?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"bodySmall",style:ne.lead,children:m}):null,pe&&y?(0,_jsxRuntime.jsx)(_index3.Text,{variant:"caption",style:ne.lead,children:y}):null]}),isCardTextAction(_)?(0,_jsxRuntime.jsx)(CardTextActionButton,{action:_,haptic:N}):_?(0,_jsxRuntime.jsx)(_reactNative.View,{style:ne.actionNode,children:_}):null,x,p?(0,_jsxRuntime.jsx)(CardIconAction,{icon:pe?"chevron-down":"chevron-up",label:`${pe?Y.show:Y.hide} ${Le}`.trim(),expanded:!pe,onPress:()=>xe(!pe),haptic:N}):null,v?(0,_jsxRuntime.jsx)(CardIconAction,{icon:"trash",label:Y.remove,onPress:v,color:G.colors["danger-text"],haptic:N}):null]}),ke=(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[ge?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[ne.header,!c&&ne.headerRow,pe&&ne.headerFolded,D],children:c??Ve}):null,pe?null:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[ge||f?ne.body:null,M],children:i}),f&&!pe?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[ne.footer,z],children:f}):null]}),Te=oe?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:ne.imageWrapper,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:S,resizeMode:"cover",style:Ne,accessibilityLabel:"",accessible:!1}),A?(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"box-none",style:ne.imageOverlay,children:A}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{padding:le},children:ke})]}):ke,Be=de?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_index.Gradient,{gradient:de,style:_reactNative.StyleSheet.absoluteFill}),Te]}):je.active&&je.size?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_SquircleFill.SquircleFill,{width:je.size.width,height:je.size.height,radius:ue,fill:fe,stroke:Se?we:void 0,strokeWidth:Se}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[ne.squircleClip,{padding:le,borderRadius:je.size?(0,_squircle.squircleHostRadius)(je.size.width,je.size.height,ue):ue}],children:Te})]}):Te;let Pe;if(ie){const handlePress=e=>{Z&&(N&&(0,_hapticUtils.triggerHaptic)(N),I?.(e))};Pe=(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:se,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{ref:te,onPress:handlePress,onPressIn:ae,onPressOut:re,accessibilityRole:T??(Z?"button":void 0),accessibilityLabel:V,accessibilityHint:k,testID:E,onLayout:je.onLayout,style:[Ie,B,P,Fe],...U,...ee.hostProps,children:Be})})}else Pe=(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,accessibilityLabel:V,accessibilityHint:k,accessibilityRole:T,testID:E,onLayout:je.onLayout,style:[Ie,B,P,Fe],...U,children:Be});return q?(0,_jsxRuntime.jsx)(CardSkeleton,{...e}):ee.enabled?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[Pe,ee.renderSurface((0,_jsxRuntime.jsx)(_reactNative.View,{style:[Ie,B,P,Fe,ne.preview],children:Be}))]}):Pe}));Card.displayName="Card";const CardSkeleton=({variant:e,elevation:t,radius:i,padding:s,bg:a,header:r,footer:n,imageSource:o,imageHeight:l=160,imageAspectRatio:d,borderRadius:c,containerStyle:u,headerStyle:h,bodyStyle:m,footerStyle:_,style:x,labels:p,...b})=>{const g=(0,_index.useTheme)(),j=g.settings.components.card,y=e??j?.defaultVariant??"elevated",v=i??j?.defaultRadius??"lg",R=s??j?.defaultPadding??"md",f={...DEFAULT_CARD_LABELS,...p},S=paddingMap[R],w=g.space[S],C="flat"===y?g.radius.none:c??g.radius[v],A=void 0!==r||hasBuiltInHeaderContent(b),q=resolveBackground(g,a)??g.colors.surface,F="outline"===y?1:0,I="outline"===y?g.colors.border:void 0;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[{backgroundColor:q,borderRadius:C,..._corners.smoothCorners,borderWidth:F,borderColor:I,overflow:"hidden"},u,x],accessibilityRole:"progressbar",accessibilityLabel:f.loading,accessibilityState:{busy:!0},"aria-busy":!0,children:[void 0!==o?(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:"100%",height:d?void 0:l,style:d?{aspectRatio:d,width:"100%"}:void 0}):null,A?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:w,paddingBottom:g.space.sm},h],children:(0,_jsxRuntime.jsx)(_index2.Skeleton,{shape:"text",width:"60%",height:18})}):null,(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:w},m],children:(0,_jsxRuntime.jsx)(_index2.SkeletonText,{lines:3,fontSize:g.text.base.size,lastLineWidth:"55%"})}),void 0!==n?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{padding:w,paddingTop:g.space.sm,flexDirection:"row"},_],children:(0,_jsxRuntime.jsx)(_index2.Skeleton,{width:88,height:32,shape:"rounded"})}):null]})};CardSkeleton.displayName="CardSkeleton",Card.Skeleton=CardSkeleton;const hasBuiltInHeaderContent=e=>Boolean(e.title||e.lead||e.action||e.headerActions||e.collapsible||e.onRemove),isCardTextAction=e=>"object"==typeof e&&null!==e&&!_react.default.isValidElement(e)&&"label"in e&&"onPress"in e,HIT_TARGET=44,CardIconAction=({icon:e,label:t,onPress:i,expanded:s,color:a,haptic:r})=>{const n=(0,_index.useTheme)();return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:t,accessibilityState:void 0===s?void 0:{expanded:s},"aria-expanded":s,onPress:()=>{r&&(0,_hapticUtils.triggerHaptic)(r),i()},style:iconActionStyle,children:(0,_jsxRuntime.jsx)(_AppIcon.AppIcon,{name:e,size:20,color:a??n.colors["text-body"]})})},CardTextActionButton=({action:e,haptic:t})=>(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,onPress:()=>{t&&(0,_hapticUtils.triggerHaptic)(t),e.onPress()},style:textActionStyle,children:(0,_jsxRuntime.jsx)(_index3.Text,{variant:"label",weight:"semibold",color:"brand",children:e.label})}),iconActionStyle={width:44,height:44,alignItems:"center",justifyContent:"center"},textActionStyle={minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},titleFaceFor=(e,t)=>"serif"===t?(0,_index.fontFor)(e,"semibold","display"):{fontFamily:void 0,...(0,_index.fontFor)(e,"semibold")},resolveBackground=(e,t)=>{if(null!=t)return BACKGROUND_TOKENS.includes(t)?e.colors[t]:t},buildStyles=e=>_reactNative.StyleSheet.create({header:{marginBottom:e.space.md},headerRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm},headerFolded:{marginBottom:e.space.none},titleColumn:{flex:1},lead:{marginTop:e.space.xs},actionNode:{flexShrink:0},body:{flexShrink:1},footer:{marginTop:e.space.md},imageWrapper:{position:"relative"},imageOverlay:{..._reactNative.StyleSheet.absoluteFill},squircleClip:{flexGrow:1,overflow:"hidden",..._corners.smoothCorners},preview:{margin:e.space.none,marginTop:e.space.none,marginBottom:e.space.none,marginLeft:e.space.none,marginRight:e.space.none,marginStart:e.space.none,marginEnd:e.space.none,marginHorizontal:e.space.none,marginVertical:e.space.none,position:"relative",top:0,left:0,width:"100%",height:"100%"}}),stylesFor=(0,_themeStyles.themeStyles)(buildStyles);var _default=exports.default=Card;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.EmptyState=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_SquircleFill=require("../SquircleFill/SquircleFill.js"),_index2=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const ActionButton=({action:e,variant:t})=>{const i=(0,_index.useTheme)(),{style:r,pressIn:s,pressOut:n}=(0,_usePressAnimation.usePressAnimation)({enabled:!0}),o=(0,_react.useMemo)(()=>buildActionStyles(i),[i]),a="primary"===t,l=(0,_SquircleFill.useSquircle)(!0,i.radius.md),fillFor=e=>a?e?i.colors["primary-hover"]:i.colors.primary:e?i.colors["surface-pressed"]:"transparent";return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:r,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>{(0,_hapticUtils.triggerHaptic)("selection"),e.onPress()},onPressIn:s,onPressOut:n,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,accessibilityHint:e.accessibilityHint,testID:e.testID,onLayout:l.onLayout,style:({pressed:e})=>[o.button,a?o.buttonPrimary:o.buttonSecondary,e&&!l.active?a?o.buttonPrimaryPressed:o.buttonSecondaryPressed:null,l.active?o.buttonSquircleHost:null],children:({pressed:t})=>(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[l.active&&l.size?(0,_jsxRuntime.jsx)(_SquircleFill.SquircleFill,{width:l.size.width,height:l.size.height,radius:i.radius.md,fill:fillFor(t),stroke:a?void 0:i.colors.border,strokeWidth:a?0:1}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[o.buttonText,a?o.buttonTextPrimary:o.buttonTextSecondary],numberOfLines:1,children:e.label})]})})})},EmptyState=exports.EmptyState=(0,_react.forwardRef)((e,t)=>{const i=(0,_index.useTheme)(),r=Object.keys(i.components["empty-state"]);(0,_warnInvalidValue.warnInvalidValue)("EmptyState","size",e.size,r),(0,_warnInvalidValue.warnInvalidValue)("EmptyState","variant",e.variant,["block","inline"]);const{icon:s,illustration:n,title:o,description:a,action:l,secondaryAction:c,size:u="md",variant:d="block",fill:m=!1,style:x,testID:y}=e,b=r.includes(u)?u:"md",p=(0,_react.useMemo)(()=>(0,_index.resolveEmptyStateSize)(i,b),[i,b]),_=(0,_react.useMemo)(()=>buildStyles(i),[i]);return"inline"===d?(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,accessibilityRole:"summary",testID:y,style:[_.inline,m?_.fill:null,x],children:(0,_jsxRuntime.jsx)(_index2.Text,{variant:"caption",weight:"medium",color:"secondary",align:"center",children:o})}):(0,_jsxRuntime.jsxs)(_reactNative.View,{ref:t,accessibilityRole:"summary",testID:y,style:[_.root,{paddingVertical:p["padding-y"]},m?_.fill:null,x],children:[null!=n?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginBottom:p["title-gap"]},children:(0,_react.isValidElement)(n)?n:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:n,style:{width:p["illustration-size"],height:p["illustration-size"]},resizeMode:"contain",accessibilityIgnoresInvertColors:!0})}):s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[_.iconCircle,{width:p.icon,height:p.icon,marginBottom:p["title-gap"],borderRadius:i.radius.pill,..._corners.smoothCorners}],children:s}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_.title,{fontSize:p["title-text"],...(0,_index.fontFor)(i,"semibold")}],children:o}),a?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_.description,{fontSize:p["description-text"],marginTop:p["description-gap"]}],children:a}):null,l||c?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_.actions,children:[l?(0,_jsxRuntime.jsx)(ActionButton,{action:l,variant:"primary"}):null,c?(0,_jsxRuntime.jsx)(ActionButton,{action:c,variant:"secondary"}):null]}):null]})});EmptyState.displayName="EmptyState";const buildStyles=e=>_reactNative.StyleSheet.create({root:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},inline:{alignItems:"center",justifyContent:"center"},fill:{flexGrow:1},iconCircle:{backgroundColor:e.colors["surface-disabled"],alignItems:"center",justifyContent:"center"},title:{color:e.colors["text-body"],textAlign:"center"},description:{color:e.colors["text-muted"],textAlign:"center",maxWidth:320,lineHeight:e.text.base.size*e.leading.body},actions:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.lg}}),buildActionStyles=e=>_reactNative.StyleSheet.create({button:{paddingHorizontal:e.space.lg,paddingVertical:e.space.sm,minHeight:42,borderRadius:e.radius.md,..._corners.smoothCorners,overflow:"hidden",alignItems:"center",justifyContent:"center",flexDirection:"row"},buttonPrimary:{backgroundColor:e.colors.primary},buttonPrimaryPressed:{backgroundColor:e.colors["primary-hover"]},buttonSecondary:{backgroundColor:"transparent",borderWidth:1,borderColor:e.colors.border},buttonSecondaryPressed:{backgroundColor:e.colors["surface-pressed"]},buttonSquircleHost:{backgroundColor:"transparent",borderColor:"transparent",overflow:"visible"},buttonText:{fontSize:e.text.base.size,...(0,_index.fontFor)(e,"semibold")},buttonTextPrimary:{color:e.colors["on-primary"]},buttonTextSecondary:{color:e.colors["text-body"]}});var _default=exports.default=EmptyState;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.EmptyState=void 0;var _react=require("react"),_reactNative=require("react-native"),_usePressAnimation=require("../../hooks/usePressAnimation.js"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_hapticUtils=require("../../utils/hapticUtils.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_SquircleFill=require("../SquircleFill/SquircleFill.js"),_index2=require("../Text/index.js"),_jsxRuntime=require("react/jsx-runtime");const ActionButton=({action:e,variant:t})=>{const i=(0,_index.useTheme)(),{style:r,pressIn:s,pressOut:n}=(0,_usePressAnimation.usePressAnimation)({enabled:!0}),o=(0,_react.useMemo)(()=>buildActionStyles(i),[i]),a="primary"===t,l=(0,_SquircleFill.useSquircle)(!0,i.radius.md),fillFor=e=>a?e?i.colors["primary-hover"]:i.colors.primary:e?i.colors["surface-pressed"]:"transparent";return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:r,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>{(0,_hapticUtils.triggerHaptic)("selection"),e.onPress()},onPressIn:s,onPressOut:n,accessibilityRole:"button",accessibilityLabel:e.accessibilityLabel??e.label,accessibilityHint:e.accessibilityHint,testID:e.testID,onLayout:l.onLayout,style:({pressed:e})=>[o.button,a?o.buttonPrimary:o.buttonSecondary,e&&!l.active?a?o.buttonPrimaryPressed:o.buttonSecondaryPressed:null,l.active?o.buttonSquircleHost:null],children:({pressed:t})=>(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[l.active&&l.size?(0,_jsxRuntime.jsx)(_SquircleFill.SquircleFill,{width:l.size.width,height:l.size.height,radius:i.radius.md,fill:fillFor(t),stroke:a?void 0:i.colors.border,strokeWidth:a?0:1}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[o.buttonText,a?o.buttonTextPrimary:o.buttonTextSecondary],numberOfLines:1,children:e.label})]})})})},EmptyState=exports.EmptyState=(0,_react.forwardRef)((e,t)=>{const i=(0,_index.useTheme)(),r=Object.keys(i.components["empty-state"]);(0,_warnInvalidValue.warnInvalidValue)("EmptyState","size",e.size,r),(0,_warnInvalidValue.warnInvalidValue)("EmptyState","variant",e.variant,["block","inline"]);const{icon:s,illustration:n,title:o,description:a,action:l,secondaryAction:c,size:u,variant:d,fill:m=!1,style:y,testID:x}=e,b=i.settings.components["empty-state"],p=u??b?.defaultSize??"md",_=d??b?.defaultVariant??"block",j=r.includes(p)?p:"md",g=(0,_react.useMemo)(()=>(0,_index.resolveEmptyStateSize)(i,j),[i,j]),h=(0,_react.useMemo)(()=>buildStyles(i),[i]);return"inline"===_?(0,_jsxRuntime.jsx)(_reactNative.View,{ref:t,accessibilityRole:"summary",testID:x,style:[h.inline,m?h.fill:null,y],children:(0,_jsxRuntime.jsx)(_index2.Text,{variant:"caption",weight:"medium",color:"secondary",align:"center",children:o})}):(0,_jsxRuntime.jsxs)(_reactNative.View,{ref:t,accessibilityRole:"summary",testID:x,style:[h.root,{paddingVertical:g["padding-y"]},m?h.fill:null,y],children:[null!=n?(0,_jsxRuntime.jsx)(_reactNative.View,{style:{marginBottom:g["title-gap"]},children:(0,_react.isValidElement)(n)?n:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:n,style:{width:g["illustration-size"],height:g["illustration-size"]},resizeMode:"contain",accessibilityIgnoresInvertColors:!0})}):s?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[h.iconCircle,{width:g.icon,height:g.icon,marginBottom:g["title-gap"],borderRadius:i.radius.pill,..._corners.smoothCorners}],children:s}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[h.title,{fontSize:g["title-text"],...(0,_index.fontFor)(i,"semibold")}],children:o}),a?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[h.description,{fontSize:g["description-text"],marginTop:g["description-gap"]}],children:a}):null,l||c?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:h.actions,children:[l?(0,_jsxRuntime.jsx)(ActionButton,{action:l,variant:"primary"}):null,c?(0,_jsxRuntime.jsx)(ActionButton,{action:c,variant:"secondary"}):null]}):null]})});EmptyState.displayName="EmptyState";const buildStyles=e=>_reactNative.StyleSheet.create({root:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},inline:{alignItems:"center",justifyContent:"center"},fill:{flexGrow:1},iconCircle:{backgroundColor:e.colors["surface-disabled"],alignItems:"center",justifyContent:"center"},title:{color:e.colors["text-body"],textAlign:"center"},description:{color:e.colors["text-muted"],textAlign:"center",maxWidth:320,lineHeight:e.text.base.size*e.leading.body},actions:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.lg}}),buildActionStyles=e=>_reactNative.StyleSheet.create({button:{paddingHorizontal:e.space.lg,paddingVertical:e.space.sm,minHeight:42,borderRadius:e.radius.md,..._corners.smoothCorners,overflow:"hidden",alignItems:"center",justifyContent:"center",flexDirection:"row"},buttonPrimary:{backgroundColor:e.colors.primary},buttonPrimaryPressed:{backgroundColor:e.colors["primary-hover"]},buttonSecondary:{backgroundColor:"transparent",borderWidth:1,borderColor:e.colors.border},buttonSecondaryPressed:{backgroundColor:e.colors["surface-pressed"]},buttonSquircleHost:{backgroundColor:"transparent",borderColor:"transparent",overflow:"visible"},buttonText:{fontSize:e.text.base.size,...(0,_index.fontFor)(e,"semibold")},buttonTextPrimary:{color:e.colors["on-primary"]},buttonTextSecondary:{color:e.colors["text-body"]}});var _default=exports.default=EmptyState;
@@ -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,gutter:j})}):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.default=exports.SectionHeader=exports.DEFAULT_SECTION_HEADER_LABELS=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index2=require("../Button/index.js"),_index3=require("../FieldBase/index.js"),_Text=require("../Text/Text.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_SECTION_HEADER_LABELS=exports.DEFAULT_SECTION_HEADER_LABELS=Object.freeze({required:e=>`${e}, required`}),SectionHeader=e=>{const{children:t,variant:r="title",flush:i=!1,required:a=!1,action:s,labels:n,style:o,testID:l}=e;(0,_warnInvalidValue.warnInvalidValue)("SectionHeader","variant",e.variant,["title","caps","sub"]);const c=(0,_index.useTheme)(),u=(0,_react.useMemo)(()=>({...DEFAULT_SECTION_HEADER_LABELS,...n}),[n]),d=(0,_react.useMemo)(()=>({marginTop:i?0:c.space.lg,marginBottom:c.space.sm}),[c,i]),_=(0,_react.useMemo)(()=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:c.space.sm}),[c]),x=(0,_react.useMemo)(()=>({flex:1}),[]),v="caps"===r?{variant:"overline",color:"tertiary",weight:void 0}:"sub"===r?{variant:"label",color:"primary",weight:"semibold"}:{variant:"title",color:void 0,weight:void 0},m=(0,_jsxRuntime.jsxs)(_Text.Text,{variant:v.variant,color:v.color,weight:v.weight,accessibilityRole:"header",accessibilityLabel:a&&"string"==typeof t?u.required(t):void 0,style:s?x:[d,o],testID:l,children:[t,a?(0,_jsxRuntime.jsx)(_index3.RequiredMark,{}):null]});return s?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[_,d,o],children:[m,(0,_jsxRuntime.jsx)(_index2.Button,{variant:"link",size:"sm",label:s.label,onPress:s.onPress,testID:s.testID})]}):m};exports.SectionHeader=SectionHeader;var _default=exports.default=SectionHeader;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SectionHeader=exports.DEFAULT_SECTION_HEADER_LABELS=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_index2=require("../Button/index.js"),_index3=require("../FieldBase/index.js"),_Text=require("../Text/Text.js"),_jsxRuntime=require("react/jsx-runtime");const DEFAULT_SECTION_HEADER_LABELS=exports.DEFAULT_SECTION_HEADER_LABELS=Object.freeze({required:e=>`${e}, required`}),SectionHeader=e=>{const{children:t,variant:r,flush:i,required:a=!1,action:s,labels:n,style:o,testID:l}=e;(0,_warnInvalidValue.warnInvalidValue)("SectionHeader","variant",e.variant,["title","caps","sub"]);const u=(0,_index.useTheme)(),c=u.settings.components["section-header"],d=r??c?.defaultVariant??"title",_=i??c?.defaultFlush??!1,x=(0,_react.useMemo)(()=>({...DEFAULT_SECTION_HEADER_LABELS,...n}),[n]),v=(0,_react.useMemo)(()=>({marginTop:_?0:u.space.lg,marginBottom:u.space.sm}),[u,_]),m=(0,_react.useMemo)(()=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:u.space.sm}),[u]),E=(0,_react.useMemo)(()=>({flex:1}),[]),p="caps"===d?{variant:"overline",color:"tertiary",weight:void 0}:"sub"===d?{variant:"label",color:"primary",weight:"semibold"}:{variant:"title",color:void 0,weight:void 0},j=(0,_jsxRuntime.jsxs)(_Text.Text,{variant:p.variant,color:p.color,weight:p.weight,accessibilityRole:"header",accessibilityLabel:a&&"string"==typeof t?x.required(t):void 0,style:s?E:[v,o],testID:l,children:[t,a?(0,_jsxRuntime.jsx)(_index3.RequiredMark,{}):null]});return s?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[m,v,o],children:[j,(0,_jsxRuntime.jsx)(_index2.Button,{variant:"link",size:"sm",label:s.label,onPress:s.onPress,testID:s.testID})]}):j};exports.SectionHeader=SectionHeader;var _default=exports.default=SectionHeader;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveColor=exports.default=exports.Text=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_tokensGenerated=require("../../theme/tokens.generated.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_Notation=require("../Notation/Notation.js"),_jsxRuntime=require("react/jsx-runtime");const VARIANTS={display:{size:"4xl",weight:"bold",line:"display",color:"primary",heading:!0,fontFamily:"display"},h1:{size:"3xl",weight:"bold",line:"heading",color:"primary",heading:!0,fontFamily:"display"},h2:{size:"2xl",weight:"semibold",line:"heading",color:"primary",heading:!0,fontFamily:"display"},h3:{size:"xl",weight:"semibold",line:"heading",color:"primary",heading:!0},title:{size:"lg",weight:"semibold",line:"body",color:"primary",fontFamily:"display"},body:{size:"base",weight:"normal",line:"body",color:"primary"},bodySmall:{size:"sm",weight:"normal",line:"body",color:"secondary"},caption:{size:"xs",weight:"normal",line:"body",color:"tertiary"},label:{size:"sm",weight:"medium",line:"body",color:"secondary"},overline:{size:"xs",weight:"semibold",line:"body",color:"secondary",uppercase:!0,letterSpacing:"wide"}},TEXT_ROLE_COLOR={textStrong:"text",primary:"text-body",secondary:"text-muted",tertiary:"text-subtle",inverse:"text-inverse",disabled:"text-disabled",link:"link",brand:"primary"},SEMANTIC={success:!0,warning:!0,danger:!0,info:!0,neutral:!0},COLOR_NAMES=["primary","secondary","tertiary","inverse","disabled","link","textStrong","brand","success","warning","danger","info","neutral"],resolveColor=(e,i)=>Object.hasOwn(TEXT_ROLE_COLOR,i)?e.colors[TEXT_ROLE_COLOR[i]]:Object.hasOwn(SEMANTIC,i)?e.colors[`${i}-text`]:i;exports.resolveColor=resolveColor;const Text=exports.Text=(0,_react.forwardRef)((e,i)=>{const{variant:t="body",color:r,weight:o,size:n,align:a,italic:l,underline:s,style:d,children:c,...x}=e,y=(0,_index.useTheme)(),u=Object.hasOwn(VARIANTS,t),g=y.settings.textVariants,p=!u&&g&&Object.hasOwn(g,t)?g[t]:void 0;u||p||(0,_warnInvalidValue.warnInvalidValue)("Text","variant",e.variant,[...Object.keys(VARIANTS),...Object.keys(g??{})]),(0,_warnInvalidValue.warnInvalidValue)("Text","color",r,COLOR_NAMES),(0,_warnInvalidValue.warnInvalidValue)("Text","size",n,_tokensGenerated.TEXT_NAMES);const m=void 0!==r&&COLOR_NAMES.includes(r)?r:void 0,h=(0,_react.useMemo)(()=>{if(p){const e=n??p.size,i=y.text[e].size;return{fontSize:i,lineHeight:p.lineHeight??Math.round(i*y.leading[p.heading?"heading":"body"]),color:void 0!==m?resolveColor(y,m):p.color?y.colors[p.color]:resolveColor(y,"primary"),textAlign:a,textTransform:p.uppercase?"uppercase":void 0,letterSpacing:p.letterSpacing?y["letter-spacing"][p.letterSpacing]:void 0,fontStyle:l||p.italic?"italic":void 0,fontVariant:p.fontVariant,textDecorationLine:s?"underline":void 0,...(0,_index.fontFor)(y,o??p.weight??"normal",p.fontFamily)}}const e=VARIANTS[u?t:"body"],i=y.text[n??e.size].size;return{fontSize:i,lineHeight:Math.round(i*y.leading[e.line]),color:resolveColor(y,m??e.color),textAlign:a,textTransform:e.uppercase?"uppercase":void 0,letterSpacing:e.letterSpacing?y["letter-spacing"][e.letterSpacing]:void 0,fontStyle:l?"italic":void 0,textDecorationLine:s?"underline":void 0,...(0,_index.fontFor)(y,o??e.weight,e.fontFamily)}},[y,p,u,t,m,o,n,a,l,s]),v=(0,_Notation.useNotationInk)([h,d],y.text.base.size,y.colors["text-body"]),b=u?VARIANTS[t].heading:p?.heading,_="string"==typeof c||"number"==typeof c;return(0,_jsxRuntime.jsx)(_reactNative.Text,{ref:i,style:[h,d],maxFontSizeMultiplier:y.settings.maxFontSizeMultiplier,accessibilityRole:b?"header":x.accessibilityRole,...x,children:_?c:(0,_jsxRuntime.jsx)(_Notation.NotationInkContext.Provider,{value:v,children:c})})});Text.displayName="Text";var _default=exports.default=Text;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveColor=exports.default=exports.Text=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_tokensGenerated=require("../../theme/tokens.generated.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_Notation=require("../Notation/Notation.js"),_jsxRuntime=require("react/jsx-runtime");const VARIANTS={display:{size:"4xl",weight:"bold",line:"display",color:"primary",heading:!0,fontFamily:"display"},h1:{size:"3xl",weight:"bold",line:"heading",color:"primary",heading:!0,fontFamily:"display"},h2:{size:"2xl",weight:"semibold",line:"heading",color:"primary",heading:!0,fontFamily:"display"},h3:{size:"xl",weight:"semibold",line:"heading",color:"primary",heading:!0},title:{size:"lg",weight:"semibold",line:"body",color:"primary",fontFamily:"display"},body:{size:"base",weight:"normal",line:"body",color:"primary"},bodySmall:{size:"sm",weight:"normal",line:"body",color:"secondary"},caption:{size:"xs",weight:"normal",line:"body",color:"tertiary"},label:{size:"sm",weight:"medium",line:"body",color:"secondary"},overline:{size:"xs",weight:"semibold",line:"body",color:"secondary",uppercase:!0,letterSpacing:"wide"}},TEXT_ROLE_COLOR={textStrong:"text",primary:"text-body",secondary:"text-muted",tertiary:"text-subtle",inverse:"text-inverse",disabled:"text-disabled",link:"link",brand:"primary"},SEMANTIC={success:!0,warning:!0,danger:!0,info:!0,neutral:!0},COLOR_NAMES=["primary","secondary","tertiary","inverse","disabled","link","textStrong","brand","success","warning","danger","info","neutral"],resolveColor=(e,t)=>Object.hasOwn(TEXT_ROLE_COLOR,t)?e.colors[TEXT_ROLE_COLOR[t]]:Object.hasOwn(SEMANTIC,t)?e.colors[`${t}-text`]:t;exports.resolveColor=resolveColor;const resolveVariantColor=(e,t)=>Object.hasOwn(TEXT_ROLE_COLOR,t)||Object.hasOwn(SEMANTIC,t)?resolveColor(e,t):e.colors[t],Text=exports.Text=(0,_react.forwardRef)((e,t)=>{const{variant:i="body",color:r,weight:o,size:n,align:a,italic:l,underline:s,style:d,children:c,...x}=e,y=(0,_index.useTheme)(),u=Object.hasOwn(VARIANTS,i),g=y.settings.textVariants,p=!u&&g&&Object.hasOwn(g,i)?g[i]:void 0;u||p||(0,_warnInvalidValue.warnInvalidValue)("Text","variant",e.variant,[...Object.keys(VARIANTS),...Object.keys(g??{})]),(0,_warnInvalidValue.warnInvalidValue)("Text","color",r,COLOR_NAMES),(0,_warnInvalidValue.warnInvalidValue)("Text","size",n,_tokensGenerated.TEXT_NAMES);const v=void 0!==r&&COLOR_NAMES.includes(r)?r:void 0,h=(0,_react.useMemo)(()=>{if(p){const e=n??p.size,t=y.text[e].size;return{fontSize:t,lineHeight:p.lineHeight??Math.round(t*y.leading[p.heading?"heading":"body"]),color:void 0!==v?resolveColor(y,v):p.color?resolveVariantColor(y,p.color):resolveColor(y,"primary"),textAlign:a,textTransform:p.uppercase?"uppercase":void 0,letterSpacing:p.letterSpacing?y["letter-spacing"][p.letterSpacing]:void 0,fontStyle:l||p.italic?"italic":void 0,fontVariant:p.fontVariant,textDecorationLine:s?"underline":void 0,...(0,_index.fontFor)(y,o??p.weight??"normal",p.fontFamily)}}const e=VARIANTS[u?i:"body"],t=y.text[n??e.size].size;return{fontSize:t,lineHeight:Math.round(t*y.leading[e.line]),color:resolveColor(y,v??e.color),textAlign:a,textTransform:e.uppercase?"uppercase":void 0,letterSpacing:e.letterSpacing?y["letter-spacing"][e.letterSpacing]:void 0,fontStyle:l?"italic":void 0,textDecorationLine:s?"underline":void 0,...(0,_index.fontFor)(y,o??e.weight,e.fontFamily)}},[y,p,u,i,v,o,n,a,l,s]),m=(0,_Notation.useNotationInk)([h,d],y.text.base.size,y.colors["text-body"]),b=u?VARIANTS[i].heading:p?.heading,_="string"==typeof c||"number"==typeof c;return(0,_jsxRuntime.jsx)(_reactNative.Text,{ref:t,style:[h,d],maxFontSizeMultiplier:y.settings.maxFontSizeMultiplier,accessibilityRole:b?"header":x.accessibilityRole,...x,children:_?c:(0,_jsxRuntime.jsx)(_Notation.NotationInkContext.Provider,{value:m,children:c})})});Text.displayName="Text";var _default=exports.default=Text;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeBrand=void 0;var _componentSizes=require("./componentSizes.js"),_tokensGenerated=require("./tokens.generated.js"),_toneInk=require("./toneInk.js");const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},screen:{tabBarFloats:!0}},isPlainObject=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),validateBrand=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`A brand is an object of colors, radius and font; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e))if(!BRAND_KEYS.includes(t))throw new Error(`A brand sets colors, radius and font only; ${t} is not allowed (allowed: colors, radius, font). ${HINT}`);const t=e.colors;if(void 0!==t&&!isPlainObject(t))throw new Error(`A brand's colors is an object of light and dark; got ${typeof t}. ${HINT}`);for(const e of Object.keys(t??{})){if(!COLOR_MODES.includes(e))throw new Error(`A brand sets colours under light and dark only; ${e} is not allowed (allowed: light, dark). ${HINT}`);const o=t[e];for(const e of Object.keys(o)){if(!_tokensGenerated.COLOR_NAMES.includes(e))throw new Error(`unknown colour ${e}; allowed: ${_tokensGenerated.COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==o[e]&&"string"!=typeof o[e])throw new Error(`colour ${e} must be a string; got ${typeof o[e]}.`)}}const o=e.radius;if(void 0!==o&&!isPlainObject(o))throw new Error(`A brand's radius is an object of radius names; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o??{})){const t=o[e];if(!_tokensGenerated.RADIUS_NAMES.includes(e))throw new Error(`unknown radius ${e}; allowed: ${RADIUS_ALLOWED}. ${HINT}`);if(FIXED_RADII.includes(e))throw new Error(`radius ${e} is fixed by the library; allowed: ${RADIUS_ALLOWED}.`);if("number"!=typeof t||!Number.isFinite(t))throw new Error(`radius ${e} must be a number; got ${typeof t}.`)}const n=e.font;if(void 0!==n&&!isPlainObject(n))throw new Error(`A brand's font is an object of font names; got ${typeof n}. ${HINT}`);for(const e of Object.keys(n??{})){if(!_tokensGenerated.FONT_NAMES.includes(e))throw new Error(`unknown font ${e}; allowed: ${_tokensGenerated.FONT_NAMES.join(", ")}. ${HINT}`);const t=n[e];if(!isPlainObject(t))throw new Error(`font ${e} must be an object of weights; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){if(!_tokensGenerated.WEIGHT_NAMES.includes(o))throw new Error(`unknown font weight ${o} in font ${e}; allowed: ${_tokensGenerated.WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=t[o];if("string"!=typeof n||0===n.length)throw new Error(`font ${e} weight ${o} must be a non-empty string.`)}}},validateSettings=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`Theme settings is an object; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e))if(!SETTINGS_KEYS.includes(t))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${t} is not allowed. ${HINT}`);const t=e.components;if(void 0===t)return;if(!isPlainObject(t))throw new Error(`Theme settings components is an object of component names; got ${typeof t}. ${HINT}`);const o=COMPONENT_SETTING_KEYS;for(const e of Object.keys(t)){if(!Object.keys(o).includes(e))throw new Error(`unknown component ${e} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const n=t[e];if(void 0===n)continue;if(!isPlainObject(n))throw new Error(`theme settings for ${e} is an object; got ${typeof n}. ${HINT}`);const r=o[e];for(const t of Object.keys(n))if(!(t in r))throw new Error(`unknown setting ${t} for ${e}; allowed: ${Object.keys(r).join(", ")}. ${HINT}`)}},TONES=["primary","success","warning","danger","info"],mergeBrand=(e,t,o)=>{validateBrand(t),validateSettings(o);const n=Object.fromEntries(Object.entries(t?.colors?.[e.mode]??{}).filter(([,e])=>void 0!==e)),r={...e.colors,...n},s={...e.radius,...t?.radius},i={...e.font};for(const o of Object.keys(t?.font??{}))i[o]={...e.font[o],...t?.font?.[o]};const a=[r.bg,r["bg-subtle"],r["bg-muted"]],l={};for(const t of TONES){const o="string"==typeof n[t];let s=r[t];if(o||"string"==typeof n[`on-${t}`]){const e=(0,_toneInk.deriveSolidFill)(s,r[`on-${t}`]);e!==s&&(l[t]=e,s=e)}if(o&&"string"!=typeof n[`${t}-text`]&&(l[`${t}-text`]=(0,_toneInk.deriveToneInk)(s,a,e.mode)),"primary"===t&&(o||void 0!==l.primary)){const t=(0,_toneInk.deriveStateFills)(s,r["on-primary"],{fill:e.colors.primary,hover:e.colors["primary-hover"],pressed:e.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(l["primary-hover"]=t.hover),"string"!=typeof n["primary-pressed"]&&(l["primary-pressed"]=t.pressed)}}const d={},c=new Set([...Object.keys(e.settings.components),...Object.keys(o?.components??{})]);for(const t of c)d[t]={...e.settings.components[t],...o?.components?.[t]};const f=o?.maxFontSizeMultiplier??e.settings.maxFontSizeMultiplier,u={icons:{...e.settings.icons,...o?.icons},gradients:{...e.settings.gradients,...o?.gradients},textVariants:{...e.settings.textVariants,...o?.textVariants},components:d,...void 0===f?{}:{maxFontSizeMultiplier:f}},p={...e,colors:{...r,...l},radius:s,font:i,settings:u};return(0,_componentSizes.validateComponentTokens)(p),p};exports.mergeBrand=mergeBrand;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeBrand=void 0;var _componentSizes=require("./componentSizes.js"),_tokensGenerated=require("./tokens.generated.js"),_toneInk=require("./toneInk.js");const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},card:{defaultVariant:!0,defaultPadding:!0,defaultRadius:!0,defaultTitleFont:!0},"section-header":{defaultVariant:!0,defaultFlush:!0},"empty-state":{defaultSize:!0,defaultVariant:!0},screen:{tabBarFloats:!0}},isPlainObject=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),validateBrand=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`A brand is an object of colors, radius and font; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e))if(!BRAND_KEYS.includes(t))throw new Error(`A brand sets colors, radius and font only; ${t} is not allowed (allowed: colors, radius, font). ${HINT}`);const t=e.colors;if(void 0!==t&&!isPlainObject(t))throw new Error(`A brand's colors is an object of light and dark; got ${typeof t}. ${HINT}`);for(const e of Object.keys(t??{})){if(!COLOR_MODES.includes(e))throw new Error(`A brand sets colours under light and dark only; ${e} is not allowed (allowed: light, dark). ${HINT}`);const o=t[e];for(const e of Object.keys(o)){if(!_tokensGenerated.COLOR_NAMES.includes(e))throw new Error(`unknown colour ${e}; allowed: ${_tokensGenerated.COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==o[e]&&"string"!=typeof o[e])throw new Error(`colour ${e} must be a string; got ${typeof o[e]}.`)}}const o=e.radius;if(void 0!==o&&!isPlainObject(o))throw new Error(`A brand's radius is an object of radius names; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o??{})){const t=o[e];if(!_tokensGenerated.RADIUS_NAMES.includes(e))throw new Error(`unknown radius ${e}; allowed: ${RADIUS_ALLOWED}. ${HINT}`);if(FIXED_RADII.includes(e))throw new Error(`radius ${e} is fixed by the library; allowed: ${RADIUS_ALLOWED}.`);if("number"!=typeof t||!Number.isFinite(t))throw new Error(`radius ${e} must be a number; got ${typeof t}.`)}const n=e.font;if(void 0!==n&&!isPlainObject(n))throw new Error(`A brand's font is an object of font names; got ${typeof n}. ${HINT}`);for(const e of Object.keys(n??{})){if(!_tokensGenerated.FONT_NAMES.includes(e))throw new Error(`unknown font ${e}; allowed: ${_tokensGenerated.FONT_NAMES.join(", ")}. ${HINT}`);const t=n[e];if(!isPlainObject(t))throw new Error(`font ${e} must be an object of weights; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){if(!_tokensGenerated.WEIGHT_NAMES.includes(o))throw new Error(`unknown font weight ${o} in font ${e}; allowed: ${_tokensGenerated.WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=t[o];if("string"!=typeof n||0===n.length)throw new Error(`font ${e} weight ${o} must be a non-empty string.`)}}},validateSettings=e=>{if(void 0===e)return;if(!isPlainObject(e))throw new Error(`Theme settings is an object; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e))if(!SETTINGS_KEYS.includes(t))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${t} is not allowed. ${HINT}`);const t=e.components;if(void 0===t)return;if(!isPlainObject(t))throw new Error(`Theme settings components is an object of component names; got ${typeof t}. ${HINT}`);const o=COMPONENT_SETTING_KEYS;for(const e of Object.keys(t)){if(!Object.keys(o).includes(e))throw new Error(`unknown component ${e} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const n=t[e];if(void 0===n)continue;if(!isPlainObject(n))throw new Error(`theme settings for ${e} is an object; got ${typeof n}. ${HINT}`);const r=o[e];for(const t of Object.keys(n))if(!(t in r))throw new Error(`unknown setting ${t} for ${e}; allowed: ${Object.keys(r).join(", ")}. ${HINT}`)}},TONES=["primary","success","warning","danger","info"],mergeBrand=(e,t,o)=>{validateBrand(t),validateSettings(o);const n=Object.fromEntries(Object.entries(t?.colors?.[e.mode]??{}).filter(([,e])=>void 0!==e)),r={...e.colors,...n},s={...e.radius,...t?.radius},i={...e.font};for(const o of Object.keys(t?.font??{}))i[o]={...e.font[o],...t?.font?.[o]};const a=[r.bg,r["bg-subtle"],r["bg-muted"]],d={};for(const t of TONES){const o="string"==typeof n[t];let s=r[t];if(o||"string"==typeof n[`on-${t}`]){const e=(0,_toneInk.deriveSolidFill)(s,r[`on-${t}`]);e!==s&&(d[t]=e,s=e)}if(o&&"string"!=typeof n[`${t}-text`]&&(d[`${t}-text`]=(0,_toneInk.deriveToneInk)(s,a,e.mode)),"primary"===t&&(o||void 0!==d.primary)){const t=(0,_toneInk.deriveStateFills)(s,r["on-primary"],{fill:e.colors.primary,hover:e.colors["primary-hover"],pressed:e.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(d["primary-hover"]=t.hover),"string"!=typeof n["primary-pressed"]&&(d["primary-pressed"]=t.pressed)}}const l={},f=new Set([...Object.keys(e.settings.components),...Object.keys(o?.components??{})]);for(const t of f)l[t]={...e.settings.components[t],...o?.components?.[t]};const c=o?.maxFontSizeMultiplier??e.settings.maxFontSizeMultiplier,u={icons:{...e.settings.icons,...o?.icons},gradients:{...e.settings.gradients,...o?.gradients},textVariants:{...e.settings.textVariants,...o?.textVariants},components:l,...void 0===c?{}:{maxFontSizeMultiplier:c}},p={...e,colors:{...r,...d},radius:s,font:i,settings:u};return(0,_componentSizes.validateComponentTokens)(p),p};exports.mergeBrand=mergeBrand;
@@ -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"}}};