@pallasoft/ps-mobile-components 1.2.0 → 1.4.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 (478) hide show
  1. package/dist/components/ps-action-menu/ps-action-menu-avatar-entry.d.ts +5 -0
  2. package/dist/components/ps-action-menu/ps-action-menu-avatar-entry.js +16 -0
  3. package/dist/components/ps-action-menu/ps-action-menu-entries.js +5 -2
  4. package/dist/components/ps-action-menu/ps-action-menu-labelled.d.ts +2 -1
  5. package/dist/components/ps-action-menu/ps-action-menu-labelled.js +2 -2
  6. package/dist/components/ps-action-menu/ps-action-menu.android.js +19 -30
  7. package/dist/components/ps-action-menu/ps-action-menu.ios.js +10 -1
  8. package/dist/components/ps-action-menu/ps-menu-tile-canvas.d.ts +6 -0
  9. package/dist/components/ps-action-menu/ps-menu-tile-canvas.js +5 -0
  10. package/dist/components/ps-action-menu/ps-menu-tile-drawing.d.ts +6 -0
  11. package/dist/components/ps-action-menu/ps-menu-tile-drawing.js +34 -0
  12. package/dist/components/ps-action-sheet/ps-action-sheet.js +6 -4
  13. package/dist/components/ps-app-lock-screen/index.d.ts +2 -0
  14. package/dist/components/ps-app-lock-screen/index.js +2 -0
  15. package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.d.ts +9 -0
  16. package/dist/components/ps-app-lock-screen/ps-app-lock-screen-props.js +1 -0
  17. package/dist/components/ps-app-lock-screen/ps-app-lock-screen.d.ts +2 -0
  18. package/dist/components/ps-app-lock-screen/ps-app-lock-screen.js +19 -0
  19. package/dist/components/ps-barcode-scanner-sheet/index.d.ts +2 -0
  20. package/dist/components/ps-barcode-scanner-sheet/index.js +2 -0
  21. package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet-props.d.ts +11 -0
  22. package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet-props.js +1 -0
  23. package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet.d.ts +2 -0
  24. package/dist/components/ps-barcode-scanner-sheet/ps-barcode-scanner-sheet.js +82 -0
  25. package/dist/components/ps-button/ps-button.js +4 -2
  26. package/dist/components/ps-cartesian-chart/ps-cartesian-chart.js +25 -19
  27. package/dist/components/ps-checkbox/ps-checkbox.js +5 -2
  28. package/dist/components/ps-chip/ps-chip.js +4 -2
  29. package/dist/components/ps-date-field/ps-date-field.android.js +1 -1
  30. package/dist/components/ps-date-field/ps-date-field.ios.js +1 -1
  31. package/dist/components/ps-document-page/ps-document-page-props.d.ts +3 -0
  32. package/dist/components/ps-document-page/ps-document-page.d.ts +1 -1
  33. package/dist/components/ps-document-page/ps-document-page.js +16 -7
  34. package/dist/components/ps-document-page-strip/index.d.ts +2 -0
  35. package/dist/components/ps-document-page-strip/index.js +2 -0
  36. package/dist/components/ps-document-page-strip/ps-document-page-strip-props.d.ts +6 -0
  37. package/dist/components/ps-document-page-strip/ps-document-page-strip-props.js +1 -0
  38. package/dist/components/ps-document-page-strip/ps-document-page-strip.d.ts +2 -0
  39. package/dist/components/ps-document-page-strip/ps-document-page-strip.js +43 -0
  40. package/dist/components/ps-document-pdf-cover/index.d.ts +2 -0
  41. package/dist/components/ps-document-pdf-cover/index.js +2 -0
  42. package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover-props.d.ts +6 -0
  43. package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover-props.js +1 -0
  44. package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover.d.ts +2 -0
  45. package/dist/components/ps-document-pdf-cover/ps-document-pdf-cover.js +18 -0
  46. package/dist/components/ps-document-preview/ps-document-preview.js +3 -4
  47. package/dist/components/ps-document-preview-face/index.d.ts +2 -0
  48. package/dist/components/ps-document-preview-face/index.js +2 -0
  49. package/dist/components/ps-document-preview-face/ps-document-preview-face-props.d.ts +6 -0
  50. package/dist/components/ps-document-preview-face/ps-document-preview-face-props.js +1 -0
  51. package/dist/components/ps-document-preview-face/ps-document-preview-face.d.ts +2 -0
  52. package/dist/components/ps-document-preview-face/ps-document-preview-face.js +18 -0
  53. package/dist/components/ps-document-text-page/index.d.ts +2 -0
  54. package/dist/components/ps-document-text-page/index.js +2 -0
  55. package/dist/components/ps-document-text-page/ps-document-text-page-props.d.ts +6 -0
  56. package/dist/components/ps-document-text-page/ps-document-text-page-props.js +1 -0
  57. package/dist/components/ps-document-text-page/ps-document-text-page.d.ts +2 -0
  58. package/dist/components/ps-document-text-page/ps-document-text-page.js +18 -0
  59. package/dist/components/ps-document-unsupported/index.d.ts +2 -0
  60. package/dist/components/ps-document-unsupported/index.js +2 -0
  61. package/dist/components/ps-document-unsupported/ps-document-unsupported-props.d.ts +7 -0
  62. package/dist/components/ps-document-unsupported/ps-document-unsupported-props.js +1 -0
  63. package/dist/components/ps-document-unsupported/ps-document-unsupported.d.ts +2 -0
  64. package/dist/components/ps-document-unsupported/ps-document-unsupported.js +10 -0
  65. package/dist/components/ps-document-viewer/ps-document-viewer.js +27 -7
  66. package/dist/components/ps-form-sheet/ps-form-sheet-props.d.ts +2 -0
  67. package/dist/components/ps-form-sheet/ps-form-sheet.d.ts +1 -1
  68. package/dist/components/ps-form-sheet/ps-form-sheet.js +17 -7
  69. package/dist/components/ps-header-action/index.d.ts +2 -0
  70. package/dist/components/ps-header-action/index.js +2 -0
  71. package/dist/components/ps-header-action/ps-header-action-props.d.ts +6 -0
  72. package/dist/components/ps-header-action/ps-header-action-props.js +1 -0
  73. package/dist/components/ps-header-action/ps-header-action.android.d.ts +2 -0
  74. package/dist/components/ps-header-action/ps-header-action.android.js +9 -0
  75. package/dist/components/ps-header-action/ps-header-action.d.ts +2 -0
  76. package/dist/components/ps-header-action/ps-header-action.js +11 -0
  77. package/dist/components/ps-header-menu/index.d.ts +2 -0
  78. package/dist/components/ps-header-menu/index.js +2 -0
  79. package/dist/components/ps-header-menu/ps-header-menu-props.d.ts +7 -0
  80. package/dist/components/ps-header-menu/ps-header-menu-props.js +1 -0
  81. package/dist/components/ps-header-menu/ps-header-menu.android.d.ts +2 -0
  82. package/dist/components/ps-header-menu/ps-header-menu.android.js +11 -0
  83. package/dist/components/ps-header-menu/ps-header-menu.d.ts +2 -0
  84. package/dist/components/ps-header-menu/ps-header-menu.js +20 -0
  85. package/dist/components/ps-icon-button/ps-icon-button.js +7 -7
  86. package/dist/components/ps-kpi-card/ps-kpi-card.js +1 -2
  87. package/dist/components/ps-list/ps-list-action-row.js +6 -6
  88. package/dist/components/ps-list/ps-list-context-menu.android.d.ts +2 -0
  89. package/dist/components/ps-list/ps-list-context-menu.android.js +3 -0
  90. package/dist/components/ps-list/ps-list-context-menu.js +1 -1
  91. package/dist/components/ps-list/ps-list-link-menu-entry.d.ts +5 -0
  92. package/dist/components/ps-list/ps-list-link-menu-entry.js +11 -0
  93. package/dist/components/ps-list/ps-list-link-menu.android.d.ts +2 -0
  94. package/dist/components/ps-list/ps-list-link-menu.android.js +7 -0
  95. package/dist/components/ps-list/ps-list-link-menu.d.ts +10 -0
  96. package/dist/components/ps-list/ps-list-link-menu.js +16 -0
  97. package/dist/components/ps-list/ps-list-link-row.js +6 -6
  98. package/dist/components/ps-list/ps-list-props.d.ts +4 -1
  99. package/dist/components/ps-list/ps-list-row-body.d.ts +2 -2
  100. package/dist/components/ps-list/ps-list-row-body.js +9 -8
  101. package/dist/components/ps-list/ps-list-row-menu.d.ts +10 -0
  102. package/dist/components/ps-list/ps-list-row-menu.js +27 -0
  103. package/dist/components/ps-list/ps-list-row.d.ts +1 -1
  104. package/dist/components/ps-list/ps-list-row.js +4 -3
  105. package/dist/components/ps-list/ps-list-select-row.js +2 -1
  106. package/dist/components/ps-menu-popup/index.d.ts +4 -0
  107. package/dist/components/ps-menu-popup/index.js +4 -0
  108. package/dist/components/ps-menu-popup/ps-menu-popup-divider.d.ts +1 -0
  109. package/dist/components/ps-menu-popup/ps-menu-popup-divider.js +7 -0
  110. package/dist/components/ps-menu-popup/ps-menu-popup-header.d.ts +5 -0
  111. package/dist/components/ps-menu-popup/ps-menu-popup-header.js +8 -0
  112. package/dist/components/ps-menu-popup/ps-menu-popup-row.d.ts +12 -0
  113. package/dist/components/ps-menu-popup/ps-menu-popup-row.js +22 -0
  114. package/dist/components/ps-menu-popup/ps-menu-popup.d.ts +9 -0
  115. package/dist/components/ps-menu-popup/ps-menu-popup.js +35 -0
  116. package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider-props.d.ts +5 -2
  117. package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.d.ts +1 -1
  118. package/dist/components/ps-mobile-theme-provider/ps-mobile-theme-provider.js +27 -11
  119. package/dist/components/ps-native-menu/ps-native-menu-row.js +5 -5
  120. package/dist/components/ps-native-menu/ps-native-menu.android.js +16 -24
  121. package/dist/components/ps-option-picker/index.d.ts +2 -0
  122. package/dist/components/ps-option-picker/index.js +2 -0
  123. package/dist/components/ps-option-picker/ps-option-picker-props.d.ts +16 -0
  124. package/dist/components/ps-option-picker/ps-option-picker-props.js +1 -0
  125. package/dist/components/ps-option-picker/ps-option-picker.d.ts +2 -0
  126. package/dist/components/ps-option-picker/ps-option-picker.js +35 -0
  127. package/dist/components/ps-page-header/ps-page-header.js +3 -1
  128. package/dist/components/ps-pallasoft-sign-in-button/ps-pallasoft-sign-in-button.js +3 -1
  129. package/dist/components/ps-privacy-cover/index.d.ts +2 -0
  130. package/dist/components/ps-privacy-cover/index.js +2 -0
  131. package/dist/components/ps-privacy-cover/ps-privacy-cover-props.d.ts +4 -0
  132. package/dist/components/ps-privacy-cover/ps-privacy-cover-props.js +1 -0
  133. package/dist/components/ps-privacy-cover/ps-privacy-cover.d.ts +2 -0
  134. package/dist/components/ps-privacy-cover/ps-privacy-cover.js +17 -0
  135. package/dist/components/ps-screen/ps-screen.js +9 -4
  136. package/dist/components/ps-search-field/ps-search-field.js +3 -1
  137. package/dist/components/ps-search-select-field/index.d.ts +2 -0
  138. package/dist/components/ps-search-select-field/index.js +2 -0
  139. package/dist/components/ps-search-select-field/ps-search-select-field-props.d.ts +10 -0
  140. package/dist/components/ps-search-select-field/ps-search-select-field-props.js +1 -0
  141. package/dist/components/ps-search-select-field/ps-search-select-field.d.ts +2 -0
  142. package/dist/components/ps-search-select-field/ps-search-select-field.js +15 -0
  143. package/dist/components/ps-segmented-control/ps-segmented-control.android.js +4 -9
  144. package/dist/components/ps-selection-mode/index.d.ts +2 -0
  145. package/dist/components/ps-selection-mode/index.js +2 -0
  146. package/dist/components/ps-selection-mode/ps-selection-bar.d.ts +9 -0
  147. package/dist/components/ps-selection-mode/ps-selection-bar.js +49 -0
  148. package/dist/components/ps-selection-mode/ps-selection-mode-props.d.ts +13 -0
  149. package/dist/components/ps-selection-mode/ps-selection-mode-props.js +1 -0
  150. package/dist/components/ps-selection-mode/ps-selection-mode.android.d.ts +2 -0
  151. package/dist/components/ps-selection-mode/ps-selection-mode.android.js +23 -0
  152. package/dist/components/ps-selection-mode/ps-selection-mode.d.ts +2 -0
  153. package/dist/components/ps-selection-mode/ps-selection-mode.js +28 -0
  154. package/dist/components/ps-sheet/ps-sheet-props.d.ts +4 -1
  155. package/dist/components/ps-sheet/ps-sheet.d.ts +1 -1
  156. package/dist/components/ps-sheet/ps-sheet.js +4 -5
  157. package/dist/components/ps-sheet-content/ps-sheet-content.js +1 -1
  158. package/dist/components/ps-sheet-header/ps-sheet-header-props.d.ts +2 -0
  159. package/dist/components/ps-sheet-header/ps-sheet-header.d.ts +1 -1
  160. package/dist/components/ps-sheet-header/ps-sheet-header.js +2 -2
  161. package/dist/components/ps-sheet-page/ps-sheet-page-view.d.ts +8 -0
  162. package/dist/components/ps-sheet-page/ps-sheet-page-view.js +11 -0
  163. package/dist/components/ps-sheet-presenter/ps-sheet-presenter.android.js +4 -4
  164. package/dist/components/ps-sheet-presenter/ps-sheet-presenter.ios.js +9 -2
  165. package/dist/components/ps-sortable-grid/ps-sortable-item.js +2 -0
  166. package/dist/components/ps-spinner/ps-spinner.android.d.ts +2 -0
  167. package/dist/components/ps-spinner/ps-spinner.android.js +13 -0
  168. package/dist/components/ps-switch/ps-switch.android.d.ts +2 -0
  169. package/dist/components/ps-switch/ps-switch.android.js +25 -0
  170. package/dist/components/ps-switcher/index.d.ts +2 -0
  171. package/dist/components/ps-switcher/index.js +2 -0
  172. package/dist/components/ps-switcher/ps-switcher-panel.d.ts +10 -0
  173. package/dist/components/ps-switcher/ps-switcher-panel.js +17 -0
  174. package/dist/components/ps-switcher/ps-switcher-props.d.ts +12 -0
  175. package/dist/components/ps-switcher/ps-switcher-props.js +1 -0
  176. package/dist/components/ps-switcher/ps-switcher-row.d.ts +7 -0
  177. package/dist/components/ps-switcher/ps-switcher-row.js +33 -0
  178. package/dist/components/ps-switcher/ps-switcher-trigger.d.ts +11 -0
  179. package/dist/components/ps-switcher/ps-switcher-trigger.js +35 -0
  180. package/dist/components/ps-switcher/ps-switcher.d.ts +2 -0
  181. package/dist/components/ps-switcher/ps-switcher.js +21 -0
  182. package/dist/components/ps-tab-bar-provider/index.d.ts +2 -0
  183. package/dist/components/ps-tab-bar-provider/index.js +2 -0
  184. package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.d.ts +4 -0
  185. package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider-props.js +1 -0
  186. package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.d.ts +2 -0
  187. package/dist/components/ps-tab-bar-provider/ps-tab-bar-provider.js +8 -0
  188. package/dist/components/ps-tabs/ps-tabs.js +4 -2
  189. package/dist/components/ps-text-link/ps-text-link.js +1 -1
  190. package/dist/components/ps-waterfall-chart/index.d.ts +2 -0
  191. package/dist/components/ps-waterfall-chart/index.js +2 -0
  192. package/dist/components/ps-waterfall-chart/ps-waterfall-chart-props.d.ts +9 -0
  193. package/dist/components/ps-waterfall-chart/ps-waterfall-chart-props.js +1 -0
  194. package/dist/components/ps-waterfall-chart/ps-waterfall-chart.d.ts +2 -0
  195. package/dist/components/ps-waterfall-chart/ps-waterfall-chart.js +37 -0
  196. package/dist/components/ps-widget-list/ps-widget-list.js +1 -1
  197. package/dist/constants/ps-android-state-config.d.ts +12 -0
  198. package/dist/constants/ps-android-state-config.js +12 -0
  199. package/dist/constants/ps-app-lock-config.d.ts +13 -0
  200. package/dist/constants/ps-app-lock-config.js +13 -0
  201. package/dist/constants/ps-app-lock-native-codes.d.ts +10 -0
  202. package/dist/constants/ps-app-lock-native-codes.js +10 -0
  203. package/dist/constants/ps-barcode-permission.d.ts +6 -0
  204. package/dist/constants/ps-barcode-permission.js +5 -0
  205. package/dist/constants/ps-barcode-scanner-config.d.ts +18 -0
  206. package/dist/constants/ps-barcode-scanner-config.js +31 -0
  207. package/dist/constants/ps-biometry-kind.d.ts +7 -0
  208. package/dist/constants/ps-biometry-kind.js +6 -0
  209. package/dist/constants/ps-capture-config.d.ts +12 -0
  210. package/dist/constants/ps-capture-config.js +22 -0
  211. package/dist/constants/ps-capture-source.d.ts +7 -0
  212. package/dist/constants/ps-capture-source.js +6 -0
  213. package/dist/constants/ps-cartesian-series-shape.d.ts +5 -0
  214. package/dist/constants/ps-cartesian-series-shape.js +4 -0
  215. package/dist/constants/ps-chart-brand-config.d.ts +21 -0
  216. package/dist/constants/ps-chart-brand-config.js +10 -0
  217. package/dist/constants/ps-document-config.d.ts +3 -0
  218. package/dist/constants/ps-document-config.js +3 -0
  219. package/dist/constants/ps-document-file-config.d.ts +11 -0
  220. package/dist/constants/ps-document-file-config.js +11 -0
  221. package/dist/constants/ps-document-kind.d.ts +1 -0
  222. package/dist/constants/ps-document-kind.js +1 -0
  223. package/dist/constants/ps-document-load-status.d.ts +7 -0
  224. package/dist/constants/ps-document-load-status.js +6 -0
  225. package/dist/constants/ps-document-pdf-config.d.ts +14 -0
  226. package/dist/constants/ps-document-pdf-config.js +14 -0
  227. package/dist/constants/ps-header-config.d.ts +3 -0
  228. package/dist/constants/ps-header-config.js +3 -0
  229. package/dist/constants/ps-list-config.d.ts +2 -0
  230. package/dist/constants/ps-list-config.js +2 -0
  231. package/dist/constants/ps-menu-popup-config.d.ts +10 -0
  232. package/dist/constants/ps-menu-popup-config.js +10 -0
  233. package/dist/constants/ps-menu-tile-config.d.ts +9 -0
  234. package/dist/constants/ps-menu-tile-config.js +9 -0
  235. package/dist/constants/ps-mobile-control-config.d.ts +0 -12
  236. package/dist/constants/ps-mobile-control-config.js +0 -6
  237. package/dist/constants/ps-option-picker-config.d.ts +6 -0
  238. package/dist/constants/ps-option-picker-config.js +6 -0
  239. package/dist/constants/ps-quick-action-config.d.ts +4 -0
  240. package/dist/constants/ps-quick-action-config.js +4 -0
  241. package/dist/constants/ps-ripple-kind.d.ts +8 -0
  242. package/dist/constants/ps-ripple-kind.js +7 -0
  243. package/dist/constants/ps-selection-bar-config.d.ts +4 -0
  244. package/dist/constants/ps-selection-bar-config.js +4 -0
  245. package/dist/constants/ps-sf-symbol-config.d.ts +92 -0
  246. package/dist/constants/ps-sf-symbol-config.js +92 -0
  247. package/dist/constants/ps-sheet-page-config.d.ts +4 -0
  248. package/dist/constants/ps-sheet-page-config.js +4 -0
  249. package/dist/constants/ps-sortable-grid-config.d.ts +2 -1
  250. package/dist/constants/ps-sortable-grid-config.js +2 -1
  251. package/dist/constants/ps-switcher-config.d.ts +12 -0
  252. package/dist/constants/ps-switcher-config.js +12 -0
  253. package/dist/contexts/ps-tab-bar-context.d.ts +2 -0
  254. package/dist/contexts/ps-tab-bar-context.js +6 -0
  255. package/dist/hooks/use-ps-app-lock.d.ts +3 -0
  256. package/dist/hooks/use-ps-app-lock.js +72 -0
  257. package/dist/hooks/use-ps-barcode-scanner.d.ts +2 -0
  258. package/dist/hooks/use-ps-barcode-scanner.js +9 -0
  259. package/dist/hooks/use-ps-document-open.d.ts +3 -0
  260. package/dist/hooks/use-ps-document-open.js +14 -0
  261. package/dist/hooks/use-ps-document-pdf-cover.d.ts +3 -0
  262. package/dist/hooks/use-ps-document-pdf-cover.js +33 -0
  263. package/dist/hooks/use-ps-document-pdf-pages.d.ts +3 -0
  264. package/dist/hooks/use-ps-document-pdf-pages.js +31 -0
  265. package/dist/hooks/use-ps-document-text.d.ts +3 -0
  266. package/dist/hooks/use-ps-document-text.js +29 -0
  267. package/dist/hooks/use-ps-file-upload.d.ts +3 -0
  268. package/dist/hooks/use-ps-file-upload.js +32 -0
  269. package/dist/hooks/use-ps-header-right.d.ts +2 -0
  270. package/dist/hooks/use-ps-header-right.js +9 -0
  271. package/dist/hooks/use-ps-material-scheme.d.ts +2 -0
  272. package/dist/hooks/use-ps-material-scheme.js +3 -0
  273. package/dist/hooks/use-ps-menu-anchor.d.ts +10 -0
  274. package/dist/hooks/use-ps-menu-anchor.js +13 -0
  275. package/dist/hooks/use-ps-menu-tiles.d.ts +4 -0
  276. package/dist/hooks/use-ps-menu-tiles.js +8 -0
  277. package/dist/hooks/use-ps-quick-actions.d.ts +2 -0
  278. package/dist/hooks/use-ps-quick-actions.js +30 -0
  279. package/dist/hooks/use-ps-stack-screen-options.d.ts +2 -0
  280. package/dist/hooks/use-ps-stack-screen-options.js +7 -0
  281. package/dist/hooks/use-ps-tab-bar.d.ts +2 -0
  282. package/dist/hooks/use-ps-tab-bar.js +3 -0
  283. package/dist/hooks/use-ps-top-inset.d.ts +1 -0
  284. package/dist/hooks/use-ps-top-inset.js +10 -0
  285. package/dist/index.d.ts +62 -0
  286. package/dist/index.js +61 -0
  287. package/dist/interfaces/ps-action-menu-header.d.ts +1 -0
  288. package/dist/interfaces/ps-app-lock-native.d.ts +13 -0
  289. package/dist/interfaces/ps-app-lock-native.js +1 -0
  290. package/dist/interfaces/ps-app-lock-prompt.d.ts +4 -0
  291. package/dist/interfaces/ps-app-lock-prompt.js +1 -0
  292. package/dist/interfaces/ps-barcode-frame-size.d.ts +4 -0
  293. package/dist/interfaces/ps-barcode-frame-size.js +1 -0
  294. package/dist/interfaces/ps-barcode-last-read.d.ts +4 -0
  295. package/dist/interfaces/ps-barcode-last-read.js +1 -0
  296. package/dist/interfaces/ps-barcode-scan.d.ts +4 -0
  297. package/dist/interfaces/ps-barcode-scan.js +1 -0
  298. package/dist/interfaces/ps-barcode-scanner-labels.d.ts +8 -0
  299. package/dist/interfaces/ps-barcode-scanner-labels.js +1 -0
  300. package/dist/interfaces/ps-barcode-scanner-native.d.ts +23 -0
  301. package/dist/interfaces/ps-barcode-scanner-native.js +1 -0
  302. package/dist/interfaces/ps-capture-labels.d.ts +6 -0
  303. package/dist/interfaces/ps-capture-labels.js +1 -0
  304. package/dist/interfaces/ps-capture-menu-options.d.ts +6 -0
  305. package/dist/interfaces/ps-capture-menu-options.js +1 -0
  306. package/dist/interfaces/ps-capture-modules.d.ts +6 -0
  307. package/dist/interfaces/ps-capture-modules.js +1 -0
  308. package/dist/interfaces/ps-capture-options.d.ts +6 -0
  309. package/dist/interfaces/ps-capture-options.js +1 -0
  310. package/dist/interfaces/ps-cartesian-chart-series.d.ts +2 -0
  311. package/dist/interfaces/ps-date-dialog-colors.d.ts +19 -0
  312. package/dist/interfaces/ps-date-dialog-colors.js +1 -0
  313. package/dist/interfaces/ps-device-file.d.ts +5 -0
  314. package/dist/interfaces/ps-device-file.js +1 -0
  315. package/dist/interfaces/ps-document-file-system.d.ts +2 -0
  316. package/dist/interfaces/ps-document-file-system.js +1 -0
  317. package/dist/interfaces/ps-document-labels.d.ts +1 -0
  318. package/dist/interfaces/ps-document-page-image.d.ts +5 -0
  319. package/dist/interfaces/ps-document-page-image.js +1 -0
  320. package/dist/interfaces/ps-document-pdf-native.d.ts +9 -0
  321. package/dist/interfaces/ps-document-pdf-native.js +1 -0
  322. package/dist/interfaces/ps-document-pdf-options.d.ts +4 -0
  323. package/dist/interfaces/ps-document-pdf-options.js +1 -0
  324. package/dist/interfaces/ps-document-pdf-state.d.ts +6 -0
  325. package/dist/interfaces/ps-document-pdf-state.js +1 -0
  326. package/dist/interfaces/ps-document-viewer-entry.d.ts +8 -0
  327. package/dist/interfaces/ps-document-viewer-entry.js +1 -0
  328. package/dist/interfaces/ps-file-upload-options.d.ts +8 -0
  329. package/dist/interfaces/ps-file-upload-options.js +1 -0
  330. package/dist/interfaces/ps-material-scheme.d.ts +38 -0
  331. package/dist/interfaces/ps-material-scheme.js +1 -0
  332. package/dist/interfaces/ps-material-segmented-colors.d.ts +14 -0
  333. package/dist/interfaces/ps-material-segmented-colors.js +1 -0
  334. package/dist/interfaces/ps-material-switch-colors.d.ts +14 -0
  335. package/dist/interfaces/ps-material-switch-colors.js +1 -0
  336. package/dist/interfaces/ps-menu-anchor.d.ts +6 -0
  337. package/dist/interfaces/ps-menu-anchor.js +1 -0
  338. package/dist/interfaces/ps-menu-item.d.ts +3 -0
  339. package/dist/interfaces/ps-menu-popup-layout.d.ts +6 -0
  340. package/dist/interfaces/ps-menu-popup-layout.js +1 -0
  341. package/dist/interfaces/ps-menu-popup-window.d.ts +4 -0
  342. package/dist/interfaces/ps-menu-popup-window.js +1 -0
  343. package/dist/interfaces/ps-menu-tile-request.d.ts +7 -0
  344. package/dist/interfaces/ps-menu-tile-request.js +1 -0
  345. package/dist/interfaces/ps-menu-tile-shape.d.ts +1 -0
  346. package/dist/interfaces/ps-menu-tile-shape.js +1 -0
  347. package/dist/interfaces/ps-mobile-brand-colors.d.ts +5 -0
  348. package/dist/interfaces/ps-mobile-brand-colors.js +1 -0
  349. package/dist/interfaces/ps-mobile-brand-input.d.ts +7 -0
  350. package/dist/interfaces/ps-mobile-brand-input.js +1 -0
  351. package/dist/interfaces/ps-mobile-theme-input.d.ts +3 -1
  352. package/dist/interfaces/ps-mobile-theme.d.ts +32 -0
  353. package/dist/interfaces/ps-quick-action-native.d.ts +14 -0
  354. package/dist/interfaces/ps-quick-action-native.js +1 -0
  355. package/dist/interfaces/ps-quick-action.d.ts +7 -0
  356. package/dist/interfaces/ps-quick-action.js +1 -0
  357. package/dist/interfaces/ps-scanned-file.d.ts +2 -5
  358. package/dist/interfaces/ps-sheet-leading-kind.d.ts +1 -0
  359. package/dist/interfaces/ps-sheet-leading-kind.js +1 -0
  360. package/dist/interfaces/ps-sheet-page.d.ts +8 -0
  361. package/dist/interfaces/ps-sheet-page.js +1 -0
  362. package/dist/interfaces/ps-stack-screen-options.d.ts +2 -0
  363. package/dist/interfaces/ps-stack-screen-options.js +1 -0
  364. package/dist/interfaces/ps-switcher-item.d.ts +11 -0
  365. package/dist/interfaces/ps-switcher-item.js +1 -0
  366. package/dist/interfaces/ps-tab-bar-context-data.d.ts +5 -0
  367. package/dist/interfaces/ps-tab-bar-context-data.js +1 -0
  368. package/dist/interfaces/ps-tab-bar-icon-colors.d.ts +4 -0
  369. package/dist/interfaces/ps-tab-bar-icon-colors.js +1 -0
  370. package/dist/interfaces/ps-tab-bar-label-style.d.ts +5 -0
  371. package/dist/interfaces/ps-tab-bar-label-style.js +1 -0
  372. package/dist/interfaces/ps-tab-bar-label-styles.d.ts +5 -0
  373. package/dist/interfaces/ps-tab-bar-label-styles.js +1 -0
  374. package/dist/interfaces/ps-tab-bar-style.d.ts +12 -0
  375. package/dist/interfaces/ps-tab-bar-style.js +1 -0
  376. package/dist/interfaces/ps-waterfall-datum.d.ts +6 -0
  377. package/dist/interfaces/ps-waterfall-datum.js +1 -0
  378. package/dist/interfaces/ps-waterfall-step.d.ts +7 -0
  379. package/dist/interfaces/ps-waterfall-step.js +1 -0
  380. package/dist/interfaces/use-ps-app-lock-options.d.ts +6 -0
  381. package/dist/interfaces/use-ps-app-lock-options.js +1 -0
  382. package/dist/interfaces/use-ps-app-lock-result.d.ts +7 -0
  383. package/dist/interfaces/use-ps-app-lock-result.js +1 -0
  384. package/dist/interfaces/use-ps-barcode-scanner-result.d.ts +6 -0
  385. package/dist/interfaces/use-ps-barcode-scanner-result.js +1 -0
  386. package/dist/interfaces/use-ps-document-open-result.d.ts +5 -0
  387. package/dist/interfaces/use-ps-document-open-result.js +1 -0
  388. package/dist/interfaces/use-ps-document-pdf-cover-result.d.ts +7 -0
  389. package/dist/interfaces/use-ps-document-pdf-cover-result.js +1 -0
  390. package/dist/interfaces/use-ps-document-pdf-pages-result.d.ts +5 -0
  391. package/dist/interfaces/use-ps-document-pdf-pages-result.js +1 -0
  392. package/dist/interfaces/use-ps-document-text-result.d.ts +5 -0
  393. package/dist/interfaces/use-ps-document-text-result.js +1 -0
  394. package/dist/interfaces/use-ps-file-upload-result.d.ts +8 -0
  395. package/dist/interfaces/use-ps-file-upload-result.js +1 -0
  396. package/dist/interfaces/use-ps-quick-actions-options.d.ts +5 -0
  397. package/dist/interfaces/use-ps-quick-actions-options.js +1 -0
  398. package/dist/services/ps-action-menu-service.d.ts +4 -0
  399. package/dist/services/ps-action-menu-service.js +25 -2
  400. package/dist/services/ps-app-lock-grace-service.d.ts +6 -0
  401. package/dist/services/ps-app-lock-grace-service.js +17 -0
  402. package/dist/services/ps-app-lock-service.d.ts +10 -0
  403. package/dist/services/ps-app-lock-service.js +84 -0
  404. package/dist/services/ps-badge-tone-service.js +3 -3
  405. package/dist/services/ps-barcode-scanner-service.d.ts +14 -0
  406. package/dist/services/ps-barcode-scanner-service.js +53 -0
  407. package/dist/services/ps-button-style-service.d.ts +2 -0
  408. package/dist/services/ps-button-style-service.js +15 -3
  409. package/dist/services/ps-capture-picker-service.d.ts +11 -0
  410. package/dist/services/ps-capture-picker-service.js +67 -0
  411. package/dist/services/ps-capture-source-service.d.ts +10 -0
  412. package/dist/services/ps-capture-source-service.js +31 -0
  413. package/dist/services/ps-chart-brand-service.d.ts +4 -0
  414. package/dist/services/ps-chart-brand-service.js +20 -0
  415. package/dist/services/ps-chart-shape-service.d.ts +7 -0
  416. package/dist/services/ps-chart-shape-service.js +17 -0
  417. package/dist/services/ps-context-menu-service.d.ts +1 -0
  418. package/dist/services/ps-context-menu-service.js +13 -0
  419. package/dist/services/ps-control-style-service.js +3 -2
  420. package/dist/services/ps-date-picker-service.d.ts +3 -0
  421. package/dist/services/ps-date-picker-service.js +21 -0
  422. package/dist/services/ps-device-file-service.d.ts +14 -0
  423. package/dist/services/ps-device-file-service.js +27 -0
  424. package/dist/services/ps-document-file-service.d.ts +10 -0
  425. package/dist/services/ps-document-file-service.js +75 -0
  426. package/dist/services/ps-document-open-service.d.ts +5 -0
  427. package/dist/services/ps-document-open-service.js +16 -0
  428. package/dist/services/ps-document-pdf-service.d.ts +10 -0
  429. package/dist/services/ps-document-pdf-service.js +40 -0
  430. package/dist/services/ps-document-text-service.d.ts +5 -0
  431. package/dist/services/ps-document-text-service.js +14 -0
  432. package/dist/services/ps-document-viewer-entry-service.d.ts +11 -0
  433. package/dist/services/ps-document-viewer-entry-service.js +72 -0
  434. package/dist/services/ps-list-row-style-service.d.ts +4 -0
  435. package/dist/services/ps-list-row-style-service.js +8 -0
  436. package/dist/services/ps-material-control-service.d.ts +9 -0
  437. package/dist/services/ps-material-control-service.js +46 -0
  438. package/dist/services/ps-material-scheme-service.d.ts +5 -0
  439. package/dist/services/ps-material-scheme-service.js +42 -0
  440. package/dist/services/ps-menu-popup-service.d.ts +6 -0
  441. package/dist/services/ps-menu-popup-service.js +23 -0
  442. package/dist/services/ps-menu-tile-service.d.ts +16 -0
  443. package/dist/services/ps-menu-tile-service.js +70 -0
  444. package/dist/services/ps-menu-tile-style-service.d.ts +4 -0
  445. package/dist/services/ps-menu-tile-style-service.js +5 -0
  446. package/dist/services/ps-mobile-brand-service.d.ts +5 -0
  447. package/dist/services/ps-mobile-brand-service.js +24 -0
  448. package/dist/services/ps-mobile-theme-service.d.ts +1 -3
  449. package/dist/services/ps-mobile-theme-service.js +70 -95
  450. package/dist/services/ps-navigation-theme-service.d.ts +5 -0
  451. package/dist/services/ps-navigation-theme-service.js +21 -0
  452. package/dist/services/ps-option-picker-service.d.ts +8 -0
  453. package/dist/services/ps-option-picker-service.js +10 -0
  454. package/dist/services/ps-pdf-native-service.d.ts +8 -0
  455. package/dist/services/ps-pdf-native-service.js +33 -0
  456. package/dist/services/ps-quick-action-service.d.ts +9 -0
  457. package/dist/services/ps-quick-action-service.js +31 -0
  458. package/dist/services/ps-ripple-service.d.ts +7 -0
  459. package/dist/services/ps-ripple-service.js +26 -0
  460. package/dist/services/ps-screen-service.d.ts +3 -1
  461. package/dist/services/ps-screen-service.js +8 -2
  462. package/dist/services/ps-selection-service.d.ts +5 -0
  463. package/dist/services/ps-selection-service.js +13 -0
  464. package/dist/services/ps-sheet-service.d.ts +6 -0
  465. package/dist/services/ps-sheet-service.js +14 -0
  466. package/dist/services/ps-stack-options-service.d.ts +5 -0
  467. package/dist/services/ps-stack-options-service.js +18 -0
  468. package/dist/services/ps-state-service.d.ts +7 -0
  469. package/dist/services/ps-state-service.js +26 -0
  470. package/dist/services/ps-switcher-service.d.ts +6 -0
  471. package/dist/services/ps-switcher-service.js +15 -0
  472. package/dist/services/ps-tab-bar-style-service.d.ts +5 -0
  473. package/dist/services/ps-tab-bar-style-service.js +30 -0
  474. package/dist/services/ps-text-service.js +4 -4
  475. package/dist/services/ps-waterfall-service.d.ts +10 -0
  476. package/dist/services/ps-waterfall-service.js +38 -0
  477. package/jest-setup.js +154 -0
  478. package/package.json +47 -2
@@ -4,10 +4,12 @@ import { Pressable } from 'react-native';
4
4
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
5
5
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
6
6
  import { PsPageHeaderConfig } from '../../constants/ps-page-header-config';
7
+ import { PsRippleKind } from '../../constants/ps-ripple-kind';
7
8
  import { PsPageHeaderContext } from '../../contexts/ps-page-header-context';
8
9
  import { usePsHaptics } from '../../hooks/use-ps-haptics';
9
10
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
10
- import { PsMobileColorService } from '../../services/ps-mobile-color-service';
11
+ import { PsRippleService } from '../../services/ps-ripple-service';
12
+ import { PsStateService } from '../../services/ps-state-service';
11
13
  import { PsIcon } from '../ps-icon/ps-icon';
12
14
  export const PsIconButton = ({ backgroundColor, color, iconKey, isDisabled = false, label, onPress, size = 'default', testID, variant, }) => {
13
15
  const haptic = usePsHaptics();
@@ -17,7 +19,7 @@ export const PsIconButton = ({ backgroundColor, color, iconKey, isDisabled = fal
17
19
  const dimension = isHeader
18
20
  ? PsPageHeaderConfig.buttonSize
19
21
  : PsMobileControlConfig.controlHeights[size];
20
- return (_jsx(Pressable, { accessibilityLabel: label, accessibilityRole: 'button', accessibilityState: { disabled: isDisabled }, disabled: isDisabled, hitSlop: PsLayoutConfig.hitSlop, onPress: onPress === undefined
22
+ return (_jsx(Pressable, { android_ripple: PsRippleService.resolve(theme, PsRippleKind.Borderless), accessibilityLabel: label, accessibilityRole: 'button', accessibilityState: { disabled: isDisabled }, disabled: isDisabled, hitSlop: PsLayoutConfig.hitSlop, onPress: onPress === undefined
21
23
  ? undefined
22
24
  : () => {
23
25
  haptic('light');
@@ -27,16 +29,14 @@ export const PsIconButton = ({ backgroundColor, color, iconKey, isDisabled = fal
27
29
  backgroundColor: backgroundColor !== undefined
28
30
  ? backgroundColor
29
31
  : isHeader
30
- ? PsMobileColorService.withAlpha(theme.ink, pressed
31
- ? PsMobileControlConfig.neutralAlpha + PsMobileControlConfig.pressedAlpha
32
- : PsMobileControlConfig.neutralAlpha)
32
+ ? PsStateService.headerFill(theme, pressed)
33
33
  : pressed
34
- ? PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.pressedAlpha)
34
+ ? PsStateService.pressedFill(theme, 'transparent')
35
35
  : 'transparent',
36
36
  borderRadius: isHeader ? dimension / 2 : PsMobileControlConfig.controlRadius,
37
37
  height: dimension,
38
38
  justifyContent: 'center',
39
- opacity: isDisabled ? PsMobileControlConfig.disabledOpacity : 1,
39
+ opacity: isDisabled ? PsStateService.disabledOpacity() : 1,
40
40
  width: dimension,
41
41
  }), children: _jsx(PsIcon, { color: color === undefined ? theme.ink : color, iconKey: iconKey, size: isHeader ? PsPageHeaderConfig.iconSize : undefined }) }));
42
42
  };
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { View } from 'react-native';
3
2
  import { PsChartConfig } from '../../constants/ps-chart-config';
4
3
  import { PsChartSkeletonVariant } from '../../constants/ps-chart-skeleton-variant';
5
4
  import { PsChartFrame } from '../ps-chart-frame/ps-chart-frame';
@@ -8,5 +7,5 @@ import { PsSparkline } from '../ps-sparkline/ps-sparkline';
8
7
  export const PsKpiCard = ({ delta, isLoading = false, period, title, value, values, }) => {
9
8
  if (isLoading)
10
9
  return (_jsx(PsChartFrame, { children: _jsx(PsChartSkeleton, { height: PsChartConfig.sparklineHeight * 2, variant: PsChartSkeletonVariant.Line }) }));
11
- return (_jsx(PsChartFrame, { delta: delta, period: period, title: title, value: value, children: values === undefined ? _jsx(View, {}) : _jsx(PsSparkline, { values: values }) }));
10
+ return (_jsx(PsChartFrame, { delta: delta, period: period, title: title, value: value, children: values === undefined ? null : _jsx(PsSparkline, { values: values }) }));
12
11
  };
@@ -2,23 +2,23 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Pressable } from 'react-native';
3
3
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
4
4
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
5
+ import { PsRippleKind } from '../../constants/ps-ripple-kind';
5
6
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
6
- import { PsMobileColorService } from '../../services/ps-mobile-color-service';
7
+ import { PsRippleService } from '../../services/ps-ripple-service';
8
+ import { PsStateService } from '../../services/ps-state-service';
7
9
  import { PsIcon } from '../ps-icon/ps-icon';
8
10
  import { PsText } from '../ps-text/ps-text';
9
11
  export const PsListActionRow = ({ children, iconKey, isDisabled = false, onPress, tone = 'primary', }) => {
10
12
  const theme = usePsMobileTheme();
11
13
  const isDestructive = tone === 'destructive';
12
14
  const color = isDestructive ? theme.danger : theme.ink;
13
- return (_jsxs(Pressable, { accessibilityRole: 'button', accessibilityState: { disabled: isDisabled }, disabled: isDisabled, onPress: onPress, style: ({ pressed }) => ({
15
+ return (_jsxs(Pressable, { android_ripple: PsRippleService.resolve(theme, isDestructive ? PsRippleKind.Danger : PsRippleKind.Surface), accessibilityRole: 'button', accessibilityState: { disabled: isDisabled }, disabled: isDisabled, onPress: onPress, style: ({ pressed }) => ({
14
16
  alignItems: 'center',
15
- backgroundColor: pressed
16
- ? PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.pressedAlpha)
17
- : theme.surface,
17
+ backgroundColor: pressed ? PsStateService.pressedFill(theme, theme.surface) : theme.surface,
18
18
  flexDirection: 'row',
19
19
  gap: PsMobileControlConfig.rowSpacing,
20
20
  minHeight: PsLayoutConfig.rowMinHeight,
21
- opacity: isDisabled ? PsMobileControlConfig.disabledOpacity : 1,
21
+ opacity: isDisabled ? PsStateService.disabledOpacity() : 1,
22
22
  paddingHorizontal: PsLayoutConfig.gutter,
23
23
  }), testID: 'ps-list-action-row', children: [iconKey === undefined ? null : _jsx(PsIcon, { color: color, iconKey: iconKey }), _jsx(PsText, { style: { color }, weight: 'semibold', children: children })] }));
24
24
  };
@@ -0,0 +1,2 @@
1
+ import type { PsListContextMenuProps } from './ps-list-context-menu';
2
+ export declare const PsListContextMenu: ({ children, items, title }: PsListContextMenuProps) => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PsListRowMenu } from './ps-list-row-menu';
3
+ export const PsListContextMenu = ({ children, items, title }) => (_jsx(PsListRowMenu, { items: items, title: title, children: children }));
@@ -9,6 +9,6 @@ export const PsListContextMenu = ({ children, items, title }) => {
9
9
  const haptic = usePsHaptics();
10
10
  return (_jsx(MenuView, { actions: PsContextMenuService.actions(items, theme, Platform.OS === 'ios'), onOpenMenu: () => haptic('medium'), onPressAction: ({ nativeEvent }) => {
11
11
  haptic('selection');
12
- items.find((item) => item.id === nativeEvent.event)?.onSelect();
12
+ PsContextMenuService.find(items, nativeEvent.event)?.onSelect();
13
13
  }, shouldOpenOnLongPress: true, testID: 'ps-list-context-menu', themeVariant: theme.isDark ? 'dark' : 'light', title: title, children: children }));
14
14
  };
@@ -0,0 +1,5 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { PsMenuItem } from '../../interfaces/ps-menu-item';
3
+ export declare class PsListLinkMenuEntry {
4
+ static render(item: PsMenuItem, onSelect: (item: PsMenuItem) => void): ReactElement;
5
+ }
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link } from 'expo-router';
3
+ import { PsActionMenuService } from '../../services/ps-action-menu-service';
4
+ export class PsListLinkMenuEntry {
5
+ static render(item, onSelect) {
6
+ const icon = PsActionMenuService.symbol(item);
7
+ if (item.children !== undefined && item.children.length > 0)
8
+ return (_jsx(Link.Menu, { icon: icon, title: item.label, children: item.children.map((child) => PsListLinkMenuEntry.render(child, onSelect)) }, item.id));
9
+ return (_jsx(Link.MenuAction, { destructive: item.isDanger === true, disabled: item.isDisabled === true, icon: icon, onPress: () => onSelect(item), title: item.label }, item.id));
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ import type { PsListLinkMenuProps } from './ps-list-link-menu';
2
+ export declare const PsListLinkMenu: ({ children, href, items, title }: PsListLinkMenuProps) => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRouter } from 'expo-router';
3
+ import { PsListRowMenu } from './ps-list-row-menu';
4
+ export const PsListLinkMenu = ({ children, href, items, title }) => {
5
+ const router = useRouter();
6
+ return (_jsx(PsListRowMenu, { items: items, onPress: () => router.push(href), title: title, children: children }));
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import type { PsMenuItem } from '../../interfaces/ps-menu-item';
3
+ export interface PsListLinkMenuProps {
4
+ children: ReactElement;
5
+ href: string;
6
+ items: PsMenuItem[];
7
+ preview?: ReactNode;
8
+ title: string;
9
+ }
10
+ export declare const PsListLinkMenu: ({ children, href, items, preview, title }: PsListLinkMenuProps) => import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Link } from 'expo-router';
3
+ import { PsListConfig } from '../../constants/ps-list-config';
4
+ import { usePsHaptics } from '../../hooks/use-ps-haptics';
5
+ import { PsActionMenuService } from '../../services/ps-action-menu-service';
6
+ import { PsListLinkMenuEntry } from './ps-list-link-menu-entry';
7
+ export const PsListLinkMenu = ({ children, href, items, preview, title }) => {
8
+ const haptic = usePsHaptics();
9
+ const sections = PsActionMenuService.consistent([{ id: 'items', items }]);
10
+ const entries = sections.length === 0 ? [] : sections[0].items;
11
+ const choose = (item) => {
12
+ haptic('selection');
13
+ item.onSelect();
14
+ };
15
+ return (_jsxs(Link, { asChild: true, href: href, children: [_jsx(Link.Trigger, { children: children }), preview === undefined ? (_jsx(Link.Preview, {})) : (_jsx(Link.Preview, { style: { height: PsListConfig.previewHeight, width: PsListConfig.previewWidth }, children: preview })), entries.length === 0 ? null : (_jsx(Link.Menu, { title: title, children: entries.map((item) => PsListLinkMenuEntry.render(item, choose)) }))] }));
16
+ };
@@ -3,9 +3,11 @@ import { PsIconKey } from '@pallasoft/ps-icons';
3
3
  import { Pressable, View } from 'react-native';
4
4
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
5
5
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
6
+ import { PsRippleKind } from '../../constants/ps-ripple-kind';
6
7
  import { usePsHaptics } from '../../hooks/use-ps-haptics';
7
8
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
8
- import { PsMobileColorService } from '../../services/ps-mobile-color-service';
9
+ import { PsRippleService } from '../../services/ps-ripple-service';
10
+ import { PsStateService } from '../../services/ps-state-service';
9
11
  import { PsCountBadge } from '../ps-count-badge/ps-count-badge';
10
12
  import { PsIcon } from '../ps-icon/ps-icon';
11
13
  import { PsText } from '../ps-text/ps-text';
@@ -16,14 +18,12 @@ export const PsListLinkRow = ({ count, countLabel, iconKey, isAlert = false, isL
16
18
  if (isLoading)
17
19
  return _jsx(PsListLinkRowSkeleton, {});
18
20
  const hasCount = count !== undefined && count > 0;
19
- return (_jsxs(Pressable, { accessibilityHint: countLabel, accessibilityRole: 'button', onPress: () => {
21
+ return (_jsxs(Pressable, { android_ripple: PsRippleService.resolve(theme, PsRippleKind.Surface), accessibilityHint: countLabel, accessibilityRole: 'button', onPress: () => {
20
22
  haptic('light');
21
23
  onPress();
22
24
  }, style: ({ pressed }) => ({
23
25
  alignItems: 'center',
24
- backgroundColor: pressed
25
- ? PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.pressedAlpha)
26
- : theme.surface,
26
+ backgroundColor: pressed ? PsStateService.pressedFill(theme, theme.surface) : theme.surface,
27
27
  flexDirection: 'row',
28
28
  gap: PsLayoutConfig.headerSlotGap,
29
29
  minHeight: PsLayoutConfig.linkRowMinHeight,
@@ -36,5 +36,5 @@ export const PsListLinkRow = ({ count, countLabel, iconKey, isAlert = false, isL
36
36
  height: PsLayoutConfig.linkRowIconBox,
37
37
  justifyContent: 'center',
38
38
  width: PsLayoutConfig.linkRowIconBox,
39
- }, children: _jsx(PsIcon, { color: theme.primary, iconKey: iconKey, size: PsLayoutConfig.linkRowIconSize }) }), _jsxs(View, { style: { flex: 1, gap: PsLayoutConfig.rowLineGap }, children: [_jsx(PsText, { numberOfLines: 1, weight: 'semibold', children: title }), subtitle === undefined ? null : (_jsx(PsText, { numberOfLines: 1, tone: 'muted', variant: 'small', children: subtitle }))] }), hasCount ? _jsx(PsCountBadge, { count: count, isAlert: isAlert, label: countLabel }) : null, _jsx(PsIcon, { color: theme.muted, iconKey: PsIconKey.ChevronRight, size: PsMobileControlConfig.iconSizeInline })] }));
39
+ }, children: _jsx(PsIcon, { color: theme.primaryText, iconKey: iconKey, size: PsLayoutConfig.linkRowIconSize }) }), _jsxs(View, { style: { flex: 1, gap: PsLayoutConfig.rowLineGap }, children: [_jsx(PsText, { numberOfLines: 1, weight: 'semibold', children: title }), subtitle === undefined ? null : (_jsx(PsText, { numberOfLines: 1, tone: 'muted', variant: 'small', children: subtitle }))] }), hasCount ? _jsx(PsCountBadge, { count: count, isAlert: isAlert, label: countLabel }) : null, _jsx(PsIcon, { color: theme.muted, iconKey: PsIconKey.ChevronRight, size: PsMobileControlConfig.iconSizeInline })] }));
40
40
  };
@@ -46,13 +46,16 @@ export interface PsListRowProps {
46
46
  actions?: PsMenuItem[];
47
47
  badge?: PsListRowBadge;
48
48
  hasChevron?: boolean;
49
+ href?: string;
49
50
  isLoading?: boolean;
50
51
  isSection?: boolean;
51
52
  isSelectable?: boolean;
52
53
  isSelected?: boolean;
54
+ isValueStacked?: boolean;
53
55
  leadingSwipe?: PsMenuItem;
54
56
  leadingIcon?: PsIconKey;
55
57
  onPress?: () => void;
58
+ preview?: ReactNode;
56
59
  skeleton?: PsListSkeletonLayout;
57
60
  subtitle?: string;
58
61
  trailingSwipe?: PsMenuItem;
@@ -63,7 +66,7 @@ export interface PsListActionRowProps {
63
66
  children: string;
64
67
  iconKey?: PsIconKey;
65
68
  isDisabled?: boolean;
66
- onPress: () => void;
69
+ onPress?: () => void;
67
70
  tone?: 'primary' | 'destructive';
68
71
  }
69
72
  export interface PsListContentProps {
@@ -1,6 +1,6 @@
1
1
  import type { PsListRowProps } from './ps-list-props';
2
- export interface PsListRowBodyProps extends Pick<PsListRowProps, 'badge' | 'hasChevron' | 'isSelectable' | 'isSelected' | 'leadingIcon' | 'onPress' | 'subtitle' | 'title' | 'value'> {
2
+ export interface PsListRowBodyProps extends Pick<PsListRowProps, 'badge' | 'hasChevron' | 'isSelectable' | 'isSelected' | 'isValueStacked' | 'leadingIcon' | 'onPress' | 'subtitle' | 'title' | 'value'> {
3
3
  hasMenu: boolean;
4
4
  onLongPress: () => void;
5
5
  }
6
- export declare const PsListRowBody: ({ badge, hasChevron, hasMenu, isSelectable, isSelected, leadingIcon, onLongPress, onPress, subtitle, title, value, }: PsListRowBodyProps) => import("react").JSX.Element;
6
+ export declare const PsListRowBody: ({ badge, hasChevron, hasMenu, isSelectable, isSelected, isValueStacked, leadingIcon, onLongPress, onPress, subtitle, title, value, }: PsListRowBodyProps) => import("react").JSX.Element;
@@ -3,21 +3,22 @@ import { PsIconKey } from '@pallasoft/ps-icons';
3
3
  import { Pressable, View } from 'react-native';
4
4
  import { PsLayoutConfig } from '../../constants/ps-layout-config';
5
5
  import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
6
+ import { PsRippleKind } from '../../constants/ps-ripple-kind';
6
7
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
7
- import { PsMobileColorService } from '../../services/ps-mobile-color-service';
8
+ import { PsListRowStyleService } from '../../services/ps-list-row-style-service';
9
+ import { PsRippleService } from '../../services/ps-ripple-service';
8
10
  import { PsBadge } from '../ps-badge/ps-badge';
9
11
  import { PsIcon } from '../ps-icon/ps-icon';
10
12
  import { PsText } from '../ps-text/ps-text';
11
13
  import { PsListRowSelectMark } from './ps-list-row-select-mark';
12
- export const PsListRowBody = ({ badge, hasChevron = false, hasMenu, isSelectable = false, isSelected = false, leadingIcon, onLongPress, onPress, subtitle, title, value, }) => {
14
+ export const PsListRowBody = ({ badge, hasChevron = false, hasMenu, isSelectable = false, isSelected = false, isValueStacked = false, leadingIcon, onLongPress, onPress, subtitle, title, value, }) => {
13
15
  const theme = usePsMobileTheme();
14
16
  const isInteractive = onPress !== undefined || hasMenu;
15
17
  const hasSecondLine = subtitle !== undefined || badge !== undefined;
16
- return (_jsxs(Pressable, { accessibilityRole: onPress === undefined ? undefined : 'button', accessibilityState: isSelectable ? { selected: isSelected } : undefined, delayLongPress: PsLayoutConfig.longPressDelayMs, disabled: !isInteractive, onLongPress: hasMenu ? onLongPress : undefined, onPress: onPress, style: ({ pressed }) => ({
18
+ const isStacked = isValueStacked && value !== undefined;
19
+ return (_jsxs(Pressable, { android_ripple: PsRippleService.resolve(theme, PsRippleKind.Surface), accessibilityRole: onPress === undefined ? undefined : 'button', accessibilityState: isSelectable ? { selected: isSelected } : undefined, delayLongPress: PsLayoutConfig.longPressDelayMs, disabled: !isInteractive, onLongPress: hasMenu ? onLongPress : undefined, onPress: onPress, style: ({ pressed }) => ({
17
20
  alignItems: 'center',
18
- backgroundColor: pressed
19
- ? PsMobileColorService.withAlpha(theme.ink, PsMobileControlConfig.pressedAlpha)
20
- : theme.surface,
21
+ backgroundColor: PsListRowStyleService.background(isSelectable && isSelected, pressed, theme),
21
22
  flexDirection: 'row',
22
23
  gap: PsLayoutConfig.headerSlotGap,
23
24
  minHeight: hasSecondLine
@@ -36,11 +37,11 @@ export const PsListRowBody = ({ badge, hasChevron = false, hasMenu, isSelectable
36
37
  alignItems: 'center',
37
38
  flexDirection: 'row',
38
39
  gap: PsLayoutConfig.headerSlotGap,
39
- }, children: [_jsx(PsText, { numberOfLines: 1, style: { flex: 1, flexShrink: 1 }, weight: 'semibold', children: title }), value === undefined ? null : (_jsx(PsText, { ellipsizeMode: 'middle', numberOfLines: 1, style: {
40
+ }, children: [_jsx(PsText, { numberOfLines: 1, style: { flex: 1, flexShrink: 1 }, tone: isStacked ? 'muted' : 'ink', variant: isStacked ? 'small' : undefined, weight: 'semibold', children: title }), value === undefined || isStacked ? null : (_jsx(PsText, { ellipsizeMode: 'middle', numberOfLines: 1, style: {
40
41
  flexShrink: 1,
41
42
  maxWidth: PsLayoutConfig.rowValueMaxWidth,
42
43
  textAlign: 'right',
43
- }, variant: 'numeric', children: value }))] }), hasSecondLine ? (_jsxs(View, { style: {
44
+ }, variant: 'numeric', children: value }))] }), isStacked ? _jsx(PsText, { children: value }) : null, hasSecondLine ? (_jsxs(View, { style: {
44
45
  alignItems: 'center',
45
46
  flexDirection: 'row',
46
47
  gap: PsLayoutConfig.headerSlotGap,
@@ -0,0 +1,10 @@
1
+ import { type ReactElement } from 'react';
2
+ import type { PsMenuItem } from '../../interfaces/ps-menu-item';
3
+ import type { PsListRowBodyProps } from './ps-list-row-body';
4
+ export interface PsListRowMenuProps {
5
+ children: ReactElement<PsListRowBodyProps>;
6
+ items: PsMenuItem[];
7
+ onPress?: () => void;
8
+ title: string;
9
+ }
10
+ export declare const PsListRowMenu: ({ children, items, onPress, title }: PsListRowMenuProps) => import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cloneElement } from 'react';
3
+ import { View } from 'react-native';
4
+ import { usePsHaptics } from '../../hooks/use-ps-haptics';
5
+ import { usePsMenuAnchor } from '../../hooks/use-ps-menu-anchor';
6
+ import { PsActionMenuService } from '../../services/ps-action-menu-service';
7
+ import { PsMenuPopup } from '../ps-menu-popup/ps-menu-popup';
8
+ import { PsMenuPopupHeader } from '../ps-menu-popup/ps-menu-popup-header';
9
+ import { PsMenuPopupRow } from '../ps-menu-popup/ps-menu-popup-row';
10
+ export const PsListRowMenu = ({ children, items, onPress, title }) => {
11
+ const haptic = usePsHaptics();
12
+ const menu = usePsMenuAnchor();
13
+ const entries = PsActionMenuService.flatten(PsActionMenuService.sections(items, undefined));
14
+ const hasMenu = entries.length > 0;
15
+ return (_jsxs(View, { collapsable: false, ref: menu.ref, children: [cloneElement(children, {
16
+ hasMenu,
17
+ onLongPress: () => {
18
+ haptic('medium');
19
+ menu.open();
20
+ },
21
+ onPress: onPress === undefined ? children.props.onPress : onPress,
22
+ }), menu.anchor === undefined ? null : (_jsxs(PsMenuPopup, { anchor: menu.anchor, onClose: menu.close, children: [_jsx(PsMenuPopupHeader, { title: title }), entries.map((item) => (_jsx(PsMenuPopupRow, { iconKey: item.iconKey, isChecked: item.isChecked, isDanger: item.isDanger, isDisabled: item.isDisabled, label: item.label, onPress: () => {
23
+ menu.close();
24
+ haptic('selection');
25
+ item.onSelect();
26
+ } }, item.id)))] }))] }));
27
+ };
@@ -1,2 +1,2 @@
1
1
  import type { PsListRowProps } from './ps-list-props';
2
- export declare const PsListRow: ({ actions, badge, hasChevron, isLoading, isSection, isSelectable, isSelected, leadingIcon, leadingSwipe, onPress, skeleton, subtitle, trailingSwipe, title, value, }: PsListRowProps) => import("react").JSX.Element;
2
+ export declare const PsListRow: ({ actions, badge, hasChevron, href, isLoading, isSection, isSelectable, isSelected, isValueStacked, leadingIcon, leadingSwipe, onPress, preview, skeleton, subtitle, trailingSwipe, title, value, }: PsListRowProps) => import("react").JSX.Element;
@@ -2,14 +2,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { View } from 'react-native';
3
3
  import { PsListService } from '../../services/ps-list-service';
4
4
  import { PsListContextMenu } from './ps-list-context-menu';
5
+ import { PsListLinkMenu } from './ps-list-link-menu';
5
6
  import { PsListRowBody } from './ps-list-row-body';
6
7
  import { PsListRowSkeleton } from './ps-list-row-skeleton';
7
8
  import { PsListSwipeRow } from './ps-list-swipe-row';
8
- export const PsListRow = ({ actions, badge, hasChevron, isLoading = false, isSection, isSelectable, isSelected, leadingIcon, leadingSwipe, onPress, skeleton, subtitle, trailingSwipe, title, value, }) => {
9
+ export const PsListRow = ({ actions, badge, hasChevron, href, isLoading = false, isSection, isSelectable, isSelected, isValueStacked, leadingIcon, leadingSwipe, onPress, preview, skeleton, subtitle, trailingSwipe, title, value, }) => {
9
10
  const menuItems = PsListService.menuItems(actions, PsListService.swipes(leadingSwipe, trailingSwipe));
10
11
  if (isLoading)
11
12
  return (_jsx(PsListRowSkeleton, { badge: badge, isSection: isSection, leadingIcon: leadingIcon, skeleton: skeleton, subtitle: subtitle, value: value }));
12
- const row = (_jsx(PsListRowBody, { badge: badge, hasChevron: hasChevron, hasMenu: false, isSelectable: isSelectable, isSelected: isSelected, leadingIcon: leadingIcon, onLongPress: () => undefined, onPress: onPress, subtitle: subtitle, title: title, value: value }));
13
- const body = menuItems.length === 0 ? (row) : (_jsx(PsListContextMenu, { items: menuItems, title: title, children: row }));
13
+ const row = (_jsx(PsListRowBody, { badge: badge, hasChevron: hasChevron, hasMenu: false, isSelectable: isSelectable, isSelected: isSelected, isValueStacked: isValueStacked, leadingIcon: leadingIcon, onLongPress: () => undefined, onPress: onPress, subtitle: subtitle, title: title, value: value }));
14
+ const body = href !== undefined ? (_jsx(PsListLinkMenu, { href: href, items: menuItems, preview: preview, title: title, children: row })) : menuItems.length === 0 ? (row) : (_jsx(PsListContextMenu, { items: menuItems, title: title, children: row }));
14
15
  return (_jsx(View, { accessibilityActions: menuItems.map((item) => ({ label: item.label, name: item.id })), onAccessibilityAction: (event) => menuItems.find((item) => item.id === event.nativeEvent.actionName)?.onSelect(), children: leadingSwipe === undefined && trailingSwipe === undefined ? (body) : (_jsx(PsListSwipeRow, { leading: leadingSwipe, trailing: trailingSwipe, children: body })) }));
15
16
  };
@@ -6,6 +6,7 @@ import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config'
6
6
  import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
7
7
  import { PsNativeMenuService } from '../../services/ps-native-menu-service';
8
8
  import { PsSelectService } from '../../services/ps-select-service';
9
+ import { PsStateService } from '../../services/ps-state-service';
9
10
  import { PsIcon } from '../ps-icon/ps-icon';
10
11
  import { PsNativeMenu } from '../ps-native-menu/ps-native-menu';
11
12
  import { PsText } from '../ps-text/ps-text';
@@ -20,7 +21,7 @@ export const PsListSelectRow = ({ isDisabled = false, isLoading = false, onChang
20
21
  flexDirection: 'row',
21
22
  gap: PsLayoutConfig.headerSlotGap,
22
23
  minHeight: PsLayoutConfig.rowMinHeight,
23
- opacity: isDisabled ? PsMobileControlConfig.disabledOpacity : 1,
24
+ opacity: isDisabled ? PsStateService.disabledOpacity() : 1,
24
25
  paddingHorizontal: PsLayoutConfig.gutter,
25
26
  paddingVertical: PsLayoutConfig.rowPaddingVertical,
26
27
  }, testID: 'ps-list-select-row', children: [_jsxs(View, { style: { flex: 1, gap: PsLayoutConfig.rowLineGap }, children: [_jsx(PsText, { numberOfLines: 1, weight: 'semibold', children: title }), subtitle === undefined ? null : (_jsx(PsText, { tone: 'muted', variant: 'small', children: subtitle }))] }), valueAccessory, _jsx(PsText, { numberOfLines: 1, style: { maxWidth: PsLayoutConfig.rowValueMaxWidth }, tone: 'muted', children: PsSelectService.selectedLabel(options, value) }), _jsx(PsIcon, { color: theme.muted, iconKey: PsIconKey.Sort, size: PsMobileControlConfig.iconSizeInline })] })) }));
@@ -0,0 +1,4 @@
1
+ export * from './ps-menu-popup';
2
+ export * from './ps-menu-popup-divider';
3
+ export * from './ps-menu-popup-header';
4
+ export * from './ps-menu-popup-row';
@@ -0,0 +1,4 @@
1
+ export * from './ps-menu-popup';
2
+ export * from './ps-menu-popup-divider';
3
+ export * from './ps-menu-popup-header';
4
+ export * from './ps-menu-popup-row';
@@ -0,0 +1 @@
1
+ export declare const PsMenuPopupDivider: () => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { View } from 'react-native';
3
+ import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
4
+ export const PsMenuPopupDivider = () => {
5
+ const theme = usePsMobileTheme();
6
+ return _jsx(View, { style: { backgroundColor: theme.line, height: 1 } });
7
+ };
@@ -0,0 +1,5 @@
1
+ export interface PsMenuPopupHeaderProps {
2
+ subtitle?: string;
3
+ title: string;
4
+ }
5
+ export declare const PsMenuPopupHeader: ({ subtitle, title }: PsMenuPopupHeaderProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { View } from 'react-native';
3
+ import { PsMenuPopupConfig } from '../../constants/ps-menu-popup-config';
4
+ import { PsText } from '../ps-text/ps-text';
5
+ export const PsMenuPopupHeader = ({ subtitle, title }) => (_jsxs(View, { style: {
6
+ paddingHorizontal: PsMenuPopupConfig.rowPaddingHorizontal,
7
+ paddingVertical: PsMenuPopupConfig.paddingVertical,
8
+ }, children: [_jsx(PsText, { numberOfLines: 1, weight: 'semibold', children: title }), subtitle === undefined ? null : (_jsx(PsText, { numberOfLines: 1, tone: 'muted', variant: 'small', children: subtitle }))] }));
@@ -0,0 +1,12 @@
1
+ import type { PsMobileIconKey } from '../../constants/ps-mobile-icon-key';
2
+ export interface PsMenuPopupRowProps {
3
+ iconKey?: PsMobileIconKey;
4
+ isChecked?: boolean;
5
+ isDanger?: boolean;
6
+ isDisabled?: boolean;
7
+ isWarning?: boolean;
8
+ label: string;
9
+ onPress: () => void;
10
+ subtitle?: string;
11
+ }
12
+ export declare const PsMenuPopupRow: ({ iconKey, isChecked, isDanger, isDisabled, isWarning, label, onPress, subtitle, }: PsMenuPopupRowProps) => import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PsIconKey } from '@pallasoft/ps-icons';
3
+ import { Pressable, View } from 'react-native';
4
+ import { PsMenuPopupConfig } from '../../constants/ps-menu-popup-config';
5
+ import { PsMobileControlConfig } from '../../constants/ps-mobile-control-config';
6
+ import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
7
+ import { PsStateService } from '../../services/ps-state-service';
8
+ import { PsIcon } from '../ps-icon/ps-icon';
9
+ import { PsText } from '../ps-text/ps-text';
10
+ export const PsMenuPopupRow = ({ iconKey, isChecked = false, isDanger = false, isDisabled = false, isWarning = false, label, onPress, subtitle, }) => {
11
+ const theme = usePsMobileTheme();
12
+ const tint = isDanger ? theme.danger : theme.ink;
13
+ return (_jsxs(Pressable, { accessibilityRole: 'menuitem', accessibilityState: { disabled: isDisabled, selected: isChecked }, disabled: isDisabled, onPress: onPress, style: ({ pressed }) => ({
14
+ alignItems: 'center',
15
+ backgroundColor: pressed ? theme.primarySoft : 'transparent',
16
+ flexDirection: 'row',
17
+ gap: PsMobileControlConfig.rowSpacing,
18
+ minHeight: PsMenuPopupConfig.rowHeight,
19
+ opacity: isDisabled ? PsStateService.disabledOpacity() : 1,
20
+ paddingHorizontal: PsMenuPopupConfig.rowPaddingHorizontal,
21
+ }), children: [iconKey === undefined ? null : _jsx(PsIcon, { color: tint, iconKey: iconKey }), _jsxs(View, { style: { flex: 1 }, children: [_jsx(PsText, { numberOfLines: 1, tone: isDanger ? 'danger' : 'ink', weight: isChecked ? 'semibold' : 'regular', children: label }), subtitle === undefined ? null : (_jsx(PsText, { numberOfLines: 1, tone: isWarning ? 'warning' : 'muted', variant: 'small', children: subtitle }))] }), isChecked ? _jsx(PsIcon, { color: theme.primaryText, iconKey: PsIconKey.Check }) : null] }));
22
+ };
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { PsMenuAnchor } from '../../interfaces/ps-menu-anchor';
3
+ export interface PsMenuPopupProps {
4
+ anchor: PsMenuAnchor;
5
+ children: ReactNode;
6
+ isFullWidth?: boolean;
7
+ onClose: () => void;
8
+ }
9
+ export declare const PsMenuPopup: ({ anchor, children, isFullWidth, onClose, }: PsMenuPopupProps) => import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Modal, Pressable, ScrollView, StyleSheet, View, useWindowDimensions } from 'react-native';
4
+ import { PsMenuPopupConfig } from '../../constants/ps-menu-popup-config';
5
+ import { usePsMobileTheme } from '../../hooks/use-ps-mobile-theme';
6
+ import { PsMenuPopupService } from '../../services/ps-menu-popup-service';
7
+ export const PsMenuPopup = ({ anchor, children, isFullWidth = false, onClose, }) => {
8
+ const theme = usePsMobileTheme();
9
+ const window = useWindowDimensions();
10
+ const [size, setSize] = useState(undefined);
11
+ const layout = size === undefined
12
+ ? undefined
13
+ : PsMenuPopupService.layout(anchor, window, size.height, size.width, isFullWidth);
14
+ return (_jsxs(Modal, { animationType: 'fade', navigationBarTranslucent: true, onRequestClose: onClose, statusBarTranslucent: true, transparent: true, visible: true, children: [_jsx(Pressable, { accessibilityElementsHidden: true, onPress: onClose, style: StyleSheet.absoluteFill, testID: 'ps-menu-popup-backdrop' }), _jsx(View, { onLayout: (event) => {
15
+ if (size === undefined)
16
+ setSize({
17
+ height: event.nativeEvent.layout.height,
18
+ width: event.nativeEvent.layout.width,
19
+ });
20
+ }, pointerEvents: layout === undefined ? 'none' : 'auto', style: {
21
+ backgroundColor: theme.surface,
22
+ borderColor: theme.line,
23
+ borderRadius: PsMenuPopupConfig.radius,
24
+ borderWidth: 1,
25
+ left: layout === undefined ? 0 : layout.left,
26
+ maxHeight: layout === undefined ? undefined : layout.maxHeight,
27
+ maxWidth: PsMenuPopupConfig.maxWidth,
28
+ minWidth: isFullWidth ? undefined : PsMenuPopupConfig.minWidth,
29
+ opacity: layout === undefined ? 0 : 1,
30
+ overflow: 'hidden',
31
+ position: 'absolute',
32
+ top: layout === undefined ? 0 : layout.top,
33
+ width: layout === undefined ? undefined : layout.width,
34
+ }, testID: 'ps-menu-popup', children: _jsx(ScrollView, { bounces: false, contentContainerStyle: { paddingVertical: PsMenuPopupConfig.paddingVertical }, children: children }) })] }));
35
+ };
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { PallasoftProductBrand } from '@pallasoft/ps-design-system';
2
3
  import type { PsChartPaletteColors } from '../../interfaces/ps-chart-palette-colors';
3
4
  import type { PsColorSchemeChoice } from '../../interfaces/ps-color-scheme-choice';
4
5
  export interface PsMobileThemeProviderProps {
@@ -6,8 +7,10 @@ export interface PsMobileThemeProviderProps {
6
7
  children: ReactNode;
7
8
  colorScheme?: PsColorSchemeChoice;
8
9
  hasHaptics?: boolean;
10
+ isBrandChart?: boolean;
9
11
  isReduceMotion?: boolean;
10
- primaryColor: string;
11
- primaryContrastColor: string;
12
+ primaryColor?: string;
13
+ primaryContrastColor?: string;
14
+ product?: PallasoftProductBrand;
12
15
  secondaryColor?: string;
13
16
  }
@@ -1,2 +1,2 @@
1
1
  import type { PsMobileThemeProviderProps } from './ps-mobile-theme-provider-props';
2
- export declare const PsMobileThemeProvider: ({ chartPalette, children, colorScheme, hasHaptics, isReduceMotion, primaryColor, primaryContrastColor, secondaryColor, }: PsMobileThemeProviderProps) => import("react").JSX.Element;
2
+ export declare const PsMobileThemeProvider: ({ chartPalette, children, colorScheme, hasHaptics, isBrandChart, isReduceMotion, primaryColor, primaryContrastColor, product, secondaryColor, }: PsMobileThemeProviderProps) => import("react").JSX.Element;
@@ -1,32 +1,48 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
+ import { ThemeProvider } from 'expo-router';
3
4
  import { useColorScheme } from 'react-native';
4
5
  import { useReducedMotion } from 'react-native-reanimated';
5
6
  import { PsMobileThemeContext } from '../../contexts/ps-mobile-theme-context';
7
+ import { PsMobileBrandService } from '../../services/ps-mobile-brand-service';
6
8
  import { PsMobileThemeService } from '../../services/ps-mobile-theme-service';
7
- export const PsMobileThemeProvider = ({ chartPalette, children, colorScheme, hasHaptics, isReduceMotion, primaryColor, primaryContrastColor, secondaryColor, }) => {
9
+ import { PsNavigationThemeService } from '../../services/ps-navigation-theme-service';
10
+ export const PsMobileThemeProvider = ({ chartPalette, children, colorScheme, hasHaptics, isBrandChart, isReduceMotion, primaryColor, primaryContrastColor, product, secondaryColor, }) => {
8
11
  const scheme = useColorScheme();
9
12
  const isSystemReduced = useReducedMotion();
10
13
  const isDark = colorScheme === undefined || colorScheme === 'system'
11
14
  ? scheme === 'dark'
12
15
  : colorScheme === 'dark';
13
16
  const isReduced = isSystemReduced || isReduceMotion === true;
14
- const theme = useMemo(() => PsMobileThemeService.create({
15
- chart: chartPalette === undefined ? undefined : isDark ? chartPalette.dark : chartPalette.light,
16
- hasHaptics,
17
- isDark,
18
- isReduceMotion: isReduced,
19
- primary: primaryColor,
20
- primaryContrast: primaryContrastColor,
21
- secondary: secondaryColor,
22
- }), [
17
+ const theme = useMemo(() => {
18
+ const brand = PsMobileBrandService.resolve({
19
+ primaryColor,
20
+ primaryContrastColor,
21
+ product,
22
+ secondaryColor,
23
+ });
24
+ return PsMobileThemeService.create({
25
+ chart: chartPalette === undefined ? undefined : isDark ? chartPalette.dark : chartPalette.light,
26
+ hasBrandSecondary: secondaryColor !== undefined,
27
+ hasHaptics,
28
+ isBrandChart,
29
+ isDark,
30
+ isReduceMotion: isReduced,
31
+ primary: brand.primary,
32
+ primaryContrast: brand.primaryContrast,
33
+ secondary: brand.secondary,
34
+ });
35
+ }, [
23
36
  chartPalette,
24
37
  hasHaptics,
38
+ isBrandChart,
25
39
  isDark,
26
40
  isReduced,
27
41
  primaryColor,
28
42
  primaryContrastColor,
43
+ product,
29
44
  secondaryColor,
30
45
  ]);
31
- return _jsx(PsMobileThemeContext.Provider, { value: theme, children: children });
46
+ const navigation = useMemo(() => PsNavigationThemeService.from(theme), [theme]);
47
+ return (_jsx(PsMobileThemeContext.Provider, { value: theme, children: _jsx(ThemeProvider, { value: navigation, children: children }) }));
32
48
  };