panelui-native 0.91.0 → 0.92.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.
@@ -30,6 +30,7 @@ const RESTING_OPACITY = 0.7;
30
30
  */
31
31
  export const Skeleton = /*#__PURE__*/memo(function Skeleton({
32
32
  className,
33
+ style,
33
34
  label
34
35
  }) {
35
36
  const reducedMotion = useReducedMotion();
@@ -57,7 +58,7 @@ export const Skeleton = /*#__PURE__*/memo(function Skeleton({
57
58
  } : undefined,
58
59
  accessibilityElementsHidden: !announced,
59
60
  importantForAccessibility: announced ? 'auto' : 'no-hide-descendants',
60
- style: animatedStyle,
61
+ style: [style, animatedStyle],
61
62
  className: cn('rounded-md bg-skeleton', className)
62
63
  });
63
64
  });
@@ -1 +1 @@
1
- {"version":3,"names":["memo","useEffect","Animated","cancelAnimation","useAnimatedStyle","useReducedMotion","useSharedValue","withRepeat","withTiming","cn","jsx","_jsx","PULSE_DURATION","PULSE_FLOOR","RESTING_OPACITY","Skeleton","className","label","reducedMotion","opacity","value","undefined","duration","animatedStyle","announced","View","accessibilityRole","accessibilityLabel","accessibilityState","busy","accessibilityElementsHidden","importantForAccessibility","style"],"sourceRoot":"../../../../src","sources":["components/skeleton/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,QAAQ,OAAO;AACvC,OAAOC,QAAQ,IACbC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,SAASC,EAAE,QAAQ,mBAAgB;;AAEnC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,cAAc,GAAG,GAAG;AAC1B;AACA,MAAMC,WAAW,GAAG,IAAI;AACxB;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,GAAG;AAgB3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC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Style","useReducedMotion","useSharedValue","withRepeat","withTiming","cn","jsx","_jsx","PULSE_DURATION","PULSE_FLOOR","RESTING_OPACITY","Skeleton","className","style","label","reducedMotion","opacity","value","undefined","duration","animatedStyle","announced","View","accessibilityRole","accessibilityLabel","accessibilityState","busy","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../src","sources":["components/skeleton/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,QAAQ,OAAO;AAEvC,OAAOC,QAAQ,IACbC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,SAASC,EAAE,QAAQ,mBAAgB;;AAEnC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,cAAc,GAAG,GAAG;AAC1B;AACA,MAAMC,WAAW,GAAG,IAAI;AACxB;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,GAAG;AAwB3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,gBAAGf,IAAI,CAAC,SAASe,QAAQA,CAAC;EAC7CC,SAAS;EACTC,KAAK;EACLC;AACa,CAAC,EAAE;EAChB,MAAMC,aAAa,GAAGd,gBAAgB,CAAC,CAAC;EACxC,MAAMe,OAAO,GAAGd,cAAc,CAACa,aAAa,GAAGL,eAAe,GAAG,CAAC,CAAC;EAEnEb,SAAS,CAAC,MAAM;IACd,IAAIkB,aAAa,EAAE;MACjBC,OAAO,CAACC,KAAK,GAAGP,eAAe;MAC/B,OAAOQ,SAAS;IAClB;IACAF,OAAO,CAACC,KAAK,GAAG,CAAC;IACjBD,OAAO,CAACC,KAAK,GAAGd,UAAU,CACxBC,UAAU,CAACK,WAAW,EAAE;MAAEU,QAAQ,EAAEX;IAAe,CAAC,CAAC,EACrD,CAAC,CAAC,EACF,IACF,CAAC;IACD,OAAO,MAAMT,eAAe,CAACiB,OAAO,CAAC;EACvC,CAAC,EAAE,CAACA,OAAO,EAAED,aAAa,CAAC,CAAC;EAE5B,MAAMK,aAAa,GAAGpB,gBAAgB,CAAC,OAAO;IAC5CgB,OAAO,EAAEA,OAAO,CAACC;EACnB,CAAC,CAAC,CAAC;EAEH,MAAMI,SAAS,GAAGP,KAAK,IAAI,IAAI;EAE/B,oBACEP,IAAA,CAACT,QAAQ,CAACwB,IAAI;IACZC,iBAAiB,EAAEF,SAAS,GAAG,aAAa,GAAGH,SAAU;IACzDM,kBAAkB,EAAEV,KAAM;IAC1BW,kBAAkB,EAAEJ,SAAS,GAAG;MAAEK,IAAI,EAAE;IAAK,CAAC,GAAGR,SAAU;IAC3DS,2BAA2B,EAAE,CAACN,SAAU;IACxCO,yBAAyB,EAAEP,SAAS,GAAG,MAAM,GAAG,qBAAsB;IACtER,KAAK,EAAE,CAACA,KAAK,EAAEO,aAAa,CAAE;IAC9BR,SAAS,EAAEP,EAAE,CAAC,wBAAwB,EAAEO,SAAS;EAAE,CACpD,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +1,14 @@
1
+ import type { ViewProps } from 'react-native';
1
2
  export interface SkeletonProps {
2
3
  className?: string;
4
+ /**
5
+ * View style for the placeholder — a dimension computed at runtime, or one no
6
+ * utility class expresses. Ordinary sizing belongs in `className`, and a
7
+ * value here wins over the class that sets the same property.
8
+ *
9
+ * The pulse owns `opacity`; setting it here has no effect.
10
+ */
11
+ style?: ViewProps['style'];
3
12
  /**
4
13
  * What is loading, for a screen reader. Setting it makes this skeleton
5
14
  * announce as a busy status; leaving it unset keeps the placeholder out of
@@ -25,5 +34,5 @@ export interface SkeletonProps {
25
34
  * stops moving does not read as hung: it is a shape where content will be, and
26
35
  * the shape says that on its own.
27
36
  */
28
- export declare const Skeleton: import("react").MemoExoticComponent<({ className, label, }: SkeletonProps) => import("react").JSX.Element>;
37
+ export declare const Skeleton: import("react").MemoExoticComponent<({ className, style, label, }: SkeletonProps) => import("react").JSX.Element>;
29
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/skeleton/index.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,8DAGlB,aAAa,iCAmCd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/skeleton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqB9C,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,qEAIlB,aAAa,iCAmCd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panelui-native",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "description": "High-performance React Native UI components for Expo. Semantic design tokens, powered by Uniwind (Tailwind v4) and Reanimated.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -1,4 +1,5 @@
1
1
  import { memo, useEffect } from 'react';
2
+ import type { ViewProps } from 'react-native';
2
3
  import Animated, {
3
4
  cancelAnimation,
4
5
  useAnimatedStyle,
@@ -21,6 +22,14 @@ const RESTING_OPACITY = 0.7;
21
22
 
22
23
  export interface SkeletonProps {
23
24
  className?: string;
25
+ /**
26
+ * View style for the placeholder — a dimension computed at runtime, or one no
27
+ * utility class expresses. Ordinary sizing belongs in `className`, and a
28
+ * value here wins over the class that sets the same property.
29
+ *
30
+ * The pulse owns `opacity`; setting it here has no effect.
31
+ */
32
+ style?: ViewProps['style'];
24
33
  /**
25
34
  * What is loading, for a screen reader. Setting it makes this skeleton
26
35
  * announce as a busy status; leaving it unset keeps the placeholder out of
@@ -49,6 +58,7 @@ export interface SkeletonProps {
49
58
  */
50
59
  export const Skeleton = memo(function Skeleton({
51
60
  className,
61
+ style,
52
62
  label,
53
63
  }: SkeletonProps) {
54
64
  const reducedMotion = useReducedMotion();
@@ -81,7 +91,7 @@ export const Skeleton = memo(function Skeleton({
81
91
  accessibilityState={announced ? { busy: true } : undefined}
82
92
  accessibilityElementsHidden={!announced}
83
93
  importantForAccessibility={announced ? 'auto' : 'no-hide-descendants'}
84
- style={animatedStyle}
94
+ style={[style, animatedStyle]}
85
95
  className={cn('rounded-md bg-skeleton', className)}
86
96
  />
87
97
  );