@webority/mobile-ui 0.112.3 → 0.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/canvas-kit/kit.js +4788 -4725
  2. package/dist/canvas-kit/manifest.json +24 -5
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/lib/commonjs/components/Banner/Banner.js +1 -1
  5. package/lib/commonjs/components/Card/Card.js +1 -1
  6. package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
  7. package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
  8. package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
  9. package/lib/commonjs/components/Screen/Screen.js +1 -1
  10. package/lib/commonjs/components/SectionHeader/SectionHeader.js +1 -1
  11. package/lib/commonjs/components/Text/Text.js +1 -1
  12. package/lib/commonjs/theme/merge.js +1 -1
  13. package/lib/commonjs/theme/tokens.generated.js +1 -1
  14. package/lib/module/components/Banner/Banner.js +1 -1
  15. package/lib/module/components/Card/Card.js +1 -1
  16. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  17. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
  18. package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
  19. package/lib/module/components/Screen/Screen.js +1 -1
  20. package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
  21. package/lib/module/components/Text/Text.js +1 -1
  22. package/lib/module/theme/merge.js +1 -1
  23. package/lib/module/theme/tokens.generated.js +1 -1
  24. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -0
  25. package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +6 -4
  26. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +11 -1
  27. package/lib/typescript/commonjs/theme/tokens.generated.d.ts +6 -0
  28. package/lib/typescript/commonjs/theme/types.d.ts +20 -1
  29. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -0
  30. package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +6 -4
  31. package/lib/typescript/module/components/Screen/Screen.d.ts +11 -1
  32. package/lib/typescript/module/theme/tokens.generated.d.ts +6 -0
  33. package/lib/typescript/module/theme/types.d.ts +20 -1
  34. package/package.json +8 -8
@@ -12,7 +12,8 @@ export interface KeyboardAwareScrollViewProps extends ControllerScrollViewProps
12
12
  /**
13
13
  * A tap on empty space inside the content closes the keyboard and blurs the
14
14
  * focused field. Taps that a field, button or any other pressable claims are
15
- * left alone. Default false. Needed on Android edge-to-edge, where the
15
+ * left alone. Default true; pass false for content that handles its own taps
16
+ * on empty space (a canvas, a map). Needed on Android edge-to-edge, where the
16
17
  * ScrollView's own tap-out dismissal never fires because React Native sees no
17
18
  * keyboard metrics.
18
19
  */
@@ -21,9 +22,10 @@ export interface KeyboardAwareScrollViewProps extends ControllerScrollViewProps
21
22
  /**
22
23
  * react-native-keyboard-controller's `KeyboardAwareScrollView` with the
23
24
  * library's defaults: the focused field kept 24 above the keyboard, safe-area
24
- * padding, a themed pull-to-refresh, and taps and scrolls that keep the
25
- * keyboard open. The controller follows the keyboard frame by frame on the UI
26
- * thread, so nothing here listens to keyboard events. Needs the app's
25
+ * padding, a themed pull-to-refresh, a tap on empty space that closes the
26
+ * keyboard, and scrolls that keep it open. The controller follows the keyboard
27
+ * frame by frame on the UI thread, so nothing here listens to keyboard events.
28
+ * Needs the app's
27
29
  * `KeyboardProvider` at the root.
28
30
  */
29
31
  declare const KeyboardAwareScrollView: import("react").ForwardRefExoticComponent<KeyboardAwareScrollViewProps & import("react").RefAttributes<KeyboardAwareScrollViewRef>>;
@@ -22,6 +22,10 @@ export interface ScreenListProps<ItemT> extends Omit<FlatListProps<ItemT>, "onSc
22
22
  /** From usePagedList or pagingFromInfiniteQuery: the screen draws PagedListFooter and calls loadMore on end reached. */
23
23
  paging?: PagedListPaging;
24
24
  }
25
+ export interface FloatingActionSlotProps {
26
+ bottomOffset?: number;
27
+ size?: "sm" | "md" | "lg";
28
+ }
25
29
  export interface ScreenProps<ItemT = unknown> {
26
30
  title?: string;
27
31
  subtitle?: string;
@@ -44,6 +48,10 @@ export interface ScreenProps<ItemT = unknown> {
44
48
  edges?: SafeAreaEdge[];
45
49
  /** Extra space under the content and the footer, for a tab bar drawn over the screen. Default 0. */
46
50
  bottomInset?: number;
51
+ /** Side margin of the content from the theme's screen gutter (16). Default true in scroll and fixed modes, false in list mode, where rows carry their own padding. The footer always has it. */
52
+ gutter?: boolean;
53
+ /** A FloatingActionButton or FloatingActionButtonGroup. The screen draws it above the tab bar and the footer and leaves room under the content so the last row is never covered. */
54
+ floatingAction?: React.ReactElement<FloatingActionSlotProps>;
47
55
  /** Default true. */
48
56
  keyboardToolbar?: boolean;
49
57
  scrollRef?: React.Ref<ScrollView | FlatList<ItemT>>;
@@ -54,7 +62,9 @@ export interface ScreenProps<ItemT = unknown> {
54
62
  /**
55
63
  * The page shell: safe area, app bar with a large title that collapses as the
56
64
  * content scrolls, a keyboard-aware scroll view (or a virtualised list), pull to
57
- * refresh, a pinned footer and the keyboard toolbar. The screen never navigates:
65
+ * refresh, a pinned footer, a floating action button with room kept under the content
66
+ * and the keyboard toolbar. Content and footer sit inside the theme's screen gutter (16)
67
+ * unless `gutter` is false. The screen never navigates:
58
68
  * it calls `onBack`; `NavigationScreen` from `@webority/mobile-ui/navigation` binds
59
69
  * it to react-navigation and holds the unsaved-changes guard.
60
70
  */
@@ -194,6 +194,9 @@ export interface ComponentTokens {
194
194
  banner: {
195
195
  "tint-bar-width": number;
196
196
  };
197
+ screen: {
198
+ gutter: SpaceName;
199
+ };
197
200
  }
198
201
  export type ComponentName = keyof ComponentTokens;
199
202
  type SizeKeysOf<C extends ComponentName> = Extract<keyof ComponentTokens[C], "xs" | "sm" | "md" | "lg" | "xl">;
@@ -336,6 +339,9 @@ export declare const COMPONENT_KINDS: {
336
339
  readonly banner: {
337
340
  readonly "tint-bar-width": "px";
338
341
  };
342
+ readonly screen: {
343
+ readonly gutter: "space";
344
+ };
339
345
  };
340
346
  export interface TokenSet {
341
347
  mode: "light" | "dark";
@@ -1,6 +1,10 @@
1
1
  import type React from "react";
2
2
  import type { TextStyle } from "react-native";
3
3
  import type { ButtonSize, ButtonVariant } from "../components/Button/Button.js";
4
+ import type { CardPadding, CardRadius, CardTitleFont, CardVariant } from "../components/Card/Card.js";
5
+ import type { EmptyStateSize, EmptyStateVariant } from "../components/EmptyState/EmptyState.js";
6
+ import type { SectionHeaderVariant } from "../components/SectionHeader/SectionHeader.js";
7
+ import type { TextColor } from "../components/Text/Text.js";
4
8
  import type { PressAnimationPreset } from "../hooks/usePressAnimation.js";
5
9
  import type { FieldVariant } from "../types/vocabulary.js";
6
10
  import type { ColorName, FontFaces, FontName, LetterSpacingName, RadiusName, TextName, TokenSet, WeightName } from "./tokens.generated.js";
@@ -87,7 +91,8 @@ export interface TextVariantSpec {
87
91
  weight?: WeightName;
88
92
  /** Line height in px; when unset the variant takes the heading leading when `heading` is set, else the body leading. */
89
93
  lineHeight?: number;
90
- color?: ColorName;
94
+ /** A text role or tone, as the `color` prop takes (`secondary`), or a colour token (`text-muted`). */
95
+ color?: TextColor | ColorName;
91
96
  uppercase?: boolean;
92
97
  letterSpacing?: LetterSpacingName;
93
98
  italic?: boolean;
@@ -147,6 +152,20 @@ export interface ComponentSettings {
147
152
  defaultSize?: ButtonSize;
148
153
  defaultPressAnimation?: PressAnimationPreset;
149
154
  };
155
+ card?: {
156
+ defaultVariant?: CardVariant;
157
+ defaultPadding?: CardPadding;
158
+ defaultRadius?: CardRadius;
159
+ defaultTitleFont?: CardTitleFont;
160
+ };
161
+ "section-header"?: {
162
+ defaultVariant?: SectionHeaderVariant;
163
+ defaultFlush?: boolean;
164
+ };
165
+ "empty-state"?: {
166
+ defaultSize?: EmptyStateSize;
167
+ defaultVariant?: EmptyStateVariant;
168
+ };
150
169
  /** NavigationScreen with kind "tab" adds the tab bar's height under content and footer when the app's tab bar floats over the screens. */
151
170
  screen?: {
152
171
  tabBarFloats?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-ui",
3
- "version": "0.112.3",
3
+ "version": "0.114.0",
4
4
  "description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -85,7 +85,7 @@
85
85
  }
86
86
  },
87
87
  "dependencies": {
88
- "@webority/markdown-core": "0.112.3"
88
+ "@webority/markdown-core": "0.114.0"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "@react-navigation/bottom-tabs": ">=7.0.0",
@@ -103,8 +103,8 @@
103
103
  "react-native-safe-area-context": ">=5.4.0",
104
104
  "react-native-svg": ">=15.0.0",
105
105
  "react-native-worklets": ">=0.10.0",
106
- "@webority/canvas-kit": "0.112.3",
107
- "@webority/mobile-core": "0.112.3"
106
+ "@webority/canvas-kit": "0.114.0",
107
+ "@webority/mobile-core": "0.114.0"
108
108
  },
109
109
  "peerDependenciesMeta": {
110
110
  "@react-navigation/bottom-tabs": {
@@ -173,10 +173,10 @@
173
173
  "react-test-renderer": "19.2.8",
174
174
  "rimraf": "6.1.3",
175
175
  "typescript": "5.9.3",
176
- "@webority/canvas-kit": "0.112.3",
177
- "@webority/mobile-dev": "0.0.0",
178
- "@webority/mobile-core": "0.112.3",
179
- "@webority/tokens": "0.112.3"
176
+ "@webority/canvas-kit": "0.114.0",
177
+ "@webority/mobile-core": "0.114.0",
178
+ "@webority/tokens": "0.114.0",
179
+ "@webority/mobile-dev": "0.0.0"
180
180
  },
181
181
  "scripts": {
182
182
  "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",