@hzblj/kara-components 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.android.js +6 -1
- package/lib/module/atoms/activity-indicator/activity-indicator.android.js.map +1 -1
- package/lib/module/atoms/activity-indicator/activity-indicator.ios.js +2 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.ios.js.map +1 -1
- package/lib/module/atoms/avatar/avatar.js +5 -0
- package/lib/module/atoms/avatar/avatar.js.map +1 -1
- package/lib/module/atoms/box/box.js +3 -0
- package/lib/module/atoms/box/box.js.map +1 -1
- package/lib/module/atoms/box/index.js +0 -1
- package/lib/module/atoms/box/index.js.map +1 -1
- package/lib/module/atoms/button/button-tokens.js +2 -2
- package/lib/module/atoms/button/button-tokens.js.map +1 -1
- package/lib/module/atoms/button/button.android.js +6 -2
- package/lib/module/atoms/button/button.android.js.map +1 -1
- package/lib/module/atoms/button/button.ios.js +7 -2
- package/lib/module/atoms/button/button.ios.js.map +1 -1
- package/lib/module/atoms/card/card.android.js +5 -3
- package/lib/module/atoms/card/card.android.js.map +1 -1
- package/lib/module/atoms/card/card.ios.js +7 -3
- package/lib/module/atoms/card/card.ios.js.map +1 -1
- package/lib/module/atoms/checkbox/checkbox.android.js +1 -1
- package/lib/module/atoms/checkbox/checkbox.android.js.map +1 -1
- package/lib/module/atoms/fab/fab.android.js +9 -1
- package/lib/module/atoms/fab/fab.android.js.map +1 -1
- package/lib/module/atoms/fab/fab.ios.js +9 -3
- package/lib/module/atoms/fab/fab.ios.js.map +1 -1
- package/lib/module/atoms/glass-view/glass-view.android.js +1 -1
- package/lib/module/atoms/glass-view/glass-view.android.js.map +1 -1
- package/lib/module/atoms/h-stack/h-stack.ios.js +5 -3
- package/lib/module/atoms/h-stack/h-stack.ios.js.map +1 -1
- package/lib/module/atoms/icon-button/icon-button.android.js +9 -0
- package/lib/module/atoms/icon-button/icon-button.android.js.map +1 -1
- package/lib/module/atoms/icon-button/icon-button.ios.js +9 -2
- package/lib/module/atoms/icon-button/icon-button.ios.js.map +1 -1
- package/lib/module/atoms/image/image.js +4 -4
- package/lib/module/atoms/image/image.js.map +1 -1
- package/lib/module/atoms/index.js +1 -0
- package/lib/module/atoms/index.js.map +1 -1
- package/lib/module/atoms/pressable/pressable.js +75 -27
- package/lib/module/atoms/pressable/pressable.js.map +1 -1
- package/lib/module/atoms/progress/progress.android.js +7 -0
- package/lib/module/atoms/progress/progress.android.js.map +1 -1
- package/lib/module/atoms/progress/progress.ios.js +6 -1
- package/lib/module/atoms/progress/progress.ios.js.map +1 -1
- package/lib/module/atoms/rn-text/rn-text.js +66 -26
- package/lib/module/atoms/rn-text/rn-text.js.map +1 -1
- package/lib/module/atoms/segmented-control/segmented-control.android.js +1 -1
- package/lib/module/atoms/segmented-control/segmented-control.android.js.map +1 -1
- package/lib/module/atoms/segmented-control/segmented-control.ios.js +1 -1
- package/lib/module/atoms/segmented-control/segmented-control.ios.js.map +1 -1
- package/lib/module/atoms/skeleton/skeleton.js +22 -8
- package/lib/module/atoms/skeleton/skeleton.js.map +1 -1
- package/lib/module/atoms/stagger/index.js +5 -0
- package/lib/module/atoms/stagger/index.js.map +1 -0
- package/lib/module/atoms/stagger/stagger.js +102 -0
- package/lib/module/atoms/stagger/stagger.js.map +1 -0
- package/lib/module/atoms/stagger/stagger.types.js +4 -0
- package/lib/module/atoms/stagger/stagger.types.js.map +1 -0
- package/lib/module/atoms/surface/surface.android.js +5 -3
- package/lib/module/atoms/surface/surface.android.js.map +1 -1
- package/lib/module/atoms/surface/surface.ios.js +7 -3
- package/lib/module/atoms/surface/surface.ios.js.map +1 -1
- package/lib/module/atoms/switch/switch.android.js +1 -1
- package/lib/module/atoms/switch/switch.android.js.map +1 -1
- package/lib/module/atoms/text/text.android.js +5 -3
- package/lib/module/atoms/text/text.android.js.map +1 -1
- package/lib/module/atoms/text/text.ios.js +6 -4
- package/lib/module/atoms/text/text.ios.js.map +1 -1
- package/lib/module/atoms/v-stack/v-stack.ios.js +5 -3
- package/lib/module/atoms/v-stack/v-stack.ios.js.map +1 -1
- package/lib/module/atoms/z-stack/z-stack.ios.js +5 -3
- package/lib/module/atoms/z-stack/z-stack.ios.js.map +1 -1
- package/lib/module/glyph/glyph.android.js +2 -0
- package/lib/module/glyph/glyph.android.js.map +1 -1
- package/lib/module/glyph/glyph.ios.js +5 -2
- package/lib/module/glyph/glyph.ios.js.map +1 -1
- package/lib/module/molecules/collapsible/collapsible.android.js +18 -8
- package/lib/module/molecules/collapsible/collapsible.android.js.map +1 -1
- package/lib/module/molecules/labeled-content/labeled-content.js +4 -1
- package/lib/module/molecules/labeled-content/labeled-content.js.map +1 -1
- package/lib/module/molecules/link/link.js +4 -1
- package/lib/module/molecules/link/link.js.map +1 -1
- package/lib/module/molecules/list-item/list-item.js +4 -1
- package/lib/module/molecules/list-item/list-item.js.map +1 -1
- package/lib/module/molecules/navigation-bar/navigation-bar.android.js +1 -1
- package/lib/module/molecules/navigation-bar/navigation-bar.android.js.map +1 -1
- package/lib/module/molecules/navigation-bar/navigation-bar.ios.js +1 -1
- package/lib/module/molecules/navigation-bar/navigation-bar.ios.js.map +1 -1
- package/lib/module/molecules/rn-list-item/rn-list-item.js +10 -2
- package/lib/module/molecules/rn-list-item/rn-list-item.js.map +1 -1
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js +5 -6
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js.map +1 -1
- package/lib/module/molecules/stepper/stepper.ios.js +6 -2
- package/lib/module/molecules/stepper/stepper.ios.js.map +1 -1
- package/lib/module/organisms/fab-menu/fab-menu.android.js +8 -5
- package/lib/module/organisms/fab-menu/fab-menu.android.js.map +1 -1
- package/lib/module/organisms/fab-menu/fab-menu.ios.js +5 -2
- package/lib/module/organisms/fab-menu/fab-menu.ios.js.map +1 -1
- package/lib/module/organisms/snackbar/snackbar.js +155 -18
- package/lib/module/organisms/snackbar/snackbar.js.map +1 -1
- package/lib/module/organisms/swipe-actions/swipe-actions.android.js +1 -1
- package/lib/module/organisms/swipe-actions/swipe-actions.android.js.map +1 -1
- package/lib/module/use-stack-modifiers.js +10 -8
- package/lib/module/use-stack-modifiers.js.map +1 -1
- package/lib/typescript/atoms/activity-indicator/activity-indicator.types.d.ts +2 -0
- package/lib/typescript/atoms/avatar/avatar.types.d.ts +5 -0
- package/lib/typescript/atoms/box/box.d.ts +3 -0
- package/lib/typescript/atoms/box/index.d.ts +0 -1
- package/lib/typescript/atoms/button/button-tokens.d.ts +1 -1
- package/lib/typescript/atoms/button/button.types.d.ts +2 -0
- package/lib/typescript/atoms/card/card.types.d.ts +2 -2
- package/lib/typescript/atoms/fab/fab.types.d.ts +8 -1
- package/lib/typescript/atoms/h-stack/h-stack.types.d.ts +6 -3
- package/lib/typescript/atoms/icon-button/icon-button.types.d.ts +7 -0
- package/lib/typescript/atoms/image/image.d.ts +2 -2
- package/lib/typescript/atoms/index.d.ts +1 -0
- package/lib/typescript/atoms/pressable/pressable.types.d.ts +10 -9
- package/lib/typescript/atoms/progress/progress.types.d.ts +2 -0
- package/lib/typescript/atoms/rn-text/rn-text.types.d.ts +7 -4
- package/lib/typescript/atoms/skeleton/skeleton.types.d.ts +3 -2
- package/lib/typescript/atoms/stagger/index.d.ts +2 -0
- package/lib/typescript/atoms/stagger/stagger.d.ts +2 -0
- package/lib/typescript/atoms/stagger/stagger.types.d.ts +32 -0
- package/lib/typescript/atoms/surface/surface.types.d.ts +2 -2
- package/lib/typescript/atoms/text/text.types.d.ts +2 -2
- package/lib/typescript/atoms/v-stack/v-stack.types.d.ts +3 -3
- package/lib/typescript/atoms/z-stack/z-stack.types.d.ts +3 -3
- package/lib/typescript/glyph/glyph.types.d.ts +2 -0
- package/lib/typescript/molecules/labeled-content/labeled-content.types.d.ts +4 -2
- package/lib/typescript/molecules/link/link.types.d.ts +2 -1
- package/lib/typescript/molecules/list-item/list-item.types.d.ts +5 -3
- package/lib/typescript/molecules/stepper/stepper.ios.d.ts +1 -1
- package/lib/typescript/organisms/fab-menu/fab-menu.types.d.ts +5 -0
- package/lib/typescript/organisms/snackbar/snackbar.types.d.ts +35 -4
- package/lib/typescript/use-stack-modifiers.d.ts +6 -5
- package/package.json +4 -4
- package/src/atoms/activity-indicator/activity-indicator.android.tsx +7 -1
- package/src/atoms/activity-indicator/activity-indicator.ios.tsx +9 -1
- package/src/atoms/activity-indicator/activity-indicator.types.ts +2 -0
- package/src/atoms/avatar/avatar.tsx +5 -1
- package/src/atoms/avatar/avatar.types.ts +5 -0
- package/src/atoms/box/box.tsx +3 -0
- package/src/atoms/box/index.ts +0 -1
- package/src/atoms/button/button-tokens.ts +2 -2
- package/src/atoms/button/button.android.tsx +5 -3
- package/src/atoms/button/button.ios.tsx +10 -2
- package/src/atoms/button/button.types.ts +2 -0
- package/src/atoms/card/card.android.tsx +6 -4
- package/src/atoms/card/card.ios.tsx +7 -3
- package/src/atoms/card/card.types.ts +8 -7
- package/src/atoms/checkbox/checkbox.android.tsx +1 -1
- package/src/atoms/fab/fab.android.tsx +5 -3
- package/src/atoms/fab/fab.ios.tsx +8 -4
- package/src/atoms/fab/fab.types.ts +8 -1
- package/src/atoms/glass-view/glass-view.android.tsx +1 -1
- package/src/atoms/h-stack/h-stack.ios.tsx +6 -4
- package/src/atoms/h-stack/h-stack.types.ts +17 -13
- package/src/atoms/icon-button/icon-button.android.tsx +16 -3
- package/src/atoms/icon-button/icon-button.ios.tsx +13 -4
- package/src/atoms/icon-button/icon-button.types.ts +7 -0
- package/src/atoms/image/image.tsx +3 -3
- package/src/atoms/index.ts +1 -0
- package/src/atoms/pressable/pressable.tsx +164 -100
- package/src/atoms/pressable/pressable.types.ts +32 -29
- package/src/atoms/progress/progress.android.tsx +5 -3
- package/src/atoms/progress/progress.ios.tsx +5 -2
- package/src/atoms/progress/progress.types.ts +2 -0
- package/src/atoms/rn-text/rn-text.tsx +101 -32
- package/src/atoms/rn-text/rn-text.types.ts +7 -3
- package/src/atoms/segmented-control/segmented-control.android.tsx +1 -1
- package/src/atoms/segmented-control/segmented-control.ios.tsx +1 -1
- package/src/atoms/skeleton/skeleton.tsx +20 -6
- package/src/atoms/skeleton/skeleton.types.ts +3 -2
- package/src/atoms/stagger/index.ts +2 -0
- package/src/atoms/stagger/stagger.tsx +98 -0
- package/src/atoms/stagger/stagger.types.ts +35 -0
- package/src/atoms/surface/surface.android.tsx +6 -4
- package/src/atoms/surface/surface.ios.tsx +7 -3
- package/src/atoms/surface/surface.types.ts +10 -9
- package/src/atoms/switch/switch.android.tsx +1 -1
- package/src/atoms/text/text.android.tsx +6 -4
- package/src/atoms/text/text.ios.tsx +6 -4
- package/src/atoms/text/text.types.ts +23 -22
- package/src/atoms/v-stack/v-stack.ios.tsx +6 -4
- package/src/atoms/v-stack/v-stack.types.ts +17 -16
- package/src/atoms/z-stack/z-stack.ios.tsx +6 -4
- package/src/atoms/z-stack/z-stack.types.ts +15 -14
- package/src/glyph/glyph.android.tsx +14 -2
- package/src/glyph/glyph.ios.tsx +13 -3
- package/src/glyph/glyph.types.ts +2 -0
- package/src/molecules/collapsible/collapsible.android.tsx +27 -7
- package/src/molecules/labeled-content/labeled-content.tsx +12 -1
- package/src/molecules/labeled-content/labeled-content.types.ts +4 -2
- package/src/molecules/link/link.tsx +2 -1
- package/src/molecules/link/link.types.ts +2 -1
- package/src/molecules/list-item/list-item.tsx +20 -2
- package/src/molecules/list-item/list-item.types.ts +5 -3
- package/src/molecules/navigation-bar/navigation-bar.android.tsx +1 -1
- package/src/molecules/navigation-bar/navigation-bar.ios.tsx +1 -1
- package/src/molecules/rn-list-item/rn-list-item.tsx +18 -3
- package/src/molecules/scroll-edge-container/scroll-edge-container.android.tsx +5 -4
- package/src/molecules/stepper/stepper.ios.tsx +8 -2
- package/src/organisms/fab-menu/fab-menu.android.tsx +9 -5
- package/src/organisms/fab-menu/fab-menu.ios.tsx +6 -2
- package/src/organisms/fab-menu/fab-menu.types.ts +5 -0
- package/src/organisms/snackbar/snackbar.tsx +125 -21
- package/src/organisms/snackbar/snackbar.types.ts +38 -4
- package/src/organisms/swipe-actions/swipe-actions.android.tsx +1 -1
- package/src/use-stack-modifiers.ts +20 -7
- package/lib/module/atoms/box/a-box.js +0 -6
- package/lib/module/atoms/box/a-box.js.map +0 -1
- package/lib/typescript/atoms/box/a-box.d.ts +0 -49
- package/src/atoms/box/a-box.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["timing","spacing","useReducedMotion","useEffect","useRef","AccessibilityInfo","Platform","withTiming","Box","Pressable","RnText","RnGlyph","jsx","_jsx","jsxs","_jsxs","DURATIONS","long","short","PLATFORM_ANIMATION","OS","CLOSE_SIZE","GROW","scaleIn","animations","opacity","transform","scale","initialValues","TRANSITIONS","fade","entering","exiting","duration","preset","slideBottom","distance","slideTop","transitionsFor","animation","position","millisecondsOf","undefined","Snackbar","actionLabel","actionOnNewLine","dismissible","message","offset","onAction","onDismiss","visible","reduced","dismiss","current","milliseconds","timer","setTimeout","clearTimeout","announceForAccessibility","edge","top","bottom","hasTrailing","Boolean","align","bg","borderRadius","flexDirection","gap","left","s16","px","py","right","shadow","children","color","flex","variant","alignSelf","onPress","pressEffect","ripple","accessibilityLabel","name","size"],"sourceRoot":"../../../../src","sources":["organisms/snackbar/snackbar.tsx"],"mappings":";;AAAA,SAA0BA,MAAM,QAAO,gBAAgB;AACvD,SAAQC,OAAO,EAAEC,gBAAgB,QAAO,mBAAmB;AAC3D,SAAQC,SAAS,EAAEC,MAAM,QAAO,OAAO;AACvC,SAAQC,iBAAiB,EAAEC,QAAQ,QAAO,cAAc;AACxD,SAAyCC,UAAU,QAAO,yBAAyB;AAEnF,SAAQC,GAAG,QAAO,0BAAiB;AACnC,SAAQC,SAAS,QAAO,gCAAuB;AAC/C,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,OAAO,QAAO,sB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AM,CAACF,OAAQ;IAAA4C,QAAA,gBAGnC/D,IAAA,CAACH,MAAM;MAACmE,KAAK,EAAC,0BAA0B;MAACC,IAAI,EAAEjC,eAAe,GAAGH,SAAS,GAAG,CAAE;MAACqC,OAAO,EAAC,UAAU;MAAAH,QAAA,EAC/F7B;IAAO,CACF,CAAC,EACRgB,WAAW,gBACVhD,KAAA,CAACP,GAAG;MAACyD,KAAK,EAAC,QAAQ;MAACe,SAAS,EAAEnC,eAAe,GAAG,UAAU,GAAGH,SAAU;MAAC0B,aAAa,EAAC,KAAK;MAACC,GAAG,EAAC,KAAK;MAAAO,QAAA,GACnGhC,WAAW,gBACV/B,IAAA,CAACJ,SAAS;QAACwE,OAAO,EAAEhC,QAAS;QAACiC,WAAW,EAAC,SAAS;QAACC,MAAM,EAAE,KAAM;QAAAP,QAAA,eAChE/D,IAAA,CAACH,MAAM;UAACmE,KAAK,EAAC,gBAAgB;UAACE,OAAO,EAAC,gBAAgB;UAAAH,QAAA,EACpDhC;QAAW,CACN;MAAC,CACA,CAAC,GACV,IAAI,EACPE,WAAW,gBACVjC,IAAA,CAACJ,SAAS;QAAC2E,kBAAkB,EAAC,SAAS;QAACH,OAAO,EAAE/B,SAAU;QAACgC,WAAW,EAAC,SAAS;QAACC,MAAM,EAAE,KAAM;QAAAP,QAAA,eAC9F/D,IAAA,CAACF,OAAO;UAACkE,KAAK,EAAC,0BAA0B;UAACQ,IAAI,EAAC,OAAO;UAACC,IAAI,EAAEjE;QAAW,CAAE;MAAC,CAClE,CAAC,GACV,IAAI;IAAA,CACL,CAAC,GACJ,IAAI;EAAA,CACL,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -42,7 +42,7 @@ const ActionButton = ({
|
|
|
42
42
|
}) => {
|
|
43
43
|
const theme = useAppTheme();
|
|
44
44
|
const fill = action.tint ?? (action.destructive ? 'fill.destructive.primary' : 'fill.accent.primary');
|
|
45
|
-
const content = !action.tint && action.destructive ? 'content.on.destructive' : 'content.on.
|
|
45
|
+
const content = !action.tint && action.destructive ? 'content.on.destructive' : 'content.on.accent';
|
|
46
46
|
const onClick = useCallback(() => {
|
|
47
47
|
onDone();
|
|
48
48
|
action.onPress();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FilledIconButton","size","SwipeActionsBox","spacing","useAppTheme","useCallback","useEffect","useId","useState","useSyncExternalStore","HStack","Icon","Text","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","BUTTON","openRow","listeners","Set","setOpenRow","row","listener","subscribe","add","delete","getOpenRow","ActionButton","action","onDone","theme","fill","tint","destructive","content","onClick","onPress","align","children","colors","containerColor","color","contentColor","modifiers","accessibilityLabel","label","name","icon","variant","Actions","actions","map","close","SwipeActions","leading","trailing","isOpenRow","edge","setEdge","onOpenChange","next","actionsSpacing","s12","openEdge","length","Leading","Trailing","reverse"],"sourceRoot":"../../../../src","sources":["organisms/swipe-actions/swipe-actions.android.tsx"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,0BAA0B;AACzD,SAAQC,IAAI,QAAO,oCAAoC;AACvD,SAAQC,eAAe,QAAiC,oCAAoC;AAC5F,SAAQC,OAAO,EAAEC,WAAW,QAAO,mBAAmB;AACtD,SAAQC,WAAW,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,oBAAoB,QAAO,OAAO;AAEnF,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C;AACA,MAAMC,MAAM,GAAG,CAAClB,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;;AAE7B;AACA;AACA;AACA;AACA,IAAImB,OAAsB,GAAG,IAAI;AAEjC,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AAEvC,MAAMC,UAAU,GAAIC,GAAkB,IAAK;EACzC,IAAIJ,OAAO,KAAKI,GAAG,EAAE;IACnB;EACF;EAEAJ,OAAO,GAAGI,GAAG;EAEb,KAAK,MAAMC,QAAQ,IAAIJ,SAAS,EAAE;IAChCI,QAAQ,CAAC,CAAC;EACZ;AACF,CAAC;AAED,MAAMC,SAAS,GAAID,QAAoB,IAAK;EAC1CJ,SAAS,CAACM,GAAG,CAACF,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACXJ,SAAS,CAACO,MAAM,CAACH,QAAQ,CAAC;EAC5B,CAAC;AACH,CAAC;AAED,MAAMI,UAAU,GAAGA,CAAA,KAAMT,OAAO;AAIhC,MAAMU,YAAY,GAAGA,CAAC;EAACC,MAAM;EAAEC;AAAyB,CAAC,KAAK;EAC5D,MAAMC,KAAK,GAAG7B,WAAW,CAAC,CAAC;EAC3B,MAAM8B,IAAI,GAAGH,MAAM,CAACI,IAAI,KAAKJ,MAAM,CAACK,WAAW,GAAG,0BAA0B,GAAG,qBAAqB,CAAC;EACrG,MAAMC,OAAO,GAAG,CAACN,MAAM,CAACI,IAAI,IAAIJ,MAAM,CAACK,WAAW,GAAG,wBAAwB,GAAG,
|
|
1
|
+
{"version":3,"names":["FilledIconButton","size","SwipeActionsBox","spacing","useAppTheme","useCallback","useEffect","useId","useState","useSyncExternalStore","HStack","Icon","Text","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","BUTTON","openRow","listeners","Set","setOpenRow","row","listener","subscribe","add","delete","getOpenRow","ActionButton","action","onDone","theme","fill","tint","destructive","content","onClick","onPress","align","children","colors","containerColor","color","contentColor","modifiers","accessibilityLabel","label","name","icon","variant","Actions","actions","map","close","SwipeActions","leading","trailing","isOpenRow","edge","setEdge","onOpenChange","next","actionsSpacing","s12","openEdge","length","Leading","Trailing","reverse"],"sourceRoot":"../../../../src","sources":["organisms/swipe-actions/swipe-actions.android.tsx"],"mappings":";;AAAA,SAA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AO;MAAA3B,QAAA,eACtBzB,IAAA,CAACoC,OAAO;QAACC,OAAO,EAAEI,OAAQ;QAACzB,MAAM,EAAEuB;MAAM,CAAE;IAAC,CACrB,CAAC,GACxB,IAAI,EACPG,QAAQ,CAACS,MAAM,GAAG,CAAC,gBAClBnD,IAAA,CAACd,eAAe,CAACmE,QAAQ;MAAA5B,QAAA,eAEvBzB,IAAA,CAACoC,OAAO;QAACC,OAAO,EAAE,CAAC,GAAGK,QAAQ,CAAC,CAACY,OAAO,CAAC,CAAE;QAACtC,MAAM,EAAEuB;MAAM,CAAE;IAAC,CACpC,CAAC,GACzB,IAAI,EACPd,QAAQ;EAAA,CACM,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { clickable, testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
|
|
4
|
-
import { useSxModifiers } from '@hzblj/kara-sx';
|
|
4
|
+
import { splitAccessibility, useAccessibilityModifiers, useSxModifiers } from '@hzblj/kara-sx';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* A Compose stack's modifiers in the order a pressable one needs: its frame, shape and background, then the press,
|
|
9
|
-
* then its padding. Compose clips a `clickable` to what comes after it, so with the padding first the ripple
|
|
10
|
-
* at the padding and a row pressed by its edge would light up only in the middle.
|
|
8
|
+
* A Compose stack's modifiers in the order a pressable one needs: its frame, shape and background, then the press, its
|
|
9
|
+
* semantics, then its padding. Compose clips a `clickable` to what comes after it, so with the padding first the ripple
|
|
10
|
+
* would stop at the padding and a row pressed by its edge would light up only in the middle. The semantics come after
|
|
11
|
+
* the click, because a label that replaces the children's clears whatever semantics are inside it.
|
|
11
12
|
*/
|
|
12
|
-
export const useStackModifiers = (
|
|
13
|
-
const {
|
|
13
|
+
export const useStackModifiers = (props, onPress, testID) => {
|
|
14
|
+
const [accessibility, {
|
|
14
15
|
p,
|
|
15
16
|
pb,
|
|
16
17
|
pl,
|
|
@@ -19,7 +20,7 @@ export const useStackModifiers = (sx, onPress, testID) => {
|
|
|
19
20
|
px,
|
|
20
21
|
py,
|
|
21
22
|
...frame
|
|
22
|
-
} =
|
|
23
|
+
}] = splitAccessibility(props);
|
|
23
24
|
const frameModifiers = useSxModifiers(frame);
|
|
24
25
|
const paddingModifiers = useSxModifiers({
|
|
25
26
|
p,
|
|
@@ -30,6 +31,7 @@ export const useStackModifiers = (sx, onPress, testID) => {
|
|
|
30
31
|
px,
|
|
31
32
|
py
|
|
32
33
|
});
|
|
33
|
-
|
|
34
|
+
const accessibilityModifiers = useAccessibilityModifiers(accessibility, onPress !== undefined);
|
|
35
|
+
return useMemo(() => [...frameModifiers, ...(testID ? [testIdModifier(testID)] : []), ...(onPress ? [clickable(onPress)] : []), ...accessibilityModifiers, ...paddingModifiers], [accessibilityModifiers, frameModifiers, onPress, paddingModifiers, testID]);
|
|
34
36
|
};
|
|
35
37
|
//# sourceMappingURL=use-stack-modifiers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clickable","testID","testIdModifier","useSxModifiers","useMemo","useStackModifiers","
|
|
1
|
+
{"version":3,"names":["clickable","testID","testIdModifier","splitAccessibility","useAccessibilityModifiers","useSxModifiers","useMemo","useStackModifiers","props","onPress","accessibility","p","pb","pl","pr","pt","px","py","frame","frameModifiers","paddingModifiers","accessibilityModifiers","undefined"],"sourceRoot":"../../src","sources":["use-stack-modifiers.ts"],"mappings":";;AAAA,SAAQA,SAAS,EAAuBC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3G,SAGEC,kBAAkB,EAClBC,yBAAyB,EACzBC,cAAc,QACT,gBAAgB;AACvB,SAAQC,OAAO,QAAO,OAAO;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,KAAwC,EACxCC,OAAoB,EACpBR,MAAe,KACM;EACrB,MAAM,CAACS,aAAa,EAAE;IAACC,CAAC;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAE,GAAGC;EAAK,CAAC,CAAC,GAAGf,kBAAkB,CAACK,KAAK,CAAC;EACxF,MAAMW,cAAc,GAAGd,cAAc,CAACa,KAAK,CAAC;EAC5C,MAAME,gBAAgB,GAAGf,cAAc,CAAC;IAACM,CAAC;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC,EAAE;IAAEC;EAAE,CAAC,CAAC;EACpE,MAAMI,sBAAsB,GAAGjB,yBAAyB,CAACM,aAAa,EAAED,OAAO,KAAKa,SAAS,CAAC;EAE9F,OAAOhB,OAAO,CACZ,MAAM,CACJ,GAAGa,cAAc,EACjB,IAAIlB,MAAM,GAAG,CAACC,cAAc,CAACD,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAC3C,IAAIQ,OAAO,GAAG,CAACT,SAAS,CAACS,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EACxC,GAAGY,sBAAsB,EACzB,GAAGD,gBAAgB,CACpB,EACD,CAACC,sBAAsB,EAAEF,cAAc,EAAEV,OAAO,EAAEW,gBAAgB,EAAEnB,MAAM,CAC5E,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -7,6 +7,8 @@ export type ActivityIndicatorSize = 'large' | 'small';
|
|
|
7
7
|
* Android, so it renders anywhere. For how far along something is, use `Progress`.
|
|
8
8
|
*/
|
|
9
9
|
export type ActivityIndicatorProps = {
|
|
10
|
+
/** What is loading, for VoiceOver and TalkBack: "Loading photos". Unset, the platform's own word ("In progress"). */
|
|
11
|
+
accessibilityLabel?: string;
|
|
10
12
|
/** Its colour. `fill.accent.primary` by default. */
|
|
11
13
|
color?: ColorToken;
|
|
12
14
|
/** `small` sits in a row or a button, `large` holds a screen that is loading. `small` by default. */
|
|
@@ -3,6 +3,11 @@ import type { ImageSourcePropType } from 'react-native';
|
|
|
3
3
|
export type AvatarSize = 'lg' | 'md' | 'sm';
|
|
4
4
|
/** A round avatar: the image in `source`, or `initials` without one. The React Native tier: it needs no host. */
|
|
5
5
|
export type AvatarProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Who it is, for VoiceOver and TalkBack: "Jan Blazej". Unset, the avatar is decorative and hidden from them, as one
|
|
8
|
+
* beside the person's name should be.
|
|
9
|
+
*/
|
|
10
|
+
accessibilityLabel?: string;
|
|
6
11
|
/** Shown in place of the image when there is no `source`. */
|
|
7
12
|
initials?: string;
|
|
8
13
|
/** The diameter: `sm` is `s24`, `md` `s40`, `lg` `s64`. `md` by default. */
|
|
@@ -2,6 +2,9 @@ import { View } from 'react-native';
|
|
|
2
2
|
/**
|
|
3
3
|
* A React Native `View` that takes the design system's `sx` props. The `sx()` HOC is the whole
|
|
4
4
|
* implementation — Box is just its first caller, and any other style-taking component gets the same.
|
|
5
|
+
*
|
|
6
|
+
* That includes motion: `entering`, `exiting`, `layout`, `animate` or an animated `style` make it an `Animated.View`
|
|
7
|
+
* from its first frame, and without them it stays a plain `View`.
|
|
5
8
|
*/
|
|
6
9
|
export declare const Box: import("react").MemoExoticComponent<{
|
|
7
10
|
({ style, ...props }: import("@hzblj/kara-sx").SxProps<import("react-native").ViewProps & import("react").RefAttributes<View>>): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ColorToken, Theme } from '@hzblj/kara-theme';
|
|
2
2
|
import type { ButtonVariant } from './button.types';
|
|
3
3
|
export declare const buttonTokens: (variant: ButtonVariant, disabled: boolean, theme: Theme) => {
|
|
4
|
-
readonly content: 'content.on.
|
|
4
|
+
readonly content: 'content.on.accent';
|
|
5
5
|
readonly fill: 'fill.accent.primary';
|
|
6
6
|
readonly shadow: 'btn.accent';
|
|
7
7
|
} | {
|
|
@@ -13,6 +13,8 @@ export type ButtonStyleName = 'automatic' | 'bordered' | 'borderedProminent' | '
|
|
|
13
13
|
export type ButtonControlSize = 'extraLarge' | 'large' | 'mini' | 'regular' | 'small';
|
|
14
14
|
/** A text button: SwiftUI `Button` on iOS, Material's filled button (outlined for `glass`) on Android. */
|
|
15
15
|
export type ButtonProps = {
|
|
16
|
+
/** What pressing it does, when the label alone does not say. See `AccessibilityProps`. */
|
|
17
|
+
accessibilityHint?: string;
|
|
16
18
|
/**
|
|
17
19
|
* Replaces the style the variant picks: `borderedProminent` for `accent` and `destructive`, `bordered` for
|
|
18
20
|
* `secondary`, `glass` for `glass`. iOS only. Android ignores it.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* A raised container: SwiftUI `VStack` / Compose `Column` on `surface.primary`, with a large radius, `s16` padding and
|
|
5
5
|
* the `card` shadow. Any `sx` prop overrides its default.
|
|
6
6
|
*/
|
|
7
|
-
export type CardProps = ResponsiveSx & {
|
|
7
|
+
export type CardProps = ResponsiveSx & AccessibilityProps & {
|
|
8
8
|
/** Native views, stacked vertically from the leading edge. */
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
/** Test identifier, forwarded to the native view. */
|
|
@@ -5,7 +5,14 @@ import type { IconName } from '../icon';
|
|
|
5
5
|
* `Button`) on iOS. It renders inline; pinning it to a corner is up to the screen.
|
|
6
6
|
*/
|
|
7
7
|
export type FabProps = {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* What VoiceOver and TalkBack say for the button, since an icon has no words of its own: "Share", "Add to
|
|
10
|
+
* favourites". Required for that reason.
|
|
11
|
+
*/
|
|
12
|
+
accessibilityLabel: string;
|
|
13
|
+
/** What pressing it does, when the label alone does not say. See `AccessibilityProps`. */
|
|
14
|
+
accessibilityHint?: string;
|
|
15
|
+
/** The icon, one of the app's, drawn in `content.on.accent`. */
|
|
9
16
|
name: IconName;
|
|
10
17
|
/** Called when the button is pressed. */
|
|
11
18
|
onPress?: () => void;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { SpaceSize } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
export type HStackAlign = 'center' | 'end' | 'start';
|
|
5
5
|
/** A horizontal stack: SwiftUI `HStack` / Compose `Row`. */
|
|
6
|
-
export type HStackProps = ResponsiveSx & {
|
|
6
|
+
export type HStackProps = ResponsiveSx & AccessibilityProps & {
|
|
7
7
|
/** How the children line up vertically: `start` is the top, `end` the bottom. `start` by default. */
|
|
8
8
|
align?: HStackAlign;
|
|
9
9
|
/** Native views, laid out from the leading edge. */
|
|
10
10
|
children?: ReactNode;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Makes the stack pressable: a tap gesture on iOS, a `clickable` with Material's ripple on Android. Screen readers
|
|
13
|
+
* then read the stack as one button.
|
|
14
|
+
*/
|
|
12
15
|
onPress?: () => void;
|
|
13
16
|
/** The gap between children. Unset, SwiftUI puts its default spacing between them and Compose none. */
|
|
14
17
|
spacing?: SpaceSize;
|
|
@@ -6,6 +6,13 @@ import type { IconName } from '../icon';
|
|
|
6
6
|
* itself the same way on both.
|
|
7
7
|
*/
|
|
8
8
|
export type IconButtonProps = {
|
|
9
|
+
/**
|
|
10
|
+
* What VoiceOver and TalkBack say for the button, since an icon has no words of its own: "Share", "Add to
|
|
11
|
+
* favourites". Required for that reason.
|
|
12
|
+
*/
|
|
13
|
+
accessibilityLabel: string;
|
|
14
|
+
/** What pressing it does, when the label alone does not say. See `AccessibilityProps`. */
|
|
15
|
+
accessibilityHint?: string;
|
|
9
16
|
/** Dims the icon (iOS's own disabled look, `btn.content.disabled` on Android) and stops the button responding. */
|
|
10
17
|
disabled?: boolean;
|
|
11
18
|
/** The icon, one of the app's. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Image as ExpoImage, type ImageProps as ExpoImageProps } from 'expo-image';
|
|
2
2
|
import type { Ref } from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* `expo-image` with the `sx` props, the way `Box` is a `View` with them, and the design system's
|
|
5
|
-
* already applied, so a loaded image never pops in. An explicit `transition` wins, and so does an explicit `style`.
|
|
4
|
+
* `expo-image` with the `sx` props, the way `Box` is a `View` with them, and the design system's fade (`quick`,
|
|
5
|
+
* eased out) already applied, so a loaded image never pops in. An explicit `transition` wins, and so does an explicit `style`.
|
|
6
6
|
*/
|
|
7
7
|
export declare const Image: import("react").MemoExoticComponent<{
|
|
8
8
|
({ style, ...props }: import("@hzblj/kara-sx").SxProps<ExpoImageProps & {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import type { ResponsiveViewSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, MotionProps, ResponsiveViewSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { OpacitySize } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
import type { Haptic } from '../../haptics';
|
|
5
|
-
/** How the content answers a press: it
|
|
5
|
+
/** How the content answers a press: it eases down, it dims, or it stays still. */
|
|
6
6
|
export type PressEffect = 'none' | 'opacity' | 'scale';
|
|
7
7
|
/**
|
|
8
8
|
* React Native's `Pressable`, styled through `sx` like a `Box`, taking touches 8 points past its edges. Each platform
|
|
9
|
-
* presses its own way by default: iOS
|
|
9
|
+
* presses its own way by default: iOS eases the content down to 96%, Android draws Material's ripple over it,
|
|
10
10
|
* clipped to the pressable's shape. `pressEffect` picks the same answer on both, and Android keeps its ripple on top
|
|
11
|
-
* unless `ripple` is off. Give it the `borderRadius` of what it wraps (`full` around a `GlassView`).
|
|
12
|
-
*
|
|
11
|
+
* unless `ripple` is off. Give it the `borderRadius` of what it wraps (`full` around a `GlassView`). Screen readers read
|
|
12
|
+
* it as a button unless `accessibilityRole` names another role. It takes the motion props a `Box` does: `animate` a
|
|
13
|
+
* selected state's `bg`, or let it arrive with `entering`. The React Native tier: it needs no host.
|
|
13
14
|
*/
|
|
14
|
-
export type PressableProps = ResponsiveViewSx & {
|
|
15
|
+
export type PressableProps = ResponsiveViewSx & Omit<MotionProps, 'animated'> & AccessibilityProps & {
|
|
15
16
|
/** The pressable content. */
|
|
16
17
|
children?: ReactNode;
|
|
17
18
|
/** Ignores presses: no `onPress`, no haptic, no press effect or ripple. */
|
|
@@ -21,14 +22,14 @@ export type PressableProps = ResponsiveViewSx & {
|
|
|
21
22
|
/** Called when the press is released, after the `haptic` plays. */
|
|
22
23
|
onPress?: () => void;
|
|
23
24
|
/**
|
|
24
|
-
* How the content answers while it is held. `scale`
|
|
25
|
+
* How the content answers while it is held. `scale` eases it down to `pressedScale`, `opacity` dims it to
|
|
25
26
|
* `pressedOpacity`, `none` leaves it still. `scale` on iOS and `none` on Android by default, where the ripple is the
|
|
26
|
-
* press.
|
|
27
|
+
* press. With motion reduced, `scale` dims instead: the press still shows, and nothing moves.
|
|
27
28
|
*/
|
|
28
29
|
pressEffect?: PressEffect;
|
|
29
30
|
/** What `opacity` dims to, an opacity token. `o60` by default. */
|
|
30
31
|
pressedOpacity?: OpacitySize;
|
|
31
|
-
/** What `scale`
|
|
32
|
+
/** What `scale` eases down to. `0.96` by default: lower reads as a squash, not a press. */
|
|
32
33
|
pressedScale?: number;
|
|
33
34
|
/** Android's ripple: Material's pressed state layer over the content, clipped to the shape. On by default. iOS has none. */
|
|
34
35
|
ripple?: boolean;
|
|
@@ -4,6 +4,8 @@ import type { ReactNode } from 'react';
|
|
|
4
4
|
* value, which `ProgressView` cannot draw on iOS) / Compose's `LinearProgressIndicator` and `CircularProgressIndicator`.
|
|
5
5
|
*/
|
|
6
6
|
export type ProgressProps = {
|
|
7
|
+
/** What is in progress, for VoiceOver and TalkBack: "Uploading". They read how far along it is themselves. */
|
|
8
|
+
accessibilityLabel?: string;
|
|
7
9
|
/** A circular indicator instead of a bar. Off by default. */
|
|
8
10
|
circular?: boolean;
|
|
9
11
|
/** Between `0` and `1`. Leave it unset for an indeterminate indicator. */
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import type { ResponsiveViewSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { MotionProps, ResponsiveViewSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { ColorToken, TextVariant } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
|
-
import type { TextProps as RNTextProps } from 'react-native';
|
|
4
|
+
import type { TextProps as RNTextProps, StyleProp, TextStyle } from 'react-native';
|
|
5
|
+
import type { AnimatedStyle } from 'react-native-reanimated';
|
|
5
6
|
/**
|
|
6
7
|
* React Native's `Text` in a theme typography variant: the React Native tier, for text outside a native host. It takes
|
|
7
8
|
* `Box`'s `sx` surface for its own box (margins, flex, padding, a background), all but `align`, which here aligns the
|
|
8
|
-
* lines.
|
|
9
|
+
* lines, and the motion props a `Box` takes: `entering="fadeUp"` makes it an `Animated.Text` by itself.
|
|
9
10
|
*/
|
|
10
|
-
export type RnTextProps = Omit<RNTextProps, 'style'> & Omit<ResponsiveViewSx, 'align'> & {
|
|
11
|
+
export type RnTextProps = Omit<RNTextProps, 'style'> & MotionProps & Omit<ResponsiveViewSx, 'align'> & {
|
|
11
12
|
/** Horizontal alignment, as React Native's `textAlign`. */
|
|
12
13
|
align?: 'center' | 'left' | 'right';
|
|
13
14
|
/** The text's colour. `content.primary` by default. */
|
|
14
15
|
color?: ColorToken;
|
|
16
|
+
/** Goes last, over the variant and the `sx`: an animated style from `useAnimatedStyle`, which it renders through Reanimated for. */
|
|
17
|
+
style?: StyleProp<AnimatedStyle<TextStyle>>;
|
|
15
18
|
/** The typography variant. `body` by default. */
|
|
16
19
|
variant?: TextVariant;
|
|
17
20
|
};
|
|
@@ -2,8 +2,9 @@ import type { SxDimension } from '@hzblj/kara-sx';
|
|
|
2
2
|
import type { RadiiSize } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
/**
|
|
5
|
-
* A loading placeholder that pulses in `fill.quaternary
|
|
6
|
-
* the
|
|
5
|
+
* A loading placeholder that pulses in `fill.quaternary`, and holds still with motion reduced. Hidden from screen
|
|
6
|
+
* readers: what is loading is for the screen to say. It is a React Native view, so it needs no host. Sized with the
|
|
7
|
+
* `sx` names: `w`, `h`, `borderRadius`.
|
|
7
8
|
*/
|
|
8
9
|
export type SkeletonProps = {
|
|
9
10
|
/** The corner radius. `small` by default. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { MotionPreset, MotionPresetConfig, ResponsiveViewSx } from '@hzblj/kara-sx';
|
|
2
|
+
import type { DurationSize, SpringName } from '@hzblj/kara-theme';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
/** A preset by name, or one adjusted: `{preset: 'fadeUp', duration: 'slow'}`. Its `delay` is where the first one starts. */
|
|
5
|
+
export type StaggerMotion = MotionPreset | MotionPresetConfig;
|
|
6
|
+
/**
|
|
7
|
+
* A `Box` whose children arrive one after another: each takes `entering` a step later than the one before. Children
|
|
8
|
+
* that arrive together are staggered among themselves, the first ones as much as a later batch (the next page of a
|
|
9
|
+
* list), while a single child added later arrives at once. A `Box`, `RnText` or `Pressable` child takes the motion
|
|
10
|
+
* itself; any other child is wrapped in a `Box` that does. With motion reduced every child fades, still one after
|
|
11
|
+
* another. The React Native tier: it needs no host.
|
|
12
|
+
*/
|
|
13
|
+
export type StaggerProps = ResponsiveViewSx & {
|
|
14
|
+
/** What arrives. A child with an `entering` preset of its own keeps it and only takes the delay. */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/** How each child arrives. `fadeUp` by default. */
|
|
17
|
+
entering?: StaggerMotion;
|
|
18
|
+
/** How a child leaves when it is removed. They leave together, not one after another; none by default. */
|
|
19
|
+
exiting?: StaggerMotion;
|
|
20
|
+
/** Which end arrives first. `start` by default. */
|
|
21
|
+
from?: 'end' | 'start';
|
|
22
|
+
/** The step between one child and the next, a duration token. `stagger` (40 ms) by default, `micro` for a slower one. */
|
|
23
|
+
interval?: DurationSize;
|
|
24
|
+
/**
|
|
25
|
+
* Moves the other children into place when one arrives or leaves, and the stagger itself to its new size: `true` on
|
|
26
|
+
* the `smooth` spring, or a spring token. Off by default. Give what sits after it `layout` too, so it follows.
|
|
27
|
+
*/
|
|
28
|
+
layout?: boolean | SpringName;
|
|
29
|
+
/** Test identifier, forwarded to the view. */
|
|
30
|
+
testID?: string;
|
|
31
|
+
};
|
|
32
|
+
export type StaggerComponent = (props: StaggerProps) => ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* A container on `surface.primary`, padded `s16` and rounded `large` unless told otherwise: a SwiftUI `VStack` on
|
|
5
5
|
* iOS, Material's `Surface` around a `Column` on Android.
|
|
6
6
|
*/
|
|
7
|
-
export type SurfaceProps = ResponsiveSx & {
|
|
7
|
+
export type SurfaceProps = ResponsiveSx & AccessibilityProps & {
|
|
8
8
|
/** Stacked vertically, from the leading edge. */
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
/** iOS wraps the content in a `GlassEffectContainer`; Android raises it to a tonal elevation of `3`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { ColorToken, TextVariant } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
export type TextAlign = 'center' | 'left' | 'right';
|
|
@@ -9,7 +9,7 @@ export type TextTransform = 'lowercase' | 'uppercase';
|
|
|
9
9
|
* the native `sx` surface too: padding, a frame (`wide` lines it up by `align`), a background, and the `ios` bucket's
|
|
10
10
|
* `contentTransition`, `animation` and `monospacedDigit` for a number that changes in place.
|
|
11
11
|
*/
|
|
12
|
-
export type TextProps = ResponsiveSx & {
|
|
12
|
+
export type TextProps = ResponsiveSx & AccessibilityProps & {
|
|
13
13
|
/**
|
|
14
14
|
* How its lines align. iOS reads `left` and `right` as leading and trailing, so they flip in a right-to-left
|
|
15
15
|
* layout; Android keeps them as they are.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { SpaceSize } from '@hzblj/kara-theme';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
export type VStackAlign = 'center' | 'end' | 'start';
|
|
5
5
|
/** Stacks its children top to bottom: SwiftUI `VStack` / Compose `Column`. */
|
|
6
|
-
export type VStackProps = ResponsiveSx & {
|
|
6
|
+
export type VStackProps = ResponsiveSx & AccessibilityProps & {
|
|
7
7
|
/** The children's horizontal alignment. `start` by default. */
|
|
8
8
|
align?: VStackAlign;
|
|
9
9
|
/** Laid out top to bottom, `spacing` apart. */
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* Makes the whole stack pressable. iOS adds a tap gesture with no press feedback; Android a `clickable` whose ripple
|
|
13
|
-
* fills the stack's shape.
|
|
13
|
+
* fills the stack's shape. Screen readers then read the stack as one button.
|
|
14
14
|
*/
|
|
15
15
|
onPress?: () => void;
|
|
16
16
|
/** The space between children. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { ResponsiveSx } from '@hzblj/kara-sx';
|
|
1
|
+
import type { AccessibilityProps, ResponsiveSx } from '@hzblj/kara-sx';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
export type ZStackAlign = 'bottom' | 'center' | 'top';
|
|
4
4
|
/** Layers its children on one another: SwiftUI `ZStack` / Compose `Box`. */
|
|
5
|
-
export type ZStackProps = ResponsiveSx & {
|
|
5
|
+
export type ZStackProps = ResponsiveSx & AccessibilityProps & {
|
|
6
6
|
/** Where the children sit vertically; they are always centred horizontally. `center` by default. */
|
|
7
7
|
align?: ZStackAlign;
|
|
8
8
|
/** Drawn in order, the last on top. */
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
/**
|
|
11
11
|
* Makes the whole stack pressable. iOS adds a tap gesture with no press feedback; Android a `clickable` whose ripple
|
|
12
|
-
* fills the stack's shape.
|
|
12
|
+
* fills the stack's shape. Screen readers then read the stack as one button.
|
|
13
13
|
*/
|
|
14
14
|
onPress?: () => void;
|
|
15
15
|
/** Test identifier, forwarded to the native view. */
|
|
@@ -6,6 +6,8 @@ import type { ReactNode } from 'react';
|
|
|
6
6
|
* their own icons with `Icon` / `RnIcon`.
|
|
7
7
|
*/
|
|
8
8
|
export type GlyphProps = {
|
|
9
|
+
/** What a screen reader says. Unset, the glyph is decorative and hidden from it. */
|
|
10
|
+
accessibilityLabel?: string;
|
|
9
11
|
color?: ColorToken;
|
|
10
12
|
name: GlyphName;
|
|
11
13
|
size?: SpaceSize;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { AccessibilityProps } from '@hzblj/kara-sx';
|
|
1
2
|
import type { SpaceSize } from '@hzblj/kara-theme';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import type { IconName } from '../../atoms/icon';
|
|
4
5
|
/**
|
|
5
6
|
* A label on the leading edge and its value on the trailing edge: the settings/detail row.
|
|
6
|
-
* Pass `children` instead of `value` when the trailing side is a control rather than text.
|
|
7
|
+
* Pass `children` instead of `value` when the trailing side is a control rather than text. With a `value`, screen
|
|
8
|
+
* readers read the row as one element ("Version, 2.4"); with a control, the control stays its own.
|
|
7
9
|
*/
|
|
8
|
-
export type LabeledContentProps = {
|
|
10
|
+
export type LabeledContentProps = AccessibilityProps & {
|
|
9
11
|
/** The trailing side when it is a control, in place of `value`. */
|
|
10
12
|
children?: ReactNode;
|
|
11
13
|
/** One of the app's icons, before the label, in the secondary colour. */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { AccessibilityProps } from '@hzblj/kara-sx';
|
|
1
2
|
import type { ColorToken, TextVariant } from '@hzblj/kara-theme';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import type { IconName } from '../../atoms/icon';
|
|
4
5
|
/** Opens an external URL in the platform browser or the app that claims the scheme. */
|
|
5
|
-
export type LinkProps = {
|
|
6
|
+
export type LinkProps = AccessibilityProps & {
|
|
6
7
|
/** Colours the label and the icon. `content.accent` by default. */
|
|
7
8
|
color?: ColorToken;
|
|
8
9
|
/** One of the app's icons, before the label. */
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { AccessibilityProps } from '@hzblj/kara-sx';
|
|
1
2
|
import type { SpaceSize } from '@hzblj/kara-theme';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import type { IconName } from '../../atoms/icon';
|
|
4
5
|
/**
|
|
5
|
-
* A row with an optional icon, a title and subtitle, and a chevron when it can be pressed.
|
|
6
|
-
* inside `<Screen>` or `<Island>`; `RnListItem` is
|
|
6
|
+
* A row with an optional icon, a title and subtitle, and a chevron when it can be pressed. Screen readers read it as one
|
|
7
|
+
* element (a button when it is pressable). A native atom: it renders inside `<Screen>` or `<Island>`; `RnListItem` is
|
|
8
|
+
* the same row without a host.
|
|
7
9
|
*/
|
|
8
|
-
export type ListItemProps = {
|
|
10
|
+
export type ListItemProps = AccessibilityProps & {
|
|
9
11
|
/** One of the app's icons, before the title, in the secondary colour. */
|
|
10
12
|
icon?: IconName;
|
|
11
13
|
/** Makes the row pressable and adds a chevron on the trailing edge. */
|
|
@@ -2,6 +2,6 @@ import type { StepperComponent } from './stepper.types';
|
|
|
2
2
|
/**
|
|
3
3
|
* SwiftUI's `Stepper` at the end of a row, the label leading and the value just before the control — the way iOS's own
|
|
4
4
|
* settings show a stepped value. The value rolls to the next one (`numericText`), up or down with the change, in
|
|
5
|
-
* monospaced digits so the row does not jump.
|
|
5
|
+
* monospaced digits so the row does not jump. With motion reduced it cross-fades instead.
|
|
6
6
|
*/
|
|
7
7
|
export declare const Stepper: StepperComponent;
|
|
@@ -7,6 +7,11 @@ import type { MenuAction } from '../menu';
|
|
|
7
7
|
* label of a SwiftUI `Menu`. A native atom: it renders inside `<Screen>` or `<Island>`.
|
|
8
8
|
*/
|
|
9
9
|
export type FabMenuProps = {
|
|
10
|
+
/**
|
|
11
|
+
* What VoiceOver and TalkBack say for the button, since an icon has no words of its own: "Create". Required for that
|
|
12
|
+
* reason.
|
|
13
|
+
*/
|
|
14
|
+
accessibilityLabel: string;
|
|
10
15
|
/** The actions the button unfolds into. */
|
|
11
16
|
actions: MenuAction[];
|
|
12
17
|
/** The closed button's icon, one of the app's. A plus by default. */
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
+
import type { SxEntryExit } from '@hzblj/kara-sx';
|
|
2
|
+
import type { SpaceSize } from '@hzblj/kara-theme';
|
|
1
3
|
import type { ReactNode } from 'react';
|
|
4
|
+
/** How it comes and goes. */
|
|
5
|
+
export type SnackbarAnimation = 'fade' | 'scale' | 'slide';
|
|
6
|
+
/** How long it stays: Material's short (4 s) and long (10 s), never, or a number of milliseconds. */
|
|
7
|
+
export type SnackbarDuration = 'indefinite' | 'long' | 'short' | number;
|
|
8
|
+
/** The edge of its parent it sits on. */
|
|
9
|
+
export type SnackbarPosition = 'bottom' | 'top';
|
|
2
10
|
/**
|
|
3
|
-
* A short message laid over
|
|
4
|
-
* both platforms
|
|
11
|
+
* A short message laid over an edge of its parent, with an optional action at its trailing end. The React Native tier,
|
|
12
|
+
* drawn the same on both platforms (iOS has no snackbar of its own), so it needs no host. Material's options are all
|
|
13
|
+
* here: a duration, a dismiss button, the action on a line of its own. It is announced to VoiceOver and TalkBack when
|
|
14
|
+
* it appears.
|
|
5
15
|
*/
|
|
6
16
|
export type SnackbarProps = {
|
|
7
|
-
/** The action button's text,
|
|
17
|
+
/** The action button's text, at the trailing end. No button without it. */
|
|
8
18
|
actionLabel?: string;
|
|
19
|
+
/** Puts the action under the message, at its trailing end: Material's layout for a long message or action. */
|
|
20
|
+
actionOnNewLine?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* How it comes and goes. `scale` is Material's own (a fade and a scale from 80 %), `slide` rises from its edge as it
|
|
23
|
+
* fades in, `fade` only fades. `scale` on Android and `slide` on iOS by default. With motion reduced, it fades.
|
|
24
|
+
*/
|
|
25
|
+
animation?: SnackbarAnimation;
|
|
26
|
+
/** A close button at the trailing end, Material's dismiss action; it calls `onDismiss`. */
|
|
27
|
+
dismissible?: boolean;
|
|
28
|
+
/** How long it stays up before `onDismiss` is called. `indefinite` by default: it never hides itself. */
|
|
29
|
+
duration?: SnackbarDuration;
|
|
30
|
+
/** How it arrives instead: a motion preset (`'scale'`), or Reanimated's own, e.g. `FadeInDown.springify()`. It wins over `animation`. */
|
|
31
|
+
entering?: SxEntryExit;
|
|
32
|
+
/** How it leaves instead: a motion preset, or Reanimated's own. It wins over `animation`. */
|
|
33
|
+
exiting?: SxEntryExit;
|
|
9
34
|
/** The message. */
|
|
10
35
|
message: string;
|
|
36
|
+
/** Between the snackbar and its edge, a space token. `s24` by default; raise it above a tab bar. */
|
|
37
|
+
offset?: SpaceSize;
|
|
11
38
|
/** The action was pressed. The snackbar stays up; turn `visible` off to hide it. */
|
|
12
39
|
onAction?: () => void;
|
|
13
|
-
/**
|
|
40
|
+
/** It asks to go: its `duration` ran out, or its dismiss button was pressed. Turn `visible` off to hide it. */
|
|
41
|
+
onDismiss?: () => void;
|
|
42
|
+
/** The edge of its parent it sits on. `bottom` by default, Material's place for it. */
|
|
43
|
+
position?: SnackbarPosition;
|
|
44
|
+
/** Shows the snackbar while true, animating it in and out. */
|
|
14
45
|
visible: boolean;
|
|
15
46
|
};
|
|
16
47
|
export type SnackbarComponent = (props: SnackbarProps) => ReactNode;
|