@webority/mobile-ui 0.108.1 → 0.109.1

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 (50) hide show
  1. package/dist/canvas-kit/kit.js +2117 -1906
  2. package/dist/canvas-kit/manifest.json +93 -4
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/lib/commonjs/components/Banner/Banner.js +1 -1
  5. package/lib/commonjs/components/BarChart/BarChart.js +1 -1
  6. package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +1 -1
  7. package/lib/commonjs/components/Composer/Composer.js +1 -1
  8. package/lib/commonjs/components/Descriptions/Descriptions.js +1 -1
  9. package/lib/commonjs/components/FilterChipRow/FilterChipRow.js +1 -1
  10. package/lib/commonjs/components/SectionHeader/SectionHeader.js +1 -1
  11. package/lib/commonjs/components/Timeline/Timeline.js +1 -1
  12. package/lib/commonjs/navigation/NavigationScreen.js +1 -1
  13. package/lib/module/components/Banner/Banner.js +1 -1
  14. package/lib/module/components/BarChart/BarChart.js +1 -1
  15. package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
  16. package/lib/module/components/Composer/Composer.js +1 -1
  17. package/lib/module/components/Descriptions/Descriptions.js +1 -1
  18. package/lib/module/components/FilterChipRow/FilterChipRow.js +1 -1
  19. package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
  20. package/lib/module/components/Timeline/Timeline.js +1 -1
  21. package/lib/module/navigation/NavigationScreen.js +1 -1
  22. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +10 -0
  23. package/lib/typescript/commonjs/components/Banner/index.d.ts +1 -1
  24. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +24 -4
  25. package/lib/typescript/commonjs/components/BarChart/index.d.ts +1 -1
  26. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +4 -3
  27. package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +2 -0
  28. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +5 -0
  29. package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +2 -0
  30. package/lib/typescript/commonjs/components/FilterChipRow/FilterChipRow.d.ts +2 -0
  31. package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +7 -0
  32. package/lib/typescript/commonjs/components/SectionHeader/index.d.ts +1 -1
  33. package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +2 -0
  34. package/lib/typescript/commonjs/components/index.d.ts +2 -2
  35. package/lib/typescript/commonjs/navigation/NavigationScreen.d.ts +6 -1
  36. package/lib/typescript/module/components/Banner/Banner.d.ts +10 -0
  37. package/lib/typescript/module/components/Banner/index.d.ts +1 -1
  38. package/lib/typescript/module/components/BarChart/BarChart.d.ts +24 -4
  39. package/lib/typescript/module/components/BarChart/index.d.ts +1 -1
  40. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +4 -3
  41. package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +2 -0
  42. package/lib/typescript/module/components/Composer/Composer.d.ts +5 -0
  43. package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +2 -0
  44. package/lib/typescript/module/components/FilterChipRow/FilterChipRow.d.ts +2 -0
  45. package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +7 -0
  46. package/lib/typescript/module/components/SectionHeader/index.d.ts +1 -1
  47. package/lib/typescript/module/components/Timeline/Timeline.d.ts +2 -0
  48. package/lib/typescript/module/components/index.d.ts +2 -2
  49. package/lib/typescript/module/navigation/NavigationScreen.d.ts +6 -1
  50. package/package.json +7 -7
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useCallback,useMemo}from"react";import{Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{hasChoiceDetail}from"../FieldBase/ChoiceText.js";import{RadioDot}from"../Radio/RadioDot.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const sizeTokensOf=e=>({sm:{paddingHorizontal:e.space.sm,chipPaddingHorizontal:e.space.md,paddingVertical:e.space.xs,fontSize:e.text.sm.size,minHeight:32,iconSize:14},md:{paddingHorizontal:e.space.md,chipPaddingHorizontal:e.space.lg,paddingVertical:e.space.sm,fontSize:e.text.base.size,minHeight:40,iconSize:16},lg:{paddingHorizontal:e.space.lg,chipPaddingHorizontal:e.space.xl,paddingVertical:e.space.md,fontSize:e.text.lg.size,minHeight:48,iconSize:18}}),ChoiceGroup=forwardRef((e,i)=>{const{options:o,getOptionLabel:t,getOptionValue:r,isOptionDisabled:l,getOptionDescription:a,getOptionIcon:s,getOptionColor:n,renderOption:d,variant:c="card",indicatorPosition:p="trailing",direction:u="row",gap:m,wrap:g=!1,fullWidth:h,disabled:b=!1,size:x="md",labelLines:f,descriptionLines:y=2,haptic:z,accessibilityLabel:C,style:j,optionStyle:v,description:S,helperText:w,error:H,testID:V}=e,T=useTheme(),_=useMemo(()=>buildStyles(T),[T]),k=useMemo(()=>sizeTokensOf(T)[x],[T,x]);warnInvalidValue("ChoiceGroup","variant",e.variant,["card","chip"]),warnInvalidValue("ChoiceGroup","size",e.size,["sm","md","lg"]),warnInvalidValue("ChoiceGroup","direction",e.direction,["row","column"]),warnInvalidValue("ChoiceGroup","indicatorPosition",e.indicatorPosition,["leading","trailing"]),warnInvalidValue("ChoiceGroup","selectionMode",e.selectionMode,["single","multiple"]);const I=useCallback(e=>t?t(e):e.label??"",[t]),O=useCallback(e=>r?r(e):e.value,[r]),D=useCallback(e=>l?l(e):!0===e.disabled,[l]),L=useCallback(e=>a?a(e):e.description,[a]),G=useCallback(e=>s?s(e):e.icon,[s]),M=useCallback(e=>n?n(e):e.color,[n]),P="multiple"===e.selectionMode,{min:R,max:F}=e,[W,A]=useControllableState({value:e.value,defaultValue:e.defaultValue??(P?[]:void 0),onChange:e.onChange}),B=Array.isArray(W)?W:[],$=useCallback(e=>{const i=O(e);if(P){const e=B.includes(i);if(e&&null!=R&&B.length<=R)return;if(!e&&null!=F&&B.length>=F)return;const o=resolveHaptic(z,"selection");return o&&triggerHaptic(o),void A(e?B.filter(e=>e!==i):[...B,i])}const o=resolveHaptic(z,"selection");o&&triggerHaptic(o),A(i)},[z,P,R,F,B,A,O]),N=h??("card"===c&&"row"===u&&!g),q=T.radius.md,surfaceFor=(e,i,o)=>i?{borderColor:T.colors.border,backgroundColor:T.colors["surface-disabled"]}:{borderColor:e?o:T.colors.border,backgroundColor:e?tintOf(o,.12,T.colors["surface-selected"]):T.colors.bg},renderIcon=(e,i,o,t)=>{const r=G(e);if(null==r)return null;return renderSlotIcon("string"==typeof r&&i?{name:r,variant:"bold"}:r,{color:o,size:k.iconSize,disabled:t})},renderChip=e=>{const{option:i,selected:o,disabled:t,color:r}=e,l=t?T.colors["text-disabled"]:o?r:T.colors["text-body"],a=renderIcon(i,o,l,t);return _jsxs(View,{style:[_.chip,{minHeight:k.minHeight,paddingHorizontal:k.chipPaddingHorizontal,paddingVertical:k.paddingVertical,borderRadius:T.radius.pill,...smoothCorners,borderWidth:T.size.border,...surfaceFor(o,t,r),columnGap:T.space.xs}],children:[a?_jsx(View,{children:a}):null,_jsx(Text,{weight:"medium",numberOfLines:f,ellipsizeMode:"tail",style:[_.cardLabel,{color:l,fontSize:k.fontSize,lineHeight:Math.round(k.fontSize*T.leading.body)}],children:I(i)})]})},renderDefaultCard=e=>{const{option:i,selected:o,disabled:t,color:r}=e,l=M(i),a=t?T.colors["text-disabled"]:l??T.colors["text-body"],s=L(i),n=renderIcon(i,o,a,t),d=_jsx(RadioDot,{selected:o,color:r,disabled:t,size:x});return _jsxs(View,{style:[_.card,{minHeight:k.minHeight,paddingHorizontal:k.paddingHorizontal,paddingVertical:k.paddingVertical,borderRadius:q,...smoothCorners,borderWidth:T.size.border,...surfaceFor(o,t,r),columnGap:T.space.sm}],children:["leading"===p?d:null,n?_jsx(View,{children:n}):null,_jsxs(View,{style:_.cardTextWrap,children:[_jsx(Text,{weight:"medium",numberOfLines:f,ellipsizeMode:"tail",style:[_.cardLabel,{color:a,fontSize:k.fontSize,lineHeight:Math.round(k.fontSize*T.leading.body)}],children:I(i)}),s?_jsx(Text,{numberOfLines:y,ellipsizeMode:"tail",style:[_.cardDescription,{color:o?T.colors["text-muted"]:T.colors["text-subtle"],fontSize:T.text.xs.size,lineHeight:Math.round(T.text.xs.size*T.leading.body)}],children:s}):null]}),"trailing"===p?d:null]})},E="string"==typeof H&&""!==H?H:void 0,J=!0===H||void 0!==E?null:w,K=_jsx(View,{ref:i,accessibilityRole:P?void 0:"radiogroup",accessibilityLabel:C,accessibilityState:{disabled:b},"aria-disabled":b,testID:V,style:[{flexDirection:u,gap:m??T.space.sm,flexWrap:g?"wrap":"nowrap"},j],children:o.map((e,i)=>{const o=O(e),t=P?B.includes(o):W===o,r=P&&null!=F&&!t&&B.length>=F,l=b||r||D(e),a=M(e)??T.colors.primary,s=d||"card"!==c?void 0:L(e);return _jsx(Pressable,{onPress:()=>{l||$(e)},disabled:l,accessibilityRole:P?"checkbox":"radio",accessibilityLabel:s?`${I(e)}, ${s}`:I(e),accessibilityState:{checked:t,disabled:l},"aria-checked":t,"aria-disabled":l,style:[N?_.stretchOption:null,{opacity:l&&d?.55:1},v],children:({pressed:o})=>{const r={option:e,index:i,selected:t,pressed:o&&!l,disabled:l,color:a};return _jsx(_Fragment,{children:d?d(r):"chip"===c?renderChip(r):renderDefaultCard(r)})}},String(o))})});return hasChoiceDetail({description:S,error:E,helperText:J??void 0})?_jsxs(View,{children:[S?_jsx(Text,{variant:"bodySmall",color:"secondary",style:{marginBottom:T.space.xs},children:S}):null,K,void 0!==E?_jsx(Text,{variant:"caption",color:"danger",accessibilityLiveRegion:"polite",style:{marginTop:T.space.xs},children:E}):J?_jsx(Text,{variant:"caption",color:"tertiary",style:{marginTop:T.space.xs},children:J}):null]}):K});ChoiceGroup.displayName="ChoiceGroup";const buildStyles=e=>StyleSheet.create({stretchOption:{flex:1},card:{flexDirection:"row",alignItems:"center"},chip:{flexDirection:"row",alignItems:"center",justifyContent:"center"},cardTextWrap:{flex:1},cardLabel:{includeFontPadding:!1},cardDescription:{includeFontPadding:!1,marginTop:e.space.xxs}});export{ChoiceGroup};export default ChoiceGroup;
1
+ "use strict";import{forwardRef,useCallback,useMemo}from"react";import{Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{hasChoiceDetail}from"../FieldBase/ChoiceText.js";import{RadioDot}from"../Radio/RadioDot.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const sizeTokensOf=e=>({sm:{paddingHorizontal:e.space.sm,chipPaddingHorizontal:e.space.md,paddingVertical:e.space.xs,fontSize:e.text.sm.size,minHeight:32,iconSize:14},md:{paddingHorizontal:e.space.md,chipPaddingHorizontal:e.space.lg,paddingVertical:e.space.sm,fontSize:e.text.base.size,minHeight:40,iconSize:16},lg:{paddingHorizontal:e.space.lg,chipPaddingHorizontal:e.space.xl,paddingVertical:e.space.md,fontSize:e.text.lg.size,minHeight:48,iconSize:18}}),ChoiceGroup=forwardRef((e,i)=>{const{options:o,getOptionLabel:t,getOptionValue:r,isOptionDisabled:l,getOptionDescription:a,getOptionIcon:s,getOptionColor:n,renderOption:d,variant:c="card",indicatorPosition:p="trailing",direction:u="row",gap:m,wrap:g=!1,fullWidth:h,disabled:b=!1,size:x="md",labelLines:f,descriptionLines:y=2,haptic:z,accessibilityLabel:C,style:j,optionStyle:v,description:S,helperText:w,error:H,testID:V}=e,T=useTheme(),_=useMemo(()=>buildStyles(T),[T]),I=useMemo(()=>sizeTokensOf(T)[x],[T,x]);warnInvalidValue("ChoiceGroup","variant",e.variant,["card","chip"]),warnInvalidValue("ChoiceGroup","size",e.size,["sm","md","lg"]),warnInvalidValue("ChoiceGroup","direction",e.direction,["row","column"]),warnInvalidValue("ChoiceGroup","indicatorPosition",e.indicatorPosition,["leading","trailing"]),warnInvalidValue("ChoiceGroup","selectionMode",e.selectionMode,["single","multiple"]);const k=useCallback(e=>t?t(e):e.label??"",[t]),D=useCallback(e=>r?r(e):e.value,[r]),O=useCallback(e=>l?l(e):!0===e.disabled,[l]),L=useCallback(e=>a?a(e):e.description,[a]),G=useCallback(e=>s?s(e):e.icon,[s]),M=useCallback(e=>n?n(e):e.color,[n]),P="multiple"===e.selectionMode,{min:R,max:F}=e,[W,A]=useControllableState({value:e.value,defaultValue:e.defaultValue??(P?[]:void 0),onChange:e.onChange}),B=Array.isArray(W)?W:[],$=useCallback(e=>{const i=D(e);if(P){const e=B.includes(i);if(e&&null!=R&&B.length<=R)return;if(!e&&null!=F&&B.length>=F)return;const o=resolveHaptic(z,"selection");return o&&triggerHaptic(o),void A(e?B.filter(e=>e!==i):[...B,i])}const o=resolveHaptic(z,"selection");o&&triggerHaptic(o),A(i)},[z,P,R,F,B,A,D]),N=h??("card"===c&&"row"===u&&!g),q=T.radius.md,surfaceFor=(e,i,o)=>i?{borderColor:T.colors.border,backgroundColor:T.colors["surface-disabled"]}:{borderColor:e?o:T.colors.border,backgroundColor:e?tintOf(o,.12,T.colors["surface-selected"]):T.colors.bg},renderIcon=(e,i,o,t)=>{const r=G(e);if(null==r)return null;return renderSlotIcon("string"==typeof r&&i?{name:r,variant:"bold"}:r,{color:o,size:I.iconSize,disabled:t})},renderChip=e=>{const{option:i,selected:o,disabled:t,color:r}=e,l=t?T.colors["text-disabled"]:o?r:T.colors["text-body"],a=renderIcon(i,o,l,t);return _jsxs(View,{style:[_.chip,{minHeight:I.minHeight,paddingHorizontal:I.chipPaddingHorizontal,paddingVertical:I.paddingVertical,borderRadius:T.radius.pill,...smoothCorners,borderWidth:T.size.border,...surfaceFor(o,t,r),columnGap:T.space.xs}],children:[a?_jsx(View,{children:a}):null,_jsx(Text,{weight:"medium",numberOfLines:f,ellipsizeMode:"tail",style:[_.cardLabel,{color:l,fontSize:I.fontSize,lineHeight:Math.round(I.fontSize*T.leading.body)}],children:k(i)})]})},renderDefaultCard=e=>{const{option:i,selected:o,disabled:t,color:r}=e,l=M(i),a=t?T.colors["text-disabled"]:l??T.colors["text-body"],s=L(i),n=renderIcon(i,o,a,t),d=_jsx(RadioDot,{selected:o,color:r,disabled:t,size:x});return _jsxs(View,{style:[_.card,{minHeight:I.minHeight,paddingHorizontal:I.paddingHorizontal,paddingVertical:I.paddingVertical,borderRadius:q,...smoothCorners,borderWidth:T.size.border,...surfaceFor(o,t,r),columnGap:T.space.sm}],children:["leading"===p?d:null,n?_jsx(View,{children:n}):null,_jsxs(View,{style:_.cardTextWrap,children:[_jsx(Text,{weight:"medium",numberOfLines:f,ellipsizeMode:"tail",style:[_.cardLabel,{color:a,fontSize:I.fontSize,lineHeight:Math.round(I.fontSize*T.leading.body)}],children:k(i)}),s?_jsx(Text,{numberOfLines:y,ellipsizeMode:"tail",style:[_.cardDescription,{color:o?T.colors["text-muted"]:T.colors["text-subtle"],fontSize:T.text.xs.size,lineHeight:Math.round(T.text.xs.size*T.leading.body)}],children:s}):null]}),"trailing"===p?d:null]})},E="string"==typeof H&&""!==H?H:void 0,J=!0===H||void 0!==E?null:w,K=_jsx(View,{ref:i,accessibilityRole:P?void 0:"radiogroup",accessibilityLabel:C,accessibilityState:{disabled:b},"aria-disabled":b,testID:V,style:[{flexDirection:u,gap:m??T.space.sm,flexWrap:g?"wrap":"nowrap"},j],children:o.map((e,i)=>{const o=D(e),t=P?B.includes(o):W===o,r=P&&null!=F&&!t&&B.length>=F,l=b||r||O(e),a=M(e)??T.colors.primary,s=d||"card"!==c?void 0:L(e);return _jsx(Pressable,{testID:e.testID,onPress:()=>{l||$(e)},disabled:l,accessibilityRole:P?"checkbox":"radio",accessibilityLabel:s?`${k(e)}, ${s}`:k(e),accessibilityState:{checked:t,disabled:l},"aria-checked":t,"aria-disabled":l,style:[N?_.stretchOption:null,{opacity:l&&d?.55:1},v],children:({pressed:o})=>{const r={option:e,index:i,selected:t,pressed:o&&!l,disabled:l,color:a};return _jsx(_Fragment,{children:d?d(r):"chip"===c?renderChip(r):renderDefaultCard(r)})}},String(o))})});return hasChoiceDetail({description:S,error:E,helperText:J??void 0})?_jsxs(View,{children:[S?_jsx(Text,{variant:"bodySmall",color:"secondary",style:{marginBottom:T.space.xs},children:S}):null,K,void 0!==E?_jsx(Text,{variant:"caption",color:"danger",accessibilityLiveRegion:"polite",style:{marginTop:T.space.xs},children:E}):J?_jsx(Text,{variant:"caption",color:"tertiary",style:{marginTop:T.space.xs},children:J}):null]}):K});ChoiceGroup.displayName="ChoiceGroup";const buildStyles=e=>StyleSheet.create({stretchOption:{flex:1},card:{flexDirection:"row",alignItems:"center"},chip:{flexDirection:"row",alignItems:"center",justifyContent:"center"},cardTextWrap:{flex:1},cardLabel:{includeFontPadding:!1},cardDescription:{includeFontPadding:!1,marginTop:e.space.xxs}});export{ChoiceGroup};export default ChoiceGroup;
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useCallback,useMemo,useState}from"react";import{Platform,StyleSheet,TextInput,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useControllableState}from"../../hooks/useControllableState.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_COMPOSER_LABELS=Object.freeze({send:"Send",message:"Message"});const MIN_BOX=44;export const Composer=forwardRef(({onSend:e,value:o,onChangeText:t,placeholder:a,accessibilityLabel:s,labels:i,loading:r=!1,disabled:l=!1,maxLength:n,maxLines:d=5,leading:c,trailing:m,above:b,below:p,keyboardAware:u=!0,keyboardOffset:g,safeArea:h=!0,autoFocus:x,haptic:f,style:S,testID:y},C)=>{const j=useTheme(),v=useSafeAreaInsets(),w=useMemo(()=>buildStyles(j),[j]),L=i?{...DEFAULT_COMPOSER_LABELS,...i}:DEFAULT_COMPOSER_LABELS,[T,_]=useControllableState({value:o,defaultValue:"",onChange:t}),I=T.trim(),k=r||l||""===I,A=h?v.bottom:0,O=g??A,B=resolveFieldTextStyle(j,{disabled:l}),D=j.text.base.size,E=Math.round(D*j.leading.body),F=(44-E)/2,M=E*d+2*F,[V,z]=useState(void 0),P=useCallback(e=>{const o=e.nativeEvent.contentSize.height+2*F;z(Math.min(Math.max(o,44),M))},[F,M]),H=useCallback(()=>{k||(_(""),e(I))},[k,_,e,I]),R=_jsxs(View,{style:[w.bar,{paddingBottom:j.space.sm+A},S],testID:y,children:[b,_jsxs(View,{style:w.row,children:[c,_jsx(View,{style:[w.box,l?w.boxDisabled:null],children:_jsx(TextInput,{ref:C,value:T,onChangeText:_,multiline:!0,maxLength:n,editable:!l,autoFocus:x,placeholder:a??L.message,placeholderTextColor:B.placeholderColor,selectionColor:j.colors["field-caret"],accessibilityLabel:s??a??L.message,accessibilityState:{disabled:l},"aria-disabled":l,onContentSizeChange:"web"===Platform.OS?P:void 0,style:[w.input,{color:B.color,...B.weightStyle,fontSize:D,lineHeight:E,paddingVertical:F,maxHeight:M,height:"web"===Platform.OS?V:void 0}],testID:y?`${y}-input`:void 0})}),m,_jsx(IconButton,{icon:"send",accessibilityLabel:L.send,variant:"solid",tone:"primary",disabled:k,loading:r,haptic:f,onPress:H,testID:y?`${y}-send`:void 0})]}),p]});return u?_jsx(KeyboardStickyView,{offset:{closed:0,opened:O},children:R}):R});Composer.displayName="Composer";const buildStyles=e=>StyleSheet.create({bar:{gap:e.space.xs,paddingHorizontal:e.space.md,paddingTop:e.space.sm,backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors["border-subtle"]},row:{flexDirection:"row",alignItems:"flex-end",gap:e.space.sm},box:{flex:1,minHeight:44,justifyContent:"center",backgroundColor:e.colors["field-bg"],borderRadius:e.radius.pill,...smoothCorners,paddingHorizontal:e.space.md},boxDisabled:{backgroundColor:e.colors["field-bg-disabled"]},input:{margin:e.space.none,paddingHorizontal:e.space.none,includeFontPadding:!1,textAlignVertical:"top"}});export default Composer;
1
+ "use strict";import{forwardRef,useCallback,useMemo,useState}from"react";import{Platform,StyleSheet,TextInput,View}from"react-native";import{KeyboardStickyView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useControllableState}from"../../hooks/useControllableState.js";import{useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_COMPOSER_LABELS=Object.freeze({send:"Send",message:"Message"});const MIN_BOX=44;export const Composer=forwardRef(({onSend:e,value:o,onChangeText:t,placeholder:a,accessibilityLabel:s,labels:i,loading:r=!1,disabled:l=!1,canSend:n,maxLength:d,maxLines:c=5,leading:m,trailing:b,above:p,below:u,keyboardAware:g=!0,keyboardOffset:h,safeArea:x=!0,autoFocus:f,haptic:S,style:y,testID:C},j)=>{const v=useTheme(),w=useSafeAreaInsets(),L=useMemo(()=>buildStyles(v),[v]),T=i?{...DEFAULT_COMPOSER_LABELS,...i}:DEFAULT_COMPOSER_LABELS,[_,I]=useControllableState({value:o,defaultValue:"",onChange:t}),k=_.trim(),A=r||l||!(n??""!==k),O=x?w.bottom:0,B=h??O,D=resolveFieldTextStyle(v,{disabled:l}),E=v.text.base.size,F=Math.round(E*v.leading.body),M=(44-F)/2,V=F*c+2*M,[z,P]=useState(void 0),H=useCallback(e=>{const o=e.nativeEvent.contentSize.height+2*M;P(Math.min(Math.max(o,44),V))},[M,V]),R=useCallback(()=>{A||(I(""),e(k))},[A,I,e,k]),U=_jsxs(View,{style:[L.bar,{paddingBottom:v.space.sm+O},y],testID:C,children:[p,_jsxs(View,{style:L.row,children:[m,_jsx(View,{style:[L.box,l?L.boxDisabled:null],children:_jsx(TextInput,{ref:j,value:_,onChangeText:I,multiline:!0,maxLength:d,editable:!l,autoFocus:f,placeholder:a??T.message,placeholderTextColor:D.placeholderColor,selectionColor:v.colors["field-caret"],accessibilityLabel:s??a??T.message,accessibilityState:{disabled:l},"aria-disabled":l,onContentSizeChange:"web"===Platform.OS?H:void 0,style:[L.input,{color:D.color,...D.weightStyle,fontSize:E,lineHeight:F,paddingVertical:M,maxHeight:V,height:"web"===Platform.OS?z:void 0}],testID:C?`${C}-input`:void 0})}),b,_jsx(IconButton,{icon:"send",accessibilityLabel:T.send,variant:"solid",tone:"primary",disabled:A,loading:r,haptic:S,onPress:R,testID:C?`${C}-send`:void 0})]}),u]});return g?_jsx(KeyboardStickyView,{offset:{closed:0,opened:B},children:U}):U});Composer.displayName="Composer";const buildStyles=e=>StyleSheet.create({bar:{gap:e.space.xs,paddingHorizontal:e.space.md,paddingTop:e.space.sm,backgroundColor:e.colors.bg,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:e.colors["border-subtle"]},row:{flexDirection:"row",alignItems:"flex-end",gap:e.space.sm},box:{flex:1,minHeight:44,justifyContent:"center",backgroundColor:e.colors["field-bg"],borderRadius:e.radius.pill,...smoothCorners,paddingHorizontal:e.space.md},boxDisabled:{backgroundColor:e.colors["field-bg-disabled"]},input:{margin:e.space.none,paddingHorizontal:e.space.none,includeFontPadding:!1,textAlignVertical:"top"}});export default Composer;
@@ -1 +1 @@
1
- "use strict";import{isValidElement,useMemo}from"react";import{StyleSheet,Text,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Notation,NotationInkContext}from"../Notation/Notation.js";import{resolveColor}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const EMPTY_VALUE="-",rowKey=(e,t)=>e.key??("string"==typeof e.label?`${e.label}-${t}`:`row-${t}`),isEmptyValue=e=>null==e||""===e||Array.isArray(e)&&!e.length,isInlineText=e=>"string"==typeof e||"number"==typeof e||isValidElement(e)&&e.type===Notation||Array.isArray(e)&&e.length>0&&e.every(isInlineText);export const Descriptions=({items:e,columns:t=1,size:l="md",bordered:o=!1,title:r,variant:s="list",style:i,testID:n})=>{warnInvalidValue("Descriptions","size",l,["sm","md"]),warnInvalidValue("Descriptions","variant",s,["list","summary"]),warnInvalidValue("Descriptions","columns",t,[1,2]);const a=useTheme(),m=useMemo(()=>buildStyles(a),[a]),u="sm"===l?a.text.xs.size:a.text.sm.size,d="sm"===l?a.text.sm.size:a.text.base.size,x="sm"===l?a.space.xs:a.space.sm,c="summary"===s,y=useMemo(()=>({fontSize:u,color:a.colors["text-subtle"]}),[u,a.colors["text-subtle"]]),b=useMemo(()=>({fontSize:d,color:a.colors["text-muted"]}),[d,a.colors["text-muted"]]);return _jsxs(View,{style:[c?null:{gap:x},i],testID:n,children:[r?_jsx(Text,{style:[m.title,{fontSize:a.text.lg.size,color:a.colors["text-body"]}],children:r}):null,e.map((e,l)=>{const r=isEmptyValue(e.value),s=2===t&&!e.full,i=r?a.colors["text-subtle"]:resolveColor(a,e.tone??"primary"),n=fontFor(a,e.strong?"semibold":"normal"),f=r||isInlineText(e.value),p=r?"-":"string"==typeof e.value?e.value:_jsx(NotationInkContext.Provider,{value:{fontSize:d,color:i},children:e.value});return _jsxs(View,c?{style:[m.summaryRow,{paddingVertical:x,borderBottomColor:a.colors["border-subtle"]}],children:[_jsx(Text,{style:[m.summaryLabel,{fontSize:d,color:a.colors["text-muted"]}],children:_jsx(NotationInkContext.Provider,{value:b,children:e.label})}),f?_jsx(Text,{style:[m.summaryValue,{fontSize:d,color:i},n],children:p}):_jsx(View,{style:m.summaryValueView,children:e.value})]}:{style:[s?m.rowSide:m.rowStack,{paddingVertical:x},o&&l>0?m.bordered:null,o&&l>0?{borderTopColor:a.colors["border-subtle"]}:null],children:["string"==typeof e.label?_jsx(Text,{style:[m.label,{fontSize:u,color:a.colors["text-subtle"]},s?m.labelSide:null],children:e.label}):_jsx(View,{style:s?m.labelSide:null,children:_jsx(Text,{style:[m.label,{fontSize:u,color:a.colors["text-subtle"]}],children:_jsx(NotationInkContext.Provider,{value:y,children:e.label})})}),f?_jsx(Text,{style:[m.value,{fontSize:d,color:i},e.strong?n:null,s?m.valueSide:null],children:p}):_jsx(View,{style:s?m.valueSide:null,children:e.value})]},rowKey(e,l))})]})};const buildStyles=e=>StyleSheet.create({title:{...fontFor(e,"semibold")},rowStack:{gap:e.space.xxs},rowSide:{flexDirection:"row",alignItems:"flex-start",gap:e.space.md},bordered:{borderTopWidth:StyleSheet.hairlineWidth},label:{...fontFor(e,"semibold")},labelSide:{flex:4},value:{...fontFor(e,"normal")},valueSide:{flex:6},summaryRow:{flexDirection:"row",alignItems:"center",gap:e.space.md,borderBottomWidth:StyleSheet.hairlineWidth},summaryLabel:{flex:1,...fontFor(e,"normal")},summaryValue:{textAlign:"right",flexShrink:1,maxWidth:"60%"},summaryValueView:{flexShrink:1,maxWidth:"60%",alignItems:"flex-end"}});export default Descriptions;
1
+ "use strict";import{isValidElement,useMemo}from"react";import{StyleSheet,Text,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Notation,NotationInkContext}from"../Notation/Notation.js";import{resolveColor}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const EMPTY_VALUE="-",rowKey=(e,t)=>e.key??("string"==typeof e.label?`${e.label}-${t}`:`row-${t}`),isEmptyValue=e=>null==e||""===e||Array.isArray(e)&&!e.length,isInlineText=e=>"string"==typeof e||"number"==typeof e||isValidElement(e)&&e.type===Notation||Array.isArray(e)&&e.length>0&&e.every(isInlineText);export const Descriptions=({items:e,columns:t=1,size:l="md",bordered:o=!1,title:r,variant:s="list",style:i,testID:n})=>{warnInvalidValue("Descriptions","size",l,["sm","md"]),warnInvalidValue("Descriptions","variant",s,["list","summary"]),warnInvalidValue("Descriptions","columns",t,[1,2]);const a=useTheme(),m=useMemo(()=>buildStyles(a),[a]),u="sm"===l?a.text.xs.size:a.text.sm.size,d="sm"===l?a.text.sm.size:a.text.base.size,x="sm"===l?a.space.xs:a.space.sm,c="summary"===s,y=useMemo(()=>({fontSize:u,color:a.colors["text-subtle"]}),[u,a.colors["text-subtle"]]),b=useMemo(()=>({fontSize:d,color:a.colors["text-muted"]}),[d,a.colors["text-muted"]]);return _jsxs(View,{style:[c?null:{gap:x},i],testID:n,children:[r?_jsx(Text,{style:[m.title,{fontSize:a.text.lg.size,color:a.colors["text-body"]}],children:r}):null,e.map((e,l)=>{const r=isEmptyValue(e.value),s=2===t&&!e.full,i=r?a.colors["text-subtle"]:resolveColor(a,e.tone??"primary"),n=fontFor(a,e.strong?"semibold":"normal"),f=r||isInlineText(e.value),p=r?"-":"string"==typeof e.value?e.value:_jsx(NotationInkContext.Provider,{value:{fontSize:d,color:i},children:e.value});return _jsxs(View,c?{testID:e.testID,style:[m.summaryRow,{paddingVertical:x,borderBottomColor:a.colors["border-subtle"]}],children:[_jsx(Text,{style:[m.summaryLabel,{fontSize:d,color:a.colors["text-muted"]}],children:_jsx(NotationInkContext.Provider,{value:b,children:e.label})}),f?_jsx(Text,{style:[m.summaryValue,{fontSize:d,color:i},n],children:p}):_jsx(View,{style:m.summaryValueView,children:e.value})]}:{testID:e.testID,style:[s?m.rowSide:m.rowStack,{paddingVertical:x},o&&l>0?m.bordered:null,o&&l>0?{borderTopColor:a.colors["border-subtle"]}:null],children:["string"==typeof e.label?_jsx(Text,{style:[m.label,{fontSize:u,color:a.colors["text-subtle"]},s?m.labelSide:null],children:e.label}):_jsx(View,{style:s?m.labelSide:null,children:_jsx(Text,{style:[m.label,{fontSize:u,color:a.colors["text-subtle"]}],children:_jsx(NotationInkContext.Provider,{value:y,children:e.label})})}),f?_jsx(Text,{style:[m.value,{fontSize:d,color:i},e.strong?n:null,s?m.valueSide:null],children:p}):_jsx(View,{style:s?m.valueSide:null,children:e.value})]},rowKey(e,l))})]})};const buildStyles=e=>StyleSheet.create({title:{...fontFor(e,"semibold")},rowStack:{gap:e.space.xxs},rowSide:{flexDirection:"row",alignItems:"flex-start",gap:e.space.md},bordered:{borderTopWidth:StyleSheet.hairlineWidth},label:{...fontFor(e,"semibold")},labelSide:{flex:4},value:{...fontFor(e,"normal")},valueSide:{flex:6},summaryRow:{flexDirection:"row",alignItems:"center",gap:e.space.md,borderBottomWidth:StyleSheet.hairlineWidth},summaryLabel:{flex:1,...fontFor(e,"normal")},summaryValue:{textAlign:"right",flexShrink:1,maxWidth:"60%"},summaryValueView:{flexShrink:1,maxWidth:"60%",alignItems:"flex-end"}});export default Descriptions;
@@ -1 +1 @@
1
- "use strict";import{forwardRef,memo,useCallback,useEffect,useMemo,useRef}from"react";import{ScrollView,StyleSheet,View}from"react-native";import{useReducedMotion}from"../../hooks/index.js";import{useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Chip}from"../Chip/index.js";import{jsx as _jsx}from"react/jsx-runtime";const FilterChipRowItem=memo(({itemKey:e,label:t,count:i,disabled:a,selected:o,size:r,variant:n,tone:l,haptic:s,onSelect:c,onItemLayout:u})=>{const d=useCallback(()=>c(e),[c,e]),p=useCallback(t=>u(e,t.nativeEvent.layout),[u,e]);return _jsx(View,{onLayout:p,collapsable:!1,children:_jsx(Chip,{label:t,count:i,selected:o,selectionMode:"radio",disabled:a,size:r,variant:n,tone:l,haptic:!o&&s,onPress:d})})});FilterChipRowItem.displayName="FilterChipRowItem";const FilterChipRow=forwardRef((e,t)=>{const{items:i,value:a,onChange:o,bleed:r=0,size:n,variant:l,tone:s,haptic:c,accessibilityLabel:u,style:d,contentContainerStyle:p,testID:m}=e;warnInvalidValue("FilterChipRow","size",e.size,["sm","md"]),warnInvalidValue("FilterChipRow","variant",e.variant,["solid","soft","outline"]),warnInvalidValue("FilterChipRow","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const h=useTheme(),w=useReducedMotion(),C=useRef(null),f=useRef({viewport:0,content:0,chips:{},revealed:null}),y=useRef(a),b=useRef(o);useEffect(()=>{b.current=o},[o]);const v=useCallback((e,t)=>{const i=f.current,a=i.chips[e];if(!a||0===i.viewport||0===i.content)return;const o=a.x+a.width/2-i.viewport/2,r=Math.min(Math.max(o,0),Math.max(i.content-i.viewport,0));C.current?.scrollTo({x:r,animated:t&&!w}),i.revealed=e},[w]),R=useCallback(()=>{f.current.revealed!==y.current&&v(y.current,!1)},[v]);useEffect(()=>{y.current=a,v(a,!0)},[a,v]);const x=useCallback(e=>{f.current.viewport=e.nativeEvent.layout.width,R()},[R]),I=useCallback(e=>{f.current.content=e,R()},[R]),k=useCallback((e,t)=>{f.current.chips[e]={x:t.x,width:t.width},R()},[R]),S=useCallback(e=>{e!==y.current?b.current(e):v(e,!0)},[v]),j=useMemo(()=>[styles.row,{paddingHorizontal:r,columnGap:h.space.xs},p],[r,h.space.xs,p]);return _jsx(View,{ref:t,accessibilityRole:"radiogroup",accessibilityLabel:u,testID:m,style:[r>0?{marginHorizontal:-r}:null,d],children:_jsx(ScrollView,{ref:C,horizontal:!0,showsHorizontalScrollIndicator:!1,keyboardShouldPersistTaps:"handled",contentContainerStyle:j,onLayout:x,onContentSizeChange:I,children:i.map(e=>_jsx(FilterChipRowItem,{itemKey:e.key,label:e.label,count:e.count,disabled:e.disabled,selected:e.key===a,size:n,variant:l,tone:s,haptic:c,onSelect:S,onItemLayout:k},e.key))})})});FilterChipRow.displayName="FilterChipRow";const styles=StyleSheet.create({row:{alignItems:"center"}});export{FilterChipRow};export default FilterChipRow;
1
+ "use strict";import{forwardRef,memo,useCallback,useEffect,useMemo,useRef}from"react";import{ScrollView,StyleSheet,View}from"react-native";import{useReducedMotion}from"../../hooks/index.js";import{useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Chip}from"../Chip/index.js";import{jsx as _jsx}from"react/jsx-runtime";const FilterChipRowItem=memo(({itemKey:e,label:t,count:i,disabled:a,testID:o,selected:r,size:n,variant:l,tone:s,haptic:c,onSelect:u,onItemLayout:d})=>{const p=useCallback(()=>u(e),[u,e]),m=useCallback(t=>d(e,t.nativeEvent.layout),[d,e]);return _jsx(View,{onLayout:m,collapsable:!1,children:_jsx(Chip,{label:t,count:i,selected:r,selectionMode:"radio",disabled:a,testID:o,size:n,variant:l,tone:s,haptic:!r&&c,onPress:p})})});FilterChipRowItem.displayName="FilterChipRowItem";const FilterChipRow=forwardRef((e,t)=>{const{items:i,value:a,onChange:o,bleed:r=0,size:n,variant:l,tone:s,haptic:c,accessibilityLabel:u,style:d,contentContainerStyle:p,testID:m}=e;warnInvalidValue("FilterChipRow","size",e.size,["sm","md"]),warnInvalidValue("FilterChipRow","variant",e.variant,["solid","soft","outline"]),warnInvalidValue("FilterChipRow","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const h=useTheme(),w=useReducedMotion(),C=useRef(null),f=useRef({viewport:0,content:0,chips:{},revealed:null}),y=useRef(a),b=useRef(o);useEffect(()=>{b.current=o},[o]);const v=useCallback((e,t)=>{const i=f.current,a=i.chips[e];if(!a||0===i.viewport||0===i.content)return;const o=a.x+a.width/2-i.viewport/2,r=Math.min(Math.max(o,0),Math.max(i.content-i.viewport,0));C.current?.scrollTo({x:r,animated:t&&!w}),i.revealed=e},[w]),R=useCallback(()=>{f.current.revealed!==y.current&&v(y.current,!1)},[v]);useEffect(()=>{y.current=a,v(a,!0)},[a,v]);const x=useCallback(e=>{f.current.viewport=e.nativeEvent.layout.width,R()},[R]),I=useCallback(e=>{f.current.content=e,R()},[R]),k=useCallback((e,t)=>{f.current.chips[e]={x:t.x,width:t.width},R()},[R]),S=useCallback(e=>{e!==y.current?b.current(e):v(e,!0)},[v]),j=useMemo(()=>[styles.row,{paddingHorizontal:r,columnGap:h.space.xs},p],[r,h.space.xs,p]);return _jsx(View,{ref:t,accessibilityRole:"radiogroup",accessibilityLabel:u,testID:m,style:[r>0?{marginHorizontal:-r}:null,d],children:_jsx(ScrollView,{ref:C,horizontal:!0,showsHorizontalScrollIndicator:!1,keyboardShouldPersistTaps:"handled",contentContainerStyle:j,onLayout:x,onContentSizeChange:I,children:i.map(e=>_jsx(FilterChipRowItem,{itemKey:e.key,label:e.label,count:e.count,disabled:e.disabled,testID:e.testID,selected:e.key===a,size:n,variant:l,tone:s,haptic:c,onSelect:S,onItemLayout:k},e.key))})})});FilterChipRow.displayName="FilterChipRow";const styles=StyleSheet.create({row:{alignItems:"center"}});export{FilterChipRow};export default FilterChipRow;
@@ -1 +1 @@
1
- "use strict";import{useMemo}from"react";import{useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{RequiredMark}from"../FieldBase/index.js";import{Text}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_SECTION_HEADER_LABELS=Object.freeze({required:e=>`${e}, required`});export const SectionHeader=e=>{const{children:r,variant:t="title",flush:i=!1,required:a=!1,labels:s,style:o,testID:l}=e;warnInvalidValue("SectionHeader","variant",e.variant,["title","caps","sub"]);const n=useTheme(),c=useMemo(()=>({...DEFAULT_SECTION_HEADER_LABELS,...s}),[s]),m=useMemo(()=>({marginTop:i?0:n.space.lg,marginBottom:n.space.sm}),[n,i]),d="caps"===t?{variant:"overline",color:"tertiary",weight:void 0}:"sub"===t?{variant:"label",color:"primary",weight:"semibold"}:{variant:"title",color:void 0,weight:void 0};return _jsxs(Text,{variant:d.variant,color:d.color,weight:d.weight,accessibilityRole:"header",accessibilityLabel:a&&"string"==typeof r?c.required(r):void 0,style:[m,o],testID:l,children:[r,a?_jsx(RequiredMark,{}):null]})};export default SectionHeader;
1
+ "use strict";import{useMemo}from"react";import{View}from"react-native";import{useTheme}from"../../theme/index.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Button}from"../Button/index.js";import{RequiredMark}from"../FieldBase/index.js";import{Text}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_SECTION_HEADER_LABELS=Object.freeze({required:e=>`${e}, required`});export const SectionHeader=e=>{const{children:t,variant:r="title",flush:i=!1,required:s=!1,action:a,labels:o,style:n,testID:l}=e;warnInvalidValue("SectionHeader","variant",e.variant,["title","caps","sub"]);const m=useTheme(),c=useMemo(()=>({...DEFAULT_SECTION_HEADER_LABELS,...o}),[o]),u=useMemo(()=>({marginTop:i?0:m.space.lg,marginBottom:m.space.sm}),[m,i]),d=useMemo(()=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:m.space.sm}),[m]),p=useMemo(()=>({flex:1}),[]),x="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},v=_jsxs(Text,{variant:x.variant,color:x.color,weight:x.weight,accessibilityRole:"header",accessibilityLabel:s&&"string"==typeof t?c.required(t):void 0,style:a?p:[u,n],testID:l,children:[t,s?_jsx(RequiredMark,{}):null]});return a?_jsxs(View,{style:[d,u,n],children:[v,_jsx(Button,{variant:"link",size:"sm",label:a.label,onPress:a.onPress,testID:a.testID})]}):v};export default SectionHeader;
@@ -1 +1 @@
1
- "use strict";import{useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{useTheme}from"../../theme/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Text}from"../Text/index.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const DOT=12,HALO=6,RAIL=2,GUTTER=28,DISC=24,HALO_OPACITY=.16,STATUS_VALUES=["upcoming","current","done","onHold","rejected","cancelled","skipped"];export const Timeline=({items:e,variant:t="feed",orientation:r="vertical",style:s,testID:o})=>{const l=useTheme(),n=l.space.xs,i=useMemo(()=>buildStyles(l),[l]),a="horizontal"===r,c=l.colors.border;warnInvalidValue("Timeline","variant",t,["feed","progress"]),warnInvalidValue("Timeline","orientation",r,["vertical","horizontal"]);const[d,u]=useState(0),m=useCallback(e=>{const{width:t}=e.nativeEvent.layout;u(e=>e===t?e:t)},[]),h=a&&d>0&&e.length>0?d/e.length:0,renderDisc=(e,t)=>e.icon?_jsx(View,{style:i.disc,children:e.icon}):_jsx(View,{style:[i.disc,{backgroundColor:tintOf(t,.16,l.colors["bg-muted"])}],children:_jsx(View,{style:[i.dot,{backgroundColor:t}]})}),renderText=(e,t)=>_jsxs(_Fragment,{children:[_jsx(Text,{variant:a?"bodySmall":"body",weight:"semibold",style:[{color:"upcoming"===t?l.colors["text-muted"]:l.colors["text-body"]},a?i.centred:null],children:e.title}),e.meta?_jsx(Text,{variant:"caption",style:[{color:l.colors["text-subtle"]},a?i.centred:null],children:e.meta}):null,e.description?_jsx(Text,{variant:"bodySmall",style:[{color:l.colors["text-muted"]},a?i.centred:null],children:e.description}):null,e.children]}),x=e.map((r,s)=>{warnInvalidValue("Timeline","status",r.status,STATUS_VALUES);const o=r.status??("feed"===t?"done":"upcoming"),d=r.color??(e=>{switch(e){case"done":return l.colors.success;case"current":return l.colors.warning;case"onHold":return l.colors.info;case"rejected":return l.colors.danger;case"cancelled":case"skipped":return l.colors["text-subtle"];default:return l.colors["text-disabled"]}})(o),u=0===s,m=s===e.length-1,x=r.key??`${r.title}-${s}`;return _jsxs(View,a?{style:[i.hColumn,h>0?{width:h,flex:0}:null],children:[_jsxs(View,{style:i.hDotRow,children:[_jsx(View,{style:[i.hSegment,{marginRight:n,backgroundColor:u?"transparent":c}]}),renderDisc(r,d),_jsx(View,{style:[i.hSegment,{marginLeft:n,backgroundColor:m?"transparent":c}]})]}),_jsx(View,{style:i.hBody,children:renderText(r,o)})]}:{style:i.row,children:[_jsxs(View,{style:i.gutter,children:[renderDisc(r,d),m?null:_jsx(View,{style:[i.rail,{backgroundColor:c}]})]}),_jsx(View,{style:[i.body,{paddingBottom:m?0:l.space.lg}],children:renderText(r,o)})]},x)});return _jsx(View,{style:[a?i.hRow:null,s],onLayout:a?m:void 0,testID:o,children:x})};const buildStyles=e=>StyleSheet.create({row:{flexDirection:"row"},gutter:{width:Math.max(28,28),alignItems:"center"},disc:{width:24,height:24,borderRadius:e.radius.pill,...smoothCorners,alignItems:"center",justifyContent:"center"},dot:{width:12,height:12,borderRadius:e.radius.pill,...smoothCorners},rail:{width:2,flex:1,marginTop:e.space.xs,borderRadius:e.radius.pill,...smoothCorners},body:{flex:1,gap:e.space.xxs,paddingLeft:e.space.sm},hRow:{flexDirection:"row",alignItems:"flex-start"},hColumn:{flex:1,minWidth:0,alignItems:"center"},hDotRow:{alignSelf:"stretch",flexDirection:"row",alignItems:"center"},hSegment:{flex:1,height:2,borderRadius:e.radius.pill,...smoothCorners},hBody:{alignSelf:"stretch",alignItems:"center",paddingHorizontal:e.space.xs,marginTop:e.space.sm,gap:e.space.xxs},centred:{textAlign:"center"}});export default Timeline;
1
+ "use strict";import{useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{useTheme}from"../../theme/index.js";import{tintOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{Text}from"../Text/index.js";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const DOT=12,HALO=6,RAIL=2,GUTTER=28,DISC=24,HALO_OPACITY=.16,STATUS_VALUES=["upcoming","current","done","onHold","rejected","cancelled","skipped"];export const Timeline=({items:e,variant:t="feed",orientation:r="vertical",style:s,testID:o})=>{const l=useTheme(),n=l.space.xs,i=useMemo(()=>buildStyles(l),[l]),a="horizontal"===r,c=l.colors.border;warnInvalidValue("Timeline","variant",t,["feed","progress"]),warnInvalidValue("Timeline","orientation",r,["vertical","horizontal"]);const[d,u]=useState(0),m=useCallback(e=>{const{width:t}=e.nativeEvent.layout;u(e=>e===t?e:t)},[]),h=a&&d>0&&e.length>0?d/e.length:0,renderDisc=(e,t)=>e.icon?_jsx(View,{style:i.disc,children:e.icon}):_jsx(View,{style:[i.disc,{backgroundColor:tintOf(t,.16,l.colors["bg-muted"])}],children:_jsx(View,{style:[i.dot,{backgroundColor:t}]})}),renderText=(e,t)=>_jsxs(_Fragment,{children:[_jsx(Text,{variant:a?"bodySmall":"body",weight:"semibold",style:[{color:"upcoming"===t?l.colors["text-muted"]:l.colors["text-body"]},a?i.centred:null],children:e.title}),e.meta?_jsx(Text,{variant:"caption",style:[{color:l.colors["text-subtle"]},a?i.centred:null],children:e.meta}):null,e.description?_jsx(Text,{variant:"bodySmall",style:[{color:l.colors["text-muted"]},a?i.centred:null],children:e.description}):null,e.children]}),x=e.map((r,s)=>{warnInvalidValue("Timeline","status",r.status,STATUS_VALUES);const o=r.status??("feed"===t?"done":"upcoming"),d=r.color??(e=>{switch(e){case"done":return l.colors.success;case"current":return l.colors.warning;case"onHold":return l.colors.info;case"rejected":return l.colors.danger;case"cancelled":case"skipped":return l.colors["text-subtle"];default:return l.colors["text-disabled"]}})(o),u=0===s,m=s===e.length-1,x=r.key??`${r.title}-${s}`;return _jsxs(View,a?{testID:r.testID,style:[i.hColumn,h>0?{width:h,flex:0}:null],children:[_jsxs(View,{style:i.hDotRow,children:[_jsx(View,{style:[i.hSegment,{marginRight:n,backgroundColor:u?"transparent":c}]}),renderDisc(r,d),_jsx(View,{style:[i.hSegment,{marginLeft:n,backgroundColor:m?"transparent":c}]})]}),_jsx(View,{style:i.hBody,children:renderText(r,o)})]}:{testID:r.testID,style:i.row,children:[_jsxs(View,{style:i.gutter,children:[renderDisc(r,d),m?null:_jsx(View,{style:[i.rail,{backgroundColor:c}]})]}),_jsx(View,{style:[i.body,{paddingBottom:m?0:l.space.lg}],children:renderText(r,o)})]},x)});return _jsx(View,{style:[a?i.hRow:null,s],onLayout:a?m:void 0,testID:o,children:x})};const buildStyles=e=>StyleSheet.create({row:{flexDirection:"row"},gutter:{width:Math.max(28,28),alignItems:"center"},disc:{width:24,height:24,borderRadius:e.radius.pill,...smoothCorners,alignItems:"center",justifyContent:"center"},dot:{width:12,height:12,borderRadius:e.radius.pill,...smoothCorners},rail:{width:2,flex:1,marginTop:e.space.xs,borderRadius:e.radius.pill,...smoothCorners},body:{flex:1,gap:e.space.xxs,paddingLeft:e.space.sm},hRow:{flexDirection:"row",alignItems:"flex-start"},hColumn:{flex:1,minWidth:0,alignItems:"center"},hDotRow:{alignSelf:"stretch",flexDirection:"row",alignItems:"center"},hSegment:{flex:1,height:2,borderRadius:e.radius.pill,...smoothCorners},hBody:{alignSelf:"stretch",alignItems:"center",paddingHorizontal:e.space.xs,marginTop:e.space.sm,gap:e.space.xxs},centred:{textAlign:"center"}});export default Timeline;
@@ -1 +1 @@
1
- "use strict";import{BottomTabBarHeightContext}from"@react-navigation/bottom-tabs";import{useNavigation}from"@react-navigation/native";import{useContext}from"react";import{Screen}from"../components/Screen/index.js";import{useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const TAB_EDGES=["top"];export function NavigationScreen({kind:t="pushed",onBack:e,...o}){const n=useNavigation(),r=useContext(BottomTabBarHeightContext),a=!0===useTheme().settings.components.screen?.tabBarFloats;return _jsx(Screen,"tab"===t?{...o,largeTitle:!0,edges:TAB_EDGES,bottomInset:a?r??0:0}:{...o,largeTitle:!1,onBack:"root"===t?void 0:e??n.goBack})}
1
+ "use strict";import{BottomTabBarHeightContext}from"@react-navigation/bottom-tabs";import{useNavigation}from"@react-navigation/native";import{useContext}from"react";import{Screen}from"../components/Screen/index.js";import{useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const TAB_EDGES=["top"];export function NavigationScreen({kind:t="pushed",appBar:e=!0,onBack:o,...i}){const n=useNavigation(),r=useContext(BottomTabBarHeightContext),a=!0===useTheme().settings.components.screen?.tabBarFloats,s=e?i:{...i,title:void 0,subtitle:void 0,leading:void 0,rightActions:void 0};return _jsx(Screen,"tab"===t?{...s,largeTitle:!0,edges:TAB_EDGES,bottomInset:a?r??0:0}:{...s,largeTitle:!1,onBack:"root"!==t&&e?o??n.goBack:void 0})}
@@ -10,6 +10,12 @@ export type BannerTone = Tone;
10
10
  * callout that is part of the page and should be read in order, not announced.
11
11
  */
12
12
  export type BannerRole = "alert" | "summary" | "none";
13
+ /**
14
+ * How the banner is drawn. `'bar'` is the neutral surface with the tone's icon.
15
+ * `'wash'` fills the banner with the tone's soft colour, a small corner radius, no
16
+ * leading bar, and a title in the tone's ink.
17
+ */
18
+ export type BannerVariant = "bar" | "wash";
13
19
  export type BannerActionVariant = Extract<FillVariant, "solid" | "outline" | "ghost">;
14
20
  export type BannerActionSize = Extract<Size, "sm" | "md">;
15
21
  export type BannerActionTone = Tone;
@@ -28,6 +34,8 @@ export interface BannerAction {
28
34
  variant?: BannerActionVariant;
29
35
  /** `md` is a taller button with a 44 pt touch target. Default `sm`. */
30
36
  size?: BannerActionSize;
37
+ /** Test id for this action's button. */
38
+ testID?: string;
31
39
  }
32
40
  export interface BannerLabels {
33
41
  dismiss: string;
@@ -37,6 +45,8 @@ export interface BannerProps {
37
45
  title?: string;
38
46
  message: string | React.ReactNode;
39
47
  tone?: BannerTone;
48
+ /** Default `'bar'`. See {@link BannerVariant}. */
49
+ variant?: BannerVariant;
40
50
  icon?: SlotIcon | false;
41
51
  actions?: BannerAction[];
42
52
  dismissible?: boolean;
@@ -1,3 +1,3 @@
1
- export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, } from "./Banner";
1
+ export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, BannerVariant, } from "./Banner";
2
2
  export { Banner, DEFAULT_BANNER_LABELS, default } from "./Banner";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -13,16 +13,31 @@
13
13
  * labels follow the app's font scale and nothing is drawn in a fixed pixel box.
14
14
  *
15
15
  * Values may be negative; the zero line then sits inside the plot.
16
+ *
17
+ * With `series`, each bar is a stack: one segment per series in series order,
18
+ * the series' positive values stacking up from zero and its negative ones down.
19
+ * A legend names the series, and a bar is read as its label and every series value.
16
20
  */
21
+ import type React from "react";
17
22
  import type { View as RNView, StyleProp, ViewStyle } from "react-native";
18
23
  import type { Tone } from "../../types/vocabulary";
19
24
  import type { HapticType } from "../../utils";
20
25
  export type BarChartTone = Tone;
26
+ export interface BarChartSeries {
27
+ /** Key of the series in each datum's `values`. */
28
+ key: string;
29
+ /** The series name, written in the legend and read aloud with its value. */
30
+ label: string;
31
+ /** Colour of the series, drawn in the tone's text ink. Default: the next of primary, info, success, warning, danger, neutral. */
32
+ tone?: BarChartTone;
33
+ }
21
34
  export interface BarChartDatum {
22
35
  /** The full name of the bar, read aloud and written in the callout: "Mon 06-Oct-2026". */
23
36
  label: string;
24
- /** The bar's value. A value that is not a finite number draws as zero. */
25
- value: number;
37
+ /** The bar's value, for a chart without `series`. A value that is not a finite number draws as zero. */
38
+ value?: number;
39
+ /** With `series`: the value of each series by its key, in place of `value`. A missing or non-finite value draws as zero. */
40
+ values?: Record<string, number>;
26
41
  /** A shorter label drawn under the bar: "Mon". Default `label`. */
27
42
  axisLabel?: string;
28
43
  /** Replaces the spoken text of the bar. Default `"label, value"`. */
@@ -38,7 +53,12 @@ export interface BarChartProps {
38
53
  data: ReadonlyArray<BarChartDatum>;
39
54
  /** Colour of the bars. Default `'primary'`. Drawn in the tone's text ink so it holds 3:1 on the page in light and dark. */
40
55
  tone?: BarChartTone;
41
- /** Bar colour override; wins over `tone`. */
56
+ /**
57
+ * Turns the bars into stacks, one segment per series in this order, with a legend. Each datum then carries `values`
58
+ * instead of `value`. `tone` and `color` do not apply; a series takes its own `tone`.
59
+ */
60
+ series?: ReadonlyArray<BarChartSeries>;
61
+ /** Bar colour override; wins over `tone`. Not used with `series`. */
42
62
  color?: string;
43
63
  /** Height of the plot in points. Default `160`. */
44
64
  height?: number;
@@ -65,7 +85,7 @@ export interface BarChartProps {
65
85
  style?: StyleProp<ViewStyle>;
66
86
  testID?: string;
67
87
  }
68
- declare const BarChart: import("react").ForwardRefExoticComponent<BarChartProps & import("react").RefAttributes<RNView>>;
88
+ declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<RNView>>;
69
89
  export { BarChart };
70
90
  export default BarChart;
71
91
  //# sourceMappingURL=BarChart.d.ts.map
@@ -1,3 +1,3 @@
1
- export type { BarChartDatum, BarChartLabels, BarChartProps, BarChartTone, } from "./BarChart";
1
+ export type { BarChartDatum, BarChartLabels, BarChartProps, BarChartSeries, BarChartTone, } from "./BarChart";
2
2
  export { BarChart, DEFAULT_BAR_CHART_LABELS, default } from "./BarChart";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -69,9 +69,10 @@ export interface BottomSheetProps {
69
69
  * to keep it open. A refused drag springs back to the snap point it started
70
70
  * from.
71
71
  *
72
- * Show the question with a `Dialog` or `OptionSheet` rendered inside this
73
- * sheet's children (a second native modal beside the sheet's own does not
74
- * present on iOS), and resolve a Promise from its buttons. While a Promise
72
+ * Show the question as a `Banner` inside this sheet, in place of its
73
+ * buttons (a second native modal beside the sheet's own does not present
74
+ * on iOS, and a dialog on a sheet stacks two overlays), and resolve a
75
+ * Promise from its actions. While a Promise
75
76
  * is pending, further dismissals are ignored, so it must settle. A rejected
76
77
  * Promise leaves the sheet open and surfaces as an unhandled rejection.
77
78
  *
@@ -50,6 +50,8 @@ export interface ChoiceOption {
50
50
  */
51
51
  icon?: SlotIcon;
52
52
  disabled?: boolean;
53
+ /** Test selector of this option's pressable; none when unset. */
54
+ testID?: string;
53
55
  }
54
56
  /** Everything a custom option template needs to render one option. */
55
57
  export interface ChoiceOptionState<T = ChoiceOption> {
@@ -22,6 +22,11 @@ export interface ComposerProps {
22
22
  loading?: boolean;
23
23
  /** Nothing can be typed or sent. */
24
24
  disabled?: boolean;
25
+ /**
26
+ * Decides whether send is enabled, in place of the default rule (the trimmed text is not empty). Pass `true`
27
+ * to send an attachment alone: `onSend` then gets an empty string. `loading` and `disabled` still block.
28
+ */
29
+ canSend?: boolean;
25
30
  maxLength?: number;
26
31
  /** The box grows to this many lines, then scrolls. Default 5. */
27
32
  maxLines?: number;
@@ -24,6 +24,8 @@ export interface DescriptionItem {
24
24
  strong?: boolean;
25
25
  /** Colour of a string value: a text role, a semantic tone or a raw colour. Empty values stay muted. */
26
26
  tone?: TextColor;
27
+ /** Test id for this row. */
28
+ testID?: string;
27
29
  }
28
30
  export interface DescriptionsProps {
29
31
  items: ReadonlyArray<DescriptionItem>;
@@ -23,6 +23,8 @@ export interface FilterChipItem {
23
23
  /** Shown after the label; leave it undefined while it loads and the label shows alone. */
24
24
  count?: number | string;
25
25
  disabled?: boolean;
26
+ /** Test selector of this chip's pressable; none when unset. */
27
+ testID?: string;
26
28
  }
27
29
  export interface FilterChipRowProps {
28
30
  items: ReadonlyArray<FilterChipItem>;
@@ -5,6 +5,11 @@ export interface SectionHeaderLabels {
5
5
  required: (heading: string) => string;
6
6
  }
7
7
  export declare const DEFAULT_SECTION_HEADER_LABELS: Readonly<SectionHeaderLabels>;
8
+ export interface SectionHeaderAction {
9
+ label: string;
10
+ onPress: () => void;
11
+ testID?: string;
12
+ }
8
13
  export interface SectionHeaderProps {
9
14
  children?: React.ReactNode;
10
15
  /** 'title' is the heading, 'caps' the quieter uppercase label, 'sub' a heading inside a card. */
@@ -13,6 +18,8 @@ export interface SectionHeaderProps {
13
18
  flush?: boolean;
14
19
  /** Draws the required marker after the heading and announces the heading as required. */
15
20
  required?: boolean;
21
+ /** A link at the end of the heading row, such as See all. */
22
+ action?: SectionHeaderAction;
16
23
  labels?: Partial<SectionHeaderLabels>;
17
24
  style?: StyleProp<TextStyle>;
18
25
  testID?: string;
@@ -1,3 +1,3 @@
1
- export type { SectionHeaderLabels, SectionHeaderProps, SectionHeaderVariant } from "./SectionHeader";
1
+ export type { SectionHeaderAction, SectionHeaderLabels, SectionHeaderProps, SectionHeaderVariant } from "./SectionHeader";
2
2
  export { DEFAULT_SECTION_HEADER_LABELS, default, SectionHeader } from "./SectionHeader";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -38,6 +38,8 @@ export interface TimelineItem {
38
38
  /** Arbitrary content below the text block. */
39
39
  children?: React.ReactNode;
40
40
  key?: string;
41
+ /** Test id for this item's row. */
42
+ testID?: string;
41
43
  }
42
44
  export interface TimelineProps {
43
45
  items: ReadonlyArray<TimelineItem>;
@@ -18,9 +18,9 @@ export type { AvatarGroupOverflowVariant, AvatarGroupProps, AvatarGroupSpacing,
18
18
  export { Avatar, AvatarGroup, avatarToneColors, DEFAULT_AVATAR_LABELS } from "./Avatar";
19
19
  export type { BadgeAnchor, BadgeLabels, BadgeProps, BadgeSize, BadgeTone, BadgeVariant } from "./Badge";
20
20
  export { Badge, DEFAULT_BADGE_LABELS } from "./Badge";
21
- export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, } from "./Banner";
21
+ export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, BannerVariant, } from "./Banner";
22
22
  export { Banner, DEFAULT_BANNER_LABELS } from "./Banner";
23
- export type { BarChartDatum, BarChartProps, BarChartTone } from "./BarChart";
23
+ export type { BarChartDatum, BarChartProps, BarChartSeries, BarChartTone } from "./BarChart";
24
24
  export { BarChart } from "./BarChart";
25
25
  export type { BottomNavigationAccessoryState, BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationLabels, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps, } from "./BottomNavigation";
26
26
  export { BottomNavigation, DEFAULT_BOTTOM_NAVIGATION_LABELS } from "./BottomNavigation";
@@ -10,6 +10,11 @@ export interface NavigationScreenProps<ItemT = unknown> extends Omit<ScreenProps
10
10
  kind?: NavigationScreenKind;
11
11
  /** Safe-area edges of a "pushed" or "root" screen, as on Screen; a "tab" screen always uses the top edge only. */
12
12
  edges?: SafeAreaEdge[];
13
+ /**
14
+ * Draw the app bar. Default `true`. `false` draws no bar and no back arrow, and drops the title, subtitle,
15
+ * leading and right actions with it; the safe area, keyboard handling, refresh, footer and list mode stay.
16
+ */
17
+ appBar?: boolean;
13
18
  }
14
- export declare function NavigationScreen<ItemT = unknown>({ kind, onBack, ...rest }: NavigationScreenProps<ItemT>): React.ReactElement;
19
+ export declare function NavigationScreen<ItemT = unknown>({ kind, appBar, onBack, ...props }: NavigationScreenProps<ItemT>): React.ReactElement;
15
20
  //# sourceMappingURL=NavigationScreen.d.ts.map
@@ -10,6 +10,12 @@ export type BannerTone = Tone;
10
10
  * callout that is part of the page and should be read in order, not announced.
11
11
  */
12
12
  export type BannerRole = "alert" | "summary" | "none";
13
+ /**
14
+ * How the banner is drawn. `'bar'` is the neutral surface with the tone's icon.
15
+ * `'wash'` fills the banner with the tone's soft colour, a small corner radius, no
16
+ * leading bar, and a title in the tone's ink.
17
+ */
18
+ export type BannerVariant = "bar" | "wash";
13
19
  export type BannerActionVariant = Extract<FillVariant, "solid" | "outline" | "ghost">;
14
20
  export type BannerActionSize = Extract<Size, "sm" | "md">;
15
21
  export type BannerActionTone = Tone;
@@ -28,6 +34,8 @@ export interface BannerAction {
28
34
  variant?: BannerActionVariant;
29
35
  /** `md` is a taller button with a 44 pt touch target. Default `sm`. */
30
36
  size?: BannerActionSize;
37
+ /** Test id for this action's button. */
38
+ testID?: string;
31
39
  }
32
40
  export interface BannerLabels {
33
41
  dismiss: string;
@@ -37,6 +45,8 @@ export interface BannerProps {
37
45
  title?: string;
38
46
  message: string | React.ReactNode;
39
47
  tone?: BannerTone;
48
+ /** Default `'bar'`. See {@link BannerVariant}. */
49
+ variant?: BannerVariant;
40
50
  icon?: SlotIcon | false;
41
51
  actions?: BannerAction[];
42
52
  dismissible?: boolean;
@@ -1,3 +1,3 @@
1
- export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, } from "./Banner.js";
1
+ export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, BannerVariant, } from "./Banner.js";
2
2
  export { Banner, DEFAULT_BANNER_LABELS, default } from "./Banner.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -13,16 +13,31 @@
13
13
  * labels follow the app's font scale and nothing is drawn in a fixed pixel box.
14
14
  *
15
15
  * Values may be negative; the zero line then sits inside the plot.
16
+ *
17
+ * With `series`, each bar is a stack: one segment per series in series order,
18
+ * the series' positive values stacking up from zero and its negative ones down.
19
+ * A legend names the series, and a bar is read as its label and every series value.
16
20
  */
21
+ import type React from "react";
17
22
  import type { View as RNView, StyleProp, ViewStyle } from "react-native";
18
23
  import type { Tone } from "../../types/vocabulary.js";
19
24
  import type { HapticType } from "../../utils/index.js";
20
25
  export type BarChartTone = Tone;
26
+ export interface BarChartSeries {
27
+ /** Key of the series in each datum's `values`. */
28
+ key: string;
29
+ /** The series name, written in the legend and read aloud with its value. */
30
+ label: string;
31
+ /** Colour of the series, drawn in the tone's text ink. Default: the next of primary, info, success, warning, danger, neutral. */
32
+ tone?: BarChartTone;
33
+ }
21
34
  export interface BarChartDatum {
22
35
  /** The full name of the bar, read aloud and written in the callout: "Mon 06-Oct-2026". */
23
36
  label: string;
24
- /** The bar's value. A value that is not a finite number draws as zero. */
25
- value: number;
37
+ /** The bar's value, for a chart without `series`. A value that is not a finite number draws as zero. */
38
+ value?: number;
39
+ /** With `series`: the value of each series by its key, in place of `value`. A missing or non-finite value draws as zero. */
40
+ values?: Record<string, number>;
26
41
  /** A shorter label drawn under the bar: "Mon". Default `label`. */
27
42
  axisLabel?: string;
28
43
  /** Replaces the spoken text of the bar. Default `"label, value"`. */
@@ -38,7 +53,12 @@ export interface BarChartProps {
38
53
  data: ReadonlyArray<BarChartDatum>;
39
54
  /** Colour of the bars. Default `'primary'`. Drawn in the tone's text ink so it holds 3:1 on the page in light and dark. */
40
55
  tone?: BarChartTone;
41
- /** Bar colour override; wins over `tone`. */
56
+ /**
57
+ * Turns the bars into stacks, one segment per series in this order, with a legend. Each datum then carries `values`
58
+ * instead of `value`. `tone` and `color` do not apply; a series takes its own `tone`.
59
+ */
60
+ series?: ReadonlyArray<BarChartSeries>;
61
+ /** Bar colour override; wins over `tone`. Not used with `series`. */
42
62
  color?: string;
43
63
  /** Height of the plot in points. Default `160`. */
44
64
  height?: number;
@@ -65,7 +85,7 @@ export interface BarChartProps {
65
85
  style?: StyleProp<ViewStyle>;
66
86
  testID?: string;
67
87
  }
68
- declare const BarChart: import("react").ForwardRefExoticComponent<BarChartProps & import("react").RefAttributes<RNView>>;
88
+ declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<RNView>>;
69
89
  export { BarChart };
70
90
  export default BarChart;
71
91
  //# sourceMappingURL=BarChart.d.ts.map
@@ -1,3 +1,3 @@
1
- export type { BarChartDatum, BarChartLabels, BarChartProps, BarChartTone, } from "./BarChart.js";
1
+ export type { BarChartDatum, BarChartLabels, BarChartProps, BarChartSeries, BarChartTone, } from "./BarChart.js";
2
2
  export { BarChart, DEFAULT_BAR_CHART_LABELS, default } from "./BarChart.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -69,9 +69,10 @@ export interface BottomSheetProps {
69
69
  * to keep it open. A refused drag springs back to the snap point it started
70
70
  * from.
71
71
  *
72
- * Show the question with a `Dialog` or `OptionSheet` rendered inside this
73
- * sheet's children (a second native modal beside the sheet's own does not
74
- * present on iOS), and resolve a Promise from its buttons. While a Promise
72
+ * Show the question as a `Banner` inside this sheet, in place of its
73
+ * buttons (a second native modal beside the sheet's own does not present
74
+ * on iOS, and a dialog on a sheet stacks two overlays), and resolve a
75
+ * Promise from its actions. While a Promise
75
76
  * is pending, further dismissals are ignored, so it must settle. A rejected
76
77
  * Promise leaves the sheet open and surfaces as an unhandled rejection.
77
78
  *
@@ -50,6 +50,8 @@ export interface ChoiceOption {
50
50
  */
51
51
  icon?: SlotIcon;
52
52
  disabled?: boolean;
53
+ /** Test selector of this option's pressable; none when unset. */
54
+ testID?: string;
53
55
  }
54
56
  /** Everything a custom option template needs to render one option. */
55
57
  export interface ChoiceOptionState<T = ChoiceOption> {
@@ -22,6 +22,11 @@ export interface ComposerProps {
22
22
  loading?: boolean;
23
23
  /** Nothing can be typed or sent. */
24
24
  disabled?: boolean;
25
+ /**
26
+ * Decides whether send is enabled, in place of the default rule (the trimmed text is not empty). Pass `true`
27
+ * to send an attachment alone: `onSend` then gets an empty string. `loading` and `disabled` still block.
28
+ */
29
+ canSend?: boolean;
25
30
  maxLength?: number;
26
31
  /** The box grows to this many lines, then scrolls. Default 5. */
27
32
  maxLines?: number;
@@ -24,6 +24,8 @@ export interface DescriptionItem {
24
24
  strong?: boolean;
25
25
  /** Colour of a string value: a text role, a semantic tone or a raw colour. Empty values stay muted. */
26
26
  tone?: TextColor;
27
+ /** Test id for this row. */
28
+ testID?: string;
27
29
  }
28
30
  export interface DescriptionsProps {
29
31
  items: ReadonlyArray<DescriptionItem>;
@@ -23,6 +23,8 @@ export interface FilterChipItem {
23
23
  /** Shown after the label; leave it undefined while it loads and the label shows alone. */
24
24
  count?: number | string;
25
25
  disabled?: boolean;
26
+ /** Test selector of this chip's pressable; none when unset. */
27
+ testID?: string;
26
28
  }
27
29
  export interface FilterChipRowProps {
28
30
  items: ReadonlyArray<FilterChipItem>;
@@ -5,6 +5,11 @@ export interface SectionHeaderLabels {
5
5
  required: (heading: string) => string;
6
6
  }
7
7
  export declare const DEFAULT_SECTION_HEADER_LABELS: Readonly<SectionHeaderLabels>;
8
+ export interface SectionHeaderAction {
9
+ label: string;
10
+ onPress: () => void;
11
+ testID?: string;
12
+ }
8
13
  export interface SectionHeaderProps {
9
14
  children?: React.ReactNode;
10
15
  /** 'title' is the heading, 'caps' the quieter uppercase label, 'sub' a heading inside a card. */
@@ -13,6 +18,8 @@ export interface SectionHeaderProps {
13
18
  flush?: boolean;
14
19
  /** Draws the required marker after the heading and announces the heading as required. */
15
20
  required?: boolean;
21
+ /** A link at the end of the heading row, such as See all. */
22
+ action?: SectionHeaderAction;
16
23
  labels?: Partial<SectionHeaderLabels>;
17
24
  style?: StyleProp<TextStyle>;
18
25
  testID?: string;
@@ -1,3 +1,3 @@
1
- export type { SectionHeaderLabels, SectionHeaderProps, SectionHeaderVariant } from "./SectionHeader.js";
1
+ export type { SectionHeaderAction, SectionHeaderLabels, SectionHeaderProps, SectionHeaderVariant } from "./SectionHeader.js";
2
2
  export { DEFAULT_SECTION_HEADER_LABELS, default, SectionHeader } from "./SectionHeader.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -38,6 +38,8 @@ export interface TimelineItem {
38
38
  /** Arbitrary content below the text block. */
39
39
  children?: React.ReactNode;
40
40
  key?: string;
41
+ /** Test id for this item's row. */
42
+ testID?: string;
41
43
  }
42
44
  export interface TimelineProps {
43
45
  items: ReadonlyArray<TimelineItem>;
@@ -18,9 +18,9 @@ export type { AvatarGroupOverflowVariant, AvatarGroupProps, AvatarGroupSpacing,
18
18
  export { Avatar, AvatarGroup, avatarToneColors, DEFAULT_AVATAR_LABELS } from "./Avatar/index.js";
19
19
  export type { BadgeAnchor, BadgeLabels, BadgeProps, BadgeSize, BadgeTone, BadgeVariant } from "./Badge/index.js";
20
20
  export { Badge, DEFAULT_BADGE_LABELS } from "./Badge/index.js";
21
- export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, } from "./Banner/index.js";
21
+ export type { BannerAction, BannerActionSize, BannerActionTone, BannerActionVariant, BannerLabels, BannerProps, BannerRole, BannerTone, BannerVariant, } from "./Banner/index.js";
22
22
  export { Banner, DEFAULT_BANNER_LABELS } from "./Banner/index.js";
23
- export type { BarChartDatum, BarChartProps, BarChartTone } from "./BarChart/index.js";
23
+ export type { BarChartDatum, BarChartProps, BarChartSeries, BarChartTone } from "./BarChart/index.js";
24
24
  export { BarChart } from "./BarChart/index.js";
25
25
  export type { BottomNavigationAccessoryState, BottomNavigationCenterAction, BottomNavigationElevation, BottomNavigationIndicatorPosition, BottomNavigationIndicatorRadius, BottomNavigationLabels, BottomNavigationProps, BottomNavigationRadius, BottomNavigationVariant, TabBadge, TabConfig, TabIcon, TabIconProps, } from "./BottomNavigation/index.js";
26
26
  export { BottomNavigation, DEFAULT_BOTTOM_NAVIGATION_LABELS } from "./BottomNavigation/index.js";
@@ -10,6 +10,11 @@ export interface NavigationScreenProps<ItemT = unknown> extends Omit<ScreenProps
10
10
  kind?: NavigationScreenKind;
11
11
  /** Safe-area edges of a "pushed" or "root" screen, as on Screen; a "tab" screen always uses the top edge only. */
12
12
  edges?: SafeAreaEdge[];
13
+ /**
14
+ * Draw the app bar. Default `true`. `false` draws no bar and no back arrow, and drops the title, subtitle,
15
+ * leading and right actions with it; the safe area, keyboard handling, refresh, footer and list mode stay.
16
+ */
17
+ appBar?: boolean;
13
18
  }
14
- export declare function NavigationScreen<ItemT = unknown>({ kind, onBack, ...rest }: NavigationScreenProps<ItemT>): React.ReactElement;
19
+ export declare function NavigationScreen<ItemT = unknown>({ kind, appBar, onBack, ...props }: NavigationScreenProps<ItemT>): React.ReactElement;
15
20
  //# sourceMappingURL=NavigationScreen.d.ts.map