@ezpg/app-ui 0.1.0 → 0.2.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 (346) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/module/blocks/brand-profile-card/brand-profile-card.js +0 -2
  3. package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -1
  4. package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js +190 -0
  5. package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js.map +1 -0
  6. package/lib/module/blocks/bulk-ship-list/index.js +4 -0
  7. package/lib/module/blocks/bulk-ship-list/index.js.map +1 -0
  8. package/lib/module/blocks/claim-row/claim-row.js +34 -35
  9. package/lib/module/blocks/claim-row/claim-row.js.map +1 -1
  10. package/lib/module/blocks/claim-row/index.js +1 -1
  11. package/lib/module/blocks/claim-row/index.js.map +1 -1
  12. package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +0 -2
  13. package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -1
  14. package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +0 -2
  15. package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -1
  16. package/lib/module/blocks/credit-wallet/credit-wallet.js +3 -5
  17. package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -1
  18. package/lib/module/blocks/generation-progress/generation-progress.js +157 -0
  19. package/lib/module/blocks/generation-progress/generation-progress.js.map +1 -0
  20. package/lib/module/blocks/generation-progress/index.js +4 -0
  21. package/lib/module/blocks/generation-progress/index.js.map +1 -0
  22. package/lib/module/blocks/image-grid/image-grid.js +19 -15
  23. package/lib/module/blocks/image-grid/image-grid.js.map +1 -1
  24. package/lib/module/blocks/index.js +3 -0
  25. package/lib/module/blocks/index.js.map +1 -1
  26. package/lib/module/blocks/internal/card.js +49 -10
  27. package/lib/module/blocks/internal/card.js.map +1 -1
  28. package/lib/module/blocks/internal/format.js +0 -6
  29. package/lib/module/blocks/internal/format.js.map +1 -1
  30. package/lib/module/blocks/invoice-row/invoice-row.js +0 -2
  31. package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -1
  32. package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +0 -2
  33. package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -1
  34. package/lib/module/blocks/oauth-buttons/oauth-buttons.js +0 -3
  35. package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
  36. package/lib/module/blocks/option-editor/option-editor.js +22 -12
  37. package/lib/module/blocks/option-editor/option-editor.js.map +1 -1
  38. package/lib/module/blocks/order-card/order-card.js +10 -15
  39. package/lib/module/blocks/order-card/order-card.js.map +1 -1
  40. package/lib/module/blocks/plan-card/plan-card.js +9 -5
  41. package/lib/module/blocks/plan-card/plan-card.js.map +1 -1
  42. package/lib/module/blocks/product-list-empty/product-list-empty.js +0 -2
  43. package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -1
  44. package/lib/module/blocks/review-row/review-row.js +0 -8
  45. package/lib/module/blocks/review-row/review-row.js.map +1 -1
  46. package/lib/module/blocks/sales-chart/sales-chart.js +0 -2
  47. package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -1
  48. package/lib/module/blocks/selection-bar/index.js +4 -0
  49. package/lib/module/blocks/selection-bar/index.js.map +1 -0
  50. package/lib/module/blocks/selection-bar/selection-bar.js +69 -0
  51. package/lib/module/blocks/selection-bar/selection-bar.js.map +1 -0
  52. package/lib/module/blocks/service-state-banner/service-state-banner.js +11 -5
  53. package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -1
  54. package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +0 -2
  55. package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -1
  56. package/lib/module/blocks/site-preview-frame/site-preview-frame.js +12 -2
  57. package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -1
  58. package/lib/module/blocks/stat-card/stat-card.js +0 -2
  59. package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
  60. package/lib/module/blocks/step-screen/step-screen.js +0 -2
  61. package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
  62. package/lib/module/blocks/supply-item-card/supply-item-card.js +0 -6
  63. package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -1
  64. package/lib/module/charts/line-chart.js +10 -1
  65. package/lib/module/charts/line-chart.js.map +1 -1
  66. package/lib/module/charts/scale.js +0 -6
  67. package/lib/module/charts/scale.js.map +1 -1
  68. package/lib/module/charts/sparkline.js +0 -1
  69. package/lib/module/charts/sparkline.js.map +1 -1
  70. package/lib/module/charts/summary.js +0 -1
  71. package/lib/module/charts/summary.js.map +1 -1
  72. package/lib/module/components/button/button.js.map +1 -1
  73. package/lib/module/components/chip/chip.js +14 -0
  74. package/lib/module/components/chip/chip.js.map +1 -1
  75. package/lib/module/components/chip-group/chip-group.js +1 -0
  76. package/lib/module/components/chip-group/chip-group.js.map +1 -1
  77. package/lib/module/components/dialog/dialog.js +0 -2
  78. package/lib/module/components/dialog/dialog.js.map +1 -1
  79. package/lib/module/components/divider/divider.js +0 -1
  80. package/lib/module/components/divider/divider.js.map +1 -1
  81. package/lib/module/components/empty-state/empty-state.js +0 -10
  82. package/lib/module/components/empty-state/empty-state.js.map +1 -1
  83. package/lib/module/components/field/field.js +52 -3
  84. package/lib/module/components/field/field.js.map +1 -1
  85. package/lib/module/components/list-row/list-row.js.map +1 -1
  86. package/lib/module/components/photo/photo.js +0 -3
  87. package/lib/module/components/photo/photo.js.map +1 -1
  88. package/lib/module/components/price/price.js +0 -2
  89. package/lib/module/components/price/price.js.map +1 -1
  90. package/lib/module/components/progress-bar/index.js +4 -0
  91. package/lib/module/components/progress-bar/index.js.map +1 -0
  92. package/lib/module/components/progress-bar/progress-bar.js +92 -0
  93. package/lib/module/components/progress-bar/progress-bar.js.map +1 -0
  94. package/lib/module/components/search-field/search-field.js.map +1 -1
  95. package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
  96. package/lib/module/components/sheet/sheet.js.map +1 -1
  97. package/lib/module/components/skeleton/skeleton.js +0 -1
  98. package/lib/module/components/skeleton/skeleton.js.map +1 -1
  99. package/lib/module/components/status-badge/status-badge.js.map +1 -1
  100. package/lib/module/components/switch/switch.js +4 -3
  101. package/lib/module/components/switch/switch.js.map +1 -1
  102. package/lib/module/components/text/text.js.map +1 -1
  103. package/lib/module/components/toast/toast.js +0 -8
  104. package/lib/module/components/toast/toast.js.map +1 -1
  105. package/lib/module/components/wizard-steps/wizard-steps.js +0 -2
  106. package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -1
  107. package/lib/module/index.js +1 -0
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/internal/glyphs.js +0 -4
  110. package/lib/module/internal/glyphs.js.map +1 -1
  111. package/lib/module/internal/icon.js +0 -2
  112. package/lib/module/internal/icon.js.map +1 -1
  113. package/lib/module/internal/overlay.js +0 -5
  114. package/lib/module/internal/overlay.js.map +1 -1
  115. package/lib/module/internal/pressable-base.js +0 -1
  116. package/lib/module/internal/pressable-base.js.map +1 -1
  117. package/lib/module/internal/use-reduced-motion.js +0 -4
  118. package/lib/module/internal/use-reduced-motion.js.map +1 -1
  119. package/lib/module/sortable/move.js +0 -1
  120. package/lib/module/sortable/move.js.map +1 -1
  121. package/lib/module/sortable/sortable-grid.js +0 -6
  122. package/lib/module/sortable/sortable-grid.js.map +1 -1
  123. package/lib/module/sortable/sortable-list.js +0 -1
  124. package/lib/module/sortable/sortable-list.js.map +1 -1
  125. package/lib/module/theme/create-theme.js +0 -6
  126. package/lib/module/theme/create-theme.js.map +1 -1
  127. package/lib/module/theme/theme-provider.js +0 -2
  128. package/lib/module/theme/theme-provider.js.map +1 -1
  129. package/lib/module/theme/tokens.js +0 -1
  130. package/lib/module/theme/tokens.js.map +1 -1
  131. package/lib/module/utils/color.js +0 -5
  132. package/lib/module/utils/color.js.map +1 -1
  133. package/lib/module/utils/styles.js +0 -5
  134. package/lib/module/utils/styles.js.map +1 -1
  135. package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +0 -2
  136. package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -1
  137. package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts +24 -0
  138. package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts.map +1 -0
  139. package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts +2 -0
  140. package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts.map +1 -0
  141. package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +5 -12
  142. package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -1
  143. package/lib/typescript/src/blocks/claim-row/index.d.ts +1 -1
  144. package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -1
  145. package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +0 -2
  146. package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
  147. package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +0 -4
  148. package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -1
  149. package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +1 -3
  150. package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -1
  151. package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts +17 -0
  152. package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts.map +1 -0
  153. package/lib/typescript/src/blocks/generation-progress/index.d.ts +2 -0
  154. package/lib/typescript/src/blocks/generation-progress/index.d.ts.map +1 -0
  155. package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +0 -6
  156. package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
  157. package/lib/typescript/src/blocks/index.d.ts +3 -0
  158. package/lib/typescript/src/blocks/index.d.ts.map +1 -1
  159. package/lib/typescript/src/blocks/internal/card.d.ts +3 -2
  160. package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -1
  161. package/lib/typescript/src/blocks/internal/format.d.ts +0 -3
  162. package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -1
  163. package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +0 -7
  164. package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -1
  165. package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +0 -2
  166. package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -1
  167. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +0 -7
  168. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
  169. package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +3 -5
  170. package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -1
  171. package/lib/typescript/src/blocks/order-card/order-card.d.ts +4 -12
  172. package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -1
  173. package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +2 -13
  174. package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -1
  175. package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +0 -5
  176. package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -1
  177. package/lib/typescript/src/blocks/review-row/review-row.d.ts +0 -9
  178. package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -1
  179. package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +0 -5
  180. package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -1
  181. package/lib/typescript/src/blocks/selection-bar/index.d.ts +2 -0
  182. package/lib/typescript/src/blocks/selection-bar/index.d.ts.map +1 -0
  183. package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts +12 -0
  184. package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts.map +1 -0
  185. package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +3 -4
  186. package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -1
  187. package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +0 -1
  188. package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -1
  189. package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +3 -5
  190. package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -1
  191. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +0 -5
  192. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
  193. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +0 -6
  194. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
  195. package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +0 -6
  196. package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -1
  197. package/lib/typescript/src/charts/line-chart.d.ts +1 -5
  198. package/lib/typescript/src/charts/line-chart.d.ts.map +1 -1
  199. package/lib/typescript/src/charts/scale.d.ts +0 -3
  200. package/lib/typescript/src/charts/scale.d.ts.map +1 -1
  201. package/lib/typescript/src/charts/sparkline.d.ts +0 -4
  202. package/lib/typescript/src/charts/sparkline.d.ts.map +1 -1
  203. package/lib/typescript/src/charts/summary.d.ts +0 -1
  204. package/lib/typescript/src/charts/summary.d.ts.map +1 -1
  205. package/lib/typescript/src/components/button/button.d.ts +0 -3
  206. package/lib/typescript/src/components/button/button.d.ts.map +1 -1
  207. package/lib/typescript/src/components/chip/chip.d.ts +2 -1
  208. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
  209. package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -2
  210. package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
  211. package/lib/typescript/src/components/dialog/dialog.d.ts +0 -7
  212. package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
  213. package/lib/typescript/src/components/divider/divider.d.ts +0 -2
  214. package/lib/typescript/src/components/divider/divider.d.ts.map +1 -1
  215. package/lib/typescript/src/components/empty-state/empty-state.d.ts +0 -10
  216. package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
  217. package/lib/typescript/src/components/field/field.d.ts +3 -3
  218. package/lib/typescript/src/components/field/field.d.ts.map +1 -1
  219. package/lib/typescript/src/components/list-row/list-row.d.ts +0 -3
  220. package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
  221. package/lib/typescript/src/components/photo/photo.d.ts +0 -4
  222. package/lib/typescript/src/components/photo/photo.d.ts.map +1 -1
  223. package/lib/typescript/src/components/price/price.d.ts +0 -3
  224. package/lib/typescript/src/components/price/price.d.ts.map +1 -1
  225. package/lib/typescript/src/components/progress-bar/index.d.ts +2 -0
  226. package/lib/typescript/src/components/progress-bar/index.d.ts.map +1 -0
  227. package/lib/typescript/src/components/progress-bar/progress-bar.d.ts +9 -0
  228. package/lib/typescript/src/components/progress-bar/progress-bar.d.ts.map +1 -0
  229. package/lib/typescript/src/components/search-field/search-field.d.ts +0 -1
  230. package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -1
  231. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +0 -1
  232. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
  233. package/lib/typescript/src/components/sheet/sheet.d.ts +0 -3
  234. package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -1
  235. package/lib/typescript/src/components/skeleton/skeleton.d.ts +0 -4
  236. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
  237. package/lib/typescript/src/components/status-badge/status-badge.d.ts +0 -1
  238. package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -1
  239. package/lib/typescript/src/components/switch/switch.d.ts.map +1 -1
  240. package/lib/typescript/src/components/text/text.d.ts +0 -3
  241. package/lib/typescript/src/components/text/text.d.ts.map +1 -1
  242. package/lib/typescript/src/components/toast/toast.d.ts +0 -8
  243. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
  244. package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +0 -3
  245. package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -1
  246. package/lib/typescript/src/index.d.ts +1 -0
  247. package/lib/typescript/src/index.d.ts.map +1 -1
  248. package/lib/typescript/src/internal/glyphs.d.ts +0 -1
  249. package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
  250. package/lib/typescript/src/internal/icon.d.ts +0 -1
  251. package/lib/typescript/src/internal/icon.d.ts.map +1 -1
  252. package/lib/typescript/src/internal/overlay.d.ts +0 -4
  253. package/lib/typescript/src/internal/overlay.d.ts.map +1 -1
  254. package/lib/typescript/src/internal/pressable-base.d.ts +0 -3
  255. package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -1
  256. package/lib/typescript/src/internal/use-reduced-motion.d.ts +0 -1
  257. package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -1
  258. package/lib/typescript/src/sortable/move.d.ts +0 -1
  259. package/lib/typescript/src/sortable/move.d.ts.map +1 -1
  260. package/lib/typescript/src/sortable/sortable-grid.d.ts +0 -12
  261. package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -1
  262. package/lib/typescript/src/sortable/sortable-list.d.ts +0 -1
  263. package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -1
  264. package/lib/typescript/src/theme/create-theme.d.ts +0 -4
  265. package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
  266. package/lib/typescript/src/theme/theme-provider.d.ts +0 -3
  267. package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -1
  268. package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
  269. package/lib/typescript/src/types/index.d.ts +0 -7
  270. package/lib/typescript/src/types/index.d.ts.map +1 -1
  271. package/lib/typescript/src/utils/color.d.ts +0 -2
  272. package/lib/typescript/src/utils/color.d.ts.map +1 -1
  273. package/lib/typescript/src/utils/styles.d.ts +0 -5
  274. package/lib/typescript/src/utils/styles.d.ts.map +1 -1
  275. package/package.json +1 -1
  276. package/src/blocks/brand-profile-card/brand-profile-card.tsx +0 -2
  277. package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +187 -0
  278. package/src/blocks/bulk-ship-list/index.ts +8 -0
  279. package/src/blocks/claim-row/claim-row.tsx +67 -54
  280. package/src/blocks/claim-row/index.ts +1 -0
  281. package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +0 -2
  282. package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +0 -4
  283. package/src/blocks/credit-wallet/credit-wallet.tsx +20 -14
  284. package/src/blocks/generation-progress/generation-progress.tsx +180 -0
  285. package/src/blocks/generation-progress/index.ts +6 -0
  286. package/src/blocks/image-grid/image-grid.tsx +10 -14
  287. package/src/blocks/index.tsx +3 -0
  288. package/src/blocks/internal/card.tsx +47 -3
  289. package/src/blocks/internal/format.ts +0 -3
  290. package/src/blocks/invoice-row/invoice-row.tsx +0 -7
  291. package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +0 -2
  292. package/src/blocks/oauth-buttons/oauth-buttons.tsx +0 -8
  293. package/src/blocks/option-editor/option-editor.tsx +24 -10
  294. package/src/blocks/order-card/order-card.tsx +20 -28
  295. package/src/blocks/plan-card/plan-card.tsx +18 -16
  296. package/src/blocks/product-list-empty/product-list-empty.tsx +0 -5
  297. package/src/blocks/review-row/review-row.tsx +0 -10
  298. package/src/blocks/sales-chart/sales-chart.tsx +0 -5
  299. package/src/blocks/selection-bar/index.ts +1 -0
  300. package/src/blocks/selection-bar/selection-bar.tsx +63 -0
  301. package/src/blocks/service-state-banner/service-state-banner.tsx +16 -5
  302. package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +0 -1
  303. package/src/blocks/site-preview-frame/site-preview-frame.tsx +20 -5
  304. package/src/blocks/stat-card/stat-card.tsx +0 -5
  305. package/src/blocks/step-screen/step-screen.tsx +0 -6
  306. package/src/blocks/supply-item-card/supply-item-card.tsx +0 -6
  307. package/src/charts/line-chart.tsx +11 -6
  308. package/src/charts/scale.ts +0 -3
  309. package/src/charts/sparkline.tsx +0 -4
  310. package/src/charts/summary.ts +0 -1
  311. package/src/components/button/button.tsx +0 -3
  312. package/src/components/chip/chip.tsx +17 -0
  313. package/src/components/chip-group/chip-group.tsx +2 -2
  314. package/src/components/dialog/dialog.tsx +0 -7
  315. package/src/components/divider/divider.tsx +0 -2
  316. package/src/components/empty-state/empty-state.tsx +0 -11
  317. package/src/components/field/field.tsx +54 -4
  318. package/src/components/list-row/list-row.tsx +0 -3
  319. package/src/components/photo/photo.tsx +0 -5
  320. package/src/components/price/price.tsx +0 -3
  321. package/src/components/progress-bar/index.ts +1 -0
  322. package/src/components/progress-bar/progress-bar.tsx +80 -0
  323. package/src/components/search-field/search-field.tsx +0 -1
  324. package/src/components/segmented-tabs/segmented-tabs.tsx +0 -1
  325. package/src/components/sheet/sheet.tsx +0 -3
  326. package/src/components/skeleton/skeleton.tsx +0 -4
  327. package/src/components/status-badge/status-badge.tsx +0 -1
  328. package/src/components/switch/switch.tsx +5 -3
  329. package/src/components/text/text.tsx +0 -3
  330. package/src/components/toast/toast.tsx +0 -11
  331. package/src/components/wizard-steps/wizard-steps.tsx +0 -3
  332. package/src/index.tsx +1 -0
  333. package/src/internal/glyphs.tsx +0 -3
  334. package/src/internal/icon.tsx +0 -1
  335. package/src/internal/overlay.tsx +0 -4
  336. package/src/internal/pressable-base.tsx +0 -3
  337. package/src/internal/use-reduced-motion.ts +0 -2
  338. package/src/sortable/move.ts +0 -1
  339. package/src/sortable/sortable-grid.tsx +0 -12
  340. package/src/sortable/sortable-list.tsx +0 -1
  341. package/src/theme/create-theme.ts +0 -5
  342. package/src/theme/theme-provider.tsx +0 -3
  343. package/src/theme/tokens.ts +0 -1
  344. package/src/types/index.ts +0 -7
  345. package/src/utils/color.ts +0 -3
  346. package/src/utils/styles.ts +0 -5
@@ -7,10 +7,9 @@ import { Card } from '../internal/card';
7
7
 
8
8
  export type CreditWalletProps = {
9
9
  balance: number;
10
- /** 이번 달에 사라지는 크레딧. 0보다 크면 보여준다 */
11
10
  expiring?: number;
12
11
  todayUsed: number;
13
- dailyLimit: number;
12
+ dailyLimit: number | null;
14
13
  onBuy?: () => void;
15
14
  onHistory?: () => void;
16
15
  style?: StyleProp<ViewStyle>;
@@ -43,7 +42,6 @@ const useStyles = makeStyles((t) => ({
43
42
  action: { flex: 1 },
44
43
  }));
45
44
 
46
- /** 보유 크레딧과 오늘 생성 횟수 */
47
45
  export function CreditWallet({
48
46
  balance,
49
47
  expiring,
@@ -54,7 +52,12 @@ export function CreditWallet({
54
52
  style,
55
53
  }: CreditWalletProps) {
56
54
  const s = useStyles();
57
- const ratio = dailyLimit > 0 ? Math.min(1, todayUsed / dailyLimit) : 1;
55
+ const ratio =
56
+ dailyLimit === null
57
+ ? 0
58
+ : dailyLimit > 0
59
+ ? Math.min(1, todayUsed / dailyLimit)
60
+ : 1;
58
61
  return (
59
62
  <View style={[s.root, style]}>
60
63
  <Card>
@@ -87,18 +90,21 @@ export function CreditWallet({
87
90
  <View style={s.row}>
88
91
  <Text weight="semibold">오늘 생성</Text>
89
92
  <Text>
90
- <Text weight="bold">{todayUsed}</Text> / {dailyLimit}
93
+ <Text weight="bold">{todayUsed}</Text> /{' '}
94
+ {dailyLimit === null ? '무제한' : dailyLimit}
91
95
  </Text>
92
96
  </View>
93
- <View
94
- accessible
95
- accessibilityRole="progressbar"
96
- accessibilityLabel="오늘 생성"
97
- accessibilityValue={{ min: 0, max: dailyLimit, now: todayUsed }}
98
- style={s.meter}
99
- >
100
- <View style={[s.fill, { width: `${ratio * 100}%` }]} />
101
- </View>
97
+ {dailyLimit === null ? null : (
98
+ <View
99
+ accessible
100
+ accessibilityRole="progressbar"
101
+ accessibilityLabel="오늘 생성"
102
+ accessibilityValue={{ min: 0, max: dailyLimit, now: todayUsed }}
103
+ style={s.meter}
104
+ >
105
+ <View style={[s.fill, { width: `${ratio * 100}%` }]} />
106
+ </View>
107
+ )}
102
108
  </Card>
103
109
  </View>
104
110
  );
@@ -0,0 +1,180 @@
1
+ import {
2
+ ActivityIndicator,
3
+ View,
4
+ type StyleProp,
5
+ type ViewStyle,
6
+ } from 'react-native';
7
+ import { Button } from '../../components/button/button';
8
+ import { Text } from '../../components/text/text';
9
+ import { AlertGlyph, CheckGlyph } from '../../internal/glyphs';
10
+ import { useTheme } from '../../theme/theme-provider';
11
+ import { makeStyles } from '../../utils/styles';
12
+ import { Card } from '../internal/card';
13
+
14
+ export type GenerationStatus = 'queued' | 'running' | 'done' | 'failed';
15
+
16
+ export type GenerationStep = { key: string; label: string };
17
+
18
+ export type GenerationProgressProps = {
19
+ steps: readonly GenerationStep[];
20
+ current: string | null;
21
+ status: GenerationStatus;
22
+ errorText?: string;
23
+ onRetry?: () => void;
24
+ creditNote?: string;
25
+ style?: StyleProp<ViewStyle>;
26
+ };
27
+
28
+ type StepState = 'done' | 'active' | 'waiting' | 'pending' | 'failed';
29
+
30
+ const HEADLINE: Record<GenerationStatus, string> = {
31
+ queued: '접수했어요. 곧 시작해요',
32
+ running: '만들고 있어요',
33
+ done: '다 만들었어요',
34
+ failed: '만들지 못했어요',
35
+ };
36
+
37
+ const STATE_LABEL: Record<StepState, string> = {
38
+ done: '완료',
39
+ active: '진행 중',
40
+ waiting: '대기 중',
41
+ pending: '대기',
42
+ failed: '실패',
43
+ };
44
+
45
+ const DOT = 24;
46
+
47
+ const useStyles = makeStyles((t) => ({
48
+ list: { gap: t.space[3] },
49
+ row: { flexDirection: 'row', alignItems: 'center', gap: t.space[3] },
50
+ label: { flex: 1 },
51
+ dot: {
52
+ width: DOT,
53
+ height: DOT,
54
+ borderRadius: DOT / 2,
55
+ alignItems: 'center',
56
+ justifyContent: 'center',
57
+ },
58
+ doneDot: { backgroundColor: t.colors.primary },
59
+ pendingDot: { borderWidth: 2, borderColor: t.colors.input },
60
+ waitingDot: { borderWidth: 2, borderColor: t.colors.primary },
61
+ start: { alignSelf: 'flex-start' },
62
+ }));
63
+
64
+ function stepState(
65
+ index: number,
66
+ currentIndex: number,
67
+ status: GenerationStatus
68
+ ): StepState {
69
+ if (status === 'done') return 'done';
70
+ if (currentIndex < 0) return 'pending';
71
+ if (index < currentIndex) return 'done';
72
+ if (index > currentIndex) return 'pending';
73
+ if (status === 'failed') return 'failed';
74
+ return status === 'running' ? 'active' : 'waiting';
75
+ }
76
+
77
+ export function GenerationProgress({
78
+ steps,
79
+ current,
80
+ status,
81
+ errorText,
82
+ onRetry,
83
+ creditNote,
84
+ style,
85
+ }: GenerationProgressProps) {
86
+ const t = useTheme();
87
+ const s = useStyles();
88
+ const currentIndex =
89
+ current === null ? -1 : steps.findIndex((step) => step.key === current);
90
+ const indicator = (state: StepState) => {
91
+ switch (state) {
92
+ case 'done':
93
+ return (
94
+ <View style={[s.dot, s.doneDot]}>
95
+ <CheckGlyph color={t.colors.primaryForeground} size={14} />
96
+ </View>
97
+ );
98
+ case 'active':
99
+ return (
100
+ <View style={s.dot}>
101
+ <ActivityIndicator size="small" color={t.colors.primary} />
102
+ </View>
103
+ );
104
+ case 'failed':
105
+ return (
106
+ <View style={s.dot}>
107
+ <AlertGlyph
108
+ filled
109
+ color={t.colors.destructive}
110
+ onColor={t.colors.destructiveForeground}
111
+ size={DOT}
112
+ />
113
+ </View>
114
+ );
115
+ case 'waiting':
116
+ return <View style={[s.dot, s.waitingDot]} />;
117
+ default:
118
+ return <View style={[s.dot, s.pendingDot]} />;
119
+ }
120
+ };
121
+ return (
122
+ <Card style={style}>
123
+ <Text
124
+ variant="bodyLg"
125
+ weight="bold"
126
+ accessibilityRole="header"
127
+ accessibilityLiveRegion="polite"
128
+ >
129
+ {HEADLINE[status]}
130
+ </Text>
131
+ <View style={s.list}>
132
+ {steps.map((step, i) => {
133
+ const state = stepState(i, currentIndex, status);
134
+ return (
135
+ <View
136
+ key={step.key}
137
+ accessible
138
+ accessibilityLabel={`${step.label}, ${STATE_LABEL[state]}`}
139
+ style={s.row}
140
+ >
141
+ {indicator(state)}
142
+ <Text
143
+ style={s.label}
144
+ tone={
145
+ state === 'failed'
146
+ ? 'destructive'
147
+ : state === 'pending'
148
+ ? 'muted'
149
+ : 'default'
150
+ }
151
+ weight={
152
+ state === 'active' || state === 'failed'
153
+ ? 'semibold'
154
+ : undefined
155
+ }
156
+ >
157
+ {step.label}
158
+ </Text>
159
+ </View>
160
+ );
161
+ })}
162
+ </View>
163
+ {status === 'failed' && errorText ? (
164
+ <Text tone="destructive" accessibilityLiveRegion="polite">
165
+ {errorText}
166
+ </Text>
167
+ ) : null}
168
+ {status === 'failed' && onRetry ? (
169
+ <Button variant="outline" onPress={onRetry} style={s.start}>
170
+ 다시 시도
171
+ </Button>
172
+ ) : null}
173
+ {creditNote ? (
174
+ <Text variant="caption" tone="muted">
175
+ {creditNote}
176
+ </Text>
177
+ ) : null}
178
+ </Card>
179
+ );
180
+ }
@@ -0,0 +1,6 @@
1
+ export {
2
+ GenerationProgress,
3
+ type GenerationProgressProps,
4
+ type GenerationStatus,
5
+ type GenerationStep,
6
+ } from './generation-progress';
@@ -21,16 +21,11 @@ export type GridImage = {
21
21
 
22
22
  export type ImageGridProps = {
23
23
  images: readonly GridImage[];
24
- /** 순서가 바뀌면. 첫 장이 대표 사진 */
25
24
  onImagesChange: (images: GridImage[]) => void;
26
- /** 넘기면 첫 칸에 추가 버튼 */
27
25
  onAdd?: () => void;
28
26
  onRemove?: (id: string) => void;
29
- /** 업로드 실패한 사진 다시 올리기 */
30
27
  onRetry?: (id: string) => void;
31
- /** 기본 10 */
32
28
  max?: number;
33
- /** 기본 4 */
34
29
  columns?: number;
35
30
  style?: StyleProp<ViewStyle>;
36
31
  };
@@ -49,8 +44,9 @@ const useStyles = makeStyles((t) => ({
49
44
  justifyContent: 'center',
50
45
  borderRadius: RADIUS,
51
46
  },
52
- dim: { backgroundColor: 'rgba(0, 0, 0, 0.45)' },
53
- light: { backgroundColor: 'rgba(255, 255, 255, 0.7)' },
47
+ dim: { backgroundColor: `${t.colors.background}B3` },
48
+ light: { gap: 2, backgroundColor: `${t.colors.background}D9` },
49
+ failed: { fontSize: 12, lineHeight: 16, color: t.colors.destructive },
54
50
  cover: {
55
51
  position: 'absolute',
56
52
  left: 0,
@@ -77,7 +73,7 @@ const useStyles = makeStyles((t) => ({
77
73
  borderRadius: 11,
78
74
  alignItems: 'center',
79
75
  justifyContent: 'center',
80
- backgroundColor: '#262626',
76
+ backgroundColor: t.colors.foreground,
81
77
  },
82
78
  add: {
83
79
  aspectRatio: 1,
@@ -100,7 +96,6 @@ const g = StyleSheet.create({
100
96
  head: { position: 'absolute' },
101
97
  });
102
98
 
103
- /** 카메라 모양. svg 없이 테두리로 그린다 */
104
99
  function CameraGlyph({ color, size }: { color: string; size: number }) {
105
100
  const stroke = Math.max(1.5, size / 14);
106
101
  const line = { borderWidth: stroke, borderColor: color };
@@ -145,7 +140,6 @@ function CameraGlyph({ color, size }: { color: string; size: number }) {
145
140
  );
146
141
  }
147
142
 
148
- /** 다시 시도 화살표. 끊긴 원 + 화살촉 */
149
143
  function RetryGlyph({ color, size }: { color: string; size: number }) {
150
144
  const stroke = Math.max(2, size / 11);
151
145
  const ring = size * 0.76;
@@ -181,7 +175,6 @@ function RetryGlyph({ color, size }: { color: string; size: number }) {
181
175
  );
182
176
  }
183
177
 
184
- /** 상품 사진 올리기 · 순서 바꾸기. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다 */
185
178
  export function ImageGrid({
186
179
  images,
187
180
  onImagesChange,
@@ -246,7 +239,7 @@ export function ImageGrid({
246
239
  ) : null}
247
240
  {item.status === 'uploading' ? (
248
241
  <View style={[s.fill, s.dim]}>
249
- <ActivityIndicator color="#ffffff" />
242
+ <ActivityIndicator color={t.colors.foreground} />
250
243
  </View>
251
244
  ) : item.status === 'failed' ? (
252
245
  <PressableBase
@@ -255,7 +248,10 @@ export function ImageGrid({
255
248
  onPress={() => onRetry?.(item.id)}
256
249
  style={[s.fill, s.light]}
257
250
  >
258
- <RetryGlyph color={t.colors.destructive} size={26} />
251
+ <RetryGlyph color={t.colors.destructive} size={22} />
252
+ <Text weight="bold" style={s.failed}>
253
+ 실패
254
+ </Text>
259
255
  </PressableBase>
260
256
  ) : null}
261
257
  {onRemove && item.status !== 'uploading' ? (
@@ -265,7 +261,7 @@ export function ImageGrid({
265
261
  style={s.remove}
266
262
  >
267
263
  <View style={s.removeDot}>
268
- <CloseGlyph color="#ffffff" size={12} />
264
+ <CloseGlyph color={t.colors.background} size={12} />
269
265
  </View>
270
266
  </PressableBase>
271
267
  ) : null}
@@ -1,8 +1,10 @@
1
1
  export * from './brand-profile-card';
2
+ export * from './bulk-ship-list';
2
3
  export * from './claim-row';
3
4
  export * from './color-swatch-picker';
4
5
  export * from './copy-variant-picker';
5
6
  export * from './credit-wallet';
7
+ export * from './generation-progress';
6
8
  export * from './invoice-row';
7
9
  export * from './logo-candidate-grid';
8
10
  export * from './oauth-buttons';
@@ -10,6 +12,7 @@ export * from './order-card';
10
12
  export * from './plan-card';
11
13
  export * from './product-list-empty';
12
14
  export * from './review-row';
15
+ export * from './selection-bar';
13
16
  export * from './service-state-banner';
14
17
  export * from './shipping-tracking-row';
15
18
  export * from './site-preview-frame';
@@ -1,8 +1,12 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { CheckGlyph } from '../../internal/glyphs';
3
4
  import { PressableBase } from '../../internal/pressable-base';
5
+ import { useTheme } from '../../theme/theme-provider';
4
6
  import { makeStyles } from '../../utils/styles';
5
7
 
8
+ const MARK = 22;
9
+
6
10
  const useStyles = makeStyles((t) => ({
7
11
  card: {
8
12
  gap: t.space[3],
@@ -13,30 +17,70 @@ const useStyles = makeStyles((t) => ({
13
17
  backgroundColor: t.colors.background,
14
18
  },
15
19
  pressed: { backgroundColor: t.colors.muted },
20
+ selected: {
21
+ borderWidth: 2,
22
+ padding: t.space[4] - 1,
23
+ paddingRight: MARK + t.space[3],
24
+ borderColor: t.colors.primary,
25
+ },
26
+ mark: {
27
+ position: 'absolute',
28
+ top: t.space[2],
29
+ right: t.space[2],
30
+ width: MARK,
31
+ height: MARK,
32
+ borderRadius: MARK / 2,
33
+ alignItems: 'center',
34
+ justifyContent: 'center',
35
+ backgroundColor: t.colors.primary,
36
+ },
16
37
  }));
17
38
 
18
- /** blocks 공용 카드 틀. onPress가 있으면 누를 수 있다 */
19
39
  export function Card({
20
40
  children,
21
41
  onPress,
42
+ onLongPress,
43
+ selected,
22
44
  accessibilityLabel,
23
45
  style,
24
46
  }: {
25
47
  children: ReactNode;
26
48
  onPress?: () => void;
49
+ onLongPress?: () => void;
50
+ selected?: boolean;
27
51
  accessibilityLabel?: string;
28
52
  style?: StyleProp<ViewStyle>;
29
53
  }) {
54
+ const t = useTheme();
30
55
  const s = useStyles();
31
- if (!onPress) return <View style={[s.card, style]}>{children}</View>;
56
+ const frame = [s.card, selected && s.selected, style];
57
+ const mark = selected ? (
58
+ <View style={s.mark} testID="card-selected-mark">
59
+ <CheckGlyph color={t.colors.primaryForeground} size={14} />
60
+ </View>
61
+ ) : null;
62
+ if (!onPress && !onLongPress) {
63
+ return (
64
+ <View
65
+ style={frame}
66
+ accessibilityState={selected === undefined ? undefined : { selected }}
67
+ >
68
+ {children}
69
+ {mark}
70
+ </View>
71
+ );
72
+ }
32
73
  return (
33
74
  <PressableBase
34
75
  onPress={onPress}
76
+ onLongPress={onLongPress}
35
77
  accessibilityLabel={accessibilityLabel}
78
+ accessibilityState={selected === undefined ? undefined : { selected }}
36
79
  pressedStyle={s.pressed}
37
- style={[s.card, style]}
80
+ style={frame}
38
81
  >
39
82
  {children}
83
+ {mark}
40
84
  </PressableBase>
41
85
  );
42
86
  }
@@ -1,6 +1,5 @@
1
1
  import { formatPrice } from '../../components/price/price';
2
2
 
3
- /** 420000 → '42만', 12345 → '1.2만', 9000 → '9,000' */
4
3
  export function formatManwon(value: number): string {
5
4
  const abs = Math.abs(value);
6
5
  if (abs < 10000) return formatPrice(value, '');
@@ -9,13 +8,11 @@ export function formatManwon(value: number): string {
9
8
  return `${Number(man.toFixed(digits))}만`;
10
9
  }
11
10
 
12
- /** 전기 대비 증감률(%). 이전 값이 0이면 null */
13
11
  export function changeRate(current: number, previous: number): number | null {
14
12
  if (previous === 0) return null;
15
13
  return ((current - previous) / Math.abs(previous)) * 100;
16
14
  }
17
15
 
18
- /** 마감이 임박했을 때만 문구를 돌려준다. 0 → '오늘 마감', 1 → '내일 마감', 2 → '모레 마감', 그 밖 null */
19
16
  export function formatDeadline(days: number): string | null {
20
17
  if (days < 0) return '기한 지남';
21
18
  return ['오늘 마감', '내일 마감', '모레 마감'][days] ?? null;
@@ -11,18 +11,12 @@ import { Card } from '../internal/card';
11
11
  export type InvoiceStatus = 'paid' | 'failed' | 'refunded';
12
12
 
13
13
  export type InvoiceRowProps = {
14
- /** 예) '베이직 · 10월' */
15
14
  title: string;
16
15
  amount: number;
17
- /** 기본 'paid' */
18
16
  status?: InvoiceStatus;
19
- /** 환불된 금액. 없으면 전액 환불 */
20
17
  refundedAmount?: number;
21
- /** 실패일 때 [결제수단 변경] */
22
18
  onChangePaymentMethod?: () => void;
23
- /** 실패일 때 [다시 결제] */
24
19
  onRetry?: () => void;
25
- /** 다시 결제 진행 중 */
26
20
  retrying?: boolean;
27
21
  onPress?: () => void;
28
22
  style?: StyleProp<ViewStyle>;
@@ -35,7 +29,6 @@ const useStyles = makeStyles((t) => ({
35
29
  action: { flex: 1 },
36
30
  }));
37
31
 
38
- /** 결제 내역 한 건. 실패한 결제는 해결 버튼이 있는 카드로 보여준다 */
39
32
  export function InvoiceRow({
40
33
  title,
41
34
  amount,
@@ -22,7 +22,6 @@ export type LogoCandidateGridProps = {
22
22
  candidates: readonly LogoCandidate[];
23
23
  selectedId: string | null;
24
24
  onSelect: (id: string) => void;
25
- /** 실패한 후보 다시 만들기 */
26
25
  onRetry?: (id: string) => void;
27
26
  style?: StyleProp<ViewStyle>;
28
27
  };
@@ -58,7 +57,6 @@ const useStyles = makeStyles((t) => ({
58
57
  retry: { paddingHorizontal: t.space[4] },
59
58
  }));
60
59
 
61
- /** AI가 만든 로고 후보 고르기 */
62
60
  export function LogoCandidateGrid({
63
61
  candidates,
64
62
  selectedId,
@@ -15,19 +15,12 @@ export type OAuthProvider = 'kakao' | 'naver' | 'google' | 'apple';
15
15
  export type OAuthButtonsProps = {
16
16
  providers: readonly OAuthProvider[];
17
17
  onPress: (provider: OAuthProvider) => void;
18
- /**
19
- * 각 사 공식 로고. 로고는 상표라 패키지에 넣지 않는다.
20
- * 각 사 브랜드 가이드의 에셋을 앱에서 넘긴다.
21
- */
22
18
  icons?: Partial<Record<OAuthProvider, ReactNode>>;
23
- /** 진행 중인 공급자 */
24
19
  loading?: OAuthProvider | null;
25
- /** 문구 바꾸기 */
26
20
  labels?: Partial<Record<OAuthProvider, string>>;
27
21
  style?: StyleProp<ViewStyle>;
28
22
  };
29
23
 
30
- // 각 사 브랜드 가이드의 지정 색. 테마 토큰을 따르지 않는다.
31
24
  const BRAND: Record<
32
25
  OAuthProvider,
33
26
  { bg: string; fg: string; border?: string; label: string }
@@ -62,7 +55,6 @@ const useStyles = makeStyles((t) => ({
62
55
  label: { fontSize: 15, fontWeight: '600', fontFamily: t.fontFamily },
63
56
  }));
64
57
 
65
- /** 소셜 로그인 버튼 묶음. Apple은 iOS에서만 보인다 */
66
58
  export function OAuthButtons({
67
59
  providers,
68
60
  onPress,
@@ -11,16 +11,15 @@ import { SortableList } from '../../sortable/sortable-list';
11
11
  export type ProductOption = {
12
12
  id: string;
13
13
  name: string;
14
- /** 기본 가격에 더하는 금액 */
15
14
  priceDelta: number;
16
- /** false면 판매 중지(품절) */
17
15
  active: boolean;
16
+ note?: string;
18
17
  };
19
18
 
20
19
  export type OptionEditorProps = {
21
20
  options: readonly ProductOption[];
22
21
  onOptionsChange: (options: ProductOption[]) => void;
23
- /** 옵션 눌러 수정 (앱에서 Sheet 등으로) */
22
+ onActiveChange?: (id: string, active: boolean) => void;
24
23
  onEdit?: (id: string) => void;
25
24
  onAdd?: () => void;
26
25
  style?: StyleProp<ViewStyle>;
@@ -44,7 +43,7 @@ const useStyles = makeStyles((t) => ({
44
43
  },
45
44
  separator: { borderTopWidth: 1, borderTopColor: t.colors.border },
46
45
  pressed: { backgroundColor: t.colors.muted },
47
- name: { flex: 1 },
46
+ body: { flex: 1, paddingVertical: t.space[2] },
48
47
  price: { fontVariant: ['tabular-nums'] },
49
48
  grip: {
50
49
  width: 20,
@@ -60,17 +59,25 @@ const useStyles = makeStyles((t) => ({
60
59
  },
61
60
  }));
62
61
 
63
- /** 상품 옵션(1단) 목록. 손잡이로 순서를 바꾼다. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다 */
62
+ function formatPriceDelta(delta: number): string {
63
+ return delta > 0 ? `+${formatPrice(delta)}` : formatPrice(delta);
64
+ }
65
+
64
66
  export function OptionEditor({
65
67
  options,
66
68
  onOptionsChange,
69
+ onActiveChange,
67
70
  onEdit,
68
71
  onAdd,
69
72
  style,
70
73
  }: OptionEditorProps) {
71
74
  const s = useStyles();
72
75
  const setActive = (id: string, active: boolean) =>
73
- onOptionsChange(options.map((o) => (o.id === id ? { ...o, active } : o)));
76
+ onActiveChange
77
+ ? onActiveChange(id, active)
78
+ : onOptionsChange(
79
+ options.map((o) => (o.id === id ? { ...o, active } : o))
80
+ );
74
81
  return (
75
82
  <View style={[s.root, style]}>
76
83
  <View style={s.list}>
@@ -96,12 +103,19 @@ export function OptionEditor({
96
103
  <View style={s.bar} />
97
104
  </View>
98
105
  </SortableHandle>
99
- <Text tone={tone} style={s.name} numberOfLines={1}>
100
- {item.name}
101
- </Text>
106
+ <View style={s.body}>
107
+ <Text tone={tone} numberOfLines={1}>
108
+ {item.name}
109
+ </Text>
110
+ {item.note ? (
111
+ <Text variant="caption" tone="muted" numberOfLines={2}>
112
+ {item.note}
113
+ </Text>
114
+ ) : null}
115
+ </View>
102
116
  {item.priceDelta ? (
103
117
  <Text tone={tone} style={s.price}>
104
- +{formatPrice(item.priceDelta)}
118
+ {formatPriceDelta(item.priceDelta)}
105
119
  </Text>
106
120
  ) : null}
107
121
  <Switch