@webority/mobile-ui 0.109.7 → 0.109.9

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.
@@ -18710,28 +18710,28 @@ var kv = (e) => L.create({
18710
18710
  },
18711
18711
  badgeText: { lineHeight: 13 }
18712
18712
  }), Av = ({ actions: e, layout: t, testID: n, stackedLabels: r, rowStyle: i, buttonStyle: a, textStyle: o }) => {
18713
- let s = $n(), c = m(() => Mv(s), [s]), u = s.components.dialog["action-button-min-height"], d = s.text.base.size * s.leading.body, f = e.map((e) => e.label).join("\n"), p = g(null), [_, v] = r ?? p, b = t === "stacked" || t !== "row" && _ !== null && _ === f, x = h(null), S = l((e) => {
18714
- e.nativeEvent.layout.height > 1.5 * d && v(f);
18713
+ let s = $n(), c = m(() => Mv(s), [s]), u = s.components.dialog["action-button-min-height"], d = qt(s, "md").icon, f = s.text.base.size * s.leading.body, p = e.map((e) => e.label).join("\n"), _ = g(null), [v, b] = r ?? _, x = t === "stacked" || t !== "row" && v !== null && v === p, S = h(null), C = l((e) => {
18714
+ e.nativeEvent.layout.height > 1.5 * f && b(p);
18715
18715
  }, [
18716
- d,
18717
18716
  f,
18718
- v
18719
- ]), C = l((e) => {
18720
- let t = e.nativeEvent.layout.width, n = x.current;
18721
- x.current = t, n !== null && Math.abs(n - t) > .5 && v(null);
18722
- }, [v]), w = /* @__PURE__ */ new Map();
18717
+ p,
18718
+ b
18719
+ ]), w = l((e) => {
18720
+ let t = e.nativeEvent.layout.width, n = S.current;
18721
+ S.current = t, n !== null && Math.abs(n - t) > .5 && b(null);
18722
+ }, [b]), T = /* @__PURE__ */ new Map();
18723
18723
  return q(V, {
18724
18724
  testID: n,
18725
18725
  style: [
18726
18726
  c.actionsRow,
18727
- b ? c.actionsRowStacked : null,
18727
+ x ? c.actionsRowStacked : null,
18728
18728
  i
18729
18729
  ],
18730
- onLayout: C,
18730
+ onLayout: w,
18731
18731
  children: e.map((t, n) => {
18732
- let r = (w.get(t.label) ?? 0) + 1;
18733
- w.set(t.label, r), t.tone;
18734
- let i = t.tone ?? "primary", l = !!t.disabled, d = jv(s, i, l), f = n === e.length - 1;
18732
+ let r = (T.get(t.label) ?? 0) + 1;
18733
+ T.set(t.label, r), t.tone;
18734
+ let i = t.tone ?? "primary", l = !!t.disabled, f = jv(s, i, l), p = n === e.length - 1;
18735
18735
  return q(ee, {
18736
18736
  onPress: t.onPress,
18737
18737
  disabled: t.loading || l,
@@ -18746,34 +18746,44 @@ var kv = (e) => L.create({
18746
18746
  style: ({ pressed: e }) => [
18747
18747
  c.actionButton,
18748
18748
  {
18749
- flex: +!b,
18749
+ flex: +!x,
18750
18750
  minHeight: u,
18751
- backgroundColor: d.backgroundColor,
18752
- borderColor: d.borderColor,
18753
- borderWidth: d.borderWidth,
18751
+ backgroundColor: f.backgroundColor,
18752
+ borderColor: f.borderColor,
18753
+ borderWidth: f.borderWidth,
18754
18754
  borderRadius: s.radius.md,
18755
18755
  ...Q,
18756
18756
  paddingVertical: s.space.sm,
18757
18757
  paddingHorizontal: s.space.md,
18758
- marginRight: f || b ? 0 : s.space.sm,
18758
+ marginRight: p || x ? 0 : s.space.sm,
18759
18759
  opacity: t.loading ? .7 : e && !l ? .85 : 1
18760
18760
  },
18761
18761
  a
18762
18762
  ],
18763
18763
  children: t.loading ? q(y, {
18764
18764
  size: "small",
18765
- color: d.textColor
18766
- }) : q(V, {
18767
- onLayout: S,
18768
- children: q(R, {
18769
- style: [{
18770
- color: d.textColor,
18771
- fontSize: s.text.base.size,
18772
- ...tr(s, "semibold"),
18773
- textAlign: "center"
18774
- }, o],
18775
- children: t.label
18776
- })
18765
+ color: f.textColor
18766
+ }) : J(V, {
18767
+ style: c.labelRow,
18768
+ children: [t.icon ? q(V, {
18769
+ style: c.labelIcon,
18770
+ children: Bp(t.icon, {
18771
+ color: f.textColor,
18772
+ size: d,
18773
+ disabled: l
18774
+ }, "linear")
18775
+ }) : null, q(V, {
18776
+ onLayout: C,
18777
+ children: q(R, {
18778
+ style: [{
18779
+ color: f.textColor,
18780
+ fontSize: s.text.base.size,
18781
+ ...tr(s, "semibold"),
18782
+ textAlign: "center"
18783
+ }, o],
18784
+ children: t.label
18785
+ })
18786
+ })]
18777
18787
  })
18778
18788
  }, `${t.label}-${r}`);
18779
18789
  })
@@ -18838,7 +18848,13 @@ var jv = (e, t, n) => {
18838
18848
  actionButton: {
18839
18849
  alignItems: "center",
18840
18850
  justifyContent: "center"
18841
- }
18851
+ },
18852
+ labelRow: {
18853
+ flexDirection: "row",
18854
+ alignItems: "center",
18855
+ justifyContent: "center"
18856
+ },
18857
+ labelIcon: { marginRight: e.space.xs }
18842
18858
  }), Nv = Object.freeze({
18843
18859
  close: "Close bottom sheet",
18844
18860
  dragHandle: "Drag handle"
@@ -36233,7 +36249,7 @@ var cO = Ft({
36233
36249
  kind: "WeborityPhone",
36234
36250
  library: {
36235
36251
  name: "@webority/mobile-ui",
36236
- version: "0.109.7"
36252
+ version: "0.109.9"
36237
36253
  },
36238
36254
  rendererProtocolVersion: 12,
36239
36255
  platform: "Phone",
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityPhone",
3
3
  "library": {
4
4
  "name": "@webority/mobile-ui",
5
- "version": "0.109.7"
5
+ "version": "0.109.9"
6
6
  },
7
7
  "rendererProtocolVersion": 12,
8
8
  "platform": "Phone",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-phone",
3
- "version": "0.109.7",
3
+ "version": "0.109.9",
4
4
  "platform": "Phone",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 12,
7
7
  "library": {
8
8
  "name": "@webority/mobile-ui",
9
- "version": "0.109.7"
9
+ "version": "0.109.9"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "133d29dc0dd83c292f0898bda8bf20a99479f8087b1aa26bbbea9b36c5d0d8c6",
13
+ "sha256": "f7bbf9b81118447cbf0b01c6296e6dca2db7d6ef699a1ec4b638318f836bcab7",
14
14
  "bytes": 636807
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "6de00f6a938274fc1f45d9ea786960124cbc3d004a9f37c161b49d36970dbe53",
18
- "bytes": 5951187
17
+ "sha256": "e4445aa048769173abba69f42f2ff0f80134e84a97229e99496ad2b70478ceb4",
18
+ "bytes": 5951576
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OverlayActions=exports.OVERLAY_TONES=exports.ACTIONS_LAYOUTS=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_jsxRuntime=require("react/jsx-runtime");const OVERLAY_TONES=exports.OVERLAY_TONES=["primary","success","warning","danger","info","neutral"],ACTIONS_LAYOUTS=exports.ACTIONS_LAYOUTS=["auto","row","stacked"],OverlayActions=({actions:e,layout:r,testID:o,stackedLabels:t,rowStyle:a,buttonStyle:n,textStyle:s})=>{const l=(0,_index.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(l),[l]),c=l.components.dialog["action-button-min-height"],d=l.text.base.size*l.leading.body,u=e.map(e=>e.label).join("\n"),b=(0,_react.useState)(null),[x,y]=t??b,g="stacked"===r||"row"!==r&&(null!==x&&x===u),p=(0,_react.useRef)(null),C=(0,_react.useCallback)(e=>{e.nativeEvent.layout.height>1.5*d&&y(u)},[d,u,y]),_=(0,_react.useCallback)(e=>{const r=e.nativeEvent.layout.width,o=p.current;p.current=r,null!==o&&Math.abs(o-r)>.5&&y(null)},[y]),m=new Map;return(0,_jsxRuntime.jsx)(_reactNative.View,{testID:o,style:[i.actionsRow,g?i.actionsRowStacked:null,a],onLayout:_,children:e.map((r,o)=>{const t=(m.get(r.label)??0)+1;m.set(r.label,t),(0,_warnInvalidValue.warnInvalidValue)("OverlayActions","actions[].tone",r.tone,OVERLAY_TONES);const a=r.tone??"primary",d=Boolean(r.disabled),u=actionStyleFor(l,a,d),b=o===e.length-1;return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:r.onPress,disabled:r.loading||d,accessibilityRole:"button",accessibilityLabel:r.label,accessibilityState:{busy:r.loading,disabled:Boolean(r.loading)||d},"aria-busy":r.loading,"aria-disabled":Boolean(r.loading)||d,style:({pressed:e})=>[i.actionButton,{flex:g?0:1,minHeight:c,backgroundColor:u.backgroundColor,borderColor:u.borderColor,borderWidth:u.borderWidth,borderRadius:l.radius.md,..._corners.smoothCorners,paddingVertical:l.space.sm,paddingHorizontal:l.space.md,marginRight:b||g?0:l.space.sm,opacity:r.loading?.7:e&&!d?.85:1},n],children:r.loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:u.textColor}):(0,_jsxRuntime.jsx)(_reactNative.View,{onLayout:C,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{color:u.textColor,fontSize:l.text.base.size,...(0,_index.fontFor)(l,"semibold"),textAlign:"center"},s],children:r.label})})},`${r.label}-${t}`)})})};exports.OverlayActions=OverlayActions,OverlayActions.displayName="OverlayActions";const actionStyleFor=(e,r,o)=>{if(o)return{backgroundColor:"neutral"===r?"transparent":e.colors["surface-disabled"],borderColor:"neutral"===r?e.colors.border:"transparent",borderWidth:"neutral"===r?1:0,textColor:e.colors["text-disabled"]};switch(r){case"primary":return{backgroundColor:e.colors.primary,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-primary"]};case"info":return{backgroundColor:e.colors.info,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-info"]};case"success":return{backgroundColor:e.colors.success,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-success"]};case"warning":return{backgroundColor:e.colors.warning,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-warning"]};case"danger":return{backgroundColor:e.colors.danger,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:e.colors.border,borderWidth:1,textColor:e.colors["text-body"]}}},buildStyles=e=>_reactNative.StyleSheet.create({actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionsRowStacked:{flexDirection:"column",rowGap:e.space.sm},actionButton:{alignItems:"center",justifyContent:"center"}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OverlayActions=exports.OVERLAY_TONES=exports.ACTIONS_LAYOUTS=void 0;var _react=require("react"),_reactNative=require("react-native"),_index=require("../../theme/index.js"),_corners=require("../../utils/corners.js"),_warnInvalidValue=require("../../utils/warnInvalidValue.js"),_slotIcon=require("../AppIcon/slotIcon.js"),_jsxRuntime=require("react/jsx-runtime");const OVERLAY_TONES=exports.OVERLAY_TONES=["primary","success","warning","danger","info","neutral"],ACTIONS_LAYOUTS=exports.ACTIONS_LAYOUTS=["auto","row","stacked"],OverlayActions=({actions:e,layout:r,testID:o,stackedLabels:t,rowStyle:n,buttonStyle:a,textStyle:l})=>{const s=(0,_index.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(s),[s]),c=s.components.dialog["action-button-min-height"],d=(0,_index.resolveButtonSize)(s,"md").icon,u=s.text.base.size*s.leading.body,b=e.map(e=>e.label).join("\n"),x=(0,_react.useState)(null),[y,_]=t??x,g="stacked"===r||"row"!==r&&(null!==y&&y===b),m=(0,_react.useRef)(null),p=(0,_react.useCallback)(e=>{e.nativeEvent.layout.height>1.5*u&&_(b)},[u,b,_]),C=(0,_react.useCallback)(e=>{const r=e.nativeEvent.layout.width,o=m.current;m.current=r,null!==o&&Math.abs(o-r)>.5&&_(null)},[_]),h=new Map;return(0,_jsxRuntime.jsx)(_reactNative.View,{testID:o,style:[i.actionsRow,g?i.actionsRowStacked:null,n],onLayout:C,children:e.map((r,o)=>{const t=(h.get(r.label)??0)+1;h.set(r.label,t),(0,_warnInvalidValue.warnInvalidValue)("OverlayActions","actions[].tone",r.tone,OVERLAY_TONES);const n=r.tone??"primary",u=Boolean(r.disabled),b=actionStyleFor(s,n,u),x=o===e.length-1;return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:r.onPress,disabled:r.loading||u,accessibilityRole:"button",accessibilityLabel:r.label,accessibilityState:{busy:r.loading,disabled:Boolean(r.loading)||u},"aria-busy":r.loading,"aria-disabled":Boolean(r.loading)||u,style:({pressed:e})=>[i.actionButton,{flex:g?0:1,minHeight:c,backgroundColor:b.backgroundColor,borderColor:b.borderColor,borderWidth:b.borderWidth,borderRadius:s.radius.md,..._corners.smoothCorners,paddingVertical:s.space.sm,paddingHorizontal:s.space.md,marginRight:x||g?0:s.space.sm,opacity:r.loading?.7:e&&!u?.85:1},a],children:r.loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:b.textColor}):(0,_jsxRuntime.jsxs)(_reactNative.View,{style:i.labelRow,children:[r.icon?(0,_jsxRuntime.jsx)(_reactNative.View,{style:i.labelIcon,children:(0,_slotIcon.renderSlotIcon)(r.icon,{color:b.textColor,size:d,disabled:u},"linear")}):null,(0,_jsxRuntime.jsx)(_reactNative.View,{onLayout:p,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{color:b.textColor,fontSize:s.text.base.size,...(0,_index.fontFor)(s,"semibold"),textAlign:"center"},l],children:r.label})})]})},`${r.label}-${t}`)})})};exports.OverlayActions=OverlayActions,OverlayActions.displayName="OverlayActions";const actionStyleFor=(e,r,o)=>{if(o)return{backgroundColor:"neutral"===r?"transparent":e.colors["surface-disabled"],borderColor:"neutral"===r?e.colors.border:"transparent",borderWidth:"neutral"===r?1:0,textColor:e.colors["text-disabled"]};switch(r){case"primary":return{backgroundColor:e.colors.primary,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-primary"]};case"info":return{backgroundColor:e.colors.info,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-info"]};case"success":return{backgroundColor:e.colors.success,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-success"]};case"warning":return{backgroundColor:e.colors.warning,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-warning"]};case"danger":return{backgroundColor:e.colors.danger,borderColor:"transparent",borderWidth:0,textColor:e.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:e.colors.border,borderWidth:1,textColor:e.colors["text-body"]}}},buildStyles=e=>_reactNative.StyleSheet.create({actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionsRowStacked:{flexDirection:"column",rowGap:e.space.sm},actionButton:{alignItems:"center",justifyContent:"center"},labelRow:{flexDirection:"row",alignItems:"center",justifyContent:"center"},labelIcon:{marginRight:e.space.xs}});
@@ -1 +1 @@
1
- "use strict";import{useCallback,useMemo,useRef,useState}from"react";import{ActivityIndicator,Pressable,StyleSheet,Text,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{jsx as _jsx}from"react/jsx-runtime";export const OVERLAY_TONES=["primary","success","warning","danger","info","neutral"];export const ACTIONS_LAYOUTS=["auto","row","stacked"];const OverlayActions=({actions:o,layout:e,testID:r,stackedLabels:t,rowStyle:n,buttonStyle:a,textStyle:l})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),c=s.components.dialog["action-button-min-height"],d=s.text.base.size*s.leading.body,u=o.map(o=>o.label).join("\n"),b=useState(null),[m,y]=t??b,g="stacked"===e||"row"!==e&&(null!==m&&m===u),p=useRef(null),C=useCallback(o=>{o.nativeEvent.layout.height>1.5*d&&y(u)},[d,u,y]),x=useCallback(o=>{const e=o.nativeEvent.layout.width,r=p.current;p.current=e,null!==r&&Math.abs(r-e)>.5&&y(null)},[y]),h=new Map;return _jsx(View,{testID:r,style:[i.actionsRow,g?i.actionsRowStacked:null,n],onLayout:x,children:o.map((e,r)=>{const t=(h.get(e.label)??0)+1;h.set(e.label,t),warnInvalidValue("OverlayActions","actions[].tone",e.tone,OVERLAY_TONES);const n=e.tone??"primary",d=Boolean(e.disabled),u=actionStyleFor(s,n,d),b=r===o.length-1;return _jsx(Pressable,{onPress:e.onPress,disabled:e.loading||d,accessibilityRole:"button",accessibilityLabel:e.label,accessibilityState:{busy:e.loading,disabled:Boolean(e.loading)||d},"aria-busy":e.loading,"aria-disabled":Boolean(e.loading)||d,style:({pressed:o})=>[i.actionButton,{flex:g?0:1,minHeight:c,backgroundColor:u.backgroundColor,borderColor:u.borderColor,borderWidth:u.borderWidth,borderRadius:s.radius.md,...smoothCorners,paddingVertical:s.space.sm,paddingHorizontal:s.space.md,marginRight:b||g?0:s.space.sm,opacity:e.loading?.7:o&&!d?.85:1},a],children:e.loading?_jsx(ActivityIndicator,{size:"small",color:u.textColor}):_jsx(View,{onLayout:C,children:_jsx(Text,{style:[{color:u.textColor,fontSize:s.text.base.size,...fontFor(s,"semibold"),textAlign:"center"},l],children:e.label})})},`${e.label}-${t}`)})})};OverlayActions.displayName="OverlayActions";const actionStyleFor=(o,e,r)=>{if(r)return{backgroundColor:"neutral"===e?"transparent":o.colors["surface-disabled"],borderColor:"neutral"===e?o.colors.border:"transparent",borderWidth:"neutral"===e?1:0,textColor:o.colors["text-disabled"]};switch(e){case"primary":return{backgroundColor:o.colors.primary,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-primary"]};case"info":return{backgroundColor:o.colors.info,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-info"]};case"success":return{backgroundColor:o.colors.success,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-success"]};case"warning":return{backgroundColor:o.colors.warning,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-warning"]};case"danger":return{backgroundColor:o.colors.danger,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:o.colors.border,borderWidth:1,textColor:o.colors["text-body"]}}},buildStyles=o=>StyleSheet.create({actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionsRowStacked:{flexDirection:"column",rowGap:o.space.sm},actionButton:{alignItems:"center",justifyContent:"center"}});export{OverlayActions};
1
+ "use strict";import{useCallback,useMemo,useRef,useState}from"react";import{ActivityIndicator,Pressable,StyleSheet,Text,View}from"react-native";import{fontFor,resolveButtonSize,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{warnInvalidValue}from"../../utils/warnInvalidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const OVERLAY_TONES=["primary","success","warning","danger","info","neutral"];export const ACTIONS_LAYOUTS=["auto","row","stacked"];const OverlayActions=({actions:o,layout:e,testID:r,stackedLabels:t,rowStyle:n,buttonStyle:l,textStyle:a})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),c=s.components.dialog["action-button-min-height"],d=resolveButtonSize(s,"md").icon,u=s.text.base.size*s.leading.body,b=o.map(o=>o.label).join("\n"),m=useState(null),[y,g]=t??m,p="stacked"===e||"row"!==e&&(null!==y&&y===b),x=useRef(null),C=useCallback(o=>{o.nativeEvent.layout.height>1.5*u&&g(b)},[u,b,g]),h=useCallback(o=>{const e=o.nativeEvent.layout.width,r=x.current;x.current=e,null!==r&&Math.abs(r-e)>.5&&g(null)},[g]),f=new Map;return _jsx(View,{testID:r,style:[i.actionsRow,p?i.actionsRowStacked:null,n],onLayout:h,children:o.map((e,r)=>{const t=(f.get(e.label)??0)+1;f.set(e.label,t),warnInvalidValue("OverlayActions","actions[].tone",e.tone,OVERLAY_TONES);const n=e.tone??"primary",u=Boolean(e.disabled),b=actionStyleFor(s,n,u),m=r===o.length-1;return _jsx(Pressable,{onPress:e.onPress,disabled:e.loading||u,accessibilityRole:"button",accessibilityLabel:e.label,accessibilityState:{busy:e.loading,disabled:Boolean(e.loading)||u},"aria-busy":e.loading,"aria-disabled":Boolean(e.loading)||u,style:({pressed:o})=>[i.actionButton,{flex:p?0:1,minHeight:c,backgroundColor:b.backgroundColor,borderColor:b.borderColor,borderWidth:b.borderWidth,borderRadius:s.radius.md,...smoothCorners,paddingVertical:s.space.sm,paddingHorizontal:s.space.md,marginRight:m||p?0:s.space.sm,opacity:e.loading?.7:o&&!u?.85:1},l],children:e.loading?_jsx(ActivityIndicator,{size:"small",color:b.textColor}):_jsxs(View,{style:i.labelRow,children:[e.icon?_jsx(View,{style:i.labelIcon,children:renderSlotIcon(e.icon,{color:b.textColor,size:d,disabled:u},"linear")}):null,_jsx(View,{onLayout:C,children:_jsx(Text,{style:[{color:b.textColor,fontSize:s.text.base.size,...fontFor(s,"semibold"),textAlign:"center"},a],children:e.label})})]})},`${e.label}-${t}`)})})};OverlayActions.displayName="OverlayActions";const actionStyleFor=(o,e,r)=>{if(r)return{backgroundColor:"neutral"===e?"transparent":o.colors["surface-disabled"],borderColor:"neutral"===e?o.colors.border:"transparent",borderWidth:"neutral"===e?1:0,textColor:o.colors["text-disabled"]};switch(e){case"primary":return{backgroundColor:o.colors.primary,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-primary"]};case"info":return{backgroundColor:o.colors.info,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-info"]};case"success":return{backgroundColor:o.colors.success,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-success"]};case"warning":return{backgroundColor:o.colors.warning,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-warning"]};case"danger":return{backgroundColor:o.colors.danger,borderColor:"transparent",borderWidth:0,textColor:o.colors["on-danger"]};default:return{backgroundColor:"transparent",borderColor:o.colors.border,borderWidth:1,textColor:o.colors["text-body"]}}},buildStyles=o=>StyleSheet.create({actionsRow:{flexDirection:"row",justifyContent:"flex-end",alignItems:"stretch"},actionsRowStacked:{flexDirection:"column",rowGap:o.space.sm},actionButton:{alignItems:"center",justifyContent:"center"},labelRow:{flexDirection:"row",alignItems:"center",justifyContent:"center"},labelIcon:{marginRight:o.space.xs}});export{OverlayActions};
@@ -2,12 +2,15 @@ import type React from "react";
2
2
  import type { ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from "react-native";
3
3
  import type { Tone } from "../../types/vocabulary";
4
4
  import type { HapticType } from "../../utils/hapticUtils";
5
+ import type { SlotIcon } from "../AppIcon/slotIcon";
5
6
  import { type ActionsLayout } from "./OverlayActions";
6
7
  export type DialogActionTone = Tone;
7
8
  export interface DialogAction {
8
9
  label: string;
9
10
  onPress: () => void;
10
11
  tone?: DialogActionTone;
12
+ /** Icon before the label, drawn in the label's colour; the same icon contract as Button `leftIcon`. */
13
+ icon?: SlotIcon;
11
14
  loading?: boolean;
12
15
  /** Dims the action and blocks its press (a confirm waiting on a typed phrase, say). */
13
16
  disabled?: boolean;
@@ -2,12 +2,15 @@ import type React from "react";
2
2
  import type { ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from "react-native";
3
3
  import type { Tone } from "../../types/vocabulary.js";
4
4
  import type { HapticType } from "../../utils/hapticUtils.js";
5
+ import type { SlotIcon } from "../AppIcon/slotIcon.js";
5
6
  import { type ActionsLayout } from "./OverlayActions.js";
6
7
  export type DialogActionTone = Tone;
7
8
  export interface DialogAction {
8
9
  label: string;
9
10
  onPress: () => void;
10
11
  tone?: DialogActionTone;
12
+ /** Icon before the label, drawn in the label's colour; the same icon contract as Button `leftIcon`. */
13
+ icon?: SlotIcon;
11
14
  loading?: boolean;
12
15
  /** Dims the action and blocks its press (a confirm waiting on a typed phrase, say). */
13
16
  disabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-ui",
3
- "version": "0.109.7",
3
+ "version": "0.109.9",
4
4
  "description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -100,8 +100,8 @@
100
100
  "react-native-safe-area-context": ">=5.4.0",
101
101
  "react-native-svg": ">=15.0.0",
102
102
  "react-native-worklets": ">=0.10.0",
103
- "@webority/canvas-kit": "0.109.7",
104
- "@webority/mobile-core": "0.109.7"
103
+ "@webority/canvas-kit": "0.109.9",
104
+ "@webority/mobile-core": "0.109.9"
105
105
  },
106
106
  "peerDependenciesMeta": {
107
107
  "@react-navigation/bottom-tabs": {
@@ -170,10 +170,10 @@
170
170
  "react-test-renderer": "19.2.8",
171
171
  "rimraf": "6.1.3",
172
172
  "typescript": "5.9.3",
173
- "@webority/mobile-core": "0.109.7",
174
- "@webority/canvas-kit": "0.109.7",
173
+ "@webority/mobile-core": "0.109.9",
174
+ "@webority/canvas-kit": "0.109.9",
175
175
  "@webority/mobile-dev": "0.0.0",
176
- "@webority/tokens": "0.109.7"
176
+ "@webority/tokens": "0.109.9"
177
177
  },
178
178
  "scripts": {
179
179
  "build": "bob build && node ../mobile-dev/scripts/minify-lib.mjs && node -e \"require('node:fs').rmSync('dist/canvas-kit',{recursive:true,force:true})\" && node ../canvas-kit/dist/cli.js build --config canvas-kit.json --out dist/canvas-kit",