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,91 @@
1
+ /**
2
+ * radio.styles — Radio(RadioGroup)の pure style resolver(styleRefs conformance 対応で
3
+ * Radio.tsx から分離)。
4
+ *
5
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
6
+ * 直接実行できる。recipes/app/radio.recipe.json(melta-contracts の styleRefs)との
7
+ * 機械照合は scripts/lib/radio-conformance.test.ts が行う。
8
+ *
9
+ * recipe の構造メモ: circleStyle/dotStyle/labelStyle/groupLabelStyle/optionGap は
10
+ * variant 非依存の共通部として vertical にのみ載っている(recipe description)。
11
+ * 実装ではこの共通部を variant に関わらず同値で返す(conformance が variant 間一致を照合)。
12
+ */
13
+ import type { FontWeightValue, NativeTheme, ThemeMode } from "../theme";
14
+ export type RadioVariant = "vertical" | "horizontal" | "card-style";
15
+ /** recipe 由来の literal 値テーブル(token 化されていない数値。conformance が recipe と照合する)。 */
16
+ export declare const RADIO_SPEC: {
17
+ readonly circleSize: 20;
18
+ readonly circleBorderWidth: 2;
19
+ readonly dotSize: 10;
20
+ readonly cardBorderWidth: 1;
21
+ readonly disabledOpacity: 0.5;
22
+ };
23
+ export interface RadioGroupResolved {
24
+ /** variant 別レイアウト(vertical/card-style は縦積み、horizontal は wrap する横並び)。 */
25
+ containerStyle: {
26
+ flexDirection: "column" | "row";
27
+ flexWrap?: "wrap";
28
+ gap: number;
29
+ };
30
+ /** selected 時に circle 内へ表示する内側ドット。 */
31
+ dotStyle: {
32
+ width: number;
33
+ height: number;
34
+ borderRadius: number;
35
+ backgroundColor: string;
36
+ };
37
+ /** option label(recipe の labelStyle スロットと 1:1。実装は Text primitive の base/text-default で同値)。 */
38
+ labelStyle: {
39
+ fontSize: number;
40
+ color: string;
41
+ };
42
+ /** groupLabel = fieldset の legend 相当(FORM_FIELDSET_LEGEND_REQUIRED で必須)。 */
43
+ groupLabelStyle: {
44
+ fontSize: number;
45
+ fontWeight: FontWeightValue;
46
+ color: string;
47
+ marginBottom: number;
48
+ };
49
+ /** 各 option 内の circle と label の間隔。 */
50
+ optionGap: number;
51
+ /** states.error のエラーメッセージ(danger.text-light は recipe 指定どおり mode 非依存)。 */
52
+ errorTextStyle: {
53
+ fontSize: number;
54
+ color: string;
55
+ marginTop: number;
56
+ };
57
+ /** card-style のみ: 各 option を包む枠付きカード。 */
58
+ cardStyle?: {
59
+ borderWidth: number;
60
+ borderColor: string;
61
+ borderRadius: number;
62
+ padding: number;
63
+ };
64
+ /** card-style のみ: selected 時にカードへ重ねる差分。 */
65
+ cardSelectedStyle?: {
66
+ borderColor: string;
67
+ backgroundColor: string;
68
+ };
69
+ }
70
+ /**
71
+ * variant → グループ全体の style 解決(radio.recipe styleRefs の 1:1 写像)。
72
+ * circle は selected/error の state 差分を持つため resolveRadioCircleStyle に分離。
73
+ */
74
+ export declare function resolveRadioGroupStyle(theme: NativeTheme, mode: ThemeMode, variant: RadioVariant): RadioGroupResolved;
75
+ /**
76
+ * 状態 → radioCircle の style 解決(variant 非依存の共通部 + states.selected / states.error 差分)。
77
+ * error は selected より優先(契約 stateSpecs: 選択済みでもエラーなら赤枠)。
78
+ */
79
+ export declare function resolveRadioCircleStyle(theme: NativeTheme, mode: ThemeMode, { selected, error }: {
80
+ selected: boolean;
81
+ error?: boolean;
82
+ }): {
83
+ width: number;
84
+ height: number;
85
+ borderWidth: number;
86
+ borderColor: string;
87
+ borderRadius: number;
88
+ alignItems: "center";
89
+ justifyContent: "center";
90
+ };
91
+ //# sourceMappingURL=radio.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/radio.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,CAAC;AAEpE,4EAA4E;AAC5E,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,cAAc,EAAE;QAAE,aAAa,EAAE,QAAQ,GAAG,KAAK,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACpF,sCAAsC;IACtC,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3F,8FAA8F;IAC9F,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,4EAA4E;IAC5E,eAAe,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACxG,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,cAAc,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,yCAAyC;IACzC,SAAS,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAChG,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,GACpB,kBAAkB,CA6CpB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,EAAE,QAAQ,EAAE,KAAa,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAClE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;IACrB,cAAc,EAAE,QAAQ,CAAC;CAC1B,CAeA"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * screen.styles — Screen の pure style resolver(styleRefs conformance 対応で Screen.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/screen.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/screen-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, SpacingKey, ThemeMode } from "../theme";
9
+ /** content の padding(spacing token キー限定 | "none")。default "4"(recipe に焼いてある)。 */
10
+ export type ScreenPadding = SpacingKey | "none";
11
+ export interface ScreenStyleProps {
12
+ /** fixed = flex:1 の View / scroll = ScrollView contentContainerStyle。 */
13
+ variant: "fixed" | "scroll";
14
+ /** content の padding。default "4"。 */
15
+ padding?: ScreenPadding;
16
+ }
17
+ export interface ScreenStyle {
18
+ safeAreaStyle: {
19
+ flex: 1;
20
+ backgroundColor: string;
21
+ };
22
+ contentStyle: {
23
+ flex?: 1;
24
+ padding?: number;
25
+ };
26
+ }
27
+ /**
28
+ * variant / padding → 画面骨格 style の解決(screen.recipe styleRefs の 1:1 写像)。
29
+ * - safeAreaStyle は両 variant 共通(flex:1 + bg-page。mode で semantic 解決)。
30
+ * - contentStyle は fixed のみ flex:1 を持つ(scroll は ScrollView が伸びるため不要)。
31
+ * - padding="none" は padding を出力しない。
32
+ */
33
+ export declare function resolveScreenStyle(theme: NativeTheme, mode: ThemeMode, { variant, padding }: ScreenStyleProps): ScreenStyle;
34
+ //# sourceMappingURL=screen.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/screen.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,qCAAqC;IACrC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,YAAY,EAAE;QAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,EAAE,OAAO,EAAE,OAAa,EAAE,EAAE,gBAAgB,GAC3C,WAAW,CAQb"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * skeleton.styles — Skeleton の pure style resolver(styleRefs conformance 対応で Skeleton.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/skeleton.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/skeleton-conformance.test.ts が行う。
7
+ */
8
+ import type { ElevationStyle, NativeTheme, ThemeMode } from "../theme";
9
+ export type SkeletonVariant = "text" | "circle" | "card";
10
+ /** contract states(loading = pulse、loaded = Skeleton 自体をアンマウント)。 */
11
+ export type SkeletonState = "loading" | "loaded";
12
+ /**
13
+ * card variant の Surface 土台へ渡す props(token キー)。
14
+ * component は Surface にこのキーをそのまま渡し、resolver は同じキーから style 値を解決する
15
+ * (component と resolver が別々のキーを持って drift する事故を防ぐ SSOT)。
16
+ */
17
+ export declare const CARD_SURFACE_SPEC: {
18
+ readonly bg: "bg-surface";
19
+ readonly radius: "lg";
20
+ readonly elevation: "sm";
21
+ readonly padding: "6";
22
+ };
23
+ /** バー / アバター円の寸法。recipe と同じく token に対応が無い literal(recipe description 参照)。 */
24
+ export declare const SKELETON_METRICS: {
25
+ /** text variant の行バー高さ */
26
+ readonly textBarHeight: 14;
27
+ /** card variant 内のバー高さ */
28
+ readonly cardBarHeight: 12;
29
+ /** circle variant / card 内アバター円の直径 */
30
+ readonly circleSize: 40;
31
+ };
32
+ /**
33
+ * pulse の opacity 振れ幅(states.loading.animation の opacityFrom/opacityTo)。
34
+ * to は states.loading.style.opacity(= dim 側の見た目)と同値。
35
+ */
36
+ export declare const PULSE_OPACITY: {
37
+ readonly from: 1;
38
+ readonly to: 0.4;
39
+ };
40
+ /** バー1本分の style(text の行バー / card 内バーで共通の形)。 */
41
+ export interface SkeletonBarStyle {
42
+ height: number;
43
+ borderRadius: number;
44
+ backgroundColor: string;
45
+ }
46
+ /** variant ごとの slot 構成(recipe の style / barStyle と 1:1)。 */
47
+ export interface SkeletonVariantStyles {
48
+ /** text: 行バー style + 行間 gap。recipe は 1 slot に併記(component 側で gap をコンテナへ分離) */
49
+ text: {
50
+ style: SkeletonBarStyle & {
51
+ gap: number;
52
+ };
53
+ };
54
+ circle: {
55
+ style: {
56
+ width: number;
57
+ height: number;
58
+ borderRadius: number;
59
+ backgroundColor: string;
60
+ };
61
+ };
62
+ card: {
63
+ /** Surface 土台の style。elevation は複合値(iOS shadow* + Android elevation)のまま保持 */
64
+ style: {
65
+ backgroundColor: string;
66
+ borderRadius: number;
67
+ borderWidth: number;
68
+ borderColor: string;
69
+ padding: number;
70
+ elevation: ElevationStyle;
71
+ };
72
+ barStyle: SkeletonBarStyle;
73
+ };
74
+ }
75
+ /**
76
+ * variant → style 解決(skeleton.recipe styleRefs の 1:1 写像)。
77
+ * バーの色は text / circle / card すべて border-default(contract に忠実、§1 Agent m2)。
78
+ * card の土台は CARD_SURFACE_SPEC のキーから解決する(component 側の Surface props と同源)。
79
+ */
80
+ export declare function resolveSkeletonVariants(theme: NativeTheme, mode: ThemeMode): SkeletonVariantStyles;
81
+ /** states ごとの slot 構成(recipe の states.*.style / animation と 1:1)。 */
82
+ export interface SkeletonStateStyles {
83
+ loading: {
84
+ /** dim 側の見た目(pulse の下限) */
85
+ style: {
86
+ opacity: number;
87
+ };
88
+ /** pulse アニメーション仕様(duration は motion token 由来の ms 数値) */
89
+ animation: {
90
+ opacityFrom: number;
91
+ opacityTo: number;
92
+ duration: number;
93
+ };
94
+ };
95
+ /** loaded は Skeleton 自体をアンマウント(style 差分なし) */
96
+ loaded: {
97
+ style: Record<string, never>;
98
+ };
99
+ }
100
+ /**
101
+ * states → 値解決。loading の pulse は opacity from↔to を motion.duration.slow で loop
102
+ * (reduce-motion ON 時の完全停止は component 側の責務)。
103
+ */
104
+ export declare function resolveSkeletonStates(theme: NativeTheme): SkeletonStateStyles;
105
+ //# sourceMappingURL=skeleton.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/skeleton.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EAIX,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AACzD,oEAAoE;AACpE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;CAU7B,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB;IAC3B,0BAA0B;;IAE1B,0BAA0B;;IAE1B,sCAAsC;;CAE9B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa;;;CAAgC,CAAC;AAE3D,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,IAAI,EAAE;QAAE,KAAK,EAAE,gBAAgB,GAAG;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACpD,MAAM,EAAE;QACN,KAAK,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAC;YAAC,eAAe,EAAE,MAAM,CAAA;SAAE,CAAC;KACzF,CAAC;IACF,IAAI,EAAE;QACJ,6EAA6E;QAC7E,KAAK,EAAE;YACL,eAAe,EAAE,MAAM,CAAC;YACxB,YAAY,EAAE,MAAM,CAAC;YACrB,WAAW,EAAE,MAAM,CAAC;YACpB,WAAW,EAAE,MAAM,CAAC;YACpB,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,cAAc,CAAC;SAC3B,CAAC;QACF,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,GAAG,qBAAqB,CAoClG;AAED,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE;QACP,2BAA2B;QAC3B,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3B,yDAAyD;QACzD,SAAS,EAAE;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACzE,CAAC;IACF,8CAA8C;IAC9C,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;KAAE,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAY7E"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * surface.styles — Surface の pure style resolver(styleRefs conformance 対応で Surface.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/surface.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/surface-conformance.test.ts が行う。
7
+ */
8
+ import type { ElevationKey, ElevationStyle, NativeTheme, RadiusKey, SemanticColors, SpacingKey, ThemeMode } from "../theme";
9
+ /** Surface の見た目 props(すべて token キー限定。デフォルトは recipe default variant と 1:1)。 */
10
+ export interface SurfaceStyleProps {
11
+ bg?: keyof SemanticColors;
12
+ radius?: RadiusKey;
13
+ elevation?: ElevationKey;
14
+ padding?: SpacingKey;
15
+ }
16
+ /**
17
+ * props → 最終 style 値の解決。
18
+ * base(背景・角丸・padding)と elevation(iOS shadow* + Android elevation の複合値)を
19
+ * 分けて返し、呼び出し側が [base, elevation, style] の順で合成する(従来の適用順を維持)。
20
+ * デフォルト(bg=bg-surface / radius=lg / elevation=none、padding は無し)は
21
+ * recipe(surface.recipe.json)の default variant と一致させている。
22
+ */
23
+ export declare function resolveSurfaceStyle(theme: NativeTheme, mode: ThemeMode, { bg, radius, elevation, padding }?: SurfaceStyleProps): {
24
+ base: {
25
+ backgroundColor: string;
26
+ borderRadius: number;
27
+ padding?: number;
28
+ };
29
+ elevation: ElevationStyle;
30
+ };
31
+ //# sourceMappingURL=surface.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/surface.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,SAAS,EACT,cAAc,EACd,UAAU,EACV,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,EAAE,EAAiB,EAAE,MAAa,EAAE,SAAkB,EAAE,OAAO,EAAE,GAAE,iBAAsB,GACxF;IACD,IAAI,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,SAAS,EAAE,cAAc,CAAC;CAC3B,CASA"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * textfield.styles — TextField の pure style resolver(styleRefs conformance 対応で TextField.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/textfield.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/textfield-conformance.test.ts が行う。
7
+ *
8
+ * - variant は入力の検証状態(default/error/success/disabled = 契約の variant 語彙)。
9
+ * disabled は component 側で prop disabled=true から上書きされる(TextField.tsx 参照)。
10
+ * - label/helperText/errorText は variant 非依存の共通部(recipe は default にのみ載せる規約、
11
+ * 実装は全 variant で同じものを返す)。
12
+ * - status 色(error の bg / errorText の文字色)は mode で subtle-light/dark・text-light/dark を
13
+ * 切り替える(semantic 色を semantic[mode] で引くのと同じ規約。recipe は light 側を encode)。
14
+ * - focus は state 差分(borderColor のみ)。resolveTextFieldFocusStyle で別関数にし、
15
+ * conformance が recipe states.focus と照合する。
16
+ */
17
+ import type { NativeTheme, ThemeMode, FontSizeKey, FontWeightValue, SpacingKey } from "../theme";
18
+ /** 検証状態(textfield.contract の variant 語彙と 1:1)。 */
19
+ export type TextFieldVariant = "default" | "error" | "success" | "disabled";
20
+ export type TextFieldSize = "small" | "medium" | "large";
21
+ /**
22
+ * size → height / 横 padding / 入力文字 fontSize(textfield.recipe sizes と整合)。
23
+ * height の literal は recipe の値を直書きし、conformance で recipe と照合する。
24
+ */
25
+ export declare const TEXTFIELD_SIZE_SPEC: Record<TextFieldSize, {
26
+ height: number;
27
+ px: SpacingKey;
28
+ font: FontSizeKey;
29
+ }>;
30
+ /** resolver の出力(label → input → helperText / errorText の縦構成の各パート)。 */
31
+ export interface TextFieldResolvedStyle {
32
+ input: {
33
+ height: number;
34
+ paddingHorizontal: number;
35
+ fontSize: number;
36
+ borderWidth: number;
37
+ borderColor: string;
38
+ backgroundColor: string;
39
+ borderRadius: number;
40
+ /** 入力文字色。recipe description の「disabled のテキスト色は text-muted」を担う。 */
41
+ color: string;
42
+ };
43
+ label: {
44
+ fontSize: number;
45
+ fontWeight: FontWeightValue;
46
+ color: string;
47
+ marginBottom: number;
48
+ };
49
+ helperText: {
50
+ fontSize: number;
51
+ color: string;
52
+ marginTop: number;
53
+ };
54
+ errorText: {
55
+ fontSize: number;
56
+ color: string;
57
+ marginTop: number;
58
+ };
59
+ }
60
+ /**
61
+ * variant / size → 最終 style 値の解決(textfield.recipe styleRefs の 1:1 写像)。
62
+ * デフォルト(variant=default / size=medium)は component の prop デフォルトと一致させている。
63
+ */
64
+ export declare function resolveTextFieldStyle(theme: NativeTheme, mode: ThemeMode, { variant, size, }?: {
65
+ variant?: TextFieldVariant;
66
+ size?: TextFieldSize;
67
+ }): TextFieldResolvedStyle;
68
+ /**
69
+ * focus state の inputStyle 差分(recipe states.focus の写像。borderColor のみ —
70
+ * web の ring は RN 非対応、border 幅を変えるとレイアウトシフトするため色だけ)。
71
+ */
72
+ export declare function resolveTextFieldFocusStyle(theme: NativeTheme): {
73
+ borderColor: string;
74
+ };
75
+ //# sourceMappingURL=textfield.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textfield.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/textfield.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,eAAe,EACf,UAAU,EACX,MAAM,UAAU,CAAC;AAElB,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAC5E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,aAAa,EACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAKtD,CAAC;AAEF,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,kEAAkE;QAClE,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,eAAe,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACnE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,EACE,OAAmB,EACnB,IAAe,GAChB,GAAE;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAAC,IAAI,CAAC,EAAE,aAAa,CAAA;CAAO,GAC3D,sBAAsB,CAkDxB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAEtF"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * toast.styles — Toast の pure style resolver(styleRefs conformance 対応で Toast.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/toast.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/toast-conformance.test.ts が行う。
7
+ *
8
+ * - Alert と同系の bg subtle + text 色に elevation.sm を重ねる(浮いている通知、recipe description)。
9
+ * elevation は iOS shadow* + Android elevation の複合 token のため containerStyle と分けて返し、
10
+ * 呼び出し側が [containerStyle, elevation, style] の順で合成する(Surface と同じ扱い)。
11
+ * - dark mode は status.*.subtleDark / textDark 側を解決する。info variant のみ primary 固定
12
+ * (dark token が無い既知の割り切り、alert と同じ)。
13
+ */
14
+ import type { ElevationStyle, FontWeightValue, NativeTheme, ThemeMode } from "../theme";
15
+ export type ToastVariant = "success" | "error" | "warning" | "info";
16
+ /**
17
+ * 構成キー(token キー)。component は Text にこのキーをそのまま渡し、resolver は同じキーから
18
+ * style 値を解決する(component と resolver が別々のキーを持って drift する事故を防ぐ SSOT)。
19
+ */
20
+ export declare const TOAST_SPEC: {
21
+ readonly padding: "4";
22
+ readonly gap: "3";
23
+ readonly radius: "md";
24
+ readonly elevation: "sm";
25
+ readonly messageFont: "sm";
26
+ readonly messageWeight: "medium";
27
+ };
28
+ /**
29
+ * slot 構成(toast.recipe 各 variant の containerStyle / messageStyle と 1:1。
30
+ * containerStyle 内の elevation 参照だけは複合 token のため別 slot に分離して返す)。
31
+ */
32
+ export interface ToastStyles {
33
+ containerStyle: {
34
+ backgroundColor: string;
35
+ borderRadius: number;
36
+ padding: number;
37
+ flexDirection: "row";
38
+ alignItems: "center";
39
+ gap: number;
40
+ };
41
+ /** iOS shadow* + Android elevation の複合値。container へ spread する。 */
42
+ elevation: ElevationStyle;
43
+ /** compose する Text primitive(message)へ渡す値の解決結果 */
44
+ messageStyle: {
45
+ color: string;
46
+ fontSize: number;
47
+ fontWeight: FontWeightValue;
48
+ };
49
+ }
50
+ /**
51
+ * variant → bg / text 色の解決。
52
+ * - info: primary.50 / primary.800 固定(mode 非依存)。
53
+ * - success / error / warning: status token(error は status キー上は danger)。
54
+ * light は subtleLight / textLight、dark は subtleDark / textDark(recipe description の写像)。
55
+ */
56
+ export declare function resolveToastColors(theme: NativeTheme, mode: ThemeMode, variant: ToastVariant): {
57
+ bg: string;
58
+ text: string;
59
+ };
60
+ /** variant → 全 slot の style 解決(toast.recipe styleRefs の 1:1 写像)。 */
61
+ export declare function resolveToastStyles(theme: NativeTheme, mode: ThemeMode, variant: ToastVariant): ToastStyles;
62
+ //# sourceMappingURL=toast.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/toast.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAEV,cAAc,EAGd,eAAe,EACf,WAAW,EAGX,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;CActB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE;QACd,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,KAAK,CAAC;QACrB,UAAU,EAAE,QAAQ,CAAC;QACrB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,kEAAkE;IAClE,SAAS,EAAE,cAAc,CAAC;IAC1B,kDAAkD;IAClD,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,eAAe,CAAC;KAC7B,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,GACpB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQ9B;AAED,oEAAoE;AACpE,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,GACpB,WAAW,CAkBb"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * toggle.styles — Toggle の pure style resolver(styleRefs conformance 対応で Toggle.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/toggle.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/toggle-conformance.test.ts が行う。
7
+ *
8
+ * - variant = variantModeledStates(off/on)。component 側で value:boolean から暗黙決定する。
9
+ * - track の寸法・thumbOffset の literal は recipe の値を直書きし、conformance で照合する。
10
+ * thumb 位置は track に padding=thumbOffset を持たせ、component 側が justifyContent
11
+ * flex-start / flex-end で寄せる(recipe description の「on 時は右端へ」の RN 表現)。
12
+ * - disabled は state 差分(opacity)。TOGGLE_DISABLED_OPACITY を component が適用し、
13
+ * conformance が recipe states.disabled と照合する。
14
+ */
15
+ import type { NativeTheme, ThemeMode } from "../theme";
16
+ /** ON/OFF(toggle.contract の variantModeledStates と 1:1)。 */
17
+ export type ToggleVariant = "off" | "on";
18
+ export type ToggleSize = "medium" | "large";
19
+ /**
20
+ * size → track / thumb 寸法(toggle.recipe sizes と整合)。
21
+ * literal は recipe の値を直書きし、conformance で recipe と照合する。
22
+ */
23
+ export declare const TOGGLE_SIZE_SPEC: Record<ToggleSize, {
24
+ trackWidth: number;
25
+ trackHeight: number;
26
+ thumbSize: number;
27
+ thumbOffset: number;
28
+ }>;
29
+ /** disabled state の opacity(recipe states.disabled.style.opacity と照合)。 */
30
+ export declare const TOGGLE_DISABLED_OPACITY = 0.5;
31
+ /**
32
+ * variant / size → track + thumb の最終 style 値の解決(toggle.recipe styleRefs の 1:1 写像)。
33
+ * track.padding = thumbOffset(thumb を track 内で浮かせる余白)。
34
+ */
35
+ export declare function resolveToggleStyle(theme: NativeTheme, mode: ThemeMode, { variant, size }: {
36
+ variant: ToggleVariant;
37
+ size?: ToggleSize;
38
+ }): {
39
+ track: {
40
+ width: number;
41
+ height: number;
42
+ backgroundColor: string;
43
+ borderRadius: number;
44
+ padding: number;
45
+ };
46
+ thumb: {
47
+ width: number;
48
+ height: number;
49
+ backgroundColor: string;
50
+ borderRadius: number;
51
+ };
52
+ };
53
+ //# sourceMappingURL=toggle.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/toggle.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,UAAU,EACV;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAIpF,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,EAAE,OAAO,EAAE,IAAe,EAAE,EAAE;IAAE,OAAO,EAAE,aAAa,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,CAAA;CAAE,GAC1E;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACzF,CAmBA"}