melta-app 0.1.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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/THIRD_PARTY_LICENSES.md +198 -0
  4. package/lib/module/components/ActionSheet.js +87 -0
  5. package/lib/module/components/ActionSheet.js.map +1 -0
  6. package/lib/module/components/Alert.js +93 -0
  7. package/lib/module/components/Alert.js.map +1 -0
  8. package/lib/module/components/Avatar.js +93 -0
  9. package/lib/module/components/Avatar.js.map +1 -0
  10. package/lib/module/components/BottomSheet.js +69 -0
  11. package/lib/module/components/BottomSheet.js.map +1 -0
  12. package/lib/module/components/Card.js +93 -0
  13. package/lib/module/components/Card.js.map +1 -0
  14. package/lib/module/components/Checkbox.js +115 -0
  15. package/lib/module/components/Checkbox.js.map +1 -0
  16. package/lib/module/components/EmptyState.js +70 -0
  17. package/lib/module/components/EmptyState.js.map +1 -0
  18. package/lib/module/components/Header.js +53 -0
  19. package/lib/module/components/Header.js.map +1 -0
  20. package/lib/module/components/Image.js +67 -0
  21. package/lib/module/components/Image.js.map +1 -0
  22. package/lib/module/components/Modal.js +95 -0
  23. package/lib/module/components/Modal.js.map +1 -0
  24. package/lib/module/components/Progress.js +113 -0
  25. package/lib/module/components/Progress.js.map +1 -0
  26. package/lib/module/components/Radio.js +134 -0
  27. package/lib/module/components/Radio.js.map +1 -0
  28. package/lib/module/components/Screen.js +57 -0
  29. package/lib/module/components/Screen.js.map +1 -0
  30. package/lib/module/components/Skeleton.js +169 -0
  31. package/lib/module/components/Skeleton.js.map +1 -0
  32. package/lib/module/components/Surface.js +49 -0
  33. package/lib/module/components/Surface.js.map +1 -0
  34. package/lib/module/components/TextField.js +84 -0
  35. package/lib/module/components/TextField.js.map +1 -0
  36. package/lib/module/components/Toast.js +105 -0
  37. package/lib/module/components/Toast.js.map +1 -0
  38. package/lib/module/components/Toggle.js +77 -0
  39. package/lib/module/components/Toggle.js.map +1 -0
  40. package/lib/module/components/action-sheet.styles.js +70 -0
  41. package/lib/module/components/action-sheet.styles.js.map +1 -0
  42. package/lib/module/components/alert.styles.js +80 -0
  43. package/lib/module/components/alert.styles.js.map +1 -0
  44. package/lib/module/components/avatar.styles.js +94 -0
  45. package/lib/module/components/avatar.styles.js.map +1 -0
  46. package/lib/module/components/bottom-sheet.styles.js +55 -0
  47. package/lib/module/components/bottom-sheet.styles.js.map +1 -0
  48. package/lib/module/components/card.styles.js +50 -0
  49. package/lib/module/components/card.styles.js.map +1 -0
  50. package/lib/module/components/checkbox.styles.js +55 -0
  51. package/lib/module/components/checkbox.styles.js.map +1 -0
  52. package/lib/module/components/empty-state.styles.js +60 -0
  53. package/lib/module/components/empty-state.styles.js.map +1 -0
  54. package/lib/module/components/header.styles.js +33 -0
  55. package/lib/module/components/header.styles.js.map +1 -0
  56. package/lib/module/components/image.styles.js +37 -0
  57. package/lib/module/components/image.styles.js.map +1 -0
  58. package/lib/module/components/index.js +26 -0
  59. package/lib/module/components/index.js.map +1 -0
  60. package/lib/module/components/modal.styles.js +68 -0
  61. package/lib/module/components/modal.styles.js.map +1 -0
  62. package/lib/module/components/progress.styles.js +55 -0
  63. package/lib/module/components/progress.styles.js.map +1 -0
  64. package/lib/module/components/radio.styles.js +96 -0
  65. package/lib/module/components/radio.styles.js.map +1 -0
  66. package/lib/module/components/screen.styles.js +38 -0
  67. package/lib/module/components/screen.styles.js.map +1 -0
  68. package/lib/module/components/skeleton.styles.js +114 -0
  69. package/lib/module/components/skeleton.styles.js.map +1 -0
  70. package/lib/module/components/surface.styles.js +37 -0
  71. package/lib/module/components/surface.styles.js.map +1 -0
  72. package/lib/module/components/textfield.styles.js +121 -0
  73. package/lib/module/components/textfield.styles.js.map +1 -0
  74. package/lib/module/components/toast.styles.js +81 -0
  75. package/lib/module/components/toast.styles.js.map +1 -0
  76. package/lib/module/components/toggle.styles.js +69 -0
  77. package/lib/module/components/toggle.styles.js.map +1 -0
  78. package/lib/module/contracts/contract-types.js +192 -0
  79. package/lib/module/contracts/contract-types.js.map +1 -0
  80. package/lib/module/icons/Icon.js +57 -0
  81. package/lib/module/icons/Icon.js.map +1 -0
  82. package/lib/module/icons/glyphs.js +257 -0
  83. package/lib/module/icons/glyphs.js.map +1 -0
  84. package/lib/module/icons/icon.styles.js +28 -0
  85. package/lib/module/icons/icon.styles.js.map +1 -0
  86. package/lib/module/icons/index.js +14 -0
  87. package/lib/module/icons/index.js.map +1 -0
  88. package/lib/module/index.js +20 -0
  89. package/lib/module/index.js.map +1 -0
  90. package/lib/module/package.json +1 -0
  91. package/lib/module/primitives/Button.js +105 -0
  92. package/lib/module/primitives/Button.js.map +1 -0
  93. package/lib/module/primitives/Metric.js +68 -0
  94. package/lib/module/primitives/Metric.js.map +1 -0
  95. package/lib/module/primitives/Row.js +43 -0
  96. package/lib/module/primitives/Row.js.map +1 -0
  97. package/lib/module/primitives/Stack.js +39 -0
  98. package/lib/module/primitives/Stack.js.map +1 -0
  99. package/lib/module/primitives/Tag.js +160 -0
  100. package/lib/module/primitives/Tag.js.map +1 -0
  101. package/lib/module/primitives/Text.js +54 -0
  102. package/lib/module/primitives/Text.js.map +1 -0
  103. package/lib/module/primitives/_internal/focus-ring.js +57 -0
  104. package/lib/module/primitives/_internal/focus-ring.js.map +1 -0
  105. package/lib/module/primitives/button.styles.js +88 -0
  106. package/lib/module/primitives/button.styles.js.map +1 -0
  107. package/lib/module/primitives/index.js +11 -0
  108. package/lib/module/primitives/index.js.map +1 -0
  109. package/lib/module/primitives/metric.styles.js +54 -0
  110. package/lib/module/primitives/metric.styles.js.map +1 -0
  111. package/lib/module/primitives/row.styles.js +53 -0
  112. package/lib/module/primitives/row.styles.js.map +1 -0
  113. package/lib/module/primitives/stack.styles.js +37 -0
  114. package/lib/module/primitives/stack.styles.js.map +1 -0
  115. package/lib/module/primitives/tag.styles.js +56 -0
  116. package/lib/module/primitives/tag.styles.js.map +1 -0
  117. package/lib/module/primitives/text.styles.js +33 -0
  118. package/lib/module/primitives/text.styles.js.map +1 -0
  119. package/lib/module/theme/ThemeProvider.js +41 -0
  120. package/lib/module/theme/ThemeProvider.js.map +1 -0
  121. package/lib/module/theme/index.js +19 -0
  122. package/lib/module/theme/index.js.map +1 -0
  123. package/lib/module/theme/native-theme.js +201 -0
  124. package/lib/module/theme/native-theme.js.map +1 -0
  125. package/lib/module/theme/types.js +4 -0
  126. package/lib/module/theme/types.js.map +1 -0
  127. package/lib/typescript/package.json +1 -0
  128. package/lib/typescript/src/components/ActionSheet.d.ts +45 -0
  129. package/lib/typescript/src/components/ActionSheet.d.ts.map +1 -0
  130. package/lib/typescript/src/components/Alert.d.ts +43 -0
  131. package/lib/typescript/src/components/Alert.d.ts.map +1 -0
  132. package/lib/typescript/src/components/Avatar.d.ts +45 -0
  133. package/lib/typescript/src/components/Avatar.d.ts.map +1 -0
  134. package/lib/typescript/src/components/BottomSheet.d.ts +36 -0
  135. package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
  136. package/lib/typescript/src/components/Card.d.ts +46 -0
  137. package/lib/typescript/src/components/Card.d.ts.map +1 -0
  138. package/lib/typescript/src/components/Checkbox.d.ts +40 -0
  139. package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
  140. package/lib/typescript/src/components/EmptyState.d.ts +36 -0
  141. package/lib/typescript/src/components/EmptyState.d.ts.map +1 -0
  142. package/lib/typescript/src/components/Header.d.ts +34 -0
  143. package/lib/typescript/src/components/Header.d.ts.map +1 -0
  144. package/lib/typescript/src/components/Image.d.ts +41 -0
  145. package/lib/typescript/src/components/Image.d.ts.map +1 -0
  146. package/lib/typescript/src/components/Modal.d.ts +46 -0
  147. package/lib/typescript/src/components/Modal.d.ts.map +1 -0
  148. package/lib/typescript/src/components/Progress.d.ts +39 -0
  149. package/lib/typescript/src/components/Progress.d.ts.map +1 -0
  150. package/lib/typescript/src/components/Radio.d.ts +52 -0
  151. package/lib/typescript/src/components/Radio.d.ts.map +1 -0
  152. package/lib/typescript/src/components/Screen.d.ts +42 -0
  153. package/lib/typescript/src/components/Screen.d.ts.map +1 -0
  154. package/lib/typescript/src/components/Skeleton.d.ts +37 -0
  155. package/lib/typescript/src/components/Skeleton.d.ts.map +1 -0
  156. package/lib/typescript/src/components/Surface.d.ts +31 -0
  157. package/lib/typescript/src/components/Surface.d.ts.map +1 -0
  158. package/lib/typescript/src/components/TextField.d.ts +45 -0
  159. package/lib/typescript/src/components/TextField.d.ts.map +1 -0
  160. package/lib/typescript/src/components/Toast.d.ts +45 -0
  161. package/lib/typescript/src/components/Toast.d.ts.map +1 -0
  162. package/lib/typescript/src/components/Toggle.d.ts +39 -0
  163. package/lib/typescript/src/components/Toggle.d.ts.map +1 -0
  164. package/lib/typescript/src/components/action-sheet.styles.d.ts +65 -0
  165. package/lib/typescript/src/components/action-sheet.styles.d.ts.map +1 -0
  166. package/lib/typescript/src/components/alert.styles.d.ts +61 -0
  167. package/lib/typescript/src/components/alert.styles.d.ts.map +1 -0
  168. package/lib/typescript/src/components/avatar.styles.d.ts +60 -0
  169. package/lib/typescript/src/components/avatar.styles.d.ts.map +1 -0
  170. package/lib/typescript/src/components/bottom-sheet.styles.d.ts +50 -0
  171. package/lib/typescript/src/components/bottom-sheet.styles.d.ts.map +1 -0
  172. package/lib/typescript/src/components/card.styles.d.ts +27 -0
  173. package/lib/typescript/src/components/card.styles.d.ts.map +1 -0
  174. package/lib/typescript/src/components/checkbox.styles.d.ts +55 -0
  175. package/lib/typescript/src/components/checkbox.styles.d.ts.map +1 -0
  176. package/lib/typescript/src/components/empty-state.styles.d.ts +58 -0
  177. package/lib/typescript/src/components/empty-state.styles.d.ts.map +1 -0
  178. package/lib/typescript/src/components/header.styles.d.ts +30 -0
  179. package/lib/typescript/src/components/header.styles.d.ts.map +1 -0
  180. package/lib/typescript/src/components/image.styles.d.ts +28 -0
  181. package/lib/typescript/src/components/image.styles.d.ts.map +1 -0
  182. package/lib/typescript/src/components/index.d.ts +23 -0
  183. package/lib/typescript/src/components/index.d.ts.map +1 -0
  184. package/lib/typescript/src/components/modal.styles.d.ts +66 -0
  185. package/lib/typescript/src/components/modal.styles.d.ts.map +1 -0
  186. package/lib/typescript/src/components/progress.styles.d.ts +44 -0
  187. package/lib/typescript/src/components/progress.styles.d.ts.map +1 -0
  188. package/lib/typescript/src/components/radio.styles.d.ts +91 -0
  189. package/lib/typescript/src/components/radio.styles.d.ts.map +1 -0
  190. package/lib/typescript/src/components/screen.styles.d.ts +34 -0
  191. package/lib/typescript/src/components/screen.styles.d.ts.map +1 -0
  192. package/lib/typescript/src/components/skeleton.styles.d.ts +105 -0
  193. package/lib/typescript/src/components/skeleton.styles.d.ts.map +1 -0
  194. package/lib/typescript/src/components/surface.styles.d.ts +31 -0
  195. package/lib/typescript/src/components/surface.styles.d.ts.map +1 -0
  196. package/lib/typescript/src/components/textfield.styles.d.ts +75 -0
  197. package/lib/typescript/src/components/textfield.styles.d.ts.map +1 -0
  198. package/lib/typescript/src/components/toast.styles.d.ts +62 -0
  199. package/lib/typescript/src/components/toast.styles.d.ts.map +1 -0
  200. package/lib/typescript/src/components/toggle.styles.d.ts +53 -0
  201. package/lib/typescript/src/components/toggle.styles.d.ts.map +1 -0
  202. package/lib/typescript/src/contracts/contract-types.d.ts +193 -0
  203. package/lib/typescript/src/contracts/contract-types.d.ts.map +1 -0
  204. package/lib/typescript/src/icons/Icon.d.ts +40 -0
  205. package/lib/typescript/src/icons/Icon.d.ts.map +1 -0
  206. package/lib/typescript/src/icons/glyphs.d.ts +259 -0
  207. package/lib/typescript/src/icons/glyphs.d.ts.map +1 -0
  208. package/lib/typescript/src/icons/icon.styles.d.ts +20 -0
  209. package/lib/typescript/src/icons/icon.styles.d.ts.map +1 -0
  210. package/lib/typescript/src/icons/index.d.ts +12 -0
  211. package/lib/typescript/src/icons/index.d.ts.map +1 -0
  212. package/lib/typescript/src/index.d.ts +12 -0
  213. package/lib/typescript/src/index.d.ts.map +1 -0
  214. package/lib/typescript/src/primitives/Button.d.ts +48 -0
  215. package/lib/typescript/src/primitives/Button.d.ts.map +1 -0
  216. package/lib/typescript/src/primitives/Metric.d.ts +38 -0
  217. package/lib/typescript/src/primitives/Metric.d.ts.map +1 -0
  218. package/lib/typescript/src/primitives/Row.d.ts +37 -0
  219. package/lib/typescript/src/primitives/Row.d.ts.map +1 -0
  220. package/lib/typescript/src/primitives/Stack.d.ts +33 -0
  221. package/lib/typescript/src/primitives/Stack.d.ts.map +1 -0
  222. package/lib/typescript/src/primitives/Tag.d.ts +43 -0
  223. package/lib/typescript/src/primitives/Tag.d.ts.map +1 -0
  224. package/lib/typescript/src/primitives/Text.d.ts +45 -0
  225. package/lib/typescript/src/primitives/Text.d.ts.map +1 -0
  226. package/lib/typescript/src/primitives/_internal/focus-ring.d.ts +31 -0
  227. package/lib/typescript/src/primitives/_internal/focus-ring.d.ts.map +1 -0
  228. package/lib/typescript/src/primitives/button.styles.d.ts +29 -0
  229. package/lib/typescript/src/primitives/button.styles.d.ts.map +1 -0
  230. package/lib/typescript/src/primitives/index.d.ts +8 -0
  231. package/lib/typescript/src/primitives/index.d.ts.map +1 -0
  232. package/lib/typescript/src/primitives/metric.styles.d.ts +43 -0
  233. package/lib/typescript/src/primitives/metric.styles.d.ts.map +1 -0
  234. package/lib/typescript/src/primitives/row.styles.d.ts +50 -0
  235. package/lib/typescript/src/primitives/row.styles.d.ts.map +1 -0
  236. package/lib/typescript/src/primitives/stack.styles.d.ts +34 -0
  237. package/lib/typescript/src/primitives/stack.styles.d.ts.map +1 -0
  238. package/lib/typescript/src/primitives/tag.styles.d.ts +32 -0
  239. package/lib/typescript/src/primitives/tag.styles.d.ts.map +1 -0
  240. package/lib/typescript/src/primitives/text.styles.d.ts +26 -0
  241. package/lib/typescript/src/primitives/text.styles.d.ts.map +1 -0
  242. package/lib/typescript/src/theme/ThemeProvider.d.ts +32 -0
  243. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
  244. package/lib/typescript/src/theme/index.d.ts +15 -0
  245. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  246. package/lib/typescript/src/theme/native-theme.d.ts +3 -0
  247. package/lib/typescript/src/theme/native-theme.d.ts.map +1 -0
  248. package/lib/typescript/src/theme/types.d.ts +121 -0
  249. package/lib/typescript/src/theme/types.d.ts.map +1 -0
  250. package/package.json +120 -0
  251. package/src/components/ActionSheet.tsx +112 -0
  252. package/src/components/Alert.tsx +84 -0
  253. package/src/components/Avatar.tsx +110 -0
  254. package/src/components/BottomSheet.tsx +81 -0
  255. package/src/components/Card.tsx +102 -0
  256. package/src/components/Checkbox.tsx +107 -0
  257. package/src/components/EmptyState.tsx +64 -0
  258. package/src/components/Header.tsx +51 -0
  259. package/src/components/Image.tsx +89 -0
  260. package/src/components/Modal.tsx +113 -0
  261. package/src/components/Progress.tsx +124 -0
  262. package/src/components/Radio.tsx +151 -0
  263. package/src/components/Screen.tsx +62 -0
  264. package/src/components/Skeleton.tsx +154 -0
  265. package/src/components/Surface.tsx +37 -0
  266. package/src/components/TextField.tsx +102 -0
  267. package/src/components/Toast.tsx +103 -0
  268. package/src/components/Toggle.tsx +94 -0
  269. package/src/components/action-sheet.styles.ts +102 -0
  270. package/src/components/alert.styles.ts +115 -0
  271. package/src/components/avatar.styles.ts +110 -0
  272. package/src/components/bottom-sheet.styles.ts +78 -0
  273. package/src/components/card.styles.ts +56 -0
  274. package/src/components/checkbox.styles.ts +83 -0
  275. package/src/components/empty-state.styles.ts +98 -0
  276. package/src/components/header.styles.ts +44 -0
  277. package/src/components/image.styles.ts +36 -0
  278. package/src/components/index.ts +23 -0
  279. package/src/components/modal.styles.ts +106 -0
  280. package/src/components/progress.styles.ts +74 -0
  281. package/src/components/radio.styles.ts +132 -0
  282. package/src/components/screen.styles.ts +44 -0
  283. package/src/components/skeleton.styles.ts +155 -0
  284. package/src/components/surface.styles.ts +50 -0
  285. package/src/components/textfield.styles.ts +135 -0
  286. package/src/components/toast.styles.ts +115 -0
  287. package/src/components/toggle.styles.ts +73 -0
  288. package/src/contracts/contract-types.ts +199 -0
  289. package/src/icons/Icon.tsx +65 -0
  290. package/src/icons/glyphs.ts +54 -0
  291. package/src/icons/icon.styles.ts +37 -0
  292. package/src/icons/index.ts +12 -0
  293. package/src/index.ts +24 -0
  294. package/src/primitives/Button.tsx +114 -0
  295. package/src/primitives/Metric.tsx +67 -0
  296. package/src/primitives/Row.tsx +54 -0
  297. package/src/primitives/Stack.tsx +42 -0
  298. package/src/primitives/Tag.tsx +126 -0
  299. package/src/primitives/Text.tsx +71 -0
  300. package/src/primitives/_internal/focus-ring.tsx +59 -0
  301. package/src/primitives/button.styles.ts +69 -0
  302. package/src/primitives/index.ts +8 -0
  303. package/src/primitives/metric.styles.ts +75 -0
  304. package/src/primitives/row.styles.ts +66 -0
  305. package/src/primitives/stack.styles.ts +47 -0
  306. package/src/primitives/tag.styles.ts +65 -0
  307. package/src/primitives/text.styles.ts +42 -0
  308. package/src/theme/ThemeProvider.tsx +60 -0
  309. package/src/theme/index.ts +18 -0
  310. package/src/theme/native-theme.ts +215 -0
  311. package/src/theme/types.ts +137 -0
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * card.styles — Card の pure style resolver(styleRefs conformance 対応で Card.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュール(型 import のみ)にすることで node テスト
7
+ * (tsx --test)から直接実行できる。recipes/app/card.recipe.json(melta-contracts の styleRefs)
8
+ * との機械照合は scripts/lib/card-conformance.test.ts が行う。
9
+ */
10
+
11
+ /** variant → インタラクティブ(Pressable)か。action/link のみ true(recipe pressedStyle の有無と対応)。 */
12
+ export const CARD_INTERACTIVE = {
13
+ basic: false,
14
+ media: false,
15
+ action: true,
16
+ link: true
17
+ };
18
+
19
+ /**
20
+ * Card の外枠 style を一元生成(card.recipe variants.style の 1:1 写像、
21
+ * 非インタラクティブ View / インタラクティブ Pressable の両分岐で共有)。
22
+ *
23
+ * - pressed は action/link のみ elevation sm→md(recipe pressedStyle、contract hover→pressed mapping)。
24
+ * - 注: overflow:hidden は付けない。iOS は shadow(elevation) と overflow:hidden が同居すると影が
25
+ * 消えるため(contract は media でも elevation.sm 要求)。media のクリップは内側の clip View で行う。
26
+ * - media は内側 clip View が padding を持つ(resolveCardBodyStyle / recipe bodyStyle)ので外枠は padding なし。
27
+ */
28
+ export function resolveCardShape(theme, mode, variant, pressed = false) {
29
+ const sem = theme.color.semantic[mode];
30
+ const elevation = pressed && CARD_INTERACTIVE[variant] ? "md" : "sm";
31
+ return {
32
+ backgroundColor: sem["bg-surface"],
33
+ borderRadius: theme.radius.lg,
34
+ borderWidth: 1,
35
+ borderColor: sem["border-default"],
36
+ // media は内側 clip View が padding を持つので外枠は padding なし。
37
+ ...(variant === "media" ? null : {
38
+ padding: theme.spacing["6"]
39
+ }),
40
+ ...theme.elevation[elevation]
41
+ };
42
+ }
43
+
44
+ /** media の body padding(内側 clip View 側が持つ。recipe bodyStyle の写像)。media 以外は undefined。 */
45
+ export function resolveCardBodyStyle(theme, variant) {
46
+ return variant === "media" ? {
47
+ padding: theme.spacing["6"]
48
+ } : undefined;
49
+ }
50
+ //# sourceMappingURL=card.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CARD_INTERACTIVE","basic","media","action","link","resolveCardShape","theme","mode","variant","pressed","sem","color","semantic","elevation","backgroundColor","borderRadius","radius","lg","borderWidth","borderColor","padding","spacing","resolveCardBodyStyle","undefined"],"sourceRoot":"../../../src","sources":["components/card.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA,OAAO,MAAMA,gBAA8C,GAAG;EAC5DC,KAAK,EAAE,KAAK;EACZC,KAAK,EAAE,KAAK;EACZC,MAAM,EAAE,IAAI;EACZC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,KAAkB,EAClBC,IAAe,EACfC,OAAoB,EACpBC,OAAO,GAAG,KAAK,EACJ;EACX,MAAMC,GAAG,GAAGJ,KAAK,CAACK,KAAK,CAACC,QAAQ,CAACL,IAAI,CAAC;EACtC,MAAMM,SAAuB,GAAGJ,OAAO,IAAIT,gBAAgB,CAACQ,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI;EAClF,OAAO;IACLM,eAAe,EAAEJ,GAAG,CAAC,YAAY,CAAC;IAClCK,YAAY,EAAET,KAAK,CAACU,MAAM,CAACC,EAAE;IAC7BC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAET,GAAG,CAAC,gBAAgB,CAAC;IAClC;IACA,IAAIF,OAAO,KAAK,OAAO,GAAG,IAAI,GAAG;MAAEY,OAAO,EAAEd,KAAK,CAACe,OAAO,CAAC,GAAG;IAAE,CAAC,CAAC;IACjE,GAAGf,KAAK,CAACO,SAAS,CAACA,SAAS;EAC9B,CAAC;AACH;;AAEA;AACA,OAAO,SAASS,oBAAoBA,CAClChB,KAAkB,EAClBE,OAAoB,EACa;EACjC,OAAOA,OAAO,KAAK,OAAO,GAAG;IAAEY,OAAO,EAAEd,KAAK,CAACe,OAAO,CAAC,GAAG;EAAE,CAAC,GAAGE,SAAS;AAC1E","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * checkbox.styles — Checkbox の pure style resolver(styleRefs conformance 対応で Checkbox.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/checkbox.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/checkbox-conformance.test.ts が行う。
9
+ */
10
+
11
+ /**
12
+ * recipe 由来の literal 値テーブル(token 化されていない数値。conformance が recipe と照合する)。
13
+ * - box は 20px(web の 16px より大きいのはタッチ前提、recipe description)
14
+ * - hitSlop は (44 - box 20) / 2 = 12。行全体 Pressable に足して実タッチ領域 44pt を確保
15
+ */
16
+ export const CHECKBOX_SPEC = {
17
+ boxSize: 20,
18
+ boxBorderWidth: 2,
19
+ disabledOpacity: 0.5,
20
+ hitSlop: 12
21
+ };
22
+
23
+ /** 見た目(色)に効く状態入力。disabled は opacity のみで色を変えないため含めない。 */
24
+
25
+ /**
26
+ * 状態 → 最終 style 値の解決(checkbox.recipe styleRefs の 1:1 写像)。
27
+ * - 塗り(bg/border = primary.500)は checked / indeterminate 共通(recipe の variants.indeterminate
28
+ * boxStyle と states.checked boxStyle が同値であることは conformance が recipe 側で担保)。
29
+ * - error は borderColor のみ上書き(states.error)。
30
+ */
31
+ export function resolveCheckboxStyle(theme, mode, {
32
+ checked,
33
+ indeterminate = false,
34
+ error = false
35
+ }) {
36
+ const sem = theme.color.semantic[mode];
37
+ const filled = checked || indeterminate;
38
+ return {
39
+ boxStyle: {
40
+ width: CHECKBOX_SPEC.boxSize,
41
+ height: CHECKBOX_SPEC.boxSize,
42
+ borderWidth: CHECKBOX_SPEC.boxBorderWidth,
43
+ borderColor: error ? theme.color.status.danger.base : filled ? theme.color.primary["500"] : sem["border-strong"],
44
+ borderRadius: theme.radius.sm,
45
+ backgroundColor: filled ? theme.color.primary["500"] : sem["input-bg"]
46
+ },
47
+ labelStyle: {
48
+ fontSize: theme.typography.fontSize.base.fontSize,
49
+ color: sem["text-default"]
50
+ },
51
+ gap: theme.spacing["2"],
52
+ markColor: sem["text-on-accent"]
53
+ };
54
+ }
55
+ //# sourceMappingURL=checkbox.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CHECKBOX_SPEC","boxSize","boxBorderWidth","disabledOpacity","hitSlop","resolveCheckboxStyle","theme","mode","checked","indeterminate","error","sem","color","semantic","filled","boxStyle","width","height","borderWidth","borderColor","status","danger","base","primary","borderRadius","radius","sm","backgroundColor","labelStyle","fontSize","typography","gap","spacing","markColor"],"sourceRoot":"../../../src","sources":["components/checkbox.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAG;EAC3BC,OAAO,EAAE,EAAE;EACXC,cAAc,EAAE,CAAC;EACjBC,eAAe,EAAE,GAAG;EACpBC,OAAO,EAAE;AACX,CAAU;;AAEV;;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAClCC,KAAkB,EAClBC,IAAe,EACf;EAAEC,OAAO;EAAEC,aAAa,GAAG,KAAK;EAAEC,KAAK,GAAG;AAA0B,CAAC,EACnD;EAClB,MAAMC,GAAG,GAAGL,KAAK,CAACM,KAAK,CAACC,QAAQ,CAACN,IAAI,CAAC;EACtC,MAAMO,MAAM,GAAGN,OAAO,IAAIC,aAAa;EACvC,OAAO;IACLM,QAAQ,EAAE;MACRC,KAAK,EAAEhB,aAAa,CAACC,OAAO;MAC5BgB,MAAM,EAAEjB,aAAa,CAACC,OAAO;MAC7BiB,WAAW,EAAElB,aAAa,CAACE,cAAc;MACzCiB,WAAW,EAAET,KAAK,GACdJ,KAAK,CAACM,KAAK,CAACQ,MAAM,CAACC,MAAM,CAACC,IAAI,GAC9BR,MAAM,GACJR,KAAK,CAACM,KAAK,CAACW,OAAO,CAAC,KAAK,CAAC,GAC1BZ,GAAG,CAAC,eAAe,CAAC;MAC1Ba,YAAY,EAAElB,KAAK,CAACmB,MAAM,CAACC,EAAE;MAC7BC,eAAe,EAAEb,MAAM,GAAGR,KAAK,CAACM,KAAK,CAACW,OAAO,CAAC,KAAK,CAAC,GAAGZ,GAAG,CAAC,UAAU;IACvE,CAAC;IACDiB,UAAU,EAAE;MACVC,QAAQ,EAAEvB,KAAK,CAACwB,UAAU,CAACD,QAAQ,CAACP,IAAI,CAACO,QAAQ;MACjDjB,KAAK,EAAED,GAAG,CAAC,cAAc;IAC3B,CAAC;IACDoB,GAAG,EAAEzB,KAAK,CAAC0B,OAAO,CAAC,GAAG,CAAC;IACvBC,SAAS,EAAEtB,GAAG,CAAC,gBAAgB;EACjC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * empty-state.styles — EmptyState の pure style resolver(styleRefs conformance 対応で
5
+ * EmptyState.tsx から分離)。
6
+ *
7
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
8
+ * 直接実行できる。recipes/app/empty-state.recipe.json(melta-contracts の styleRefs)との
9
+ * 機械照合は scripts/lib/empty-state-conformance.test.ts が行う。
10
+ */
11
+
12
+ /**
13
+ * default variant の構成キー(token キー)。
14
+ * component は Text / View にこのキーをそのまま渡し、resolver は同じキーから style 値を解決する
15
+ * (component と resolver が別々のキーを持って drift する事故を防ぐ SSOT)。
16
+ */
17
+ export const EMPTY_STATE_SPEC = {
18
+ padding: "8",
19
+ gap: "3",
20
+ titleFont: "lg",
21
+ titleWeight: "semibold",
22
+ titleColor: "text-heading",
23
+ descriptionFont: "sm",
24
+ descriptionColor: "text-muted",
25
+ actionMarginTop: "2"
26
+ };
27
+
28
+ /** slot 構成(recipe default variant の style / titleStyle / descriptionStyle / actionStyle と 1:1)。 */
29
+
30
+ /**
31
+ * default variant → style 解決(empty-state.recipe styleRefs の 1:1 写像)。
32
+ * title / description の fontSize・fontWeight・色は EMPTY_STATE_SPEC のキーから解決する
33
+ * (component 側は同じキーを Text の variant / weight / color prop に渡す = 同源)。
34
+ */
35
+ export function resolveEmptyStateStyles(theme, mode) {
36
+ const sem = theme.color.semantic[mode];
37
+ return {
38
+ style: {
39
+ alignItems: "center",
40
+ justifyContent: "center",
41
+ padding: theme.spacing[EMPTY_STATE_SPEC.padding],
42
+ gap: theme.spacing[EMPTY_STATE_SPEC.gap]
43
+ },
44
+ titleStyle: {
45
+ fontSize: theme.typography.fontSize[EMPTY_STATE_SPEC.titleFont].fontSize,
46
+ fontWeight: theme.typography.fontWeight[EMPTY_STATE_SPEC.titleWeight],
47
+ color: sem[EMPTY_STATE_SPEC.titleColor],
48
+ textAlign: "center"
49
+ },
50
+ descriptionStyle: {
51
+ fontSize: theme.typography.fontSize[EMPTY_STATE_SPEC.descriptionFont].fontSize,
52
+ color: sem[EMPTY_STATE_SPEC.descriptionColor],
53
+ textAlign: "center"
54
+ },
55
+ actionStyle: {
56
+ marginTop: theme.spacing[EMPTY_STATE_SPEC.actionMarginTop]
57
+ }
58
+ };
59
+ }
60
+ //# sourceMappingURL=empty-state.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EMPTY_STATE_SPEC","padding","gap","titleFont","titleWeight","titleColor","descriptionFont","descriptionColor","actionMarginTop","resolveEmptyStateStyles","theme","mode","sem","color","semantic","style","alignItems","justifyContent","spacing","titleStyle","fontSize","typography","fontWeight","textAlign","descriptionStyle","actionStyle","marginTop"],"sourceRoot":"../../../src","sources":["components/empty-state.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC9BC,OAAO,EAAE,GAAG;EACZC,GAAG,EAAE,GAAG;EACRC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,UAAU;EACvBC,UAAU,EAAE,cAAc;EAC1BC,eAAe,EAAE,IAAI;EACrBC,gBAAgB,EAAE,YAAY;EAC9BC,eAAe,EAAE;AACnB,CASC;;AAED;;AA0BA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,KAAkB,EAAEC,IAAe,EAAoB;EAC7F,MAAMC,GAAG,GAAGF,KAAK,CAACG,KAAK,CAACC,QAAQ,CAACH,IAAI,CAAC;EACtC,OAAO;IACLI,KAAK,EAAE;MACLC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBhB,OAAO,EAAES,KAAK,CAACQ,OAAO,CAAClB,gBAAgB,CAACC,OAAO,CAAC;MAChDC,GAAG,EAAEQ,KAAK,CAACQ,OAAO,CAAClB,gBAAgB,CAACE,GAAG;IACzC,CAAC;IACDiB,UAAU,EAAE;MACVC,QAAQ,EAAEV,KAAK,CAACW,UAAU,CAACD,QAAQ,CAACpB,gBAAgB,CAACG,SAAS,CAAC,CAACiB,QAAQ;MACxEE,UAAU,EAAEZ,KAAK,CAACW,UAAU,CAACC,UAAU,CAACtB,gBAAgB,CAACI,WAAW,CAAC;MACrES,KAAK,EAAED,GAAG,CAACZ,gBAAgB,CAACK,UAAU,CAAC;MACvCkB,SAAS,EAAE;IACb,CAAC;IACDC,gBAAgB,EAAE;MAChBJ,QAAQ,EAAEV,KAAK,CAACW,UAAU,CAACD,QAAQ,CAACpB,gBAAgB,CAACM,eAAe,CAAC,CAACc,QAAQ;MAC9EP,KAAK,EAAED,GAAG,CAACZ,gBAAgB,CAACO,gBAAgB,CAAC;MAC7CgB,SAAS,EAAE;IACb,CAAC;IACDE,WAAW,EAAE;MAAEC,SAAS,EAAEhB,KAAK,CAACQ,OAAO,CAAClB,gBAAgB,CAACQ,eAAe;IAAE;EAC5E,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * header.styles — Header の pure style resolver(styleRefs conformance 対応で Header.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/header.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/header-conformance.test.ts が行う。
9
+ */
10
+
11
+ /**
12
+ * mode → ヘッダー style の解決(header.recipe styleRefs の 1:1 写像)。
13
+ * title の typography はここでは持たない — Header は melta の Text
14
+ * (variant="xl" weight="bold" color="text-heading" role="heading")を compose する(text recipe が正)。
15
+ */
16
+ export function resolveHeaderStyle(theme, mode) {
17
+ return {
18
+ containerStyle: {
19
+ flexDirection: "row",
20
+ alignItems: "center",
21
+ gap: theme.spacing["3"],
22
+ paddingHorizontal: theme.spacing["4"],
23
+ paddingVertical: theme.spacing["3"],
24
+ backgroundColor: theme.color.semantic[mode]["bg-page"],
25
+ borderBottomWidth: 1,
26
+ borderBottomColor: theme.color.semantic[mode]["border-default"]
27
+ },
28
+ titleWrapStyle: {
29
+ flex: 1
30
+ }
31
+ };
32
+ }
33
+ //# sourceMappingURL=header.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveHeaderStyle","theme","mode","containerStyle","flexDirection","alignItems","gap","spacing","paddingHorizontal","paddingVertical","backgroundColor","color","semantic","borderBottomWidth","borderBottomColor","titleWrapStyle","flex"],"sourceRoot":"../../../src","sources":["components/header.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CAACC,KAAkB,EAAEC,IAAe,EAAe;EACnF,OAAO;IACLC,cAAc,EAAE;MACdC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,GAAG,EAAEL,KAAK,CAACM,OAAO,CAAC,GAAG,CAAC;MACvBC,iBAAiB,EAAEP,KAAK,CAACM,OAAO,CAAC,GAAG,CAAC;MACrCE,eAAe,EAAER,KAAK,CAACM,OAAO,CAAC,GAAG,CAAC;MACnCG,eAAe,EAAET,KAAK,CAACU,KAAK,CAACC,QAAQ,CAACV,IAAI,CAAC,CAAC,SAAS,CAAC;MACtDW,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAEb,KAAK,CAACU,KAAK,CAACC,QAAQ,CAACV,IAAI,CAAC,CAAC,gBAAgB;IAChE,CAAC;IACDa,cAAc,EAAE;MAAEC,IAAI,EAAE;IAAE;EAC5B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * image.styles — Image の pure style resolver(styleRefs conformance 対応で Image.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/image.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/image-conformance.test.ts が行う。
9
+ *
10
+ * recipe の variants.default.style / states.error.style は両方とも空 object=
11
+ * 「実装はデフォルトの装飾 style を持たない」が意図(contract の tokenRefs radius=radius.md
12
+ * とは意図的な食い違い。recipe description に明記済み)。ここでは radius prop
13
+ * (token キー限定)指定時のみ borderRadius + overflow:hidden を付ける。
14
+ */
15
+
16
+ /**
17
+ * ImageStyle / ViewStyle 双方に有効な共通サブセット。
18
+ * 画像本体(RNImage)と error 時の fallback View で同じ shape を共用する。
19
+ */
20
+
21
+ /** radius / aspectRatio props → shape style の解決。未指定なら空 object(装飾なし)。 */
22
+ export function resolveImageShape(theme, {
23
+ aspectRatio,
24
+ radius
25
+ } = {}) {
26
+ const borderRadius = radius != null ? theme.radius[radius] : undefined;
27
+ return {
28
+ ...(aspectRatio != null ? {
29
+ aspectRatio
30
+ } : null),
31
+ ...(borderRadius != null ? {
32
+ borderRadius,
33
+ overflow: "hidden"
34
+ } : null)
35
+ };
36
+ }
37
+ //# sourceMappingURL=image.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveImageShape","theme","aspectRatio","radius","borderRadius","undefined","overflow"],"sourceRoot":"../../../src","sources":["components/image.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAOA;AACA,OAAO,SAASA,iBAAiBA,CAC/BC,KAAkB,EAClB;EAAEC,WAAW;EAAEC;AAAqD,CAAC,GAAG,CAAC,CAAC,EACzD;EACjB,MAAMC,YAAY,GAAGD,MAAM,IAAI,IAAI,GAAGF,KAAK,CAACE,MAAM,CAACA,MAAM,CAAC,GAAGE,SAAS;EACtE,OAAO;IACL,IAAIH,WAAW,IAAI,IAAI,GAAG;MAAEA;IAAY,CAAC,GAAG,IAAI,CAAC;IACjD,IAAIE,YAAY,IAAI,IAAI,GAAG;MAAEA,YAAY;MAAEE,QAAQ,EAAE;IAAS,CAAC,GAAG,IAAI;EACxE,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * melta-app components の公開エントリ(設計書 §1)。
5
+ * Surface はライブラリ公開(P1)で正式 export(契約 surface.contract.json + recipe を持つ implemented)。
6
+ */
7
+
8
+ export { Surface } from "./Surface.js";
9
+ export { Image } from "./Image.js";
10
+ export { Card } from "./Card.js";
11
+ export { Skeleton } from "./Skeleton.js";
12
+ export { EmptyState } from "./EmptyState.js";
13
+ export { Screen } from "./Screen.js";
14
+ export { Header } from "./Header.js";
15
+ export { Avatar } from "./Avatar.js";
16
+ export { TextField } from "./TextField.js";
17
+ export { Toggle } from "./Toggle.js";
18
+ export { Checkbox } from "./Checkbox.js";
19
+ export { Radio } from "./Radio.js";
20
+ export { Alert } from "./Alert.js";
21
+ export { Toast } from "./Toast.js";
22
+ export { Progress } from "./Progress.js";
23
+ export { Modal } from "./Modal.js";
24
+ export { ActionSheet } from "./ActionSheet.js";
25
+ export { BottomSheet } from "./BottomSheet.js";
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Surface","Image","Card","Skeleton","EmptyState","Screen","Header","Avatar","TextField","Toggle","Checkbox","Radio","Alert","Toast","Progress","Modal","ActionSheet","BottomSheet"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAW;AACnC,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,WAAW,QAAQ,kBAAe","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * modal.styles — Modal の pure style resolver(styleRefs conformance 対応で Modal.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/modal.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/modal-conformance.test.ts が行う。
9
+ *
10
+ * - variant(confirmation/form/alert)は意味分類で style は 3 つとも共通(recipe と同じ)。
11
+ * props には受けるが style 解決では使わない(API 対称性のため interface には残す)。
12
+ * - overlay の黒 50% は token 外の literal(recipe description 参照。web も bg-black/50)。
13
+ * - elevation.overlay は iOS shadow* + Android elevation の複合 token のため、
14
+ * panelStyle 本体と分けて panelElevation で返す(Surface と同じ扱い)。
15
+ * - sizes はタブレット以上で効く maxWidth(モバイルは width 100% - overlay padding が先に効く)。
16
+ */
17
+
18
+ /** size → panel の maxWidth(modal.recipe sizes の literal と 1:1)。 */
19
+ export const MODAL_MAX_WIDTH = {
20
+ small: 384,
21
+ medium: 512,
22
+ large: 768
23
+ };
24
+
25
+ /** overlay の黒 50%(token 外 literal。recipe / web の bg-black/50 と同値)。 */
26
+ // eslint-disable-next-line melta/no-raw-color -- overlay の黒 50% は契約上 token 外の literal(recipe description / web の bg-black/50 と同値)
27
+ export const MODAL_OVERLAY_COLOR = "rgba(0,0,0,0.5)";
28
+ /**
29
+ * size / mode → Modal style の解決(modal.recipe styleRefs の 1:1 写像)。
30
+ * variant は意味分類のみで style に影響しない(recipe の 3 variant が同値)。
31
+ */
32
+ export function resolveModalStyle(theme, mode, {
33
+ size = "medium"
34
+ } = {}) {
35
+ const semantic = theme.color.semantic[mode];
36
+ return {
37
+ overlayStyle: {
38
+ flex: 1,
39
+ backgroundColor: MODAL_OVERLAY_COLOR,
40
+ justifyContent: "center",
41
+ alignItems: "center",
42
+ padding: theme.spacing["4"]
43
+ },
44
+ panelStyle: {
45
+ backgroundColor: semantic["bg-surface"],
46
+ borderRadius: theme.radius.lg,
47
+ padding: theme.spacing["6"],
48
+ width: "100%",
49
+ maxWidth: MODAL_MAX_WIDTH[size]
50
+ },
51
+ panelElevation: theme.elevation.overlay,
52
+ titleStyle: {
53
+ fontSize: theme.typography.fontSize["2xl"].fontSize,
54
+ fontWeight: theme.typography.fontWeight.bold,
55
+ color: semantic["text-heading"]
56
+ },
57
+ bodyStyle: {
58
+ marginTop: theme.spacing["2"]
59
+ },
60
+ footerStyle: {
61
+ flexDirection: "row",
62
+ justifyContent: "flex-end",
63
+ gap: theme.spacing["3"],
64
+ marginTop: theme.spacing["6"]
65
+ }
66
+ };
67
+ }
68
+ //# sourceMappingURL=modal.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MODAL_MAX_WIDTH","small","medium","large","MODAL_OVERLAY_COLOR","resolveModalStyle","theme","mode","size","semantic","color","overlayStyle","flex","backgroundColor","justifyContent","alignItems","padding","spacing","panelStyle","borderRadius","radius","lg","width","maxWidth","panelElevation","elevation","overlay","titleStyle","fontSize","typography","fontWeight","bold","bodyStyle","marginTop","footerStyle","flexDirection","gap"],"sourceRoot":"../../../src","sources":["components/modal.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA,OAAO,MAAMA,eAA0C,GAAG;EACxDC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,iBAAiB;AAoCpD;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAC/BC,KAAkB,EAClBC,IAAe,EACf;EAAEC,IAAI,GAAG;AAA0B,CAAC,GAAG,CAAC,CAAC,EAC7B;EACZ,MAAMC,QAAQ,GAAGH,KAAK,CAACI,KAAK,CAACD,QAAQ,CAACF,IAAI,CAAC;EAC3C,OAAO;IACLI,YAAY,EAAE;MACZC,IAAI,EAAE,CAAC;MACPC,eAAe,EAAET,mBAAmB;MACpCU,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,OAAO,EAAEV,KAAK,CAACW,OAAO,CAAC,GAAG;IAC5B,CAAC;IACDC,UAAU,EAAE;MACVL,eAAe,EAAEJ,QAAQ,CAAC,YAAY,CAAC;MACvCU,YAAY,EAAEb,KAAK,CAACc,MAAM,CAACC,EAAE;MAC7BL,OAAO,EAAEV,KAAK,CAACW,OAAO,CAAC,GAAG,CAAC;MAC3BK,KAAK,EAAE,MAAM;MACbC,QAAQ,EAAEvB,eAAe,CAACQ,IAAI;IAChC,CAAC;IACDgB,cAAc,EAAElB,KAAK,CAACmB,SAAS,CAACC,OAAO;IACvCC,UAAU,EAAE;MACVC,QAAQ,EAAEtB,KAAK,CAACuB,UAAU,CAACD,QAAQ,CAAC,KAAK,CAAC,CAACA,QAAQ;MACnDE,UAAU,EAAExB,KAAK,CAACuB,UAAU,CAACC,UAAU,CAACC,IAAI;MAC5CrB,KAAK,EAAED,QAAQ,CAAC,cAAc;IAChC,CAAC;IACDuB,SAAS,EAAE;MAAEC,SAAS,EAAE3B,KAAK,CAACW,OAAO,CAAC,GAAG;IAAE,CAAC;IAC5CiB,WAAW,EAAE;MACXC,aAAa,EAAE,KAAK;MACpBrB,cAAc,EAAE,UAAU;MAC1BsB,GAAG,EAAE9B,KAAK,CAACW,OAAO,CAAC,GAAG,CAAC;MACvBgB,SAAS,EAAE3B,KAAK,CAACW,OAAO,CAAC,GAAG;IAC9B;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * progress.styles — Progress の pure style resolver(styleRefs conformance 対応で Progress.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/progress.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/progress-conformance.test.ts が行う。
9
+ *
10
+ * - track(高さ8 = web h-2)の中を fill が value%(determinate)または往復アニメ
11
+ * (indeterminate variant)で埋める。fill の幅は実装(Progress.tsx)が value から算出する
12
+ * (recipe は色と形のみ、recipe description)。
13
+ * - track の背景は semantic border-default → dark mode では dark 側から解決する。
14
+ * fill は primary.500 / status.success.base(mode 非依存)。
15
+ */
16
+
17
+ /** track / fill の高さ(recipe の literal 8 = web h-2 の写像。token では無い raw px)。 */
18
+ export const PROGRESS_TRACK_HEIGHT = 8;
19
+
20
+ /** indeterminate variant の fill 幅比率(track の 40%。往復アニメ / reduce motion 時の静止幅)。 */
21
+ export const PROGRESS_INDETERMINATE_FILL_RATIO = 0.4;
22
+
23
+ /** 角丸キー(token キー。全 variant 共通 radius.full)。 */
24
+ export const PROGRESS_RADIUS = "full";
25
+
26
+ /** value の 0〜100 clamp(非有限は 0 に落とす)。determinate の幅・accessibilityValue.now の同源。 */
27
+ export function clampProgressValue(value) {
28
+ if (!Number.isFinite(value)) return 0;
29
+ return Math.min(100, Math.max(0, value));
30
+ }
31
+
32
+ /** slot 構成(progress.recipe 各 variant の trackStyle / fillStyle と 1:1)。 */
33
+
34
+ /**
35
+ * variant → 全 slot の style 解決(progress.recipe styleRefs の 1:1 写像)。
36
+ * - track: semantic border-default(mode 依存)。
37
+ * - fill: success は status.success.base、primary / indeterminate は primary.500(mode 非依存)。
38
+ */
39
+ export function resolveProgressStyles(theme, mode, variant) {
40
+ const fill = variant === "success" ? theme.color.status.success.base : theme.color.primary["500"];
41
+ return {
42
+ trackStyle: {
43
+ backgroundColor: theme.color.semantic[mode]["border-default"],
44
+ borderRadius: theme.radius[PROGRESS_RADIUS],
45
+ height: PROGRESS_TRACK_HEIGHT,
46
+ overflow: "hidden"
47
+ },
48
+ fillStyle: {
49
+ backgroundColor: fill,
50
+ borderRadius: theme.radius[PROGRESS_RADIUS],
51
+ height: PROGRESS_TRACK_HEIGHT
52
+ }
53
+ };
54
+ }
55
+ //# sourceMappingURL=progress.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PROGRESS_TRACK_HEIGHT","PROGRESS_INDETERMINATE_FILL_RATIO","PROGRESS_RADIUS","clampProgressValue","value","Number","isFinite","Math","min","max","resolveProgressStyles","theme","mode","variant","fill","color","status","success","base","primary","trackStyle","backgroundColor","semantic","borderRadius","radius","height","overflow","fillStyle"],"sourceRoot":"../../../src","sources":["components/progress.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA,OAAO,MAAMA,qBAAqB,GAAG,CAAC;;AAEtC;AACA,OAAO,MAAMC,iCAAiC,GAAG,GAAG;;AAEpD;AACA,OAAO,MAAMC,eAAe,GAAG,MAAmC;;AAElE;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAa,EAAU;EACxD,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACF,KAAK,CAAC,EAAE,OAAO,CAAC;EACrC,OAAOG,IAAI,CAACC,GAAG,CAAC,GAAG,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEL,KAAK,CAAC,CAAC;AAC1C;;AAEA;;AAeA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,qBAAqBA,CACnCC,KAAkB,EAClBC,IAAe,EACfC,OAAwB,EACR;EAChB,MAAMC,IAAI,GACRD,OAAO,KAAK,SAAS,GAAGF,KAAK,CAACI,KAAK,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,GAAGP,KAAK,CAACI,KAAK,CAACI,OAAO,CAAC,KAAK,CAAC;EACtF,OAAO;IACLC,UAAU,EAAE;MACVC,eAAe,EAAEV,KAAK,CAACI,KAAK,CAACO,QAAQ,CAACV,IAAI,CAAC,CAAC,gBAAgB,CAAC;MAC7DW,YAAY,EAAEZ,KAAK,CAACa,MAAM,CAACtB,eAAe,CAAC;MAC3CuB,MAAM,EAAEzB,qBAAqB;MAC7B0B,QAAQ,EAAE;IACZ,CAAC;IACDC,SAAS,EAAE;MACTN,eAAe,EAAEP,IAAI;MACrBS,YAAY,EAAEZ,KAAK,CAACa,MAAM,CAACtB,eAAe,CAAC;MAC3CuB,MAAM,EAAEzB;IACV;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * radio.styles — Radio(RadioGroup)の pure style resolver(styleRefs conformance 対応で
5
+ * Radio.tsx から分離)。
6
+ *
7
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
8
+ * 直接実行できる。recipes/app/radio.recipe.json(melta-contracts の styleRefs)との
9
+ * 機械照合は scripts/lib/radio-conformance.test.ts が行う。
10
+ *
11
+ * recipe の構造メモ: circleStyle/dotStyle/labelStyle/groupLabelStyle/optionGap は
12
+ * variant 非依存の共通部として vertical にのみ載っている(recipe description)。
13
+ * 実装ではこの共通部を variant に関わらず同値で返す(conformance が variant 間一致を照合)。
14
+ */
15
+
16
+ /** recipe 由来の literal 値テーブル(token 化されていない数値。conformance が recipe と照合する)。 */
17
+ export const RADIO_SPEC = {
18
+ circleSize: 20,
19
+ circleBorderWidth: 2,
20
+ dotSize: 10,
21
+ cardBorderWidth: 1,
22
+ disabledOpacity: 0.5
23
+ };
24
+ /**
25
+ * variant → グループ全体の style 解決(radio.recipe styleRefs の 1:1 写像)。
26
+ * circle は selected/error の state 差分を持つため resolveRadioCircleStyle に分離。
27
+ */
28
+ export function resolveRadioGroupStyle(theme, mode, variant) {
29
+ const sem = theme.color.semantic[mode];
30
+ const containerStyle = variant === "horizontal" ? {
31
+ flexDirection: "row",
32
+ flexWrap: "wrap",
33
+ gap: theme.spacing["4"]
34
+ } : {
35
+ flexDirection: "column",
36
+ gap: theme.spacing["3"]
37
+ };
38
+ return {
39
+ containerStyle,
40
+ dotStyle: {
41
+ width: RADIO_SPEC.dotSize,
42
+ height: RADIO_SPEC.dotSize,
43
+ borderRadius: theme.radius.full,
44
+ backgroundColor: theme.color.primary["500"]
45
+ },
46
+ labelStyle: {
47
+ fontSize: theme.typography.fontSize.base.fontSize,
48
+ color: sem["text-default"]
49
+ },
50
+ groupLabelStyle: {
51
+ fontSize: theme.typography.fontSize.sm.fontSize,
52
+ fontWeight: theme.typography.fontWeight.medium,
53
+ color: sem["text-heading"],
54
+ marginBottom: theme.spacing["3"]
55
+ },
56
+ optionGap: theme.spacing["2"],
57
+ errorTextStyle: {
58
+ fontSize: theme.typography.fontSize.xs.fontSize,
59
+ color: theme.color.status.danger.textLight,
60
+ marginTop: theme.spacing["2"]
61
+ },
62
+ ...(variant === "card-style" ? {
63
+ cardStyle: {
64
+ borderWidth: RADIO_SPEC.cardBorderWidth,
65
+ borderColor: sem["border-default"],
66
+ borderRadius: theme.radius.md,
67
+ padding: theme.spacing["4"]
68
+ },
69
+ cardSelectedStyle: {
70
+ borderColor: theme.color.primary["500"],
71
+ backgroundColor: theme.color.primary["50"]
72
+ }
73
+ } : null)
74
+ };
75
+ }
76
+
77
+ /**
78
+ * 状態 → radioCircle の style 解決(variant 非依存の共通部 + states.selected / states.error 差分)。
79
+ * error は selected より優先(契約 stateSpecs: 選択済みでもエラーなら赤枠)。
80
+ */
81
+ export function resolveRadioCircleStyle(theme, mode, {
82
+ selected,
83
+ error = false
84
+ }) {
85
+ const sem = theme.color.semantic[mode];
86
+ return {
87
+ width: RADIO_SPEC.circleSize,
88
+ height: RADIO_SPEC.circleSize,
89
+ borderWidth: RADIO_SPEC.circleBorderWidth,
90
+ borderColor: error ? theme.color.status.danger.base : selected ? theme.color.primary["500"] : sem["border-strong"],
91
+ borderRadius: theme.radius.full,
92
+ alignItems: "center",
93
+ justifyContent: "center"
94
+ };
95
+ }
96
+ //# sourceMappingURL=radio.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["RADIO_SPEC","circleSize","circleBorderWidth","dotSize","cardBorderWidth","disabledOpacity","resolveRadioGroupStyle","theme","mode","variant","sem","color","semantic","containerStyle","flexDirection","flexWrap","gap","spacing","dotStyle","width","height","borderRadius","radius","full","backgroundColor","primary","labelStyle","fontSize","typography","base","groupLabelStyle","sm","fontWeight","medium","marginBottom","optionGap","errorTextStyle","xs","status","danger","textLight","marginTop","cardStyle","borderWidth","borderColor","md","padding","cardSelectedStyle","resolveRadioCircleStyle","selected","error","alignItems","justifyContent"],"sourceRoot":"../../../src","sources":["components/radio.styles.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * screen.styles — Screen の pure style resolver(styleRefs conformance 対応で Screen.tsx から分離)。
5
+ *
6
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
7
+ * 直接実行できる。recipes/app/screen.recipe.json(melta-contracts の styleRefs)との
8
+ * 機械照合は scripts/lib/screen-conformance.test.ts が行う。
9
+ */
10
+
11
+ /** content の padding(spacing token キー限定 | "none")。default "4"(recipe に焼いてある)。 */
12
+
13
+ /**
14
+ * variant / padding → 画面骨格 style の解決(screen.recipe styleRefs の 1:1 写像)。
15
+ * - safeAreaStyle は両 variant 共通(flex:1 + bg-page。mode で semantic 解決)。
16
+ * - contentStyle は fixed のみ flex:1 を持つ(scroll は ScrollView が伸びるため不要)。
17
+ * - padding="none" は padding を出力しない。
18
+ */
19
+ export function resolveScreenStyle(theme, mode, {
20
+ variant,
21
+ padding = "4"
22
+ }) {
23
+ return {
24
+ safeAreaStyle: {
25
+ flex: 1,
26
+ backgroundColor: theme.color.semantic[mode]["bg-page"]
27
+ },
28
+ contentStyle: {
29
+ ...(variant === "fixed" ? {
30
+ flex: 1
31
+ } : null),
32
+ ...(padding !== "none" ? {
33
+ padding: theme.spacing[padding]
34
+ } : null)
35
+ }
36
+ };
37
+ }
38
+ //# sourceMappingURL=screen.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveScreenStyle","theme","mode","variant","padding","safeAreaStyle","flex","backgroundColor","color","semantic","contentStyle","spacing"],"sourceRoot":"../../../src","sources":["components/screen.styles.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CAChCC,KAAkB,EAClBC,IAAe,EACf;EAAEC,OAAO;EAAEC,OAAO,GAAG;AAAsB,CAAC,EAC/B;EACb,OAAO;IACLC,aAAa,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEN,KAAK,CAACO,KAAK,CAACC,QAAQ,CAACP,IAAI,CAAC,CAAC,SAAS;IAAE,CAAC;IAClFQ,YAAY,EAAE;MACZ,IAAIP,OAAO,KAAK,OAAO,GAAG;QAAEG,IAAI,EAAE;MAAW,CAAC,GAAG,IAAI,CAAC;MACtD,IAAIF,OAAO,KAAK,MAAM,GAAG;QAAEA,OAAO,EAAEH,KAAK,CAACU,OAAO,CAACP,OAAO;MAAE,CAAC,GAAG,IAAI;IACrE;EACF,CAAC;AACH","ignoreList":[]}