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.
- package/LICENSE +21 -0
- package/README.md +197 -0
- package/THIRD_PARTY_LICENSES.md +198 -0
- package/lib/module/components/ActionSheet.js +87 -0
- package/lib/module/components/ActionSheet.js.map +1 -0
- package/lib/module/components/Alert.js +93 -0
- package/lib/module/components/Alert.js.map +1 -0
- package/lib/module/components/Avatar.js +93 -0
- package/lib/module/components/Avatar.js.map +1 -0
- package/lib/module/components/BottomSheet.js +69 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/Card.js +93 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/Checkbox.js +115 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/EmptyState.js +70 -0
- package/lib/module/components/EmptyState.js.map +1 -0
- package/lib/module/components/Header.js +53 -0
- package/lib/module/components/Header.js.map +1 -0
- package/lib/module/components/Image.js +67 -0
- package/lib/module/components/Image.js.map +1 -0
- package/lib/module/components/Modal.js +95 -0
- package/lib/module/components/Modal.js.map +1 -0
- package/lib/module/components/Progress.js +113 -0
- package/lib/module/components/Progress.js.map +1 -0
- package/lib/module/components/Radio.js +134 -0
- package/lib/module/components/Radio.js.map +1 -0
- package/lib/module/components/Screen.js +57 -0
- package/lib/module/components/Screen.js.map +1 -0
- package/lib/module/components/Skeleton.js +169 -0
- package/lib/module/components/Skeleton.js.map +1 -0
- package/lib/module/components/Surface.js +49 -0
- package/lib/module/components/Surface.js.map +1 -0
- package/lib/module/components/TextField.js +84 -0
- package/lib/module/components/TextField.js.map +1 -0
- package/lib/module/components/Toast.js +105 -0
- package/lib/module/components/Toast.js.map +1 -0
- package/lib/module/components/Toggle.js +77 -0
- package/lib/module/components/Toggle.js.map +1 -0
- package/lib/module/components/action-sheet.styles.js +70 -0
- package/lib/module/components/action-sheet.styles.js.map +1 -0
- package/lib/module/components/alert.styles.js +80 -0
- package/lib/module/components/alert.styles.js.map +1 -0
- package/lib/module/components/avatar.styles.js +94 -0
- package/lib/module/components/avatar.styles.js.map +1 -0
- package/lib/module/components/bottom-sheet.styles.js +55 -0
- package/lib/module/components/bottom-sheet.styles.js.map +1 -0
- package/lib/module/components/card.styles.js +50 -0
- package/lib/module/components/card.styles.js.map +1 -0
- package/lib/module/components/checkbox.styles.js +55 -0
- package/lib/module/components/checkbox.styles.js.map +1 -0
- package/lib/module/components/empty-state.styles.js +60 -0
- package/lib/module/components/empty-state.styles.js.map +1 -0
- package/lib/module/components/header.styles.js +33 -0
- package/lib/module/components/header.styles.js.map +1 -0
- package/lib/module/components/image.styles.js +37 -0
- package/lib/module/components/image.styles.js.map +1 -0
- package/lib/module/components/index.js +26 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/modal.styles.js +68 -0
- package/lib/module/components/modal.styles.js.map +1 -0
- package/lib/module/components/progress.styles.js +55 -0
- package/lib/module/components/progress.styles.js.map +1 -0
- package/lib/module/components/radio.styles.js +96 -0
- package/lib/module/components/radio.styles.js.map +1 -0
- package/lib/module/components/screen.styles.js +38 -0
- package/lib/module/components/screen.styles.js.map +1 -0
- package/lib/module/components/skeleton.styles.js +114 -0
- package/lib/module/components/skeleton.styles.js.map +1 -0
- package/lib/module/components/surface.styles.js +37 -0
- package/lib/module/components/surface.styles.js.map +1 -0
- package/lib/module/components/textfield.styles.js +121 -0
- package/lib/module/components/textfield.styles.js.map +1 -0
- package/lib/module/components/toast.styles.js +81 -0
- package/lib/module/components/toast.styles.js.map +1 -0
- package/lib/module/components/toggle.styles.js +69 -0
- package/lib/module/components/toggle.styles.js.map +1 -0
- package/lib/module/contracts/contract-types.js +192 -0
- package/lib/module/contracts/contract-types.js.map +1 -0
- package/lib/module/icons/Icon.js +57 -0
- package/lib/module/icons/Icon.js.map +1 -0
- package/lib/module/icons/glyphs.js +257 -0
- package/lib/module/icons/glyphs.js.map +1 -0
- package/lib/module/icons/icon.styles.js +28 -0
- package/lib/module/icons/icon.styles.js.map +1 -0
- package/lib/module/icons/index.js +14 -0
- package/lib/module/icons/index.js.map +1 -0
- package/lib/module/index.js +20 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/primitives/Button.js +105 -0
- package/lib/module/primitives/Button.js.map +1 -0
- package/lib/module/primitives/Metric.js +68 -0
- package/lib/module/primitives/Metric.js.map +1 -0
- package/lib/module/primitives/Row.js +43 -0
- package/lib/module/primitives/Row.js.map +1 -0
- package/lib/module/primitives/Stack.js +39 -0
- package/lib/module/primitives/Stack.js.map +1 -0
- package/lib/module/primitives/Tag.js +160 -0
- package/lib/module/primitives/Tag.js.map +1 -0
- package/lib/module/primitives/Text.js +54 -0
- package/lib/module/primitives/Text.js.map +1 -0
- package/lib/module/primitives/_internal/focus-ring.js +57 -0
- package/lib/module/primitives/_internal/focus-ring.js.map +1 -0
- package/lib/module/primitives/button.styles.js +88 -0
- package/lib/module/primitives/button.styles.js.map +1 -0
- package/lib/module/primitives/index.js +11 -0
- package/lib/module/primitives/index.js.map +1 -0
- package/lib/module/primitives/metric.styles.js +54 -0
- package/lib/module/primitives/metric.styles.js.map +1 -0
- package/lib/module/primitives/row.styles.js +53 -0
- package/lib/module/primitives/row.styles.js.map +1 -0
- package/lib/module/primitives/stack.styles.js +37 -0
- package/lib/module/primitives/stack.styles.js.map +1 -0
- package/lib/module/primitives/tag.styles.js +56 -0
- package/lib/module/primitives/tag.styles.js.map +1 -0
- package/lib/module/primitives/text.styles.js +33 -0
- package/lib/module/primitives/text.styles.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +41 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- package/lib/module/theme/index.js +19 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/native-theme.js +201 -0
- package/lib/module/theme/native-theme.js.map +1 -0
- package/lib/module/theme/types.js +4 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/ActionSheet.d.ts +45 -0
- package/lib/typescript/src/components/ActionSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert.d.ts +43 -0
- package/lib/typescript/src/components/Alert.d.ts.map +1 -0
- package/lib/typescript/src/components/Avatar.d.ts +45 -0
- package/lib/typescript/src/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet.d.ts +36 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/Card.d.ts +46 -0
- package/lib/typescript/src/components/Card.d.ts.map +1 -0
- package/lib/typescript/src/components/Checkbox.d.ts +40 -0
- package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/EmptyState.d.ts +36 -0
- package/lib/typescript/src/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/src/components/Header.d.ts +34 -0
- package/lib/typescript/src/components/Header.d.ts.map +1 -0
- package/lib/typescript/src/components/Image.d.ts +41 -0
- package/lib/typescript/src/components/Image.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal.d.ts +46 -0
- package/lib/typescript/src/components/Modal.d.ts.map +1 -0
- package/lib/typescript/src/components/Progress.d.ts +39 -0
- package/lib/typescript/src/components/Progress.d.ts.map +1 -0
- package/lib/typescript/src/components/Radio.d.ts +52 -0
- package/lib/typescript/src/components/Radio.d.ts.map +1 -0
- package/lib/typescript/src/components/Screen.d.ts +42 -0
- package/lib/typescript/src/components/Screen.d.ts.map +1 -0
- package/lib/typescript/src/components/Skeleton.d.ts +37 -0
- package/lib/typescript/src/components/Skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/Surface.d.ts +31 -0
- package/lib/typescript/src/components/Surface.d.ts.map +1 -0
- package/lib/typescript/src/components/TextField.d.ts +45 -0
- package/lib/typescript/src/components/TextField.d.ts.map +1 -0
- package/lib/typescript/src/components/Toast.d.ts +45 -0
- package/lib/typescript/src/components/Toast.d.ts.map +1 -0
- package/lib/typescript/src/components/Toggle.d.ts +39 -0
- package/lib/typescript/src/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/src/components/action-sheet.styles.d.ts +65 -0
- package/lib/typescript/src/components/action-sheet.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/alert.styles.d.ts +61 -0
- package/lib/typescript/src/components/alert.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar.styles.d.ts +60 -0
- package/lib/typescript/src/components/avatar.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/bottom-sheet.styles.d.ts +50 -0
- package/lib/typescript/src/components/bottom-sheet.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/card.styles.d.ts +27 -0
- package/lib/typescript/src/components/card.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox.styles.d.ts +55 -0
- package/lib/typescript/src/components/checkbox.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state.styles.d.ts +58 -0
- package/lib/typescript/src/components/empty-state.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/header.styles.d.ts +30 -0
- package/lib/typescript/src/components/header.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/image.styles.d.ts +28 -0
- package/lib/typescript/src/components/image.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +23 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/modal.styles.d.ts +66 -0
- package/lib/typescript/src/components/modal.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/progress.styles.d.ts +44 -0
- package/lib/typescript/src/components/progress.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/radio.styles.d.ts +91 -0
- package/lib/typescript/src/components/radio.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/screen.styles.d.ts +34 -0
- package/lib/typescript/src/components/screen.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton.styles.d.ts +105 -0
- package/lib/typescript/src/components/skeleton.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/surface.styles.d.ts +31 -0
- package/lib/typescript/src/components/surface.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/textfield.styles.d.ts +75 -0
- package/lib/typescript/src/components/textfield.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/toast.styles.d.ts +62 -0
- package/lib/typescript/src/components/toast.styles.d.ts.map +1 -0
- package/lib/typescript/src/components/toggle.styles.d.ts +53 -0
- package/lib/typescript/src/components/toggle.styles.d.ts.map +1 -0
- package/lib/typescript/src/contracts/contract-types.d.ts +193 -0
- package/lib/typescript/src/contracts/contract-types.d.ts.map +1 -0
- package/lib/typescript/src/icons/Icon.d.ts +40 -0
- package/lib/typescript/src/icons/Icon.d.ts.map +1 -0
- package/lib/typescript/src/icons/glyphs.d.ts +259 -0
- package/lib/typescript/src/icons/glyphs.d.ts.map +1 -0
- package/lib/typescript/src/icons/icon.styles.d.ts +20 -0
- package/lib/typescript/src/icons/icon.styles.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +12 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Button.d.ts +48 -0
- package/lib/typescript/src/primitives/Button.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Metric.d.ts +38 -0
- package/lib/typescript/src/primitives/Metric.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Row.d.ts +37 -0
- package/lib/typescript/src/primitives/Row.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Stack.d.ts +33 -0
- package/lib/typescript/src/primitives/Stack.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Tag.d.ts +43 -0
- package/lib/typescript/src/primitives/Tag.d.ts.map +1 -0
- package/lib/typescript/src/primitives/Text.d.ts +45 -0
- package/lib/typescript/src/primitives/Text.d.ts.map +1 -0
- package/lib/typescript/src/primitives/_internal/focus-ring.d.ts +31 -0
- package/lib/typescript/src/primitives/_internal/focus-ring.d.ts.map +1 -0
- package/lib/typescript/src/primitives/button.styles.d.ts +29 -0
- package/lib/typescript/src/primitives/button.styles.d.ts.map +1 -0
- package/lib/typescript/src/primitives/index.d.ts +8 -0
- package/lib/typescript/src/primitives/index.d.ts.map +1 -0
- package/lib/typescript/src/primitives/metric.styles.d.ts +43 -0
- package/lib/typescript/src/primitives/metric.styles.d.ts.map +1 -0
- package/lib/typescript/src/primitives/row.styles.d.ts +50 -0
- package/lib/typescript/src/primitives/row.styles.d.ts.map +1 -0
- package/lib/typescript/src/primitives/stack.styles.d.ts +34 -0
- package/lib/typescript/src/primitives/stack.styles.d.ts.map +1 -0
- package/lib/typescript/src/primitives/tag.styles.d.ts +32 -0
- package/lib/typescript/src/primitives/tag.styles.d.ts.map +1 -0
- package/lib/typescript/src/primitives/text.styles.d.ts +26 -0
- package/lib/typescript/src/primitives/text.styles.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts +32 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +15 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/native-theme.d.ts +3 -0
- package/lib/typescript/src/theme/native-theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/types.d.ts +121 -0
- package/lib/typescript/src/theme/types.d.ts.map +1 -0
- package/package.json +120 -0
- package/src/components/ActionSheet.tsx +112 -0
- package/src/components/Alert.tsx +84 -0
- package/src/components/Avatar.tsx +110 -0
- package/src/components/BottomSheet.tsx +81 -0
- package/src/components/Card.tsx +102 -0
- package/src/components/Checkbox.tsx +107 -0
- package/src/components/EmptyState.tsx +64 -0
- package/src/components/Header.tsx +51 -0
- package/src/components/Image.tsx +89 -0
- package/src/components/Modal.tsx +113 -0
- package/src/components/Progress.tsx +124 -0
- package/src/components/Radio.tsx +151 -0
- package/src/components/Screen.tsx +62 -0
- package/src/components/Skeleton.tsx +154 -0
- package/src/components/Surface.tsx +37 -0
- package/src/components/TextField.tsx +102 -0
- package/src/components/Toast.tsx +103 -0
- package/src/components/Toggle.tsx +94 -0
- package/src/components/action-sheet.styles.ts +102 -0
- package/src/components/alert.styles.ts +115 -0
- package/src/components/avatar.styles.ts +110 -0
- package/src/components/bottom-sheet.styles.ts +78 -0
- package/src/components/card.styles.ts +56 -0
- package/src/components/checkbox.styles.ts +83 -0
- package/src/components/empty-state.styles.ts +98 -0
- package/src/components/header.styles.ts +44 -0
- package/src/components/image.styles.ts +36 -0
- package/src/components/index.ts +23 -0
- package/src/components/modal.styles.ts +106 -0
- package/src/components/progress.styles.ts +74 -0
- package/src/components/radio.styles.ts +132 -0
- package/src/components/screen.styles.ts +44 -0
- package/src/components/skeleton.styles.ts +155 -0
- package/src/components/surface.styles.ts +50 -0
- package/src/components/textfield.styles.ts +135 -0
- package/src/components/toast.styles.ts +115 -0
- package/src/components/toggle.styles.ts +73 -0
- package/src/contracts/contract-types.ts +199 -0
- package/src/icons/Icon.tsx +65 -0
- package/src/icons/glyphs.ts +54 -0
- package/src/icons/icon.styles.ts +37 -0
- package/src/icons/index.ts +12 -0
- package/src/index.ts +24 -0
- package/src/primitives/Button.tsx +114 -0
- package/src/primitives/Metric.tsx +67 -0
- package/src/primitives/Row.tsx +54 -0
- package/src/primitives/Stack.tsx +42 -0
- package/src/primitives/Tag.tsx +126 -0
- package/src/primitives/Text.tsx +71 -0
- package/src/primitives/_internal/focus-ring.tsx +59 -0
- package/src/primitives/button.styles.ts +69 -0
- package/src/primitives/index.ts +8 -0
- package/src/primitives/metric.styles.ts +75 -0
- package/src/primitives/row.styles.ts +66 -0
- package/src/primitives/stack.styles.ts +47 -0
- package/src/primitives/tag.styles.ts +65 -0
- package/src/primitives/text.styles.ts +42 -0
- package/src/theme/ThemeProvider.tsx +60 -0
- package/src/theme/index.ts +18 -0
- package/src/theme/native-theme.ts +215 -0
- package/src/theme/types.ts +137 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmptyState — データ無し時のプレースホルダー(設計書 §1)。contract: empty-state。
|
|
3
|
+
* Text + Button の compose(§1)。icon + title + description + 任意の action。
|
|
4
|
+
*
|
|
5
|
+
* - title は見出しとして読み上げ(Text role="heading")。
|
|
6
|
+
* - action は Button(contained) を内部 compose。
|
|
7
|
+
* - 中央寄せレイアウト。色は token(title=text-heading, description=text-muted)。
|
|
8
|
+
* - 色・寸法の決定は pure resolver(empty-state.styles.ts)に分離。Text へ渡すキーも
|
|
9
|
+
* EMPTY_STATE_SPEC(同ファイル)を SSOT として共有し、
|
|
10
|
+
* recipes/app/empty-state.recipe.json との機械照合は scripts/lib/empty-state-conformance.test.ts が行う。
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
14
|
+
interface EmptyStateProps {
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
action?: {
|
|
19
|
+
label: string;
|
|
20
|
+
onPress: () => void;
|
|
21
|
+
};
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
testID?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function EmptyState({ icon, title, description, action, style, testID }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare namespace EmptyState {
|
|
27
|
+
var __contract: {
|
|
28
|
+
readonly id: "empty-state";
|
|
29
|
+
readonly version: "0.1.0";
|
|
30
|
+
readonly variants: readonly ["default"];
|
|
31
|
+
readonly sizes: readonly [];
|
|
32
|
+
readonly states: readonly ["default"];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,2CA+B9F;yBA/Be,UAAU"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header — 画面ヘッダー primitive(title + leading? / trailing? slot + 下 border)。
|
|
3
|
+
* contract: header(app 先行定義、melta-contracts)。dogfood 不足-3 の解消。
|
|
4
|
+
* Screen の header slot に差して使う想定(単体でも使える)。
|
|
5
|
+
*
|
|
6
|
+
* - title は melta の Text(xl / bold / text-heading / heading role)で描画し、
|
|
7
|
+
* heading として読み上げられる(contract a11y required)。
|
|
8
|
+
* - titleWrapStyle の flex:1 で title が余白を占有し trailing を右端へ押す。
|
|
9
|
+
* - 決定ロジックは pure resolver(header.styles.ts)に分離 — recipe との機械照合対象。
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from "react";
|
|
12
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
13
|
+
interface HeaderProps {
|
|
14
|
+
/** 画面タイトル(heading として読み上げ)。 */
|
|
15
|
+
title: string;
|
|
16
|
+
/** title の左の slot(戻るボタン等)。 */
|
|
17
|
+
leading?: ReactNode;
|
|
18
|
+
/** 右端の slot(アクション等)。 */
|
|
19
|
+
trailing?: ReactNode;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
testID?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function Header({ title, leading, trailing, style, testID }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace Header {
|
|
25
|
+
var __contract: {
|
|
26
|
+
readonly id: "header";
|
|
27
|
+
readonly version: "0.1.0";
|
|
28
|
+
readonly variants: readonly ["default"];
|
|
29
|
+
readonly sizes: readonly [];
|
|
30
|
+
readonly states: readonly ["default"];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/Header.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,UAAU,WAAW;IACnB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,2CAmB9E;yBAnBe,MAAM"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image — 画像表示 component(設計書 §1)。contract: image(app 先行定義)。
|
|
3
|
+
*
|
|
4
|
+
* - Phase 1 は RN コア Image。expo-image は Phase 2(blurhash / 高度 cache 要件化時)。
|
|
5
|
+
* 差し替えコスト最小化のためここで包む(呼び出し側は melta-app の Image だけ見る)。
|
|
6
|
+
* - contentFit("cover"|"contain") → RN の resizeMode に変換。
|
|
7
|
+
* - onError 時に fallback(ReactNode)を表示。fallback 未指定なら何も出さない。
|
|
8
|
+
* - radius は token キーのみ(生数値不可、§5)。shape の解決は pure resolver
|
|
9
|
+
* (image.styles.ts)に分離。recipes/app/image.recipe.json との機械照合は
|
|
10
|
+
* scripts/lib/image-conformance.test.ts が行う。
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
|
+
import { type ImageStyle, type StyleProp } from "react-native";
|
|
14
|
+
import type { RadiusKey } from "../theme";
|
|
15
|
+
type ContentFit = "cover" | "contain";
|
|
16
|
+
interface ImageProps {
|
|
17
|
+
source: {
|
|
18
|
+
uri: string;
|
|
19
|
+
} | number;
|
|
20
|
+
/** 縦横比(width:height)。指定すると width 基準で高さが決まる。 */
|
|
21
|
+
aspectRatio?: number;
|
|
22
|
+
radius?: RadiusKey;
|
|
23
|
+
contentFit?: ContentFit;
|
|
24
|
+
/** 読み込み失敗時に表示する代替(onError)。 */
|
|
25
|
+
fallback?: ReactNode;
|
|
26
|
+
accessibilityLabel?: string;
|
|
27
|
+
style?: StyleProp<ImageStyle>;
|
|
28
|
+
testID?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function Image({ source, aspectRatio, radius, contentFit, fallback, accessibilityLabel, style, testID, }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace Image {
|
|
32
|
+
var __contract: {
|
|
33
|
+
readonly id: "image";
|
|
34
|
+
readonly version: "0.1.0";
|
|
35
|
+
readonly variants: readonly ["default"];
|
|
36
|
+
readonly sizes: readonly [];
|
|
37
|
+
readonly states: readonly ["default", "error"];
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/Image.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,KAAK,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtC,UAAU,UAAU;IAClB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,WAAW,EACX,MAAM,EACN,UAAoB,EACpB,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,MAAM,GACP,EAAE,UAAU,2CAmCZ;yBA5Ce,KAAK"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal — フォーカストラップとバックドロップを備えたモーダルダイアログ。
|
|
3
|
+
* contract: modal(feedback)。RN core Modal(transparent + fade)に overlay + panel を載せる。
|
|
4
|
+
*
|
|
5
|
+
* - variant(confirmation/form/alert)は意味分類で style は共通(contract / recipe と同じ)。
|
|
6
|
+
* - size は panel の maxWidth(タブレット以上で効く。モバイルは width 100% - overlay padding が先)。
|
|
7
|
+
* - 契約の対応物: focus trap → accessibilityViewIsModal(iOS のフォーカス閉じ込め)、
|
|
8
|
+
* Escape → Android back(onRequestClose)、open/closing state → RN Modal の visible + animationType。
|
|
9
|
+
* - overlay tap で閉じる(MODAL_OVERLAY_REQUIRED)。panel 側は onStartShouldSetResponder で
|
|
10
|
+
* touch を claim し、overlay への伝播を止める(panel 内 tap では閉じない)。
|
|
11
|
+
* - title 行の右端に閉じるボタン「×」(MODAL_CLOSE_REQUIRED、accessibilityLabel="閉じる")。
|
|
12
|
+
* title は melta の Text ではなく titleStyle 直(recipe が typography を持つ)。
|
|
13
|
+
* - style の決定は pure resolver(modal.styles.ts)に分離 — recipe との機械照合対象。
|
|
14
|
+
* title 行の row layout と × の見た目は recipe 外の構造 glue(token 経由で解決)。
|
|
15
|
+
*/
|
|
16
|
+
import { type ReactNode } from "react";
|
|
17
|
+
import { type ModalSize, type ModalVariant } from "./modal.styles";
|
|
18
|
+
interface ModalProps {
|
|
19
|
+
/** 表示制御(契約の open state に対応。閉じるアニメは RN Modal に委譲)。 */
|
|
20
|
+
visible: boolean;
|
|
21
|
+
/** 閉じ要求(overlay tap / × / Android back の全経路で呼ばれる)。 */
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
/** タイトル(契約 aria-labelledby 相当、必須)。 */
|
|
24
|
+
title: string;
|
|
25
|
+
/** 意味分類(style は 3 つとも同一)。default "confirmation"。 */
|
|
26
|
+
variant?: ModalVariant;
|
|
27
|
+
/** panel の maxWidth 段階。default "medium"。 */
|
|
28
|
+
size?: ModalSize;
|
|
29
|
+
/** アクション群(任意)。footerStyle の row に載る。 */
|
|
30
|
+
footer?: ReactNode;
|
|
31
|
+
testID?: string;
|
|
32
|
+
/** body。 */
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export declare function Modal({ visible, onClose, title, variant, size, footer, testID, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare namespace Modal {
|
|
37
|
+
var __contract: {
|
|
38
|
+
readonly id: "modal";
|
|
39
|
+
readonly version: "2.0.0";
|
|
40
|
+
readonly variants: readonly ["confirmation", "form", "alert"];
|
|
41
|
+
readonly sizes: readonly ["small", "medium", "large"];
|
|
42
|
+
readonly states: readonly ["default", "open", "closing"];
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAShD,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAExB,UAAU,UAAU;IAClB,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY;IACZ,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAwB,EACxB,IAAe,EACf,MAAM,EACN,MAAM,EACN,QAAQ,GACT,EAAE,UAAU,2CAmDZ;yBA5De,KAAK"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress — リニアプログレスバー(feedback)。contract: progress。
|
|
3
|
+
* track の中を fill が value%(determinate)または往復アニメ(indeterminate variant)で埋める。
|
|
4
|
+
*
|
|
5
|
+
* - variant: primary / success(determinate、value 0〜100 を clamp)/ indeterminate(幅 40% の fill を
|
|
6
|
+
* Animated.loop の translateX 往復で流す。duration は theme.motion.duration.slow 基準)。
|
|
7
|
+
* - MOTION_REDUCED_MOTION_REQUIRED(contract rule): AccessibilityInfo.isReduceMotionEnabled() を
|
|
8
|
+
* 初期読取り + reduceMotionChanged 購読で追従し、reduce motion 時は indeterminate のアニメを
|
|
9
|
+
* 止めて静止 40% にする。translateX は 0 初期化なので同期起動でも一瞬動く事故は無い
|
|
10
|
+
* (Skeleton の順序ハザード対策と同趣旨)。
|
|
11
|
+
* - a11y: accessibilityRole="progressbar" + accessibilityValue {min:0, max:100, now}
|
|
12
|
+
* (indeterminate は now を渡さない)+ accessibilityLabel=label(契約 required)。
|
|
13
|
+
* - 色・寸法の決定は pure resolver(progress.styles.ts)に分離。track の semantic 色は dark 側解決。
|
|
14
|
+
* recipes/app/progress.recipe.json との機械照合は scripts/lib/progress-conformance.test.ts が行う。
|
|
15
|
+
*/
|
|
16
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
17
|
+
import { type ProgressVariant } from "./progress.styles";
|
|
18
|
+
interface ProgressProps {
|
|
19
|
+
/** 進捗タイプ(contract variant)。default "primary"。 */
|
|
20
|
+
variant?: ProgressVariant;
|
|
21
|
+
/** 進捗値 0〜100(determinate 用。範囲外は clamp)。 */
|
|
22
|
+
value?: number;
|
|
23
|
+
/** 読み上げラベル(accessibilityLabel。契約 required)。 */
|
|
24
|
+
label: string;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
testID?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function Progress({ variant, value, label, style, testID }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace Progress {
|
|
30
|
+
var __contract: {
|
|
31
|
+
readonly id: "progress";
|
|
32
|
+
readonly version: "2.0.0";
|
|
33
|
+
readonly variants: readonly ["primary", "success", "indeterminate"];
|
|
34
|
+
readonly sizes: readonly [];
|
|
35
|
+
readonly states: readonly ["default", "determinate", "indeterminate", "complete"];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../src/components/Progress.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,UAAU,aAAa;IACrB,iDAAiD;IACjD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,EAAE,OAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,aAAa,2CA2E3F;yBA3Ee,QAAQ"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radio — 単一選択フォームコントロール。contract: radio。
|
|
3
|
+
*
|
|
4
|
+
* - 契約どおり fieldset 相当の RadioGroup として実装する(コンポーネント名は Radio、
|
|
5
|
+
* recipe description 参照)。groupLabel(= legend 相当の label prop)必須
|
|
6
|
+
* (FORM_FIELDSET_LEGEND_REQUIRED を props 型で強制)。
|
|
7
|
+
* - variant はレイアウト: vertical(標準)/ horizontal(wrap する横並び)/ card-style
|
|
8
|
+
* (各 option を枠付きカードにする。web の grid 2col は RN では縦積みに読み替え)。
|
|
9
|
+
* - RN にネイティブ radio が無いため各 option は Pressable + 描画(circle + 内側 dot)。
|
|
10
|
+
* - states(contract → prop の写像): selected/unselected → value との一致、
|
|
11
|
+
* error → error?: string(circle の borderColor 差分 + errorText 表示。selected と併用時は
|
|
12
|
+
* error を優先 = 契約 stateSpecs)、disabled → グループ全体 or option 個別(opacity 0.5 + 非活性)。
|
|
13
|
+
* focus は Phase1 非対応(recipe にも focus 差分なし)。
|
|
14
|
+
* - a11y: グループに accessibilityRole="radiogroup"、各 option に "radio" +
|
|
15
|
+
* accessibilityState={{ checked, disabled }}。
|
|
16
|
+
* - 色・寸法の決定は pure resolver(radio.styles.ts)に分離。
|
|
17
|
+
* recipes/app/radio.recipe.json との機械照合は scripts/lib/radio-conformance.test.ts が行う。
|
|
18
|
+
*/
|
|
19
|
+
import { type RadioVariant } from "./radio.styles";
|
|
20
|
+
export interface RadioOption {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
/** label の下に出す補足(text-muted の小テキスト。card-style で使う想定)。 */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** この option だけ操作不可にする。 */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface RadioProps {
|
|
29
|
+
/** グループラベル(fieldset の legend 相当。必須 = FORM_FIELDSET_LEGEND_REQUIRED)。 */
|
|
30
|
+
label: string;
|
|
31
|
+
options: RadioOption[];
|
|
32
|
+
/** 選択中の option の value(未選択は undefined)。 */
|
|
33
|
+
value: string | undefined;
|
|
34
|
+
onChange: (value: string) => void;
|
|
35
|
+
variant?: RadioVariant;
|
|
36
|
+
/** エラーメッセージ。指定時は circle が danger 枠になりメッセージを表示する。 */
|
|
37
|
+
error?: string;
|
|
38
|
+
/** グループ全体を操作不可にする。 */
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
testID?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function Radio({ label, options, value, onChange, variant, error, disabled, testID, }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare namespace Radio {
|
|
44
|
+
var __contract: {
|
|
45
|
+
readonly id: "radio";
|
|
46
|
+
readonly version: "2.0.0";
|
|
47
|
+
readonly variants: readonly ["vertical", "horizontal", "card-style"];
|
|
48
|
+
readonly sizes: readonly [];
|
|
49
|
+
readonly states: readonly ["default", "selected", "unselected", "disabled", "error", "focus"];
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAOH,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAoB,EACpB,KAAK,EACL,QAAgB,EAChB,MAAM,GACP,EAAE,UAAU,2CAmFZ;yBA5Fe,KAAK"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen — 画面骨格 primitive(SafeArea + bg-page + content padding)。
|
|
3
|
+
* contract: screen(app 先行定義、melta-contracts)。dogfood 不足-3(SafeAreaView + ScrollView +
|
|
4
|
+
* ヘッダーの毎画面手書き)の解消。
|
|
5
|
+
*
|
|
6
|
+
* - variant="scroll"(default)は content を ScrollView に、"fixed" は flex:1 の View に載せる。
|
|
7
|
+
* - header slot は scroll の外(SafeArea 直下)に固定する。
|
|
8
|
+
* - padding は spacing token キー限定 | "none"(default "4")。
|
|
9
|
+
* - 決定ロジックは pure resolver(screen.styles.ts)に分離 — recipe との機械照合対象。
|
|
10
|
+
*
|
|
11
|
+
* ⚠️ SafeArea は RN core の SafeAreaView(deprecated / iOS のみの最小対応)を意図的に使う。
|
|
12
|
+
* 依存ゼロ方針(P1)を安全域の精度より優先した判断。Android の edge-to-edge や notch 精度が
|
|
13
|
+
* 必要になったら react-native-safe-area-context への adapter 化を再検討する(optional peer の
|
|
14
|
+
* 前例は Icon × react-native-svg)。
|
|
15
|
+
*/
|
|
16
|
+
import { type ReactNode } from "react";
|
|
17
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
18
|
+
import { type VariantOf } from "../contracts/contract-types";
|
|
19
|
+
import { type ScreenPadding } from "./screen.styles";
|
|
20
|
+
interface ScreenProps {
|
|
21
|
+
/** 画面の骨格(contract variant)。default "scroll"。 */
|
|
22
|
+
variant?: VariantOf<"screen">;
|
|
23
|
+
/** content の padding(spacing token キー限定 | "none")。default "4"。 */
|
|
24
|
+
padding?: ScreenPadding;
|
|
25
|
+
/** scroll 外(SafeArea 直下)に固定されるヘッダー slot(Header を差す想定)。 */
|
|
26
|
+
header?: ReactNode;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
testID?: string;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare function Screen({ variant, padding, header, style, testID, children, }: ScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare namespace Screen {
|
|
33
|
+
var __contract: {
|
|
34
|
+
readonly id: "screen";
|
|
35
|
+
readonly version: "0.1.0";
|
|
36
|
+
readonly variants: readonly ["fixed", "scroll"];
|
|
37
|
+
readonly sizes: readonly [];
|
|
38
|
+
readonly states: readonly ["default"];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=Screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../../src/components/Screen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAkC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAsB,KAAK,aAAa,EAAoB,MAAM,iBAAiB,CAAC;AAE3F,UAAU,WAAW;IACnB,gDAAgD;IAChD,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B,kEAAkE;IAClE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAkB,EAClB,OAAa,EACb,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,WAAW,2CAkBb;yBAzBe,MAAM"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton — ローディングプレースホルダー(設計書 §1)。contract: skeleton。
|
|
3
|
+
*
|
|
4
|
+
* - variant: text(行バー)/ circle(アバター)/ card(Surface 土台 + 中にバー)。
|
|
5
|
+
* - a11y: accessibilityState={{busy:true}} + accessibilityLabel(default "読み込み中")。
|
|
6
|
+
* - 色・寸法の決定は pure resolver(skeleton.styles.ts)に分離。card の Surface props も
|
|
7
|
+
* CARD_SURFACE_SPEC(同ファイル)を SSOT として共有し、
|
|
8
|
+
* recipes/app/skeleton.recipe.json との機械照合は scripts/lib/skeleton-conformance.test.ts が行う。
|
|
9
|
+
* - bg: text/circle は border-default。card は Surface 土台(bg-surface+border+elevation.sm)
|
|
10
|
+
* の上に border-default のバーを置く(contract に忠実、§1 Agent m2)。
|
|
11
|
+
* - pulse の reduce-motion 順序ハザード(§1): Animated.Value を opacityFrom(= 非アニメ状態)で
|
|
12
|
+
* 初期化し、effect 内で AccessibilityInfo.isReduceMotionEnabled() を await した後にのみ loop 開始する。
|
|
13
|
+
* 同期的に loop を start すると reduce-motion ON でも一瞬光るため。ON 時は pulse 完全停止 + busy 維持。
|
|
14
|
+
*/
|
|
15
|
+
import { type DimensionValue, type StyleProp, type ViewStyle } from "react-native";
|
|
16
|
+
import { type SkeletonVariant } from "./skeleton.styles";
|
|
17
|
+
interface SkeletonProps {
|
|
18
|
+
variant?: SkeletonVariant;
|
|
19
|
+
width?: DimensionValue;
|
|
20
|
+
/** text variant の行数。 */
|
|
21
|
+
lines?: number;
|
|
22
|
+
accessibilityLabel?: string;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
testID?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function Skeleton({ variant, width, lines, accessibilityLabel, style, testID, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare namespace Skeleton {
|
|
28
|
+
var __contract: {
|
|
29
|
+
readonly id: "skeleton";
|
|
30
|
+
readonly version: "2.0.0";
|
|
31
|
+
readonly variants: readonly ["text", "card", "circle"];
|
|
32
|
+
readonly sizes: readonly [];
|
|
33
|
+
readonly states: readonly ["default", "loading", "loaded"];
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,EACvB,OAAgB,EAChB,KAAc,EACd,KAAS,EACT,kBAA4B,EAC5B,KAAK,EACL,MAAM,GACP,EAAE,aAAa,2CAiGf;yBAxGe,QAAQ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surface — Card / Skeleton / EmptyState の共通土台となる「箱」(設計書 §1)。
|
|
3
|
+
* contract: surface(app 先行定義)。
|
|
4
|
+
*
|
|
5
|
+
* - 公開 P1 で正式 export に昇格(契約 surface.contract.json + recipe を持つ implemented のため)。
|
|
6
|
+
* セマンティクスを持つ箱が必要なら Card を優先し、Surface は素の土台が要る時だけ使う。
|
|
7
|
+
* - elevation[key] は iOS shadow* + Android elevation を 1 ViewStyle に同居させた値なので
|
|
8
|
+
* そのまま spread すれば両 OS に効く(types.ts ElevationStyle)。
|
|
9
|
+
* - 色・寸法の決定は pure resolver(surface.styles.ts)に分離。デフォルト値
|
|
10
|
+
* (bg=bg-surface / radius=lg / elevation=none)も resolver 側が持ち、
|
|
11
|
+
* recipes/app/surface.recipe.json との機械照合は scripts/lib/surface-conformance.test.ts が行う。
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactNode } from "react";
|
|
14
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
15
|
+
import { type SurfaceStyleProps } from "./surface.styles";
|
|
16
|
+
export interface SurfaceProps extends SurfaceStyleProps {
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
testID?: string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function Surface({ bg, radius, elevation, padding, style, testID, children }: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare namespace Surface {
|
|
23
|
+
var __contract: {
|
|
24
|
+
readonly id: "surface";
|
|
25
|
+
readonly version: "0.1.0";
|
|
26
|
+
readonly variants: readonly ["default"];
|
|
27
|
+
readonly sizes: readonly [];
|
|
28
|
+
readonly states: readonly ["default"];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/components/Surface.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,2CAQhG;yBARe,OAAO"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextField — テキスト入力フィールド(contract: textfield)。RN TextInput の薄いラッパ。
|
|
3
|
+
*
|
|
4
|
+
* - label 必須(FORM_NO_LABEL_OMIT)。label(labelStyle)→ input → helperText / errorText の縦構成。
|
|
5
|
+
* - variant は検証状態(default/error/success)。disabled=true で variant を "disabled" に上書きし、
|
|
6
|
+
* editable=false + accessibilityState.disabled を併せて適用する(recipe description の規約)。
|
|
7
|
+
* - error 時は errorText を必ずテキストで表示する(FORM_NO_COLOR_ONLY_ERROR = 色だけで伝えない)。
|
|
8
|
+
* RN には aria-describedby 相当が無いため、accessibilityState ではなく Text の実表示で伝える。
|
|
9
|
+
* - focus は内部 state(onFocus/onBlur)で recipe states.focus の inputStyle 差分
|
|
10
|
+
* (borderColor=primary.500)を重ねる。disabled 時は focus させない。
|
|
11
|
+
* - 色・寸法の決定は pure resolver(textfield.styles.ts)に分離。
|
|
12
|
+
* recipes/app/textfield.recipe.json との機械照合は scripts/lib/textfield-conformance.test.ts が行う。
|
|
13
|
+
*/
|
|
14
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
15
|
+
import { type TextFieldSize } from "./textfield.styles";
|
|
16
|
+
interface TextFieldProps {
|
|
17
|
+
/** ラベル(必須。placeholder だけの入力欄を作らせない = FORM_NO_LABEL_OMIT)。 */
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
onChangeText?: (text: string) => void;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/** 検証状態。disabled は prop(下の disabled)で表現するため variant には含めない。 */
|
|
23
|
+
variant?: "default" | "error" | "success";
|
|
24
|
+
/** true で variant を "disabled" に上書き + editable=false + accessibilityState.disabled。 */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
size?: TextFieldSize;
|
|
27
|
+
/** 補足テキスト(error 表示中は errorText を優先して非表示)。 */
|
|
28
|
+
helperText?: string;
|
|
29
|
+
/** variant="error" 時に表示するエラーメッセージ(色だけでなくテキストで伝える)。 */
|
|
30
|
+
errorText?: string;
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
32
|
+
testID?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function TextField({ label, value, onChangeText, placeholder, variant, disabled, size, helperText, errorText, style, testID, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace TextField {
|
|
36
|
+
var __contract: {
|
|
37
|
+
readonly id: "textfield";
|
|
38
|
+
readonly version: "2.0.0";
|
|
39
|
+
readonly variants: readonly ["default", "error", "disabled", "success"];
|
|
40
|
+
readonly sizes: readonly ["small", "medium", "large"];
|
|
41
|
+
readonly states: readonly ["default", "hover", "focus", "error", "disabled", "success"];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/TextField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAE5B,UAAU,cAAc;IACtB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1C,uFAAuF;IACvF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,YAAY,EACZ,WAAW,EACX,OAAmB,EACnB,QAAgB,EAChB,IAAe,EACf,UAAU,EACV,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE,cAAc,2CAqChB;yBAjDe,SAAS"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast — 一時的な通知メッセージ(feedback)。contract: toast。
|
|
3
|
+
* 4タイプ(success/error/warning/info)。Alert と同系の bg subtle + text 色に elevation.sm を重ねる。
|
|
4
|
+
*
|
|
5
|
+
* - presentational component。表示位置・キュー・自動消滅はアプリ層の責務
|
|
6
|
+
* (entering/visible/dismissing のアニメ state は Phase 外、recipe description)。
|
|
7
|
+
* - closeButton は契約 anatomy で必須 → onClose を required prop にして型で強制。
|
|
8
|
+
* Pressable + テキスト ×(accessibilityLabel="閉じる" 必須)。
|
|
9
|
+
* - a11y(§2 web→RN mapping): web の role=status + aria-live=polite を
|
|
10
|
+
* accessibilityLiveRegion="polite"(Android のみ有効)に落とす。
|
|
11
|
+
* - elevation は theme.elevation.sm(iOS shadow* + Android elevation の複合値)を container に
|
|
12
|
+
* spread(Surface と同じ扱い)。
|
|
13
|
+
* - 色・寸法の決定は pure resolver(toast.styles.ts)に分離。dark mode は resolver が
|
|
14
|
+
* status.*.subtleDark / textDark を解決(info のみ primary 固定)。
|
|
15
|
+
* recipes/app/toast.recipe.json との機械照合は scripts/lib/toast-conformance.test.ts が行う。
|
|
16
|
+
*/
|
|
17
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
18
|
+
import { type ToastVariant } from "./toast.styles";
|
|
19
|
+
interface ToastProps {
|
|
20
|
+
/** 通知タイプ(contract variant)。 */
|
|
21
|
+
variant: ToastVariant;
|
|
22
|
+
/** 本文(必須)。 */
|
|
23
|
+
message: string;
|
|
24
|
+
/** 補足説明(任意。message の下に縦積み)。 */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** 閉じるボタン(契約 anatomy で必須)。 */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
/** あれば message の後にアクションテキスト(onAction とセットで有効)。 */
|
|
29
|
+
actionLabel?: string;
|
|
30
|
+
onAction?: () => void;
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
32
|
+
testID?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function Toast({ variant, message, description, onClose, actionLabel, onAction, style, testID, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace Toast {
|
|
36
|
+
var __contract: {
|
|
37
|
+
readonly id: "toast";
|
|
38
|
+
readonly version: "2.0.0";
|
|
39
|
+
readonly variants: readonly ["success", "error", "warning", "info"];
|
|
40
|
+
readonly sizes: readonly [];
|
|
41
|
+
readonly states: readonly ["default", "entering", "visible", "dismissing", "hover"];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI/E,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnF,UAAU,UAAU;IAClB,+BAA+B;IAC/B,OAAO,EAAE,YAAY,CAAC;IACtB,cAAc;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,OAAO,EACP,WAAW,EACX,OAAO,EACP,WAAW,EACX,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE,UAAU,2CAkDZ;yBA3De,KAAK"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toggle — ON/OFF スイッチ(contract: toggle)。custom track+thumb 実装。
|
|
3
|
+
*
|
|
4
|
+
* - RN Switch は token 制御(track/thumb 色 + サイズ段階)が弱いため使わない
|
|
5
|
+
* (recipe description の規約)。Pressable の track + 内側 thumb で組む。
|
|
6
|
+
* - variant(off/on = variantModeledStates)は value:boolean から暗黙決定する。
|
|
7
|
+
* - thumb 位置: track に padding=thumbOffset を持たせ、value で justifyContent
|
|
8
|
+
* flex-start / flex-end を切り替える(アニメは Phase 外)。
|
|
9
|
+
* - disabled: recipe states.disabled の opacity + accessibilityState.disabled + onPress 無効。
|
|
10
|
+
* - a11y: accessibilityRole="switch" + accessibilityState.checked。label があれば右に表示し、
|
|
11
|
+
* Pressable 全体がタップ領域 + accessibilityLabel になる。
|
|
12
|
+
* - 色・寸法の決定は pure resolver(toggle.styles.ts)に分離。
|
|
13
|
+
* recipes/app/toggle.recipe.json との機械照合は scripts/lib/toggle-conformance.test.ts が行う。
|
|
14
|
+
*/
|
|
15
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
16
|
+
import { type ToggleSize } from "./toggle.styles";
|
|
17
|
+
interface ToggleProps {
|
|
18
|
+
/** 現在値(true=on / false=off。variant はここから暗黙決定)。 */
|
|
19
|
+
value: boolean;
|
|
20
|
+
onValueChange?: (value: boolean) => void;
|
|
21
|
+
/** あれば track の右にラベル表示(Pressable 全体がタップ領域)。 */
|
|
22
|
+
label?: string;
|
|
23
|
+
size?: ToggleSize;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
testID?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function Toggle({ value, onValueChange, label, size, disabled, style, testID, }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace Toggle {
|
|
30
|
+
var __contract: {
|
|
31
|
+
readonly id: "toggle";
|
|
32
|
+
readonly version: "2.0.0";
|
|
33
|
+
readonly variants: readonly ["off", "on"];
|
|
34
|
+
readonly sizes: readonly ["medium", "large"];
|
|
35
|
+
readonly states: readonly ["off", "on", "hover", "focus", "disabled"];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/Toggle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI/E,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AAEzB,UAAU,WAAW;IACnB,kDAAkD;IAClD,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,aAAa,EACb,KAAK,EACL,IAAe,EACf,QAAgB,EAChB,KAAK,EACL,MAAM,GACP,EAAE,WAAW,2CA2Cb;yBAnDe,MAAM"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* action-sheet.styles — ActionSheet の pure style resolver(styleRefs conformance 対応で
|
|
3
|
+
* ActionSheet.tsx から分離)。
|
|
4
|
+
*
|
|
5
|
+
* react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
|
|
6
|
+
* 直接実行できる。recipes/app/action-sheet.recipe.json(melta-contracts の styleRefs)との
|
|
7
|
+
* 機械照合は scripts/lib/action-sheet-conformance.test.ts が行う。
|
|
8
|
+
*
|
|
9
|
+
* - actions は縦積み(区切り線 border-default)、cancel は下に分離した独立ブロック。
|
|
10
|
+
* - destructive アクションは actionTextStyle の色を destructiveColor(status.danger.base)に
|
|
11
|
+
* 差し替える(destructiveTextStyle)。
|
|
12
|
+
* - overlay の黒 50% は token 外の literal(modal と同じ)。
|
|
13
|
+
* - sheet の下余白(SafeArea)は実装(ActionSheet.tsx)が SafeAreaView で加算する。
|
|
14
|
+
*/
|
|
15
|
+
import type { FontWeightValue, NativeTheme, ThemeMode } from "../theme";
|
|
16
|
+
/** overlay の黒 50%(token 外 literal。modal と同値)。 */
|
|
17
|
+
export declare const ACTION_SHEET_OVERLAY_COLOR = "rgba(0,0,0,0.5)";
|
|
18
|
+
export interface ActionSheetStyle {
|
|
19
|
+
overlayStyle: {
|
|
20
|
+
flex: 1;
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
justifyContent: "flex-end";
|
|
23
|
+
padding: number;
|
|
24
|
+
};
|
|
25
|
+
sheetStyle: {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
borderRadius: number;
|
|
28
|
+
overflow: "hidden";
|
|
29
|
+
};
|
|
30
|
+
titleStyle: {
|
|
31
|
+
fontSize: number;
|
|
32
|
+
color: string;
|
|
33
|
+
textAlign: "center";
|
|
34
|
+
paddingVertical: number;
|
|
35
|
+
};
|
|
36
|
+
actionStyle: {
|
|
37
|
+
paddingVertical: number;
|
|
38
|
+
alignItems: "center";
|
|
39
|
+
borderTopWidth: 1;
|
|
40
|
+
borderTopColor: string;
|
|
41
|
+
};
|
|
42
|
+
actionTextStyle: {
|
|
43
|
+
fontSize: number;
|
|
44
|
+
color: string;
|
|
45
|
+
};
|
|
46
|
+
destructiveTextStyle: {
|
|
47
|
+
fontSize: number;
|
|
48
|
+
color: string;
|
|
49
|
+
};
|
|
50
|
+
cancelStyle: {
|
|
51
|
+
backgroundColor: string;
|
|
52
|
+
borderRadius: number;
|
|
53
|
+
marginTop: number;
|
|
54
|
+
paddingVertical: number;
|
|
55
|
+
alignItems: "center";
|
|
56
|
+
};
|
|
57
|
+
cancelTextStyle: {
|
|
58
|
+
fontSize: number;
|
|
59
|
+
fontWeight: FontWeightValue;
|
|
60
|
+
color: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** mode → ActionSheet style の解決(action-sheet.recipe styleRefs の 1:1 写像)。 */
|
|
64
|
+
export declare function resolveActionSheetStyle(theme: NativeTheme, mode: ThemeMode): ActionSheetStyle;
|
|
65
|
+
//# sourceMappingURL=action-sheet.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-sheet.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/action-sheet.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAExE,iDAAiD;AAEjD,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC,CAAC;QACR,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,UAAU,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,UAAU,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC;IAClF,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,QAAQ,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QACX,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,QAAQ,CAAC;QACrB,cAAc,EAAE,CAAC,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,eAAe,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,oBAAoB,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,WAAW,EAAE;QACX,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,QAAQ,CAAC;KACtB,CAAC;IACF,eAAe,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACnF;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,GAAG,gBAAgB,CA+C7F"}
|