@ezpg/app-ui 0.21.0 → 0.23.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 (486) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/module/adjust/adjust-template.js +1 -0
  3. package/lib/module/adjust/adjust-template.js.map +1 -1
  4. package/lib/module/adjust/axis-adjust.js +181 -0
  5. package/lib/module/adjust/axis-adjust.js.map +1 -0
  6. package/lib/module/adjust/axis-dial.js +2 -2
  7. package/lib/module/adjust/axis-dial.js.map +1 -1
  8. package/lib/module/adjust/axis-tabs.js +81 -0
  9. package/lib/module/adjust/axis-tabs.js.map +1 -0
  10. package/lib/module/adjust/axis-wheel.js +286 -0
  11. package/lib/module/adjust/axis-wheel.js.map +1 -0
  12. package/lib/module/adjust/dial-strip.js +6 -4
  13. package/lib/module/adjust/dial-strip.js.map +1 -1
  14. package/lib/module/adjust/index.js +4 -0
  15. package/lib/module/adjust/index.js.map +1 -1
  16. package/lib/module/adjust/store-sample.js +436 -0
  17. package/lib/module/adjust/store-sample.js.map +1 -0
  18. package/lib/module/blocks/chat-message/chat-message.js +1 -0
  19. package/lib/module/blocks/chat-message/chat-message.js.map +1 -1
  20. package/lib/module/blocks/choice-art/choice-art.js +2 -0
  21. package/lib/module/blocks/choice-art/choice-art.js.map +1 -1
  22. package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
  23. package/lib/module/blocks/color-tune/store-sample.js +13 -6
  24. package/lib/module/blocks/color-tune/store-sample.js.map +1 -1
  25. package/lib/module/blocks/color-tune/swatch-card.js +1 -1
  26. package/lib/module/blocks/color-tune/swatch-card.js.map +1 -1
  27. package/lib/module/blocks/detail-editor/compare-slider.js +6 -2
  28. package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
  29. package/lib/module/blocks/detail-editor/detail-canvas.js +195 -61
  30. package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
  31. package/lib/module/blocks/detail-editor/detail-types.js +57 -0
  32. package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
  33. package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
  34. package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
  35. package/lib/module/blocks/detail-editor/focus-context.js +1 -0
  36. package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
  37. package/lib/module/blocks/detail-editor/index.js +2 -2
  38. package/lib/module/blocks/detail-editor/index.js.map +1 -1
  39. package/lib/module/blocks/detail-editor/keep-words.js +34 -0
  40. package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
  41. package/lib/module/blocks/detail-editor/layout-picker.js +195 -8
  42. package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
  43. package/lib/module/blocks/detail-request/detail-request.js +213 -0
  44. package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
  45. package/lib/module/blocks/detail-request/index.js +4 -0
  46. package/lib/module/blocks/detail-request/index.js.map +1 -0
  47. package/lib/module/blocks/detail-studio/action-chips.js +73 -0
  48. package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
  49. package/lib/module/blocks/detail-studio/adjust-tiles.js +4 -3
  50. package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
  51. package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
  52. package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
  53. package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
  54. package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
  55. package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
  56. package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
  57. package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
  58. package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
  59. package/lib/module/blocks/detail-studio/image-prompt.js +9 -10
  60. package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
  61. package/lib/module/blocks/detail-studio/index.js +7 -5
  62. package/lib/module/blocks/detail-studio/index.js.map +1 -1
  63. package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
  64. package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
  65. package/lib/module/blocks/detail-studio/section-cover.js +41 -0
  66. package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
  67. package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
  68. package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
  69. package/lib/module/blocks/detail-studio/section-kind-grid.js +4 -3
  70. package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
  71. package/lib/module/blocks/detail-studio/section-settings.js +127 -61
  72. package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
  73. package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
  74. package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
  75. package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
  76. package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
  77. package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
  78. package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
  79. package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
  80. package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
  81. package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
  82. package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
  83. package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
  84. package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
  85. package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
  86. package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
  87. package/lib/module/blocks/detail-studio/text-format-panel.js +20 -8
  88. package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
  89. package/lib/module/blocks/draft-box/draft-box.js +3 -0
  90. package/lib/module/blocks/draft-box/draft-box.js.map +1 -1
  91. package/lib/module/blocks/index.js +1 -0
  92. package/lib/module/blocks/index.js.map +1 -1
  93. package/lib/module/blocks/oauth-buttons/oauth-buttons.js +1 -0
  94. package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
  95. package/lib/module/blocks/order-block/order-block.js +19 -5
  96. package/lib/module/blocks/order-block/order-block.js.map +1 -1
  97. package/lib/module/blocks/product-tile/product-tile.js +4 -1
  98. package/lib/module/blocks/product-tile/product-tile.js.map +1 -1
  99. package/lib/module/blocks/question-accordion/question-accordion.js +1 -2
  100. package/lib/module/blocks/question-accordion/question-accordion.js.map +1 -1
  101. package/lib/module/blocks/question-pager/question-pager.js +2 -1
  102. package/lib/module/blocks/question-pager/question-pager.js.map +1 -1
  103. package/lib/module/blocks/review-card/review-card.js +4 -0
  104. package/lib/module/blocks/review-card/review-card.js.map +1 -1
  105. package/lib/module/blocks/send-bar/send-bar.js +1 -0
  106. package/lib/module/blocks/send-bar/send-bar.js.map +1 -1
  107. package/lib/module/blocks/stage-bar/stage-bar.js +3 -2
  108. package/lib/module/blocks/stage-bar/stage-bar.js.map +1 -1
  109. package/lib/module/blocks/stat-card/stat-card.js +4 -1
  110. package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
  111. package/lib/module/blocks/step-screen/step-screen.js +5 -2
  112. package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
  113. package/lib/module/blocks/store-top/store-top.js +8 -3
  114. package/lib/module/blocks/store-top/store-top.js.map +1 -1
  115. package/lib/module/blocks/summary-cards/summary-cards.js +10 -3
  116. package/lib/module/blocks/summary-cards/summary-cards.js.map +1 -1
  117. package/lib/module/blocks/task-tiles/task-tiles.js +3 -2
  118. package/lib/module/blocks/task-tiles/task-tiles.js.map +1 -1
  119. package/lib/module/components/amount-summary/amount-summary.js +7 -1
  120. package/lib/module/components/amount-summary/amount-summary.js.map +1 -1
  121. package/lib/module/components/button/button.js +19 -5
  122. package/lib/module/components/button/button.js.map +1 -1
  123. package/lib/module/components/calendar/calendar.js +7 -4
  124. package/lib/module/components/calendar/calendar.js.map +1 -1
  125. package/lib/module/components/chip/chip.js +7 -3
  126. package/lib/module/components/chip/chip.js.map +1 -1
  127. package/lib/module/components/chip-group/chip-group.js +1 -0
  128. package/lib/module/components/chip-group/chip-group.js.map +1 -1
  129. package/lib/module/components/circle-grid/circle-grid.js +1 -0
  130. package/lib/module/components/circle-grid/circle-grid.js.map +1 -1
  131. package/lib/module/components/credit/credit.js +8 -4
  132. package/lib/module/components/credit/credit.js.map +1 -1
  133. package/lib/module/components/dialog/dialog.js +2 -0
  134. package/lib/module/components/dialog/dialog.js.map +1 -1
  135. package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
  136. package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
  137. package/lib/module/components/empty-state/empty-state.js +1 -0
  138. package/lib/module/components/empty-state/empty-state.js.map +1 -1
  139. package/lib/module/components/fact-list/fact-list.js +1 -0
  140. package/lib/module/components/fact-list/fact-list.js.map +1 -1
  141. package/lib/module/components/field/field.js +4 -0
  142. package/lib/module/components/field/field.js.map +1 -1
  143. package/lib/module/components/filter-tabs/filter-tabs.js +2 -1
  144. package/lib/module/components/filter-tabs/filter-tabs.js.map +1 -1
  145. package/lib/module/components/list-row/list-row.js +23 -6
  146. package/lib/module/components/list-row/list-row.js.map +1 -1
  147. package/lib/module/components/page-header/page-header.js +1 -0
  148. package/lib/module/components/page-header/page-header.js.map +1 -1
  149. package/lib/module/components/pill/pill.js +1 -0
  150. package/lib/module/components/pill/pill.js.map +1 -1
  151. package/lib/module/components/segmented-control/segmented-control.js +5 -1
  152. package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
  153. package/lib/module/components/segmented-tabs/segmented-tabs.js +3 -2
  154. package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
  155. package/lib/module/components/skeleton/skeleton.js +4 -2
  156. package/lib/module/components/skeleton/skeleton.js.map +1 -1
  157. package/lib/module/components/slider/slider.js +53 -16
  158. package/lib/module/components/slider/slider.js.map +1 -1
  159. package/lib/module/components/status-steps/status-steps.js +2 -0
  160. package/lib/module/components/status-steps/status-steps.js.map +1 -1
  161. package/lib/module/components/text/figures.js +82 -0
  162. package/lib/module/components/text/figures.js.map +1 -0
  163. package/lib/module/components/text/index.js +1 -0
  164. package/lib/module/components/text/index.js.map +1 -1
  165. package/lib/module/components/text/metrics.js +5 -0
  166. package/lib/module/components/text/metrics.js.map +1 -0
  167. package/lib/module/components/text/text.js +31 -2
  168. package/lib/module/components/text/text.js.map +1 -1
  169. package/lib/module/components/tile-grid/tile-grid.js +3 -2
  170. package/lib/module/components/tile-grid/tile-grid.js.map +1 -1
  171. package/lib/module/components/toast/toast.js +4 -1
  172. package/lib/module/components/toast/toast.js.map +1 -1
  173. package/lib/module/components/value-rows/value-rows.js +8 -1
  174. package/lib/module/components/value-rows/value-rows.js.map +1 -1
  175. package/lib/module/index.js +1 -1
  176. package/lib/module/index.js.map +1 -1
  177. package/lib/module/internal/field-label.js +2 -0
  178. package/lib/module/internal/field-label.js.map +1 -1
  179. package/lib/module/internal/glyphs.js +2 -1
  180. package/lib/module/internal/glyphs.js.map +1 -1
  181. package/lib/module/internal/line-icons.js +1 -0
  182. package/lib/module/internal/line-icons.js.map +1 -1
  183. package/lib/module/internal/retry-glyph.js +5 -2
  184. package/lib/module/internal/retry-glyph.js.map +1 -1
  185. package/lib/module/internal/roll-text.js +10 -2
  186. package/lib/module/internal/roll-text.js.map +1 -1
  187. package/lib/module/internal/sample-tiles.js +2 -0
  188. package/lib/module/internal/sample-tiles.js.map +1 -1
  189. package/lib/module/internal/undo-glyph.js +11 -8
  190. package/lib/module/internal/undo-glyph.js.map +1 -1
  191. package/lib/module/sortable/section-board.js +75 -89
  192. package/lib/module/sortable/section-board.js.map +1 -1
  193. package/lib/module/templates/design-pick-template.js +9 -1
  194. package/lib/module/templates/design-pick-template.js.map +1 -1
  195. package/lib/module/templates/intro-template.js +3 -3
  196. package/lib/module/templates/intro-template.js.map +1 -1
  197. package/lib/module/templates/preview-edit-template.js +3 -0
  198. package/lib/module/templates/preview-edit-template.js.map +1 -1
  199. package/lib/module/templates/result-template.js +2 -1
  200. package/lib/module/templates/result-template.js.map +1 -1
  201. package/lib/module/templates/scroll-templates.js +12 -2
  202. package/lib/module/templates/scroll-templates.js.map +1 -1
  203. package/lib/module/templates/sheet-form-template.js +4 -0
  204. package/lib/module/templates/sheet-form-template.js.map +1 -1
  205. package/lib/module/theme/base.js +16 -9
  206. package/lib/module/theme/base.js.map +1 -1
  207. package/lib/module/theme/create-theme.js +6 -2
  208. package/lib/module/theme/create-theme.js.map +1 -1
  209. package/lib/module/theme/tokens.js +23 -2
  210. package/lib/module/theme/tokens.js.map +1 -1
  211. package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
  212. package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
  213. package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
  214. package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
  215. package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
  216. package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
  217. package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
  218. package/lib/typescript/src/adjust/dial-strip.d.ts.map +1 -1
  219. package/lib/typescript/src/adjust/index.d.ts +4 -0
  220. package/lib/typescript/src/adjust/index.d.ts.map +1 -1
  221. package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
  222. package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
  223. package/lib/typescript/src/blocks/chat-message/chat-message.d.ts.map +1 -1
  224. package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -1
  225. package/lib/typescript/src/blocks/color-tune/store-sample.d.ts.map +1 -1
  226. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
  227. package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
  228. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
  229. package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
  230. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
  231. package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
  232. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
  233. package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
  234. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
  235. package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
  236. package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
  237. package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
  238. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
  239. package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
  240. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
  241. package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
  242. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
  243. package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
  244. package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
  245. package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
  246. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
  247. package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
  248. package/lib/typescript/src/blocks/detail-studio/adjust-tiles.d.ts.map +1 -1
  249. package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
  250. package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
  251. package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
  252. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
  253. package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
  254. package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
  255. package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
  256. package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
  257. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
  258. package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
  259. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
  260. package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
  261. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
  262. package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
  263. package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
  264. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
  265. package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
  266. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
  267. package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
  268. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
  269. package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
  270. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
  271. package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
  272. package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
  273. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
  274. package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
  275. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
  276. package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
  277. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
  278. package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
  279. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
  280. package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
  281. package/lib/typescript/src/blocks/draft-box/draft-box.d.ts.map +1 -1
  282. package/lib/typescript/src/blocks/index.d.ts +1 -0
  283. package/lib/typescript/src/blocks/index.d.ts.map +1 -1
  284. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
  285. package/lib/typescript/src/blocks/order-block/order-block.d.ts.map +1 -1
  286. package/lib/typescript/src/blocks/product-tile/product-tile.d.ts.map +1 -1
  287. package/lib/typescript/src/blocks/question-accordion/question-accordion.d.ts.map +1 -1
  288. package/lib/typescript/src/blocks/question-pager/question-pager.d.ts.map +1 -1
  289. package/lib/typescript/src/blocks/review-card/review-card.d.ts.map +1 -1
  290. package/lib/typescript/src/blocks/send-bar/send-bar.d.ts.map +1 -1
  291. package/lib/typescript/src/blocks/stage-bar/stage-bar.d.ts.map +1 -1
  292. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
  293. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
  294. package/lib/typescript/src/blocks/store-top/store-top.d.ts.map +1 -1
  295. package/lib/typescript/src/blocks/summary-cards/summary-cards.d.ts.map +1 -1
  296. package/lib/typescript/src/blocks/task-tiles/task-tiles.d.ts.map +1 -1
  297. package/lib/typescript/src/components/amount-summary/amount-summary.d.ts.map +1 -1
  298. package/lib/typescript/src/components/button/button.d.ts +3 -1
  299. package/lib/typescript/src/components/button/button.d.ts.map +1 -1
  300. package/lib/typescript/src/components/calendar/calendar.d.ts.map +1 -1
  301. package/lib/typescript/src/components/chip/chip.d.ts +2 -1
  302. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
  303. package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -0
  304. package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
  305. package/lib/typescript/src/components/circle-grid/circle-grid.d.ts.map +1 -1
  306. package/lib/typescript/src/components/credit/credit.d.ts +1 -0
  307. package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
  308. package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
  309. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
  310. package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  311. package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
  312. package/lib/typescript/src/components/fact-list/fact-list.d.ts.map +1 -1
  313. package/lib/typescript/src/components/field/field.d.ts.map +1 -1
  314. package/lib/typescript/src/components/filter-tabs/filter-tabs.d.ts.map +1 -1
  315. package/lib/typescript/src/components/list-row/list-row.d.ts +3 -1
  316. package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
  317. package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
  318. package/lib/typescript/src/components/pill/pill.d.ts.map +1 -1
  319. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
  320. package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
  321. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
  322. package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
  323. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
  324. package/lib/typescript/src/components/slider/slider.d.ts +2 -1
  325. package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
  326. package/lib/typescript/src/components/status-steps/status-steps.d.ts.map +1 -1
  327. package/lib/typescript/src/components/text/figures.d.ts +12 -0
  328. package/lib/typescript/src/components/text/figures.d.ts.map +1 -0
  329. package/lib/typescript/src/components/text/index.d.ts +1 -0
  330. package/lib/typescript/src/components/text/index.d.ts.map +1 -1
  331. package/lib/typescript/src/components/text/metrics.d.ts +6 -0
  332. package/lib/typescript/src/components/text/metrics.d.ts.map +1 -0
  333. package/lib/typescript/src/components/text/text.d.ts +2 -2
  334. package/lib/typescript/src/components/text/text.d.ts.map +1 -1
  335. package/lib/typescript/src/components/tile-grid/tile-grid.d.ts.map +1 -1
  336. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
  337. package/lib/typescript/src/components/value-rows/value-rows.d.ts.map +1 -1
  338. package/lib/typescript/src/index.d.ts +1 -1
  339. package/lib/typescript/src/index.d.ts.map +1 -1
  340. package/lib/typescript/src/internal/field-label.d.ts.map +1 -1
  341. package/lib/typescript/src/internal/glyphs.d.ts +1 -0
  342. package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
  343. package/lib/typescript/src/internal/line-icons.d.ts +1 -0
  344. package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
  345. package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
  346. package/lib/typescript/src/internal/roll-text.d.ts +3 -2
  347. package/lib/typescript/src/internal/roll-text.d.ts.map +1 -1
  348. package/lib/typescript/src/internal/sample-tiles.d.ts +2 -0
  349. package/lib/typescript/src/internal/sample-tiles.d.ts.map +1 -1
  350. package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
  351. package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
  352. package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
  353. package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
  354. package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -1
  355. package/lib/typescript/src/templates/result-template.d.ts +2 -1
  356. package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
  357. package/lib/typescript/src/templates/scroll-templates.d.ts.map +1 -1
  358. package/lib/typescript/src/templates/sheet-form-template.d.ts.map +1 -1
  359. package/lib/typescript/src/theme/base.d.ts +9 -2
  360. package/lib/typescript/src/theme/base.d.ts.map +1 -1
  361. package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
  362. package/lib/typescript/src/theme/tokens.d.ts +3 -1
  363. package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
  364. package/lib/typescript/src/types/index.d.ts +12 -0
  365. package/lib/typescript/src/types/index.d.ts.map +1 -1
  366. package/package.json +1 -1
  367. package/src/adjust/adjust-template.tsx +1 -0
  368. package/src/adjust/axis-adjust.tsx +206 -0
  369. package/src/adjust/axis-dial.tsx +2 -2
  370. package/src/adjust/axis-tabs.tsx +81 -0
  371. package/src/adjust/axis-wheel.tsx +309 -0
  372. package/src/adjust/dial-strip.tsx +5 -3
  373. package/src/adjust/index.ts +15 -0
  374. package/src/adjust/store-sample.tsx +519 -0
  375. package/src/blocks/chat-message/chat-message.tsx +1 -0
  376. package/src/blocks/choice-art/choice-art.tsx +2 -0
  377. package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
  378. package/src/blocks/color-tune/store-sample.tsx +11 -6
  379. package/src/blocks/color-tune/swatch-card.tsx +1 -1
  380. package/src/blocks/detail-editor/compare-slider.tsx +4 -1
  381. package/src/blocks/detail-editor/detail-canvas.tsx +267 -69
  382. package/src/blocks/detail-editor/detail-types.ts +37 -0
  383. package/src/blocks/detail-editor/draft-preview.tsx +46 -2
  384. package/src/blocks/detail-editor/focus-context.ts +13 -0
  385. package/src/blocks/detail-editor/index.ts +11 -1
  386. package/src/blocks/detail-editor/keep-words.ts +36 -0
  387. package/src/blocks/detail-editor/layout-picker.tsx +191 -6
  388. package/src/blocks/detail-request/detail-request.tsx +198 -0
  389. package/src/blocks/detail-request/index.ts +11 -0
  390. package/src/blocks/detail-studio/action-chips.tsx +78 -0
  391. package/src/blocks/detail-studio/adjust-tiles.tsx +4 -3
  392. package/src/blocks/detail-studio/asset-grid.tsx +30 -16
  393. package/src/blocks/detail-studio/confirm-row.tsx +3 -0
  394. package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
  395. package/src/blocks/detail-studio/edge-fade.tsx +76 -0
  396. package/src/blocks/detail-studio/image-prompt.tsx +7 -9
  397. package/src/blocks/detail-studio/index.ts +19 -16
  398. package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
  399. package/src/blocks/detail-studio/section-cover.tsx +44 -0
  400. package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
  401. package/src/blocks/detail-studio/section-kind-grid.tsx +4 -2
  402. package/src/blocks/detail-studio/section-settings.tsx +124 -69
  403. package/src/blocks/detail-studio/studio-bar.tsx +61 -41
  404. package/src/blocks/detail-studio/studio-dock.tsx +19 -37
  405. package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
  406. package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
  407. package/src/blocks/detail-studio/studio-steps.tsx +58 -0
  408. package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
  409. package/src/blocks/detail-studio/studio-tools.tsx +126 -0
  410. package/src/blocks/detail-studio/text-format-panel.tsx +30 -14
  411. package/src/blocks/draft-box/draft-box.tsx +3 -0
  412. package/src/blocks/index.tsx +1 -0
  413. package/src/blocks/oauth-buttons/oauth-buttons.tsx +1 -0
  414. package/src/blocks/order-block/order-block.tsx +20 -4
  415. package/src/blocks/product-tile/product-tile.tsx +4 -1
  416. package/src/blocks/question-accordion/question-accordion.tsx +0 -1
  417. package/src/blocks/question-pager/question-pager.tsx +2 -1
  418. package/src/blocks/review-card/review-card.tsx +4 -0
  419. package/src/blocks/send-bar/send-bar.tsx +1 -0
  420. package/src/blocks/stage-bar/stage-bar.tsx +3 -2
  421. package/src/blocks/stat-card/stat-card.tsx +2 -1
  422. package/src/blocks/step-screen/step-screen.tsx +5 -2
  423. package/src/blocks/store-top/store-top.tsx +7 -2
  424. package/src/blocks/summary-cards/summary-cards.tsx +4 -3
  425. package/src/blocks/task-tiles/task-tiles.tsx +2 -1
  426. package/src/components/amount-summary/amount-summary.tsx +9 -3
  427. package/src/components/button/button.tsx +18 -5
  428. package/src/components/calendar/calendar.tsx +5 -2
  429. package/src/components/chip/chip.tsx +11 -2
  430. package/src/components/chip-group/chip-group.tsx +2 -0
  431. package/src/components/circle-grid/circle-grid.tsx +5 -1
  432. package/src/components/credit/credit.tsx +11 -4
  433. package/src/components/dialog/dialog.tsx +2 -0
  434. package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
  435. package/src/components/empty-state/empty-state.tsx +1 -0
  436. package/src/components/fact-list/fact-list.tsx +1 -0
  437. package/src/components/field/field.tsx +4 -0
  438. package/src/components/filter-tabs/filter-tabs.tsx +2 -1
  439. package/src/components/list-row/list-row.tsx +40 -5
  440. package/src/components/page-header/page-header.tsx +1 -0
  441. package/src/components/pill/pill.tsx +1 -0
  442. package/src/components/segmented-control/segmented-control.tsx +12 -2
  443. package/src/components/segmented-tabs/segmented-tabs.tsx +2 -1
  444. package/src/components/skeleton/skeleton.tsx +5 -2
  445. package/src/components/slider/slider.tsx +66 -14
  446. package/src/components/status-steps/status-steps.tsx +2 -0
  447. package/src/components/text/figures.tsx +92 -0
  448. package/src/components/text/index.ts +7 -0
  449. package/src/components/text/metrics.ts +5 -0
  450. package/src/components/text/text.tsx +60 -16
  451. package/src/components/tile-grid/tile-grid.tsx +3 -2
  452. package/src/components/toast/toast.tsx +7 -1
  453. package/src/components/value-rows/value-rows.tsx +9 -1
  454. package/src/index.tsx +1 -0
  455. package/src/internal/field-label.tsx +2 -0
  456. package/src/internal/glyphs.tsx +2 -0
  457. package/src/internal/line-icons.ts +2 -0
  458. package/src/internal/retry-glyph.tsx +7 -2
  459. package/src/internal/roll-text.tsx +12 -2
  460. package/src/internal/sample-tiles.tsx +2 -0
  461. package/src/internal/undo-glyph.tsx +12 -11
  462. package/src/sortable/section-board.tsx +73 -76
  463. package/src/templates/design-pick-template.tsx +10 -1
  464. package/src/templates/intro-template.tsx +14 -12
  465. package/src/templates/preview-edit-template.tsx +3 -0
  466. package/src/templates/result-template.tsx +3 -0
  467. package/src/templates/scroll-templates.tsx +11 -2
  468. package/src/templates/sheet-form-template.tsx +4 -0
  469. package/src/theme/base.ts +9 -2
  470. package/src/theme/create-theme.ts +9 -2
  471. package/src/theme/tokens.ts +37 -3
  472. package/src/types/index.ts +13 -0
  473. package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
  474. package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
  475. package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
  476. package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
  477. package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
  478. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
  479. package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
  480. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
  481. package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
  482. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
  483. package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
  484. package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
  485. package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
  486. package/src/blocks/detail-studio/section-thumb.tsx +0 -41
@@ -7,8 +7,14 @@ export {
7
7
  type DetailCanvasProps,
8
8
  type DetailCanvasResult,
9
9
  } from './detail-canvas';
10
+ export type { DetailPart } from './focus-context';
10
11
  export {
12
+ DETAIL_BACKGROUND_COLORS,
11
13
  DETAIL_COLORS,
14
+ DETAIL_HEAD_SIZE,
15
+ DETAIL_TEXT_COLORS,
16
+ DETAIL_TITLE_SIZE,
17
+ detailIsTitle,
12
18
  DETAIL_FONT_FAMILY,
13
19
  DETAIL_LAYOUTS,
14
20
  DETAIL_LIST_LAYOUTS,
@@ -36,4 +42,8 @@ export {
36
42
  type StructureOption,
37
43
  type StructurePickerProps,
38
44
  } from './structure-picker';
39
- export { DraftPreview, type DraftPreviewProps } from './draft-preview';
45
+ export {
46
+ DraftPreview,
47
+ draftPreviewFit,
48
+ type DraftPreviewProps,
49
+ } from './draft-preview';
@@ -0,0 +1,36 @@
1
+ const JOIN = '\u2060';
2
+ const STICK = '\u00A0';
3
+ const HANGUL =
4
+ /[\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF]/;
5
+ const SPACE = /\s/;
6
+ const DOT_BEFORE = / (?=[\u00B7\u2022\u318D](?:\s|$))/g;
7
+ const WORD_BEFORE_NUMBER = /([\uAC00-\uD7A3]) (?=[0-9])/g;
8
+
9
+ function joinWord(word: string): string {
10
+ const chars = Array.from(word);
11
+ let out = chars[0] ?? '';
12
+ for (let i = 1; i < chars.length; i += 1) {
13
+ const prev = chars[i - 1]!;
14
+ const next = chars[i]!;
15
+ out += HANGUL.test(prev) || HANGUL.test(next) ? JOIN + next : next;
16
+ }
17
+ return out;
18
+ }
19
+
20
+ export function keepWords(text: string): string {
21
+ if (!HANGUL.test(text)) return text;
22
+ const glued = text
23
+ .replace(DOT_BEFORE, STICK)
24
+ .replace(WORD_BEFORE_NUMBER, `$1${STICK}`);
25
+ let out = '';
26
+ let word = '';
27
+ for (const ch of glued) {
28
+ if (SPACE.test(ch) && ch !== STICK) {
29
+ out += joinWord(word) + ch;
30
+ word = '';
31
+ } else {
32
+ word += ch;
33
+ }
34
+ }
35
+ return out + joinWord(word);
36
+ }
@@ -10,9 +10,10 @@ export type LayoutPickerProps = {
10
10
  onValueChange: (layout: DetailLayout) => void;
11
11
  labels?: Partial<Record<DetailLayout, string>>;
12
12
  items?: readonly DetailLayout[];
13
+ variant?: 'default' | 'soft';
13
14
  };
14
15
 
15
- const LABELS: Record<DetailLayout, string> = {
16
+ export const LABELS: Record<DetailLayout, string> = {
16
17
  image_top: '사진 위 · 글 아래',
17
18
  text_top: '글 위 · 사진 아래',
18
19
  side: '나란히',
@@ -25,6 +26,11 @@ const LABELS: Record<DetailLayout, string> = {
25
26
  };
26
27
 
27
28
  const DIAGRAM_ROWS = [0, 1, 2];
29
+ const SOFT_TITLE = 6;
30
+ const SOFT_LINE = 4;
31
+ const SOFT_LABEL = 11;
32
+ const SOFT_LABEL_TRACKING = 0.11;
33
+ const SOFT_LABEL_LINE = 1.35;
28
34
 
29
35
  const useStyles = makeStyles((t) => ({
30
36
  row: { gap: t.space[2], paddingHorizontal: t.space[3] },
@@ -93,8 +99,181 @@ const useStyles = makeStyles((t) => ({
93
99
  padding: t.space[1],
94
100
  gap: t.space[1],
95
101
  },
102
+ softRow: { gap: t.space[2], paddingHorizontal: t.space[4] },
103
+ softItem: { width: t.space[16] + t.space[6], gap: t.space[2] },
104
+ softFrame: {
105
+ height: t.space[12] * 2,
106
+ overflow: 'hidden',
107
+ alignItems: 'center',
108
+ justifyContent: 'center',
109
+ gap: t.space[1],
110
+ paddingVertical: t.space[2],
111
+ paddingHorizontal: t.space[3],
112
+ borderRadius: t.radius.md,
113
+ backgroundColor: t.colors.background,
114
+ },
115
+ softLabel: {
116
+ textAlign: 'center',
117
+ color: t.colors.title,
118
+ fontFamily: t.fontFamily,
119
+ fontSize: SOFT_LABEL,
120
+ lineHeight: SOFT_LABEL * SOFT_LABEL_LINE,
121
+ letterSpacing: SOFT_LABEL_TRACKING,
122
+ },
123
+ softTitle: {
124
+ width: '56%',
125
+ height: SOFT_TITLE,
126
+ borderRadius: t.radius.full,
127
+ backgroundColor: t.colors.input,
128
+ },
129
+ softLine: {
130
+ width: '70%',
131
+ height: SOFT_LINE,
132
+ borderRadius: t.radius.full,
133
+ backgroundColor: t.colors.border,
134
+ },
135
+ softPhoto: {
136
+ alignSelf: 'stretch',
137
+ flex: 1,
138
+ borderRadius: t.radius.sm,
139
+ backgroundColor: t.colors.border,
140
+ },
141
+ softFull: {
142
+ position: 'absolute',
143
+ top: 0,
144
+ right: 0,
145
+ bottom: 0,
146
+ left: 0,
147
+ backgroundColor: t.colors.border,
148
+ },
149
+ softSplit: {
150
+ alignSelf: 'stretch',
151
+ flex: 1,
152
+ flexDirection: 'row',
153
+ alignItems: 'center',
154
+ gap: t.space[1],
155
+ },
156
+ softSide: { width: '44%', alignSelf: 'stretch' },
157
+ softSideText: { flex: 1, gap: t.space[1] },
158
+ softWide: { width: '100%' },
159
+ softCard: {
160
+ alignSelf: 'stretch',
161
+ flex: 1,
162
+ alignItems: 'center',
163
+ gap: t.space[1],
164
+ padding: t.space[1],
165
+ borderRadius: t.radius.sm,
166
+ backgroundColor: t.colors.surface,
167
+ },
168
+ softTableRow: {
169
+ alignSelf: 'stretch',
170
+ flexDirection: 'row',
171
+ gap: t.space[1],
172
+ paddingVertical: t.space[1],
173
+ borderTopWidth: 1,
174
+ borderColor: t.colors.border,
175
+ },
176
+ softDot: {
177
+ width: t.space[2],
178
+ height: t.space[2],
179
+ borderRadius: t.radius.full,
180
+ borderWidth: 1,
181
+ borderColor: t.colors.input,
182
+ },
96
183
  }));
97
184
 
185
+ export function SoftDiagram({ layout }: { layout: DetailLayout }) {
186
+ const s = useStyles();
187
+ const title = <View style={s.softTitle} />;
188
+ const line = <View style={s.softLine} />;
189
+ const photo = <View style={s.softPhoto} />;
190
+ switch (layout) {
191
+ case 'image_top':
192
+ return (
193
+ <>
194
+ {photo}
195
+ {title}
196
+ {line}
197
+ </>
198
+ );
199
+ case 'text_top':
200
+ return (
201
+ <>
202
+ {title}
203
+ {line}
204
+ {photo}
205
+ </>
206
+ );
207
+ case 'side':
208
+ return (
209
+ <View style={s.softSplit}>
210
+ <View style={[s.softPhoto, s.softSide]} />
211
+ <View style={s.softSideText}>
212
+ <View style={[s.softTitle, s.softWide]} />
213
+ <View style={[s.softLine, s.softWide]} />
214
+ {line}
215
+ </View>
216
+ </View>
217
+ );
218
+ case 'image':
219
+ return <View style={s.softFull} />;
220
+ case 'two_images':
221
+ return (
222
+ <>
223
+ {title}
224
+ <View style={s.softSplit}>
225
+ {photo}
226
+ {photo}
227
+ </View>
228
+ </>
229
+ );
230
+ case 'card':
231
+ return (
232
+ <View style={s.softCard}>
233
+ {photo}
234
+ {title}
235
+ {line}
236
+ </View>
237
+ );
238
+ case 'text':
239
+ return (
240
+ <>
241
+ {title}
242
+ {line}
243
+ {line}
244
+ {line}
245
+ </>
246
+ );
247
+ case 'table':
248
+ return (
249
+ <>
250
+ {title}
251
+ {DIAGRAM_ROWS.map((row) => (
252
+ <View key={row} style={s.softTableRow}>
253
+ <View style={[s.softLine, s.cellShort]} />
254
+ <View style={[s.softLine, s.cellLong]} />
255
+ </View>
256
+ ))}
257
+ </>
258
+ );
259
+ case 'steps':
260
+ return (
261
+ <>
262
+ {title}
263
+ <View style={s.steps}>
264
+ {DIAGRAM_ROWS.map((row) => (
265
+ <View key={row} style={s.step}>
266
+ <View style={s.softDot} />
267
+ </View>
268
+ ))}
269
+ </View>
270
+ </>
271
+ );
272
+ default:
273
+ return photo;
274
+ }
275
+ }
276
+
98
277
  export function Diagram({ layout }: { layout: DetailLayout }) {
99
278
  const t = useTheme();
100
279
  const s = useStyles();
@@ -206,13 +385,15 @@ export function LayoutPicker({
206
385
  onValueChange,
207
386
  labels,
208
387
  items = DETAIL_LAYOUTS,
388
+ variant = 'default',
209
389
  }: LayoutPickerProps) {
210
390
  const s = useStyles();
391
+ const soft = variant === 'soft';
211
392
  return (
212
393
  <ScrollView
213
394
  horizontal
214
395
  showsHorizontalScrollIndicator={false}
215
- contentContainerStyle={s.row}
396
+ contentContainerStyle={soft ? s.softRow : s.row}
216
397
  accessibilityRole="radiogroup"
217
398
  >
218
399
  {items.map((layout) => {
@@ -225,11 +406,15 @@ export function LayoutPicker({
225
406
  accessibilityState={{ selected: on }}
226
407
  accessibilityLabel={label}
227
408
  onPress={() => onValueChange(layout)}
228
- style={s.item}
409
+ style={soft ? s.softItem : s.item}
229
410
  >
230
411
  <View>
231
- <View style={s.frame}>
232
- <Diagram layout={layout} />
412
+ <View style={soft ? s.softFrame : s.frame}>
413
+ {soft ? (
414
+ <SoftDiagram layout={layout} />
415
+ ) : (
416
+ <Diagram layout={layout} />
417
+ )}
233
418
  </View>
234
419
  {on ? <View pointerEvents="none" style={s.on} /> : null}
235
420
  </View>
@@ -238,7 +423,7 @@ export function LayoutPicker({
238
423
  tone="muted"
239
424
  weight={on ? 'semibold' : undefined}
240
425
  numberOfLines={1}
241
- style={on && s.onLabel}
426
+ style={[soft && s.softLabel, on && s.onLabel]}
242
427
  >
243
428
  {label}
244
429
  </Text>
@@ -0,0 +1,198 @@
1
+ import { useState } from 'react';
2
+ import {
3
+ View,
4
+ type LayoutChangeEvent,
5
+ type StyleProp,
6
+ type ViewStyle,
7
+ } from 'react-native';
8
+ import { Button, type ButtonProps } from '../../components/button/button';
9
+ import { Photo } from '../../components/photo/photo';
10
+ import { Text } from '../../components/text/text';
11
+ import { ImageGlyph, PlusGlyph } from '../../internal/glyphs';
12
+ import { PressableBase } from '../../internal/pressable-base';
13
+ import { useTheme } from '../../theme/theme-provider';
14
+ import { withAlpha } from '../../utils/color';
15
+ import { makeStyles } from '../../utils/styles';
16
+
17
+ export type PhotoMosaicProps = {
18
+ images: readonly string[];
19
+ onPress?: () => void;
20
+ accessibilityLabel?: string;
21
+ };
22
+
23
+ export type FactRow = { label: string; value: string };
24
+
25
+ export type FactRowsProps = {
26
+ rows: readonly FactRow[];
27
+ };
28
+
29
+ export type AddThumbsProps = {
30
+ images: readonly string[];
31
+ onAdd: () => void;
32
+ addLabel: string;
33
+ };
34
+
35
+ export type TintButtonProps = Omit<ButtonProps, 'variant' | 'point' | 'pill'>;
36
+
37
+ const SCRIM = 0.45;
38
+
39
+ const useStyles = makeStyles((t) => ({
40
+ mosaic: { flexDirection: 'row', gap: t.space[2] },
41
+ side: { gap: t.space[2] },
42
+ more: {
43
+ position: 'absolute',
44
+ top: 0,
45
+ right: 0,
46
+ bottom: 0,
47
+ left: 0,
48
+ alignItems: 'center',
49
+ justifyContent: 'center',
50
+ borderRadius: t.radius.md,
51
+ backgroundColor: withAlpha(t.colors.foreground, SCRIM),
52
+ },
53
+ moreLabel: { color: t.colors.surface },
54
+ facts: { borderTopWidth: 1, borderTopColor: t.colors.line },
55
+ fact: {
56
+ flexDirection: 'row',
57
+ gap: t.space[4],
58
+ paddingVertical: t.space[3],
59
+ borderBottomWidth: 1,
60
+ borderBottomColor: t.colors.line,
61
+ },
62
+ factLabel: { width: t.space[16] },
63
+ factValue: { flex: 1 },
64
+ thumbs: { flexDirection: 'row', flexWrap: 'wrap', gap: t.space[2] },
65
+ add: {
66
+ width: t.space[16],
67
+ height: t.space[16],
68
+ alignItems: 'center',
69
+ justifyContent: 'center',
70
+ borderRadius: t.radius.md,
71
+ borderWidth: 1,
72
+ borderStyle: 'dashed',
73
+ borderColor: t.colors.input,
74
+ },
75
+ thumb: { width: t.space[16] },
76
+ tint: {
77
+ paddingHorizontal: t.space[4],
78
+ backgroundColor: t.colors.primaryTint,
79
+ },
80
+ }));
81
+
82
+ function Cell({ uri, style }: { uri?: string; style?: StyleProp<ViewStyle> }) {
83
+ const t = useTheme();
84
+ return (
85
+ <Photo
86
+ source={{ uri: uri ?? '' }}
87
+ radius={t.radius.md}
88
+ fallback={
89
+ <ImageGlyph color={t.colors.mutedForeground} size={t.iconSize.md} />
90
+ }
91
+ style={style}
92
+ />
93
+ );
94
+ }
95
+
96
+ export function PhotoMosaic({
97
+ images,
98
+ onPress,
99
+ accessibilityLabel = '사진',
100
+ }: PhotoMosaicProps) {
101
+ const t = useTheme();
102
+ const s = useStyles();
103
+ const [width, setWidth] = useState(0);
104
+ const gap = t.space[2];
105
+ const small = Math.max(0, (width - gap * 2) / 3);
106
+ const big = small * 2 + gap;
107
+ const extra = images.length - 3;
108
+ return (
109
+ <View
110
+ onLayout={(event: LayoutChangeEvent) =>
111
+ setWidth(event.nativeEvent.layout.width)
112
+ }
113
+ >
114
+ {width > 0 ? (
115
+ <PressableBase
116
+ accessibilityRole="button"
117
+ accessibilityLabel={accessibilityLabel}
118
+ onPress={onPress}
119
+ feedback="small"
120
+ style={s.mosaic}
121
+ >
122
+ <Cell uri={images[0]} style={{ width: big }} />
123
+ <View style={[s.side, { width: small }]}>
124
+ <Cell uri={images[1]} />
125
+ <View>
126
+ <Cell uri={images[2]} />
127
+ {extra > 0 ? (
128
+ <View pointerEvents="none" style={s.more}>
129
+ <Text variant="label" weight="semibold" style={s.moreLabel}>
130
+ {`+${extra}`}
131
+ </Text>
132
+ </View>
133
+ ) : null}
134
+ </View>
135
+ </View>
136
+ </PressableBase>
137
+ ) : null}
138
+ </View>
139
+ );
140
+ }
141
+
142
+ export function FactRows({ rows }: FactRowsProps) {
143
+ const s = useStyles();
144
+ if (!rows.length) return null;
145
+ return (
146
+ <View style={s.facts}>
147
+ {rows.map((row, index) => (
148
+ <View key={`${row.label}-${index}`} style={s.fact}>
149
+ <Text
150
+ variant="label"
151
+ tone="muted"
152
+ numberOfLines={1}
153
+ style={s.factLabel}
154
+ >
155
+ {row.label}
156
+ </Text>
157
+ <Text variant="label" numberOfLines={2} style={s.factValue}>
158
+ {row.value}
159
+ </Text>
160
+ </View>
161
+ ))}
162
+ </View>
163
+ );
164
+ }
165
+
166
+ export function AddThumbs({ images, onAdd, addLabel }: AddThumbsProps) {
167
+ const t = useTheme();
168
+ const s = useStyles();
169
+ return (
170
+ <View style={s.thumbs}>
171
+ <PressableBase
172
+ accessibilityRole="button"
173
+ accessibilityLabel={addLabel}
174
+ onPress={onAdd}
175
+ feedback="small"
176
+ style={s.add}
177
+ >
178
+ <PlusGlyph color={t.colors.mutedForeground} size={t.iconSize.md} />
179
+ </PressableBase>
180
+ {images.map((uri, index) => (
181
+ <PressableBase
182
+ key={`${uri}-${index}`}
183
+ accessibilityRole="imagebutton"
184
+ accessibilityLabel={`${addLabel} ${index + 1}`}
185
+ onPress={onAdd}
186
+ feedback="small"
187
+ >
188
+ <Photo source={{ uri }} radius={t.radius.md} style={s.thumb} />
189
+ </PressableBase>
190
+ ))}
191
+ </View>
192
+ );
193
+ }
194
+
195
+ export function TintButton({ style, ...rest }: TintButtonProps) {
196
+ const s = useStyles();
197
+ return <Button {...rest} variant="secondary" point style={[s.tint, style]} />;
198
+ }
@@ -0,0 +1,11 @@
1
+ export {
2
+ AddThumbs,
3
+ FactRows,
4
+ PhotoMosaic,
5
+ TintButton,
6
+ type AddThumbsProps,
7
+ type FactRow,
8
+ type FactRowsProps,
9
+ type PhotoMosaicProps,
10
+ type TintButtonProps,
11
+ } from './detail-request';
@@ -0,0 +1,78 @@
1
+ import { ScrollView, Text as RNText, type ViewStyle } from 'react-native';
2
+ import { haptic } from '../../internal/haptics';
3
+ import { PressableBase } from '../../internal/pressable-base';
4
+ import { useTheme } from '../../theme/theme-provider';
5
+ import { makeStyles } from '../../utils/styles';
6
+
7
+ export type ActionChipsProps<T extends string> = {
8
+ items: readonly { value: T; label: string }[];
9
+ onPick: (value: T) => void;
10
+ disabled?: boolean;
11
+ inset?: ViewStyle;
12
+ };
13
+
14
+ const useStyles = makeStyles((t) => ({
15
+ scroll: { flexGrow: 0 },
16
+ track: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
17
+ chip: {
18
+ height: t.space[8] + t.space[1],
19
+ justifyContent: 'center',
20
+ paddingHorizontal: t.space[3],
21
+ borderRadius: t.radius.md,
22
+ borderWidth: 1,
23
+ borderColor: t.colors.border,
24
+ backgroundColor: t.colors.surface,
25
+ },
26
+ label: {
27
+ fontFamily: t.fontFamily,
28
+ fontSize: t.typography.eyebrow.fontSize,
29
+ letterSpacing: t.typography.eyebrow.letterSpacing,
30
+ lineHeight: t.typography.eyebrow.lineHeight,
31
+ fontWeight: t.typography.body.fontWeight,
32
+ },
33
+ }));
34
+
35
+ export function ActionChips<T extends string>({
36
+ items,
37
+ onPick,
38
+ disabled,
39
+ inset,
40
+ }: ActionChipsProps<T>) {
41
+ const t = useTheme();
42
+ const s = useStyles();
43
+ const color = disabled ? t.colors.disabledForeground : t.colors.title;
44
+ return (
45
+ <ScrollView
46
+ horizontal
47
+ showsHorizontalScrollIndicator={false}
48
+ keyboardShouldPersistTaps="handled"
49
+ style={s.scroll}
50
+ contentContainerStyle={[s.track, inset]}
51
+ >
52
+ {items.map((item) => (
53
+ <PressableBase
54
+ key={item.value}
55
+ onPress={() => {
56
+ haptic('select');
57
+ onPick(item.value);
58
+ }}
59
+ disabled={disabled}
60
+ disabledStyle={{}}
61
+ feedback="small"
62
+ accessibilityRole="button"
63
+ accessibilityLabel={item.label}
64
+ touchHeight={t.space[8] + t.space[1]}
65
+ style={s.chip}
66
+ >
67
+ <RNText
68
+ numberOfLines={1}
69
+ maxFontSizeMultiplier={t.maxFontScale}
70
+ style={[s.label, { color }]}
71
+ >
72
+ {item.label}
73
+ </RNText>
74
+ </PressableBase>
75
+ ))}
76
+ </ScrollView>
77
+ );
78
+ }
@@ -31,15 +31,16 @@ const useStyles = makeStyles((t) => ({
31
31
  height: t.space[16] + t.space[2],
32
32
  alignItems: 'center',
33
33
  justifyContent: 'center',
34
- borderRadius: t.radius.lg,
34
+ borderRadius: t.radius.md * 2,
35
35
  backgroundColor: t.colors.background,
36
36
  },
37
37
  cost: { position: 'absolute', top: t.space[2], right: t.space[2] },
38
38
  label: {
39
39
  fontFamily: t.fontFamily,
40
40
  fontSize: t.typography.eyebrow.fontSize,
41
+ letterSpacing: t.typography.eyebrow.letterSpacing,
41
42
  lineHeight: t.typography.eyebrow.lineHeight,
42
- fontWeight: t.typography.eyebrow.fontWeight,
43
+ fontWeight: t.typography.body.fontWeight,
43
44
  color: t.colors.title,
44
45
  },
45
46
  }));
@@ -66,7 +67,7 @@ export function AdjustTiles<T extends string>({
66
67
  <View style={s.box}>
67
68
  {renderIcon(item.icon, {
68
69
  color: t.colors.title,
69
- size: t.iconSize.md,
70
+ size: t.space[6],
70
71
  })}
71
72
  {cost != null ? (
72
73
  <View pointerEvents="none" style={s.cost}>
@@ -1,4 +1,4 @@
1
- import { Fragment } from 'react';
1
+ import { Fragment, useState } from 'react';
2
2
  import { FlatList, Image, View, type ViewStyle } from 'react-native';
3
3
  import { Skeleton } from '../../components/skeleton/skeleton';
4
4
  import { CheckGlyph, PlusGlyph, SparklesGlyph } from '../../internal/glyphs';
@@ -6,6 +6,7 @@ import { PressableBase } from '../../internal/pressable-base';
6
6
  import { useTheme } from '../../theme/theme-provider';
7
7
  import { withAlpha } from '../../utils/color';
8
8
  import { makeStyles } from '../../utils/styles';
9
+ import { EdgeFade, hasMore } from './edge-fade';
9
10
 
10
11
  export type AssetGridItem = {
11
12
  key: string;
@@ -112,6 +113,10 @@ export function AssetGrid({
112
113
  const t = useTheme();
113
114
  const s = useStyles();
114
115
  const picking = !!onValueChange;
116
+ const [view, setView] = useState(0);
117
+ const [content, setContent] = useState(0);
118
+ const [offset, setOffset] = useState(0);
119
+ const more = hasMore(offset, view, content);
115
120
 
116
121
  const cells: Cell[] = [
117
122
  ...(onAdd ? [{ kind: 'add', key: '__add' } as const] : []),
@@ -139,7 +144,7 @@ export function AssetGrid({
139
144
  if (item.pending) {
140
145
  return (
141
146
  <View style={[s.cell, slot]}>
142
- <Skeleton width="100%" height="100%" radius={t.radius.md} />
147
+ <Skeleton width="100%" height="100%" radius={t.radius.md} sheen />
143
148
  </View>
144
149
  );
145
150
  }
@@ -220,19 +225,28 @@ export function AssetGrid({
220
225
  ) : undefined;
221
226
 
222
227
  return (
223
- <FlatList
224
- data={cells}
225
- keyExtractor={(cell) => cell.key}
226
- numColumns={COLUMNS}
227
- renderItem={({ item }) => render(item)}
228
- accessibilityRole={picking ? 'radiogroup' : undefined}
229
- style={s.root}
230
- contentContainerStyle={s.list}
231
- columnWrapperStyle={s.line}
232
- showsVerticalScrollIndicator={false}
233
- onEndReached={onEndReached}
234
- onEndReachedThreshold={0.5}
235
- ListFooterComponent={footer}
236
- />
228
+ <View style={s.root}>
229
+ <FlatList
230
+ data={cells}
231
+ keyExtractor={(cell) => cell.key}
232
+ numColumns={COLUMNS}
233
+ renderItem={({ item }) => render(item)}
234
+ accessibilityRole={picking ? 'radiogroup' : undefined}
235
+ style={s.root}
236
+ contentContainerStyle={s.list}
237
+ columnWrapperStyle={s.line}
238
+ showsVerticalScrollIndicator={false}
239
+ onEndReached={onEndReached}
240
+ onEndReachedThreshold={0.5}
241
+ ListFooterComponent={footer}
242
+ scrollEventThrottle={16}
243
+ onLayout={(e) => setView(e.nativeEvent.layout.height)}
244
+ onContentSizeChange={(_, h) => setContent(h)}
245
+ onScroll={(e) => setOffset(e.nativeEvent.contentOffset.y)}
246
+ />
247
+ {more ? (
248
+ <EdgeFade side="bottom" size={t.space[12]} color={t.colors.surface} />
249
+ ) : null}
250
+ </View>
237
251
  );
238
252
  }