@ezpg/app-ui 0.1.0 → 0.3.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 (354) hide show
  1. package/CHANGELOG.md +25 -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 +1 -3
  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 +20 -16
  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 +3 -5
  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 +11 -16
  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 +1 -3
  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 +12 -6
  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 +1 -3
  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 +3 -3
  73. package/lib/module/components/button/button.js.map +1 -1
  74. package/lib/module/components/chip/chip.js +14 -0
  75. package/lib/module/components/chip/chip.js.map +1 -1
  76. package/lib/module/components/chip-group/chip-group.js +1 -0
  77. package/lib/module/components/chip-group/chip-group.js.map +1 -1
  78. package/lib/module/components/dialog/dialog.js +2 -4
  79. package/lib/module/components/dialog/dialog.js.map +1 -1
  80. package/lib/module/components/divider/divider.js +0 -1
  81. package/lib/module/components/divider/divider.js.map +1 -1
  82. package/lib/module/components/empty-state/empty-state.js +0 -10
  83. package/lib/module/components/empty-state/empty-state.js.map +1 -1
  84. package/lib/module/components/field/field.js +57 -8
  85. package/lib/module/components/field/field.js.map +1 -1
  86. package/lib/module/components/list-row/list-row.js.map +1 -1
  87. package/lib/module/components/photo/photo.js +0 -3
  88. package/lib/module/components/photo/photo.js.map +1 -1
  89. package/lib/module/components/price/price.js +1 -3
  90. package/lib/module/components/price/price.js.map +1 -1
  91. package/lib/module/components/progress-bar/index.js +4 -0
  92. package/lib/module/components/progress-bar/index.js.map +1 -0
  93. package/lib/module/components/progress-bar/progress-bar.js +92 -0
  94. package/lib/module/components/progress-bar/progress-bar.js.map +1 -0
  95. package/lib/module/components/search-field/search-field.js.map +1 -1
  96. package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
  97. package/lib/module/components/sheet/sheet.js.map +1 -1
  98. package/lib/module/components/skeleton/skeleton.js +0 -1
  99. package/lib/module/components/skeleton/skeleton.js.map +1 -1
  100. package/lib/module/components/status-badge/status-badge.js +1 -1
  101. package/lib/module/components/status-badge/status-badge.js.map +1 -1
  102. package/lib/module/components/switch/switch.js +4 -3
  103. package/lib/module/components/switch/switch.js.map +1 -1
  104. package/lib/module/components/text/text.js +2 -2
  105. package/lib/module/components/text/text.js.map +1 -1
  106. package/lib/module/components/toast/toast.js +1 -9
  107. package/lib/module/components/toast/toast.js.map +1 -1
  108. package/lib/module/components/wizard-steps/wizard-steps.js +0 -2
  109. package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -1
  110. package/lib/module/index.js +1 -0
  111. package/lib/module/index.js.map +1 -1
  112. package/lib/module/internal/glyphs.js +0 -4
  113. package/lib/module/internal/glyphs.js.map +1 -1
  114. package/lib/module/internal/icon.js +0 -2
  115. package/lib/module/internal/icon.js.map +1 -1
  116. package/lib/module/internal/overlay.js +0 -5
  117. package/lib/module/internal/overlay.js.map +1 -1
  118. package/lib/module/internal/pressable-base.js +0 -1
  119. package/lib/module/internal/pressable-base.js.map +1 -1
  120. package/lib/module/internal/use-reduced-motion.js +0 -4
  121. package/lib/module/internal/use-reduced-motion.js.map +1 -1
  122. package/lib/module/sortable/move.js +0 -1
  123. package/lib/module/sortable/move.js.map +1 -1
  124. package/lib/module/sortable/sortable-grid.js +0 -6
  125. package/lib/module/sortable/sortable-grid.js.map +1 -1
  126. package/lib/module/sortable/sortable-list.js +0 -1
  127. package/lib/module/sortable/sortable-list.js.map +1 -1
  128. package/lib/module/theme/base.js +108 -0
  129. package/lib/module/theme/base.js.map +1 -0
  130. package/lib/module/theme/create-theme.js +0 -6
  131. package/lib/module/theme/create-theme.js.map +1 -1
  132. package/lib/module/theme/theme-provider.js +0 -2
  133. package/lib/module/theme/theme-provider.js.map +1 -1
  134. package/lib/module/theme/tokens.js +10 -115
  135. package/lib/module/theme/tokens.js.map +1 -1
  136. package/lib/module/utils/color.js +0 -5
  137. package/lib/module/utils/color.js.map +1 -1
  138. package/lib/module/utils/styles.js +0 -5
  139. package/lib/module/utils/styles.js.map +1 -1
  140. package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +0 -2
  141. package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -1
  142. package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts +24 -0
  143. package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts.map +1 -0
  144. package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts +2 -0
  145. package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts.map +1 -0
  146. package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +5 -12
  147. package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -1
  148. package/lib/typescript/src/blocks/claim-row/index.d.ts +1 -1
  149. package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -1
  150. package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +0 -2
  151. package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
  152. package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +0 -4
  153. package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -1
  154. package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +1 -3
  155. package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -1
  156. package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts +17 -0
  157. package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts.map +1 -0
  158. package/lib/typescript/src/blocks/generation-progress/index.d.ts +2 -0
  159. package/lib/typescript/src/blocks/generation-progress/index.d.ts.map +1 -0
  160. package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +0 -6
  161. package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
  162. package/lib/typescript/src/blocks/index.d.ts +3 -0
  163. package/lib/typescript/src/blocks/index.d.ts.map +1 -1
  164. package/lib/typescript/src/blocks/internal/card.d.ts +3 -2
  165. package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -1
  166. package/lib/typescript/src/blocks/internal/format.d.ts +0 -3
  167. package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -1
  168. package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +0 -7
  169. package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -1
  170. package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +0 -2
  171. package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -1
  172. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +0 -7
  173. package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
  174. package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +3 -5
  175. package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -1
  176. package/lib/typescript/src/blocks/order-card/order-card.d.ts +4 -12
  177. package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -1
  178. package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +2 -13
  179. package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -1
  180. package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +0 -5
  181. package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -1
  182. package/lib/typescript/src/blocks/review-row/review-row.d.ts +0 -9
  183. package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -1
  184. package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +0 -5
  185. package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -1
  186. package/lib/typescript/src/blocks/selection-bar/index.d.ts +2 -0
  187. package/lib/typescript/src/blocks/selection-bar/index.d.ts.map +1 -0
  188. package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts +12 -0
  189. package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts.map +1 -0
  190. package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +3 -4
  191. package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -1
  192. package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +0 -1
  193. package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -1
  194. package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +3 -5
  195. package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -1
  196. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +0 -5
  197. package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
  198. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +0 -6
  199. package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
  200. package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +0 -6
  201. package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -1
  202. package/lib/typescript/src/charts/line-chart.d.ts +1 -5
  203. package/lib/typescript/src/charts/line-chart.d.ts.map +1 -1
  204. package/lib/typescript/src/charts/scale.d.ts +0 -3
  205. package/lib/typescript/src/charts/scale.d.ts.map +1 -1
  206. package/lib/typescript/src/charts/sparkline.d.ts +0 -4
  207. package/lib/typescript/src/charts/sparkline.d.ts.map +1 -1
  208. package/lib/typescript/src/charts/summary.d.ts +0 -1
  209. package/lib/typescript/src/charts/summary.d.ts.map +1 -1
  210. package/lib/typescript/src/components/button/button.d.ts +1 -4
  211. package/lib/typescript/src/components/button/button.d.ts.map +1 -1
  212. package/lib/typescript/src/components/chip/chip.d.ts +2 -1
  213. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
  214. package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -2
  215. package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
  216. package/lib/typescript/src/components/dialog/dialog.d.ts +2 -9
  217. package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
  218. package/lib/typescript/src/components/divider/divider.d.ts +0 -2
  219. package/lib/typescript/src/components/divider/divider.d.ts.map +1 -1
  220. package/lib/typescript/src/components/empty-state/empty-state.d.ts +0 -10
  221. package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
  222. package/lib/typescript/src/components/field/field.d.ts +3 -3
  223. package/lib/typescript/src/components/field/field.d.ts.map +1 -1
  224. package/lib/typescript/src/components/list-row/list-row.d.ts +0 -3
  225. package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
  226. package/lib/typescript/src/components/photo/photo.d.ts +0 -4
  227. package/lib/typescript/src/components/photo/photo.d.ts.map +1 -1
  228. package/lib/typescript/src/components/price/price.d.ts +0 -3
  229. package/lib/typescript/src/components/price/price.d.ts.map +1 -1
  230. package/lib/typescript/src/components/progress-bar/index.d.ts +2 -0
  231. package/lib/typescript/src/components/progress-bar/index.d.ts.map +1 -0
  232. package/lib/typescript/src/components/progress-bar/progress-bar.d.ts +9 -0
  233. package/lib/typescript/src/components/progress-bar/progress-bar.d.ts.map +1 -0
  234. package/lib/typescript/src/components/search-field/search-field.d.ts +0 -1
  235. package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -1
  236. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +0 -1
  237. package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
  238. package/lib/typescript/src/components/sheet/sheet.d.ts +0 -3
  239. package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -1
  240. package/lib/typescript/src/components/skeleton/skeleton.d.ts +0 -4
  241. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
  242. package/lib/typescript/src/components/status-badge/status-badge.d.ts +1 -2
  243. package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -1
  244. package/lib/typescript/src/components/switch/switch.d.ts.map +1 -1
  245. package/lib/typescript/src/components/text/text.d.ts +1 -4
  246. package/lib/typescript/src/components/text/text.d.ts.map +1 -1
  247. package/lib/typescript/src/components/toast/toast.d.ts +1 -9
  248. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
  249. package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +0 -3
  250. package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -1
  251. package/lib/typescript/src/index.d.ts +1 -0
  252. package/lib/typescript/src/index.d.ts.map +1 -1
  253. package/lib/typescript/src/internal/glyphs.d.ts +0 -1
  254. package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
  255. package/lib/typescript/src/internal/icon.d.ts +0 -1
  256. package/lib/typescript/src/internal/icon.d.ts.map +1 -1
  257. package/lib/typescript/src/internal/overlay.d.ts +0 -4
  258. package/lib/typescript/src/internal/overlay.d.ts.map +1 -1
  259. package/lib/typescript/src/internal/pressable-base.d.ts +0 -3
  260. package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -1
  261. package/lib/typescript/src/internal/use-reduced-motion.d.ts +0 -1
  262. package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -1
  263. package/lib/typescript/src/sortable/move.d.ts +0 -1
  264. package/lib/typescript/src/sortable/move.d.ts.map +1 -1
  265. package/lib/typescript/src/sortable/sortable-grid.d.ts +0 -12
  266. package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -1
  267. package/lib/typescript/src/sortable/sortable-list.d.ts +0 -1
  268. package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -1
  269. package/lib/typescript/src/theme/base.d.ts +106 -0
  270. package/lib/typescript/src/theme/base.d.ts.map +1 -0
  271. package/lib/typescript/src/theme/create-theme.d.ts +0 -4
  272. package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
  273. package/lib/typescript/src/theme/theme-provider.d.ts +0 -3
  274. package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -1
  275. package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
  276. package/lib/typescript/src/types/index.d.ts +2 -9
  277. package/lib/typescript/src/types/index.d.ts.map +1 -1
  278. package/lib/typescript/src/utils/color.d.ts +0 -2
  279. package/lib/typescript/src/utils/color.d.ts.map +1 -1
  280. package/lib/typescript/src/utils/styles.d.ts +0 -5
  281. package/lib/typescript/src/utils/styles.d.ts.map +1 -1
  282. package/package.json +1 -1
  283. package/src/blocks/brand-profile-card/brand-profile-card.tsx +0 -2
  284. package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +187 -0
  285. package/src/blocks/bulk-ship-list/index.ts +8 -0
  286. package/src/blocks/claim-row/claim-row.tsx +67 -54
  287. package/src/blocks/claim-row/index.ts +1 -0
  288. package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +0 -2
  289. package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +1 -5
  290. package/src/blocks/credit-wallet/credit-wallet.tsx +20 -14
  291. package/src/blocks/generation-progress/generation-progress.tsx +180 -0
  292. package/src/blocks/generation-progress/index.ts +6 -0
  293. package/src/blocks/image-grid/image-grid.tsx +10 -14
  294. package/src/blocks/index.tsx +3 -0
  295. package/src/blocks/internal/card.tsx +47 -3
  296. package/src/blocks/internal/format.ts +0 -3
  297. package/src/blocks/invoice-row/invoice-row.tsx +3 -10
  298. package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +0 -2
  299. package/src/blocks/oauth-buttons/oauth-buttons.tsx +0 -8
  300. package/src/blocks/option-editor/option-editor.tsx +24 -10
  301. package/src/blocks/order-card/order-card.tsx +21 -29
  302. package/src/blocks/plan-card/plan-card.tsx +18 -16
  303. package/src/blocks/product-list-empty/product-list-empty.tsx +0 -5
  304. package/src/blocks/review-row/review-row.tsx +0 -10
  305. package/src/blocks/sales-chart/sales-chart.tsx +1 -6
  306. package/src/blocks/selection-bar/index.ts +1 -0
  307. package/src/blocks/selection-bar/selection-bar.tsx +63 -0
  308. package/src/blocks/service-state-banner/service-state-banner.tsx +17 -6
  309. package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +0 -1
  310. package/src/blocks/site-preview-frame/site-preview-frame.tsx +20 -5
  311. package/src/blocks/stat-card/stat-card.tsx +1 -6
  312. package/src/blocks/step-screen/step-screen.tsx +0 -6
  313. package/src/blocks/supply-item-card/supply-item-card.tsx +0 -6
  314. package/src/charts/line-chart.tsx +11 -6
  315. package/src/charts/scale.ts +0 -3
  316. package/src/charts/sparkline.tsx +0 -4
  317. package/src/charts/summary.ts +0 -1
  318. package/src/components/button/button.tsx +3 -6
  319. package/src/components/chip/chip.tsx +17 -0
  320. package/src/components/chip-group/chip-group.tsx +2 -2
  321. package/src/components/dialog/dialog.tsx +3 -10
  322. package/src/components/divider/divider.tsx +0 -2
  323. package/src/components/empty-state/empty-state.tsx +0 -11
  324. package/src/components/field/field.tsx +59 -9
  325. package/src/components/list-row/list-row.tsx +0 -3
  326. package/src/components/photo/photo.tsx +0 -5
  327. package/src/components/price/price.tsx +1 -4
  328. package/src/components/progress-bar/index.ts +1 -0
  329. package/src/components/progress-bar/progress-bar.tsx +80 -0
  330. package/src/components/search-field/search-field.tsx +0 -1
  331. package/src/components/segmented-tabs/segmented-tabs.tsx +0 -1
  332. package/src/components/sheet/sheet.tsx +0 -3
  333. package/src/components/skeleton/skeleton.tsx +0 -4
  334. package/src/components/status-badge/status-badge.tsx +2 -3
  335. package/src/components/switch/switch.tsx +5 -3
  336. package/src/components/text/text.tsx +2 -5
  337. package/src/components/toast/toast.tsx +2 -13
  338. package/src/components/wizard-steps/wizard-steps.tsx +0 -3
  339. package/src/index.tsx +1 -0
  340. package/src/internal/glyphs.tsx +0 -3
  341. package/src/internal/icon.tsx +0 -1
  342. package/src/internal/overlay.tsx +0 -4
  343. package/src/internal/pressable-base.tsx +0 -3
  344. package/src/internal/use-reduced-motion.ts +0 -2
  345. package/src/sortable/move.ts +0 -1
  346. package/src/sortable/sortable-grid.tsx +0 -12
  347. package/src/sortable/sortable-list.tsx +0 -1
  348. package/src/theme/base.ts +113 -0
  349. package/src/theme/create-theme.ts +0 -5
  350. package/src/theme/theme-provider.tsx +0 -3
  351. package/src/theme/tokens.ts +20 -83
  352. package/src/types/index.ts +2 -9
  353. package/src/utils/color.ts +0 -3
  354. package/src/utils/styles.ts +0 -5
@@ -14,13 +14,9 @@ export type SalesPeriod = 'today' | 'week' | 'month';
14
14
  export type SalesChartProps = {
15
15
  period: SalesPeriod;
16
16
  onPeriodChange: (period: SalesPeriod) => void;
17
- /** 순매출 (환불 차감 후) */
18
17
  total: number;
19
- /** 직전 같은 기간 순매출 */
20
18
  previousTotal?: number;
21
- /** 기간 중 환불 합계 */
22
19
  refundTotal?: number;
23
- /** 추이 차트. 두 점 이상이면 그린다 */
24
20
  data?: readonly ChartDatum[];
25
21
  loading?: boolean;
26
22
  style?: StyleProp<ViewStyle>;
@@ -45,7 +41,6 @@ const useStyles = makeStyles((t) => ({
45
41
  down: { color: t.colors.info },
46
42
  }));
47
43
 
48
- /** 기간별 총매출 · 환불 · 순매출 */
49
44
  export function SalesChart({
50
45
  period,
51
46
  onPeriodChange,
@@ -97,7 +92,7 @@ export function SalesChart({
97
92
  {rate !== null ? (
98
93
  <Text
99
94
  weight="bold"
100
- tone={up ? 'destructive' : 'default'}
95
+ tone={up ? 'danger' : 'default'}
101
96
  style={!up && s.down}
102
97
  accessibilityLabel={`직전 기간보다 ${Math.abs(rate).toFixed(1)}% ${up ? '증가' : '감소'}`}
103
98
  >
@@ -0,0 +1 @@
1
+ export { SelectionBar, type SelectionBarProps } from './selection-bar';
@@ -0,0 +1,63 @@
1
+ import { View, type StyleProp, type ViewStyle } from 'react-native';
2
+ import { Button } from '../../components/button/button';
3
+ import { Text } from '../../components/text/text';
4
+ import { makeStyles } from '../../utils/styles';
5
+
6
+ export type SelectionBarProps = {
7
+ count: number;
8
+ max?: number;
9
+ actionLabel: string;
10
+ onAction: () => void;
11
+ onClear: () => void;
12
+ disabled?: boolean;
13
+ style?: StyleProp<ViewStyle>;
14
+ };
15
+
16
+ const useStyles = makeStyles((t) => ({
17
+ root: {
18
+ flexDirection: 'row',
19
+ alignItems: 'center',
20
+ gap: t.space[2],
21
+ paddingVertical: t.space[3],
22
+ paddingHorizontal: t.space[4],
23
+ borderTopWidth: 1,
24
+ borderTopColor: t.colors.border,
25
+ backgroundColor: t.colors.background,
26
+ boxShadow: t.shadow.md,
27
+ },
28
+ info: { flex: 1, gap: 2 },
29
+ count: { fontVariant: ['tabular-nums'] },
30
+ }));
31
+
32
+ export function SelectionBar({
33
+ count,
34
+ max,
35
+ actionLabel,
36
+ onAction,
37
+ onClear,
38
+ disabled,
39
+ style,
40
+ }: SelectionBarProps) {
41
+ const s = useStyles();
42
+ const full = max !== undefined && count >= max;
43
+ return (
44
+ <View accessibilityRole="toolbar" style={[s.root, style]}>
45
+ <View style={s.info} accessibilityLiveRegion="polite">
46
+ <Text weight="bold" style={s.count} numberOfLines={1}>
47
+ {count}건 선택
48
+ </Text>
49
+ {full ? (
50
+ <Text variant="caption" tone="muted" numberOfLines={2}>
51
+ 최대 {max}건까지 선택할 수 있어요
52
+ </Text>
53
+ ) : null}
54
+ </View>
55
+ <Button variant="ghost" size="sm" onPress={onClear}>
56
+ 선택 해제
57
+ </Button>
58
+ <Button size="sm" onPress={onAction} disabled={disabled || count === 0}>
59
+ {actionLabel}
60
+ </Button>
61
+ </View>
62
+ );
63
+ }
@@ -4,12 +4,13 @@ import { Text } from '../../components/text/text';
4
4
  import { useTheme } from '../../theme/theme-provider';
5
5
  import { makeStyles } from '../../utils/styles';
6
6
 
7
- export type ServiceState = 'paymentFailed' | 'grace' | 'suspended' | 'closed';
7
+ export type ServiceState =
8
+ 'paymentFailed' | 'grace' | 'suspended' | 'closed' | 'stopped';
8
9
 
9
10
  export type ServiceStateBannerProps = {
10
11
  state: ServiceState;
11
- /** 유예 남은 일수 (grace) */
12
12
  daysLeft?: number;
13
+ reason?: string;
13
14
  actionLabel?: string;
14
15
  onAction?: () => void;
15
16
  style?: StyleProp<ViewStyle>;
@@ -25,6 +26,8 @@ function title(state: ServiceState, daysLeft?: number) {
25
26
  return '사이트가 멈췄어요';
26
27
  case 'closed':
27
28
  return '해지된 사이트예요';
29
+ case 'stopped':
30
+ return '운영 정책에 따라 판매가 중지됐어요';
28
31
  }
29
32
  }
30
33
 
@@ -33,19 +36,20 @@ const useStyles = makeStyles((t) => ({
33
36
  start: { alignSelf: 'flex-start' },
34
37
  }));
35
38
 
36
- /** 결제 실패 · 유예 · 정지 · 해지 상태 안내 */
37
39
  export function ServiceStateBanner({
38
40
  state,
39
41
  daysLeft,
42
+ reason,
40
43
  actionLabel,
41
44
  onAction,
42
45
  style,
43
46
  }: ServiceStateBannerProps) {
44
47
  const t = useTheme();
45
48
  const s = useStyles();
46
- const severe = state === 'suspended' || state === 'closed';
49
+ const severe =
50
+ state === 'suspended' || state === 'closed' || state === 'stopped';
47
51
  const [bg, fg] = severe
48
- ? [t.colors.destructive, t.colors.destructiveForeground]
52
+ ? [t.colors.danger, t.colors.dangerForeground]
49
53
  : [t.colors.warning, t.colors.warningForeground];
50
54
  return (
51
55
  <View
@@ -55,10 +59,17 @@ export function ServiceStateBanner({
55
59
  <Text weight="bold" style={{ color: fg }}>
56
60
  {title(state, daysLeft)}
57
61
  </Text>
62
+ {state === 'stopped' && reason ? (
63
+ <Text style={{ color: fg }}>사유: {reason}</Text>
64
+ ) : null}
58
65
  {onAction ? (
59
66
  <Button size="sm" variant="outline" onPress={onAction} style={s.start}>
60
67
  {actionLabel ??
61
- (state === 'closed' ? '다시 시작하기' : '결제 수단 확인')}
68
+ (state === 'closed'
69
+ ? '다시 시작하기'
70
+ : state === 'stopped'
71
+ ? '문의하기'
72
+ : '결제 수단 확인')}
62
73
  </Button>
63
74
  ) : null}
64
75
  </View>
@@ -46,7 +46,6 @@ const useStyles = makeStyles((t) => ({
46
46
  lineOn: { backgroundColor: t.colors.primary },
47
47
  }));
48
48
 
49
- /** 송장과 배송 단계 */
50
49
  export function ShippingTrackingRow({
51
50
  carrier,
52
51
  trackingNumber,
@@ -13,14 +13,13 @@ import { makeStyles } from '../../utils/styles';
13
13
  export type SitePublishStatus = 'draft' | 'published' | 'unpublishedChanges';
14
14
 
15
15
  export type SitePreviewFrameProps = {
16
- /** 사이트 화면 이미지 */
17
16
  screenshot?: ImageSourcePropType;
18
- /** 실제 사이트를 띄울 때(WebView 등). screenshot보다 우선 */
19
17
  renderPreview?: () => ReactNode;
20
18
  status: SitePublishStatus;
21
19
  onPublish?: () => void;
22
20
  publishing?: boolean;
23
- /** 직전 게시본으로 되돌리기 */
21
+ publishDisabled?: boolean;
22
+ blockedReason?: string;
24
23
  onRevert?: () => void;
25
24
  style?: StyleProp<ViewStyle>;
26
25
  };
@@ -62,15 +61,17 @@ const useStyles = makeStyles((t) => ({
62
61
  barLabel: { flex: 1 },
63
62
  barButton: { paddingHorizontal: t.space[4] },
64
63
  actions: { gap: t.space[2] },
64
+ reason: { textAlign: 'center' },
65
65
  }));
66
66
 
67
- /** 만든 사이트 미리보기와 게시 */
68
67
  export function SitePreviewFrame({
69
68
  screenshot,
70
69
  renderPreview,
71
70
  status,
72
71
  onPublish,
73
72
  publishing,
73
+ publishDisabled,
74
+ blockedReason,
74
75
  onRevert,
75
76
  style,
76
77
  }: SitePreviewFrameProps) {
@@ -97,6 +98,7 @@ export function SitePreviewFrame({
97
98
  size="sm"
98
99
  onPress={onPublish}
99
100
  loading={publishing}
101
+ disabled={publishDisabled}
100
102
  style={s.barButton}
101
103
  >
102
104
  게시
@@ -106,10 +108,23 @@ export function SitePreviewFrame({
106
108
  ) : null}
107
109
  <View style={s.actions}>
108
110
  {onPublish && status === 'draft' ? (
109
- <Button size="lg" onPress={onPublish} loading={publishing}>
111
+ <Button
112
+ size="lg"
113
+ onPress={onPublish}
114
+ loading={publishing}
115
+ disabled={publishDisabled}
116
+ >
110
117
  사이트 게시하기
111
118
  </Button>
112
119
  ) : null}
120
+ {publishDisabled &&
121
+ blockedReason &&
122
+ onPublish &&
123
+ status !== 'published' ? (
124
+ <Text tone="muted" accessibilityLiveRegion="polite" style={s.reason}>
125
+ {blockedReason}
126
+ </Text>
127
+ ) : null}
113
128
  {onRevert && status !== 'draft' ? (
114
129
  <Button variant="ghost" onPress={onRevert}>
115
130
  직전 게시본으로 되돌리기
@@ -5,13 +5,9 @@ import { makeStyles } from '../../utils/styles';
5
5
  import { Card } from '../internal/card';
6
6
 
7
7
  export type StatCardProps = {
8
- /** 예) '오늘 매출' */
9
8
  label: string;
10
- /** 이미 포맷된 값. 예) '1,234,000원', '42건' */
11
9
  value: string;
12
- /** 직전 기간 대비 증감률(%). 오르면 빨강, 내리면 파랑 */
13
10
  change?: number | null;
14
- /** 오른쪽 작은 차트. 예) <Sparkline /> (@ezpg/app-ui/charts) */
15
11
  chart?: ReactNode;
16
12
  onPress?: () => void;
17
13
  style?: StyleProp<ViewStyle>;
@@ -29,7 +25,6 @@ const useStyles = makeStyles((t) => ({
29
25
  down: { color: t.colors.info },
30
26
  }));
31
27
 
32
- /** 핵심 숫자 하나와 증감 */
33
28
  export function StatCard({
34
29
  label,
35
30
  value,
@@ -62,7 +57,7 @@ export function StatCard({
62
57
  {hasChange ? (
63
58
  <Text
64
59
  weight="bold"
65
- tone={flat ? 'muted' : up ? 'destructive' : 'default'}
60
+ tone={flat ? 'muted' : up ? 'danger' : 'default'}
66
61
  style={!flat && !up && s.down}
67
62
  >
68
63
  {flat ? '변동 없음' : `${up ? '▲' : '▼'} ${rate}`}
@@ -16,17 +16,12 @@ export type StepAction = {
16
16
 
17
17
  export type StepScreenProps = {
18
18
  title: string;
19
- /** 넘기면 상단에 진행 막대 */
20
19
  total?: number;
21
- /** 0부터 */
22
20
  current?: number;
23
- /** 넘기면 상단에 이전 버튼 */
24
21
  onBack?: () => void;
25
- /** 이전 버튼의 접근성 라벨. 기본 '이전' */
26
22
  backLabel?: string;
27
23
  primaryAction: StepAction;
28
24
  secondaryAction?: StepAction;
29
- /** 하단 안전 영역 높이 */
30
25
  bottomInset?: number;
31
26
  children?: ReactNode;
32
27
  };
@@ -63,7 +58,6 @@ const useStyles = makeStyles((t) => ({
63
58
  },
64
59
  }));
65
60
 
66
- /** 온보딩 한 단계의 화면 틀: 이전 · 진행 막대 · 제목 · 내용 · 하단 버튼 */
67
61
  export function StepScreen({
68
62
  title,
69
63
  total,
@@ -13,24 +13,19 @@ import { PressableBase } from '../../internal/pressable-base';
13
13
  import { makeStyles } from '../../utils/styles';
14
14
  import { Card } from '../internal/card';
15
15
 
16
- /** 예) { id: 'm', label: '중 20×25cm' } */
17
16
  export type SupplyOption = { id: string; label: string };
18
17
 
19
- /** 묶음 수량과 그 가격 */
20
18
  export type SupplyQuantity = { quantity: number; price: number };
21
19
 
22
20
  export type SupplyItemCardProps = {
23
21
  name: string;
24
22
  image: ImageSourcePropType;
25
- /** 2개 이상이면 칩으로 고른다 */
26
23
  options?: readonly SupplyOption[];
27
24
  selectedOptionId?: string | null;
28
25
  onSelectOption?: (id: string) => void;
29
- /** 선택한 옵션의 수량별 가격 */
30
26
  quantities: readonly SupplyQuantity[];
31
27
  selectedQuantity: number | null;
32
28
  onSelectQuantity: (quantity: number) => void;
33
- /** 기본 '장' */
34
29
  unit?: string;
35
30
  onAdd?: () => void;
36
31
  style?: StyleProp<ViewStyle>;
@@ -75,7 +70,6 @@ const useStyles = makeStyles((t) => ({
75
70
  quantity: { flex: 1 },
76
71
  }));
77
72
 
78
- /** 로고를 넣어 주문하는 공급 품목. 사이즈 · 수량을 고르고 담는다 */
79
73
  export function SupplyItemCard({
80
74
  name,
81
75
  image,
@@ -16,15 +16,10 @@ export type ChartDatum = { label: string; value: number };
16
16
 
17
17
  export type LineChartProps = {
18
18
  data: readonly ChartDatum[];
19
- /** 기본 200 */
20
19
  height?: number;
21
- /** y축 라벨. 기본은 천 단위 쉼표 */
22
20
  formatY?: (value: number) => string;
23
- /** x축 라벨. 기본은 label 그대로 */
24
21
  formatX?: (label: string, index: number) => string;
25
- /** 점을 눌렀을 때. 넘기면 각 구간이 눌린다 */
26
22
  onPointPress?: (datum: ChartDatum, index: number) => void;
27
- /** 기본은 최고 · 최저 · 마지막 값 요약 */
28
23
  accessibilityLabel?: string;
29
24
  style?: StyleProp<ViewStyle>;
30
25
  };
@@ -32,6 +27,16 @@ export type LineChartProps = {
32
27
  const defaultFormat = (v: number) => formatPrice(v, '');
33
28
  const PAD = { top: 8, right: 12, bottom: 24, gap: 8 };
34
29
  const FONT_SIZE = 11;
30
+ const WIDE = /[\u1100-\u11ff\u3000-\u9fff\uac00-\ud7af\uff00-\uffef]/;
31
+ const NARROW = /[,.:'\s]/;
32
+
33
+ export function estimateLabelWidth(label: string, fontSize = FONT_SIZE) {
34
+ let em = 0;
35
+ for (const ch of label) {
36
+ em += WIDE.test(ch) ? 1 : NARROW.test(ch) ? 0.34 : 0.64;
37
+ }
38
+ return Math.ceil(em * fontSize) + 2;
39
+ }
35
40
 
36
41
  export function LineChart({
37
42
  data,
@@ -48,7 +53,7 @@ export function LineChart({
48
53
  const ticks = niceTicks(Math.min(0, ...values), Math.max(0, ...values));
49
54
  const yLabels = ticks.map(formatY);
50
55
  const left =
51
- Math.max(...yLabels.map((l) => l.length)) * FONT_SIZE * 0.62 + PAD.gap;
56
+ Math.max(0, ...yLabels.map((l) => estimateLabelWidth(l))) + PAD.gap;
52
57
  const plot = {
53
58
  x0: left,
54
59
  x1: width - PAD.right,
@@ -2,7 +2,6 @@ export type Point = { x: number; y: number };
2
2
 
3
3
  const STEPS = [1, 2, 2.5, 5, 10];
4
4
 
5
- /** 보기 좋은 눈금. 값이 하나뿐이거나 모두 같아도 범위를 만든다 */
6
5
  export function niceTicks(min: number, max: number, count = 4): number[] {
7
6
  let lo = Math.min(min, max);
8
7
  let hi = Math.max(min, max);
@@ -24,7 +23,6 @@ export function niceTicks(min: number, max: number, count = 4): number[] {
24
23
  return ticks;
25
24
  }
26
25
 
27
- /** [d0, d1] → [r0, r1] 선형 변환. 범위 폭이 0이면 가운데로 */
28
26
  export function linearScale(domain: [number, number], range: [number, number]) {
29
27
  const [d0, d1] = domain;
30
28
  const [r0, r1] = range;
@@ -43,7 +41,6 @@ export function areaPath(points: Point[], baseline: number): string {
43
41
  return `${linePath(points)} L${last.x},${baseline} L${first.x},${baseline} Z`;
44
42
  }
45
43
 
46
- /** 라벨이 겹치지 않게 최대 maxLabels개만 남길 간격 */
47
44
  export function labelStep(count: number, maxLabels: number): number {
48
45
  return Math.max(1, Math.ceil(count / Math.max(1, maxLabels)));
49
46
  }
@@ -7,17 +7,13 @@ import { summarize } from './summary';
7
7
 
8
8
  export type SparklineProps = {
9
9
  data: readonly number[];
10
- /** 기본 80 */
11
10
  width?: number;
12
- /** 기본 24 */
13
11
  height?: number;
14
- /** 기본 primary */
15
12
  color?: string;
16
13
  accessibilityLabel?: string;
17
14
  style?: StyleProp<ViewStyle>;
18
15
  };
19
16
 
20
- /** 축 없는 작은 추세선 */
21
17
  export function Sparkline({
22
18
  data,
23
19
  width = 80,
@@ -1,4 +1,3 @@
1
- /** 차트 전체를 한 문장으로. 스크린 리더용 */
2
1
  export function summarize(
3
2
  values: number[],
4
3
  format: (v: number) => string
@@ -9,18 +9,15 @@ import { useTheme } from '../../theme/theme-provider';
9
9
  import { makeStyles } from '../../utils/styles';
10
10
 
11
11
  export type ButtonVariant =
12
- 'solid' | 'secondary' | 'outline' | 'ghost' | 'destructive';
12
+ 'solid' | 'secondary' | 'outline' | 'ghost' | 'danger';
13
13
  export type ButtonSize = 'sm' | 'md' | 'lg';
14
14
 
15
15
  export type ButtonProps = Omit<
16
16
  PressableBaseProps,
17
17
  'children' | 'touchHeight'
18
18
  > & {
19
- /** 기본 'solid' */
20
19
  variant?: ButtonVariant;
21
- /** 기본 'md' */
22
20
  size?: ButtonSize;
23
- /** 스피너를 보여주고 누를 수 없게 한다 */
24
21
  loading?: boolean;
25
22
  leftIcon?: IconSlot;
26
23
  rightIcon?: IconSlot;
@@ -56,7 +53,7 @@ const useStyles = makeStyles((t) => ({
56
53
  borderColor: t.colors.input,
57
54
  },
58
55
  ghost: { backgroundColor: 'transparent' },
59
- destructive: { backgroundColor: t.colors.destructive },
56
+ danger: { backgroundColor: t.colors.danger },
60
57
  label: { fontFamily: t.fontFamily, fontWeight: '600' },
61
58
  smLabel: { fontSize: 14, lineHeight: 20 },
62
59
  mdLabel: {
@@ -85,7 +82,7 @@ export function Button({
85
82
  secondary: t.colors.foreground,
86
83
  outline: t.colors.foreground,
87
84
  ghost: t.colors.foreground,
88
- destructive: t.colors.destructiveForeground,
85
+ danger: t.colors.dangerForeground,
89
86
  }[variant];
90
87
  const icon = { color, size: size === 'sm' ? t.iconSize.sm : t.iconSize.md };
91
88
 
@@ -10,6 +10,7 @@ import { makeStyles } from '../../utils/styles';
10
10
  export type ChipProps = Omit<PressableBaseProps, 'children' | 'touchHeight'> & {
11
11
  selected?: boolean;
12
12
  leftIcon?: IconSlot;
13
+ count?: number;
13
14
  children: string;
14
15
  };
15
16
 
@@ -38,14 +39,17 @@ const useStyles = makeStyles((t) => ({
38
39
  lineHeight: 20,
39
40
  fontWeight: '500',
40
41
  },
42
+ count: { fontVariant: ['tabular-nums'], fontWeight: '700' },
41
43
  }));
42
44
 
43
45
  export function Chip({
44
46
  selected = false,
45
47
  leftIcon,
48
+ count,
46
49
  children,
47
50
  style,
48
51
  accessibilityState,
52
+ accessibilityLabel,
49
53
  ...rest
50
54
  }: ChipProps) {
51
55
  const t = useTheme();
@@ -54,6 +58,10 @@ export function Chip({
54
58
  return (
55
59
  <PressableBase
56
60
  {...rest}
61
+ accessibilityLabel={
62
+ accessibilityLabel ??
63
+ (count === undefined ? undefined : `${children}, ${count}건`)
64
+ }
57
65
  accessibilityState={{ ...accessibilityState, selected }}
58
66
  touchHeight={HEIGHT}
59
67
  style={[s.base, selected && s.selected, style]}
@@ -68,6 +76,15 @@ export function Chip({
68
76
  >
69
77
  {children}
70
78
  </Text>
79
+ {count === undefined ? null : (
80
+ <Text
81
+ numberOfLines={1}
82
+ maxFontSizeMultiplier={t.maxFontScale}
83
+ style={[s.label, s.count, { color }]}
84
+ >
85
+ {count}
86
+ </Text>
87
+ )}
71
88
  </PressableBase>
72
89
  );
73
90
  }
@@ -5,6 +5,7 @@ import { Chip } from '../chip/chip';
5
5
  export type ChipGroupItem<T extends string> = {
6
6
  value: T;
7
7
  label: string;
8
+ count?: number;
8
9
  disabled?: boolean;
9
10
  };
10
11
 
@@ -12,7 +13,6 @@ type Single<T extends string> = {
12
13
  multiple?: false;
13
14
  value: T | null;
14
15
  onValueChange: (value: T | null) => void;
15
- /** 선택된 칩을 다시 누르면 해제. 기본 false */
16
16
  deselectable?: boolean;
17
17
  };
18
18
 
@@ -20,7 +20,6 @@ type Multiple<T extends string> = {
20
20
  multiple: true;
21
21
  value: readonly T[];
22
22
  onValueChange: (value: T[]) => void;
23
- /** 최대 선택 개수 */
24
23
  max?: number;
25
24
  };
26
25
 
@@ -70,6 +69,7 @@ export function ChipGroup<T extends string>(props: ChipGroupProps<T>) {
70
69
  <Chip
71
70
  key={item.value}
72
71
  selected={selected}
72
+ count={item.count}
73
73
  disabled={item.disabled || (full && !selected)}
74
74
  accessibilityRole={props.multiple ? 'checkbox' : 'radio'}
75
75
  accessibilityState={
@@ -9,17 +9,11 @@ export type DialogProps = {
9
9
  open: boolean;
10
10
  onOpenChange: (open: boolean) => void;
11
11
  title: string;
12
- /** 확인을 눌렀을 때. 닫는 것은 부모가 onOpenChange로 정한다 */
13
12
  onConfirm: () => void;
14
- /** 기본 '확인' */
15
13
  confirmLabel?: string;
16
- /** 기본 '취소' */
17
14
  cancelLabel?: string;
18
- /** 되돌릴 수 없는 작업이면 확인 버튼을 destructive로 */
19
- destructive?: boolean;
20
- /** 확인 버튼을 로딩 상태로 */
15
+ danger?: boolean;
21
16
  loading?: boolean;
22
- /** false면 배경 · 뒤로가기로 닫히지 않는다. 기본 true */
23
17
  dismissible?: boolean;
24
18
  };
25
19
 
@@ -49,7 +43,6 @@ const useStyles = makeStyles((t) => ({
49
43
  action: { flex: 1, borderRadius: t.radius.lg },
50
44
  }));
51
45
 
52
- /** 확인 · 취소를 묻는 대화상자. 제목 한 줄로 무엇을 하는지 말한다 */
53
46
  export function Dialog({
54
47
  open,
55
48
  onOpenChange,
@@ -57,7 +50,7 @@ export function Dialog({
57
50
  onConfirm,
58
51
  confirmLabel = '확인',
59
52
  cancelLabel = '취소',
60
- destructive = false,
53
+ danger = false,
61
54
  loading = false,
62
55
  dismissible = true,
63
56
  }: DialogProps) {
@@ -115,7 +108,7 @@ export function Dialog({
115
108
  {cancelLabel}
116
109
  </Button>
117
110
  <Button
118
- variant={destructive ? 'destructive' : 'solid'}
111
+ variant={danger ? 'danger' : 'solid'}
119
112
  style={s.action}
120
113
  loading={loading}
121
114
  onPress={onConfirm}
@@ -2,12 +2,10 @@ import { StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
2
2
  import { useTheme } from '../../theme/theme-provider';
3
3
 
4
4
  export type DividerProps = {
5
- /** 왼쪽 들여쓰기(px). ListRow의 leading 뒤부터 긋을 때 쓴다 */
6
5
  inset?: number;
7
6
  style?: StyleProp<ViewStyle>;
8
7
  };
9
8
 
10
- /** 가로 구분선. 목록에서는 FlatList의 ItemSeparatorComponent로 쓴다 */
11
9
  export function Divider({ inset = 0, style }: DividerProps) {
12
10
  const t = useTheme();
13
11
  return (
@@ -6,21 +6,12 @@ import { useTheme } from '../../theme/theme-provider';
6
6
  import { makeStyles } from '../../utils/styles';
7
7
  import { Button } from '../button/button';
8
8
 
9
- /**
10
- * - default: 목록 전체가 비었을 때
11
- * - search: 검색 · 필터 결과가 없을 때 (결과 변화를 화면낭독기에 알림)
12
- * - error: 불러오지 못했을 때
13
- * - section: 화면 안 한 섹션이 비었을 때 (한 줄)
14
- */
15
9
  export type EmptyStateVariant = 'default' | 'search' | 'error' | 'section';
16
10
 
17
11
  export type EmptyStateProps = {
18
- /** 상태를 말하는 한 줄. 예) '아직 주문이 없어요' */
19
12
  title: string;
20
13
  variant?: EmptyStateVariant;
21
- /** 기본: search는 검색, error는 경고 아이콘 */
22
14
  icon?: IconSlot;
23
- /** 다음 행동 하나. section에서는 텍스트 링크로 보인다 */
24
15
  action?: { label: string; onPress: () => void; icon?: IconSlot };
25
16
  style?: StyleProp<ViewStyle>;
26
17
  };
@@ -28,7 +19,6 @@ export type EmptyStateProps = {
28
19
  const ICON = { screen: 40, section: 20 };
29
20
 
30
21
  const useStyles = makeStyles((t) => ({
31
- // 시각 중심을 맞추려고 아래쪽을 더 띄운다
32
22
  screen: {
33
23
  flexGrow: 1,
34
24
  alignItems: 'center',
@@ -74,7 +64,6 @@ const useStyles = makeStyles((t) => ({
74
64
  },
75
65
  }));
76
66
 
77
- /** 비어 있거나 불러오지 못한 상태. 설명 문단 없이 아이콘 · 한 줄 · 행동 하나로 보여준다 */
78
67
  export function EmptyState({
79
68
  title,
80
69
  variant = 'default',