@webority/mobile-ui 0.89.0 → 0.91.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 (41) hide show
  1. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  2. package/lib/commonjs/components/Button/Button.js +1 -1
  3. package/lib/commonjs/components/Card/Card.js +1 -1
  4. package/lib/commonjs/components/Composer/Composer.js +1 -1
  5. package/lib/commonjs/components/Dialog/Dialog.js +1 -1
  6. package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
  7. package/lib/commonjs/components/IconButton/IconButton.js +1 -1
  8. package/lib/commonjs/components/Input/Input.js +1 -1
  9. package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.js +1 -1
  10. package/lib/commonjs/components/RichTextEditor/RichTextEditor.js +1 -1
  11. package/lib/commonjs/components/Text/Text.js +1 -1
  12. package/lib/commonjs/theme/tokens.generated.js +1 -1
  13. package/lib/commonjs/utils/hitSlop.js +1 -0
  14. package/lib/commonjs/utils/warnInvalidValue.js +1 -0
  15. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  16. package/lib/module/components/Button/Button.js +1 -1
  17. package/lib/module/components/Card/Card.js +1 -1
  18. package/lib/module/components/Composer/Composer.js +1 -1
  19. package/lib/module/components/Dialog/Dialog.js +1 -1
  20. package/lib/module/components/EmptyState/EmptyState.js +1 -1
  21. package/lib/module/components/IconButton/IconButton.js +1 -1
  22. package/lib/module/components/Input/Input.js +1 -1
  23. package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
  24. package/lib/module/components/RichTextEditor/RichTextEditor.js +1 -1
  25. package/lib/module/components/Text/Text.js +1 -1
  26. package/lib/module/theme/tokens.generated.js +1 -1
  27. package/lib/module/utils/hitSlop.js +1 -0
  28. package/lib/module/utils/warnInvalidValue.js +1 -0
  29. package/lib/typescript/commonjs/components/Card/Card.d.ts +3 -0
  30. package/lib/typescript/commonjs/components/Text/Text.d.ts +1 -1
  31. package/lib/typescript/commonjs/theme/tokens.generated.d.ts +1 -2
  32. package/lib/typescript/commonjs/theme/types.d.ts +1 -1
  33. package/lib/typescript/commonjs/utils/hitSlop.d.ts +14 -0
  34. package/lib/typescript/commonjs/utils/warnInvalidValue.d.ts +10 -0
  35. package/lib/typescript/module/components/Card/Card.d.ts +3 -0
  36. package/lib/typescript/module/components/Text/Text.d.ts +1 -1
  37. package/lib/typescript/module/theme/tokens.generated.d.ts +1 -2
  38. package/lib/typescript/module/theme/types.d.ts +1 -1
  39. package/lib/typescript/module/utils/hitSlop.d.ts +14 -0
  40. package/lib/typescript/module/utils/warnInvalidValue.d.ts +10 -0
  41. package/package.json +6 -6
@@ -8,7 +8,7 @@ export declare const TEXT_NAMES: readonly ["xs", "sm", "base", "lg", "xl", "2xl"
8
8
  export type TextName = (typeof TEXT_NAMES)[number];
9
9
  export declare const WEIGHT_NAMES: readonly ["normal", "medium", "semibold", "bold"];
10
10
  export type WeightName = (typeof WEIGHT_NAMES)[number];
11
- export declare const LEADING_NAMES: readonly ["tight", "normal", "relaxed"];
11
+ export declare const LEADING_NAMES: readonly ["heading", "body", "display"];
12
12
  export type LeadingName = (typeof LEADING_NAMES)[number];
13
13
  export declare const LETTER_SPACING_NAMES: readonly ["tight", "normal", "wide"];
14
14
  export type LetterSpacingName = (typeof LETTER_SPACING_NAMES)[number];
@@ -342,7 +342,6 @@ export interface TokenSet {
342
342
  radius: Record<RadiusName, number>;
343
343
  text: Record<TextName, {
344
344
  size: number;
345
- lineHeight: number;
346
345
  }>;
347
346
  weight: Record<WeightName, FontWeightValue>;
348
347
  leading: Record<LeadingName, number>;
@@ -82,7 +82,7 @@ export interface IconRegistry {
82
82
  export interface TextVariantSpec {
83
83
  size: TextName;
84
84
  weight?: WeightName;
85
- /** Line height in px; when unset the variant takes its text step's own line height. */
85
+ /** Line height in px; when unset the variant takes the heading leading when `heading` is set, else the body leading. */
86
86
  lineHeight?: number;
87
87
  color?: ColorName;
88
88
  uppercase?: boolean;
@@ -0,0 +1,14 @@
1
+ import type { Insets } from "react-native";
2
+ /**
3
+ * The tap area a pressable adds with `hitSlop`, as a rendered attribute.
4
+ * react-native-web draws no element for `hitSlop`, so a rendered page sees only
5
+ * the visible box; it writes `dataSet` keys as `data-*`, so the page can read
6
+ * `data-wui-hit-slop` ("top right bottom left", in points). Native ignores the
7
+ * prop. Pass the same value the pressable passes to `hitSlop`.
8
+ */
9
+ export declare const hitSlopMarker: (slop: Insets | number) => {
10
+ dataSet: {
11
+ wuiHitSlop: string;
12
+ };
13
+ };
14
+ //# sourceMappingURL=hitSlop.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Warn when a declared prop receives a value outside its allowed vocabulary.
3
+ *
4
+ * Pass the value the caller supplied, before any defaulting, or the check cannot fail.
5
+ * Nullish is accepted: an omitted prop means the default was wanted.
6
+ */
7
+ export declare function warnInvalidValue(component: string, prop: string, value: unknown, allowed: Iterable<string>): void;
8
+ /** Tests only: clears the once-per-value memory so each case starts from a clean state. */
9
+ export declare function resetInvalidValueWarnings(): void;
10
+ //# sourceMappingURL=warnInvalidValue.d.ts.map
@@ -13,6 +13,7 @@ export interface CardTextAction {
13
13
  export type CardElevation = "none" | ShadowName;
14
14
  export type CardRadius = "sm" | "md" | "lg" | "xl";
15
15
  export type CardPadding = "none" | "sm" | "md" | "lg" | "xl";
16
+ export type CardTitleFont = "sans" | "serif";
16
17
  declare const BACKGROUND_TOKENS: readonly ["bg", "bg-subtle", "bg-muted", "surface", "scrim", "surface-inverse"];
17
18
  type CardBackgroundToken = (typeof BACKGROUND_TOKENS)[number];
18
19
  export type CardBackground = CardBackgroundToken | (string & {});
@@ -32,6 +33,8 @@ export interface CardProps extends Omit<PressableProps, "style" | "children"> {
32
33
  header?: React.ReactNode;
33
34
  /** Built-in header title. A string is drawn as a heading; a node is drawn as is. */
34
35
  title?: React.ReactNode;
36
+ /** Face of a string title: the sans text face, or the serif display face. Default `'sans'`. A node title ignores it. */
37
+ titleFont?: CardTitleFont;
35
38
  /** Subtitle line under the title. */
36
39
  lead?: React.ReactNode;
37
40
  /** Header action: a node is drawn as is; `{ label, onPress }` draws a text action. */
@@ -6,7 +6,7 @@ export type TextColor = "primary" | "secondary" | "tertiary" | "inverse" | "disa
6
6
  export interface TextProps extends Omit<RNTextProps, "style"> {
7
7
  /**
8
8
  * A built-in variant, or the name of one registered in `theme.settings.textVariants`.
9
- * An unknown name falls back to `body`.
9
+ * An unknown name warns in development and renders as `body`.
10
10
  */
11
11
  variant?: TextVariant | (string & {});
12
12
  /** Text role token, semantic tone, or a raw colour string. Defaults per variant. */
@@ -8,7 +8,7 @@ export declare const TEXT_NAMES: readonly ["xs", "sm", "base", "lg", "xl", "2xl"
8
8
  export type TextName = (typeof TEXT_NAMES)[number];
9
9
  export declare const WEIGHT_NAMES: readonly ["normal", "medium", "semibold", "bold"];
10
10
  export type WeightName = (typeof WEIGHT_NAMES)[number];
11
- export declare const LEADING_NAMES: readonly ["tight", "normal", "relaxed"];
11
+ export declare const LEADING_NAMES: readonly ["heading", "body", "display"];
12
12
  export type LeadingName = (typeof LEADING_NAMES)[number];
13
13
  export declare const LETTER_SPACING_NAMES: readonly ["tight", "normal", "wide"];
14
14
  export type LetterSpacingName = (typeof LETTER_SPACING_NAMES)[number];
@@ -342,7 +342,6 @@ export interface TokenSet {
342
342
  radius: Record<RadiusName, number>;
343
343
  text: Record<TextName, {
344
344
  size: number;
345
- lineHeight: number;
346
345
  }>;
347
346
  weight: Record<WeightName, FontWeightValue>;
348
347
  leading: Record<LeadingName, number>;
@@ -82,7 +82,7 @@ export interface IconRegistry {
82
82
  export interface TextVariantSpec {
83
83
  size: TextName;
84
84
  weight?: WeightName;
85
- /** Line height in px; when unset the variant takes its text step's own line height. */
85
+ /** Line height in px; when unset the variant takes the heading leading when `heading` is set, else the body leading. */
86
86
  lineHeight?: number;
87
87
  color?: ColorName;
88
88
  uppercase?: boolean;
@@ -0,0 +1,14 @@
1
+ import type { Insets } from "react-native";
2
+ /**
3
+ * The tap area a pressable adds with `hitSlop`, as a rendered attribute.
4
+ * react-native-web draws no element for `hitSlop`, so a rendered page sees only
5
+ * the visible box; it writes `dataSet` keys as `data-*`, so the page can read
6
+ * `data-wui-hit-slop` ("top right bottom left", in points). Native ignores the
7
+ * prop. Pass the same value the pressable passes to `hitSlop`.
8
+ */
9
+ export declare const hitSlopMarker: (slop: Insets | number) => {
10
+ dataSet: {
11
+ wuiHitSlop: string;
12
+ };
13
+ };
14
+ //# sourceMappingURL=hitSlop.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Warn when a declared prop receives a value outside its allowed vocabulary.
3
+ *
4
+ * Pass the value the caller supplied, before any defaulting, or the check cannot fail.
5
+ * Nullish is accepted: an omitted prop means the default was wanted.
6
+ */
7
+ export declare function warnInvalidValue(component: string, prop: string, value: unknown, allowed: Iterable<string>): void;
8
+ /** Tests only: clears the once-per-value memory so each case starts from a clean state. */
9
+ export declare function resetInvalidValueWarnings(): void;
10
+ //# sourceMappingURL=warnInvalidValue.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/mobile-ui",
3
- "version": "0.89.0",
3
+ "version": "0.91.0",
4
4
  "description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -83,8 +83,8 @@
83
83
  "react-native-safe-area-context": ">=5.4.0",
84
84
  "react-native-svg": ">=15.0.0",
85
85
  "react-native-worklets": ">=0.10.0",
86
- "@webority/canvas-kit": "0.89.0",
87
- "@webority/mobile-core": "0.89.0"
86
+ "@webority/canvas-kit": "0.91.0",
87
+ "@webority/mobile-core": "0.91.0"
88
88
  },
89
89
  "peerDependenciesMeta": {
90
90
  "@webority/canvas-kit": {
@@ -145,10 +145,10 @@
145
145
  "react-test-renderer": "19.2.8",
146
146
  "rimraf": "6.1.3",
147
147
  "typescript": "5.9.3",
148
- "@webority/canvas-kit": "0.89.0",
148
+ "@webority/canvas-kit": "0.91.0",
149
149
  "@webority/mobile-dev": "0.0.0",
150
- "@webority/mobile-core": "0.89.0",
151
- "@webority/tokens": "0.89.0"
150
+ "@webority/tokens": "0.91.0",
151
+ "@webority/mobile-core": "0.91.0"
152
152
  },
153
153
  "scripts": {
154
154
  "build": "bob build && node ../mobile-dev/scripts/minify-lib.mjs",