@cdx-ui/components 0.0.1-beta.79 → 0.0.1-beta.80

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 (214) hide show
  1. package/lib/commonjs/animation/hooks/index.js +17 -0
  2. package/lib/commonjs/animation/hooks/index.js.map +1 -0
  3. package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js +50 -0
  4. package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
  5. package/lib/commonjs/animation/index.js +39 -0
  6. package/lib/commonjs/animation/index.js.map +1 -0
  7. package/lib/commonjs/animation/types.js +6 -0
  8. package/lib/commonjs/animation/types.js.map +1 -0
  9. package/lib/commonjs/animation/utils.js +223 -0
  10. package/lib/commonjs/animation/utils.js.map +1 -0
  11. package/lib/commonjs/components/CLAUDE.md +1 -1
  12. package/lib/commonjs/components/Card/index.js +45 -17
  13. package/lib/commonjs/components/Card/index.js.map +1 -1
  14. package/lib/commonjs/components/Toast/animation.js +329 -0
  15. package/lib/commonjs/components/Toast/animation.js.map +1 -0
  16. package/lib/commonjs/components/Toast/hooks.js +66 -0
  17. package/lib/commonjs/components/Toast/hooks.js.map +1 -0
  18. package/lib/commonjs/components/Toast/index.js +493 -0
  19. package/lib/commonjs/components/Toast/index.js.map +1 -0
  20. package/lib/commonjs/components/Toast/styles.js +141 -0
  21. package/lib/commonjs/components/Toast/styles.js.map +1 -0
  22. package/lib/commonjs/components/Toast/types.js +6 -0
  23. package/lib/commonjs/components/Toast/types.js.map +1 -0
  24. package/lib/commonjs/components/index.js +12 -0
  25. package/lib/commonjs/components/index.js.map +1 -1
  26. package/lib/commonjs/index.js +15 -0
  27. package/lib/commonjs/index.js.map +1 -1
  28. package/lib/commonjs/providers/animation-settings/index.js +31 -0
  29. package/lib/commonjs/providers/animation-settings/index.js.map +1 -0
  30. package/lib/commonjs/providers/animation-settings/provider.js +59 -0
  31. package/lib/commonjs/providers/animation-settings/provider.js.map +1 -0
  32. package/lib/commonjs/providers/animation-settings/types.js +6 -0
  33. package/lib/commonjs/providers/animation-settings/types.js.map +1 -0
  34. package/lib/commonjs/providers/forge-design/index.js +29 -0
  35. package/lib/commonjs/providers/forge-design/index.js.map +1 -0
  36. package/lib/commonjs/providers/forge-design/provider.js +71 -0
  37. package/lib/commonjs/providers/forge-design/provider.js.map +1 -0
  38. package/lib/commonjs/providers/forge-design/types.js +6 -0
  39. package/lib/commonjs/providers/forge-design/types.js.map +1 -0
  40. package/lib/commonjs/providers/text-component/index.js +28 -0
  41. package/lib/commonjs/providers/text-component/index.js.map +1 -0
  42. package/lib/commonjs/providers/text-component/provider.js +11 -0
  43. package/lib/commonjs/providers/text-component/provider.js.map +1 -0
  44. package/lib/commonjs/providers/text-component/types.js +6 -0
  45. package/lib/commonjs/providers/text-component/types.js.map +1 -0
  46. package/lib/commonjs/providers/toast/index.js +33 -0
  47. package/lib/commonjs/providers/toast/index.js.map +1 -0
  48. package/lib/commonjs/providers/toast/insets-container.js +160 -0
  49. package/lib/commonjs/providers/toast/insets-container.js.map +1 -0
  50. package/lib/commonjs/providers/toast/lifecycle.context.js +36 -0
  51. package/lib/commonjs/providers/toast/lifecycle.context.js.map +1 -0
  52. package/lib/commonjs/providers/toast/provider.js +508 -0
  53. package/lib/commonjs/providers/toast/provider.js.map +1 -0
  54. package/lib/commonjs/providers/toast/reducer.js +46 -0
  55. package/lib/commonjs/providers/toast/reducer.js.map +1 -0
  56. package/lib/commonjs/providers/toast/toast-config.context.js +29 -0
  57. package/lib/commonjs/providers/toast/toast-config.context.js.map +1 -0
  58. package/lib/commonjs/providers/toast/toast-item-renderer.js +43 -0
  59. package/lib/commonjs/providers/toast/toast-item-renderer.js.map +1 -0
  60. package/lib/commonjs/providers/toast/types.js +6 -0
  61. package/lib/commonjs/providers/toast/types.js.map +1 -0
  62. package/lib/module/animation/hooks/index.js +4 -0
  63. package/lib/module/animation/hooks/index.js.map +1 -0
  64. package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js +47 -0
  65. package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
  66. package/lib/module/animation/index.js +6 -0
  67. package/lib/module/animation/index.js.map +1 -0
  68. package/lib/module/animation/types.js +4 -0
  69. package/lib/module/animation/types.js.map +1 -0
  70. package/lib/module/animation/utils.js +212 -0
  71. package/lib/module/animation/utils.js.map +1 -0
  72. package/lib/module/components/CLAUDE.md +1 -1
  73. package/lib/module/components/Card/index.js +47 -19
  74. package/lib/module/components/Card/index.js.map +1 -1
  75. package/lib/module/components/Toast/animation.js +324 -0
  76. package/lib/module/components/Toast/animation.js.map +1 -0
  77. package/lib/module/components/Toast/hooks.js +61 -0
  78. package/lib/module/components/Toast/hooks.js.map +1 -0
  79. package/lib/module/components/Toast/index.js +487 -0
  80. package/lib/module/components/Toast/index.js.map +1 -0
  81. package/lib/module/components/Toast/styles.js +138 -0
  82. package/lib/module/components/Toast/styles.js.map +1 -0
  83. package/lib/module/components/Toast/types.js +4 -0
  84. package/lib/module/components/Toast/types.js.map +1 -0
  85. package/lib/module/components/index.js +1 -0
  86. package/lib/module/components/index.js.map +1 -1
  87. package/lib/module/index.js +1 -0
  88. package/lib/module/index.js.map +1 -1
  89. package/lib/module/providers/animation-settings/index.js +4 -0
  90. package/lib/module/providers/animation-settings/index.js.map +1 -0
  91. package/lib/module/providers/animation-settings/provider.js +52 -0
  92. package/lib/module/providers/animation-settings/provider.js.map +1 -0
  93. package/lib/module/providers/animation-settings/types.js +4 -0
  94. package/lib/module/providers/animation-settings/types.js.map +1 -0
  95. package/lib/module/providers/forge-design/index.js +5 -0
  96. package/lib/module/providers/forge-design/index.js.map +1 -0
  97. package/lib/module/providers/forge-design/provider.js +66 -0
  98. package/lib/module/providers/forge-design/provider.js.map +1 -0
  99. package/lib/module/providers/forge-design/types.js +4 -0
  100. package/lib/module/providers/forge-design/types.js.map +1 -0
  101. package/lib/module/providers/text-component/index.js +5 -0
  102. package/lib/module/providers/text-component/index.js.map +1 -0
  103. package/lib/module/providers/text-component/provider.js +6 -0
  104. package/lib/module/providers/text-component/provider.js.map +1 -0
  105. package/lib/module/providers/text-component/types.js +4 -0
  106. package/lib/module/providers/text-component/types.js.map +1 -0
  107. package/lib/module/providers/toast/index.js +6 -0
  108. package/lib/module/providers/toast/index.js.map +1 -0
  109. package/lib/module/providers/toast/insets-container.js +156 -0
  110. package/lib/module/providers/toast/insets-container.js.map +1 -0
  111. package/lib/module/providers/toast/lifecycle.context.js +32 -0
  112. package/lib/module/providers/toast/lifecycle.context.js.map +1 -0
  113. package/lib/module/providers/toast/provider.js +503 -0
  114. package/lib/module/providers/toast/provider.js.map +1 -0
  115. package/lib/module/providers/toast/reducer.js +42 -0
  116. package/lib/module/providers/toast/reducer.js.map +1 -0
  117. package/lib/module/providers/toast/toast-config.context.js +25 -0
  118. package/lib/module/providers/toast/toast-config.context.js.map +1 -0
  119. package/lib/module/providers/toast/toast-item-renderer.js +39 -0
  120. package/lib/module/providers/toast/toast-item-renderer.js.map +1 -0
  121. package/lib/module/providers/toast/types.js +4 -0
  122. package/lib/module/providers/toast/types.js.map +1 -0
  123. package/lib/typescript/animation/hooks/index.d.ts +2 -0
  124. package/lib/typescript/animation/hooks/index.d.ts.map +1 -0
  125. package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts +22 -0
  126. package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts.map +1 -0
  127. package/lib/typescript/animation/index.d.ts +4 -0
  128. package/lib/typescript/animation/index.d.ts.map +1 -0
  129. package/lib/typescript/animation/types.d.ts +105 -0
  130. package/lib/typescript/animation/types.d.ts.map +1 -0
  131. package/lib/typescript/animation/utils.d.ts +120 -0
  132. package/lib/typescript/animation/utils.d.ts.map +1 -0
  133. package/lib/typescript/components/Card/index.d.ts +4 -0
  134. package/lib/typescript/components/Card/index.d.ts.map +1 -1
  135. package/lib/typescript/components/Toast/animation.d.ts +21 -0
  136. package/lib/typescript/components/Toast/animation.d.ts.map +1 -0
  137. package/lib/typescript/components/Toast/hooks.d.ts +17 -0
  138. package/lib/typescript/components/Toast/hooks.d.ts.map +1 -0
  139. package/lib/typescript/components/Toast/index.d.ts +28 -0
  140. package/lib/typescript/components/Toast/index.d.ts.map +1 -0
  141. package/lib/typescript/components/Toast/styles.d.ts +73 -0
  142. package/lib/typescript/components/Toast/styles.d.ts.map +1 -0
  143. package/lib/typescript/components/Toast/types.d.ts +303 -0
  144. package/lib/typescript/components/Toast/types.d.ts.map +1 -0
  145. package/lib/typescript/components/index.d.ts +1 -0
  146. package/lib/typescript/components/index.d.ts.map +1 -1
  147. package/lib/typescript/index.d.ts +2 -0
  148. package/lib/typescript/index.d.ts.map +1 -1
  149. package/lib/typescript/providers/animation-settings/index.d.ts +3 -0
  150. package/lib/typescript/providers/animation-settings/index.d.ts.map +1 -0
  151. package/lib/typescript/providers/animation-settings/provider.d.ts +28 -0
  152. package/lib/typescript/providers/animation-settings/provider.d.ts.map +1 -0
  153. package/lib/typescript/providers/animation-settings/types.d.ts +35 -0
  154. package/lib/typescript/providers/animation-settings/types.d.ts.map +1 -0
  155. package/lib/typescript/providers/forge-design/index.d.ts +3 -0
  156. package/lib/typescript/providers/forge-design/index.d.ts.map +1 -0
  157. package/lib/typescript/providers/forge-design/provider.d.ts +24 -0
  158. package/lib/typescript/providers/forge-design/provider.d.ts.map +1 -0
  159. package/lib/typescript/providers/forge-design/types.d.ts +82 -0
  160. package/lib/typescript/providers/forge-design/types.d.ts.map +1 -0
  161. package/lib/typescript/providers/text-component/index.d.ts +3 -0
  162. package/lib/typescript/providers/text-component/index.d.ts.map +1 -0
  163. package/lib/typescript/providers/text-component/provider.d.ts +7 -0
  164. package/lib/typescript/providers/text-component/provider.d.ts.map +1 -0
  165. package/lib/typescript/providers/text-component/types.d.ts +51 -0
  166. package/lib/typescript/providers/text-component/types.d.ts.map +1 -0
  167. package/lib/typescript/providers/toast/index.d.ts +5 -0
  168. package/lib/typescript/providers/toast/index.d.ts.map +1 -0
  169. package/lib/typescript/providers/toast/insets-container.d.ts +72 -0
  170. package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -0
  171. package/lib/typescript/providers/toast/lifecycle.context.d.ts +32 -0
  172. package/lib/typescript/providers/toast/lifecycle.context.d.ts.map +1 -0
  173. package/lib/typescript/providers/toast/provider.d.ts +32 -0
  174. package/lib/typescript/providers/toast/provider.d.ts.map +1 -0
  175. package/lib/typescript/providers/toast/reducer.d.ts +14 -0
  176. package/lib/typescript/providers/toast/reducer.d.ts.map +1 -0
  177. package/lib/typescript/providers/toast/toast-config.context.d.ts +20 -0
  178. package/lib/typescript/providers/toast/toast-config.context.d.ts.map +1 -0
  179. package/lib/typescript/providers/toast/toast-item-renderer.d.ts +7 -0
  180. package/lib/typescript/providers/toast/toast-item-renderer.d.ts.map +1 -0
  181. package/lib/typescript/providers/toast/types.d.ts +422 -0
  182. package/lib/typescript/providers/toast/types.d.ts.map +1 -0
  183. package/package.json +4 -4
  184. package/src/animation/hooks/index.ts +1 -0
  185. package/src/animation/hooks/useCombinedAnimationDisabledState.ts +46 -0
  186. package/src/animation/index.ts +3 -0
  187. package/src/animation/types.ts +128 -0
  188. package/src/animation/utils.ts +249 -0
  189. package/src/components/CLAUDE.md +1 -1
  190. package/src/components/Card/index.tsx +58 -28
  191. package/src/components/Toast/animation.ts +387 -0
  192. package/src/components/Toast/hooks.ts +92 -0
  193. package/src/components/Toast/index.tsx +520 -0
  194. package/src/components/Toast/styles.ts +186 -0
  195. package/src/components/Toast/types.ts +332 -0
  196. package/src/components/index.ts +1 -0
  197. package/src/index.ts +2 -0
  198. package/src/providers/animation-settings/index.ts +11 -0
  199. package/src/providers/animation-settings/provider.tsx +54 -0
  200. package/src/providers/animation-settings/types.ts +37 -0
  201. package/src/providers/forge-design/index.ts +2 -0
  202. package/src/providers/forge-design/provider.tsx +61 -0
  203. package/src/providers/forge-design/types.ts +84 -0
  204. package/src/providers/text-component/index.ts +2 -0
  205. package/src/providers/text-component/provider.tsx +7 -0
  206. package/src/providers/text-component/types.ts +52 -0
  207. package/src/providers/toast/index.ts +4 -0
  208. package/src/providers/toast/insets-container.tsx +230 -0
  209. package/src/providers/toast/lifecycle.context.tsx +37 -0
  210. package/src/providers/toast/provider.tsx +567 -0
  211. package/src/providers/toast/reducer.ts +40 -0
  212. package/src/providers/toast/toast-config.context.ts +25 -0
  213. package/src/providers/toast/toast-item-renderer.tsx +40 -0
  214. package/src/providers/toast/types.ts +431 -0
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastItemRenderer = void 0;
7
+ var _react = require("react");
8
+ /**
9
+ * Memoized toast item component to prevent unnecessary re-renders
10
+ * Only re-renders when the toast item itself changes
11
+ */
12
+ const ToastItemRenderer = exports.ToastItemRenderer = /*#__PURE__*/(0, _react.memo)(({
13
+ toastItem,
14
+ show,
15
+ hide,
16
+ index,
17
+ total,
18
+ heights,
19
+ maxVisibleToasts
20
+ }) => {
21
+ if (typeof toastItem.component !== 'function') {
22
+ throw new Error('Toast component must be a function that receives ToastComponentProps');
23
+ }
24
+ const content = toastItem.component({
25
+ id: toastItem.id,
26
+ index,
27
+ total,
28
+ heights,
29
+ maxVisibleToasts,
30
+ show,
31
+ hide
32
+ });
33
+ return content;
34
+ }, (prevProps, nextProps) => {
35
+ // Only re-render if the toast ID, component reference, index, or
36
+ // pending-removal flag changed. `pendingRemoval` flips when the
37
+ // provider marks a toast closed on web so the Toast component can
38
+ // play its exit transition — the renderer must propagate that
39
+ // change even though the id and component reference are unchanged.
40
+ // show, hide, total, and heights are stable references.
41
+ return prevProps.toastItem.id === nextProps.toastItem.id && prevProps.toastItem.component === nextProps.toastItem.component && prevProps.toastItem.pendingRemoval === nextProps.toastItem.pendingRemoval && prevProps.index === nextProps.index;
42
+ });
43
+ //# sourceMappingURL=toast-item-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","ToastItemRenderer","exports","memo","toastItem","show","hide","index","total","heights","maxVisibleToasts","component","Error","content","id","prevProps","nextProps","pendingRemoval"],"sourceRoot":"../../../../src","sources":["providers/toast/toast-item-renderer.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,gBAAG,IAAAE,WAAI,EACnC,CAAC;EAAEC,SAAS;EAAEC,IAAI;EAAEC,IAAI;EAAEC,KAAK;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAyC,CAAC,KAAK;EAC9F,IAAI,OAAON,SAAS,CAACO,SAAS,KAAK,UAAU,EAAE;IAC7C,MAAM,IAAIC,KAAK,CAAC,sEAAsE,CAAC;EACzF;EAEA,MAAMC,OAAO,GAAGT,SAAS,CAACO,SAAS,CAAC;IAClCG,EAAE,EAAEV,SAAS,CAACU,EAAE;IAChBP,KAAK;IACLC,KAAK;IACLC,OAAO;IACPC,gBAAgB;IAChBL,IAAI;IACJC;EACF,CAAC,CAAC;EAEF,OAAOO,OAAO;AAChB,CAAC,EACD,CAACE,SAAS,EAAEC,SAAS,KAAK;EACxB;EACA;EACA;EACA;EACA;EACA;EACA,OACED,SAAS,CAACX,SAAS,CAACU,EAAE,KAAKE,SAAS,CAACZ,SAAS,CAACU,EAAE,IACjDC,SAAS,CAACX,SAAS,CAACO,SAAS,KAAKK,SAAS,CAACZ,SAAS,CAACO,SAAS,IAC/DI,SAAS,CAACX,SAAS,CAACa,cAAc,KAAKD,SAAS,CAACZ,SAAS,CAACa,cAAc,IACzEF,SAAS,CAACR,KAAK,KAAKS,SAAS,CAACT,KAAK;AAEvC,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["providers/toast/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export * from './useCombinedAnimationDisabledState';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["animation/hooks/index.ts"],"mappings":";;AAAA,cAAc,qCAAqC","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ import { useGlobalAnimationSettings, useAnimationSettings } from '../../providers/animation-settings';
4
+ import { getCombinedAnimationDisabledState, getRootAnimationState } from '../utils';
5
+
6
+ /**
7
+ * Hook to combine global, parent, and own animation disabled states
8
+ *
9
+ * @description
10
+ * This hook combines three sources of animation disabled state:
11
+ * 1. Global state from GlobalAnimationSettingsProvider
12
+ * 2. Parent state from AnimationSettingsContext (component tree cascading)
13
+ * 3. Own state from the component's animation prop
14
+ *
15
+ * Priority: Global > Parent > Own (global wins if enabled)
16
+ *
17
+ * @param animation - Root animation configuration for the component
18
+ * @returns Combined isAllAnimationsDisabled value
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const isAllAnimationsDisabled = useCombinedAnimationDisabledState(animation);
23
+ * ```
24
+ */
25
+ export function useCombinedAnimationDisabledState(animation) {
26
+ // Get global animation disabled state
27
+ const {
28
+ globalIsAllAnimationsDisabled
29
+ } = useGlobalAnimationSettings();
30
+
31
+ // Read parent animation disabled state from global context
32
+ const parentAnimationSettingsContext = useAnimationSettings();
33
+ const parentIsAllAnimationsDisabled = parentAnimationSettingsContext?.isAllAnimationsDisabled;
34
+
35
+ // Get own animation disabled state
36
+ const {
37
+ isAllAnimationsDisabled: ownIsAllAnimationsDisabled
38
+ } = getRootAnimationState(animation);
39
+
40
+ // Combine global, parent, and own disable-all states (global > parent > own)
41
+ return getCombinedAnimationDisabledState({
42
+ globalIsAllAnimationsDisabled,
43
+ parentIsAllAnimationsDisabled,
44
+ ownIsAllAnimationsDisabled
45
+ });
46
+ }
47
+ //# sourceMappingURL=useCombinedAnimationDisabledState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useGlobalAnimationSettings","useAnimationSettings","getCombinedAnimationDisabledState","getRootAnimationState","useCombinedAnimationDisabledState","animation","globalIsAllAnimationsDisabled","parentAnimationSettingsContext","parentIsAllAnimationsDisabled","isAllAnimationsDisabled","ownIsAllAnimationsDisabled"],"sourceRoot":"../../../../src","sources":["animation/hooks/useCombinedAnimationDisabledState.ts"],"mappings":";;AAAA,SACEA,0BAA0B,EAC1BC,oBAAoB,QACf,oCAAoC;AAE3C,SAASC,iCAAiC,EAAEC,qBAAqB,QAAQ,UAAU;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iCAAiCA,CAC/CC,SAA6C,EACpC;EACT;EACA,MAAM;IAAEC;EAA8B,CAAC,GAAGN,0BAA0B,CAAC,CAAC;;EAEtE;EACA,MAAMO,8BAA8B,GAAGN,oBAAoB,CAAC,CAAC;EAC7D,MAAMO,6BAA6B,GAAGD,8BAA8B,EAAEE,uBAAuB;;EAE7F;EACA,MAAM;IAAEA,uBAAuB,EAAEC;EAA2B,CAAC,GAAGP,qBAAqB,CAACE,SAAS,CAAC;;EAEhG;EACA,OAAOH,iCAAiC,CAAC;IACvCI,6BAA6B;IAC7BE,6BAA6B;IAC7BE;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export * from './types';
4
+ export * from './hooks';
5
+ export * from './utils';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["animation/index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["animation/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Check if the entire animation is disabled
5
+ * @param animation - Animation configuration
6
+ * @returns true if animation is disabled
7
+ */
8
+ export function isAnimationDisabled(animation) {
9
+ // Check top-level disabled values
10
+ if (animation === false || animation === 'disabled') {
11
+ return true;
12
+ }
13
+
14
+ // Check state property in config objects
15
+ if (typeof animation === 'object' && animation !== null && 'state' in animation) {
16
+ const state = animation.state;
17
+ return state === false || state === 'disabled';
18
+ }
19
+ return false;
20
+ }
21
+
22
+ /**
23
+ * Check if root animation should cascade disable to all children
24
+ * @param animation - Root animation configuration
25
+ * @returns true if all animations should be disabled (including children)
26
+ */
27
+ export function shouldDisableAll(animation) {
28
+ // Check top-level disable-all value
29
+ if (animation === 'disable-all') {
30
+ return true;
31
+ }
32
+
33
+ // Check state property in config objects
34
+ if (typeof animation === 'object' && animation !== null && 'state' in animation) {
35
+ const state = animation.state;
36
+ return state === 'disable-all';
37
+ }
38
+ return false;
39
+ }
40
+
41
+ /**
42
+ * Get animation state including config and disabled status
43
+ * @param animation - Animation configuration
44
+ * @returns Object with animationConfig and isAnimationDisabled
45
+ */
46
+ export function getAnimationState(animation) {
47
+ const isDisabled = isAnimationDisabled(animation);
48
+ // Always extract config when it's an object, regardless of disabled state
49
+ // This allows users to customize colors/properties even when animations are disabled
50
+ const config = typeof animation === 'object' && animation !== null ? animation : undefined;
51
+ return {
52
+ animationConfig: config,
53
+ isAnimationDisabled: isDisabled
54
+ };
55
+ }
56
+
57
+ /**
58
+ * Get root animation state including config, disabled status, and cascade flag
59
+ * @param animation - Root animation configuration
60
+ * @returns Object with animationConfig, isAnimationDisabled, and isAllAnimationsDisabled
61
+ */
62
+ export function getRootAnimationState(animation) {
63
+ const shouldCascade = shouldDisableAll(animation);
64
+ const isDisabled = isAnimationDisabled(animation) || shouldCascade;
65
+ // Always extract config when it's an object, regardless of disabled state
66
+ // This allows users to customize colors/properties even when animations are disabled
67
+ const config = typeof animation === 'object' && animation !== null ? animation : undefined;
68
+ return {
69
+ animationConfig: config,
70
+ isAnimationDisabled: isDisabled,
71
+ isAllAnimationsDisabled: shouldCascade
72
+ };
73
+ }
74
+
75
+ /**
76
+ * Get animation value property or return default
77
+ * Extracts a property from the animation value config object
78
+ *
79
+ * @param options - Object containing animationValue, property, and defaultValue
80
+ * @param options.animationValue - The animation value configuration
81
+ * @param options.property - Property name to extract
82
+ * @param options.defaultValue - Default value if property is not found
83
+ * @returns The property value or default (never undefined)
84
+ *
85
+ * @example
86
+ * const scaleValue = getAnimationValueProperty({
87
+ * animationValue: animation?.scale,
88
+ * property: 'value',
89
+ * defaultValue: 0.95
90
+ * });
91
+ */
92
+ export function getAnimationValueProperty(options) {
93
+ // If animation value is undefined, return default
94
+ if (options.animationValue === undefined) {
95
+ return options.defaultValue;
96
+ }
97
+
98
+ // Return the property value if it exists, otherwise return default
99
+ return options.animationValue[options.property] ?? options.defaultValue;
100
+ }
101
+
102
+ /**
103
+ * Get animation value merged config or return default
104
+ * Merges the animation value config with defaults, useful when you need multiple properties
105
+ *
106
+ * @param options - Object containing animationValue, property, and defaultValue
107
+ * @param options.animationValue - The animation value configuration
108
+ * @param options.property - Property name to extract from the config
109
+ * @param options.defaultValue - Default configuration object
110
+ * @returns The merged config object or default
111
+ *
112
+ * @example
113
+ * const scaleConfig = getAnimationValueMergedConfig({
114
+ * animationValue: animation?.scale,
115
+ * property: 'timingConfig',
116
+ * defaultValue: { duration: 150 }
117
+ * });
118
+ */
119
+ export function getAnimationValueMergedConfig(options) {
120
+ // If animation value is undefined, return default
121
+ if (options.animationValue === undefined) {
122
+ return options.defaultValue;
123
+ }
124
+ const value = options.animationValue[options.property];
125
+
126
+ // If the specific property value is undefined or not an object, return default
127
+ if (value === undefined || typeof value !== 'object') {
128
+ return options.defaultValue;
129
+ }
130
+
131
+ // Merge with defaults to ensure all properties exist
132
+ return {
133
+ ...options.defaultValue,
134
+ ...value
135
+ };
136
+ }
137
+
138
+ /**
139
+ * Determine if animations should be disabled based on disabled flags
140
+ * Priority: isAllAnimationsDisabled > isAnimationDisabled
141
+ *
142
+ * @param options - Object containing isAnimationDisabled and isAllAnimationsDisabled
143
+ * @param options.isAnimationDisabled - Whether animation is explicitly disabled
144
+ * @param options.isAllAnimationsDisabled - Whether all animations should be disabled (cascading from root/global)
145
+ * @returns true if animations should be disabled, false otherwise
146
+ *
147
+ * @example
148
+ * const isDisabled = getIsAnimationDisabledValue({
149
+ * isAnimationDisabled: false,
150
+ * isAllAnimationsDisabled: true
151
+ * });
152
+ * // Returns: true (all animations disabled takes priority)
153
+ */
154
+ export function getIsAnimationDisabledValue(options) {
155
+ const {
156
+ isAnimationDisabled: isDisabled,
157
+ isAllAnimationsDisabled
158
+ } = options;
159
+
160
+ // First priority: if all animations are disabled, return true
161
+ if (isAllAnimationsDisabled === true) {
162
+ return true;
163
+ }
164
+
165
+ // Second priority: if this animation is disabled, return true
166
+ if (isDisabled) {
167
+ return true;
168
+ }
169
+
170
+ // Default: animations are enabled
171
+ return false;
172
+ }
173
+
174
+ /**
175
+ * Combine global, parent, and own animation disabled states
176
+ * Priority: Global > Parent > Own (global wins if enabled)
177
+ *
178
+ * @param options - Object containing globalIsAllAnimationsDisabled, parentIsAllAnimationsDisabled, and ownIsAllAnimationsDisabled
179
+ * @param options.globalIsAllAnimationsDisabled - Whether global provider has disable-all (from GlobalAnimationSettingsProvider)
180
+ * @param options.parentIsAllAnimationsDisabled - Whether parent context has disable-all (from AnimationSettingsContext)
181
+ * @param options.ownIsAllAnimationsDisabled - Whether own animation prop has disable-all
182
+ * @returns Combined isAllAnimationsDisabled value (global || parent || own)
183
+ *
184
+ * @example
185
+ * const combined = getCombinedAnimationDisabledState({
186
+ * globalIsAllAnimationsDisabled: true,
187
+ * parentIsAllAnimationsDisabled: false,
188
+ * ownIsAllAnimationsDisabled: false
189
+ * });
190
+ * // Returns: true (global wins)
191
+ */
192
+ export function getCombinedAnimationDisabledState(options) {
193
+ const {
194
+ globalIsAllAnimationsDisabled,
195
+ parentIsAllAnimationsDisabled,
196
+ ownIsAllAnimationsDisabled
197
+ } = options;
198
+
199
+ // Global always wins if it has disable-all
200
+ if (globalIsAllAnimationsDisabled === true) {
201
+ return true;
202
+ }
203
+
204
+ // Parent wins if it has disable-all
205
+ if (parentIsAllAnimationsDisabled === true) {
206
+ return true;
207
+ }
208
+
209
+ // Otherwise use own value
210
+ return ownIsAllAnimationsDisabled;
211
+ }
212
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isAnimationDisabled","animation","state","shouldDisableAll","getAnimationState","isDisabled","config","undefined","animationConfig","getRootAnimationState","shouldCascade","isAllAnimationsDisabled","getAnimationValueProperty","options","animationValue","defaultValue","property","getAnimationValueMergedConfig","value","getIsAnimationDisabledValue","getCombinedAnimationDisabledState","globalIsAllAnimationsDisabled","parentIsAllAnimationsDisabled","ownIsAllAnimationsDisabled"],"sourceRoot":"../../../src","sources":["animation/utils.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mBAAmBA,CACjCC,SAAkE,EACzD;EACT;EACA,IAAIA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,UAAU,EAAE;IACnD,OAAO,IAAI;EACb;;EAEA;EACA,IAAI,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,KAAK,IAAI,IAAI,OAAO,IAAIA,SAAS,EAAE;IAC/E,MAAMC,KAAK,GAAGD,SAAS,CAACC,KAAK;IAC7B,OAAOA,KAAK,KAAK,KAAK,IAAIA,KAAK,KAAK,UAAU;EAChD;EAEA,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BF,SAA6C,EACpC;EACT;EACA,IAAIA,SAAS,KAAK,aAAa,EAAE;IAC/B,OAAO,IAAI;EACb;;EAE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;EACA,OAAOC,0BAA0B;AACnC","ignoreList":[]}
@@ -120,7 +120,7 @@ Where: **styled layer.** Pure styling hint with no behavior or a11y semantics
120
120
  Each component follows this structure (see `Button/index.tsx`):
121
121
 
122
122
  1. **Imports** — RN base components, primitive `Root` and `Slot` from `@cdx-ui/primitives`, `cn` + style context from `@cdx-ui/utils`, variant functions from `./styles`
123
- 2. **Scope constant** — `const SCOPE = 'COMPONENT_NAME'` for `withStyleContext` / `useStyleContext` (or a `ParentContext.Provider` wrapper for static variant context)
123
+ 2. **Scope constant** — `const SCOPE = 'COMPONENT_NAME'` for `useStyleContext` with a `ParentContext.Provider` wrapper for static variant context
124
124
  3. **Root component** — renders the primitive Root (or a host element directly when no primitive exists), spreads `dataAttributes({ slot: '<component>' })`
125
125
  4. **Sub-slots** — each accepts `asChild`, renders a host element via `const Comp = asChild ? Slot : DefaultElement`, spreads `dataAttributes({ slot: '<component>-<slot>' })`. Sub-slots **do not** call `useButtonContext()` (or its equivalent) unless their own styling reacts to interaction state.
126
126
  5. **Position-aware sub-slots** — icon/spinner-style slots accept `position?: 'leading' | 'trailing'` and emit `data-icon` via `dataAttributes({ icon: '...' })`.
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
 
3
- import { forwardRef } from 'react';
3
+ import { forwardRef, useMemo } from 'react';
4
4
  import { View } from 'react-native';
5
- import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
5
+ import { Slot, dataAttributes, mergeDataAttributes } from '@cdx-ui/primitives';
6
+ import { cn, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
6
7
  import { cardContentVariants, cardFooterVariants, cardHeaderVariants, cardRootVariants } from './styles';
7
8
 
8
9
  // =============================================================================
@@ -10,25 +11,36 @@ import { cardContentVariants, cardFooterVariants, cardHeaderVariants, cardRootVa
10
11
  // =============================================================================
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  const SCOPE = 'CARD';
13
- const Root = withStyleContext(View, SCOPE);
14
14
  const useCardStyleContext = () => useStyleContext(SCOPE);
15
15
  const CardRoot = /*#__PURE__*/forwardRef(({
16
+ asChild,
16
17
  className,
17
18
  children,
18
19
  style,
19
20
  fullBleed,
20
21
  ...props
21
22
  }, ref) => {
22
- const computedClassName = cn(cardRootVariants(), className);
23
- return /*#__PURE__*/_jsx(Root, {
24
- ref: ref,
25
- className: computedClassName,
26
- style: style,
27
- context: {
23
+ const parent = useParentContext();
24
+ const ctx = useMemo(() => ({
25
+ ...parent,
26
+ [SCOPE]: {
28
27
  fullBleed
29
- },
30
- ...props,
31
- children: children
28
+ }
29
+ }), [parent, fullBleed]);
30
+ const computedClassName = cn(cardRootVariants(), className);
31
+ const Comp = asChild ? Slot : View;
32
+ return /*#__PURE__*/_jsx(ParentContext.Provider, {
33
+ value: ctx,
34
+ children: /*#__PURE__*/_jsx(Comp, {
35
+ ref: ref,
36
+ className: computedClassName,
37
+ style: style,
38
+ ...props,
39
+ ...mergeDataAttributes(props, dataAttributes({
40
+ slot: 'card'
41
+ })),
42
+ children: children
43
+ })
32
44
  });
33
45
  });
34
46
  CardRoot.displayName = 'Card';
@@ -38,17 +50,22 @@ CardRoot.displayName = 'Card';
38
50
  // =============================================================================
39
51
 
40
52
  const CardHeader = /*#__PURE__*/forwardRef(({
53
+ asChild,
41
54
  className,
42
55
  children,
43
56
  style,
44
57
  ...props
45
58
  }, ref) => {
46
59
  const computedClassName = cn(cardHeaderVariants(), className);
47
- return /*#__PURE__*/_jsx(View, {
60
+ const Comp = asChild ? Slot : View;
61
+ return /*#__PURE__*/_jsx(Comp, {
48
62
  ref: ref,
49
63
  className: computedClassName,
50
64
  style: style,
51
65
  ...props,
66
+ ...mergeDataAttributes(props, dataAttributes({
67
+ slot: 'card-header'
68
+ })),
52
69
  children: children
53
70
  });
54
71
  });
@@ -59,6 +76,7 @@ CardHeader.displayName = 'Card.Header';
59
76
  // =============================================================================
60
77
 
61
78
  const CardContent = /*#__PURE__*/forwardRef(({
79
+ asChild,
62
80
  className,
63
81
  children,
64
82
  style,
@@ -71,11 +89,15 @@ const CardContent = /*#__PURE__*/forwardRef(({
71
89
  const computedClassName = cn(cardContentVariants({
72
90
  fullBleed: fullBleed ?? fullBleedFromContext
73
91
  }), className);
74
- return /*#__PURE__*/_jsx(View, {
92
+ const Comp = asChild ? Slot : View;
93
+ return /*#__PURE__*/_jsx(Comp, {
75
94
  ref: ref,
76
95
  className: computedClassName,
77
96
  style: style,
78
97
  ...props,
98
+ ...mergeDataAttributes(props, dataAttributes({
99
+ slot: 'card-content'
100
+ })),
79
101
  children: children
80
102
  });
81
103
  });
@@ -86,6 +108,7 @@ CardContent.displayName = 'Card.Content';
86
108
  // =============================================================================
87
109
 
88
110
  const CardFooter = /*#__PURE__*/forwardRef(({
111
+ asChild,
89
112
  className,
90
113
  children,
91
114
  style,
@@ -98,11 +121,15 @@ const CardFooter = /*#__PURE__*/forwardRef(({
98
121
  const computedClassName = cn(cardFooterVariants({
99
122
  fullBleed: fullBleed ?? fullBleedFromContext
100
123
  }), className);
101
- return /*#__PURE__*/_jsx(View, {
124
+ const Comp = asChild ? Slot : View;
125
+ return /*#__PURE__*/_jsx(Comp, {
102
126
  ref: ref,
103
127
  className: computedClassName,
104
128
  style: style,
105
129
  ...props,
130
+ ...mergeDataAttributes(props, dataAttributes({
131
+ slot: 'card-footer'
132
+ })),
106
133
  children: children
107
134
  });
108
135
  });
@@ -112,8 +139,9 @@ CardFooter.displayName = 'Card.Footer';
112
139
  // COMPOUND COMPONENT
113
140
  // =============================================================================
114
141
 
115
- export const Card = CardRoot;
116
- Card.Header = CardHeader;
117
- Card.Content = CardContent;
118
- Card.Footer = CardFooter;
142
+ export const Card = Object.assign(CardRoot, {
143
+ Header: CardHeader,
144
+ Content: CardContent,
145
+ Footer: CardFooter
146
+ });
119
147
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","View","cn","useStyleContext","withStyleContext","cardContentVariants","cardFooterVariants","cardHeaderVariants","cardRootVariants","jsx","_jsx","SCOPE","Root","useCardStyleContext","CardRoot","className","children","style","fullBleed","props","ref","computedClassName","context","displayName","CardHeader","CardContent","fullBleedFromContext","CardFooter","Card","Header","Content","Footer"],"sourceRoot":"../../../../src","sources":["components/Card/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,QAIX,UAAU;;AAEjB;AACA;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEA,MAAMC,KAAK,GAAG,MAAM;AAEpB,MAAMC,IAAI,GAAGR,gBAAgB,CAACH,IAAI,EAAEU,KAAK,CAAC;AAE1C,MAAME,mBAAmB,GAAGA,CAAA,KAAMV,eAAe,CAACQ,KAAK,CAAqB;AAO5E,MAAMG,QAAQ,gBAAGd,UAAU,CACzB,CAAC;EAAEe,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC5D,MAAMC,iBAAiB,GAAGnB,EAAE,CAACM,gBAAgB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE3D,oBACEL,IAAA,CAACE,IAAI;IACHQ,GAAG,EAAEA,GAAI;IACTL,SAAS,EAAEM,iBAAkB;IAC7BJ,KAAK,EAAEA,KAAM;IACbK,OAAO,EAAE;MAAEJ;IAAU,CAAE;IAAA,GACnBC,KAAK;IAAAH,QAAA,EAERA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDF,QAAQ,CAACS,WAAW,GAAG,MAAM;;AAE7B;AACA;AACA;;AAOA,MAAMC,UAAU,gBAAGxB,UAAU,CAC3B,CAAC;EAAEe,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGE;AAAM,CAAC,EAAEC,GAAG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,SAAS,IAAIQ;EAAqB,CAAC,CAAC,EACpEX,SACF,CAAC;EAED,oBACEL,IAAA,CAACT,IAAI;IAACmB,GAAG,EAAEA,GAAI;IAACL,SAAS,EAAEM,iBAAkB;IAACJ,KAAK,EAAEA,KAAM;IAAA,GAAKE,KAAK;IAAAH,QAAA,EAClEA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDW,UAAU,CAACJ,WAAW,GAAG,aAAa;;AAEtC;AACA;AACA;;AAQA,OAAO,MAAMK,IAAI,GAAGd,QAAiC;AAErDc,IAAI,CAACC,MAAM,GAAGL,UAAU;AACxBI,IAAI,CAACE,OAAO,GAAGL,WAAW;AAC1BG,IAAI,CAACG,MAAM,GAAGJ,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","useMemo","View","Slot","dataAttributes","mergeDataAttributes","cn","ParentContext","useParentContext","useStyleContext","cardContentVariants","cardFooterVariants","cardHeaderVariants","cardRootVariants","jsx","_jsx","SCOPE","useCardStyleContext","CardRoot","asChild","className","children","style","fullBleed","props","ref","parent","ctx","computedClassName","Comp","Provider","value","slot","displayName","CardHeader","CardContent","fullBleedFromContext","CardFooter","Card","Object","assign","Header","Content","Footer"],"sourceRoot":"../../../../src","sources":["components/Card/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,OAAO,QAAwB,OAAO;AAC3D,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,IAAI,EAAEC,cAAc,EAAEC,mBAAmB,QAAQ,oBAAoB;AAC9E,SAASC,EAAE,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,eAAe,QAAQ,eAAe;AACpF,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,QAIX,UAAU;;AAEjB;AACA;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEA,MAAMC,KAAK,GAAG,MAAM;AAEpB,MAAMC,mBAAmB,GAAGA,CAAA,KAAMR,eAAe,CAACO,KAAK,CAA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