@seed-design/lynx-react 0.7.1 → 0.8.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 (241) hide show
  1. package/lib/components/Accordion/Accordion.jsx +2 -2
  2. package/lib/components/ActionButton/ActionButton.jsx +1 -1
  3. package/lib/components/AlertDialog/AlertDialog.d.ts +64 -0
  4. package/lib/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  5. package/lib/components/AlertDialog/AlertDialog.jsx +138 -0
  6. package/lib/components/AlertDialog/AlertDialog.namespace.d.ts +2 -0
  7. package/lib/components/AlertDialog/AlertDialog.namespace.d.ts.map +1 -0
  8. package/lib/components/AlertDialog/AlertDialog.namespace.js +17 -0
  9. package/lib/components/AlertDialog/index.d.ts +3 -0
  10. package/lib/components/AlertDialog/index.d.ts.map +1 -0
  11. package/lib/components/AppBar/AppBar.d.ts +14 -1
  12. package/lib/components/AppBar/AppBar.d.ts.map +1 -1
  13. package/lib/components/AppBar/AppBar.jsx +39 -8
  14. package/lib/components/AppBar/AppBar.namespace.d.ts +1 -1
  15. package/lib/components/AppBar/AppBar.namespace.d.ts.map +1 -1
  16. package/lib/components/AppBar/index.d.ts +1 -1
  17. package/lib/components/AppBar/index.d.ts.map +1 -1
  18. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +182 -0
  19. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
  20. package/lib/components/AttachmentDisplay/AttachmentDisplay.jsx +444 -0
  21. package/lib/components/AttachmentDisplay/index.d.ts +2 -0
  22. package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
  23. package/lib/components/AttachmentInput/AttachmentInput.d.ts +179 -0
  24. package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
  25. package/lib/components/AttachmentInput/AttachmentInput.jsx +520 -0
  26. package/lib/components/AttachmentInput/index.d.ts +2 -0
  27. package/lib/components/AttachmentInput/index.d.ts.map +1 -0
  28. package/lib/components/BottomSheet/BottomSheet.d.ts +1 -1
  29. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  30. package/lib/components/BottomSheet/BottomSheet.jsx +1 -7
  31. package/lib/components/Callout/Callout.jsx +2 -2
  32. package/lib/components/Checkbox/Checkbox.jsx +2 -2
  33. package/lib/components/Chip/Chip.jsx +2 -2
  34. package/lib/components/ChipTabs/ChipTabs.d.ts +41 -0
  35. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -0
  36. package/lib/components/ChipTabs/ChipTabs.jsx +39 -0
  37. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +2 -0
  38. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts.map +1 -0
  39. package/lib/components/ChipTabs/ChipTabs.namespace.js +13 -0
  40. package/lib/components/ChipTabs/index.d.ts +3 -0
  41. package/lib/components/ChipTabs/index.d.ts.map +1 -0
  42. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts +18 -0
  43. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts.map +1 -0
  44. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.jsx +113 -0
  45. package/lib/components/ContextualFloatingButton/index.d.ts +2 -0
  46. package/lib/components/ContextualFloatingButton/index.d.ts.map +1 -0
  47. package/lib/components/Dialog/Dialog.d.ts +87 -0
  48. package/lib/components/Dialog/Dialog.d.ts.map +1 -0
  49. package/lib/components/Dialog/Dialog.jsx +147 -0
  50. package/lib/components/Dialog/Dialog.namespace.d.ts +2 -0
  51. package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -0
  52. package/lib/components/Dialog/Dialog.namespace.js +18 -0
  53. package/lib/components/Dialog/index.d.ts +3 -0
  54. package/lib/components/Dialog/index.d.ts.map +1 -0
  55. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts +23 -0
  56. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts.map +1 -0
  57. package/lib/components/FloatingActionButton/FloatingActionButton.jsx +76 -0
  58. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts +2 -0
  59. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts.map +1 -0
  60. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.js +10 -0
  61. package/lib/components/FloatingActionButton/index.d.ts +3 -0
  62. package/lib/components/FloatingActionButton/index.d.ts.map +1 -0
  63. package/lib/components/HelpBubble/HelpBubble.d.ts +67 -0
  64. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -0
  65. package/lib/components/HelpBubble/HelpBubble.jsx +600 -0
  66. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +2 -0
  67. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -0
  68. package/lib/components/HelpBubble/HelpBubble.namespace.js +18 -0
  69. package/lib/components/HelpBubble/index.d.ts +3 -0
  70. package/lib/components/HelpBubble/index.d.ts.map +1 -0
  71. package/lib/components/Icon/Icon.d.ts +1 -0
  72. package/lib/components/Icon/Icon.d.ts.map +1 -1
  73. package/lib/components/Icon/Icon.jsx +2 -1
  74. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts +28 -0
  75. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts.map +1 -0
  76. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.jsx +37 -0
  77. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts +2 -0
  78. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts.map +1 -0
  79. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.js +9 -0
  80. package/lib/components/IdentityPlaceholder/identity-placeholder-business.js +4 -0
  81. package/lib/components/IdentityPlaceholder/identity-placeholder-person.js +4 -0
  82. package/lib/components/IdentityPlaceholder/index.d.ts +3 -0
  83. package/lib/components/IdentityPlaceholder/index.d.ts.map +1 -0
  84. package/lib/components/InputButton/InputButton.d.ts +2 -0
  85. package/lib/components/InputButton/InputButton.d.ts.map +1 -1
  86. package/lib/components/InputButton/InputButton.jsx +40 -8
  87. package/lib/components/List/List.d.ts +1 -1
  88. package/lib/components/List/List.d.ts.map +1 -1
  89. package/lib/components/List/List.jsx +26 -12
  90. package/lib/components/Menu/Menu.d.ts.map +1 -1
  91. package/lib/components/Menu/Menu.jsx +15 -5
  92. package/lib/components/PageBanner/PageBanner.d.ts +3 -0
  93. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
  94. package/lib/components/PageBanner/PageBanner.jsx +49 -11
  95. package/lib/components/QuantityPicker/QuantityPicker.d.ts +53 -0
  96. package/lib/components/QuantityPicker/QuantityPicker.d.ts.map +1 -0
  97. package/lib/components/QuantityPicker/QuantityPicker.jsx +282 -0
  98. package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts +2 -0
  99. package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts.map +1 -0
  100. package/lib/components/QuantityPicker/QuantityPicker.namespace.js +11 -0
  101. package/lib/components/QuantityPicker/index.d.ts +3 -0
  102. package/lib/components/QuantityPicker/index.d.ts.map +1 -0
  103. package/lib/components/RadioGroup/RadioGroup.jsx +2 -2
  104. package/lib/components/ReactionButton/ReactionButton.d.ts +1 -1
  105. package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -1
  106. package/lib/components/ReactionButton/ReactionButton.jsx +22 -13
  107. package/lib/components/ScrollFog/ScrollFog.d.ts +41 -0
  108. package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -0
  109. package/lib/components/ScrollFog/ScrollFog.jsx +65 -0
  110. package/lib/components/ScrollFog/index.d.ts +2 -0
  111. package/lib/components/ScrollFog/index.d.ts.map +1 -0
  112. package/lib/components/SegmentedControl/SegmentedControl.jsx +2 -2
  113. package/lib/components/Select/Select.d.ts +112 -0
  114. package/lib/components/Select/Select.d.ts.map +1 -0
  115. package/lib/components/Select/Select.jsx +885 -0
  116. package/lib/components/Select/Select.namespace.d.ts +2 -0
  117. package/lib/components/Select/Select.namespace.d.ts.map +1 -0
  118. package/lib/components/Select/Select.namespace.js +23 -0
  119. package/lib/components/Select/index.d.ts +3 -0
  120. package/lib/components/Select/index.d.ts.map +1 -0
  121. package/lib/components/Skeleton/Skeleton.d.ts +15 -0
  122. package/lib/components/Skeleton/Skeleton.d.ts.map +1 -0
  123. package/lib/components/Skeleton/Skeleton.jsx +18 -0
  124. package/lib/components/Skeleton/index.d.ts +2 -0
  125. package/lib/components/Skeleton/index.d.ts.map +1 -0
  126. package/lib/components/Slider/Slider.d.ts +101 -0
  127. package/lib/components/Slider/Slider.d.ts.map +1 -0
  128. package/lib/components/Slider/Slider.jsx +573 -0
  129. package/lib/components/Slider/Slider.namespace.d.ts +2 -0
  130. package/lib/components/Slider/Slider.namespace.d.ts.map +1 -0
  131. package/lib/components/Slider/Slider.namespace.js +19 -0
  132. package/lib/components/Slider/Slider.utils.d.ts +19 -0
  133. package/lib/components/Slider/Slider.utils.d.ts.map +1 -0
  134. package/lib/components/Slider/Slider.utils.js +106 -0
  135. package/lib/components/Slider/index.d.ts +3 -0
  136. package/lib/components/Slider/index.d.ts.map +1 -0
  137. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -1
  138. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.jsx +22 -8
  139. package/lib/components/Switch/Switch.d.ts.map +1 -1
  140. package/lib/components/Switch/Switch.jsx +5 -3
  141. package/lib/components/Tabs/Tabs.d.ts +34 -2
  142. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  143. package/lib/components/Tabs/Tabs.jsx +186 -56
  144. package/lib/components/Tabs/Tabs.utils.d.ts +14 -1
  145. package/lib/components/Tabs/Tabs.utils.d.ts.map +1 -1
  146. package/lib/components/Tabs/Tabs.utils.js +24 -3
  147. package/lib/components/Tabs/index.d.ts +1 -1
  148. package/lib/components/Tabs/index.d.ts.map +1 -1
  149. package/lib/components/index.d.ts +14 -0
  150. package/lib/components/index.d.ts.map +1 -1
  151. package/lib/hooks/useControllableState.d.ts +1 -14
  152. package/lib/hooks/useControllableState.d.ts.map +1 -1
  153. package/lib/hooks/usePressTap.d.ts +1 -27
  154. package/lib/hooks/usePressTap.d.ts.map +1 -1
  155. package/lib/index.js +29 -6
  156. package/lib/{hooks/useControllableState.js → packages/lynx-react-headless/use-controllable-state/lib/index.js} +2 -3
  157. package/lib/{hooks/usePressTap.js → packages/lynx-react-headless/use-press-tap/lib/index.js} +13 -10
  158. package/lib/types.d.ts +1 -0
  159. package/lib/types.d.ts.map +1 -1
  160. package/package.json +9 -5
  161. package/src/components/AlertDialog/AlertDialog.namespace.ts +22 -0
  162. package/src/components/AlertDialog/AlertDialog.test.tsx +226 -0
  163. package/src/components/AlertDialog/AlertDialog.tsx +374 -0
  164. package/src/components/AlertDialog/index.ts +24 -0
  165. package/src/components/AppBar/AppBar.namespace.ts +1 -0
  166. package/src/components/AppBar/AppBar.test.tsx +231 -0
  167. package/src/components/AppBar/AppBar.tsx +105 -13
  168. package/src/components/AppBar/index.ts +1 -0
  169. package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +886 -0
  170. package/src/components/AttachmentDisplay/index.ts +48 -0
  171. package/src/components/AttachmentInput/AttachmentInput.tsx +1001 -0
  172. package/src/components/AttachmentInput/index.ts +49 -0
  173. package/src/components/BottomSheet/BottomSheet.test.tsx +22 -7
  174. package/src/components/BottomSheet/BottomSheet.tsx +1 -19
  175. package/src/components/ChipTabs/ChipTabs.namespace.ts +14 -0
  176. package/src/components/ChipTabs/ChipTabs.tsx +119 -0
  177. package/src/components/ChipTabs/index.ts +16 -0
  178. package/src/components/ContextualFloatingButton/ContextualFloatingButton.test.tsx +63 -0
  179. package/src/components/ContextualFloatingButton/ContextualFloatingButton.tsx +232 -0
  180. package/src/components/ContextualFloatingButton/index.ts +4 -0
  181. package/src/components/Dialog/Dialog.namespace.ts +24 -0
  182. package/src/components/Dialog/Dialog.test.tsx +172 -0
  183. package/src/components/Dialog/Dialog.tsx +373 -0
  184. package/src/components/Dialog/index.ts +26 -0
  185. package/src/components/FloatingActionButton/FloatingActionButton.namespace.ts +8 -0
  186. package/src/components/FloatingActionButton/FloatingActionButton.test.tsx +59 -0
  187. package/src/components/FloatingActionButton/FloatingActionButton.tsx +207 -0
  188. package/src/components/FloatingActionButton/index.ts +10 -0
  189. package/src/components/HelpBubble/HelpBubble.namespace.ts +24 -0
  190. package/src/components/HelpBubble/HelpBubble.tsx +998 -0
  191. package/src/components/HelpBubble/index.ts +26 -0
  192. package/src/components/Icon/Icon.test.tsx +0 -3
  193. package/src/components/Icon/Icon.tsx +11 -1
  194. package/src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts +6 -0
  195. package/src/components/IdentityPlaceholder/IdentityPlaceholder.tsx +103 -0
  196. package/src/components/IdentityPlaceholder/assets.d.ts +4 -0
  197. package/src/components/IdentityPlaceholder/identity-placeholder-business.webp +0 -0
  198. package/src/components/IdentityPlaceholder/identity-placeholder-person.webp +0 -0
  199. package/src/components/IdentityPlaceholder/index.ts +8 -0
  200. package/src/components/InputButton/InputButton.test.tsx +128 -1
  201. package/src/components/InputButton/InputButton.tsx +60 -9
  202. package/src/components/List/List.test.tsx +54 -2
  203. package/src/components/List/List.tsx +43 -10
  204. package/src/components/Menu/Menu.tsx +14 -4
  205. package/src/components/Menu/__tests__/Menu.test.tsx +34 -0
  206. package/src/components/PageBanner/PageBanner.test.tsx +110 -3
  207. package/src/components/PageBanner/PageBanner.tsx +83 -19
  208. package/src/components/QuantityPicker/QuantityPicker.namespace.ts +10 -0
  209. package/src/components/QuantityPicker/QuantityPicker.test.tsx +235 -0
  210. package/src/components/QuantityPicker/QuantityPicker.tsx +605 -0
  211. package/src/components/QuantityPicker/index.ts +14 -0
  212. package/src/components/ReactionButton/ReactionButton.feedback.test.tsx +50 -0
  213. package/src/components/ReactionButton/ReactionButton.test.tsx +5 -3
  214. package/src/components/ReactionButton/ReactionButton.tsx +20 -12
  215. package/src/components/ScrollFog/ScrollFog.test.tsx +222 -0
  216. package/src/components/ScrollFog/ScrollFog.tsx +172 -0
  217. package/src/components/ScrollFog/index.ts +1 -0
  218. package/src/components/Select/Select.namespace.ts +34 -0
  219. package/src/components/Select/Select.test.tsx +297 -0
  220. package/src/components/Select/Select.tsx +1483 -0
  221. package/src/components/Select/index.ts +39 -0
  222. package/src/components/Skeleton/Skeleton.test.tsx +64 -0
  223. package/src/components/Skeleton/Skeleton.tsx +45 -0
  224. package/src/components/Skeleton/index.ts +1 -0
  225. package/src/components/Slider/Slider.namespace.ts +26 -0
  226. package/src/components/Slider/Slider.test.tsx +260 -0
  227. package/src/components/Slider/Slider.tsx +897 -0
  228. package/src/components/Slider/Slider.utils.ts +167 -0
  229. package/src/components/Slider/index.ts +30 -0
  230. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.test.tsx +21 -1
  231. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +30 -7
  232. package/src/components/Switch/Switch.tsx +14 -13
  233. package/src/components/Tabs/Tabs.test.tsx +218 -1
  234. package/src/components/Tabs/Tabs.tsx +346 -75
  235. package/src/components/Tabs/Tabs.utils.ts +51 -1
  236. package/src/components/Tabs/index.ts +17 -1
  237. package/src/components/index.ts +14 -0
  238. package/src/hooks/useControllableState.ts +1 -43
  239. package/src/hooks/usePressTap.test.ts +23 -11
  240. package/src/hooks/usePressTap.ts +1 -60
  241. package/src/types.ts +1 -0
@@ -0,0 +1,18 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { HelpBubbleAnchor, HelpBubbleArrow, HelpBubbleArrowTip, HelpBubbleBody, HelpBubbleCloseButton, HelpBubbleContent, HelpBubbleDescription, HelpBubblePositioner, HelpBubbleRoot, HelpBubbleTitle, HelpBubbleTrigger } from "./HelpBubble.jsx";
3
+ //#region src/components/HelpBubble/HelpBubble.namespace.ts
4
+ var HelpBubble_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Anchor: () => HelpBubbleAnchor,
6
+ Arrow: () => HelpBubbleArrow,
7
+ ArrowTip: () => HelpBubbleArrowTip,
8
+ Body: () => HelpBubbleBody,
9
+ CloseButton: () => HelpBubbleCloseButton,
10
+ Content: () => HelpBubbleContent,
11
+ Description: () => HelpBubbleDescription,
12
+ Positioner: () => HelpBubblePositioner,
13
+ Root: () => HelpBubbleRoot,
14
+ Title: () => HelpBubbleTitle,
15
+ Trigger: () => HelpBubbleTrigger
16
+ });
17
+ //#endregion
18
+ export { HelpBubble_namespace_exports };
@@ -0,0 +1,3 @@
1
+ export { HelpBubbleAnchor, HelpBubbleArrow, HelpBubbleArrowTip, HelpBubbleBody, HelpBubbleCloseButton, HelpBubbleContent, HelpBubbleDescription, HelpBubblePositioner, HelpBubbleRoot, HelpBubbleTitle, HelpBubbleTrigger, type HelpBubbleAnchorProps, type HelpBubbleArrowProps, type HelpBubbleArrowTipProps, type HelpBubbleBodyProps, type HelpBubbleCloseButtonProps, type HelpBubbleContentProps, type HelpBubbleDescriptionProps, type HelpBubblePositionerProps, type HelpBubbleRootProps, type HelpBubbleTitleProps, type HelpBubbleTriggerProps, } from './HelpBubble';
2
+ export * as HelpBubble from './HelpBubble.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HelpBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC"}
@@ -36,6 +36,7 @@ export declare const SuffixIcon: React.ForwardRefExoticComponent<SuffixIconProps
36
36
  export interface InternalIconProps extends LynxStyledElementProps {
37
37
  icon: ReactElement<LynxIconElementProps>;
38
38
  deps?: DependencyList;
39
+ disableDefaultResize?: boolean;
39
40
  }
40
41
  export declare const InternalIcon: React.ForwardRefExoticComponent<InternalIconProps & React.RefAttributes<unknown>>;
41
42
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGnF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,CAAC;AAIhE,UAAU,oBAAoB;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAWD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,qBAyCA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAEA;AAeD,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,IAAI,CAI1E;AAa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EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,qBAyCA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAEA;AAeD,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,IAAI,CAI1E;AAaD,MAAM,WAAW,SAAU,SAAQ,sBAAsB;IACvD,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AAErD,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AA+GrD,eAAO,MAAM,IAAI,2EAA8D,CAAC;AAChF,eAAO,MAAM,UAAU,iFAItB,CAAC;AACF,eAAO,MAAM,UAAU,iFAItB,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,mFAsCvB,CAAC"}
@@ -130,7 +130,7 @@ var Icon = createIconComponent("Icon", "icon", "seed-icon");
130
130
  var PrefixIcon = createIconComponent("PrefixIcon", "prefixIcon", "seed-prefix-icon");
131
131
  var SuffixIcon = createIconComponent("SuffixIcon", "suffixIcon", "seed-suffix-icon");
132
132
  var InternalIcon = React.forwardRef((props, ref) => {
133
- const { icon, deps = [], className, style, children: _children, ...nativeProps } = props;
133
+ const { icon, deps = [], className, style, children: _children, disableDefaultResize = false, ...nativeProps } = props;
134
134
  const sourceRef = useMainThreadRef(null);
135
135
  const iconColor = useIconColor([
136
136
  className,
@@ -141,6 +141,7 @@ var InternalIcon = React.forwardRef((props, ref) => {
141
141
  return <view {...mergeProps({ "main-thread:ref": sourceRef }, ref ? { ref } : {}, nativeProps)} className={className} style={style}>
142
142
  {cloneElement(icon, {
143
143
  ...iconColor,
144
+ ...disableDefaultResize ? { "disable-default-resize": true } : {},
144
145
  className: icon.props.className,
145
146
  style: {
146
147
  ...icon.props.style,
@@ -0,0 +1,28 @@
1
+ import { IdentityPlaceholderVariantProps } from '@seed-design/lynx-css/recipes/identity-placeholder';
2
+ import { IntrinsicElements } from '@lynx-js/types';
3
+ import { LynxStyledElementProps } from '../../types';
4
+ import * as React from "@lynx-js/react";
5
+ /**
6
+ * @platform Lynx
7
+ *
8
+ * Web의 SVG/asChild API 대신 native `<view>` props를 받습니다.
9
+ */
10
+ export interface IdentityPlaceholderRootProps extends IdentityPlaceholderVariantProps, LynxStyledElementProps {
11
+ }
12
+ export declare const IdentityPlaceholderRoot: React.ForwardRefExoticComponent<IdentityPlaceholderRootProps & React.RefAttributes<unknown>>;
13
+ /**
14
+ * @platform Lynx
15
+ *
16
+ * `src`와 `mode`는 identity variant가 소유합니다. Web SVG props 대신 native image
17
+ * props를 사용하며 SVG rendering과 `asChild`는 지원하지 않습니다.
18
+ *
19
+ * React SVG의 기본 `xMidYMid meet`처럼 도형 전체를 비율을 유지한 채 영역 안에 맞춥니다.
20
+ *
21
+ * 로컬 WebP는 `static-white-alpha-800`의 고정값 `#ffffffde`로 원본 SVG path를
22
+ * rasterize합니다. Native image의 SVG/fill 경로를 피하고, 토큰이 light/dark에서
23
+ * 동일하므로 동적 tint를 사용하지 않습니다.
24
+ */
25
+ export interface IdentityPlaceholderImageProps extends Omit<IntrinsicElements["image"], "src" | "mode" | "children"> {
26
+ }
27
+ export declare const IdentityPlaceholderImage: React.ForwardRefExoticComponent<Omit<IdentityPlaceholderImageProps, "ref"> & React.RefAttributes<unknown>>;
28
+ //# sourceMappingURL=IdentityPlaceholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/IdentityPlaceholder/IdentityPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAY,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,aAAa,CAAC;AAgBvE;;;;GAIG;AACH,MAAM,WAAW,4BACf,SAAQ,+BAA+B,EACrC,sBAAsB;CAAG;AAE7B,eAAO,MAAM,uBAAuB,8FAoBnC,CAAC;AAGF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;CAAG;AAE1E,eAAO,MAAM,wBAAwB,4GA8BpC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { mergeProps } from "../../utils/merge-props.js";
2
+ import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
3
+ import identity_placeholder_business_default from "./identity-placeholder-business.js";
4
+ import identity_placeholder_person_default from "./identity-placeholder-person.js";
5
+ import * as React from "@lynx-js/react";
6
+ import clsx from "clsx";
7
+ import { identityPlaceholder } from "@seed-design/lynx-css/recipes/identity-placeholder";
8
+ //#region src/components/IdentityPlaceholder/IdentityPlaceholder.tsx
9
+ var { ClassNamesProvider, PropsProvider, useClassNames, useProps } = createSlotRecipeContext(identityPlaceholder);
10
+ var identitySources = {
11
+ person: identity_placeholder_person_default,
12
+ business: identity_placeholder_business_default
13
+ };
14
+ var IdentityPlaceholderRoot = React.forwardRef((props, ref) => {
15
+ const [variantProps, otherProps] = identityPlaceholder.splitVariantProps(props);
16
+ const { children, className, style, ...nativeProps } = otherProps;
17
+ const classNames = identityPlaceholder(variantProps);
18
+ return <ClassNamesProvider value={classNames}>
19
+ <PropsProvider value={variantProps}>
20
+ <view {...mergeProps(ref ? { ref } : {}, nativeProps)} className={clsx(classNames.root, className)} style={style}>
21
+ {children}
22
+ </view>
23
+ </PropsProvider>
24
+ </ClassNamesProvider>;
25
+ });
26
+ IdentityPlaceholderRoot.displayName = "IdentityPlaceholderRoot";
27
+ var IdentityPlaceholderImage = React.forwardRef((props, ref) => {
28
+ const classNames = useClassNames();
29
+ const parentProps = useProps();
30
+ if (parentProps === null) throw new Error("<IdentityPlaceholderImage/> must be rendered inside <IdentityPlaceholderRoot/>.");
31
+ const { className, "accessibility-label": accessibilityLabel, "accessibility-traits": accessibilityTraits, ...nativeProps } = props;
32
+ const identity = parentProps.identity ?? "person";
33
+ return <image {...mergeProps(ref ? { ref } : {}, nativeProps)} src={identitySources[identity]} mode="aspectFit" accessibility-label={accessibilityLabel ?? "Identity placeholder"} accessibility-traits={accessibilityTraits ?? "image"} className={clsx(classNames.image, className)} />;
34
+ });
35
+ IdentityPlaceholderImage.displayName = "IdentityPlaceholderImage";
36
+ //#endregion
37
+ export { IdentityPlaceholderImage, IdentityPlaceholderRoot };
@@ -0,0 +1,2 @@
1
+ export { IdentityPlaceholderRoot as Root, IdentityPlaceholderImage as Image, type IdentityPlaceholderRootProps as RootProps, type IdentityPlaceholderImageProps as ImageProps, } from './IdentityPlaceholder';
2
+ //# sourceMappingURL=IdentityPlaceholder.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdentityPlaceholder.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,IAAI,IAAI,EAC/B,wBAAwB,IAAI,KAAK,EACjC,KAAK,4BAA4B,IAAI,SAAS,EAC9C,KAAK,6BAA6B,IAAI,UAAU,GACjD,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { IdentityPlaceholderImage, IdentityPlaceholderRoot } from "./IdentityPlaceholder.jsx";
3
+ //#region src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts
4
+ var IdentityPlaceholder_namespace_exports = /* @__PURE__ */ __exportAll({
5
+ Image: () => IdentityPlaceholderImage,
6
+ Root: () => IdentityPlaceholderRoot
7
+ });
8
+ //#endregion
9
+ export { IdentityPlaceholder_namespace_exports };
@@ -0,0 +1,4 @@
1
+ //#region src/components/IdentityPlaceholder/identity-placeholder-business.webp
2
+ var identity_placeholder_business_default = "data:image/webp;base64,UklGRkAGAABXRUJQVlA4TDQGAAAvf8KfEFJR3LaNY+2/9hWfr/8iYgL0AzFh2DoxW8SbIncKXotAIemUx1Gju08CJEO5JbC0e8oBT1qOBEmSpPz/1dyIrFstkCFGKBH9779AgNhyJcuVlgmg5EaSJEn6/7szq9Ld3Bw9kbPZUeWiGhEToPP/+f/8f/4//5//z//n//P/+f/8f/4//5//z//n//P/+f/8f/4//5//z/+v+he+mC+1/fKH3AaG3lIT2Iy51SQmuKXGMaStZjKhrOYyiMVsBq/VdDZsxYSGrJrRYLUa0zEVkxqiYlbDU0xraIp5DUsxsSEpZnYczdQOo2JTimJuw1BM7hAyuiUo7Lj8xPTu+Sk9mN89P2UHEbznp+TMDA+cQFRwTDE3wWjYFKNSM3M8aAJSoTHJzASlIVOUioxZHjCBqcCYZl6C056f4mKeB0uAKiwmmpUgteenqJjpgRKoCoqp5iRY7fkpJuZ6kASsQuLXJ2R5z08RMdsDJHABiOE2H6FLe36Kh/keHAEscBjwshHCvOenaJjxgRHIAoYhLxehzHt+ioU5pyKgDQqDXiZCmvf8FAmzTkRgGxCGvTyENu/5K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5iSPH2eoj7CU9QPX6rkiFTJwzdlfcKU9aNHZ3yZpLM8etPZfJlMZ/O//85/x690tseEznj03FkfE3fmR08poxNTRs+eq3CEq/DwiRrRmRTR06eU8CFKCZ4/UQAdSwH0BSB2xTqYbegrQGILOpwtsb4FJLMksdWgWZPYuu6j8Yf8v//Of+e/P+t+Uus/FAJVQNkntYEiqERqP6UFlT0/QmqslCixOqACi96f8iRah1NwUWkaL4MpAvb9CUoRsu/PQIqgLUejZhhF2IYigVuGQo4QitAdQBW84Wf0KPRE/IadiOCQEzEcbiKKQ03EcZiJSA4xEcyhpRPOYaVCOqBEUIeSTlyHkE5sh45GfCdgdII8ZaIT6Ulh6AT8krQEtNObmJ3s9MbPbDebzv/n//P/+f/8f/4//5//z//n//P/+f/8f/4//5//z//n//P/+f/8f/4//7/o";
3
+ //#endregion
4
+ export { identity_placeholder_business_default as default };
@@ -0,0 +1,4 @@
1
+ //#region src/components/IdentityPlaceholder/identity-placeholder-person.webp
2
+ var identity_placeholder_person_default = "data:image/webp;base64,UklGRioGAABXRUJQVlA4TB0GAAAvf8KfEHVQcCPJkST9/9Wn5XRFeeSKDITBHRECAWLLlSxXWiZgrv+v/6//r/+v/6//r/+v/6//r/+v/6//r/+v/6//r/+v/6//r/+v/6//r/+v/2/yfyG/+Et/+st/6j8COWAS7P1PbcipErz/W5PTJPb+7w3HSLxfFg6QeL84HB3xfkQ4NfB+Tg6MeD8sh0W8H5icE/F+aDgj4v3g5IDwfnhOB/YBORnifUZOhXgfkzOBfVQOBO/DchrE+7w5CthH5iDwPjSnQPbBOQLYR+cAYB+e9mMfn+bzFpDW85bQfRdvEd112UKm57aU6TjXwg3nLabbjS2nm40tKK3GlpRGY4tKm7FlTZdtYZuMyrjF2NLSYNnipr+2um4vyrNuLrbA9NaWOJ1FjdxYbJHTV1tltxVlWrpqC91UVMotlS11OopauaHYYuf4cTtly51uol7upi14eomKuZe25K1EzeikrbkbiaJtjh/30Za9jahbjh930Ra+iahcjh/30Ja+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MTpFU4xSURSjVevJo1arySPXqGkEGy1FMRMlZTQbHWVUGxUxukVDjHJREKNd9MOoF/Uw+kU7jIJRDqNhdMOoGNUwOkYzjJJRDKNl9MKoOWrJ6DlayUjaOnFG1KjEo2s0wigbhTDaRh+MuqOOjL5jZTgjcXTBqBxVMDqPJJyROnrwqB01MHpHCxnJWwfOiB4VMLqPFeCM9Hl/jPp5ec40IG+O6UFemzNtyDtjOjG8L2eakbeVaUjeFNOT4S0505a8Imdak/fDtCfvhmlR3oszXco7caZTeR/OdCvvwpmO5T0407W8AjOti6vnTPtC5ZzpYarmTB9DvZzpZlwpZ1o6FMnO9DXUx5nuhso40+OhJHam1XEtnEzDQxHsTOPDw9nJ9D/4mezMQRj8LCZzIgb8+WwyZ2PAH8ommWMyAfwpbJLMoZkA9pewbZLMOZoEwH/z7/hvAkky1//X/9f/1//X/9f/1//X/9f/1//X/9f/1/+3pgA=";
3
+ //#endregion
4
+ export { identity_placeholder_person_default as default };
@@ -0,0 +1,3 @@
1
+ export { IdentityPlaceholderRoot, IdentityPlaceholderImage, type IdentityPlaceholderRootProps, type IdentityPlaceholderImageProps, } from './IdentityPlaceholder';
2
+ export * as IdentityPlaceholder from './IdentityPlaceholder.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IdentityPlaceholder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,GACnC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAC"}
@@ -9,6 +9,8 @@ import * as React from "@lynx-js/react";
9
9
  * 웹 대비 미지원 기능:
10
10
  * - `size="responsive"`: Lynx에는 CSS viewport breakpoint가 없음
11
11
  * - HTML form 제출과 DOM ARIA id 연결
12
+ * - Content Scale을 적용하려면 Button을 Root의 직접 자식 또는 Fragment 안에 둡니다.
13
+ * 커스텀 컴포넌트로 감싼 Button은 기존 구조를 보존하며 Content Scale을 생략합니다.
12
14
  */
13
15
  export interface InputButtonRootProps extends Omit<InputButtonVariantProps, "pressed">, LynxStyledElementProps {
14
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InputButton.d.ts","sourceRoot":"","sources":["../../../src/components/InputButton/InputButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AAIpD,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAsBpE;;;;;;GAMG;AACH,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,EAC9C,sBAAsB;CAAG;AAE7B,eAAO,MAAM,eAAe,uFAwB3B,CAAC;AAKF,MAAM,WAAW,sBACf,SAAQ,sBAAsB,EAC5B,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,iBAAiB,wFAiC5B,CAAC;AAKH,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;CAAG;AAExE,eAAO,MAAM,gBAAgB,uFAe3B,CAAC;AAGH,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;CAAG;AAE9E,eAAO,MAAM,sBAAsB,6FAiBlC,CAAC;AAKF,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;CAAG;AAE7E,eAAO,MAAM,qBAAqB,4FAiBjC,CAAC;AAGF,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;CAAG;AAExE,eAAO,MAAM,qBAAqB,4FAejC,CAAC;AAGF,MAAM,WAAW,0BAA2B,SAAQ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AAQ,iBAAiB;CAAG;AAExE,eAAO,MAAM,qBAAqB,4FAejC,CAAC;AAGF,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;CAAG;AAE7E,eAAO,MAAM,qBAAqB,4FAiBjC,CAAC;AAGF,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;CAAG;AAExE,eAAO,MAAM,qBAAqB,4FAejC,CAAC;AAKF,MAAM,WAAW,2BACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,sBAAsB,6FA6ClC,CAAC"}
@@ -1,4 +1,7 @@
1
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
2
+ import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
3
+ import { toArray } from "../../utils/children.js";
4
+ import { mergeProps } from "../../utils/merge-props.js";
2
5
  import { InternalIcon } from "../Icon/Icon.jsx";
3
6
  import * as React from "@lynx-js/react";
4
7
  import clsx from "clsx";
@@ -16,18 +19,37 @@ var InputButtonRoot = React.forwardRef((props, forwardedRef) => {
16
19
  const disabled = variantProps.disabled ?? false;
17
20
  const readOnly = variantProps.readOnly ?? false;
18
21
  const classes = inputButton(variantProps);
22
+ const { pressed, bindtouchstart, bindtouchend, bindtouchcancel } = usePressTap({ disabled: disabled || readOnly });
23
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({
24
+ disabled: disabled || readOnly,
25
+ onTouchStart: bindtouchstart,
26
+ onTouchEnd: bindtouchend,
27
+ onTouchCancel: bindtouchcancel
28
+ });
29
+ const childArray = flattenInputButtonChildren(children);
30
+ const buttonChildren = childArray.filter(isInputButtonButton);
31
+ const contentChildren = childArray.filter((child) => !isInputButtonButton(child));
19
32
  const contextValue = React.useMemo(() => ({
20
33
  variantProps,
21
34
  disabled,
22
- readOnly
35
+ readOnly,
36
+ pressed,
37
+ scaleFeedbackTriggerProps
23
38
  }), [
24
39
  variantProps,
25
40
  disabled,
26
- readOnly
41
+ readOnly,
42
+ pressed,
43
+ scaleFeedbackTriggerProps
27
44
  ]);
28
45
  return <InputButtonContext.Provider value={contextValue}>
29
46
  <view {...forwardedRef ? { ref: forwardedRef } : {}} className={clsx(classes.root, className)} {...nativeProps}>
30
- {children}
47
+ {buttonChildren.length > 0 ? <>
48
+ {buttonChildren}
49
+ <view {...scaleFeedbackTargetProps} className={classes.content}>
50
+ {contentChildren}
51
+ </view>
52
+ </> : children}
31
53
  </view>
32
54
  </InputButtonContext.Provider>;
33
55
  });
@@ -36,22 +58,31 @@ var InputButtonButton = React.forwardRef((props, ref) => {
36
58
  const context = useInputButtonContext("InputButton.Button");
37
59
  const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...nativeProps } = props;
38
60
  const nonInteractive = context.disabled || context.readOnly;
39
- const { pressed, ...pressHandlers } = usePressTap({
61
+ const { bindtap: handleTap, "main-thread:bindtap": handleMainThreadTap } = usePressTap({
40
62
  disabled: nonInteractive,
41
63
  onTap: bindtap,
42
64
  mainThreadOnTap: mainThreadBindtap
43
65
  });
44
66
  const classes = inputButton({
45
67
  ...context.variantProps,
46
- pressed
68
+ pressed: context.pressed
47
69
  });
48
- return <view {...ref ? { ref } : {}} className={clsx(classes.button, className)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (nonInteractive ? "disabled" : "button")} {...pressHandlers} {...nativeProps}>
70
+ return <view {...ref ? { ref } : {}} className={clsx(classes.button, className)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (nonInteractive ? "disabled" : "button")} {...mergeProps({
71
+ bindtap: handleTap,
72
+ "main-thread:bindtap": handleMainThreadTap
73
+ }, context.scaleFeedbackTriggerProps, nativeProps)}>
49
74
  <view className={classes.baseStroke} accessibility-elements-hidden={true} />
50
75
  <view className={classes.stroke} accessibility-elements-hidden={true} />
51
76
  {children}
52
77
  </view>;
53
78
  });
54
79
  InputButtonButton.displayName = "InputButtonButton";
80
+ function isInputButtonButton(node) {
81
+ return React.isValidElement(node) && node.type === InputButtonButton;
82
+ }
83
+ function flattenInputButtonChildren(children) {
84
+ return toArray(children).flatMap((child) => React.isValidElement(child) && child.type === React.Fragment ? flattenInputButtonChildren(child.props.children) : [child]);
85
+ }
55
86
  var InputButtonValue = React.forwardRef((props, ref) => {
56
87
  const classes = inputButton(useInputButtonContext("InputButton.Value").variantProps);
57
88
  const { children, className, ...nativeProps } = props;
@@ -109,9 +140,10 @@ var InputButtonClearButton = React.forwardRef((props, ref) => {
109
140
  ...context.variantProps,
110
141
  pressed
111
142
  });
143
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({ disabled: nonInteractive });
112
144
  if (nonInteractive) return null;
113
145
  if (process.env.NODE_ENV !== "production" && !accessibilityLabel) console.warn("InputButton.ClearButton requires `accessibility-label` for accessibility.");
114
- return <InternalIcon ref={ref} className={clsx(classes.clearButton, className)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits="button" {...pressHandlers} {...otherProps} />;
146
+ return <InternalIcon ref={ref} className={clsx(classes.clearButton, className)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits="button" {...mergeProps(pressHandlers, scaleFeedbackTriggerProps, scaleFeedbackTargetProps, otherProps, { flatten: false })} />;
115
147
  });
116
148
  InputButtonClearButton.displayName = "InputButtonClearButton";
117
149
  //#endregion
@@ -5,7 +5,7 @@ import { CheckboxRootProps } from '../Checkbox/Checkbox';
5
5
  import { RadioGroupItemProps } from '../RadioGroup/RadioGroup';
6
6
  import { SwitchRootProps } from '../Switch/Switch';
7
7
  import * as React from "@lynx-js/react";
8
- type PublicListItemVariantProps = Omit<ListItemVariantProps, "pressed" | "disabled">;
8
+ type PublicListItemVariantProps = Omit<ListItemVariantProps, "pressed" | "disabled" | "interactive">;
9
9
  export interface ListRootProps extends LynxStyledElementProps, LynxAccessibilityProps {
10
10
  }
11
11
  export declare const ListRoot: React.ForwardRefExoticComponent<ListRootProps & React.RefAttributes<unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAIxC,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAG9F,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAIvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAgB,KAAK,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAEhG,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAc,KAAK,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AAEtF,KAAK,0BAA0B,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;AAwCrF,MAAM,WAAW,aAAc,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAExF,eAAO,MAAM,QAAQ,+EAanB,CAAC;AA8CH,MAAM,WAAW,aACf,SAAQ,0BAA0B,EAChC,sBAAsB,EACtB,sBAAsB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,+EAEnB,CAAC;AAKH,MAAM,WAAW,mBACf,SAAQ,0BAA0B,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,qFA4BzB,CAAC;AA8BH,MAAM,WAAW,qBACf,SAAQ,0BAA0B,EAChC,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EACxE,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AO,GAAG,UAAU,CAAC,EAC1E,sBAAsB,EACtB,sBAAsB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,oFAwBxB,CAAC;AA6BH,MAAM,WAAW,mBACf,SAAQ,0BAA0B,EAChC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,EACtE,sBAAsB,EACtB,sBAAsB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,qFAkBzB,CAAC;AAKH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;CAAG;AAEnE,eAAO,MAAM,WAAW,kFActB,CAAC;AAGH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG;AAElE,eAAO,MAAM,UAAU,iFAcrB,CAAC;AAGH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG;AAElE,eAAO,MAAM,UAAU,iFAcrB,CAAC;AAGH,MAAM,WAAW,cAAe,SAAQ,sBAAsB;CAAG;AAEjE,eAAO,MAAM,SAAS,gFAcpB,CAAC;AAGH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG;AAElE,eAAO,MAAM,UAAU,iFAcrB,CAAC;AAKH,MAAM,WAAW,eACf,SAAQ,sBAAsB,EAC5B,sBAAsB,EACtB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,UAAU,iFAcrB,CAAC"}
@@ -1,6 +1,9 @@
1
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
2
+ import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
3
+ import { mergeProps } from "../../utils/merge-props.js";
2
4
  import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
3
5
  import { IconSlotProvider } from "../Icon/Icon.jsx";
6
+ import { ScaleFeedbackContentContext } from "../../contexts/ScaleFeedbackContentContext.js";
4
7
  import { CheckboxRoot, useCheckboxContext } from "../Checkbox/Checkbox.jsx";
5
8
  import { RadioGroupItem, useRadioGroupItemContext } from "../RadioGroup/RadioGroup.jsx";
6
9
  import { SwitchRoot, useSwitchContext } from "../Switch/Switch.jsx";
@@ -34,12 +37,13 @@ var ListRoot = React.forwardRef((props, ref) => {
34
37
  });
35
38
  ListRoot.displayName = "ListRoot";
36
39
  var ListItemSurface = React.forwardRef((props, ref) => {
37
- const { children, className, style, disabled = false, pressed = false, ...restProps } = props;
40
+ const { children, className, style, disabled = false, pressed = false, scaleFeedbackTargetProps, ...restProps } = props;
38
41
  const [variantProps, nativeProps] = listItem.splitVariantProps(restProps);
39
42
  const classes = listItem({
40
43
  ...variantProps,
41
44
  disabled,
42
- pressed
45
+ pressed,
46
+ interactive: !!scaleFeedbackTargetProps
43
47
  });
44
48
  return <ClassNamesProvider value={classes}>
45
49
  <IconSlotProvider value={{
@@ -53,10 +57,14 @@ var ListItemSurface = React.forwardRef((props, ref) => {
53
57
  variantProps.highlighted
54
58
  ]
55
59
  }}>
56
- <view {...ref ? { ref } : {}} {...nativeProps} className={clsx(classes.root, className)} style={style}>
60
+ <view {...mergeProps(ref ? { ref } : {}, nativeProps)} className={clsx(classes.root, className)} style={style}>
57
61
  <view className={classes.highlightedOverlay} accessibility-elements-hidden={true} />
58
62
  <view className={classes.pressedOverlay} accessibility-elements-hidden={true} />
59
- <view className={classes.layout}>{children}</view>
63
+ <view className={classes.layout} {...scaleFeedbackTargetProps}>
64
+ <ScaleFeedbackContentContext.Provider value={!!scaleFeedbackTargetProps}>
65
+ {children}
66
+ </ScaleFeedbackContentContext.Provider>
67
+ </view>
60
68
  </view>
61
69
  </IconSlotProvider>
62
70
  </ClassNamesProvider>;
@@ -68,17 +76,23 @@ var ListItem = React.forwardRef((props, ref) => {
68
76
  ListItem.displayName = "ListItem";
69
77
  var ListButtonItem = React.forwardRef((props, ref) => {
70
78
  const { disabled = false, bindtap, "main-thread:bindtap": mainThreadOnTap, "accessibility-element": accessibilityElement = true, "accessibility-role-description": accessibilityRoleDescription = "button", "accessibility-traits": accessibilityTraits, ...restProps } = props;
71
- const { pressed, ...pressHandlers } = usePressTap({
79
+ const { pressed, bindtouchstart, bindtouchend, bindtouchcancel, ...pressHandlers } = usePressTap({
72
80
  disabled,
73
81
  onTap: bindtap,
74
82
  mainThreadOnTap
75
83
  });
76
- return <ListItemSurface ref={ref} disabled={disabled} pressed={pressed} accessibility-element={accessibilityElement} accessibility-role-description={accessibilityRoleDescription} accessibility-traits={accessibilityTraits ?? (disabled ? "disabled" : "button")} {...pressHandlers} {...restProps} />;
84
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({
85
+ disabled,
86
+ onTouchStart: bindtouchstart,
87
+ onTouchEnd: bindtouchend,
88
+ onTouchCancel: bindtouchcancel
89
+ });
90
+ return <ListItemSurface ref={ref} disabled={disabled} pressed={pressed} accessibility-element={accessibilityElement} accessibility-role-description={accessibilityRoleDescription} accessibility-traits={accessibilityTraits ?? (disabled ? "disabled" : "button")} scaleFeedbackTargetProps={scaleFeedbackTargetProps} {...mergeProps(scaleFeedbackTriggerProps, pressHandlers, restProps)} />;
77
91
  });
78
92
  ListButtonItem.displayName = "ListButtonItem";
79
93
  function ListCheckboxItemSurface(props) {
80
94
  const context = useCheckboxContext("ListCheckboxItem");
81
- return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "checkbox"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "선택됨" : "선택 안 됨")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
95
+ return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} scaleFeedbackTargetProps={context.scaleFeedbackTargetProps} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "checkbox"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "선택됨" : "선택 안 됨")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
82
96
  }
83
97
  var ListCheckboxItem = React.forwardRef((props, ref) => {
84
98
  const { children, className, style, disabled = false, ...restProps } = props;
@@ -94,14 +108,14 @@ var ListCheckboxItem = React.forwardRef((props, ref) => {
94
108
  ListCheckboxItem.displayName = "ListCheckboxItem";
95
109
  function ListRadioItemSurface(props) {
96
110
  const context = useRadioGroupItemContext("ListRadioItem");
97
- return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "radio"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "선택됨" : "선택 안 됨")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
111
+ return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} scaleFeedbackTargetProps={context.scaleFeedbackTargetProps} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "radio"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "선택됨" : "선택 안 됨")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
98
112
  }
99
113
  var ListRadioItem = React.forwardRef((props, ref) => {
100
114
  const { children, className, style, disabled = false, value, ...restProps } = props;
101
115
  const [variantProps, remainingProps] = listItem.splitVariantProps(restProps);
102
- const [accessibilityProps] = splitAccessibilityProps(remainingProps);
116
+ const [accessibilityProps, radioProps] = splitAccessibilityProps(remainingProps);
103
117
  const interactionRootClassName = listItem().interactionRoot;
104
- return <RadioGroupItem ref={ref} value={value} disabled={disabled} className={interactionRootClassName}>
118
+ return <RadioGroupItem ref={ref} {...radioProps} value={value} disabled={disabled} className={interactionRootClassName}>
105
119
  <ListRadioItemSurface {...variantProps} className={className} style={style} {...accessibilityProps}>
106
120
  {children}
107
121
  </ListRadioItemSurface>
@@ -110,7 +124,7 @@ var ListRadioItem = React.forwardRef((props, ref) => {
110
124
  ListRadioItem.displayName = "ListRadioItem";
111
125
  function ListSwitchItemSurface(props) {
112
126
  const context = useSwitchContext("ListSwitchItem");
113
- return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "switch"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "켜짐" : "꺼짐")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
127
+ return <ListItemSurface {...props} disabled={context.disabled} pressed={context.pressed} scaleFeedbackTargetProps={context.scaleFeedbackTargetProps} accessibility-element={props["accessibility-element"] ?? true} accessibility-role-description={props["accessibility-role-description"] ?? "switch"} accessibility-value={props["accessibility-value"] ?? (context.checked ? "켜짐" : "꺼짐")} accessibility-traits={props["accessibility-traits"] ?? (context.disabled ? "disabled" : "button")} />;
114
128
  }
115
129
  var ListSwitchItem = React.forwardRef((props, ref) => {
116
130
  const { children, className, style, disabled = false, ...restProps } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAK9F,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAIvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAoB,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAEL,KAAK,SAAS,IAAI,aAAa,EAGhC,MAAM,wBAAwB,CAAC;AAqBhC,KAAK,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,GA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AW,gBAAiB,SAAQ,sBAAsB;CAAG;AAEnE,eAAO,MAAM,WAAW,kFAuRtB,CAAC;AAKH,qGAAqG;AACrG,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;CAAG;AAEtE,eAAO,MAAM,cAAc,qFAazB,CAAC;AAKH,MAAM,WAAW,cAAe,SAAQ,sBAAsB;CAAG;AAEjE,eAAO,MAAM,SAAS,gFAgBpB,CAAC;AAKH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE9F,eAAO,MAAM,cAAc,qFAkBzB,CAAC;AAKH,MAAM,WAAW,aACf,SAAQ,0BAA0B,EAChC,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,+EAqEnB,CAAC;AAKH,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;CAAG;AAEpE,eAAO,MAAM,YAAY,mFAYvB,CAAC;AAGH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;CAAG;AAErE,eAAO,MAAM,aAAa,oFAYxB,CAAC;AAGH,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;CAAG;AAE3E,eAAO,MAAM,mBAAmB,0FAc/B,CAAC;AAGF,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,UAAU,IAAI,cAAc,EAAE,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -1,6 +1,8 @@
1
- import { useControllableState } from "../../hooks/useControllableState.js";
2
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
+ import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
3
4
  import { toArray } from "../../utils/children.js";
5
+ import { mergeProps } from "../../utils/merge-props.js";
4
6
  import { IconSlotProvider } from "../Icon/Icon.jsx";
5
7
  import { computePosition } from "../private/Positioning.js";
6
8
  import * as React from "@lynx-js/react";
@@ -456,7 +458,7 @@ var MenuItem = React.forwardRef((props, ref) => {
456
458
  const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-label": accessibilityLabel, "accessibility-traits": accessibilityTraits, ...nativeProps } = otherProps;
457
459
  const context = useMenuContext("MenuItem");
458
460
  const disabled = context.disabled || disabledProp;
459
- const { pressed, ...pressHandlers } = usePressTap({
461
+ const { pressed, bindtouchstart, bindtouchend, bindtouchcancel, ...pressHandlers } = usePressTap({
460
462
  disabled,
461
463
  onTap: React.useCallback((event, instance) => {
462
464
  "background only";
@@ -468,6 +470,12 @@ var MenuItem = React.forwardRef((props, ref) => {
468
470
  }, [bindtap, context]),
469
471
  mainThreadOnTap: mainThreadBindtap
470
472
  });
473
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({
474
+ disabled,
475
+ onTouchStart: bindtouchstart,
476
+ onTouchEnd: bindtouchend,
477
+ onTouchCancel: bindtouchcancel
478
+ });
471
479
  const classes = menuItem({
472
480
  ...variantProps,
473
481
  size: context.size,
@@ -484,9 +492,11 @@ var MenuItem = React.forwardRef((props, ref) => {
484
492
  }), [classes.prefixIcon, classes.suffixIcon]);
485
493
  return <MenuItemClassNamesContext.Provider value={classes}>
486
494
  <IconSlotProvider value={iconSlots}>
487
- <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-role-description="button" accessibility-traits={disabled ? "disabled" : accessibilityTraits ?? "button"} {...nativeProps} {...pressHandlers}>
495
+ <view {...ref ? { ref } : {}} className={clsx(classes.root, className)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-role-description="button" accessibility-traits={disabled ? "disabled" : accessibilityTraits ?? "button"} {...mergeProps(scaleFeedbackTriggerProps, pressHandlers, nativeProps)}>
488
496
  <view className={classes.pressedOverlay} accessibility-elements-hidden={true} />
489
- {children}
497
+ <view className={classes.scaleContent} {...scaleFeedbackTargetProps}>
498
+ {children}
499
+ </view>
490
500
  </view>
491
501
  </IconSlotProvider>
492
502
  </MenuItemClassNamesContext.Provider>;
@@ -7,6 +7,9 @@ import * as React from "@lynx-js/react";
7
7
  * Differences from React Web:
8
8
  * - Uses Lynx native `<view>` and `bindtap` instead of `asChild` and DOM events.
9
9
  * - Does not provide a web focus ring.
10
+ * - Actionable banners group their children for Content Scale. Render CloseButton
11
+ * directly under Root (or in a Fragment) to exclude it from that group.
12
+ * A CloseButton hidden inside a custom component remains in the content group.
10
13
  */
11
14
  export interface PageBannerRootProps extends Omit<PageBannerVariantProps, "pressed" | "closeButtonPressed" | "interactive">, LynxStyledElementProps, LynxPressableProps, LynxAccessibilityProps {
12
15
  defaultOpen?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAOxC,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EAIvB,MAAM,aAAa,CAAC;AA6BrB;;;;;;GAMG;AACH,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,oBAAoB,GAAG,aAAa,CAAC,EACpF,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,qFAyFzB,CAAC;AAKH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAEjG,eAAO,MAAM,iBAAiB,wF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E,sBAAsB;CAAG;AAEjG,eAAO,MAAM,iBAAiB,wFAa5B,CAAC;AAKH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE9F,eAAO,MAAM,cAAc,qFAazB,CAAC;AAKH,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB,EAAE,sBAAsB;CAAG;AAE/F,eAAO,MAAM,eAAe,sFAc1B,CAAC;AAKH,MAAM,WAAW,0BACf,SAAQ,sBAAsB,EAC5B,sBAAsB;CAAG;AAE7B,eAAO,MAAM,qBAAqB,4FAejC,CAAC;AAKF,MAAM,WAAW,qBACf,SAAQ,sBAAsB,EAC5B,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,gBAAgB,uFA+B3B,CAAC;AAKH,MAAM,WAAW,0BAEf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAC7C,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,qBAAqB,4FAqEjC,CAAC"}
@@ -1,10 +1,10 @@
1
- import { useControllableState } from "../../hooks/useControllableState.js";
2
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
3
  import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
4
+ import { toArray } from "../../utils/children.js";
4
5
  import { mergeProps } from "../../utils/merge-props.js";
5
6
  import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
6
7
  import { IconSlotProvider } from "../Icon/Icon.jsx";
7
- import { ScaleFeedback } from "../ScaleFeedback/ScaleFeedback.jsx";
8
8
  import * as React from "@lynx-js/react";
9
9
  import clsx from "clsx";
10
10
  import { useMemoizedFn } from "@lynx-js/lynx-ui-common";
@@ -31,6 +31,15 @@ var PageBannerRoot = React.forwardRef((props, ref) => {
31
31
  onTap: bindtap,
32
32
  mainThreadOnTap: mainThreadBindtap
33
33
  });
34
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback({
35
+ disabled: !isInteractive,
36
+ onTouchStart: pressTap.bindtouchstart,
37
+ onTouchEnd: pressTap.bindtouchend,
38
+ onTouchCancel: pressTap.bindtouchcancel
39
+ });
40
+ const childArray = flattenPageBannerChildren(children);
41
+ const closeButtons = childArray.filter(isPageBannerCloseButton);
42
+ const scaleChildren = childArray.filter((child) => !isPageBannerCloseButton(child));
34
43
  const classNames = pageBanner({
35
44
  ...variantProps,
36
45
  pressed: pressTap.pressed,
@@ -64,8 +73,13 @@ var PageBannerRoot = React.forwardRef((props, ref) => {
64
73
  <ClassNamesProvider value={classNames}>
65
74
  <PropsProvider value={variantProps}>
66
75
  <IconSlotProvider value={iconSlotContextValue}>
67
- <view {...mergeProps(ref ? { ref } : {}, isInteractive ? pressTap : {}, nativeProps)} accessibility-element={accessibilityElement ?? (isInteractive ? true : void 0)} accessibility-traits={accessibilityTraits ?? (isInteractive ? "button" : void 0)} className={clsx(classNames.root, className)} style={style}>
68
- {children}
76
+ <view {...mergeProps(ref ? { ref } : {}, isInteractive ? pressTap : {}, isInteractive ? scaleFeedbackTriggerProps : {}, nativeProps)} accessibility-element={accessibilityElement ?? (isInteractive ? true : void 0)} accessibility-traits={accessibilityTraits ?? (isInteractive ? "button" : void 0)} className={clsx(classNames.root, className)} style={style}>
77
+ {isInteractive ? <>
78
+ <view {...scaleFeedbackTargetProps} className={classNames.scaleContent}>
79
+ {scaleChildren}
80
+ </view>
81
+ {closeButtons}
82
+ </> : children}
69
83
  </view>
70
84
  </IconSlotProvider>
71
85
  </PropsProvider>
@@ -109,11 +123,10 @@ PageBannerDescription.displayName = "PageBannerDescription";
109
123
  var PageBannerButton = React.forwardRef((props, ref) => {
110
124
  const { children, className, style, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits = "button", ...nativeProps } = props;
111
125
  const classNames = useClassNames();
112
- return <ScaleFeedback>
113
- <text {...mergeProps(ref ? { ref } : {}, nativeProps)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits} className={clsx(classNames.button, className)} style={style}>
114
- {children}
115
- </text>
116
- </ScaleFeedback>;
126
+ const { scaleFeedbackTriggerProps, scaleFeedbackTargetProps } = useScaleFeedback();
127
+ return <text {...independentActionProps(mergeProps(ref ? { ref } : {}, scaleFeedbackTriggerProps, scaleFeedbackTargetProps, nativeProps))} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits} className={clsx(classNames.button, className)} style={style} flatten={false}>
128
+ {children}
129
+ </text>;
117
130
  });
118
131
  PageBannerButton.displayName = "PageBannerButton";
119
132
  var PageBannerCloseButton = React.forwardRef((props, ref) => {
@@ -151,11 +164,36 @@ var PageBannerCloseButton = React.forwardRef((props, ref) => {
151
164
  ]);
152
165
  if (process.env.NODE_ENV !== "production" && accessibilityElement && !accessibilityLabel) console.warn("PageBannerCloseButton requires `accessibility-label` for accessibility.");
153
166
  return <IconSlotProvider value={iconSlotContextValue}>
154
- <view {...mergeProps(ref ? { ref } : {}, pressTapHandlers, scaleFeedbackTriggerProps, scaleFeedbackTargetProps, nativeProps)} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits={accessibilityTraits} className={clsx(classNames.closeButton, className)} style={style} flatten={false}>
167
+ <view {...independentActionProps(mergeProps(ref ? { ref } : {}, pressTapHandlers, scaleFeedbackTriggerProps, scaleFeedbackTargetProps, nativeProps))} accessibility-element={accessibilityElement} accessibility-label={accessibilityLabel} accessibility-traits={accessibilityTraits} className={clsx(classNames.closeButton, className)} style={style} flatten={false}>
155
168
  {children}
156
169
  </view>
157
170
  </IconSlotProvider>;
158
171
  });
159
172
  PageBannerCloseButton.displayName = "PageBannerCloseButton";
173
+ function isPageBannerCloseButton(node) {
174
+ return React.isValidElement(node) && node.type === PageBannerCloseButton;
175
+ }
176
+ function flattenPageBannerChildren(children) {
177
+ return toArray(children).flatMap((child) => React.isValidElement(child) && child.type === React.Fragment ? flattenPageBannerChildren(child.props.children) : [child]);
178
+ }
179
+ function independentActionProps(props) {
180
+ const result = { ...props };
181
+ for (const event of [
182
+ "tap",
183
+ "touchstart",
184
+ "touchend",
185
+ "touchcancel"
186
+ ]) {
187
+ const bind = `bind${event}`;
188
+ const catchKey = `catch${event}`;
189
+ const mainBind = `main-thread:${bind}`;
190
+ const mainCatch = `main-thread:${catchKey}`;
191
+ const caught = mergeProps({ [catchKey]: result[bind] ?? (() => {}) }, { [catchKey]: result[catchKey] }, { [mainCatch]: result[mainBind] }, { [mainCatch]: result[mainCatch] });
192
+ delete result[bind];
193
+ delete result[mainBind];
194
+ Object.assign(result, caught);
195
+ }
196
+ return result;
197
+ }
160
198
  //#endregion
161
199
  export { PageBannerBody, PageBannerButton, PageBannerCloseButton, PageBannerContent, PageBannerDescription, PageBannerRoot, PageBannerTitle };