@webority-technologies/mobile 0.0.5 → 0.0.7

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 (62) hide show
  1. package/README.md +3 -435
  2. package/lib/commonjs/components/Accordion/Accordion.js +20 -1
  3. package/lib/commonjs/components/Banner/Banner.js +17 -5
  4. package/lib/commonjs/components/Button/Button.js +5 -2
  5. package/lib/commonjs/components/Carousel/Carousel.js +18 -1
  6. package/lib/commonjs/components/Chip/Chip.js +27 -15
  7. package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -9
  8. package/lib/commonjs/components/Rating/Rating.js +11 -1
  9. package/lib/commonjs/components/Skeleton/Skeleton.js +20 -12
  10. package/lib/commonjs/components/Skeleton/SkeletonContent.js +25 -9
  11. package/lib/commonjs/components/Skeleton/SkeletonList.js +7 -2
  12. package/lib/commonjs/components/Skeleton/SkeletonProvider.js +48 -0
  13. package/lib/commonjs/components/Skeleton/SkeletonSkip.js +37 -0
  14. package/lib/commonjs/components/Skeleton/index.js +20 -0
  15. package/lib/commonjs/components/Stepper/Stepper.js +13 -3
  16. package/lib/commonjs/components/index.js +18 -0
  17. package/lib/module/components/Accordion/Accordion.js +20 -1
  18. package/lib/module/components/Banner/Banner.js +17 -5
  19. package/lib/module/components/Button/Button.js +6 -3
  20. package/lib/module/components/Carousel/Carousel.js +18 -1
  21. package/lib/module/components/Chip/Chip.js +27 -15
  22. package/lib/module/components/ImageGallery/ImageGallery.js +11 -1
  23. package/lib/module/components/Rating/Rating.js +11 -1
  24. package/lib/module/components/Skeleton/Skeleton.js +20 -12
  25. package/lib/module/components/Skeleton/SkeletonContent.js +25 -9
  26. package/lib/module/components/Skeleton/SkeletonList.js +7 -2
  27. package/lib/module/components/Skeleton/SkeletonProvider.js +41 -0
  28. package/lib/module/components/Skeleton/SkeletonSkip.js +31 -0
  29. package/lib/module/components/Skeleton/index.js +2 -0
  30. package/lib/module/components/Stepper/Stepper.js +13 -3
  31. package/lib/module/components/index.js +1 -1
  32. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +7 -0
  33. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +6 -0
  34. package/lib/typescript/commonjs/components/Button/Button.d.ts +5 -0
  35. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +7 -0
  36. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +6 -0
  37. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -0
  38. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +6 -0
  39. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +9 -0
  40. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +6 -0
  41. package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +3 -0
  42. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +32 -0
  43. package/lib/typescript/commonjs/components/Skeleton/SkeletonSkip.d.ts +25 -0
  44. package/lib/typescript/commonjs/components/Skeleton/index.d.ts +4 -0
  45. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +6 -0
  46. package/lib/typescript/commonjs/components/index.d.ts +2 -2
  47. package/lib/typescript/module/components/Accordion/Accordion.d.ts +7 -0
  48. package/lib/typescript/module/components/Banner/Banner.d.ts +6 -0
  49. package/lib/typescript/module/components/Button/Button.d.ts +5 -0
  50. package/lib/typescript/module/components/Carousel/Carousel.d.ts +7 -0
  51. package/lib/typescript/module/components/Chip/Chip.d.ts +6 -0
  52. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -0
  53. package/lib/typescript/module/components/Rating/Rating.d.ts +6 -0
  54. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +9 -0
  55. package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +6 -0
  56. package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +3 -0
  57. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +32 -0
  58. package/lib/typescript/module/components/Skeleton/SkeletonSkip.d.ts +25 -0
  59. package/lib/typescript/module/components/Skeleton/index.d.ts +4 -0
  60. package/lib/typescript/module/components/Stepper/Stepper.d.ts +6 -0
  61. package/lib/typescript/module/components/index.d.ts +2 -2
  62. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
5
+ /**
6
+ * Pass-through marker that opts a subtree out of `SkeletonContent`'s auto walker.
7
+ *
8
+ * The walker recognizes this element type and returns its children unchanged
9
+ * even while `loading` is true. Use it to keep a specific Text/Image/View
10
+ * visible inside a skeleton block — e.g., a brand mark, a status icon, or a
11
+ * decorative element that should never shimmer.
12
+ *
13
+ * @example
14
+ * <SkeletonContent loading>
15
+ * <View style={styles.card}>
16
+ * <SkeletonSkip>
17
+ * <Image source={Logo} style={styles.brandMark} />
18
+ * </SkeletonSkip>
19
+ * <Text>Loading…</Text>
20
+ * </View>
21
+ * </SkeletonContent>
22
+ */
23
+ export const SkeletonSkip = ({
24
+ children
25
+ }) => {
26
+ return /*#__PURE__*/_jsx(_Fragment, {
27
+ children: children
28
+ });
29
+ };
30
+ SkeletonSkip.displayName = 'SkeletonSkip';
31
+ //# sourceMappingURL=SkeletonSkip.js.map
@@ -3,4 +3,6 @@
3
3
  export { Skeleton, SkeletonCircle, SkeletonText, SkeletonAvatar, SkeletonCard, SkeletonListItem, default } from "./Skeleton.js";
4
4
  export { SkeletonContent } from "./SkeletonContent.js";
5
5
  export { SkeletonList } from "./SkeletonList.js";
6
+ export { SkeletonProvider, useSkeletonDefaults } from "./SkeletonProvider.js";
7
+ export { SkeletonSkip } from "./SkeletonSkip.js";
6
8
  //# sourceMappingURL=index.js.map
@@ -4,6 +4,7 @@ import React, { forwardRef, useEffect, useMemo, useRef } from 'react';
4
4
  import { Animated, Easing, Pressable, StyleSheet, Text, View } from 'react-native';
5
5
  import { useTheme } from "../../theme/index.js";
6
6
  import { triggerHaptic } from "../../utils/hapticUtils.js";
7
+ import { SkeletonContent } from "../Skeleton/index.js";
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const CIRCLE_SIZE = 24;
9
10
  const PULSE_SIZE = 32;
@@ -159,6 +160,7 @@ const Stepper = /*#__PURE__*/forwardRef((props, ref) => {
159
160
  onStepPress,
160
161
  variant = 'horizontal',
161
162
  tone = 'primary',
163
+ loading = false,
162
164
  accessibilityLabel,
163
165
  style,
164
166
  testID
@@ -233,7 +235,7 @@ const Stepper = /*#__PURE__*/forwardRef((props, ref) => {
233
235
  fontSize: theme.typography.fontSize.xs
234
236
  }],
235
237
  numberOfLines: 1,
236
- children: step.label
238
+ children: step?.label ?? ' '
237
239
  })]
238
240
  }, step.key);
239
241
  })]
@@ -281,7 +283,7 @@ const Stepper = /*#__PURE__*/forwardRef((props, ref) => {
281
283
  fontWeight: theme.typography.fontWeight.semibold
282
284
  }],
283
285
  numberOfLines: 1,
284
- children: step.label
286
+ children: step?.label ?? ' '
285
287
  }), step.description ? /*#__PURE__*/_jsx(Text, {
286
288
  style: [styles.vDescription, {
287
289
  color: theme.colors.text.secondary,
@@ -294,7 +296,7 @@ const Stepper = /*#__PURE__*/forwardRef((props, ref) => {
294
296
  }, step.key);
295
297
  })
296
298
  });
297
- return /*#__PURE__*/_jsx(View, {
299
+ const rendered = /*#__PURE__*/_jsx(View, {
298
300
  ref: ref,
299
301
  style: [styles.container, style],
300
302
  testID: testID,
@@ -307,6 +309,14 @@ const Stepper = /*#__PURE__*/forwardRef((props, ref) => {
307
309
  },
308
310
  children: variant === 'horizontal' ? renderHorizontal() : renderVertical()
309
311
  });
312
+ if (loading) {
313
+ return /*#__PURE__*/_jsx(SkeletonContent, {
314
+ loading: true,
315
+ mode: "auto",
316
+ children: rendered
317
+ });
318
+ }
319
+ return rendered;
310
320
  });
311
321
  Stepper.displayName = 'Stepper';
312
322
  const buildStyles = theme => StyleSheet.create({
@@ -36,7 +36,7 @@ export { SearchBar } from "./SearchBar/index.js";
36
36
  export { SegmentedControl } from "./SegmentedControl/index.js";
37
37
  export { Select } from "./Select/index.js";
38
38
  export { Stepper } from "./Stepper/index.js";
39
- export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonText } from "./Skeleton/index.js";
39
+ export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonProvider, SkeletonSkip, SkeletonText, useSkeletonDefaults } from "./Skeleton/index.js";
40
40
  export { Slider } from "./Slider/index.js";
41
41
  export { Swipeable } from "./Swipeable/index.js";
42
42
  export { Switch } from "./Switch/index.js";
@@ -16,6 +16,13 @@ export interface AccordionProps {
16
16
  headerStyle?: StyleProp<ViewStyle>;
17
17
  contentStyle?: StyleProp<ViewStyle>;
18
18
  testID?: string;
19
+ /**
20
+ * When true, renders the accordion as a skeleton placeholder via
21
+ * SkeletonContent's auto walker. The header title and any sized content
22
+ * leaves are replaced with shimmer blocks. Use this when the data driving
23
+ * the accordion is still being fetched.
24
+ */
25
+ loading?: boolean;
19
26
  }
20
27
  export interface AccordionGroupProps {
21
28
  children: React.ReactNode;
@@ -17,6 +17,12 @@ export interface BannerProps {
17
17
  onDismiss?: () => void;
18
18
  visible?: boolean;
19
19
  animateMount?: boolean;
20
+ /**
21
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
22
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
23
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
24
+ */
25
+ loading?: boolean;
20
26
  accessibilityLabel?: string;
21
27
  style?: StyleProp<ViewStyle>;
22
28
  testID?: string;
@@ -11,6 +11,11 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
11
11
  variant?: ButtonVariant;
12
12
  tone?: ButtonTone;
13
13
  size?: ButtonSize;
14
+ /**
15
+ * When true, the button is disabled and renders a Spinner in place of the title (icons hidden).
16
+ * Use for in-flight submissions. This is **not** SkeletonContent — interactive controls signal
17
+ * pending action with an inline spinner, not a placeholder shimmer.
18
+ */
14
19
  loading?: boolean;
15
20
  disabled?: boolean;
16
21
  fullWidth?: boolean;
@@ -52,6 +52,13 @@ export interface CarouselProps<T = unknown> {
52
52
  * shape is `{ uri: string }`, otherwise a numbered placeholder.
53
53
  */
54
54
  renderThumbnail?: (item: T, index: number) => React.ReactNode;
55
+ /**
56
+ * When true, renders the carousel as a skeleton placeholder via
57
+ * SkeletonContent's auto walker. The walker replaces Text/Image/sized View
58
+ * leaves in the rendered slides with shimmer blocks. Use this when the data
59
+ * driving the carousel is still being fetched.
60
+ */
61
+ loading?: boolean;
55
62
  }
56
63
  export interface CarouselRef {
57
64
  scrollTo: (index: number, animated?: boolean) => void;
@@ -14,6 +14,12 @@ export interface ChipProps {
14
14
  tone?: ChipTone;
15
15
  size?: ChipSize;
16
16
  disabled?: boolean;
17
+ /**
18
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
19
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
20
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
21
+ */
22
+ loading?: boolean;
17
23
  accessibilityLabel?: string;
18
24
  style?: StyleProp<ViewStyle>;
19
25
  textStyle?: StyleProp<TextStyle>;
@@ -31,6 +31,12 @@ export interface ImageGalleryProps {
31
31
  enableLightbox?: boolean;
32
32
  enablePinchZoom?: boolean;
33
33
  onIndexChange?: (idx: number) => void;
34
+ /**
35
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
36
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
37
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
38
+ */
39
+ loading?: boolean;
34
40
  accessibilityLabel?: string;
35
41
  containerStyle?: StyleProp<ViewStyle>;
36
42
  testID?: string;
@@ -12,6 +12,12 @@ export interface RatingProps {
12
12
  size?: RatingSize;
13
13
  tone?: RatingTone;
14
14
  label?: string;
15
+ /**
16
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
17
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
18
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
19
+ */
20
+ loading?: boolean;
15
21
  accessibilityLabel?: string;
16
22
  style?: StyleProp<ViewStyle>;
17
23
  testID?: string;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { RadiusScale } from '../../theme/types';
4
+ import type { SkeletonColors } from './SkeletonProvider';
4
5
  export type SkeletonVariant = 'shimmer' | 'pulse';
5
6
  export type SkeletonSpeed = 'slow' | 'normal' | 'fast';
6
7
  export type SkeletonRadius = keyof Pick<RadiusScale, 'sm' | 'md' | 'lg' | 'xl' | 'full'> | number;
@@ -12,6 +13,14 @@ export interface SkeletonProps {
12
13
  radius?: SkeletonRadius;
13
14
  variant?: SkeletonVariant;
14
15
  speed?: SkeletonSpeed;
16
+ /**
17
+ * Per-instance colour override. Either `background` or `highlight` (or both)
18
+ * can be set; missing keys fall back to the SkeletonProvider's defaults
19
+ * and finally to the theme. Use this for one-off contrast adjustments
20
+ * (dark shimmer on a light banner, etc.) — for app-wide overrides prefer
21
+ * `<SkeletonProvider colors={{...}}>`.
22
+ */
23
+ colors?: SkeletonColors;
15
24
  style?: StyleProp<ViewStyle>;
16
25
  testID?: string;
17
26
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
4
  import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
5
+ import type { SkeletonColors } from './SkeletonProvider';
5
6
  export type SkeletonContentMode = 'auto' | 'block';
6
7
  export interface SkeletonContentProps {
7
8
  /** When true, replace children with skeleton placeholders. */
@@ -26,6 +27,11 @@ export interface SkeletonContentProps {
26
27
  * `loading` is false. Default: `1`.
27
28
  */
28
29
  count?: number;
30
+ /**
31
+ * Colour override forwarded to every `<Skeleton>` produced by the walker. Either or both
32
+ * keys can be set; missing keys fall back to provider defaults / theme.
33
+ */
34
+ colors?: SkeletonColors;
29
35
  style?: StyleProp<ViewStyle>;
30
36
  testID?: string;
31
37
  }
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { FlatListProps, StyleProp, ViewStyle } from 'react-native';
3
3
  import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
4
+ import type { SkeletonColors } from './SkeletonProvider';
4
5
  export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, 'data' | 'renderItem'> {
5
6
  /** Whether the list is in its initial loading state. */
6
7
  loading: boolean;
@@ -19,6 +20,8 @@ export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, 'da
19
20
  variant?: SkeletonVariant;
20
21
  /** Animation speed — same as Skeleton. */
21
22
  speed?: SkeletonSpeed;
23
+ /** Colour override forwarded to the placeholder skeletons. */
24
+ colors?: SkeletonColors;
22
25
  /** Style applied to the wrapper View around the placeholders. */
23
26
  placeholderContainerStyle?: StyleProp<ViewStyle>;
24
27
  testID?: string;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import type { SkeletonRadius, SkeletonSpeed, SkeletonVariant } from './Skeleton';
4
+ /**
5
+ * Per-instance color override for a skeleton. `background` is the resting tone
6
+ * of the placeholder; `highlight` is the moving shimmer band (or pulse fade).
7
+ * Either can be omitted — missing keys fall back to the active theme.
8
+ */
9
+ export interface SkeletonColors {
10
+ background?: string;
11
+ highlight?: string;
12
+ }
13
+ export interface SkeletonProviderDefaults {
14
+ variant?: SkeletonVariant;
15
+ speed?: SkeletonSpeed;
16
+ /** Default `placeholderCount` for `<SkeletonList>` when not specified per-instance. */
17
+ placeholderCount?: number;
18
+ /** Default `radius` for `<Skeleton>` when not specified per-instance. */
19
+ radius?: SkeletonRadius;
20
+ /** App-wide colour overrides for the shimmer base + highlight. */
21
+ colors?: SkeletonColors;
22
+ }
23
+ export interface SkeletonProviderProps extends SkeletonProviderDefaults {
24
+ children: ReactNode;
25
+ }
26
+ export declare const SkeletonProvider: React.FC<SkeletonProviderProps>;
27
+ /**
28
+ * Read the current SkeletonProvider defaults. Returns an empty object when no
29
+ * provider is mounted, so the skeleton primitives still work outside of one.
30
+ */
31
+ export declare const useSkeletonDefaults: () => SkeletonProviderDefaults;
32
+ //# sourceMappingURL=SkeletonProvider.d.ts.map
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ export interface SkeletonSkipProps {
4
+ children: ReactNode;
5
+ }
6
+ /**
7
+ * Pass-through marker that opts a subtree out of `SkeletonContent`'s auto walker.
8
+ *
9
+ * The walker recognizes this element type and returns its children unchanged
10
+ * even while `loading` is true. Use it to keep a specific Text/Image/View
11
+ * visible inside a skeleton block — e.g., a brand mark, a status icon, or a
12
+ * decorative element that should never shimmer.
13
+ *
14
+ * @example
15
+ * <SkeletonContent loading>
16
+ * <View style={styles.card}>
17
+ * <SkeletonSkip>
18
+ * <Image source={Logo} style={styles.brandMark} />
19
+ * </SkeletonSkip>
20
+ * <Text>Loading…</Text>
21
+ * </View>
22
+ * </SkeletonContent>
23
+ */
24
+ export declare const SkeletonSkip: React.FC<SkeletonSkipProps>;
25
+ //# sourceMappingURL=SkeletonSkip.d.ts.map
@@ -4,4 +4,8 @@ export { SkeletonContent } from './SkeletonContent';
4
4
  export type { SkeletonContentProps, SkeletonContentMode } from './SkeletonContent';
5
5
  export { SkeletonList } from './SkeletonList';
6
6
  export type { SkeletonListProps } from './SkeletonList';
7
+ export { SkeletonProvider, useSkeletonDefaults } from './SkeletonProvider';
8
+ export type { SkeletonColors, SkeletonProviderDefaults, SkeletonProviderProps } from './SkeletonProvider';
9
+ export { SkeletonSkip } from './SkeletonSkip';
10
+ export type { SkeletonSkipProps } from './SkeletonSkip';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -15,6 +15,12 @@ export interface StepperProps {
15
15
  onStepPress?: (index: number) => void;
16
16
  variant?: StepperVariant;
17
17
  tone?: StepperTone;
18
+ /**
19
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
20
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
21
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
22
+ */
23
+ loading?: boolean;
18
24
  accessibilityLabel?: string;
19
25
  style?: StyleProp<ViewStyle>;
20
26
  testID?: string;
@@ -70,8 +70,8 @@ export { Select } from './Select';
70
70
  export type { SelectProps, SelectOption, SelectSize } from './Select';
71
71
  export { Stepper } from './Stepper';
72
72
  export type { StepperProps, StepperVariant, StepperStep, StepperTone } from './Stepper';
73
- export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonText } from './Skeleton';
74
- export type { SkeletonProps, SkeletonAvatarProps, SkeletonCardProps, SkeletonCircleProps, SkeletonContentMode, SkeletonContentProps, SkeletonListItemProps, SkeletonListProps, SkeletonTextProps, SkeletonVariant, SkeletonSpeed } from './Skeleton';
73
+ export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonProvider, SkeletonSkip, SkeletonText, useSkeletonDefaults } from './Skeleton';
74
+ export type { SkeletonAvatarProps, SkeletonCardProps, SkeletonCircleProps, SkeletonColors, SkeletonContentMode, SkeletonContentProps, SkeletonListItemProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonSkipProps, SkeletonSpeed, SkeletonTextProps, SkeletonVariant } from './Skeleton';
75
75
  export { Slider } from './Slider';
76
76
  export type { SliderProps, SliderTone, SliderSize } from './Slider';
77
77
  export { Swipeable } from './Swipeable';
@@ -16,6 +16,13 @@ export interface AccordionProps {
16
16
  headerStyle?: StyleProp<ViewStyle>;
17
17
  contentStyle?: StyleProp<ViewStyle>;
18
18
  testID?: string;
19
+ /**
20
+ * When true, renders the accordion as a skeleton placeholder via
21
+ * SkeletonContent's auto walker. The header title and any sized content
22
+ * leaves are replaced with shimmer blocks. Use this when the data driving
23
+ * the accordion is still being fetched.
24
+ */
25
+ loading?: boolean;
19
26
  }
20
27
  export interface AccordionGroupProps {
21
28
  children: React.ReactNode;
@@ -17,6 +17,12 @@ export interface BannerProps {
17
17
  onDismiss?: () => void;
18
18
  visible?: boolean;
19
19
  animateMount?: boolean;
20
+ /**
21
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
22
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
23
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
24
+ */
25
+ loading?: boolean;
20
26
  accessibilityLabel?: string;
21
27
  style?: StyleProp<ViewStyle>;
22
28
  testID?: string;
@@ -11,6 +11,11 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
11
11
  variant?: ButtonVariant;
12
12
  tone?: ButtonTone;
13
13
  size?: ButtonSize;
14
+ /**
15
+ * When true, the button is disabled and renders a Spinner in place of the title (icons hidden).
16
+ * Use for in-flight submissions. This is **not** SkeletonContent — interactive controls signal
17
+ * pending action with an inline spinner, not a placeholder shimmer.
18
+ */
14
19
  loading?: boolean;
15
20
  disabled?: boolean;
16
21
  fullWidth?: boolean;
@@ -52,6 +52,13 @@ export interface CarouselProps<T = unknown> {
52
52
  * shape is `{ uri: string }`, otherwise a numbered placeholder.
53
53
  */
54
54
  renderThumbnail?: (item: T, index: number) => React.ReactNode;
55
+ /**
56
+ * When true, renders the carousel as a skeleton placeholder via
57
+ * SkeletonContent's auto walker. The walker replaces Text/Image/sized View
58
+ * leaves in the rendered slides with shimmer blocks. Use this when the data
59
+ * driving the carousel is still being fetched.
60
+ */
61
+ loading?: boolean;
55
62
  }
56
63
  export interface CarouselRef {
57
64
  scrollTo: (index: number, animated?: boolean) => void;
@@ -14,6 +14,12 @@ export interface ChipProps {
14
14
  tone?: ChipTone;
15
15
  size?: ChipSize;
16
16
  disabled?: boolean;
17
+ /**
18
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
19
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
20
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
21
+ */
22
+ loading?: boolean;
17
23
  accessibilityLabel?: string;
18
24
  style?: StyleProp<ViewStyle>;
19
25
  textStyle?: StyleProp<TextStyle>;
@@ -31,6 +31,12 @@ export interface ImageGalleryProps {
31
31
  enableLightbox?: boolean;
32
32
  enablePinchZoom?: boolean;
33
33
  onIndexChange?: (idx: number) => void;
34
+ /**
35
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
36
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
37
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
38
+ */
39
+ loading?: boolean;
34
40
  accessibilityLabel?: string;
35
41
  containerStyle?: StyleProp<ViewStyle>;
36
42
  testID?: string;
@@ -12,6 +12,12 @@ export interface RatingProps {
12
12
  size?: RatingSize;
13
13
  tone?: RatingTone;
14
14
  label?: string;
15
+ /**
16
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
17
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
18
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
19
+ */
20
+ loading?: boolean;
15
21
  accessibilityLabel?: string;
16
22
  style?: StyleProp<ViewStyle>;
17
23
  testID?: string;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { RadiusScale } from '../../theme/types';
4
+ import type { SkeletonColors } from './SkeletonProvider';
4
5
  export type SkeletonVariant = 'shimmer' | 'pulse';
5
6
  export type SkeletonSpeed = 'slow' | 'normal' | 'fast';
6
7
  export type SkeletonRadius = keyof Pick<RadiusScale, 'sm' | 'md' | 'lg' | 'xl' | 'full'> | number;
@@ -12,6 +13,14 @@ export interface SkeletonProps {
12
13
  radius?: SkeletonRadius;
13
14
  variant?: SkeletonVariant;
14
15
  speed?: SkeletonSpeed;
16
+ /**
17
+ * Per-instance colour override. Either `background` or `highlight` (or both)
18
+ * can be set; missing keys fall back to the SkeletonProvider's defaults
19
+ * and finally to the theme. Use this for one-off contrast adjustments
20
+ * (dark shimmer on a light banner, etc.) — for app-wide overrides prefer
21
+ * `<SkeletonProvider colors={{...}}>`.
22
+ */
23
+ colors?: SkeletonColors;
15
24
  style?: StyleProp<ViewStyle>;
16
25
  testID?: string;
17
26
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
4
  import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
5
+ import type { SkeletonColors } from './SkeletonProvider';
5
6
  export type SkeletonContentMode = 'auto' | 'block';
6
7
  export interface SkeletonContentProps {
7
8
  /** When true, replace children with skeleton placeholders. */
@@ -26,6 +27,11 @@ export interface SkeletonContentProps {
26
27
  * `loading` is false. Default: `1`.
27
28
  */
28
29
  count?: number;
30
+ /**
31
+ * Colour override forwarded to every `<Skeleton>` produced by the walker. Either or both
32
+ * keys can be set; missing keys fall back to provider defaults / theme.
33
+ */
34
+ colors?: SkeletonColors;
29
35
  style?: StyleProp<ViewStyle>;
30
36
  testID?: string;
31
37
  }
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { FlatListProps, StyleProp, ViewStyle } from 'react-native';
3
3
  import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
4
+ import type { SkeletonColors } from './SkeletonProvider';
4
5
  export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, 'data' | 'renderItem'> {
5
6
  /** Whether the list is in its initial loading state. */
6
7
  loading: boolean;
@@ -19,6 +20,8 @@ export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, 'da
19
20
  variant?: SkeletonVariant;
20
21
  /** Animation speed — same as Skeleton. */
21
22
  speed?: SkeletonSpeed;
23
+ /** Colour override forwarded to the placeholder skeletons. */
24
+ colors?: SkeletonColors;
22
25
  /** Style applied to the wrapper View around the placeholders. */
23
26
  placeholderContainerStyle?: StyleProp<ViewStyle>;
24
27
  testID?: string;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import type { SkeletonRadius, SkeletonSpeed, SkeletonVariant } from './Skeleton';
4
+ /**
5
+ * Per-instance color override for a skeleton. `background` is the resting tone
6
+ * of the placeholder; `highlight` is the moving shimmer band (or pulse fade).
7
+ * Either can be omitted — missing keys fall back to the active theme.
8
+ */
9
+ export interface SkeletonColors {
10
+ background?: string;
11
+ highlight?: string;
12
+ }
13
+ export interface SkeletonProviderDefaults {
14
+ variant?: SkeletonVariant;
15
+ speed?: SkeletonSpeed;
16
+ /** Default `placeholderCount` for `<SkeletonList>` when not specified per-instance. */
17
+ placeholderCount?: number;
18
+ /** Default `radius` for `<Skeleton>` when not specified per-instance. */
19
+ radius?: SkeletonRadius;
20
+ /** App-wide colour overrides for the shimmer base + highlight. */
21
+ colors?: SkeletonColors;
22
+ }
23
+ export interface SkeletonProviderProps extends SkeletonProviderDefaults {
24
+ children: ReactNode;
25
+ }
26
+ export declare const SkeletonProvider: React.FC<SkeletonProviderProps>;
27
+ /**
28
+ * Read the current SkeletonProvider defaults. Returns an empty object when no
29
+ * provider is mounted, so the skeleton primitives still work outside of one.
30
+ */
31
+ export declare const useSkeletonDefaults: () => SkeletonProviderDefaults;
32
+ //# sourceMappingURL=SkeletonProvider.d.ts.map
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ export interface SkeletonSkipProps {
4
+ children: ReactNode;
5
+ }
6
+ /**
7
+ * Pass-through marker that opts a subtree out of `SkeletonContent`'s auto walker.
8
+ *
9
+ * The walker recognizes this element type and returns its children unchanged
10
+ * even while `loading` is true. Use it to keep a specific Text/Image/View
11
+ * visible inside a skeleton block — e.g., a brand mark, a status icon, or a
12
+ * decorative element that should never shimmer.
13
+ *
14
+ * @example
15
+ * <SkeletonContent loading>
16
+ * <View style={styles.card}>
17
+ * <SkeletonSkip>
18
+ * <Image source={Logo} style={styles.brandMark} />
19
+ * </SkeletonSkip>
20
+ * <Text>Loading…</Text>
21
+ * </View>
22
+ * </SkeletonContent>
23
+ */
24
+ export declare const SkeletonSkip: React.FC<SkeletonSkipProps>;
25
+ //# sourceMappingURL=SkeletonSkip.d.ts.map
@@ -4,4 +4,8 @@ export { SkeletonContent } from './SkeletonContent';
4
4
  export type { SkeletonContentProps, SkeletonContentMode } from './SkeletonContent';
5
5
  export { SkeletonList } from './SkeletonList';
6
6
  export type { SkeletonListProps } from './SkeletonList';
7
+ export { SkeletonProvider, useSkeletonDefaults } from './SkeletonProvider';
8
+ export type { SkeletonColors, SkeletonProviderDefaults, SkeletonProviderProps } from './SkeletonProvider';
9
+ export { SkeletonSkip } from './SkeletonSkip';
10
+ export type { SkeletonSkipProps } from './SkeletonSkip';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -15,6 +15,12 @@ export interface StepperProps {
15
15
  onStepPress?: (index: number) => void;
16
16
  variant?: StepperVariant;
17
17
  tone?: StepperTone;
18
+ /**
19
+ * When true, renders the component as a skeleton placeholder via SkeletonContent's auto walker.
20
+ * Component still renders its normal layout — the walker replaces Text/Image/sized View leaves
21
+ * with shimmer blocks. Use this when the data driving the component is still being fetched.
22
+ */
23
+ loading?: boolean;
18
24
  accessibilityLabel?: string;
19
25
  style?: StyleProp<ViewStyle>;
20
26
  testID?: string;
@@ -70,8 +70,8 @@ export { Select } from './Select';
70
70
  export type { SelectProps, SelectOption, SelectSize } from './Select';
71
71
  export { Stepper } from './Stepper';
72
72
  export type { StepperProps, StepperVariant, StepperStep, StepperTone } from './Stepper';
73
- export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonText } from './Skeleton';
74
- export type { SkeletonProps, SkeletonAvatarProps, SkeletonCardProps, SkeletonCircleProps, SkeletonContentMode, SkeletonContentProps, SkeletonListItemProps, SkeletonListProps, SkeletonTextProps, SkeletonVariant, SkeletonSpeed } from './Skeleton';
73
+ export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonContent, SkeletonList, SkeletonListItem, SkeletonProvider, SkeletonSkip, SkeletonText, useSkeletonDefaults } from './Skeleton';
74
+ export type { SkeletonAvatarProps, SkeletonCardProps, SkeletonCircleProps, SkeletonColors, SkeletonContentMode, SkeletonContentProps, SkeletonListItemProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonSkipProps, SkeletonSpeed, SkeletonTextProps, SkeletonVariant } from './Skeleton';
75
75
  export { Slider } from './Slider';
76
76
  export type { SliderProps, SliderTone, SliderSize } from './Slider';
77
77
  export { Swipeable } from './Swipeable';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority-technologies/mobile",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Beautiful, animated, accessible React Native components plus API/auth/logging/network/storage utilities for Webority projects.",
5
5
  "keywords": [
6
6
  "react-native",