ksk-design-system 1.35.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/AGENTS.md +190 -0
- package/CLAUDE.md +189 -0
- package/DESIGN.md +190 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +107 -0
- package/PUBLISHING.md +160 -0
- package/README.md +59 -0
- package/RELEASE.md +82 -0
- package/bin/init.js +112 -0
- package/contracts/components.json +1443 -0
- package/contracts/rules.json +447 -0
- package/dist/class-names.js +4 -0
- package/dist/index.js +13157 -0
- package/dist/native/ui.js +4928 -0
- package/dist/native.js +1559 -0
- package/dist/server-variants-Dr_V3bDI.js +55 -0
- package/dist/types/class-names.d.ts +27 -0
- package/dist/types/components/patterns/admin/bulk-actions.d.ts +17 -0
- package/dist/types/components/patterns/admin/chart-controls.d.ts +16 -0
- package/dist/types/components/patterns/admin/data-table.d.ts +165 -0
- package/dist/types/components/patterns/admin/image-uploader.d.ts +14 -0
- package/dist/types/components/patterns/admin/kebab-menu.d.ts +17 -0
- package/dist/types/components/patterns/admin/notification-list.d.ts +16 -0
- package/dist/types/components/patterns/admin/search-panel.d.ts +9 -0
- package/dist/types/components/patterns/admin/status-tabs.d.ts +13 -0
- package/dist/types/components/patterns/app-header.d.ts +76 -0
- package/dist/types/components/patterns/banner-carousel.d.ts +25 -0
- package/dist/types/components/patterns/banner.d.ts +13 -0
- package/dist/types/components/patterns/bottom-sheet-form.d.ts +17 -0
- package/dist/types/components/patterns/category-nav.d.ts +43 -0
- package/dist/types/components/patterns/category-scroll.d.ts +53 -0
- package/dist/types/components/patterns/chip-selector.d.ts +20 -0
- package/dist/types/components/patterns/chip.d.ts +42 -0
- package/dist/types/components/patterns/coach-mark-overlay.d.ts +66 -0
- package/dist/types/components/patterns/commerce/bottom-tab-bar.d.ts +27 -0
- package/dist/types/components/patterns/commerce/filter-bar.d.ts +39 -0
- package/dist/types/components/patterns/commerce/image-carousel.d.ts +14 -0
- package/dist/types/components/patterns/commerce/order-summary.d.ts +26 -0
- package/dist/types/components/patterns/commerce/price-display.d.ts +20 -0
- package/dist/types/components/patterns/commerce/product-card.d.ts +50 -0
- package/dist/types/components/patterns/commerce/product-carousel.d.ts +15 -0
- package/dist/types/components/patterns/commerce/quantity-selector.d.ts +21 -0
- package/dist/types/components/patterns/commerce/rating-display.d.ts +15 -0
- package/dist/types/components/patterns/commerce/review-card.d.ts +22 -0
- package/dist/types/components/patterns/commerce/review-summary.d.ts +12 -0
- package/dist/types/components/patterns/confirm-dialog.d.ts +32 -0
- package/dist/types/components/patterns/cookie-consent.d.ts +62 -0
- package/dist/types/components/patterns/empty-state.d.ts +15 -0
- package/dist/types/components/patterns/error-state.d.ts +10 -0
- package/dist/types/components/patterns/file-upload.d.ts +31 -0
- package/dist/types/components/patterns/filter-chip.d.ts +26 -0
- package/dist/types/components/patterns/footer.d.ts +24 -0
- package/dist/types/components/patterns/form-field.d.ts +30 -0
- package/dist/types/components/patterns/form.d.ts +13 -0
- package/dist/types/components/patterns/list-item.d.ts +23 -0
- package/dist/types/components/patterns/list-skeletons.d.ts +43 -0
- package/dist/types/components/patterns/menu-drawer.d.ts +27 -0
- package/dist/types/components/patterns/notification-badge.d.ts +15 -0
- package/dist/types/components/patterns/progress-steps.d.ts +7 -0
- package/dist/types/components/patterns/review-overlay.d.ts +25 -0
- package/dist/types/components/patterns/search-bar.d.ts +6 -0
- package/dist/types/components/patterns/section-header.d.ts +8 -0
- package/dist/types/components/patterns/share-buttons.d.ts +13 -0
- package/dist/types/components/patterns/shells/admin-shell.d.ts +8 -0
- package/dist/types/components/patterns/shells/app-shell.d.ts +7 -0
- package/dist/types/components/patterns/shells/marketing-shell.d.ts +7 -0
- package/dist/types/components/patterns/simple-pagination.d.ts +69 -0
- package/dist/types/components/patterns/stat-card.d.ts +43 -0
- package/dist/types/components/patterns/sticky-action-bar.d.ts +27 -0
- package/dist/types/components/patterns/swipe-row.d.ts +17 -0
- package/dist/types/components/patterns/tag-input.d.ts +20 -0
- package/dist/types/components/patterns/tag.d.ts +7 -0
- package/dist/types/components/ui/accordion.d.ts +7 -0
- package/dist/types/components/ui/alert-dialog.d.ts +47 -0
- package/dist/types/components/ui/alert.d.ts +45 -0
- package/dist/types/components/ui/auto-grow-textarea.d.ts +40 -0
- package/dist/types/components/ui/avatar.d.ts +6 -0
- package/dist/types/components/ui/badge.d.ts +18 -0
- package/dist/types/components/ui/breadcrumb.d.ts +16 -0
- package/dist/types/components/ui/button.d.ts +29 -0
- package/dist/types/components/ui/calendar.d.ts +5 -0
- package/dist/types/components/ui/card.d.ts +28 -0
- package/dist/types/components/ui/checkbox-card.d.ts +29 -0
- package/dist/types/components/ui/checkbox-field.d.ts +24 -0
- package/dist/types/components/ui/checkbox-group.d.ts +33 -0
- package/dist/types/components/ui/checkbox.d.ts +44 -0
- package/dist/types/components/ui/coach-mark.d.ts +27 -0
- package/dist/types/components/ui/collapsible.d.ts +24 -0
- package/dist/types/components/ui/combobox.d.ts +19 -0
- package/dist/types/components/ui/countdown-timer.d.ts +39 -0
- package/dist/types/components/ui/date-picker.d.ts +53 -0
- package/dist/types/components/ui/dialog.d.ts +54 -0
- package/dist/types/components/ui/dropdown-filter.d.ts +35 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +42 -0
- package/dist/types/components/ui/error-boundary.d.ts +66 -0
- package/dist/types/components/ui/form.d.ts +61 -0
- package/dist/types/components/ui/hover-card.d.ts +24 -0
- package/dist/types/components/ui/image-gallery.d.ts +28 -0
- package/dist/types/components/ui/input.d.ts +17 -0
- package/dist/types/components/ui/label.d.ts +4 -0
- package/dist/types/components/ui/multi-select.d.ts +21 -0
- package/dist/types/components/ui/navigation-bar.d.ts +58 -0
- package/dist/types/components/ui/number-input.d.ts +20 -0
- package/dist/types/components/ui/pagination.d.ts +26 -0
- package/dist/types/components/ui/pill-toggle.d.ts +16 -0
- package/dist/types/components/ui/popover.d.ts +7 -0
- package/dist/types/components/ui/progress-ring.d.ts +31 -0
- package/dist/types/components/ui/progress.d.ts +34 -0
- package/dist/types/components/ui/radio-group.d.ts +22 -0
- package/dist/types/components/ui/responsive-dialog.d.ts +31 -0
- package/dist/types/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/components/ui/select.d.ts +22 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/sheet.d.ts +139 -0
- package/dist/types/components/ui/skeleton.d.ts +31 -0
- package/dist/types/components/ui/slider.d.ts +14 -0
- package/dist/types/components/ui/social-icon-data.d.ts +10 -0
- package/dist/types/components/ui/social-icon.d.ts +38 -0
- package/dist/types/components/ui/social-login-button.d.ts +10 -0
- package/dist/types/components/ui/spinner.d.ts +22 -0
- package/dist/types/components/ui/star-rating.d.ts +12 -0
- package/dist/types/components/ui/sub-nav.d.ts +17 -0
- package/dist/types/components/ui/switch.d.ts +4 -0
- package/dist/types/components/ui/sync-status-badge.d.ts +17 -0
- package/dist/types/components/ui/tabs.d.ts +15 -0
- package/dist/types/components/ui/textarea.d.ts +8 -0
- package/dist/types/components/ui/time-picker.d.ts +14 -0
- package/dist/types/components/ui/toast.d.ts +49 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/index.d.ts +174 -0
- package/dist/types/lib/server-variants/button-variants.d.ts +20 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/native/components/Accordion.d.ts +12 -0
- package/dist/types/native/components/Alert.d.ts +9 -0
- package/dist/types/native/components/AlertDialog.d.ts +11 -0
- package/dist/types/native/components/AppHeader.d.ts +10 -0
- package/dist/types/native/components/AppShell.d.ts +13 -0
- package/dist/types/native/components/AutoGrowTextarea.d.ts +8 -0
- package/dist/types/native/components/Avatar.d.ts +8 -0
- package/dist/types/native/components/Badge.d.ts +8 -0
- package/dist/types/native/components/Banner.d.ts +10 -0
- package/dist/types/native/components/BannerCarousel.d.ts +8 -0
- package/dist/types/native/components/BottomSheetForm.d.ts +10 -0
- package/dist/types/native/components/BottomTabBar.d.ts +8 -0
- package/dist/types/native/components/Breadcrumb.d.ts +12 -0
- package/dist/types/native/components/Button.d.ts +9 -0
- package/dist/types/native/components/Calendar.d.ts +8 -0
- package/dist/types/native/components/Card.d.ts +11 -0
- package/dist/types/native/components/CategoryNav.d.ts +13 -0
- package/dist/types/native/components/CategoryScroll.d.ts +12 -0
- package/dist/types/native/components/Checkbox.d.ts +7 -0
- package/dist/types/native/components/CheckboxCard.d.ts +8 -0
- package/dist/types/native/components/CheckboxField.d.ts +8 -0
- package/dist/types/native/components/CheckboxGroup.d.ts +12 -0
- package/dist/types/native/components/Chip.d.ts +17 -0
- package/dist/types/native/components/ChipSelector.d.ts +13 -0
- package/dist/types/native/components/CoachMark.d.ts +12 -0
- package/dist/types/native/components/CoachMarkOverlay.d.ts +19 -0
- package/dist/types/native/components/Collapsible.d.ts +7 -0
- package/dist/types/native/components/Combobox.d.ts +14 -0
- package/dist/types/native/components/ConfirmDialog.d.ts +7 -0
- package/dist/types/native/components/CountdownTimer.d.ts +7 -0
- package/dist/types/native/components/DatePicker.d.ts +10 -0
- package/dist/types/native/components/Dialog.d.ts +12 -0
- package/dist/types/native/components/DropdownFilter.d.ts +12 -0
- package/dist/types/native/components/DropdownMenu.d.ts +19 -0
- package/dist/types/native/components/EmptyState.d.ts +8 -0
- package/dist/types/native/components/ErrorState.d.ts +8 -0
- package/dist/types/native/components/FileUpload.d.ts +12 -0
- package/dist/types/native/components/FilterBar.d.ts +13 -0
- package/dist/types/native/components/FilterChip.d.ts +7 -0
- package/dist/types/native/components/Footer.d.ts +9 -0
- package/dist/types/native/components/FormField.d.ts +9 -0
- package/dist/types/native/components/GlassView.d.ts +25 -0
- package/dist/types/native/components/ImageCarousel.d.ts +8 -0
- package/dist/types/native/components/ImageGallery.d.ts +7 -0
- package/dist/types/native/components/Input.d.ts +9 -0
- package/dist/types/native/components/Label.d.ts +7 -0
- package/dist/types/native/components/ListItem.d.ts +11 -0
- package/dist/types/native/components/ListSkeletons.d.ts +6 -0
- package/dist/types/native/components/MarketingShell.d.ts +9 -0
- package/dist/types/native/components/MenuDrawer.d.ts +21 -0
- package/dist/types/native/components/MultiSelect.d.ts +13 -0
- package/dist/types/native/components/NavigationBar.d.ts +18 -0
- package/dist/types/native/components/NotificationBadge.d.ts +9 -0
- package/dist/types/native/components/NumberInput.d.ts +9 -0
- package/dist/types/native/components/OrderSummary.d.ts +10 -0
- package/dist/types/native/components/Pagination.d.ts +7 -0
- package/dist/types/native/components/PillToggle.d.ts +12 -0
- package/dist/types/native/components/Popover.d.ts +14 -0
- package/dist/types/native/components/PriceDisplay.d.ts +8 -0
- package/dist/types/native/components/ProductCard.d.ts +14 -0
- package/dist/types/native/components/ProductCarousel.d.ts +11 -0
- package/dist/types/native/components/Progress.d.ts +7 -0
- package/dist/types/native/components/ProgressRing.d.ts +12 -0
- package/dist/types/native/components/ProgressSteps.d.ts +9 -0
- package/dist/types/native/components/QuantitySelector.d.ts +6 -0
- package/dist/types/native/components/RadioGroup.d.ts +13 -0
- package/dist/types/native/components/RatingDisplay.d.ts +7 -0
- package/dist/types/native/components/ResponsiveDialog.d.ts +7 -0
- package/dist/types/native/components/ReviewCard.d.ts +11 -0
- package/dist/types/native/components/ReviewOverlay.d.ts +7 -0
- package/dist/types/native/components/ReviewSummary.d.ts +7 -0
- package/dist/types/native/components/ScrollArea.d.ts +9 -0
- package/dist/types/native/components/SearchBar.d.ts +9 -0
- package/dist/types/native/components/SectionHeader.d.ts +10 -0
- package/dist/types/native/components/Select.d.ts +14 -0
- package/dist/types/native/components/Separator.d.ts +5 -0
- package/dist/types/native/components/ShareButtons.d.ts +11 -0
- package/dist/types/native/components/Sheet.d.ts +20 -0
- package/dist/types/native/components/SimplePagination.d.ts +7 -0
- package/dist/types/native/components/Skeleton.d.ts +11 -0
- package/dist/types/native/components/Slider.d.ts +9 -0
- package/dist/types/native/components/SocialIcon.d.ts +12 -0
- package/dist/types/native/components/SocialLoginButton.d.ts +8 -0
- package/dist/types/native/components/Spinner.d.ts +6 -0
- package/dist/types/native/components/Stack.d.ts +13 -0
- package/dist/types/native/components/StarRating.d.ts +9 -0
- package/dist/types/native/components/StatCard.d.ts +7 -0
- package/dist/types/native/components/StickyActionBar.d.ts +6 -0
- package/dist/types/native/components/SubNav.d.ts +12 -0
- package/dist/types/native/components/SwipeRow.d.ts +14 -0
- package/dist/types/native/components/Switch.d.ts +4 -0
- package/dist/types/native/components/SyncStatusBadge.d.ts +6 -0
- package/dist/types/native/components/Tabs.d.ts +23 -0
- package/dist/types/native/components/Tag.d.ts +10 -0
- package/dist/types/native/components/TagInput.d.ts +7 -0
- package/dist/types/native/components/Text.d.ts +10 -0
- package/dist/types/native/components/Textarea.d.ts +7 -0
- package/dist/types/native/components/TimePicker.d.ts +12 -0
- package/dist/types/native/components/Toast.d.ts +18 -0
- package/dist/types/native/components/index.d.ts +99 -0
- package/dist/types/native/components/social-icon-data.d.ts +5 -0
- package/dist/types/native/index.d.ts +4 -0
- package/dist/types/native/theme/ThemeProvider.d.ts +21 -0
- package/dist/types/native/typography.d.ts +8 -0
- package/dist/types/tokens/native/index.d.ts +13 -0
- package/dist/types/tokens/native/primitives.d.ts +116 -0
- package/dist/types/tokens/native/scales.d.ts +270 -0
- package/dist/types/tokens/native/themes.d.ts +1147 -0
- package/eslint/deprecated.js +104 -0
- package/eslint/no-colorless-border.js +217 -0
- package/package.json +215 -0
- package/scripts/codemod/README.md +51 -0
- package/scripts/codemod/template.mjs +164 -0
- package/src/components/COMPONENT_LOOKUP.md +190 -0
- package/src/preset.css +168 -0
- package/src/styles/categorical.css +161 -0
- package/src/styles/glass.css +365 -0
- package/src/styles/primitive.css +161 -0
- package/src/styles/semantic.css +247 -0
- package/src/styles/typography.css +140 -0
- package/src/themes/README.md +44 -0
- package/src/themes/blue.css +21 -0
- package/src/themes/default.css +12 -0
- package/src/themes/green.css +22 -0
- package/src/themes/orange.css +21 -0
- package/src/themes/violet.css +22 -0
- package/templates/AGENTS.md +77 -0
- package/templates/CLAUDE.md +77 -0
- package/tokens.json +607 -0
|
@@ -0,0 +1,4928 @@
|
|
|
1
|
+
import { scales as ne, themes as Te } from "../native.js";
|
|
2
|
+
import { getTheme as Xr, primitives as Gr, themeNames as Kr } from "../native.js";
|
|
3
|
+
import { jsx as e, jsxs as p, Fragment as F } from "react/jsx-runtime";
|
|
4
|
+
import X, { useState as S, useMemo as U, useContext as oe, createContext as se, useRef as P, useEffect as _, useCallback as ge } from "react";
|
|
5
|
+
import { Text as g, Platform as N, View as c, Pressable as f, Image as Y, ActivityIndicator as fe, Animated as I, TextInput as G, Switch as Pe, PanResponder as ae, Modal as K, Dimensions as E, ScrollView as W, FlatList as L, Share as We } from "react-native";
|
|
6
|
+
const xe = se(null);
|
|
7
|
+
function xt({
|
|
8
|
+
children: s,
|
|
9
|
+
initialName: i = "default",
|
|
10
|
+
initialMode: o = "light"
|
|
11
|
+
}) {
|
|
12
|
+
const [r, t] = S(i), [n, a] = S(o), l = U(
|
|
13
|
+
() => ({
|
|
14
|
+
name: r,
|
|
15
|
+
mode: n,
|
|
16
|
+
theme: Te[r][n],
|
|
17
|
+
scales: ne,
|
|
18
|
+
setName: t,
|
|
19
|
+
setMode: a,
|
|
20
|
+
toggleMode: () => a((d) => d === "light" ? "dark" : "light")
|
|
21
|
+
}),
|
|
22
|
+
[r, n]
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ e(xe.Provider, { value: l, children: s });
|
|
25
|
+
}
|
|
26
|
+
function b() {
|
|
27
|
+
const s = oe(xe);
|
|
28
|
+
if (!s) throw new Error("useTheme は ThemeProvider の内側で使ってください");
|
|
29
|
+
return s;
|
|
30
|
+
}
|
|
31
|
+
function u(s) {
|
|
32
|
+
if (s === "caption") return { ...ne.typography.caption };
|
|
33
|
+
const [i, o] = s.split(".");
|
|
34
|
+
return { ...ne.typography[i][o] };
|
|
35
|
+
}
|
|
36
|
+
function wt({ variant: s = "body.md", color: i, style: o, children: r, ...t }) {
|
|
37
|
+
const { theme: n } = b();
|
|
38
|
+
return /* @__PURE__ */ e(g, { style: [u(s), { color: i ?? n.text["high-emphasis"] }, o], ...t, children: r });
|
|
39
|
+
}
|
|
40
|
+
const He = {
|
|
41
|
+
subtle: { blur: 14, opacity: 0.1 },
|
|
42
|
+
regular: { blur: 28, opacity: 0.18 },
|
|
43
|
+
thick: { blur: 56, opacity: 0.28 }
|
|
44
|
+
};
|
|
45
|
+
function Me({
|
|
46
|
+
intensity: s = "regular",
|
|
47
|
+
tint: i = "system",
|
|
48
|
+
showRim: o = !0,
|
|
49
|
+
borderRadius: r,
|
|
50
|
+
style: t,
|
|
51
|
+
children: n,
|
|
52
|
+
...a
|
|
53
|
+
}) {
|
|
54
|
+
const { theme: l, scales: d, mode: m } = b(), h = r ?? d.borderRadius.lg, y = He[s], x = i === "system" ? m === "dark" ? "dark" : "light" : i, C = {
|
|
55
|
+
borderRadius: h,
|
|
56
|
+
overflow: "hidden",
|
|
57
|
+
backgroundColor: x === "light" ? `rgba(255, 255, 255, ${y.opacity})` : `rgba(20, 20, 30, ${y.opacity})`,
|
|
58
|
+
borderWidth: o ? 1 : 0,
|
|
59
|
+
borderColor: x === "light" ? "rgba(255, 255, 255, 0.42)" : "rgba(255, 255, 255, 0.15)"
|
|
60
|
+
}, R = Ve();
|
|
61
|
+
if (R && N.OS === "ios")
|
|
62
|
+
return /* @__PURE__ */ p(
|
|
63
|
+
R,
|
|
64
|
+
{
|
|
65
|
+
intensity: y.blur * 2.5,
|
|
66
|
+
tint: x === "dark" ? "dark" : "light",
|
|
67
|
+
style: [C, { backgroundColor: "transparent" }, t],
|
|
68
|
+
...a,
|
|
69
|
+
children: [
|
|
70
|
+
o && /* @__PURE__ */ e(
|
|
71
|
+
c,
|
|
72
|
+
{
|
|
73
|
+
pointerEvents: "none",
|
|
74
|
+
style: {
|
|
75
|
+
...ze,
|
|
76
|
+
borderRadius: h,
|
|
77
|
+
borderWidth: 1,
|
|
78
|
+
borderColor: C.borderColor
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
n
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
if (N.OS === "web") {
|
|
87
|
+
const w = {
|
|
88
|
+
...C,
|
|
89
|
+
// RN Web は未知のスタイルキーを CSS としてそのまま出力する
|
|
90
|
+
WebkitBackdropFilter: `blur(${y.blur}px) saturate(1.9) brightness(1.06)`,
|
|
91
|
+
backdropFilter: `blur(${y.blur}px) saturate(1.9) brightness(1.06)`
|
|
92
|
+
};
|
|
93
|
+
return /* @__PURE__ */ e(c, { style: [w, t], ...a, children: n });
|
|
94
|
+
}
|
|
95
|
+
return /* @__PURE__ */ e(c, { style: [C, t], ...a, children: n });
|
|
96
|
+
}
|
|
97
|
+
const ze = {
|
|
98
|
+
position: "absolute",
|
|
99
|
+
top: 0,
|
|
100
|
+
left: 0,
|
|
101
|
+
right: 0,
|
|
102
|
+
bottom: 0
|
|
103
|
+
};
|
|
104
|
+
let J;
|
|
105
|
+
function Ve() {
|
|
106
|
+
if (J !== void 0) return J;
|
|
107
|
+
try {
|
|
108
|
+
J = require("expo-blur").BlurView ?? null;
|
|
109
|
+
} catch {
|
|
110
|
+
J = null;
|
|
111
|
+
}
|
|
112
|
+
return J;
|
|
113
|
+
}
|
|
114
|
+
function z({ variant: s = "primary", children: i, ...o }) {
|
|
115
|
+
const { theme: r, scales: t, mode: n } = b(), a = {
|
|
116
|
+
primary: {
|
|
117
|
+
bg: r.brand.primary,
|
|
118
|
+
bgActive: r.active["primary-button"],
|
|
119
|
+
fg: r.text["on-inverse"],
|
|
120
|
+
border: r.brand.primary
|
|
121
|
+
},
|
|
122
|
+
secondary: {
|
|
123
|
+
bg: r.surface["accent-primary-light"],
|
|
124
|
+
bgActive: r.active["secondary-button"],
|
|
125
|
+
fg: r.text["accent-primary"],
|
|
126
|
+
border: r.border["accent-primary"]
|
|
127
|
+
},
|
|
128
|
+
tertiary: {
|
|
129
|
+
bg: r.surface.secondary,
|
|
130
|
+
bgActive: r.active["tertiary-button"],
|
|
131
|
+
fg: r.text["high-emphasis"],
|
|
132
|
+
border: r.border["low-emphasis"]
|
|
133
|
+
},
|
|
134
|
+
destructive: {
|
|
135
|
+
bg: r.caution.base,
|
|
136
|
+
bgActive: r.caution.action,
|
|
137
|
+
fg: r.text["on-inverse"],
|
|
138
|
+
border: r.caution.base
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
if (s === "glass") {
|
|
142
|
+
const d = r.text["high-emphasis"];
|
|
143
|
+
return /* @__PURE__ */ e(
|
|
144
|
+
f,
|
|
145
|
+
{
|
|
146
|
+
style: {
|
|
147
|
+
minHeight: t.touchTargets.buttonCTA.min,
|
|
148
|
+
borderRadius: t.borderRadius.full,
|
|
149
|
+
overflow: "hidden"
|
|
150
|
+
},
|
|
151
|
+
...o,
|
|
152
|
+
children: ({ pressed: m }) => /* @__PURE__ */ e(
|
|
153
|
+
Me,
|
|
154
|
+
{
|
|
155
|
+
intensity: "regular",
|
|
156
|
+
borderRadius: t.borderRadius.full,
|
|
157
|
+
style: {
|
|
158
|
+
minHeight: t.touchTargets.buttonCTA.min,
|
|
159
|
+
paddingHorizontal: t.spacing.scale[5],
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
alignItems: "center",
|
|
162
|
+
transform: [{ scale: m ? 0.96 : 1 }]
|
|
163
|
+
},
|
|
164
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: d }], children: i })
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
const l = a[s];
|
|
171
|
+
return /* @__PURE__ */ e(
|
|
172
|
+
f,
|
|
173
|
+
{
|
|
174
|
+
style: ({ pressed: d }) => [
|
|
175
|
+
{
|
|
176
|
+
minHeight: t.touchTargets.buttonCTA.min,
|
|
177
|
+
paddingHorizontal: t.spacing.scale[5],
|
|
178
|
+
justifyContent: "center",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
borderRadius: t.borderRadius.lg,
|
|
181
|
+
borderWidth: 1
|
|
182
|
+
},
|
|
183
|
+
{ backgroundColor: d ? l.bgActive : l.bg, borderColor: l.border }
|
|
184
|
+
],
|
|
185
|
+
...o,
|
|
186
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.fg }], children: i })
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
const je = {
|
|
191
|
+
sm: {
|
|
192
|
+
shadowOffset: { width: 0, height: 1 },
|
|
193
|
+
shadowOpacity: 0.05,
|
|
194
|
+
shadowRadius: 2
|
|
195
|
+
},
|
|
196
|
+
md: {
|
|
197
|
+
shadowOffset: { width: 0, height: 2 },
|
|
198
|
+
shadowOpacity: 0.08,
|
|
199
|
+
shadowRadius: 8
|
|
200
|
+
},
|
|
201
|
+
lg: {
|
|
202
|
+
shadowOffset: { width: 0, height: 12 },
|
|
203
|
+
shadowOpacity: 0.12,
|
|
204
|
+
shadowRadius: 24
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
function Be(s, i) {
|
|
208
|
+
return {
|
|
209
|
+
shadowColor: i,
|
|
210
|
+
...je[s]
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function Ct({ padding: s = 4, elevation: i, style: o, children: r, ...t }) {
|
|
214
|
+
const { theme: n, scales: a } = b(), l = i ? N.select({
|
|
215
|
+
web: { boxShadow: a.shadows[i].boxShadow },
|
|
216
|
+
ios: Be(i, n.overlay.dark),
|
|
217
|
+
default: { elevation: a.shadows[i].elevation }
|
|
218
|
+
}) : void 0;
|
|
219
|
+
return /* @__PURE__ */ e(
|
|
220
|
+
c,
|
|
221
|
+
{
|
|
222
|
+
style: [
|
|
223
|
+
{
|
|
224
|
+
backgroundColor: n.surface.primary,
|
|
225
|
+
borderColor: n.border["low-emphasis"],
|
|
226
|
+
borderWidth: 1,
|
|
227
|
+
borderRadius: a.borderRadius.lg,
|
|
228
|
+
padding: a.spacing.scale[s],
|
|
229
|
+
gap: a.spacing.scale[3]
|
|
230
|
+
},
|
|
231
|
+
l,
|
|
232
|
+
o
|
|
233
|
+
],
|
|
234
|
+
...t,
|
|
235
|
+
children: r
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
function Rt({ tone: s = "neutral", children: i }) {
|
|
240
|
+
const { theme: o, scales: r } = b(), n = {
|
|
241
|
+
neutral: { bg: o.surface.tertiary, fg: o.text["medium-emphasis"] },
|
|
242
|
+
accent: { bg: o.surface["accent-primary-light"], fg: o.text["accent-primary"] },
|
|
243
|
+
success: { bg: o.surface.success, fg: o.text.success },
|
|
244
|
+
caution: { bg: o.surface.caution, fg: o.text.caution },
|
|
245
|
+
warning: { bg: o.surface.warning, fg: o.text.warning },
|
|
246
|
+
info: { bg: o.surface.info, fg: o.text.info }
|
|
247
|
+
}[s];
|
|
248
|
+
return /* @__PURE__ */ e(
|
|
249
|
+
c,
|
|
250
|
+
{
|
|
251
|
+
style: {
|
|
252
|
+
backgroundColor: n.bg,
|
|
253
|
+
borderRadius: r.borderRadius.full,
|
|
254
|
+
paddingVertical: r.spacing.scale[1],
|
|
255
|
+
paddingHorizontal: r.spacing.scale[3],
|
|
256
|
+
alignSelf: "flex-start"
|
|
257
|
+
},
|
|
258
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: n.fg }], children: i })
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
function vt({
|
|
263
|
+
gap: s = 3,
|
|
264
|
+
direction: i = "column",
|
|
265
|
+
align: o,
|
|
266
|
+
justify: r,
|
|
267
|
+
wrap: t = !1,
|
|
268
|
+
style: n,
|
|
269
|
+
children: a,
|
|
270
|
+
...l
|
|
271
|
+
}) {
|
|
272
|
+
const { scales: d } = b();
|
|
273
|
+
return /* @__PURE__ */ e(
|
|
274
|
+
c,
|
|
275
|
+
{
|
|
276
|
+
style: [
|
|
277
|
+
{
|
|
278
|
+
flexDirection: i,
|
|
279
|
+
gap: d.spacing.scale[s],
|
|
280
|
+
alignItems: o,
|
|
281
|
+
justifyContent: r,
|
|
282
|
+
flexWrap: t ? "wrap" : "nowrap"
|
|
283
|
+
},
|
|
284
|
+
n
|
|
285
|
+
],
|
|
286
|
+
...l,
|
|
287
|
+
children: a
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const Fe = {
|
|
292
|
+
sm: 32,
|
|
293
|
+
md: 40,
|
|
294
|
+
lg: 56,
|
|
295
|
+
xl: 80
|
|
296
|
+
};
|
|
297
|
+
function Oe({ source: s, fallback: i, size: o = "md" }) {
|
|
298
|
+
const { theme: r } = b(), t = Fe[o];
|
|
299
|
+
return s ? /* @__PURE__ */ e(
|
|
300
|
+
Y,
|
|
301
|
+
{
|
|
302
|
+
source: s,
|
|
303
|
+
style: {
|
|
304
|
+
width: t,
|
|
305
|
+
height: t,
|
|
306
|
+
borderRadius: t / 2,
|
|
307
|
+
backgroundColor: r.surface.tertiary
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
) : /* @__PURE__ */ e(
|
|
311
|
+
c,
|
|
312
|
+
{
|
|
313
|
+
style: {
|
|
314
|
+
width: t,
|
|
315
|
+
height: t,
|
|
316
|
+
borderRadius: t / 2,
|
|
317
|
+
backgroundColor: r.surface.tertiary,
|
|
318
|
+
alignItems: "center",
|
|
319
|
+
justifyContent: "center"
|
|
320
|
+
},
|
|
321
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: r.text["medium-emphasis"] }], children: i ?? "?" })
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
const pe = { sm: 28, md: 32, lg: 36 }, Ae = { sm: 10, md: 12, lg: 16 };
|
|
326
|
+
function we({
|
|
327
|
+
variant: s = "filled",
|
|
328
|
+
size: i = "md",
|
|
329
|
+
shape: o = "pill",
|
|
330
|
+
selected: r = !1,
|
|
331
|
+
disabled: t = !1,
|
|
332
|
+
count: n,
|
|
333
|
+
removable: a = !1,
|
|
334
|
+
onRemove: l,
|
|
335
|
+
children: d,
|
|
336
|
+
...m
|
|
337
|
+
}) {
|
|
338
|
+
const { theme: h, scales: y } = b(), x = {
|
|
339
|
+
filled: { bg: h.surface.secondary, fg: h.text["high-emphasis"], border: "transparent" },
|
|
340
|
+
accent: {
|
|
341
|
+
bg: h.surface["accent-primary-light"],
|
|
342
|
+
fg: h.text["accent-primary"],
|
|
343
|
+
border: "transparent"
|
|
344
|
+
},
|
|
345
|
+
outline: { bg: "transparent", fg: h.text["high-emphasis"], border: h.border["medium-emphasis"] }
|
|
346
|
+
}[s], C = r ? h.brand.primary : x.bg, R = r ? h.text["on-inverse"] : t ? h.text.disable : x.fg, w = r ? h.brand.primary : x.border;
|
|
347
|
+
return /* @__PURE__ */ p(c, { style: { flexDirection: "row", alignSelf: "flex-start" }, children: [
|
|
348
|
+
/* @__PURE__ */ p(
|
|
349
|
+
f,
|
|
350
|
+
{
|
|
351
|
+
disabled: t,
|
|
352
|
+
style: ({ pressed: v }) => [
|
|
353
|
+
{
|
|
354
|
+
height: pe[i],
|
|
355
|
+
paddingHorizontal: Ae[i],
|
|
356
|
+
flexDirection: "row",
|
|
357
|
+
alignItems: "center",
|
|
358
|
+
justifyContent: "center",
|
|
359
|
+
gap: y.spacing.scale[1],
|
|
360
|
+
borderRadius: o === "pill" ? y.borderRadius.full : y.borderRadius.sm,
|
|
361
|
+
borderWidth: s === "outline" || r ? 1 : 0,
|
|
362
|
+
borderColor: w,
|
|
363
|
+
backgroundColor: v && !t ? h.active["secondary-button"] : C,
|
|
364
|
+
opacity: t ? 0.6 : 1
|
|
365
|
+
},
|
|
366
|
+
a && { borderTopRightRadius: 0, borderBottomRightRadius: 0 }
|
|
367
|
+
],
|
|
368
|
+
...m,
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: R }], children: d }),
|
|
371
|
+
n !== void 0 && /* @__PURE__ */ e(
|
|
372
|
+
c,
|
|
373
|
+
{
|
|
374
|
+
style: {
|
|
375
|
+
minWidth: 20,
|
|
376
|
+
paddingHorizontal: 6,
|
|
377
|
+
borderRadius: y.borderRadius.full,
|
|
378
|
+
backgroundColor: r ? h.surface.primary : h.surface.tertiary,
|
|
379
|
+
alignItems: "center",
|
|
380
|
+
justifyContent: "center"
|
|
381
|
+
},
|
|
382
|
+
children: /* @__PURE__ */ e(
|
|
383
|
+
g,
|
|
384
|
+
{
|
|
385
|
+
style: [
|
|
386
|
+
u("label.xs"),
|
|
387
|
+
{ color: r ? h.text["accent-primary"] : h.text["medium-emphasis"] }
|
|
388
|
+
],
|
|
389
|
+
children: n
|
|
390
|
+
}
|
|
391
|
+
)
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
),
|
|
397
|
+
a && /* @__PURE__ */ e(
|
|
398
|
+
f,
|
|
399
|
+
{
|
|
400
|
+
onPress: l,
|
|
401
|
+
disabled: t,
|
|
402
|
+
style: ({ pressed: v }) => ({
|
|
403
|
+
height: pe[i],
|
|
404
|
+
paddingHorizontal: 10,
|
|
405
|
+
alignItems: "center",
|
|
406
|
+
justifyContent: "center",
|
|
407
|
+
backgroundColor: v ? h.active["tertiary-button"] : C,
|
|
408
|
+
borderTopRightRadius: o === "pill" ? y.borderRadius.full : y.borderRadius.sm,
|
|
409
|
+
borderBottomRightRadius: o === "pill" ? y.borderRadius.full : y.borderRadius.sm,
|
|
410
|
+
borderWidth: s === "outline" || r ? 1 : 0,
|
|
411
|
+
borderLeftWidth: 0,
|
|
412
|
+
borderColor: w,
|
|
413
|
+
opacity: t ? 0.6 : 1
|
|
414
|
+
}),
|
|
415
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: R, lineHeight: 14 }], children: "×" })
|
|
416
|
+
}
|
|
417
|
+
)
|
|
418
|
+
] });
|
|
419
|
+
}
|
|
420
|
+
function Ee({ tone: s = "neutral", variant: i = "filled", children: o }) {
|
|
421
|
+
const { theme: r, scales: t } = b(), n = {
|
|
422
|
+
neutral: { bg: r.surface.tertiary, fg: r.text["medium-emphasis"] },
|
|
423
|
+
accent: { bg: r.surface["accent-primary-light"], fg: r.text["accent-primary"] },
|
|
424
|
+
success: { bg: r.surface.success, fg: r.text.success },
|
|
425
|
+
caution: { bg: r.surface.caution, fg: r.text.caution },
|
|
426
|
+
warning: { bg: r.surface.warning, fg: r.text.warning },
|
|
427
|
+
info: { bg: r.surface.info, fg: r.text.info }
|
|
428
|
+
}, a = {
|
|
429
|
+
neutral: { fg: r.text["medium-emphasis"], border: r.border["medium-emphasis"] },
|
|
430
|
+
accent: { fg: r.text["accent-primary"], border: r.border["accent-primary"] },
|
|
431
|
+
success: { fg: r.text.success, border: r.border.success },
|
|
432
|
+
caution: { fg: r.text.caution, border: r.border.caution },
|
|
433
|
+
warning: { fg: r.text.warning, border: r.border.warning },
|
|
434
|
+
info: { fg: r.text.info, border: r.border.info }
|
|
435
|
+
}, l = i === "filled" ? n[s] : null, d = i === "outline" ? a[s] : null;
|
|
436
|
+
return /* @__PURE__ */ e(
|
|
437
|
+
c,
|
|
438
|
+
{
|
|
439
|
+
style: {
|
|
440
|
+
backgroundColor: l?.bg ?? "transparent",
|
|
441
|
+
borderColor: d?.border,
|
|
442
|
+
borderWidth: i === "outline" ? 1 : 0,
|
|
443
|
+
borderRadius: t.borderRadius.sm,
|
|
444
|
+
paddingVertical: t.spacing.scale[1],
|
|
445
|
+
paddingHorizontal: t.spacing.scale[2],
|
|
446
|
+
alignSelf: "flex-start"
|
|
447
|
+
},
|
|
448
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: l?.fg ?? d?.fg ?? r.text["medium-emphasis"] }], children: o })
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
function kt({ size: s = "md", color: i }) {
|
|
453
|
+
const { theme: o } = b();
|
|
454
|
+
return /* @__PURE__ */ e(
|
|
455
|
+
fe,
|
|
456
|
+
{
|
|
457
|
+
size: s === "sm" ? "small" : "large",
|
|
458
|
+
color: i ?? o.brand.primary
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
function q({ orientation: s = "horizontal", emphasis: i = "low" }) {
|
|
463
|
+
const { theme: o } = b(), r = i === "low" ? o.border["low-emphasis"] : o.border["medium-emphasis"];
|
|
464
|
+
return s === "vertical" ? /* @__PURE__ */ e(c, { style: { width: 1, alignSelf: "stretch", backgroundColor: r } }) : /* @__PURE__ */ e(c, { style: { height: 1, alignSelf: "stretch", backgroundColor: r } });
|
|
465
|
+
}
|
|
466
|
+
function B({ width: s = "100%", height: i = 16, radius: o, style: r }) {
|
|
467
|
+
const { theme: t, scales: n } = b(), a = P(new I.Value(0.4)).current;
|
|
468
|
+
return _(() => {
|
|
469
|
+
const l = I.loop(
|
|
470
|
+
I.sequence([
|
|
471
|
+
I.timing(a, { toValue: 1, duration: 800, useNativeDriver: !0 }),
|
|
472
|
+
I.timing(a, { toValue: 0.4, duration: 800, useNativeDriver: !0 })
|
|
473
|
+
])
|
|
474
|
+
);
|
|
475
|
+
return l.start(), () => l.stop();
|
|
476
|
+
}, [a]), /* @__PURE__ */ e(
|
|
477
|
+
I.View,
|
|
478
|
+
{
|
|
479
|
+
style: [
|
|
480
|
+
{
|
|
481
|
+
width: s,
|
|
482
|
+
height: i,
|
|
483
|
+
backgroundColor: t.surface.tertiary,
|
|
484
|
+
borderRadius: o ?? n.borderRadius.md,
|
|
485
|
+
opacity: a
|
|
486
|
+
},
|
|
487
|
+
r
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
function St({ lines: s = 3 }) {
|
|
493
|
+
return /* @__PURE__ */ e(c, { style: { gap: 8 }, children: Array.from({ length: s }).map((i, o) => /* @__PURE__ */ e(B, { height: 12, width: o === s - 1 ? "60%" : "100%" }, o)) });
|
|
494
|
+
}
|
|
495
|
+
function It({ value: s, max: i = 100, height: o = 8, tone: r = "accent" }) {
|
|
496
|
+
const { theme: t, scales: n } = b(), a = Math.min(100, Math.max(0, s / i * 100)), l = {
|
|
497
|
+
accent: t.brand.primary,
|
|
498
|
+
success: t.success.base,
|
|
499
|
+
caution: t.caution.base,
|
|
500
|
+
warning: t.warning.base
|
|
501
|
+
}[r];
|
|
502
|
+
return /* @__PURE__ */ e(
|
|
503
|
+
c,
|
|
504
|
+
{
|
|
505
|
+
style: {
|
|
506
|
+
width: "100%",
|
|
507
|
+
height: o,
|
|
508
|
+
borderRadius: n.borderRadius.full,
|
|
509
|
+
backgroundColor: t.surface.tertiary,
|
|
510
|
+
overflow: "hidden"
|
|
511
|
+
},
|
|
512
|
+
children: /* @__PURE__ */ e(
|
|
513
|
+
c,
|
|
514
|
+
{
|
|
515
|
+
style: {
|
|
516
|
+
width: `${a}%`,
|
|
517
|
+
height: "100%",
|
|
518
|
+
backgroundColor: l,
|
|
519
|
+
borderRadius: n.borderRadius.full
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
)
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
function Dt({
|
|
527
|
+
value: s,
|
|
528
|
+
max: i = 100,
|
|
529
|
+
size: o = 64,
|
|
530
|
+
thickness: r = 6,
|
|
531
|
+
showLabel: t = !0
|
|
532
|
+
}) {
|
|
533
|
+
const { theme: n } = b(), a = Math.min(100, Math.max(0, s / i * 100)), l = a / 100 * 360, d = n.surface.tertiary, m = n.brand.primary, h = o / 2, y = (x) => /* @__PURE__ */ e(
|
|
534
|
+
c,
|
|
535
|
+
{
|
|
536
|
+
style: {
|
|
537
|
+
position: "absolute",
|
|
538
|
+
width: o,
|
|
539
|
+
height: o,
|
|
540
|
+
transform: [{ rotate: `${x}deg` }]
|
|
541
|
+
},
|
|
542
|
+
children: /* @__PURE__ */ e(
|
|
543
|
+
c,
|
|
544
|
+
{
|
|
545
|
+
style: {
|
|
546
|
+
position: "absolute",
|
|
547
|
+
width: h,
|
|
548
|
+
height: o,
|
|
549
|
+
backgroundColor: m,
|
|
550
|
+
borderTopLeftRadius: h,
|
|
551
|
+
borderBottomLeftRadius: h
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
}
|
|
556
|
+
);
|
|
557
|
+
return /* @__PURE__ */ p(
|
|
558
|
+
c,
|
|
559
|
+
{
|
|
560
|
+
style: {
|
|
561
|
+
width: o,
|
|
562
|
+
height: o,
|
|
563
|
+
alignItems: "center",
|
|
564
|
+
justifyContent: "center"
|
|
565
|
+
},
|
|
566
|
+
children: [
|
|
567
|
+
/* @__PURE__ */ e(
|
|
568
|
+
c,
|
|
569
|
+
{
|
|
570
|
+
style: {
|
|
571
|
+
position: "absolute",
|
|
572
|
+
width: o,
|
|
573
|
+
height: o,
|
|
574
|
+
borderRadius: o / 2,
|
|
575
|
+
backgroundColor: d
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
l > 0 && y(0),
|
|
580
|
+
l > 180 && y(180),
|
|
581
|
+
l > 0 && l < 180 && /* @__PURE__ */ e(
|
|
582
|
+
c,
|
|
583
|
+
{
|
|
584
|
+
style: {
|
|
585
|
+
position: "absolute",
|
|
586
|
+
width: o,
|
|
587
|
+
height: o,
|
|
588
|
+
transform: [{ rotate: `${l - 180}deg` }]
|
|
589
|
+
},
|
|
590
|
+
children: /* @__PURE__ */ e(
|
|
591
|
+
c,
|
|
592
|
+
{
|
|
593
|
+
style: {
|
|
594
|
+
position: "absolute",
|
|
595
|
+
right: 0,
|
|
596
|
+
width: h,
|
|
597
|
+
height: o,
|
|
598
|
+
backgroundColor: d,
|
|
599
|
+
borderTopRightRadius: h,
|
|
600
|
+
borderBottomRightRadius: h
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
)
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
l >= 180 && l < 360 && /* @__PURE__ */ e(
|
|
607
|
+
c,
|
|
608
|
+
{
|
|
609
|
+
style: {
|
|
610
|
+
position: "absolute",
|
|
611
|
+
width: o,
|
|
612
|
+
height: o,
|
|
613
|
+
transform: [{ rotate: `${l}deg` }]
|
|
614
|
+
},
|
|
615
|
+
children: /* @__PURE__ */ e(
|
|
616
|
+
c,
|
|
617
|
+
{
|
|
618
|
+
style: {
|
|
619
|
+
position: "absolute",
|
|
620
|
+
right: 0,
|
|
621
|
+
width: h,
|
|
622
|
+
height: o,
|
|
623
|
+
backgroundColor: d,
|
|
624
|
+
borderTopRightRadius: h,
|
|
625
|
+
borderBottomRightRadius: h
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
)
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
/* @__PURE__ */ e(
|
|
632
|
+
c,
|
|
633
|
+
{
|
|
634
|
+
style: {
|
|
635
|
+
width: o - r * 2,
|
|
636
|
+
height: o - r * 2,
|
|
637
|
+
borderRadius: (o - r * 2) / 2,
|
|
638
|
+
backgroundColor: n.surface.primary,
|
|
639
|
+
alignItems: "center",
|
|
640
|
+
justifyContent: "center"
|
|
641
|
+
},
|
|
642
|
+
children: t && /* @__PURE__ */ p(g, { style: [u("label.sm"), { color: n.text["high-emphasis"] }], children: [
|
|
643
|
+
Math.round(a),
|
|
644
|
+
"%"
|
|
645
|
+
] })
|
|
646
|
+
}
|
|
647
|
+
)
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
function te({ value: s, max: i = 5, size: o = 20, onChange: r, readOnly: t = !1 }) {
|
|
653
|
+
const { theme: n } = b(), a = n.object.rating, l = n.object["low-emphasis"], d = Math.max(0, Math.min(i, s));
|
|
654
|
+
return /* @__PURE__ */ e(c, { style: { flexDirection: "row", gap: 2 }, children: Array.from({ length: i }).map((m, h) => {
|
|
655
|
+
const y = h + 1 <= d, x = !y && h + 0.5 <= d, w = /* @__PURE__ */ e(
|
|
656
|
+
g,
|
|
657
|
+
{
|
|
658
|
+
style: {
|
|
659
|
+
fontSize: o,
|
|
660
|
+
color: y || x ? a : l,
|
|
661
|
+
opacity: x ? 0.5 : 1
|
|
662
|
+
},
|
|
663
|
+
children: x || y ? "★" : "☆"
|
|
664
|
+
}
|
|
665
|
+
);
|
|
666
|
+
return t || !r ? /* @__PURE__ */ e(c, { children: w }, h) : /* @__PURE__ */ e(f, { onPress: () => r(h + 1), hitSlop: 8, children: w }, h);
|
|
667
|
+
}) });
|
|
668
|
+
}
|
|
669
|
+
function Tt({ count: s = 0, max: i = 99, dot: o = !1, children: r }) {
|
|
670
|
+
const { theme: t, scales: n } = b();
|
|
671
|
+
return r ? /* @__PURE__ */ p(c, { style: { position: "relative" }, children: [
|
|
672
|
+
r,
|
|
673
|
+
(o || s > 0) && /* @__PURE__ */ e(
|
|
674
|
+
c,
|
|
675
|
+
{
|
|
676
|
+
style: {
|
|
677
|
+
position: "absolute",
|
|
678
|
+
top: -4,
|
|
679
|
+
right: -4,
|
|
680
|
+
...o ? { width: 8, height: 8, borderRadius: 4 } : {
|
|
681
|
+
minWidth: 18,
|
|
682
|
+
paddingHorizontal: 6,
|
|
683
|
+
height: 18,
|
|
684
|
+
borderRadius: n.borderRadius.full,
|
|
685
|
+
alignItems: "center",
|
|
686
|
+
justifyContent: "center"
|
|
687
|
+
},
|
|
688
|
+
backgroundColor: t.caution.base,
|
|
689
|
+
borderWidth: 2,
|
|
690
|
+
borderColor: t.surface.primary
|
|
691
|
+
},
|
|
692
|
+
children: !o && /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: t.text["on-inverse"] }], children: s > i ? `${i}+` : s })
|
|
693
|
+
}
|
|
694
|
+
)
|
|
695
|
+
] }) : o ? /* @__PURE__ */ e(
|
|
696
|
+
c,
|
|
697
|
+
{
|
|
698
|
+
style: {
|
|
699
|
+
width: 8,
|
|
700
|
+
height: 8,
|
|
701
|
+
borderRadius: 4,
|
|
702
|
+
backgroundColor: t.caution.base
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
) : /* @__PURE__ */ e(
|
|
706
|
+
c,
|
|
707
|
+
{
|
|
708
|
+
style: {
|
|
709
|
+
minWidth: 18,
|
|
710
|
+
paddingHorizontal: 6,
|
|
711
|
+
height: 18,
|
|
712
|
+
borderRadius: n.borderRadius.full,
|
|
713
|
+
backgroundColor: t.caution.base,
|
|
714
|
+
alignItems: "center",
|
|
715
|
+
justifyContent: "center"
|
|
716
|
+
},
|
|
717
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: t.text["on-inverse"] }], children: s > i ? `${i}+` : s })
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
function Pt({ label: s, value: i, delta: o, trend: r = "neutral" }) {
|
|
722
|
+
const { theme: t, scales: n } = b(), a = r === "up" ? t.text.success : r === "down" ? t.text.caution : t.text["low-emphasis"];
|
|
723
|
+
return /* @__PURE__ */ p(
|
|
724
|
+
c,
|
|
725
|
+
{
|
|
726
|
+
style: {
|
|
727
|
+
backgroundColor: t.surface.primary,
|
|
728
|
+
borderColor: t.border["low-emphasis"],
|
|
729
|
+
borderWidth: 1,
|
|
730
|
+
borderRadius: n.borderRadius.lg,
|
|
731
|
+
padding: n.spacing.scale[4],
|
|
732
|
+
gap: n.spacing.scale[1]
|
|
733
|
+
},
|
|
734
|
+
children: [
|
|
735
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["low-emphasis"] }], children: s }),
|
|
736
|
+
/* @__PURE__ */ e(g, { style: [u("heading.2xl"), { color: t.text["high-emphasis"] }], children: i }),
|
|
737
|
+
o && /* @__PURE__ */ p(g, { style: [u("label.sm"), { color: a }], children: [
|
|
738
|
+
r === "up" ? "▲" : r === "down" ? "▼" : "■",
|
|
739
|
+
" ",
|
|
740
|
+
o
|
|
741
|
+
] })
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
function Wt({ status: s, label: i }) {
|
|
747
|
+
const { theme: o, scales: r } = b(), t = {
|
|
748
|
+
synced: { bg: o.surface.success, fg: o.text.success, dot: o.success.base, def: "同期済み" },
|
|
749
|
+
syncing: { bg: o.surface.info, fg: o.text.info, dot: o.info.base, def: "同期中" },
|
|
750
|
+
offline: {
|
|
751
|
+
bg: o.surface.tertiary,
|
|
752
|
+
fg: o.text["medium-emphasis"],
|
|
753
|
+
dot: o.text["low-emphasis"],
|
|
754
|
+
def: "オフライン"
|
|
755
|
+
},
|
|
756
|
+
error: { bg: o.surface.caution, fg: o.text.caution, dot: o.caution.base, def: "エラー" }
|
|
757
|
+
}[s];
|
|
758
|
+
return /* @__PURE__ */ p(
|
|
759
|
+
c,
|
|
760
|
+
{
|
|
761
|
+
style: {
|
|
762
|
+
flexDirection: "row",
|
|
763
|
+
alignItems: "center",
|
|
764
|
+
gap: r.spacing.scale[1],
|
|
765
|
+
backgroundColor: t.bg,
|
|
766
|
+
borderRadius: r.borderRadius.full,
|
|
767
|
+
paddingHorizontal: r.spacing.scale[2],
|
|
768
|
+
paddingVertical: r.spacing.scale[1],
|
|
769
|
+
alignSelf: "flex-start"
|
|
770
|
+
},
|
|
771
|
+
children: [
|
|
772
|
+
s === "syncing" ? /* @__PURE__ */ e(fe, { size: "small", color: t.fg }) : /* @__PURE__ */ e(
|
|
773
|
+
c,
|
|
774
|
+
{
|
|
775
|
+
style: {
|
|
776
|
+
width: 6,
|
|
777
|
+
height: 6,
|
|
778
|
+
borderRadius: 3,
|
|
779
|
+
backgroundColor: t.dot
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ e(g, { style: [u("label.xs"), { color: t.fg }], children: i ?? t.def })
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
function Le(s) {
|
|
789
|
+
return s.toString().padStart(2, "0");
|
|
790
|
+
}
|
|
791
|
+
function Ht({ target: s, onComplete: i, tone: o = "neutral" }) {
|
|
792
|
+
const { theme: r, scales: t } = b(), n = s instanceof Date ? s.getTime() : s, [a, l] = S(() => Date.now());
|
|
793
|
+
_(() => {
|
|
794
|
+
const v = setInterval(() => {
|
|
795
|
+
const k = Date.now();
|
|
796
|
+
l(k), k >= n && (clearInterval(v), i?.());
|
|
797
|
+
}, 1e3);
|
|
798
|
+
return () => clearInterval(v);
|
|
799
|
+
}, [n, i]);
|
|
800
|
+
const d = Math.max(0, n - a), m = Math.floor(d / 1e3), h = Math.floor(m / 86400), y = Math.floor(m % 86400 / 3600), x = Math.floor(m % 3600 / 60), C = m % 60, R = o === "accent" ? r.text["accent-primary"] : o === "caution" ? r.text.caution : r.text["high-emphasis"], w = (v, k) => /* @__PURE__ */ p(c, { style: { alignItems: "center", minWidth: 48 }, children: [
|
|
801
|
+
/* @__PURE__ */ e(
|
|
802
|
+
c,
|
|
803
|
+
{
|
|
804
|
+
style: {
|
|
805
|
+
backgroundColor: r.surface.secondary,
|
|
806
|
+
paddingVertical: t.spacing.scale[1],
|
|
807
|
+
paddingHorizontal: t.spacing.scale[2],
|
|
808
|
+
borderRadius: t.borderRadius.md
|
|
809
|
+
},
|
|
810
|
+
children: /* @__PURE__ */ e(g, { style: [u("heading.md"), { color: R }], children: Le(v) })
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
/* @__PURE__ */ e(g, { style: [u("label.xs"), { color: r.text["low-emphasis"], marginTop: 2 }], children: k })
|
|
814
|
+
] });
|
|
815
|
+
return /* @__PURE__ */ p(c, { style: { flexDirection: "row", gap: t.spacing.scale[2] }, children: [
|
|
816
|
+
h > 0 && w(h, "日"),
|
|
817
|
+
w(y, "時間"),
|
|
818
|
+
w(x, "分"),
|
|
819
|
+
w(C, "秒")
|
|
820
|
+
] });
|
|
821
|
+
}
|
|
822
|
+
function $e({ required: s, children: i, style: o, ...r }) {
|
|
823
|
+
const { theme: t, scales: n } = b();
|
|
824
|
+
return /* @__PURE__ */ p(
|
|
825
|
+
c,
|
|
826
|
+
{
|
|
827
|
+
style: [{ flexDirection: "row", alignItems: "center", gap: n.spacing.scale[1] }, o],
|
|
828
|
+
...r,
|
|
829
|
+
children: [
|
|
830
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: t.text["high-emphasis"] }], children: i }),
|
|
831
|
+
s && /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.caution.base }], children: "*" })
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
function Ce({ invalid: s, disabled: i, leading: o, trailing: r, ...t }) {
|
|
837
|
+
const { theme: n, scales: a } = b(), [l, d] = S(!1), m = s ? n.border.caution : l ? n.border["accent-primary"] : n.border["medium-emphasis"];
|
|
838
|
+
return /* @__PURE__ */ p(
|
|
839
|
+
c,
|
|
840
|
+
{
|
|
841
|
+
style: {
|
|
842
|
+
flexDirection: "row",
|
|
843
|
+
alignItems: "center",
|
|
844
|
+
gap: a.spacing.scale[2],
|
|
845
|
+
minHeight: a.touchTargets.textInput.min,
|
|
846
|
+
paddingHorizontal: a.spacing.scale[3],
|
|
847
|
+
borderRadius: a.borderRadius.md,
|
|
848
|
+
borderWidth: 1,
|
|
849
|
+
borderColor: m,
|
|
850
|
+
backgroundColor: i ? n.surface.disable : n.surface.primary,
|
|
851
|
+
opacity: i ? 0.6 : 1
|
|
852
|
+
},
|
|
853
|
+
children: [
|
|
854
|
+
o,
|
|
855
|
+
/* @__PURE__ */ e(
|
|
856
|
+
G,
|
|
857
|
+
{
|
|
858
|
+
editable: !i,
|
|
859
|
+
onFocus: (h) => {
|
|
860
|
+
d(!0), t.onFocus?.(h);
|
|
861
|
+
},
|
|
862
|
+
onBlur: (h) => {
|
|
863
|
+
d(!1), t.onBlur?.(h);
|
|
864
|
+
},
|
|
865
|
+
placeholderTextColor: n.text["low-emphasis"],
|
|
866
|
+
style: [
|
|
867
|
+
u("body.md"),
|
|
868
|
+
{ flex: 1, color: n.text["high-emphasis"], paddingVertical: 0 }
|
|
869
|
+
],
|
|
870
|
+
...t
|
|
871
|
+
}
|
|
872
|
+
),
|
|
873
|
+
r
|
|
874
|
+
]
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
function _e({ invalid: s, disabled: i, minHeight: o = 96, ...r }) {
|
|
879
|
+
const { theme: t, scales: n } = b(), [a, l] = S(!1), d = s ? t.border.caution : a ? t.border["accent-primary"] : t.border["medium-emphasis"];
|
|
880
|
+
return /* @__PURE__ */ e(
|
|
881
|
+
G,
|
|
882
|
+
{
|
|
883
|
+
editable: !i,
|
|
884
|
+
multiline: !0,
|
|
885
|
+
textAlignVertical: "top",
|
|
886
|
+
onFocus: (m) => {
|
|
887
|
+
l(!0), r.onFocus?.(m);
|
|
888
|
+
},
|
|
889
|
+
onBlur: (m) => {
|
|
890
|
+
l(!1), r.onBlur?.(m);
|
|
891
|
+
},
|
|
892
|
+
placeholderTextColor: t.text["low-emphasis"],
|
|
893
|
+
style: [
|
|
894
|
+
u("body.md"),
|
|
895
|
+
{
|
|
896
|
+
minHeight: o,
|
|
897
|
+
padding: n.spacing.scale[3],
|
|
898
|
+
borderRadius: n.borderRadius.md,
|
|
899
|
+
borderWidth: 1,
|
|
900
|
+
borderColor: d,
|
|
901
|
+
backgroundColor: i ? t.surface.disable : t.surface.primary,
|
|
902
|
+
color: t.text["high-emphasis"],
|
|
903
|
+
opacity: i ? 0.6 : 1
|
|
904
|
+
}
|
|
905
|
+
],
|
|
906
|
+
...r
|
|
907
|
+
}
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
function Mt({
|
|
911
|
+
invalid: s,
|
|
912
|
+
disabled: i,
|
|
913
|
+
minHeight: o = 44,
|
|
914
|
+
maxHeight: r = 200,
|
|
915
|
+
...t
|
|
916
|
+
}) {
|
|
917
|
+
const { theme: n, scales: a } = b(), [l, d] = S(!1), [m, h] = S(o), y = s ? n.border.caution : l ? n.border["accent-primary"] : n.border["medium-emphasis"];
|
|
918
|
+
return /* @__PURE__ */ e(
|
|
919
|
+
G,
|
|
920
|
+
{
|
|
921
|
+
editable: !i,
|
|
922
|
+
multiline: !0,
|
|
923
|
+
textAlignVertical: "top",
|
|
924
|
+
onContentSizeChange: (C) => {
|
|
925
|
+
const R = Math.min(r, Math.max(o, C.nativeEvent.contentSize.height + 16));
|
|
926
|
+
h(R);
|
|
927
|
+
},
|
|
928
|
+
onFocus: (C) => {
|
|
929
|
+
d(!0), t.onFocus?.(C);
|
|
930
|
+
},
|
|
931
|
+
onBlur: (C) => {
|
|
932
|
+
d(!1), t.onBlur?.(C);
|
|
933
|
+
},
|
|
934
|
+
placeholderTextColor: n.text["low-emphasis"],
|
|
935
|
+
style: [
|
|
936
|
+
u("body.md"),
|
|
937
|
+
{
|
|
938
|
+
height: m,
|
|
939
|
+
padding: a.spacing.scale[3],
|
|
940
|
+
borderRadius: a.borderRadius.md,
|
|
941
|
+
borderWidth: 1,
|
|
942
|
+
borderColor: y,
|
|
943
|
+
backgroundColor: i ? n.surface.disable : n.surface.primary,
|
|
944
|
+
color: n.text["high-emphasis"],
|
|
945
|
+
opacity: i ? 0.6 : 1
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
...t
|
|
949
|
+
}
|
|
950
|
+
);
|
|
951
|
+
}
|
|
952
|
+
function zt(s) {
|
|
953
|
+
const { theme: i } = b();
|
|
954
|
+
return /* @__PURE__ */ e(
|
|
955
|
+
Pe,
|
|
956
|
+
{
|
|
957
|
+
trackColor: { false: i.surface.tertiary, true: i.brand.primary },
|
|
958
|
+
thumbColor: i.surface.primary,
|
|
959
|
+
ios_backgroundColor: i.surface.tertiary,
|
|
960
|
+
...s
|
|
961
|
+
}
|
|
962
|
+
);
|
|
963
|
+
}
|
|
964
|
+
function ie({ checked: s = !1, onChange: i, disabled: o = !1, size: r = 20 }) {
|
|
965
|
+
const { theme: t, scales: n } = b();
|
|
966
|
+
return /* @__PURE__ */ e(
|
|
967
|
+
f,
|
|
968
|
+
{
|
|
969
|
+
onPress: () => !o && i?.(!s),
|
|
970
|
+
disabled: o,
|
|
971
|
+
hitSlop: 8,
|
|
972
|
+
accessibilityRole: "checkbox",
|
|
973
|
+
accessibilityState: { checked: s, disabled: o },
|
|
974
|
+
style: {
|
|
975
|
+
width: r,
|
|
976
|
+
height: r,
|
|
977
|
+
borderRadius: n.borderRadius.sm,
|
|
978
|
+
borderWidth: 2,
|
|
979
|
+
borderColor: s ? t.brand.primary : t.border["medium-emphasis"],
|
|
980
|
+
backgroundColor: s ? t.brand.primary : "transparent",
|
|
981
|
+
alignItems: "center",
|
|
982
|
+
justifyContent: "center",
|
|
983
|
+
opacity: o ? 0.4 : 1
|
|
984
|
+
},
|
|
985
|
+
children: s && /* @__PURE__ */ e(
|
|
986
|
+
c,
|
|
987
|
+
{
|
|
988
|
+
style: {
|
|
989
|
+
width: r * 0.5,
|
|
990
|
+
height: r * 0.25,
|
|
991
|
+
borderLeftWidth: 2,
|
|
992
|
+
borderBottomWidth: 2,
|
|
993
|
+
borderColor: t.text["on-inverse"],
|
|
994
|
+
transform: [{ rotate: "-45deg" }, { translateY: -1 }]
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
)
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
function Ne({
|
|
1002
|
+
checked: s = !1,
|
|
1003
|
+
onChange: i,
|
|
1004
|
+
disabled: o = !1,
|
|
1005
|
+
label: r,
|
|
1006
|
+
description: t
|
|
1007
|
+
}) {
|
|
1008
|
+
const { theme: n, scales: a } = b();
|
|
1009
|
+
return /* @__PURE__ */ p(
|
|
1010
|
+
f,
|
|
1011
|
+
{
|
|
1012
|
+
onPress: () => !o && i?.(!s),
|
|
1013
|
+
disabled: o,
|
|
1014
|
+
style: {
|
|
1015
|
+
flexDirection: "row",
|
|
1016
|
+
gap: a.spacing.scale[2],
|
|
1017
|
+
alignItems: "flex-start",
|
|
1018
|
+
opacity: o ? 0.6 : 1
|
|
1019
|
+
},
|
|
1020
|
+
children: [
|
|
1021
|
+
/* @__PURE__ */ e(c, { style: { paddingTop: 2 }, children: /* @__PURE__ */ e(ie, { checked: s, disabled: o, onChange: i }) }),
|
|
1022
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 2 }, children: [
|
|
1023
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: n.text["high-emphasis"] }], children: r }),
|
|
1024
|
+
t && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: n.text["medium-emphasis"] }], children: t })
|
|
1025
|
+
] })
|
|
1026
|
+
]
|
|
1027
|
+
}
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
function Vt({
|
|
1031
|
+
checked: s = !1,
|
|
1032
|
+
onChange: i,
|
|
1033
|
+
disabled: o = !1,
|
|
1034
|
+
title: r,
|
|
1035
|
+
description: t
|
|
1036
|
+
}) {
|
|
1037
|
+
const { theme: n, scales: a } = b();
|
|
1038
|
+
return /* @__PURE__ */ p(
|
|
1039
|
+
f,
|
|
1040
|
+
{
|
|
1041
|
+
onPress: () => !o && i?.(!s),
|
|
1042
|
+
disabled: o,
|
|
1043
|
+
style: {
|
|
1044
|
+
flexDirection: "row",
|
|
1045
|
+
gap: a.spacing.scale[3],
|
|
1046
|
+
alignItems: "flex-start",
|
|
1047
|
+
padding: a.spacing.scale[4],
|
|
1048
|
+
borderRadius: a.borderRadius.lg,
|
|
1049
|
+
borderWidth: 1,
|
|
1050
|
+
borderColor: s ? n.border["accent-primary"] : n.border["low-emphasis"],
|
|
1051
|
+
backgroundColor: s ? n.surface["accent-primary-light"] : n.surface.primary,
|
|
1052
|
+
opacity: o ? 0.6 : 1
|
|
1053
|
+
},
|
|
1054
|
+
children: [
|
|
1055
|
+
/* @__PURE__ */ e(c, { style: { paddingTop: 2 }, children: /* @__PURE__ */ e(ie, { checked: s, disabled: o, onChange: i }) }),
|
|
1056
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 2 }, children: [
|
|
1057
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: n.text["high-emphasis"] }], children: r }),
|
|
1058
|
+
t && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: n.text["medium-emphasis"] }], children: t })
|
|
1059
|
+
] })
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1064
|
+
function jt({ options: s, values: i = [], onChange: o, disabled: r = !1 }) {
|
|
1065
|
+
const { scales: t } = b(), n = (a) => {
|
|
1066
|
+
i.includes(a) ? o?.(i.filter((l) => l !== a)) : o?.([...i, a]);
|
|
1067
|
+
};
|
|
1068
|
+
return /* @__PURE__ */ e(c, { style: { gap: t.spacing.scale[3] }, children: s.map((a) => /* @__PURE__ */ e(
|
|
1069
|
+
Ne,
|
|
1070
|
+
{
|
|
1071
|
+
label: a.label,
|
|
1072
|
+
description: a.description,
|
|
1073
|
+
checked: i.includes(a.value),
|
|
1074
|
+
disabled: r,
|
|
1075
|
+
onChange: () => n(a.value)
|
|
1076
|
+
},
|
|
1077
|
+
a.value
|
|
1078
|
+
)) });
|
|
1079
|
+
}
|
|
1080
|
+
function Bt({ options: s, value: i, onChange: o, disabled: r = !1 }) {
|
|
1081
|
+
const { theme: t, scales: n } = b();
|
|
1082
|
+
return /* @__PURE__ */ e(c, { style: { gap: n.spacing.scale[3] }, children: s.map((a) => {
|
|
1083
|
+
const l = i === a.value, d = r || a.disabled;
|
|
1084
|
+
return /* @__PURE__ */ p(
|
|
1085
|
+
f,
|
|
1086
|
+
{
|
|
1087
|
+
onPress: () => !d && o?.(a.value),
|
|
1088
|
+
disabled: d,
|
|
1089
|
+
style: {
|
|
1090
|
+
flexDirection: "row",
|
|
1091
|
+
gap: n.spacing.scale[2],
|
|
1092
|
+
alignItems: "flex-start",
|
|
1093
|
+
opacity: d ? 0.5 : 1
|
|
1094
|
+
},
|
|
1095
|
+
accessibilityRole: "radio",
|
|
1096
|
+
accessibilityState: { selected: l },
|
|
1097
|
+
children: [
|
|
1098
|
+
/* @__PURE__ */ e(
|
|
1099
|
+
c,
|
|
1100
|
+
{
|
|
1101
|
+
style: {
|
|
1102
|
+
width: 20,
|
|
1103
|
+
height: 20,
|
|
1104
|
+
borderRadius: 10,
|
|
1105
|
+
borderWidth: 2,
|
|
1106
|
+
borderColor: l ? t.brand.primary : t.border["medium-emphasis"],
|
|
1107
|
+
alignItems: "center",
|
|
1108
|
+
justifyContent: "center",
|
|
1109
|
+
marginTop: 2
|
|
1110
|
+
},
|
|
1111
|
+
children: l && /* @__PURE__ */ e(
|
|
1112
|
+
c,
|
|
1113
|
+
{
|
|
1114
|
+
style: {
|
|
1115
|
+
width: 10,
|
|
1116
|
+
height: 10,
|
|
1117
|
+
borderRadius: 5,
|
|
1118
|
+
backgroundColor: t.brand.primary
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
)
|
|
1122
|
+
}
|
|
1123
|
+
),
|
|
1124
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 2 }, children: [
|
|
1125
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: t.text["high-emphasis"] }], children: a.label }),
|
|
1126
|
+
a.description && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: t.text["medium-emphasis"] }], children: a.description })
|
|
1127
|
+
] })
|
|
1128
|
+
]
|
|
1129
|
+
},
|
|
1130
|
+
a.value
|
|
1131
|
+
);
|
|
1132
|
+
}) });
|
|
1133
|
+
}
|
|
1134
|
+
function Ft({
|
|
1135
|
+
value: s,
|
|
1136
|
+
onChange: i,
|
|
1137
|
+
min: o = 0,
|
|
1138
|
+
max: r = 100,
|
|
1139
|
+
step: t = 1,
|
|
1140
|
+
disabled: n = !1
|
|
1141
|
+
}) {
|
|
1142
|
+
const { theme: a, scales: l } = b(), [d, m] = S(0), h = P(0), y = (k) => Math.max(o, Math.min(r, k)), x = (k) => t ? Math.round(k / t) * t : k, C = (k) => {
|
|
1143
|
+
if (!h.current) return;
|
|
1144
|
+
const D = Math.max(0, Math.min(1, k / h.current)), A = y(x(o + (r - o) * D));
|
|
1145
|
+
i?.(A);
|
|
1146
|
+
}, R = P(
|
|
1147
|
+
ae.create({
|
|
1148
|
+
onStartShouldSetPanResponder: () => !n,
|
|
1149
|
+
onMoveShouldSetPanResponder: () => !n,
|
|
1150
|
+
onPanResponderGrant: (k) => C(k.nativeEvent.locationX),
|
|
1151
|
+
onPanResponderMove: (k) => C(k.nativeEvent.locationX)
|
|
1152
|
+
})
|
|
1153
|
+
).current, w = (y(s) - o) / (r - o);
|
|
1154
|
+
return /* @__PURE__ */ p(
|
|
1155
|
+
c,
|
|
1156
|
+
{
|
|
1157
|
+
onLayout: (k) => {
|
|
1158
|
+
const D = k.nativeEvent.layout.width;
|
|
1159
|
+
m(D), h.current = D;
|
|
1160
|
+
},
|
|
1161
|
+
...R.panHandlers,
|
|
1162
|
+
style: {
|
|
1163
|
+
height: 32,
|
|
1164
|
+
justifyContent: "center",
|
|
1165
|
+
opacity: n ? 0.5 : 1
|
|
1166
|
+
},
|
|
1167
|
+
children: [
|
|
1168
|
+
/* @__PURE__ */ e(
|
|
1169
|
+
c,
|
|
1170
|
+
{
|
|
1171
|
+
style: {
|
|
1172
|
+
height: 6,
|
|
1173
|
+
borderRadius: l.borderRadius.full,
|
|
1174
|
+
backgroundColor: a.surface.tertiary
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
),
|
|
1178
|
+
/* @__PURE__ */ e(
|
|
1179
|
+
c,
|
|
1180
|
+
{
|
|
1181
|
+
style: {
|
|
1182
|
+
position: "absolute",
|
|
1183
|
+
left: 0,
|
|
1184
|
+
height: 6,
|
|
1185
|
+
width: d * w,
|
|
1186
|
+
borderRadius: l.borderRadius.full,
|
|
1187
|
+
backgroundColor: a.brand.primary
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
),
|
|
1191
|
+
/* @__PURE__ */ e(
|
|
1192
|
+
c,
|
|
1193
|
+
{
|
|
1194
|
+
style: {
|
|
1195
|
+
position: "absolute",
|
|
1196
|
+
left: d * w - 10,
|
|
1197
|
+
width: 20,
|
|
1198
|
+
height: 20,
|
|
1199
|
+
borderRadius: 10,
|
|
1200
|
+
backgroundColor: a.brand.primary,
|
|
1201
|
+
borderWidth: 2,
|
|
1202
|
+
borderColor: a.surface.primary
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
)
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
);
|
|
1209
|
+
}
|
|
1210
|
+
function Ye({
|
|
1211
|
+
value: s,
|
|
1212
|
+
onChange: i,
|
|
1213
|
+
min: o = 0,
|
|
1214
|
+
max: r = 99,
|
|
1215
|
+
step: t = 1,
|
|
1216
|
+
disabled: n = !1
|
|
1217
|
+
}) {
|
|
1218
|
+
const { theme: a, scales: l } = b(), d = (y) => Math.max(o, Math.min(r, y)), m = () => !n && i?.(d(s + t)), h = () => !n && i?.(d(s - t));
|
|
1219
|
+
return /* @__PURE__ */ p(
|
|
1220
|
+
c,
|
|
1221
|
+
{
|
|
1222
|
+
style: {
|
|
1223
|
+
flexDirection: "row",
|
|
1224
|
+
alignItems: "center",
|
|
1225
|
+
borderWidth: 1,
|
|
1226
|
+
borderColor: a.border["medium-emphasis"],
|
|
1227
|
+
borderRadius: l.borderRadius.md,
|
|
1228
|
+
backgroundColor: a.surface.primary,
|
|
1229
|
+
overflow: "hidden",
|
|
1230
|
+
alignSelf: "flex-start",
|
|
1231
|
+
opacity: n ? 0.5 : 1
|
|
1232
|
+
},
|
|
1233
|
+
children: [
|
|
1234
|
+
/* @__PURE__ */ e(
|
|
1235
|
+
f,
|
|
1236
|
+
{
|
|
1237
|
+
onPress: h,
|
|
1238
|
+
disabled: n || s <= o,
|
|
1239
|
+
style: ({ pressed: y }) => ({
|
|
1240
|
+
width: 40,
|
|
1241
|
+
height: 44,
|
|
1242
|
+
alignItems: "center",
|
|
1243
|
+
justifyContent: "center",
|
|
1244
|
+
backgroundColor: y ? a.active["tertiary-button"] : "transparent"
|
|
1245
|
+
}),
|
|
1246
|
+
children: /* @__PURE__ */ e(g, { style: [u("heading.md"), { color: a.text["high-emphasis"] }], children: "−" })
|
|
1247
|
+
}
|
|
1248
|
+
),
|
|
1249
|
+
/* @__PURE__ */ e(
|
|
1250
|
+
G,
|
|
1251
|
+
{
|
|
1252
|
+
value: String(s),
|
|
1253
|
+
onChangeText: (y) => {
|
|
1254
|
+
const x = Number(y.replace(/[^0-9-]/g, ""));
|
|
1255
|
+
Number.isNaN(x) || i?.(d(x));
|
|
1256
|
+
},
|
|
1257
|
+
keyboardType: "number-pad",
|
|
1258
|
+
editable: !n,
|
|
1259
|
+
style: [
|
|
1260
|
+
u("body.md"),
|
|
1261
|
+
{
|
|
1262
|
+
width: 56,
|
|
1263
|
+
textAlign: "center",
|
|
1264
|
+
color: a.text["high-emphasis"],
|
|
1265
|
+
paddingVertical: 0,
|
|
1266
|
+
borderLeftWidth: 1,
|
|
1267
|
+
borderRightWidth: 1,
|
|
1268
|
+
borderColor: a.border["low-emphasis"]
|
|
1269
|
+
}
|
|
1270
|
+
]
|
|
1271
|
+
}
|
|
1272
|
+
),
|
|
1273
|
+
/* @__PURE__ */ e(
|
|
1274
|
+
f,
|
|
1275
|
+
{
|
|
1276
|
+
onPress: m,
|
|
1277
|
+
disabled: n || s >= r,
|
|
1278
|
+
style: ({ pressed: y }) => ({
|
|
1279
|
+
width: 40,
|
|
1280
|
+
height: 44,
|
|
1281
|
+
alignItems: "center",
|
|
1282
|
+
justifyContent: "center",
|
|
1283
|
+
backgroundColor: y ? a.active["tertiary-button"] : "transparent"
|
|
1284
|
+
}),
|
|
1285
|
+
children: /* @__PURE__ */ e(g, { style: [u("heading.md"), { color: a.text["high-emphasis"] }], children: "+" })
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
]
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
function Ot({ label: s, required: i, description: o, error: r, children: t }) {
|
|
1293
|
+
const { theme: n, scales: a } = b();
|
|
1294
|
+
return /* @__PURE__ */ p(c, { style: { gap: a.spacing.scale[2] }, children: [
|
|
1295
|
+
s && /* @__PURE__ */ e($e, { required: i, children: s }),
|
|
1296
|
+
o && !r && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: n.text["medium-emphasis"] }], children: o }),
|
|
1297
|
+
t,
|
|
1298
|
+
r && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: n.text.caution }], children: r })
|
|
1299
|
+
] });
|
|
1300
|
+
}
|
|
1301
|
+
function At({ tone: s = "info", title: i, description: o, children: r }) {
|
|
1302
|
+
const { theme: t, scales: n } = b(), a = {
|
|
1303
|
+
info: { bg: t.surface.info, fg: t.text.info, border: t.border.info },
|
|
1304
|
+
success: { bg: t.surface.success, fg: t.text.success, border: t.border.success },
|
|
1305
|
+
warning: { bg: t.surface.warning, fg: t.text.warning, border: t.border.warning },
|
|
1306
|
+
caution: { bg: t.surface.caution, fg: t.text.caution, border: t.border.caution }
|
|
1307
|
+
}[s];
|
|
1308
|
+
return /* @__PURE__ */ p(
|
|
1309
|
+
c,
|
|
1310
|
+
{
|
|
1311
|
+
style: {
|
|
1312
|
+
backgroundColor: a.bg,
|
|
1313
|
+
borderColor: a.border,
|
|
1314
|
+
borderLeftWidth: 4,
|
|
1315
|
+
borderRadius: n.borderRadius.md,
|
|
1316
|
+
padding: n.spacing.scale[3],
|
|
1317
|
+
gap: n.spacing.scale[1]
|
|
1318
|
+
},
|
|
1319
|
+
children: [
|
|
1320
|
+
i && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: a.fg }], children: i }),
|
|
1321
|
+
o && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: t.text["high-emphasis"] }], children: o }),
|
|
1322
|
+
r
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
function Re({
|
|
1328
|
+
open: s,
|
|
1329
|
+
onClose: i,
|
|
1330
|
+
title: o,
|
|
1331
|
+
description: r,
|
|
1332
|
+
footer: t,
|
|
1333
|
+
children: n,
|
|
1334
|
+
dismissOnBackdrop: a = !0
|
|
1335
|
+
}) {
|
|
1336
|
+
const { theme: l, scales: d } = b();
|
|
1337
|
+
return /* @__PURE__ */ e(K, { visible: s, transparent: !0, animationType: "fade", onRequestClose: i, children: /* @__PURE__ */ e(
|
|
1338
|
+
f,
|
|
1339
|
+
{
|
|
1340
|
+
onPress: () => a && i(),
|
|
1341
|
+
style: {
|
|
1342
|
+
flex: 1,
|
|
1343
|
+
backgroundColor: l.overlay.dark,
|
|
1344
|
+
alignItems: "center",
|
|
1345
|
+
justifyContent: "center",
|
|
1346
|
+
padding: d.spacing.scale[4]
|
|
1347
|
+
},
|
|
1348
|
+
children: /* @__PURE__ */ p(
|
|
1349
|
+
f,
|
|
1350
|
+
{
|
|
1351
|
+
onPress: () => {
|
|
1352
|
+
},
|
|
1353
|
+
style: {
|
|
1354
|
+
width: "100%",
|
|
1355
|
+
maxWidth: 480,
|
|
1356
|
+
backgroundColor: l.surface.primary,
|
|
1357
|
+
borderRadius: d.borderRadius["2xl"],
|
|
1358
|
+
padding: d.spacing.scale[5],
|
|
1359
|
+
gap: d.spacing.scale[3]
|
|
1360
|
+
},
|
|
1361
|
+
children: [
|
|
1362
|
+
o && /* @__PURE__ */ e(g, { style: [u("heading.lg"), { color: l.text["high-emphasis"] }], children: o }),
|
|
1363
|
+
r && /* @__PURE__ */ e(g, { style: [u("body.md"), { color: l.text["medium-emphasis"] }], children: r }),
|
|
1364
|
+
n,
|
|
1365
|
+
t && /* @__PURE__ */ e(c, { style: { flexDirection: "row", justifyContent: "flex-end", gap: d.spacing.scale[2] }, children: t })
|
|
1366
|
+
]
|
|
1367
|
+
}
|
|
1368
|
+
)
|
|
1369
|
+
}
|
|
1370
|
+
) });
|
|
1371
|
+
}
|
|
1372
|
+
function qe({
|
|
1373
|
+
open: s,
|
|
1374
|
+
onClose: i,
|
|
1375
|
+
title: o,
|
|
1376
|
+
description: r,
|
|
1377
|
+
confirmLabel: t = "OK",
|
|
1378
|
+
cancelLabel: n = "キャンセル",
|
|
1379
|
+
onConfirm: a,
|
|
1380
|
+
destructive: l = !1
|
|
1381
|
+
}) {
|
|
1382
|
+
const { scales: d } = b();
|
|
1383
|
+
return /* @__PURE__ */ e(
|
|
1384
|
+
Re,
|
|
1385
|
+
{
|
|
1386
|
+
open: s,
|
|
1387
|
+
onClose: i,
|
|
1388
|
+
title: o,
|
|
1389
|
+
description: r,
|
|
1390
|
+
dismissOnBackdrop: !1,
|
|
1391
|
+
footer: /* @__PURE__ */ p(F, { children: [
|
|
1392
|
+
/* @__PURE__ */ e(c, { style: { minWidth: 100 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: i, children: n }) }),
|
|
1393
|
+
/* @__PURE__ */ e(c, { style: { minWidth: 100 }, children: /* @__PURE__ */ e(
|
|
1394
|
+
z,
|
|
1395
|
+
{
|
|
1396
|
+
variant: l ? "destructive" : "primary",
|
|
1397
|
+
onPress: () => {
|
|
1398
|
+
a?.(), i();
|
|
1399
|
+
},
|
|
1400
|
+
children: t
|
|
1401
|
+
}
|
|
1402
|
+
) })
|
|
1403
|
+
] })
|
|
1404
|
+
}
|
|
1405
|
+
);
|
|
1406
|
+
}
|
|
1407
|
+
function j(s) {
|
|
1408
|
+
const { side: i = "bottom", snapPoints: o } = s;
|
|
1409
|
+
return o && o.length > 0 && i === "bottom" ? /* @__PURE__ */ e(Ge, { ...s }) : /* @__PURE__ */ e(Xe, { ...s });
|
|
1410
|
+
}
|
|
1411
|
+
function Xe({ open: s, onClose: i, side: o = "bottom", title: r, children: t }) {
|
|
1412
|
+
const { theme: n, scales: a } = b(), l = P(new I.Value(0)).current;
|
|
1413
|
+
_(() => {
|
|
1414
|
+
I.timing(l, {
|
|
1415
|
+
toValue: s ? 1 : 0,
|
|
1416
|
+
duration: 220,
|
|
1417
|
+
useNativeDriver: !0
|
|
1418
|
+
}).start();
|
|
1419
|
+
}, [s, l]);
|
|
1420
|
+
const { width: d, height: m } = E.get("window"), h = {
|
|
1421
|
+
bottom: { translateY: l.interpolate({ inputRange: [0, 1], outputRange: [m, 0] }) },
|
|
1422
|
+
top: { translateY: l.interpolate({ inputRange: [0, 1], outputRange: [-m, 0] }) },
|
|
1423
|
+
left: { translateX: l.interpolate({ inputRange: [0, 1], outputRange: [-d, 0] }) },
|
|
1424
|
+
right: { translateX: l.interpolate({ inputRange: [0, 1], outputRange: [d, 0] }) }
|
|
1425
|
+
}, y = {
|
|
1426
|
+
bottom: { justifyContent: "flex-end" },
|
|
1427
|
+
top: { justifyContent: "flex-start" },
|
|
1428
|
+
left: { alignItems: "flex-start" },
|
|
1429
|
+
right: { alignItems: "flex-end" }
|
|
1430
|
+
};
|
|
1431
|
+
return /* @__PURE__ */ e(K, { visible: s, transparent: !0, animationType: "none", onRequestClose: i, children: /* @__PURE__ */ e(
|
|
1432
|
+
f,
|
|
1433
|
+
{
|
|
1434
|
+
onPress: i,
|
|
1435
|
+
style: { flex: 1, backgroundColor: n.overlay.dark, ...y[o] },
|
|
1436
|
+
children: /* @__PURE__ */ e(
|
|
1437
|
+
I.View,
|
|
1438
|
+
{
|
|
1439
|
+
style: {
|
|
1440
|
+
transform: [
|
|
1441
|
+
h[o].translateX ? { translateX: h[o].translateX } : { translateX: 0 },
|
|
1442
|
+
h[o].translateY ? { translateY: h[o].translateY } : { translateY: 0 }
|
|
1443
|
+
],
|
|
1444
|
+
backgroundColor: n.surface.primary,
|
|
1445
|
+
...o === "bottom" || o === "top" ? { width: "100%", borderTopLeftRadius: a.borderRadius["2xl"], borderTopRightRadius: a.borderRadius["2xl"] } : { height: "100%", width: "85%" },
|
|
1446
|
+
padding: a.spacing.scale[4],
|
|
1447
|
+
gap: a.spacing.scale[3]
|
|
1448
|
+
},
|
|
1449
|
+
children: /* @__PURE__ */ p(f, { onPress: () => {
|
|
1450
|
+
}, children: [
|
|
1451
|
+
o === "bottom" && /* @__PURE__ */ e(
|
|
1452
|
+
c,
|
|
1453
|
+
{
|
|
1454
|
+
style: {
|
|
1455
|
+
width: 40,
|
|
1456
|
+
height: 4,
|
|
1457
|
+
borderRadius: 2,
|
|
1458
|
+
backgroundColor: n.border["medium-emphasis"],
|
|
1459
|
+
alignSelf: "center",
|
|
1460
|
+
marginBottom: a.spacing.scale[2]
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
),
|
|
1464
|
+
r && /* @__PURE__ */ e(g, { style: [u("heading.md"), { color: n.text["high-emphasis"] }], children: r }),
|
|
1465
|
+
/* @__PURE__ */ e(c, { style: { marginTop: a.spacing.scale[2] }, children: t })
|
|
1466
|
+
] })
|
|
1467
|
+
}
|
|
1468
|
+
)
|
|
1469
|
+
}
|
|
1470
|
+
) });
|
|
1471
|
+
}
|
|
1472
|
+
const Q = 180;
|
|
1473
|
+
function re(s, i, o) {
|
|
1474
|
+
return Math.max(i, Math.min(o, s));
|
|
1475
|
+
}
|
|
1476
|
+
function Ge({
|
|
1477
|
+
open: s,
|
|
1478
|
+
onClose: i,
|
|
1479
|
+
title: o,
|
|
1480
|
+
children: r,
|
|
1481
|
+
snapPoints: t,
|
|
1482
|
+
initialSnap: n
|
|
1483
|
+
}) {
|
|
1484
|
+
const { theme: a, scales: l } = b(), d = U(() => {
|
|
1485
|
+
const H = [...t ?? [0.55, 0.92]].map((T) => re(T, 0.1, 0.99)).sort((T, M) => T - M);
|
|
1486
|
+
return H.length > 0 ? H : [0.55, 0.92];
|
|
1487
|
+
}, [t]), m = d[0], h = d[d.length - 1], [y, x] = S(() => E.get("window").height || 700);
|
|
1488
|
+
_(() => {
|
|
1489
|
+
const H = E.addEventListener("change", ({ window: T }) => {
|
|
1490
|
+
T.height > 0 && x(T.height);
|
|
1491
|
+
});
|
|
1492
|
+
return () => H.remove();
|
|
1493
|
+
}, []);
|
|
1494
|
+
const C = Math.round(y * h), R = 0.18, w = re(n ?? m, m, h), v = P(w), k = P(new I.Value(C)).current, D = (H, T = Q) => {
|
|
1495
|
+
v.current = H, I.timing(k, {
|
|
1496
|
+
toValue: (h - H) * y,
|
|
1497
|
+
duration: T,
|
|
1498
|
+
useNativeDriver: !0
|
|
1499
|
+
}).start();
|
|
1500
|
+
};
|
|
1501
|
+
_(() => {
|
|
1502
|
+
s ? (k.setValue(C), D(w, Q)) : I.timing(k, {
|
|
1503
|
+
toValue: C,
|
|
1504
|
+
duration: Q,
|
|
1505
|
+
useNativeDriver: !0
|
|
1506
|
+
}).start();
|
|
1507
|
+
}, [s]);
|
|
1508
|
+
const A = P(0), le = P(w), ce = P(0), Ie = P(
|
|
1509
|
+
ae.create({
|
|
1510
|
+
onStartShouldSetPanResponder: () => !1,
|
|
1511
|
+
onMoveShouldSetPanResponder: (H, T) => {
|
|
1512
|
+
if (Math.abs(T.dy) < 6) return !1;
|
|
1513
|
+
const M = T.dy, O = v.current === h, $ = ce.current <= 0;
|
|
1514
|
+
return O ? !!(M > 0 && $) : !0;
|
|
1515
|
+
},
|
|
1516
|
+
onPanResponderGrant: () => {
|
|
1517
|
+
A.current = k._value, le.current = v.current;
|
|
1518
|
+
},
|
|
1519
|
+
onPanResponderMove: (H, T) => {
|
|
1520
|
+
let M = A.current + T.dy;
|
|
1521
|
+
M < 0 && (M = Math.max(-4, M / 4)), M > C && (M = C), k.setValue(M);
|
|
1522
|
+
},
|
|
1523
|
+
onPanResponderRelease: (H, T) => {
|
|
1524
|
+
const M = re(A.current + T.dy, 0, C), O = T.dy, $ = le.current;
|
|
1525
|
+
if ($ === h && O < 0) {
|
|
1526
|
+
D(h);
|
|
1527
|
+
return;
|
|
1528
|
+
}
|
|
1529
|
+
if (O < -20) {
|
|
1530
|
+
const V = d.indexOf($), Z = V >= 0 && V < d.length - 1 ? d[V + 1] : h;
|
|
1531
|
+
D(Z);
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
if (O > 0) {
|
|
1535
|
+
if ($ === m && O > C * R) {
|
|
1536
|
+
I.timing(k, {
|
|
1537
|
+
toValue: C,
|
|
1538
|
+
duration: Q,
|
|
1539
|
+
useNativeDriver: !0
|
|
1540
|
+
}).start(() => i());
|
|
1541
|
+
return;
|
|
1542
|
+
}
|
|
1543
|
+
if ($ === h) {
|
|
1544
|
+
const V = (h - m) * y;
|
|
1545
|
+
if (O > V + C * R) {
|
|
1546
|
+
I.timing(k, {
|
|
1547
|
+
toValue: C,
|
|
1548
|
+
duration: Q,
|
|
1549
|
+
useNativeDriver: !0
|
|
1550
|
+
}).start(() => i());
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1553
|
+
if (O > 40) {
|
|
1554
|
+
D(m);
|
|
1555
|
+
return;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
const de = h - M / y;
|
|
1560
|
+
let he = d[0], ue = Math.abs(d[0] - de);
|
|
1561
|
+
for (let V = 1; V < d.length; V++) {
|
|
1562
|
+
const Z = Math.abs(d[V] - de);
|
|
1563
|
+
Z < ue && (ue = Z, he = d[V]);
|
|
1564
|
+
}
|
|
1565
|
+
D(he);
|
|
1566
|
+
}
|
|
1567
|
+
})
|
|
1568
|
+
).current, De = k.interpolate({
|
|
1569
|
+
inputRange: [0, (h - m) * y, C],
|
|
1570
|
+
outputRange: [1, 0.4, 0],
|
|
1571
|
+
extrapolate: "clamp"
|
|
1572
|
+
});
|
|
1573
|
+
return /* @__PURE__ */ p(K, { visible: s, transparent: !0, animationType: "none", onRequestClose: i, children: [
|
|
1574
|
+
/* @__PURE__ */ e(
|
|
1575
|
+
I.View,
|
|
1576
|
+
{
|
|
1577
|
+
pointerEvents: s ? "auto" : "none",
|
|
1578
|
+
style: {
|
|
1579
|
+
position: "absolute",
|
|
1580
|
+
left: 0,
|
|
1581
|
+
right: 0,
|
|
1582
|
+
top: 0,
|
|
1583
|
+
bottom: 0,
|
|
1584
|
+
backgroundColor: a.overlay.dark,
|
|
1585
|
+
opacity: De
|
|
1586
|
+
},
|
|
1587
|
+
children: /* @__PURE__ */ e(f, { onPress: i, style: { flex: 1 } })
|
|
1588
|
+
}
|
|
1589
|
+
),
|
|
1590
|
+
/* @__PURE__ */ p(
|
|
1591
|
+
I.View,
|
|
1592
|
+
{
|
|
1593
|
+
...Ie.panHandlers,
|
|
1594
|
+
style: {
|
|
1595
|
+
position: "absolute",
|
|
1596
|
+
left: 0,
|
|
1597
|
+
right: 0,
|
|
1598
|
+
bottom: 0,
|
|
1599
|
+
height: C,
|
|
1600
|
+
backgroundColor: a.surface.primary,
|
|
1601
|
+
borderTopLeftRadius: l.borderRadius["2xl"],
|
|
1602
|
+
borderTopRightRadius: l.borderRadius["2xl"],
|
|
1603
|
+
transform: [{ translateY: k }]
|
|
1604
|
+
},
|
|
1605
|
+
children: [
|
|
1606
|
+
/* @__PURE__ */ p(c, { style: { paddingHorizontal: l.spacing.scale[4], paddingTop: l.spacing.scale[3] }, children: [
|
|
1607
|
+
/* @__PURE__ */ e(
|
|
1608
|
+
c,
|
|
1609
|
+
{
|
|
1610
|
+
style: {
|
|
1611
|
+
width: 40,
|
|
1612
|
+
height: 4,
|
|
1613
|
+
borderRadius: 2,
|
|
1614
|
+
backgroundColor: a.border["medium-emphasis"],
|
|
1615
|
+
alignSelf: "center",
|
|
1616
|
+
marginBottom: l.spacing.scale[2]
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
),
|
|
1620
|
+
o && /* @__PURE__ */ e(
|
|
1621
|
+
g,
|
|
1622
|
+
{
|
|
1623
|
+
style: [
|
|
1624
|
+
u("heading.md"),
|
|
1625
|
+
{ color: a.text["high-emphasis"], marginBottom: l.spacing.scale[2] }
|
|
1626
|
+
],
|
|
1627
|
+
children: o
|
|
1628
|
+
}
|
|
1629
|
+
)
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ e(
|
|
1632
|
+
W,
|
|
1633
|
+
{
|
|
1634
|
+
style: { flex: 1 },
|
|
1635
|
+
contentContainerStyle: { paddingHorizontal: l.spacing.scale[4], paddingBottom: l.spacing.scale[4] },
|
|
1636
|
+
onScroll: (H) => {
|
|
1637
|
+
ce.current = H.nativeEvent.contentOffset.y;
|
|
1638
|
+
},
|
|
1639
|
+
scrollEventThrottle: 16,
|
|
1640
|
+
keyboardShouldPersistTaps: "handled",
|
|
1641
|
+
children: r
|
|
1642
|
+
}
|
|
1643
|
+
)
|
|
1644
|
+
]
|
|
1645
|
+
}
|
|
1646
|
+
)
|
|
1647
|
+
] });
|
|
1648
|
+
}
|
|
1649
|
+
function Et({ breakpoint: s = 600, ...i }) {
|
|
1650
|
+
const { width: o } = E.get("window");
|
|
1651
|
+
return o <= s ? /* @__PURE__ */ p(j, { open: i.open, onClose: i.onClose, side: "bottom", title: i.title, children: [
|
|
1652
|
+
i.children,
|
|
1653
|
+
i.footer
|
|
1654
|
+
] }) : /* @__PURE__ */ e(Re, { ...i });
|
|
1655
|
+
}
|
|
1656
|
+
function Ke({ open: s, onClose: i, anchor: o, children: r }) {
|
|
1657
|
+
const { theme: t, scales: n } = b(), [a, l] = S({ width: 200, height: 100 }), d = (y) => {
|
|
1658
|
+
l({ width: y.nativeEvent.layout.width, height: y.nativeEvent.layout.height });
|
|
1659
|
+
}, m = o ? o.y + (o.height ?? 0) + 4 : 100, h = o ? o.x : 0;
|
|
1660
|
+
return /* @__PURE__ */ e(K, { visible: s, transparent: !0, animationType: "fade", onRequestClose: i, children: /* @__PURE__ */ e(f, { onPress: i, style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
1661
|
+
c,
|
|
1662
|
+
{
|
|
1663
|
+
onLayout: d,
|
|
1664
|
+
style: {
|
|
1665
|
+
position: "absolute",
|
|
1666
|
+
top: m,
|
|
1667
|
+
left: Math.max(8, h),
|
|
1668
|
+
minWidth: 160,
|
|
1669
|
+
backgroundColor: t.surface.primary,
|
|
1670
|
+
borderRadius: n.borderRadius.lg,
|
|
1671
|
+
borderWidth: 1,
|
|
1672
|
+
borderColor: t.border["low-emphasis"],
|
|
1673
|
+
padding: n.spacing.scale[2],
|
|
1674
|
+
shadowColor: t.overlay.dark,
|
|
1675
|
+
shadowOffset: { width: 0, height: 4 },
|
|
1676
|
+
shadowOpacity: 0.2,
|
|
1677
|
+
shadowRadius: 12,
|
|
1678
|
+
elevation: 6
|
|
1679
|
+
},
|
|
1680
|
+
children: /* @__PURE__ */ e(f, { onPress: () => {
|
|
1681
|
+
}, children: r })
|
|
1682
|
+
}
|
|
1683
|
+
) }) });
|
|
1684
|
+
}
|
|
1685
|
+
function Lt({ open: s, onClose: i, anchor: o, items: r }) {
|
|
1686
|
+
const { theme: t, scales: n } = b();
|
|
1687
|
+
return /* @__PURE__ */ e(Ke, { open: s, onClose: i, anchor: o, children: /* @__PURE__ */ e(c, { style: { minWidth: 180 }, children: r.map((a, l) => /* @__PURE__ */ p(X.Fragment, { children: [
|
|
1688
|
+
/* @__PURE__ */ e(
|
|
1689
|
+
f,
|
|
1690
|
+
{
|
|
1691
|
+
onPress: () => {
|
|
1692
|
+
a.disabled || (a.onSelect?.(), i());
|
|
1693
|
+
},
|
|
1694
|
+
disabled: a.disabled,
|
|
1695
|
+
style: ({ pressed: d }) => ({
|
|
1696
|
+
paddingVertical: n.spacing.scale[2],
|
|
1697
|
+
paddingHorizontal: n.spacing.scale[3],
|
|
1698
|
+
borderRadius: n.borderRadius.sm,
|
|
1699
|
+
backgroundColor: d ? t.surface.secondary : "transparent",
|
|
1700
|
+
opacity: a.disabled ? 0.4 : 1
|
|
1701
|
+
}),
|
|
1702
|
+
children: /* @__PURE__ */ e(
|
|
1703
|
+
g,
|
|
1704
|
+
{
|
|
1705
|
+
style: [
|
|
1706
|
+
u("body.md"),
|
|
1707
|
+
{ color: a.destructive ? t.text.caution : t.text["high-emphasis"] }
|
|
1708
|
+
],
|
|
1709
|
+
children: a.label
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
}
|
|
1713
|
+
),
|
|
1714
|
+
l < r.length - 1 && /* @__PURE__ */ e(q, {})
|
|
1715
|
+
] }, a.key)) }) });
|
|
1716
|
+
}
|
|
1717
|
+
const ve = se(null);
|
|
1718
|
+
function $t() {
|
|
1719
|
+
const s = oe(ve);
|
|
1720
|
+
if (!s) throw new Error("useToast は ToastProvider の内側で使ってください");
|
|
1721
|
+
return s;
|
|
1722
|
+
}
|
|
1723
|
+
let me = 0;
|
|
1724
|
+
function Je() {
|
|
1725
|
+
return me += 1, `toast-${me}`;
|
|
1726
|
+
}
|
|
1727
|
+
function _t({ children: s }) {
|
|
1728
|
+
const { theme: i, scales: o } = b(), [r, t] = S([]), n = ge((l) => {
|
|
1729
|
+
t((d) => d.filter((m) => m.id !== l));
|
|
1730
|
+
}, []), a = ge(
|
|
1731
|
+
(l) => {
|
|
1732
|
+
const d = Je();
|
|
1733
|
+
t((h) => [...h, { ...l, id: d }]);
|
|
1734
|
+
const m = l.duration ?? 3e3;
|
|
1735
|
+
return setTimeout(() => n(d), m), d;
|
|
1736
|
+
},
|
|
1737
|
+
[n]
|
|
1738
|
+
);
|
|
1739
|
+
return /* @__PURE__ */ p(ve.Provider, { value: { show: a, dismiss: n }, children: [
|
|
1740
|
+
s,
|
|
1741
|
+
/* @__PURE__ */ e(
|
|
1742
|
+
c,
|
|
1743
|
+
{
|
|
1744
|
+
pointerEvents: "box-none",
|
|
1745
|
+
style: {
|
|
1746
|
+
position: "absolute",
|
|
1747
|
+
top: o.spacing.scale[10],
|
|
1748
|
+
left: 0,
|
|
1749
|
+
right: 0,
|
|
1750
|
+
alignItems: "center",
|
|
1751
|
+
gap: o.spacing.scale[2],
|
|
1752
|
+
zIndex: 9999
|
|
1753
|
+
},
|
|
1754
|
+
children: r.map((l) => /* @__PURE__ */ e(Qe, { toast: l, onDismiss: () => n(l.id) }, l.id))
|
|
1755
|
+
}
|
|
1756
|
+
)
|
|
1757
|
+
] });
|
|
1758
|
+
}
|
|
1759
|
+
function Qe({ toast: s, onDismiss: i }) {
|
|
1760
|
+
const { theme: o, scales: r } = b(), t = P(new I.Value(0)).current, n = P(new I.Value(-20)).current;
|
|
1761
|
+
_(() => {
|
|
1762
|
+
I.parallel([
|
|
1763
|
+
I.timing(t, { toValue: 1, duration: 180, useNativeDriver: !0 }),
|
|
1764
|
+
I.timing(n, { toValue: 0, duration: 180, useNativeDriver: !0 })
|
|
1765
|
+
]).start();
|
|
1766
|
+
}, [t, n]);
|
|
1767
|
+
const a = {
|
|
1768
|
+
info: { bg: o.surface.info, fg: o.text.info },
|
|
1769
|
+
success: { bg: o.surface.success, fg: o.text.success },
|
|
1770
|
+
warning: { bg: o.surface.warning, fg: o.text.warning },
|
|
1771
|
+
caution: { bg: o.surface.caution, fg: o.text.caution }
|
|
1772
|
+
}[s.tone ?? "info"];
|
|
1773
|
+
return /* @__PURE__ */ p(
|
|
1774
|
+
I.View,
|
|
1775
|
+
{
|
|
1776
|
+
style: {
|
|
1777
|
+
opacity: t,
|
|
1778
|
+
transform: [{ translateY: n }],
|
|
1779
|
+
backgroundColor: a.bg,
|
|
1780
|
+
borderRadius: r.borderRadius.lg,
|
|
1781
|
+
paddingHorizontal: r.spacing.scale[4],
|
|
1782
|
+
paddingVertical: r.spacing.scale[3],
|
|
1783
|
+
marginHorizontal: r.spacing.scale[4],
|
|
1784
|
+
shadowColor: o.overlay.dark,
|
|
1785
|
+
shadowOffset: { width: 0, height: 4 },
|
|
1786
|
+
shadowOpacity: 0.18,
|
|
1787
|
+
shadowRadius: 12,
|
|
1788
|
+
elevation: 6,
|
|
1789
|
+
flexDirection: "row",
|
|
1790
|
+
alignItems: "center",
|
|
1791
|
+
gap: r.spacing.scale[3],
|
|
1792
|
+
maxWidth: 480
|
|
1793
|
+
},
|
|
1794
|
+
children: [
|
|
1795
|
+
/* @__PURE__ */ p(c, { style: { flex: 1 }, children: [
|
|
1796
|
+
s.title && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: a.fg }], children: s.title }),
|
|
1797
|
+
s.description && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: o.text["high-emphasis"] }], children: s.description })
|
|
1798
|
+
] }),
|
|
1799
|
+
/* @__PURE__ */ e(f, { onPress: i, hitSlop: 8, children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: a.fg }], children: "×" }) })
|
|
1800
|
+
]
|
|
1801
|
+
}
|
|
1802
|
+
);
|
|
1803
|
+
}
|
|
1804
|
+
function Nt({
|
|
1805
|
+
open: s,
|
|
1806
|
+
onClose: i,
|
|
1807
|
+
side: o = "left",
|
|
1808
|
+
header: r,
|
|
1809
|
+
sections: t,
|
|
1810
|
+
footer: n
|
|
1811
|
+
}) {
|
|
1812
|
+
const { theme: a, scales: l } = b();
|
|
1813
|
+
return /* @__PURE__ */ p(j, { open: s, onClose: i, side: o, children: [
|
|
1814
|
+
r && /* @__PURE__ */ e(c, { style: { marginBottom: l.spacing.scale[3] }, children: r }),
|
|
1815
|
+
/* @__PURE__ */ e(W, { style: { maxHeight: 480 }, children: t.map((d, m) => /* @__PURE__ */ p(c, { style: { marginBottom: l.spacing.scale[3] }, children: [
|
|
1816
|
+
d.title && /* @__PURE__ */ e(
|
|
1817
|
+
g,
|
|
1818
|
+
{
|
|
1819
|
+
style: [
|
|
1820
|
+
u("label.xs"),
|
|
1821
|
+
{
|
|
1822
|
+
color: a.text["low-emphasis"],
|
|
1823
|
+
paddingHorizontal: l.spacing.scale[2],
|
|
1824
|
+
marginBottom: l.spacing.scale[1]
|
|
1825
|
+
}
|
|
1826
|
+
],
|
|
1827
|
+
children: d.title
|
|
1828
|
+
}
|
|
1829
|
+
),
|
|
1830
|
+
d.items.map((h, y) => /* @__PURE__ */ p(X.Fragment, { children: [
|
|
1831
|
+
/* @__PURE__ */ p(
|
|
1832
|
+
f,
|
|
1833
|
+
{
|
|
1834
|
+
onPress: () => {
|
|
1835
|
+
h.onPress?.(), i();
|
|
1836
|
+
},
|
|
1837
|
+
style: ({ pressed: x }) => ({
|
|
1838
|
+
flexDirection: "row",
|
|
1839
|
+
alignItems: "center",
|
|
1840
|
+
gap: l.spacing.scale[3],
|
|
1841
|
+
paddingHorizontal: l.spacing.scale[3],
|
|
1842
|
+
paddingVertical: l.spacing.scale[3],
|
|
1843
|
+
borderRadius: l.borderRadius.md,
|
|
1844
|
+
backgroundColor: h.active ? a.surface["accent-primary-light"] : x ? a.surface.secondary : "transparent"
|
|
1845
|
+
}),
|
|
1846
|
+
children: [
|
|
1847
|
+
h.icon,
|
|
1848
|
+
/* @__PURE__ */ e(
|
|
1849
|
+
g,
|
|
1850
|
+
{
|
|
1851
|
+
style: [
|
|
1852
|
+
u("body.md"),
|
|
1853
|
+
{
|
|
1854
|
+
color: h.active ? a.text["accent-primary"] : a.text["high-emphasis"]
|
|
1855
|
+
}
|
|
1856
|
+
],
|
|
1857
|
+
children: h.label
|
|
1858
|
+
}
|
|
1859
|
+
)
|
|
1860
|
+
]
|
|
1861
|
+
}
|
|
1862
|
+
),
|
|
1863
|
+
y < d.items.length - 1 && /* @__PURE__ */ e(q, {})
|
|
1864
|
+
] }, h.key))
|
|
1865
|
+
] }, m)) }),
|
|
1866
|
+
n && /* @__PURE__ */ e(c, { style: { marginTop: l.spacing.scale[3] }, children: n })
|
|
1867
|
+
] });
|
|
1868
|
+
}
|
|
1869
|
+
function Yt(s) {
|
|
1870
|
+
return /* @__PURE__ */ e(qe, { ...s });
|
|
1871
|
+
}
|
|
1872
|
+
function qt({
|
|
1873
|
+
open: s,
|
|
1874
|
+
onClose: i,
|
|
1875
|
+
title: o,
|
|
1876
|
+
description: r,
|
|
1877
|
+
footer: t,
|
|
1878
|
+
children: n
|
|
1879
|
+
}) {
|
|
1880
|
+
const { theme: a, scales: l } = b();
|
|
1881
|
+
return /* @__PURE__ */ p(j, { open: s, onClose: i, side: "bottom", title: o, children: [
|
|
1882
|
+
r && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: a.text["medium-emphasis"] }], children: r }),
|
|
1883
|
+
/* @__PURE__ */ e(W, { style: { maxHeight: 420 }, children: /* @__PURE__ */ e(c, { style: { gap: l.spacing.scale[3], paddingVertical: l.spacing.scale[2] }, children: n }) }),
|
|
1884
|
+
t && /* @__PURE__ */ e(
|
|
1885
|
+
c,
|
|
1886
|
+
{
|
|
1887
|
+
style: {
|
|
1888
|
+
flexDirection: "row",
|
|
1889
|
+
justifyContent: "flex-end",
|
|
1890
|
+
gap: l.spacing.scale[2],
|
|
1891
|
+
marginTop: l.spacing.scale[3]
|
|
1892
|
+
},
|
|
1893
|
+
children: t
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
] });
|
|
1897
|
+
}
|
|
1898
|
+
function Xt({
|
|
1899
|
+
open: s,
|
|
1900
|
+
onClose: i,
|
|
1901
|
+
title: o = "レビューを投稿",
|
|
1902
|
+
onSubmit: r
|
|
1903
|
+
}) {
|
|
1904
|
+
const { theme: t, scales: n } = b(), [a, l] = S(0), [d, m] = S("");
|
|
1905
|
+
return /* @__PURE__ */ p(j, { open: s, onClose: i, side: "bottom", title: o, children: [
|
|
1906
|
+
/* @__PURE__ */ e(c, { style: { alignItems: "center", marginVertical: n.spacing.scale[3] }, children: /* @__PURE__ */ e(te, { value: a, onChange: l, size: 32 }) }),
|
|
1907
|
+
/* @__PURE__ */ e(
|
|
1908
|
+
_e,
|
|
1909
|
+
{
|
|
1910
|
+
value: d,
|
|
1911
|
+
onChangeText: m,
|
|
1912
|
+
placeholder: "コメントを入力",
|
|
1913
|
+
minHeight: 120
|
|
1914
|
+
}
|
|
1915
|
+
),
|
|
1916
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", gap: n.spacing.scale[2], marginTop: n.spacing.scale[3] }, children: [
|
|
1917
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: i, children: "キャンセル" }) }),
|
|
1918
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
1919
|
+
z,
|
|
1920
|
+
{
|
|
1921
|
+
variant: "primary",
|
|
1922
|
+
disabled: a === 0,
|
|
1923
|
+
onPress: () => {
|
|
1924
|
+
r?.(a, d), i();
|
|
1925
|
+
},
|
|
1926
|
+
children: "送信"
|
|
1927
|
+
}
|
|
1928
|
+
) })
|
|
1929
|
+
] })
|
|
1930
|
+
] });
|
|
1931
|
+
}
|
|
1932
|
+
function Gt({
|
|
1933
|
+
title: s,
|
|
1934
|
+
description: i,
|
|
1935
|
+
step: o,
|
|
1936
|
+
total: r,
|
|
1937
|
+
onNext: t,
|
|
1938
|
+
onSkip: n,
|
|
1939
|
+
nextLabel: a = "次へ",
|
|
1940
|
+
skipLabel: l = "スキップ"
|
|
1941
|
+
}) {
|
|
1942
|
+
const { theme: d, scales: m } = b();
|
|
1943
|
+
return /* @__PURE__ */ p(
|
|
1944
|
+
c,
|
|
1945
|
+
{
|
|
1946
|
+
style: {
|
|
1947
|
+
backgroundColor: d.surface.inverse,
|
|
1948
|
+
borderRadius: m.borderRadius.lg,
|
|
1949
|
+
padding: m.spacing.scale[4],
|
|
1950
|
+
gap: m.spacing.scale[2],
|
|
1951
|
+
maxWidth: 320,
|
|
1952
|
+
shadowColor: d.overlay.dark,
|
|
1953
|
+
shadowOffset: { width: 0, height: 4 },
|
|
1954
|
+
shadowOpacity: 0.18,
|
|
1955
|
+
shadowRadius: 12,
|
|
1956
|
+
elevation: 6
|
|
1957
|
+
},
|
|
1958
|
+
children: [
|
|
1959
|
+
s && /* @__PURE__ */ e(g, { style: [u("label.lg"), { color: d.text["on-inverse"] }], children: s }),
|
|
1960
|
+
/* @__PURE__ */ e(g, { style: [u("body.sm"), { color: d.text["on-inverse-secondary"] }], children: i }),
|
|
1961
|
+
/* @__PURE__ */ p(
|
|
1962
|
+
c,
|
|
1963
|
+
{
|
|
1964
|
+
style: {
|
|
1965
|
+
flexDirection: "row",
|
|
1966
|
+
alignItems: "center",
|
|
1967
|
+
justifyContent: "space-between",
|
|
1968
|
+
marginTop: m.spacing.scale[2]
|
|
1969
|
+
},
|
|
1970
|
+
children: [
|
|
1971
|
+
o !== void 0 && r !== void 0 ? /* @__PURE__ */ p(g, { style: [u("label.xs"), { color: d.text["on-inverse-secondary"] }], children: [
|
|
1972
|
+
o,
|
|
1973
|
+
"/",
|
|
1974
|
+
r
|
|
1975
|
+
] }) : /* @__PURE__ */ e(c, {}),
|
|
1976
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", gap: m.spacing.scale[2] }, children: [
|
|
1977
|
+
n && /* @__PURE__ */ e(c, { style: { minWidth: 80 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: n, children: l }) }),
|
|
1978
|
+
t && /* @__PURE__ */ e(c, { style: { minWidth: 80 }, children: /* @__PURE__ */ e(z, { variant: "primary", onPress: t, children: a }) })
|
|
1979
|
+
] })
|
|
1980
|
+
]
|
|
1981
|
+
}
|
|
1982
|
+
)
|
|
1983
|
+
]
|
|
1984
|
+
}
|
|
1985
|
+
);
|
|
1986
|
+
}
|
|
1987
|
+
function Kt({ open: s, onClose: i, highlight: o, children: r }) {
|
|
1988
|
+
const { theme: t } = b(), n = t.overlay.dark;
|
|
1989
|
+
return /* @__PURE__ */ e(K, { visible: s, transparent: !0, animationType: "fade", onRequestClose: i, children: /* @__PURE__ */ p(f, { onPress: i, style: { flex: 1 }, children: [
|
|
1990
|
+
o ? /* @__PURE__ */ p(F, { children: [
|
|
1991
|
+
/* @__PURE__ */ e(
|
|
1992
|
+
c,
|
|
1993
|
+
{
|
|
1994
|
+
style: {
|
|
1995
|
+
position: "absolute",
|
|
1996
|
+
top: 0,
|
|
1997
|
+
left: 0,
|
|
1998
|
+
right: 0,
|
|
1999
|
+
height: o.y,
|
|
2000
|
+
backgroundColor: n
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
),
|
|
2004
|
+
/* @__PURE__ */ e(
|
|
2005
|
+
c,
|
|
2006
|
+
{
|
|
2007
|
+
style: {
|
|
2008
|
+
position: "absolute",
|
|
2009
|
+
top: o.y,
|
|
2010
|
+
left: 0,
|
|
2011
|
+
width: o.x,
|
|
2012
|
+
height: o.height,
|
|
2013
|
+
backgroundColor: n
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
),
|
|
2017
|
+
/* @__PURE__ */ e(
|
|
2018
|
+
c,
|
|
2019
|
+
{
|
|
2020
|
+
style: {
|
|
2021
|
+
position: "absolute",
|
|
2022
|
+
top: o.y,
|
|
2023
|
+
left: o.x + o.width,
|
|
2024
|
+
right: 0,
|
|
2025
|
+
height: o.height,
|
|
2026
|
+
backgroundColor: n
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
),
|
|
2030
|
+
/* @__PURE__ */ e(
|
|
2031
|
+
c,
|
|
2032
|
+
{
|
|
2033
|
+
style: {
|
|
2034
|
+
position: "absolute",
|
|
2035
|
+
top: o.y + o.height,
|
|
2036
|
+
left: 0,
|
|
2037
|
+
right: 0,
|
|
2038
|
+
bottom: 0,
|
|
2039
|
+
backgroundColor: n
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
),
|
|
2043
|
+
/* @__PURE__ */ e(
|
|
2044
|
+
c,
|
|
2045
|
+
{
|
|
2046
|
+
style: {
|
|
2047
|
+
position: "absolute",
|
|
2048
|
+
top: o.y,
|
|
2049
|
+
left: o.x,
|
|
2050
|
+
width: o.width,
|
|
2051
|
+
height: o.height,
|
|
2052
|
+
borderRadius: o.radius ?? 12,
|
|
2053
|
+
borderWidth: 2,
|
|
2054
|
+
borderColor: t.brand.primary
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
)
|
|
2058
|
+
] }) : /* @__PURE__ */ e(c, { style: { flex: 1, backgroundColor: n } }),
|
|
2059
|
+
/* @__PURE__ */ e(c, { style: { position: "absolute", left: 0, right: 0, bottom: 80, alignItems: "center" }, children: /* @__PURE__ */ e(f, { onPress: () => {
|
|
2060
|
+
}, children: r }) })
|
|
2061
|
+
] }) });
|
|
2062
|
+
}
|
|
2063
|
+
function Jt({
|
|
2064
|
+
options: s,
|
|
2065
|
+
value: i,
|
|
2066
|
+
onChange: o,
|
|
2067
|
+
placeholder: r = "選択",
|
|
2068
|
+
disabled: t = !1,
|
|
2069
|
+
title: n = "選択"
|
|
2070
|
+
}) {
|
|
2071
|
+
const { theme: a, scales: l } = b(), [d, m] = S(!1), h = s.find((y) => y.value === i);
|
|
2072
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2073
|
+
/* @__PURE__ */ p(
|
|
2074
|
+
f,
|
|
2075
|
+
{
|
|
2076
|
+
onPress: () => !t && m(!0),
|
|
2077
|
+
disabled: t,
|
|
2078
|
+
style: {
|
|
2079
|
+
flexDirection: "row",
|
|
2080
|
+
alignItems: "center",
|
|
2081
|
+
justifyContent: "space-between",
|
|
2082
|
+
minHeight: l.touchTargets.textInput.min,
|
|
2083
|
+
paddingHorizontal: l.spacing.scale[3],
|
|
2084
|
+
borderRadius: l.borderRadius.md,
|
|
2085
|
+
borderWidth: 1,
|
|
2086
|
+
borderColor: a.border["medium-emphasis"],
|
|
2087
|
+
backgroundColor: t ? a.surface.disable : a.surface.primary,
|
|
2088
|
+
opacity: t ? 0.6 : 1
|
|
2089
|
+
},
|
|
2090
|
+
children: [
|
|
2091
|
+
/* @__PURE__ */ e(
|
|
2092
|
+
g,
|
|
2093
|
+
{
|
|
2094
|
+
style: [
|
|
2095
|
+
u("body.md"),
|
|
2096
|
+
{ color: h ? a.text["high-emphasis"] : a.text["low-emphasis"] }
|
|
2097
|
+
],
|
|
2098
|
+
children: h ? h.label : r
|
|
2099
|
+
}
|
|
2100
|
+
),
|
|
2101
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: a.text["low-emphasis"] }], children: "▾" })
|
|
2102
|
+
]
|
|
2103
|
+
}
|
|
2104
|
+
),
|
|
2105
|
+
/* @__PURE__ */ e(j, { open: d, onClose: () => m(!1), side: "bottom", title: n, children: /* @__PURE__ */ e(c, { children: s.map((y, x) => /* @__PURE__ */ p(X.Fragment, { children: [
|
|
2106
|
+
/* @__PURE__ */ p(
|
|
2107
|
+
f,
|
|
2108
|
+
{
|
|
2109
|
+
onPress: () => {
|
|
2110
|
+
y.disabled || (o?.(y.value), m(!1));
|
|
2111
|
+
},
|
|
2112
|
+
disabled: y.disabled,
|
|
2113
|
+
style: ({ pressed: C }) => ({
|
|
2114
|
+
paddingVertical: l.spacing.scale[3],
|
|
2115
|
+
paddingHorizontal: l.spacing.scale[2],
|
|
2116
|
+
backgroundColor: C ? a.surface.secondary : "transparent",
|
|
2117
|
+
opacity: y.disabled ? 0.4 : 1,
|
|
2118
|
+
flexDirection: "row",
|
|
2119
|
+
justifyContent: "space-between",
|
|
2120
|
+
alignItems: "center"
|
|
2121
|
+
}),
|
|
2122
|
+
children: [
|
|
2123
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: a.text["high-emphasis"] }], children: y.label }),
|
|
2124
|
+
i === y.value && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: a.text["accent-primary"] }], children: "✓" })
|
|
2125
|
+
]
|
|
2126
|
+
}
|
|
2127
|
+
),
|
|
2128
|
+
x < s.length - 1 && /* @__PURE__ */ e(q, {})
|
|
2129
|
+
] }, y.value)) }) })
|
|
2130
|
+
] });
|
|
2131
|
+
}
|
|
2132
|
+
function Qt({
|
|
2133
|
+
options: s,
|
|
2134
|
+
value: i,
|
|
2135
|
+
onChange: o,
|
|
2136
|
+
placeholder: r = "選択",
|
|
2137
|
+
searchPlaceholder: t = "検索",
|
|
2138
|
+
emptyMessage: n = "該当なし",
|
|
2139
|
+
disabled: a = !1
|
|
2140
|
+
}) {
|
|
2141
|
+
const { theme: l, scales: d } = b(), [m, h] = S(!1), [y, x] = S(""), C = s.find((w) => w.value === i), R = U(() => {
|
|
2142
|
+
if (!y) return s;
|
|
2143
|
+
const w = y.toLowerCase();
|
|
2144
|
+
return s.filter((v) => v.label.toLowerCase().includes(w));
|
|
2145
|
+
}, [s, y]);
|
|
2146
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2147
|
+
/* @__PURE__ */ p(
|
|
2148
|
+
f,
|
|
2149
|
+
{
|
|
2150
|
+
onPress: () => !a && h(!0),
|
|
2151
|
+
disabled: a,
|
|
2152
|
+
style: {
|
|
2153
|
+
flexDirection: "row",
|
|
2154
|
+
alignItems: "center",
|
|
2155
|
+
justifyContent: "space-between",
|
|
2156
|
+
minHeight: d.touchTargets.textInput.min,
|
|
2157
|
+
paddingHorizontal: d.spacing.scale[3],
|
|
2158
|
+
borderRadius: d.borderRadius.md,
|
|
2159
|
+
borderWidth: 1,
|
|
2160
|
+
borderColor: l.border["medium-emphasis"],
|
|
2161
|
+
backgroundColor: a ? l.surface.disable : l.surface.primary,
|
|
2162
|
+
opacity: a ? 0.6 : 1
|
|
2163
|
+
},
|
|
2164
|
+
children: [
|
|
2165
|
+
/* @__PURE__ */ e(
|
|
2166
|
+
g,
|
|
2167
|
+
{
|
|
2168
|
+
style: [
|
|
2169
|
+
u("body.md"),
|
|
2170
|
+
{ color: C ? l.text["high-emphasis"] : l.text["low-emphasis"] }
|
|
2171
|
+
],
|
|
2172
|
+
children: C ? C.label : r
|
|
2173
|
+
}
|
|
2174
|
+
),
|
|
2175
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: l.text["low-emphasis"] }], children: "▾" })
|
|
2176
|
+
]
|
|
2177
|
+
}
|
|
2178
|
+
),
|
|
2179
|
+
/* @__PURE__ */ p(j, { open: m, onClose: () => h(!1), side: "bottom", title: "選択", children: [
|
|
2180
|
+
/* @__PURE__ */ e(Ce, { value: y, onChangeText: x, placeholder: t }),
|
|
2181
|
+
/* @__PURE__ */ e(c, { style: { height: 360, marginTop: d.spacing.scale[2] }, children: R.length === 0 ? /* @__PURE__ */ e(
|
|
2182
|
+
g,
|
|
2183
|
+
{
|
|
2184
|
+
style: [
|
|
2185
|
+
u("body.md"),
|
|
2186
|
+
{
|
|
2187
|
+
color: l.text["low-emphasis"],
|
|
2188
|
+
textAlign: "center",
|
|
2189
|
+
paddingVertical: d.spacing.scale[6]
|
|
2190
|
+
}
|
|
2191
|
+
],
|
|
2192
|
+
children: n
|
|
2193
|
+
}
|
|
2194
|
+
) : /* @__PURE__ */ e(
|
|
2195
|
+
L,
|
|
2196
|
+
{
|
|
2197
|
+
data: R,
|
|
2198
|
+
keyExtractor: (w) => w.value,
|
|
2199
|
+
renderItem: ({ item: w }) => /* @__PURE__ */ p(
|
|
2200
|
+
f,
|
|
2201
|
+
{
|
|
2202
|
+
onPress: () => {
|
|
2203
|
+
o?.(w.value), x(""), h(!1);
|
|
2204
|
+
},
|
|
2205
|
+
style: ({ pressed: v }) => ({
|
|
2206
|
+
paddingVertical: d.spacing.scale[3],
|
|
2207
|
+
paddingHorizontal: d.spacing.scale[2],
|
|
2208
|
+
backgroundColor: v ? l.surface.secondary : "transparent",
|
|
2209
|
+
flexDirection: "row",
|
|
2210
|
+
justifyContent: "space-between",
|
|
2211
|
+
alignItems: "center"
|
|
2212
|
+
}),
|
|
2213
|
+
children: [
|
|
2214
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: l.text["high-emphasis"] }], children: w.label }),
|
|
2215
|
+
i === w.value && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.text["accent-primary"] }], children: "✓" })
|
|
2216
|
+
]
|
|
2217
|
+
}
|
|
2218
|
+
)
|
|
2219
|
+
}
|
|
2220
|
+
) })
|
|
2221
|
+
] })
|
|
2222
|
+
] });
|
|
2223
|
+
}
|
|
2224
|
+
function Ut({
|
|
2225
|
+
options: s,
|
|
2226
|
+
values: i = [],
|
|
2227
|
+
onChange: o,
|
|
2228
|
+
placeholder: r = "選択",
|
|
2229
|
+
searchPlaceholder: t = "検索",
|
|
2230
|
+
disabled: n = !1
|
|
2231
|
+
}) {
|
|
2232
|
+
const { theme: a, scales: l } = b(), [d, m] = S(!1), [h, y] = S(""), [x, C] = S(i), R = U(() => {
|
|
2233
|
+
if (!h) return s;
|
|
2234
|
+
const v = h.toLowerCase();
|
|
2235
|
+
return s.filter((k) => k.label.toLowerCase().includes(v));
|
|
2236
|
+
}, [s, h]), w = i.length === 0 ? r : i.length === 1 ? s.find((v) => v.value === i[0])?.label ?? r : `${i.length}件選択中`;
|
|
2237
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2238
|
+
/* @__PURE__ */ p(
|
|
2239
|
+
f,
|
|
2240
|
+
{
|
|
2241
|
+
onPress: () => {
|
|
2242
|
+
n || (C(i), m(!0));
|
|
2243
|
+
},
|
|
2244
|
+
disabled: n,
|
|
2245
|
+
style: {
|
|
2246
|
+
flexDirection: "row",
|
|
2247
|
+
alignItems: "center",
|
|
2248
|
+
justifyContent: "space-between",
|
|
2249
|
+
minHeight: l.touchTargets.textInput.min,
|
|
2250
|
+
paddingHorizontal: l.spacing.scale[3],
|
|
2251
|
+
borderRadius: l.borderRadius.md,
|
|
2252
|
+
borderWidth: 1,
|
|
2253
|
+
borderColor: a.border["medium-emphasis"],
|
|
2254
|
+
backgroundColor: n ? a.surface.disable : a.surface.primary,
|
|
2255
|
+
opacity: n ? 0.6 : 1
|
|
2256
|
+
},
|
|
2257
|
+
children: [
|
|
2258
|
+
/* @__PURE__ */ e(
|
|
2259
|
+
g,
|
|
2260
|
+
{
|
|
2261
|
+
style: [
|
|
2262
|
+
u("body.md"),
|
|
2263
|
+
{ color: i.length > 0 ? a.text["high-emphasis"] : a.text["low-emphasis"] }
|
|
2264
|
+
],
|
|
2265
|
+
children: w
|
|
2266
|
+
}
|
|
2267
|
+
),
|
|
2268
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: a.text["low-emphasis"] }], children: "▾" })
|
|
2269
|
+
]
|
|
2270
|
+
}
|
|
2271
|
+
),
|
|
2272
|
+
/* @__PURE__ */ p(j, { open: d, onClose: () => m(!1), side: "bottom", title: "複数選択", children: [
|
|
2273
|
+
/* @__PURE__ */ e(Ce, { value: h, onChangeText: y, placeholder: t }),
|
|
2274
|
+
/* @__PURE__ */ e(c, { style: { height: 320, marginTop: l.spacing.scale[2] }, children: /* @__PURE__ */ e(
|
|
2275
|
+
L,
|
|
2276
|
+
{
|
|
2277
|
+
data: R,
|
|
2278
|
+
keyExtractor: (v) => v.value,
|
|
2279
|
+
renderItem: ({ item: v }) => {
|
|
2280
|
+
const k = x.includes(v.value);
|
|
2281
|
+
return /* @__PURE__ */ p(
|
|
2282
|
+
f,
|
|
2283
|
+
{
|
|
2284
|
+
onPress: () => {
|
|
2285
|
+
C(
|
|
2286
|
+
(D) => D.includes(v.value) ? D.filter((A) => A !== v.value) : [...D, v.value]
|
|
2287
|
+
);
|
|
2288
|
+
},
|
|
2289
|
+
style: {
|
|
2290
|
+
flexDirection: "row",
|
|
2291
|
+
alignItems: "center",
|
|
2292
|
+
gap: l.spacing.scale[2],
|
|
2293
|
+
paddingVertical: l.spacing.scale[3]
|
|
2294
|
+
},
|
|
2295
|
+
children: [
|
|
2296
|
+
/* @__PURE__ */ e(ie, { checked: k }),
|
|
2297
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: a.text["high-emphasis"], flex: 1 }], children: v.label })
|
|
2298
|
+
]
|
|
2299
|
+
}
|
|
2300
|
+
);
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
) }),
|
|
2304
|
+
/* @__PURE__ */ p(
|
|
2305
|
+
c,
|
|
2306
|
+
{
|
|
2307
|
+
style: {
|
|
2308
|
+
flexDirection: "row",
|
|
2309
|
+
gap: l.spacing.scale[2],
|
|
2310
|
+
marginTop: l.spacing.scale[3]
|
|
2311
|
+
},
|
|
2312
|
+
children: [
|
|
2313
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: () => m(!1), children: "キャンセル" }) }),
|
|
2314
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
2315
|
+
z,
|
|
2316
|
+
{
|
|
2317
|
+
variant: "primary",
|
|
2318
|
+
onPress: () => {
|
|
2319
|
+
o?.(x), m(!1);
|
|
2320
|
+
},
|
|
2321
|
+
children: "適用"
|
|
2322
|
+
}
|
|
2323
|
+
) })
|
|
2324
|
+
]
|
|
2325
|
+
}
|
|
2326
|
+
)
|
|
2327
|
+
] })
|
|
2328
|
+
] });
|
|
2329
|
+
}
|
|
2330
|
+
function Zt({ label: s, options: i, value: o, onChange: r }) {
|
|
2331
|
+
const { theme: t, scales: n } = b(), [a, l] = S(!1), d = i.find((h) => h.value === o), m = !!d;
|
|
2332
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2333
|
+
/* @__PURE__ */ p(
|
|
2334
|
+
f,
|
|
2335
|
+
{
|
|
2336
|
+
onPress: () => l(!0),
|
|
2337
|
+
style: ({ pressed: h }) => ({
|
|
2338
|
+
flexDirection: "row",
|
|
2339
|
+
alignItems: "center",
|
|
2340
|
+
gap: n.spacing.scale[1],
|
|
2341
|
+
paddingVertical: n.spacing.scale[2],
|
|
2342
|
+
paddingHorizontal: n.spacing.scale[3],
|
|
2343
|
+
borderRadius: n.borderRadius.full,
|
|
2344
|
+
borderWidth: 1,
|
|
2345
|
+
borderColor: m ? t.border["accent-primary"] : t.border["medium-emphasis"],
|
|
2346
|
+
backgroundColor: m ? t.surface["accent-primary-light"] : h ? t.surface.secondary : t.surface.primary
|
|
2347
|
+
}),
|
|
2348
|
+
children: [
|
|
2349
|
+
/* @__PURE__ */ p(
|
|
2350
|
+
g,
|
|
2351
|
+
{
|
|
2352
|
+
style: [
|
|
2353
|
+
u("label.sm"),
|
|
2354
|
+
{ color: m ? t.text["accent-primary"] : t.text["high-emphasis"] }
|
|
2355
|
+
],
|
|
2356
|
+
children: [
|
|
2357
|
+
s,
|
|
2358
|
+
d ? `: ${d.label}` : ""
|
|
2359
|
+
]
|
|
2360
|
+
}
|
|
2361
|
+
),
|
|
2362
|
+
/* @__PURE__ */ e(
|
|
2363
|
+
g,
|
|
2364
|
+
{
|
|
2365
|
+
style: [
|
|
2366
|
+
u("label.xs"),
|
|
2367
|
+
{ color: m ? t.text["accent-primary"] : t.text["low-emphasis"] }
|
|
2368
|
+
],
|
|
2369
|
+
children: "▾"
|
|
2370
|
+
}
|
|
2371
|
+
)
|
|
2372
|
+
]
|
|
2373
|
+
}
|
|
2374
|
+
),
|
|
2375
|
+
/* @__PURE__ */ e(j, { open: a, onClose: () => l(!1), side: "bottom", title: s, children: /* @__PURE__ */ p(c, { children: [
|
|
2376
|
+
/* @__PURE__ */ e(
|
|
2377
|
+
f,
|
|
2378
|
+
{
|
|
2379
|
+
onPress: () => {
|
|
2380
|
+
r?.(void 0), l(!1);
|
|
2381
|
+
},
|
|
2382
|
+
style: ({ pressed: h }) => ({
|
|
2383
|
+
paddingVertical: n.spacing.scale[3],
|
|
2384
|
+
backgroundColor: h ? t.surface.secondary : "transparent"
|
|
2385
|
+
}),
|
|
2386
|
+
children: /* @__PURE__ */ e(g, { style: [u("body.md"), { color: t.text["medium-emphasis"] }], children: "すべて" })
|
|
2387
|
+
}
|
|
2388
|
+
),
|
|
2389
|
+
/* @__PURE__ */ e(q, {}),
|
|
2390
|
+
i.map((h, y) => /* @__PURE__ */ p(X.Fragment, { children: [
|
|
2391
|
+
/* @__PURE__ */ p(
|
|
2392
|
+
f,
|
|
2393
|
+
{
|
|
2394
|
+
onPress: () => {
|
|
2395
|
+
r?.(h.value), l(!1);
|
|
2396
|
+
},
|
|
2397
|
+
style: ({ pressed: x }) => ({
|
|
2398
|
+
paddingVertical: n.spacing.scale[3],
|
|
2399
|
+
flexDirection: "row",
|
|
2400
|
+
justifyContent: "space-between",
|
|
2401
|
+
backgroundColor: x ? t.surface.secondary : "transparent"
|
|
2402
|
+
}),
|
|
2403
|
+
children: [
|
|
2404
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: t.text["high-emphasis"] }], children: h.label }),
|
|
2405
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
2406
|
+
h.count !== void 0 && /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["low-emphasis"] }], children: h.count }),
|
|
2407
|
+
o === h.value && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: t.text["accent-primary"] }], children: "✓" })
|
|
2408
|
+
] })
|
|
2409
|
+
]
|
|
2410
|
+
}
|
|
2411
|
+
),
|
|
2412
|
+
y < i.length - 1 && /* @__PURE__ */ e(q, {})
|
|
2413
|
+
] }, h.value))
|
|
2414
|
+
] }) })
|
|
2415
|
+
] });
|
|
2416
|
+
}
|
|
2417
|
+
function er({ options: s, value: i, onChange: o, disabled: r = !1 }) {
|
|
2418
|
+
const { theme: t, scales: n } = b();
|
|
2419
|
+
return /* @__PURE__ */ e(
|
|
2420
|
+
c,
|
|
2421
|
+
{
|
|
2422
|
+
style: {
|
|
2423
|
+
flexDirection: "row",
|
|
2424
|
+
flexWrap: "wrap",
|
|
2425
|
+
gap: n.spacing.scale[2]
|
|
2426
|
+
},
|
|
2427
|
+
children: s.map((a) => {
|
|
2428
|
+
const l = i === a.value;
|
|
2429
|
+
return /* @__PURE__ */ p(
|
|
2430
|
+
f,
|
|
2431
|
+
{
|
|
2432
|
+
onPress: () => !r && o?.(a.value),
|
|
2433
|
+
disabled: r,
|
|
2434
|
+
style: ({ pressed: d }) => ({
|
|
2435
|
+
flexDirection: "row",
|
|
2436
|
+
alignItems: "center",
|
|
2437
|
+
gap: n.spacing.scale[1],
|
|
2438
|
+
paddingHorizontal: n.spacing.scale[3],
|
|
2439
|
+
height: 36,
|
|
2440
|
+
borderRadius: n.borderRadius.full,
|
|
2441
|
+
backgroundColor: l ? t.brand.primary : d ? t.active["secondary-button"] : t.surface.secondary,
|
|
2442
|
+
opacity: r ? 0.5 : 1
|
|
2443
|
+
}),
|
|
2444
|
+
children: [
|
|
2445
|
+
/* @__PURE__ */ e(
|
|
2446
|
+
g,
|
|
2447
|
+
{
|
|
2448
|
+
style: [
|
|
2449
|
+
u("label.sm"),
|
|
2450
|
+
{
|
|
2451
|
+
color: l ? t.text["on-inverse"] : t.text["high-emphasis"],
|
|
2452
|
+
fontWeight: l ? "700" : "500"
|
|
2453
|
+
}
|
|
2454
|
+
],
|
|
2455
|
+
children: a.label
|
|
2456
|
+
}
|
|
2457
|
+
),
|
|
2458
|
+
a.count !== void 0 && /* @__PURE__ */ e(
|
|
2459
|
+
c,
|
|
2460
|
+
{
|
|
2461
|
+
style: {
|
|
2462
|
+
paddingHorizontal: 6,
|
|
2463
|
+
borderRadius: 999,
|
|
2464
|
+
backgroundColor: l ? t.surface.primary : t.surface.tertiary,
|
|
2465
|
+
minWidth: 20,
|
|
2466
|
+
alignItems: "center"
|
|
2467
|
+
},
|
|
2468
|
+
children: /* @__PURE__ */ e(
|
|
2469
|
+
g,
|
|
2470
|
+
{
|
|
2471
|
+
style: [
|
|
2472
|
+
u("label.xs"),
|
|
2473
|
+
{ color: l ? t.text["accent-primary"] : t.text["medium-emphasis"] }
|
|
2474
|
+
],
|
|
2475
|
+
children: a.count
|
|
2476
|
+
}
|
|
2477
|
+
)
|
|
2478
|
+
}
|
|
2479
|
+
)
|
|
2480
|
+
]
|
|
2481
|
+
},
|
|
2482
|
+
a.value
|
|
2483
|
+
);
|
|
2484
|
+
})
|
|
2485
|
+
}
|
|
2486
|
+
);
|
|
2487
|
+
}
|
|
2488
|
+
const ke = se(null);
|
|
2489
|
+
function Se() {
|
|
2490
|
+
const s = oe(ke);
|
|
2491
|
+
if (!s) throw new Error("Tabs の内側で使ってください");
|
|
2492
|
+
return s;
|
|
2493
|
+
}
|
|
2494
|
+
function tr({ value: s, onChange: i, children: o }) {
|
|
2495
|
+
return /* @__PURE__ */ e(ke.Provider, { value: { value: s, onChange: i }, children: o });
|
|
2496
|
+
}
|
|
2497
|
+
function rr({ scrollable: s = !1, children: i }) {
|
|
2498
|
+
const { theme: o, scales: r } = b(), t = /* @__PURE__ */ e(
|
|
2499
|
+
c,
|
|
2500
|
+
{
|
|
2501
|
+
style: {
|
|
2502
|
+
flexDirection: "row",
|
|
2503
|
+
borderBottomWidth: 1,
|
|
2504
|
+
borderBottomColor: o.border["low-emphasis"],
|
|
2505
|
+
gap: r.spacing.scale[1]
|
|
2506
|
+
},
|
|
2507
|
+
children: i
|
|
2508
|
+
}
|
|
2509
|
+
);
|
|
2510
|
+
return s ? /* @__PURE__ */ e(W, { horizontal: !0, showsHorizontalScrollIndicator: !1, children: t }) : t;
|
|
2511
|
+
}
|
|
2512
|
+
function nr({ value: s, children: i, disabled: o }) {
|
|
2513
|
+
const { theme: r, scales: t } = b(), n = Se(), a = n.value === s;
|
|
2514
|
+
return /* @__PURE__ */ e(
|
|
2515
|
+
f,
|
|
2516
|
+
{
|
|
2517
|
+
onPress: () => !o && n.onChange(s),
|
|
2518
|
+
disabled: o,
|
|
2519
|
+
style: {
|
|
2520
|
+
paddingVertical: t.spacing.scale[2],
|
|
2521
|
+
paddingHorizontal: t.spacing.scale[3],
|
|
2522
|
+
borderBottomWidth: 2,
|
|
2523
|
+
borderBottomColor: a ? r.brand.primary : "transparent",
|
|
2524
|
+
opacity: o ? 0.4 : 1
|
|
2525
|
+
},
|
|
2526
|
+
children: /* @__PURE__ */ e(
|
|
2527
|
+
g,
|
|
2528
|
+
{
|
|
2529
|
+
style: [
|
|
2530
|
+
u("label.md"),
|
|
2531
|
+
{
|
|
2532
|
+
color: a ? r.text["accent-primary"] : r.text["medium-emphasis"],
|
|
2533
|
+
fontWeight: a ? "700" : "500"
|
|
2534
|
+
}
|
|
2535
|
+
],
|
|
2536
|
+
children: i
|
|
2537
|
+
}
|
|
2538
|
+
)
|
|
2539
|
+
}
|
|
2540
|
+
);
|
|
2541
|
+
}
|
|
2542
|
+
function or({ value: s, children: i }) {
|
|
2543
|
+
return Se().value !== s ? null : /* @__PURE__ */ e(c, { children: i });
|
|
2544
|
+
}
|
|
2545
|
+
const Ue = ["日", "月", "火", "水", "木", "金", "土"], Ze = ["S", "M", "T", "W", "T", "F", "S"], et = [
|
|
2546
|
+
"1月",
|
|
2547
|
+
"2月",
|
|
2548
|
+
"3月",
|
|
2549
|
+
"4月",
|
|
2550
|
+
"5月",
|
|
2551
|
+
"6月",
|
|
2552
|
+
"7月",
|
|
2553
|
+
"8月",
|
|
2554
|
+
"9月",
|
|
2555
|
+
"10月",
|
|
2556
|
+
"11月",
|
|
2557
|
+
"12月"
|
|
2558
|
+
];
|
|
2559
|
+
function tt(s) {
|
|
2560
|
+
return new Date(s.getFullYear(), s.getMonth(), 1);
|
|
2561
|
+
}
|
|
2562
|
+
function rt(s) {
|
|
2563
|
+
return new Date(s.getFullYear(), s.getMonth() + 1, 0).getDate();
|
|
2564
|
+
}
|
|
2565
|
+
function ye(s, i) {
|
|
2566
|
+
return s.getFullYear() === i.getFullYear() && s.getMonth() === i.getMonth() && s.getDate() === i.getDate();
|
|
2567
|
+
}
|
|
2568
|
+
function nt({ value: s, onChange: i, minDate: o, maxDate: r, locale: t = "ja" }) {
|
|
2569
|
+
const { theme: n, scales: a } = b(), [l, d] = S(s ?? /* @__PURE__ */ new Date()), m = t === "ja" ? Ue : Ze, h = U(() => {
|
|
2570
|
+
const w = tt(l).getDay(), v = rt(l), k = [];
|
|
2571
|
+
for (let D = 0; D < w; D++) k.push(null);
|
|
2572
|
+
for (let D = 1; D <= v; D++) k.push(new Date(l.getFullYear(), l.getMonth(), D));
|
|
2573
|
+
for (; k.length % 7 !== 0; ) k.push(null);
|
|
2574
|
+
return k;
|
|
2575
|
+
}, [l]), y = t === "ja" ? `${l.getFullYear()}年 ${et[l.getMonth()]}` : `${l.getFullYear()}-${String(l.getMonth() + 1).padStart(2, "0")}`, x = () => d((R) => new Date(R.getFullYear(), R.getMonth() - 1, 1)), C = () => d((R) => new Date(R.getFullYear(), R.getMonth() + 1, 1));
|
|
2576
|
+
return /* @__PURE__ */ p(
|
|
2577
|
+
c,
|
|
2578
|
+
{
|
|
2579
|
+
style: {
|
|
2580
|
+
backgroundColor: n.surface.primary,
|
|
2581
|
+
borderRadius: a.borderRadius.lg,
|
|
2582
|
+
borderWidth: 1,
|
|
2583
|
+
borderColor: n.border["low-emphasis"],
|
|
2584
|
+
padding: a.spacing.scale[3],
|
|
2585
|
+
gap: a.spacing.scale[2]
|
|
2586
|
+
},
|
|
2587
|
+
children: [
|
|
2588
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2589
|
+
/* @__PURE__ */ e(f, { onPress: x, hitSlop: 8, children: /* @__PURE__ */ e(g, { style: [u("label.lg"), { color: n.text["medium-emphasis"] }], children: "‹" }) }),
|
|
2590
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: n.text["high-emphasis"] }], children: y }),
|
|
2591
|
+
/* @__PURE__ */ e(f, { onPress: C, hitSlop: 8, children: /* @__PURE__ */ e(g, { style: [u("label.lg"), { color: n.text["medium-emphasis"] }], children: "›" }) })
|
|
2592
|
+
] }),
|
|
2593
|
+
/* @__PURE__ */ e(c, { style: { flexDirection: "row" }, children: m.map((R, w) => /* @__PURE__ */ e(c, { style: { flex: 1, alignItems: "center" }, children: /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: n.text["low-emphasis"] }], children: R }) }, w)) }),
|
|
2594
|
+
/* @__PURE__ */ e(c, { style: { flexDirection: "row", flexWrap: "wrap" }, children: h.map((R, w) => {
|
|
2595
|
+
if (!R) return /* @__PURE__ */ e(c, { style: { width: `${100 / 7}%`, aspectRatio: 1 } }, w);
|
|
2596
|
+
const v = o && R < new Date(o.getFullYear(), o.getMonth(), o.getDate()) || r && R > new Date(r.getFullYear(), r.getMonth(), r.getDate()), k = s && ye(R, s), D = ye(R, /* @__PURE__ */ new Date());
|
|
2597
|
+
return /* @__PURE__ */ e(c, { style: { width: `${100 / 7}%`, aspectRatio: 1, padding: 2 }, children: /* @__PURE__ */ e(
|
|
2598
|
+
f,
|
|
2599
|
+
{
|
|
2600
|
+
onPress: () => !v && i?.(R),
|
|
2601
|
+
disabled: !!v,
|
|
2602
|
+
style: {
|
|
2603
|
+
flex: 1,
|
|
2604
|
+
alignItems: "center",
|
|
2605
|
+
justifyContent: "center",
|
|
2606
|
+
borderRadius: a.borderRadius.full,
|
|
2607
|
+
backgroundColor: k ? n.brand.primary : "transparent",
|
|
2608
|
+
borderWidth: D && !k ? 1 : 0,
|
|
2609
|
+
borderColor: n.border["accent-primary"],
|
|
2610
|
+
opacity: v ? 0.3 : 1
|
|
2611
|
+
},
|
|
2612
|
+
children: /* @__PURE__ */ e(
|
|
2613
|
+
g,
|
|
2614
|
+
{
|
|
2615
|
+
style: [
|
|
2616
|
+
u("body.sm"),
|
|
2617
|
+
{
|
|
2618
|
+
color: k ? n.text["on-inverse"] : n.text["high-emphasis"],
|
|
2619
|
+
fontWeight: k || D ? "700" : "400"
|
|
2620
|
+
}
|
|
2621
|
+
],
|
|
2622
|
+
children: R.getDate()
|
|
2623
|
+
}
|
|
2624
|
+
)
|
|
2625
|
+
}
|
|
2626
|
+
) }, w);
|
|
2627
|
+
}) })
|
|
2628
|
+
]
|
|
2629
|
+
}
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
function ot(s) {
|
|
2633
|
+
return `${s.getFullYear()}/${String(s.getMonth() + 1).padStart(2, "0")}/${String(s.getDate()).padStart(2, "0")}`;
|
|
2634
|
+
}
|
|
2635
|
+
function sr({
|
|
2636
|
+
value: s,
|
|
2637
|
+
onChange: i,
|
|
2638
|
+
placeholder: o = "日付を選択",
|
|
2639
|
+
minDate: r,
|
|
2640
|
+
maxDate: t,
|
|
2641
|
+
disabled: n = !1,
|
|
2642
|
+
formatter: a = ot
|
|
2643
|
+
}) {
|
|
2644
|
+
const { theme: l, scales: d } = b(), [m, h] = S(!1), [y, x] = S(s);
|
|
2645
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2646
|
+
/* @__PURE__ */ p(
|
|
2647
|
+
f,
|
|
2648
|
+
{
|
|
2649
|
+
onPress: () => {
|
|
2650
|
+
n || (x(s), h(!0));
|
|
2651
|
+
},
|
|
2652
|
+
disabled: n,
|
|
2653
|
+
style: {
|
|
2654
|
+
flexDirection: "row",
|
|
2655
|
+
alignItems: "center",
|
|
2656
|
+
justifyContent: "space-between",
|
|
2657
|
+
minHeight: d.touchTargets.textInput.min,
|
|
2658
|
+
paddingHorizontal: d.spacing.scale[3],
|
|
2659
|
+
borderRadius: d.borderRadius.md,
|
|
2660
|
+
borderWidth: 1,
|
|
2661
|
+
borderColor: l.border["medium-emphasis"],
|
|
2662
|
+
backgroundColor: n ? l.surface.disable : l.surface.primary,
|
|
2663
|
+
opacity: n ? 0.6 : 1
|
|
2664
|
+
},
|
|
2665
|
+
children: [
|
|
2666
|
+
/* @__PURE__ */ e(
|
|
2667
|
+
g,
|
|
2668
|
+
{
|
|
2669
|
+
style: [
|
|
2670
|
+
u("body.md"),
|
|
2671
|
+
{ color: s ? l.text["high-emphasis"] : l.text["low-emphasis"] }
|
|
2672
|
+
],
|
|
2673
|
+
children: s ? a(s) : o
|
|
2674
|
+
}
|
|
2675
|
+
),
|
|
2676
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: l.text["low-emphasis"] }], children: "📅" })
|
|
2677
|
+
]
|
|
2678
|
+
}
|
|
2679
|
+
),
|
|
2680
|
+
/* @__PURE__ */ p(j, { open: m, onClose: () => h(!1), side: "bottom", title: "日付を選択", children: [
|
|
2681
|
+
/* @__PURE__ */ e(nt, { value: y, onChange: x, minDate: r, maxDate: t }),
|
|
2682
|
+
/* @__PURE__ */ p(
|
|
2683
|
+
c,
|
|
2684
|
+
{
|
|
2685
|
+
style: {
|
|
2686
|
+
flexDirection: "row",
|
|
2687
|
+
gap: d.spacing.scale[2],
|
|
2688
|
+
marginTop: d.spacing.scale[3]
|
|
2689
|
+
},
|
|
2690
|
+
children: [
|
|
2691
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: () => h(!1), children: "キャンセル" }) }),
|
|
2692
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
2693
|
+
z,
|
|
2694
|
+
{
|
|
2695
|
+
variant: "primary",
|
|
2696
|
+
disabled: !y,
|
|
2697
|
+
onPress: () => {
|
|
2698
|
+
y && i?.(y), h(!1);
|
|
2699
|
+
},
|
|
2700
|
+
children: "決定"
|
|
2701
|
+
}
|
|
2702
|
+
) })
|
|
2703
|
+
]
|
|
2704
|
+
}
|
|
2705
|
+
)
|
|
2706
|
+
] })
|
|
2707
|
+
] });
|
|
2708
|
+
}
|
|
2709
|
+
function ee(s) {
|
|
2710
|
+
return s.toString().padStart(2, "0");
|
|
2711
|
+
}
|
|
2712
|
+
function ar({
|
|
2713
|
+
value: s,
|
|
2714
|
+
onChange: i,
|
|
2715
|
+
placeholder: o = "時刻を選択",
|
|
2716
|
+
minuteStep: r = 5,
|
|
2717
|
+
disabled: t = !1
|
|
2718
|
+
}) {
|
|
2719
|
+
const { theme: n, scales: a } = b(), [l, d] = S(!1), [m, h] = S(s?.hour ?? 9), [y, x] = S(s?.minute ?? 0), C = Array.from({ length: 24 }, (w, v) => v), R = Array.from({ length: 60 / r }, (w, v) => v * r);
|
|
2720
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
2721
|
+
/* @__PURE__ */ p(
|
|
2722
|
+
f,
|
|
2723
|
+
{
|
|
2724
|
+
onPress: () => {
|
|
2725
|
+
t || (h(s?.hour ?? 9), x(s?.minute ?? 0), d(!0));
|
|
2726
|
+
},
|
|
2727
|
+
disabled: t,
|
|
2728
|
+
style: {
|
|
2729
|
+
flexDirection: "row",
|
|
2730
|
+
alignItems: "center",
|
|
2731
|
+
justifyContent: "space-between",
|
|
2732
|
+
minHeight: a.touchTargets.textInput.min,
|
|
2733
|
+
paddingHorizontal: a.spacing.scale[3],
|
|
2734
|
+
borderRadius: a.borderRadius.md,
|
|
2735
|
+
borderWidth: 1,
|
|
2736
|
+
borderColor: n.border["medium-emphasis"],
|
|
2737
|
+
backgroundColor: t ? n.surface.disable : n.surface.primary,
|
|
2738
|
+
opacity: t ? 0.6 : 1
|
|
2739
|
+
},
|
|
2740
|
+
children: [
|
|
2741
|
+
/* @__PURE__ */ e(
|
|
2742
|
+
g,
|
|
2743
|
+
{
|
|
2744
|
+
style: [
|
|
2745
|
+
u("body.md"),
|
|
2746
|
+
{ color: s ? n.text["high-emphasis"] : n.text["low-emphasis"] }
|
|
2747
|
+
],
|
|
2748
|
+
children: s ? `${ee(s.hour)}:${ee(s.minute)}` : o
|
|
2749
|
+
}
|
|
2750
|
+
),
|
|
2751
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: n.text["low-emphasis"] }], children: "🕐" })
|
|
2752
|
+
]
|
|
2753
|
+
}
|
|
2754
|
+
),
|
|
2755
|
+
/* @__PURE__ */ p(j, { open: l, onClose: () => d(!1), side: "bottom", title: "時刻を選択", children: [
|
|
2756
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", height: 220, gap: a.spacing.scale[3] }, children: [
|
|
2757
|
+
/* @__PURE__ */ e(W, { style: { flex: 1 }, showsVerticalScrollIndicator: !1, children: C.map((w) => /* @__PURE__ */ e(
|
|
2758
|
+
f,
|
|
2759
|
+
{
|
|
2760
|
+
onPress: () => h(w),
|
|
2761
|
+
style: {
|
|
2762
|
+
paddingVertical: a.spacing.scale[2],
|
|
2763
|
+
alignItems: "center",
|
|
2764
|
+
backgroundColor: m === w ? n.surface["accent-primary-light"] : "transparent",
|
|
2765
|
+
borderRadius: a.borderRadius.sm
|
|
2766
|
+
},
|
|
2767
|
+
children: /* @__PURE__ */ e(
|
|
2768
|
+
g,
|
|
2769
|
+
{
|
|
2770
|
+
style: [
|
|
2771
|
+
u("body.lg"),
|
|
2772
|
+
{
|
|
2773
|
+
color: m === w ? n.text["accent-primary"] : n.text["high-emphasis"],
|
|
2774
|
+
fontWeight: m === w ? "700" : "400"
|
|
2775
|
+
}
|
|
2776
|
+
],
|
|
2777
|
+
children: ee(w)
|
|
2778
|
+
}
|
|
2779
|
+
)
|
|
2780
|
+
},
|
|
2781
|
+
w
|
|
2782
|
+
)) }),
|
|
2783
|
+
/* @__PURE__ */ e(W, { style: { flex: 1 }, showsVerticalScrollIndicator: !1, children: R.map((w) => /* @__PURE__ */ e(
|
|
2784
|
+
f,
|
|
2785
|
+
{
|
|
2786
|
+
onPress: () => x(w),
|
|
2787
|
+
style: {
|
|
2788
|
+
paddingVertical: a.spacing.scale[2],
|
|
2789
|
+
alignItems: "center",
|
|
2790
|
+
backgroundColor: y === w ? n.surface["accent-primary-light"] : "transparent",
|
|
2791
|
+
borderRadius: a.borderRadius.sm
|
|
2792
|
+
},
|
|
2793
|
+
children: /* @__PURE__ */ e(
|
|
2794
|
+
g,
|
|
2795
|
+
{
|
|
2796
|
+
style: [
|
|
2797
|
+
u("body.lg"),
|
|
2798
|
+
{
|
|
2799
|
+
color: y === w ? n.text["accent-primary"] : n.text["high-emphasis"],
|
|
2800
|
+
fontWeight: y === w ? "700" : "400"
|
|
2801
|
+
}
|
|
2802
|
+
],
|
|
2803
|
+
children: ee(w)
|
|
2804
|
+
}
|
|
2805
|
+
)
|
|
2806
|
+
},
|
|
2807
|
+
w
|
|
2808
|
+
)) })
|
|
2809
|
+
] }),
|
|
2810
|
+
/* @__PURE__ */ p(
|
|
2811
|
+
c,
|
|
2812
|
+
{
|
|
2813
|
+
style: {
|
|
2814
|
+
flexDirection: "row",
|
|
2815
|
+
gap: a.spacing.scale[2],
|
|
2816
|
+
marginTop: a.spacing.scale[3]
|
|
2817
|
+
},
|
|
2818
|
+
children: [
|
|
2819
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(z, { variant: "tertiary", onPress: () => d(!1), children: "キャンセル" }) }),
|
|
2820
|
+
/* @__PURE__ */ e(c, { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
2821
|
+
z,
|
|
2822
|
+
{
|
|
2823
|
+
variant: "primary",
|
|
2824
|
+
onPress: () => {
|
|
2825
|
+
i?.({ hour: m, minute: y }), d(!1);
|
|
2826
|
+
},
|
|
2827
|
+
children: "決定"
|
|
2828
|
+
}
|
|
2829
|
+
) })
|
|
2830
|
+
]
|
|
2831
|
+
}
|
|
2832
|
+
)
|
|
2833
|
+
] })
|
|
2834
|
+
] });
|
|
2835
|
+
}
|
|
2836
|
+
function ir({ items: s, type: i = "single", defaultOpenKeys: o = [] }) {
|
|
2837
|
+
const { theme: r, scales: t } = b(), [n, a] = S(new Set(o)), l = (d) => {
|
|
2838
|
+
a((m) => {
|
|
2839
|
+
const h = new Set(i === "multiple" ? m : []);
|
|
2840
|
+
return m.has(d) ? h.delete(d) : h.add(d), h;
|
|
2841
|
+
});
|
|
2842
|
+
};
|
|
2843
|
+
return /* @__PURE__ */ e(
|
|
2844
|
+
c,
|
|
2845
|
+
{
|
|
2846
|
+
style: {
|
|
2847
|
+
borderRadius: t.borderRadius.lg,
|
|
2848
|
+
borderWidth: 1,
|
|
2849
|
+
borderColor: r.border["low-emphasis"],
|
|
2850
|
+
backgroundColor: r.surface.primary,
|
|
2851
|
+
overflow: "hidden"
|
|
2852
|
+
},
|
|
2853
|
+
children: s.map((d, m) => {
|
|
2854
|
+
const h = n.has(d.key);
|
|
2855
|
+
return /* @__PURE__ */ p(
|
|
2856
|
+
c,
|
|
2857
|
+
{
|
|
2858
|
+
style: {
|
|
2859
|
+
borderTopWidth: m === 0 ? 0 : 1,
|
|
2860
|
+
borderTopColor: r.border["low-emphasis"]
|
|
2861
|
+
},
|
|
2862
|
+
children: [
|
|
2863
|
+
/* @__PURE__ */ p(
|
|
2864
|
+
f,
|
|
2865
|
+
{
|
|
2866
|
+
onPress: () => l(d.key),
|
|
2867
|
+
style: ({ pressed: y }) => ({
|
|
2868
|
+
flexDirection: "row",
|
|
2869
|
+
alignItems: "center",
|
|
2870
|
+
justifyContent: "space-between",
|
|
2871
|
+
padding: t.spacing.scale[4],
|
|
2872
|
+
backgroundColor: y ? r.surface.secondary : "transparent"
|
|
2873
|
+
}),
|
|
2874
|
+
children: [
|
|
2875
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: r.text["high-emphasis"], flex: 1 }], children: d.title }),
|
|
2876
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: r.text["low-emphasis"] }], children: h ? "▾" : "▸" })
|
|
2877
|
+
]
|
|
2878
|
+
}
|
|
2879
|
+
),
|
|
2880
|
+
h && /* @__PURE__ */ e(
|
|
2881
|
+
c,
|
|
2882
|
+
{
|
|
2883
|
+
style: {
|
|
2884
|
+
paddingHorizontal: t.spacing.scale[4],
|
|
2885
|
+
paddingBottom: t.spacing.scale[4]
|
|
2886
|
+
},
|
|
2887
|
+
children: d.content
|
|
2888
|
+
}
|
|
2889
|
+
)
|
|
2890
|
+
]
|
|
2891
|
+
},
|
|
2892
|
+
d.key
|
|
2893
|
+
);
|
|
2894
|
+
})
|
|
2895
|
+
}
|
|
2896
|
+
);
|
|
2897
|
+
}
|
|
2898
|
+
function lr({ title: s, defaultOpen: i = !1, children: o }) {
|
|
2899
|
+
const { theme: r, scales: t } = b(), [n, a] = S(i);
|
|
2900
|
+
return /* @__PURE__ */ p(c, { children: [
|
|
2901
|
+
/* @__PURE__ */ p(
|
|
2902
|
+
f,
|
|
2903
|
+
{
|
|
2904
|
+
onPress: () => a((l) => !l),
|
|
2905
|
+
style: {
|
|
2906
|
+
flexDirection: "row",
|
|
2907
|
+
alignItems: "center",
|
|
2908
|
+
gap: t.spacing.scale[1]
|
|
2909
|
+
},
|
|
2910
|
+
children: [
|
|
2911
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: r.text["accent-primary"] }], children: n ? "▾" : "▸" }),
|
|
2912
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: r.text["accent-primary"] }], children: s })
|
|
2913
|
+
]
|
|
2914
|
+
}
|
|
2915
|
+
),
|
|
2916
|
+
n && /* @__PURE__ */ e(c, { style: { marginTop: t.spacing.scale[2] }, children: o })
|
|
2917
|
+
] });
|
|
2918
|
+
}
|
|
2919
|
+
function cr({ maxHeight: s, bordered: i, children: o, ...r }) {
|
|
2920
|
+
const { theme: t, scales: n } = b();
|
|
2921
|
+
return /* @__PURE__ */ e(
|
|
2922
|
+
c,
|
|
2923
|
+
{
|
|
2924
|
+
style: {
|
|
2925
|
+
maxHeight: s,
|
|
2926
|
+
borderWidth: i ? 1 : 0,
|
|
2927
|
+
borderColor: t.border["low-emphasis"],
|
|
2928
|
+
borderRadius: i ? n.borderRadius.lg : 0,
|
|
2929
|
+
overflow: "hidden"
|
|
2930
|
+
},
|
|
2931
|
+
children: /* @__PURE__ */ e(W, { ...r, children: o })
|
|
2932
|
+
}
|
|
2933
|
+
);
|
|
2934
|
+
}
|
|
2935
|
+
function st(s, i) {
|
|
2936
|
+
const o = [];
|
|
2937
|
+
for (let r = s; r <= i; r++) o.push(r);
|
|
2938
|
+
return o;
|
|
2939
|
+
}
|
|
2940
|
+
function dr({ page: s, total: i, onChange: o, windowSize: r = 5 }) {
|
|
2941
|
+
const { theme: t, scales: n } = b(), a = Math.floor(r / 2);
|
|
2942
|
+
let l = Math.max(1, s - a), d = Math.min(i, l + r - 1);
|
|
2943
|
+
d - l + 1 < r && (l = Math.max(1, d - r + 1));
|
|
2944
|
+
const m = st(l, d), h = (y, x, C = !1, R = !1) => /* @__PURE__ */ e(
|
|
2945
|
+
f,
|
|
2946
|
+
{
|
|
2947
|
+
onPress: () => x && !C && o?.(x),
|
|
2948
|
+
disabled: C || !x,
|
|
2949
|
+
style: ({ pressed: w }) => ({
|
|
2950
|
+
minWidth: 36,
|
|
2951
|
+
height: 36,
|
|
2952
|
+
alignItems: "center",
|
|
2953
|
+
justifyContent: "center",
|
|
2954
|
+
borderRadius: n.borderRadius.md,
|
|
2955
|
+
backgroundColor: R ? t.brand.primary : w ? t.active["tertiary-button"] : t.surface.primary,
|
|
2956
|
+
borderWidth: R ? 0 : 1,
|
|
2957
|
+
borderColor: t.border["low-emphasis"],
|
|
2958
|
+
opacity: C ? 0.4 : 1,
|
|
2959
|
+
paddingHorizontal: n.spacing.scale[2]
|
|
2960
|
+
}),
|
|
2961
|
+
children: /* @__PURE__ */ e(
|
|
2962
|
+
g,
|
|
2963
|
+
{
|
|
2964
|
+
style: [
|
|
2965
|
+
u("label.sm"),
|
|
2966
|
+
{ color: R ? t.text["on-inverse"] : t.text["high-emphasis"] }
|
|
2967
|
+
],
|
|
2968
|
+
children: y
|
|
2969
|
+
}
|
|
2970
|
+
)
|
|
2971
|
+
},
|
|
2972
|
+
y
|
|
2973
|
+
);
|
|
2974
|
+
return /* @__PURE__ */ p(c, { style: { flexDirection: "row", gap: n.spacing.scale[1], alignSelf: "center" }, children: [
|
|
2975
|
+
h("‹", s > 1 ? s - 1 : null, s <= 1),
|
|
2976
|
+
l > 1 && h("1", 1),
|
|
2977
|
+
l > 2 && h("…", null, !0),
|
|
2978
|
+
m.map((y) => h(String(y), y, !1, y === s)),
|
|
2979
|
+
d < i - 1 && h("…", null, !0),
|
|
2980
|
+
d < i && h(String(i), i),
|
|
2981
|
+
h("›", s < i ? s + 1 : null, s >= i)
|
|
2982
|
+
] });
|
|
2983
|
+
}
|
|
2984
|
+
function hr({ page: s, total: i, onChange: o }) {
|
|
2985
|
+
const { theme: r, scales: t } = b(), n = (a, l, d) => /* @__PURE__ */ e(
|
|
2986
|
+
f,
|
|
2987
|
+
{
|
|
2988
|
+
onPress: () => !d && o?.(l),
|
|
2989
|
+
disabled: d,
|
|
2990
|
+
style: ({ pressed: m }) => ({
|
|
2991
|
+
width: 40,
|
|
2992
|
+
height: 40,
|
|
2993
|
+
alignItems: "center",
|
|
2994
|
+
justifyContent: "center",
|
|
2995
|
+
borderRadius: t.borderRadius.full,
|
|
2996
|
+
backgroundColor: m ? r.active["tertiary-button"] : r.surface.secondary,
|
|
2997
|
+
opacity: d ? 0.4 : 1
|
|
2998
|
+
}),
|
|
2999
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: r.text["high-emphasis"] }], children: a })
|
|
3000
|
+
}
|
|
3001
|
+
);
|
|
3002
|
+
return /* @__PURE__ */ p(
|
|
3003
|
+
c,
|
|
3004
|
+
{
|
|
3005
|
+
style: {
|
|
3006
|
+
flexDirection: "row",
|
|
3007
|
+
alignItems: "center",
|
|
3008
|
+
gap: t.spacing.scale[3],
|
|
3009
|
+
alignSelf: "center"
|
|
3010
|
+
},
|
|
3011
|
+
children: [
|
|
3012
|
+
n("‹", s - 1, s <= 1),
|
|
3013
|
+
/* @__PURE__ */ p(g, { style: [u("label.md"), { color: r.text["medium-emphasis"] }], children: [
|
|
3014
|
+
s,
|
|
3015
|
+
" / ",
|
|
3016
|
+
i
|
|
3017
|
+
] }),
|
|
3018
|
+
n("›", s + 1, s >= i)
|
|
3019
|
+
]
|
|
3020
|
+
}
|
|
3021
|
+
);
|
|
3022
|
+
}
|
|
3023
|
+
function at({ items: s, value: i, onChange: o }) {
|
|
3024
|
+
const { theme: r, scales: t } = b();
|
|
3025
|
+
return /* @__PURE__ */ e(
|
|
3026
|
+
c,
|
|
3027
|
+
{
|
|
3028
|
+
style: {
|
|
3029
|
+
flexDirection: "row",
|
|
3030
|
+
backgroundColor: r.surface.primary,
|
|
3031
|
+
borderTopWidth: 1,
|
|
3032
|
+
borderTopColor: r.border["low-emphasis"],
|
|
3033
|
+
paddingBottom: N.OS === "ios" ? 24 : 0
|
|
3034
|
+
},
|
|
3035
|
+
children: s.map((n) => {
|
|
3036
|
+
const a = i === n.key;
|
|
3037
|
+
return /* @__PURE__ */ p(
|
|
3038
|
+
f,
|
|
3039
|
+
{
|
|
3040
|
+
onPress: () => {
|
|
3041
|
+
n.onPress?.(), o?.(n.key);
|
|
3042
|
+
},
|
|
3043
|
+
style: ({ pressed: l }) => ({
|
|
3044
|
+
flex: 1,
|
|
3045
|
+
alignItems: "center",
|
|
3046
|
+
justifyContent: "center",
|
|
3047
|
+
paddingVertical: t.spacing.scale[2],
|
|
3048
|
+
backgroundColor: l ? r.surface.secondary : "transparent",
|
|
3049
|
+
gap: 2,
|
|
3050
|
+
minHeight: t.touchTargets.navItem.min
|
|
3051
|
+
}),
|
|
3052
|
+
children: [
|
|
3053
|
+
/* @__PURE__ */ p(c, { style: { position: "relative" }, children: [
|
|
3054
|
+
n.icon,
|
|
3055
|
+
n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ e(
|
|
3056
|
+
c,
|
|
3057
|
+
{
|
|
3058
|
+
style: {
|
|
3059
|
+
position: "absolute",
|
|
3060
|
+
top: -4,
|
|
3061
|
+
right: -8,
|
|
3062
|
+
minWidth: 16,
|
|
3063
|
+
paddingHorizontal: 4,
|
|
3064
|
+
height: 16,
|
|
3065
|
+
borderRadius: 8,
|
|
3066
|
+
backgroundColor: r.caution.base,
|
|
3067
|
+
alignItems: "center",
|
|
3068
|
+
justifyContent: "center"
|
|
3069
|
+
},
|
|
3070
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: r.text["on-inverse"] }], children: n.badge > 99 ? "99+" : n.badge })
|
|
3071
|
+
}
|
|
3072
|
+
)
|
|
3073
|
+
] }),
|
|
3074
|
+
/* @__PURE__ */ e(
|
|
3075
|
+
g,
|
|
3076
|
+
{
|
|
3077
|
+
style: [
|
|
3078
|
+
u("label.xs"),
|
|
3079
|
+
{ color: a ? r.text["accent-primary"] : r.text["medium-emphasis"] }
|
|
3080
|
+
],
|
|
3081
|
+
children: n.label
|
|
3082
|
+
}
|
|
3083
|
+
)
|
|
3084
|
+
]
|
|
3085
|
+
},
|
|
3086
|
+
n.key
|
|
3087
|
+
);
|
|
3088
|
+
})
|
|
3089
|
+
}
|
|
3090
|
+
);
|
|
3091
|
+
}
|
|
3092
|
+
function ur({ items: s, value: i, onChange: o }) {
|
|
3093
|
+
const { theme: r, scales: t } = b();
|
|
3094
|
+
return /* @__PURE__ */ e(
|
|
3095
|
+
W,
|
|
3096
|
+
{
|
|
3097
|
+
horizontal: !0,
|
|
3098
|
+
showsHorizontalScrollIndicator: !1,
|
|
3099
|
+
contentContainerStyle: { paddingHorizontal: t.spacing.scale[3], gap: t.spacing.scale[2] },
|
|
3100
|
+
style: {
|
|
3101
|
+
backgroundColor: r.surface.primary,
|
|
3102
|
+
borderBottomWidth: 1,
|
|
3103
|
+
borderBottomColor: r.border["low-emphasis"]
|
|
3104
|
+
},
|
|
3105
|
+
children: s.map((n) => {
|
|
3106
|
+
const a = i === n.key;
|
|
3107
|
+
return /* @__PURE__ */ p(
|
|
3108
|
+
f,
|
|
3109
|
+
{
|
|
3110
|
+
onPress: () => o?.(n.key),
|
|
3111
|
+
style: {
|
|
3112
|
+
flexDirection: "row",
|
|
3113
|
+
alignItems: "center",
|
|
3114
|
+
gap: t.spacing.scale[1],
|
|
3115
|
+
paddingVertical: t.spacing.scale[3],
|
|
3116
|
+
borderBottomWidth: 2,
|
|
3117
|
+
borderBottomColor: a ? r.brand.primary : "transparent"
|
|
3118
|
+
},
|
|
3119
|
+
children: [
|
|
3120
|
+
/* @__PURE__ */ e(
|
|
3121
|
+
g,
|
|
3122
|
+
{
|
|
3123
|
+
style: [
|
|
3124
|
+
u("label.md"),
|
|
3125
|
+
{
|
|
3126
|
+
color: a ? r.text["accent-primary"] : r.text["medium-emphasis"],
|
|
3127
|
+
fontWeight: a ? "700" : "500"
|
|
3128
|
+
}
|
|
3129
|
+
],
|
|
3130
|
+
children: n.label
|
|
3131
|
+
}
|
|
3132
|
+
),
|
|
3133
|
+
n.count !== void 0 && /* @__PURE__ */ e(
|
|
3134
|
+
c,
|
|
3135
|
+
{
|
|
3136
|
+
style: {
|
|
3137
|
+
paddingHorizontal: 6,
|
|
3138
|
+
borderRadius: 999,
|
|
3139
|
+
backgroundColor: a ? r.surface["accent-primary-light"] : r.surface.tertiary,
|
|
3140
|
+
minWidth: 20,
|
|
3141
|
+
alignItems: "center"
|
|
3142
|
+
},
|
|
3143
|
+
children: /* @__PURE__ */ e(
|
|
3144
|
+
g,
|
|
3145
|
+
{
|
|
3146
|
+
style: [
|
|
3147
|
+
u("label.xs"),
|
|
3148
|
+
{ color: a ? r.text["accent-primary"] : r.text["medium-emphasis"] }
|
|
3149
|
+
],
|
|
3150
|
+
children: n.count
|
|
3151
|
+
}
|
|
3152
|
+
)
|
|
3153
|
+
}
|
|
3154
|
+
)
|
|
3155
|
+
]
|
|
3156
|
+
},
|
|
3157
|
+
n.key
|
|
3158
|
+
);
|
|
3159
|
+
})
|
|
3160
|
+
}
|
|
3161
|
+
);
|
|
3162
|
+
}
|
|
3163
|
+
function gr({ title: s, onBack: i, backLabel: o = "戻る", rightSlot: r }) {
|
|
3164
|
+
const { theme: t, scales: n } = b();
|
|
3165
|
+
return /* @__PURE__ */ p(
|
|
3166
|
+
c,
|
|
3167
|
+
{
|
|
3168
|
+
style: {
|
|
3169
|
+
flexDirection: "row",
|
|
3170
|
+
alignItems: "center",
|
|
3171
|
+
justifyContent: "space-between",
|
|
3172
|
+
gap: n.spacing.scale[2],
|
|
3173
|
+
paddingHorizontal: n.spacing.scale[3],
|
|
3174
|
+
paddingVertical: n.spacing.scale[2],
|
|
3175
|
+
backgroundColor: t.surface.primary,
|
|
3176
|
+
borderBottomWidth: 1,
|
|
3177
|
+
borderBottomColor: t.border["low-emphasis"]
|
|
3178
|
+
},
|
|
3179
|
+
children: [
|
|
3180
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", alignItems: "center", gap: n.spacing.scale[2], flex: 1 }, children: [
|
|
3181
|
+
i && /* @__PURE__ */ p(
|
|
3182
|
+
f,
|
|
3183
|
+
{
|
|
3184
|
+
onPress: i,
|
|
3185
|
+
hitSlop: 8,
|
|
3186
|
+
style: ({ pressed: a }) => ({
|
|
3187
|
+
padding: n.spacing.scale[1],
|
|
3188
|
+
borderRadius: n.borderRadius.md,
|
|
3189
|
+
backgroundColor: a ? t.surface.secondary : "transparent",
|
|
3190
|
+
flexDirection: "row",
|
|
3191
|
+
alignItems: "center",
|
|
3192
|
+
gap: 4
|
|
3193
|
+
}),
|
|
3194
|
+
children: [
|
|
3195
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: t.text["accent-primary"] }], children: "‹" }),
|
|
3196
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["accent-primary"] }], children: o })
|
|
3197
|
+
]
|
|
3198
|
+
}
|
|
3199
|
+
),
|
|
3200
|
+
/* @__PURE__ */ e(
|
|
3201
|
+
g,
|
|
3202
|
+
{
|
|
3203
|
+
numberOfLines: 1,
|
|
3204
|
+
style: [u("heading.md"), { color: t.text["high-emphasis"], flex: 1 }],
|
|
3205
|
+
children: s
|
|
3206
|
+
}
|
|
3207
|
+
)
|
|
3208
|
+
] }),
|
|
3209
|
+
r
|
|
3210
|
+
]
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
function pr({ title: s, subtitle: i, leading: o, trailing: r, onBack: t, centered: n = !0 }) {
|
|
3215
|
+
const { theme: a, scales: l } = b(), d = o ?? (t ? /* @__PURE__ */ e(
|
|
3216
|
+
f,
|
|
3217
|
+
{
|
|
3218
|
+
onPress: t,
|
|
3219
|
+
hitSlop: 8,
|
|
3220
|
+
style: ({ pressed: m }) => ({
|
|
3221
|
+
padding: l.spacing.scale[1],
|
|
3222
|
+
borderRadius: l.borderRadius.md,
|
|
3223
|
+
backgroundColor: m ? a.surface.secondary : "transparent"
|
|
3224
|
+
}),
|
|
3225
|
+
children: /* @__PURE__ */ e(g, { style: [u("heading.lg"), { color: a.text["high-emphasis"] }], children: "‹" })
|
|
3226
|
+
}
|
|
3227
|
+
) : null);
|
|
3228
|
+
return /* @__PURE__ */ p(
|
|
3229
|
+
c,
|
|
3230
|
+
{
|
|
3231
|
+
style: {
|
|
3232
|
+
flexDirection: "row",
|
|
3233
|
+
alignItems: "center",
|
|
3234
|
+
gap: l.spacing.scale[2],
|
|
3235
|
+
paddingHorizontal: l.spacing.scale[3],
|
|
3236
|
+
paddingTop: N.OS === "ios" ? 48 : l.spacing.scale[3],
|
|
3237
|
+
paddingBottom: l.spacing.scale[3],
|
|
3238
|
+
backgroundColor: a.surface.primary,
|
|
3239
|
+
borderBottomWidth: 1,
|
|
3240
|
+
borderBottomColor: a.border["low-emphasis"]
|
|
3241
|
+
},
|
|
3242
|
+
children: [
|
|
3243
|
+
/* @__PURE__ */ e(c, { style: { width: 44, alignItems: "flex-start" }, children: d }),
|
|
3244
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, alignItems: n ? "center" : "flex-start" }, children: [
|
|
3245
|
+
s && /* @__PURE__ */ e(
|
|
3246
|
+
g,
|
|
3247
|
+
{
|
|
3248
|
+
numberOfLines: 1,
|
|
3249
|
+
style: [u("heading.md"), { color: a.text["high-emphasis"] }],
|
|
3250
|
+
children: s
|
|
3251
|
+
}
|
|
3252
|
+
),
|
|
3253
|
+
i && /* @__PURE__ */ e(
|
|
3254
|
+
g,
|
|
3255
|
+
{
|
|
3256
|
+
numberOfLines: 1,
|
|
3257
|
+
style: [u("body.sm"), { color: a.text["medium-emphasis"] }],
|
|
3258
|
+
children: i
|
|
3259
|
+
}
|
|
3260
|
+
)
|
|
3261
|
+
] }),
|
|
3262
|
+
/* @__PURE__ */ e(c, { style: { minWidth: 44, alignItems: "flex-end" }, children: r })
|
|
3263
|
+
]
|
|
3264
|
+
}
|
|
3265
|
+
);
|
|
3266
|
+
}
|
|
3267
|
+
function it({ title: s, description: i, image: o, onPress: r, tone: t = "neutral", height: n = 140 }) {
|
|
3268
|
+
const { theme: a, scales: l } = b(), d = {
|
|
3269
|
+
neutral: { bg: a.surface.secondary, fg: a.text["high-emphasis"] },
|
|
3270
|
+
accent: { bg: a.surface["accent-primary-light"], fg: a.text["accent-primary"] },
|
|
3271
|
+
success: { bg: a.surface.success, fg: a.text.success },
|
|
3272
|
+
warning: { bg: a.surface.warning, fg: a.text.warning },
|
|
3273
|
+
caution: { bg: a.surface.caution, fg: a.text.caution }
|
|
3274
|
+
}[t], m = /* @__PURE__ */ p(
|
|
3275
|
+
c,
|
|
3276
|
+
{
|
|
3277
|
+
style: {
|
|
3278
|
+
height: n,
|
|
3279
|
+
borderRadius: l.borderRadius.lg,
|
|
3280
|
+
backgroundColor: d.bg,
|
|
3281
|
+
overflow: "hidden"
|
|
3282
|
+
},
|
|
3283
|
+
children: [
|
|
3284
|
+
o && /* @__PURE__ */ e(
|
|
3285
|
+
Y,
|
|
3286
|
+
{
|
|
3287
|
+
source: o,
|
|
3288
|
+
resizeMode: "cover",
|
|
3289
|
+
style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }
|
|
3290
|
+
}
|
|
3291
|
+
),
|
|
3292
|
+
/* @__PURE__ */ p(
|
|
3293
|
+
c,
|
|
3294
|
+
{
|
|
3295
|
+
style: {
|
|
3296
|
+
flex: 1,
|
|
3297
|
+
padding: l.spacing.scale[4],
|
|
3298
|
+
justifyContent: "flex-end",
|
|
3299
|
+
backgroundColor: o ? a.surface["videoOverlay-light"] : "transparent"
|
|
3300
|
+
},
|
|
3301
|
+
children: [
|
|
3302
|
+
s && /* @__PURE__ */ e(
|
|
3303
|
+
g,
|
|
3304
|
+
{
|
|
3305
|
+
style: [
|
|
3306
|
+
u("heading.lg"),
|
|
3307
|
+
{ color: o ? a.text["on-inverse"] : d.fg }
|
|
3308
|
+
],
|
|
3309
|
+
children: s
|
|
3310
|
+
}
|
|
3311
|
+
),
|
|
3312
|
+
i && /* @__PURE__ */ e(
|
|
3313
|
+
g,
|
|
3314
|
+
{
|
|
3315
|
+
style: [
|
|
3316
|
+
u("body.sm"),
|
|
3317
|
+
{ color: o ? a.text["on-inverse-secondary"] : a.text["medium-emphasis"] }
|
|
3318
|
+
],
|
|
3319
|
+
children: i
|
|
3320
|
+
}
|
|
3321
|
+
)
|
|
3322
|
+
]
|
|
3323
|
+
}
|
|
3324
|
+
)
|
|
3325
|
+
]
|
|
3326
|
+
}
|
|
3327
|
+
);
|
|
3328
|
+
return r ? /* @__PURE__ */ e(f, { onPress: r, children: m }) : m;
|
|
3329
|
+
}
|
|
3330
|
+
function mr({
|
|
3331
|
+
banners: s,
|
|
3332
|
+
itemWidth: i,
|
|
3333
|
+
height: o = 160,
|
|
3334
|
+
showIndicator: r = !0
|
|
3335
|
+
}) {
|
|
3336
|
+
const { theme: t, scales: n } = b(), [a, l] = S(0), d = i ?? E.get("window").width - 32, m = P(null), h = (y) => {
|
|
3337
|
+
const x = y.nativeEvent.contentOffset.x, C = Math.round(x / (d + n.spacing.scale[2]));
|
|
3338
|
+
C !== a && l(C);
|
|
3339
|
+
};
|
|
3340
|
+
return /* @__PURE__ */ p(c, { style: { gap: n.spacing.scale[2] }, children: [
|
|
3341
|
+
/* @__PURE__ */ e(
|
|
3342
|
+
L,
|
|
3343
|
+
{
|
|
3344
|
+
ref: m,
|
|
3345
|
+
data: s,
|
|
3346
|
+
horizontal: !0,
|
|
3347
|
+
showsHorizontalScrollIndicator: !1,
|
|
3348
|
+
snapToInterval: d + n.spacing.scale[2],
|
|
3349
|
+
decelerationRate: "fast",
|
|
3350
|
+
onScroll: h,
|
|
3351
|
+
scrollEventThrottle: 16,
|
|
3352
|
+
keyExtractor: (y, x) => String(x),
|
|
3353
|
+
contentContainerStyle: { paddingHorizontal: n.spacing.scale[4], gap: n.spacing.scale[2] },
|
|
3354
|
+
renderItem: ({ item: y }) => /* @__PURE__ */ e(c, { style: { width: d, height: o }, children: /* @__PURE__ */ e(it, { ...y, height: o }) })
|
|
3355
|
+
}
|
|
3356
|
+
),
|
|
3357
|
+
r && s.length > 1 && /* @__PURE__ */ e(
|
|
3358
|
+
c,
|
|
3359
|
+
{
|
|
3360
|
+
style: {
|
|
3361
|
+
flexDirection: "row",
|
|
3362
|
+
gap: 6,
|
|
3363
|
+
alignSelf: "center"
|
|
3364
|
+
},
|
|
3365
|
+
children: s.map((y, x) => /* @__PURE__ */ e(
|
|
3366
|
+
c,
|
|
3367
|
+
{
|
|
3368
|
+
style: {
|
|
3369
|
+
width: x === a ? 16 : 6,
|
|
3370
|
+
height: 6,
|
|
3371
|
+
borderRadius: 3,
|
|
3372
|
+
backgroundColor: x === a ? t.brand.primary : t.surface.tertiary
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
x
|
|
3376
|
+
))
|
|
3377
|
+
}
|
|
3378
|
+
)
|
|
3379
|
+
] });
|
|
3380
|
+
}
|
|
3381
|
+
function yr({
|
|
3382
|
+
value: s,
|
|
3383
|
+
onChange: i,
|
|
3384
|
+
placeholder: o = "検索",
|
|
3385
|
+
onSubmit: r,
|
|
3386
|
+
onClear: t,
|
|
3387
|
+
autoFocus: n
|
|
3388
|
+
}) {
|
|
3389
|
+
const { theme: a, scales: l } = b();
|
|
3390
|
+
return /* @__PURE__ */ p(
|
|
3391
|
+
c,
|
|
3392
|
+
{
|
|
3393
|
+
style: {
|
|
3394
|
+
flexDirection: "row",
|
|
3395
|
+
alignItems: "center",
|
|
3396
|
+
gap: l.spacing.scale[2],
|
|
3397
|
+
paddingHorizontal: l.spacing.scale[3],
|
|
3398
|
+
height: 44,
|
|
3399
|
+
backgroundColor: a.surface.secondary,
|
|
3400
|
+
borderRadius: l.borderRadius.full
|
|
3401
|
+
},
|
|
3402
|
+
children: [
|
|
3403
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: a.text["low-emphasis"] }], children: "🔍" }),
|
|
3404
|
+
/* @__PURE__ */ e(
|
|
3405
|
+
G,
|
|
3406
|
+
{
|
|
3407
|
+
value: s,
|
|
3408
|
+
onChangeText: i,
|
|
3409
|
+
onSubmitEditing: r,
|
|
3410
|
+
placeholder: o,
|
|
3411
|
+
placeholderTextColor: a.text["low-emphasis"],
|
|
3412
|
+
returnKeyType: "search",
|
|
3413
|
+
autoFocus: n,
|
|
3414
|
+
style: [
|
|
3415
|
+
u("body.md"),
|
|
3416
|
+
{ flex: 1, color: a.text["high-emphasis"], paddingVertical: 0 }
|
|
3417
|
+
]
|
|
3418
|
+
}
|
|
3419
|
+
),
|
|
3420
|
+
s.length > 0 && /* @__PURE__ */ e(
|
|
3421
|
+
f,
|
|
3422
|
+
{
|
|
3423
|
+
onPress: () => {
|
|
3424
|
+
i(""), t?.();
|
|
3425
|
+
},
|
|
3426
|
+
hitSlop: 8,
|
|
3427
|
+
children: /* @__PURE__ */ e(
|
|
3428
|
+
c,
|
|
3429
|
+
{
|
|
3430
|
+
style: {
|
|
3431
|
+
width: 20,
|
|
3432
|
+
height: 20,
|
|
3433
|
+
borderRadius: 10,
|
|
3434
|
+
backgroundColor: a.surface.tertiary,
|
|
3435
|
+
alignItems: "center",
|
|
3436
|
+
justifyContent: "center"
|
|
3437
|
+
},
|
|
3438
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.xs"), { color: a.text["medium-emphasis"] }], children: "×" })
|
|
3439
|
+
}
|
|
3440
|
+
)
|
|
3441
|
+
}
|
|
3442
|
+
)
|
|
3443
|
+
]
|
|
3444
|
+
}
|
|
3445
|
+
);
|
|
3446
|
+
}
|
|
3447
|
+
function br({
|
|
3448
|
+
leading: s,
|
|
3449
|
+
title: i,
|
|
3450
|
+
description: o,
|
|
3451
|
+
trailing: r,
|
|
3452
|
+
showChevron: t,
|
|
3453
|
+
onPress: n,
|
|
3454
|
+
disabled: a
|
|
3455
|
+
}) {
|
|
3456
|
+
const { theme: l, scales: d } = b(), m = (h = !1) => /* @__PURE__ */ p(
|
|
3457
|
+
c,
|
|
3458
|
+
{
|
|
3459
|
+
style: {
|
|
3460
|
+
flexDirection: "row",
|
|
3461
|
+
alignItems: "center",
|
|
3462
|
+
gap: d.spacing.scale[3],
|
|
3463
|
+
paddingHorizontal: d.spacing.scale[4],
|
|
3464
|
+
paddingVertical: d.spacing.scale[3],
|
|
3465
|
+
backgroundColor: h ? l.surface.secondary : l.surface.primary,
|
|
3466
|
+
opacity: a ? 0.5 : 1
|
|
3467
|
+
},
|
|
3468
|
+
children: [
|
|
3469
|
+
s,
|
|
3470
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 2 }, children: [
|
|
3471
|
+
typeof i == "string" ? /* @__PURE__ */ e(g, { style: [u("body.md"), { color: l.text["high-emphasis"] }], children: i }) : i,
|
|
3472
|
+
o && typeof o == "string" ? /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: l.text["medium-emphasis"] }], children: o }) : o
|
|
3473
|
+
] }),
|
|
3474
|
+
r,
|
|
3475
|
+
t && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.text["low-emphasis"] }], children: "›" })
|
|
3476
|
+
]
|
|
3477
|
+
}
|
|
3478
|
+
);
|
|
3479
|
+
return n ? /* @__PURE__ */ e(f, { disabled: a, onPress: n, children: ({ pressed: h }) => m(h) }) : m(!1);
|
|
3480
|
+
}
|
|
3481
|
+
function fr({ title: s, description: i, icon: o, action: r }) {
|
|
3482
|
+
const { theme: t, scales: n } = b();
|
|
3483
|
+
return /* @__PURE__ */ p(
|
|
3484
|
+
c,
|
|
3485
|
+
{
|
|
3486
|
+
style: {
|
|
3487
|
+
alignItems: "center",
|
|
3488
|
+
justifyContent: "center",
|
|
3489
|
+
padding: n.spacing.scale[8],
|
|
3490
|
+
gap: n.spacing.scale[3]
|
|
3491
|
+
},
|
|
3492
|
+
children: [
|
|
3493
|
+
o ?? /* @__PURE__ */ e(
|
|
3494
|
+
c,
|
|
3495
|
+
{
|
|
3496
|
+
style: {
|
|
3497
|
+
width: 64,
|
|
3498
|
+
height: 64,
|
|
3499
|
+
borderRadius: 32,
|
|
3500
|
+
backgroundColor: t.surface.secondary,
|
|
3501
|
+
alignItems: "center",
|
|
3502
|
+
justifyContent: "center"
|
|
3503
|
+
},
|
|
3504
|
+
children: /* @__PURE__ */ e(g, { style: { fontSize: 28, color: t.text["low-emphasis"] }, children: "📭" })
|
|
3505
|
+
}
|
|
3506
|
+
),
|
|
3507
|
+
/* @__PURE__ */ e(
|
|
3508
|
+
g,
|
|
3509
|
+
{
|
|
3510
|
+
style: [u("heading.md"), { color: t.text["high-emphasis"], textAlign: "center" }],
|
|
3511
|
+
children: s
|
|
3512
|
+
}
|
|
3513
|
+
),
|
|
3514
|
+
i && /* @__PURE__ */ e(
|
|
3515
|
+
g,
|
|
3516
|
+
{
|
|
3517
|
+
style: [u("body.md"), { color: t.text["medium-emphasis"], textAlign: "center" }],
|
|
3518
|
+
children: i
|
|
3519
|
+
}
|
|
3520
|
+
),
|
|
3521
|
+
r
|
|
3522
|
+
]
|
|
3523
|
+
}
|
|
3524
|
+
);
|
|
3525
|
+
}
|
|
3526
|
+
function xr({
|
|
3527
|
+
title: s = "エラーが発生しました",
|
|
3528
|
+
description: i = "時間をおいて再度お試しください。",
|
|
3529
|
+
icon: o,
|
|
3530
|
+
action: r
|
|
3531
|
+
}) {
|
|
3532
|
+
const { theme: t, scales: n } = b();
|
|
3533
|
+
return /* @__PURE__ */ p(
|
|
3534
|
+
c,
|
|
3535
|
+
{
|
|
3536
|
+
style: {
|
|
3537
|
+
alignItems: "center",
|
|
3538
|
+
justifyContent: "center",
|
|
3539
|
+
padding: n.spacing.scale[8],
|
|
3540
|
+
gap: n.spacing.scale[3]
|
|
3541
|
+
},
|
|
3542
|
+
children: [
|
|
3543
|
+
o ?? /* @__PURE__ */ e(
|
|
3544
|
+
c,
|
|
3545
|
+
{
|
|
3546
|
+
style: {
|
|
3547
|
+
width: 64,
|
|
3548
|
+
height: 64,
|
|
3549
|
+
borderRadius: 32,
|
|
3550
|
+
backgroundColor: t.surface.caution,
|
|
3551
|
+
alignItems: "center",
|
|
3552
|
+
justifyContent: "center"
|
|
3553
|
+
},
|
|
3554
|
+
children: /* @__PURE__ */ e(g, { style: { fontSize: 28, color: t.text.caution }, children: "!" })
|
|
3555
|
+
}
|
|
3556
|
+
),
|
|
3557
|
+
/* @__PURE__ */ e(
|
|
3558
|
+
g,
|
|
3559
|
+
{
|
|
3560
|
+
style: [u("heading.md"), { color: t.text["high-emphasis"], textAlign: "center" }],
|
|
3561
|
+
children: s
|
|
3562
|
+
}
|
|
3563
|
+
),
|
|
3564
|
+
/* @__PURE__ */ e(
|
|
3565
|
+
g,
|
|
3566
|
+
{
|
|
3567
|
+
style: [u("body.md"), { color: t.text["medium-emphasis"], textAlign: "center" }],
|
|
3568
|
+
children: i
|
|
3569
|
+
}
|
|
3570
|
+
),
|
|
3571
|
+
r
|
|
3572
|
+
]
|
|
3573
|
+
}
|
|
3574
|
+
);
|
|
3575
|
+
}
|
|
3576
|
+
function lt({ title: s, description: i, action: o, variant: r = "default" }) {
|
|
3577
|
+
const { theme: t, scales: n } = b();
|
|
3578
|
+
return /* @__PURE__ */ p(
|
|
3579
|
+
c,
|
|
3580
|
+
{
|
|
3581
|
+
style: {
|
|
3582
|
+
flexDirection: "row",
|
|
3583
|
+
alignItems: "center",
|
|
3584
|
+
justifyContent: "space-between",
|
|
3585
|
+
paddingHorizontal: n.spacing.scale[4],
|
|
3586
|
+
paddingVertical: n.spacing.scale[2],
|
|
3587
|
+
gap: n.spacing.scale[2]
|
|
3588
|
+
},
|
|
3589
|
+
children: [
|
|
3590
|
+
/* @__PURE__ */ p(c, { style: { flex: 1 }, children: [
|
|
3591
|
+
/* @__PURE__ */ e(
|
|
3592
|
+
g,
|
|
3593
|
+
{
|
|
3594
|
+
style: [
|
|
3595
|
+
u(r === "subtle" ? "label.md" : "heading.md"),
|
|
3596
|
+
{ color: t.text["high-emphasis"] }
|
|
3597
|
+
],
|
|
3598
|
+
children: s
|
|
3599
|
+
}
|
|
3600
|
+
),
|
|
3601
|
+
i && /* @__PURE__ */ e(
|
|
3602
|
+
g,
|
|
3603
|
+
{
|
|
3604
|
+
style: [u("body.sm"), { color: t.text["medium-emphasis"], marginTop: 2 }],
|
|
3605
|
+
children: i
|
|
3606
|
+
}
|
|
3607
|
+
)
|
|
3608
|
+
] }),
|
|
3609
|
+
o && /* @__PURE__ */ e(f, { onPress: o.onPress, hitSlop: 8, children: /* @__PURE__ */ p(g, { style: [u("label.sm"), { color: t.text["accent-primary"] }], children: [
|
|
3610
|
+
o.label,
|
|
3611
|
+
" ›"
|
|
3612
|
+
] }) })
|
|
3613
|
+
]
|
|
3614
|
+
}
|
|
3615
|
+
);
|
|
3616
|
+
}
|
|
3617
|
+
function wr({ children: s }) {
|
|
3618
|
+
const { theme: i, scales: o } = b();
|
|
3619
|
+
return /* @__PURE__ */ e(
|
|
3620
|
+
c,
|
|
3621
|
+
{
|
|
3622
|
+
style: {
|
|
3623
|
+
flexDirection: "row",
|
|
3624
|
+
gap: o.spacing.scale[2],
|
|
3625
|
+
padding: o.spacing.scale[4],
|
|
3626
|
+
paddingBottom: N.OS === "ios" ? 32 : o.spacing.scale[4],
|
|
3627
|
+
backgroundColor: i.surface.primary,
|
|
3628
|
+
borderTopWidth: 1,
|
|
3629
|
+
borderTopColor: i.border["low-emphasis"]
|
|
3630
|
+
},
|
|
3631
|
+
children: s
|
|
3632
|
+
}
|
|
3633
|
+
);
|
|
3634
|
+
}
|
|
3635
|
+
function Cr({ rightActions: s = [], actionWidth: i = 80, children: o }) {
|
|
3636
|
+
const { theme: r } = b(), t = P(new I.Value(0)).current, n = s.length * i, a = P(
|
|
3637
|
+
ae.create({
|
|
3638
|
+
onMoveShouldSetPanResponder: (l, d) => Math.abs(d.dx) > 8,
|
|
3639
|
+
onPanResponderMove: (l, d) => {
|
|
3640
|
+
const m = Math.min(0, Math.max(-n, d.dx));
|
|
3641
|
+
t.setValue(m);
|
|
3642
|
+
},
|
|
3643
|
+
onPanResponderRelease: (l, d) => {
|
|
3644
|
+
const m = d.dx < -n / 2;
|
|
3645
|
+
I.spring(t, {
|
|
3646
|
+
toValue: m ? -n : 0,
|
|
3647
|
+
useNativeDriver: !0
|
|
3648
|
+
}).start();
|
|
3649
|
+
}
|
|
3650
|
+
})
|
|
3651
|
+
).current;
|
|
3652
|
+
return /* @__PURE__ */ p(c, { style: { position: "relative", overflow: "hidden" }, children: [
|
|
3653
|
+
/* @__PURE__ */ e(
|
|
3654
|
+
c,
|
|
3655
|
+
{
|
|
3656
|
+
style: {
|
|
3657
|
+
position: "absolute",
|
|
3658
|
+
top: 0,
|
|
3659
|
+
right: 0,
|
|
3660
|
+
bottom: 0,
|
|
3661
|
+
flexDirection: "row"
|
|
3662
|
+
},
|
|
3663
|
+
children: s.map((l, d) => /* @__PURE__ */ e(
|
|
3664
|
+
f,
|
|
3665
|
+
{
|
|
3666
|
+
onPress: () => {
|
|
3667
|
+
I.spring(t, { toValue: 0, useNativeDriver: !0 }).start(), l.onPress();
|
|
3668
|
+
},
|
|
3669
|
+
style: {
|
|
3670
|
+
width: i,
|
|
3671
|
+
alignItems: "center",
|
|
3672
|
+
justifyContent: "center",
|
|
3673
|
+
backgroundColor: l.color ?? r.caution.base
|
|
3674
|
+
},
|
|
3675
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.textColor ?? r.text["on-inverse"] }], children: l.label })
|
|
3676
|
+
},
|
|
3677
|
+
d
|
|
3678
|
+
))
|
|
3679
|
+
}
|
|
3680
|
+
),
|
|
3681
|
+
/* @__PURE__ */ e(
|
|
3682
|
+
I.View,
|
|
3683
|
+
{
|
|
3684
|
+
style: {
|
|
3685
|
+
transform: [{ translateX: t }],
|
|
3686
|
+
backgroundColor: r.surface.primary
|
|
3687
|
+
},
|
|
3688
|
+
...a.panHandlers,
|
|
3689
|
+
children: o
|
|
3690
|
+
}
|
|
3691
|
+
)
|
|
3692
|
+
] });
|
|
3693
|
+
}
|
|
3694
|
+
function Rr({ copyright: s, links: i = [] }) {
|
|
3695
|
+
const { theme: o, scales: r } = b();
|
|
3696
|
+
return /* @__PURE__ */ p(
|
|
3697
|
+
c,
|
|
3698
|
+
{
|
|
3699
|
+
style: {
|
|
3700
|
+
backgroundColor: o.surface.secondary,
|
|
3701
|
+
padding: r.spacing.scale[4],
|
|
3702
|
+
gap: r.spacing.scale[2]
|
|
3703
|
+
},
|
|
3704
|
+
children: [
|
|
3705
|
+
/* @__PURE__ */ e(
|
|
3706
|
+
c,
|
|
3707
|
+
{
|
|
3708
|
+
style: {
|
|
3709
|
+
flexDirection: "row",
|
|
3710
|
+
flexWrap: "wrap",
|
|
3711
|
+
gap: r.spacing.scale[3]
|
|
3712
|
+
},
|
|
3713
|
+
children: i.map((t, n) => /* @__PURE__ */ e(f, { onPress: t.onPress, children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: o.text["medium-emphasis"] }], children: t.label }) }, n))
|
|
3714
|
+
}
|
|
3715
|
+
),
|
|
3716
|
+
s && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: o.text["low-emphasis"] }], children: s })
|
|
3717
|
+
]
|
|
3718
|
+
}
|
|
3719
|
+
);
|
|
3720
|
+
}
|
|
3721
|
+
function vr({
|
|
3722
|
+
title: s = "ファイルを選択",
|
|
3723
|
+
description: i = "タップしてアップロード",
|
|
3724
|
+
onPress: o,
|
|
3725
|
+
disabled: r = !1
|
|
3726
|
+
}) {
|
|
3727
|
+
const { theme: t, scales: n } = b();
|
|
3728
|
+
return /* @__PURE__ */ p(
|
|
3729
|
+
f,
|
|
3730
|
+
{
|
|
3731
|
+
onPress: o,
|
|
3732
|
+
disabled: r,
|
|
3733
|
+
style: ({ pressed: a }) => ({
|
|
3734
|
+
borderWidth: 2,
|
|
3735
|
+
borderStyle: "dashed",
|
|
3736
|
+
borderColor: a ? t.brand.primary : t.border["medium-emphasis"],
|
|
3737
|
+
borderRadius: n.borderRadius.lg,
|
|
3738
|
+
padding: n.spacing.scale[6],
|
|
3739
|
+
alignItems: "center",
|
|
3740
|
+
justifyContent: "center",
|
|
3741
|
+
gap: n.spacing.scale[1],
|
|
3742
|
+
backgroundColor: a ? t.surface.secondary : t.surface.primary,
|
|
3743
|
+
opacity: r ? 0.5 : 1
|
|
3744
|
+
}),
|
|
3745
|
+
children: [
|
|
3746
|
+
/* @__PURE__ */ e(g, { style: { fontSize: 28, color: t.text["low-emphasis"] }, children: "📤" }),
|
|
3747
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: t.text["high-emphasis"] }], children: s }),
|
|
3748
|
+
/* @__PURE__ */ e(g, { style: [u("body.sm"), { color: t.text["medium-emphasis"] }], children: i })
|
|
3749
|
+
]
|
|
3750
|
+
}
|
|
3751
|
+
);
|
|
3752
|
+
}
|
|
3753
|
+
function kr({
|
|
3754
|
+
options: s,
|
|
3755
|
+
values: i = [],
|
|
3756
|
+
onChange: o,
|
|
3757
|
+
multiple: r = !0
|
|
3758
|
+
}) {
|
|
3759
|
+
const { scales: t } = b(), n = (a) => {
|
|
3760
|
+
o?.(r ? i.includes(a) ? i.filter((l) => l !== a) : [...i, a] : i.includes(a) ? [] : [a]);
|
|
3761
|
+
};
|
|
3762
|
+
return /* @__PURE__ */ e(
|
|
3763
|
+
c,
|
|
3764
|
+
{
|
|
3765
|
+
style: {
|
|
3766
|
+
flexDirection: "row",
|
|
3767
|
+
flexWrap: "wrap",
|
|
3768
|
+
gap: t.spacing.scale[2]
|
|
3769
|
+
},
|
|
3770
|
+
children: s.map((a) => /* @__PURE__ */ e(
|
|
3771
|
+
we,
|
|
3772
|
+
{
|
|
3773
|
+
selected: i.includes(a.value),
|
|
3774
|
+
disabled: a.disabled,
|
|
3775
|
+
count: a.count,
|
|
3776
|
+
onPress: () => n(a.value),
|
|
3777
|
+
children: a.label
|
|
3778
|
+
},
|
|
3779
|
+
a.value
|
|
3780
|
+
))
|
|
3781
|
+
}
|
|
3782
|
+
);
|
|
3783
|
+
}
|
|
3784
|
+
function Sr({ items: s, value: i, onChange: o }) {
|
|
3785
|
+
const { theme: r, scales: t } = b();
|
|
3786
|
+
return /* @__PURE__ */ e(
|
|
3787
|
+
W,
|
|
3788
|
+
{
|
|
3789
|
+
horizontal: !0,
|
|
3790
|
+
showsHorizontalScrollIndicator: !1,
|
|
3791
|
+
contentContainerStyle: {
|
|
3792
|
+
gap: t.spacing.scale[3],
|
|
3793
|
+
paddingHorizontal: t.spacing.scale[4],
|
|
3794
|
+
paddingVertical: t.spacing.scale[2]
|
|
3795
|
+
},
|
|
3796
|
+
children: s.map((n) => {
|
|
3797
|
+
const a = i === n.key;
|
|
3798
|
+
return /* @__PURE__ */ p(
|
|
3799
|
+
f,
|
|
3800
|
+
{
|
|
3801
|
+
onPress: () => o?.(n.key),
|
|
3802
|
+
style: { alignItems: "center", gap: t.spacing.scale[1], width: 64 },
|
|
3803
|
+
children: [
|
|
3804
|
+
/* @__PURE__ */ e(
|
|
3805
|
+
c,
|
|
3806
|
+
{
|
|
3807
|
+
style: {
|
|
3808
|
+
width: 56,
|
|
3809
|
+
height: 56,
|
|
3810
|
+
borderRadius: 28,
|
|
3811
|
+
backgroundColor: a ? r.brand.primary : r.surface.secondary,
|
|
3812
|
+
alignItems: "center",
|
|
3813
|
+
justifyContent: "center"
|
|
3814
|
+
},
|
|
3815
|
+
children: n.icon
|
|
3816
|
+
}
|
|
3817
|
+
),
|
|
3818
|
+
/* @__PURE__ */ e(
|
|
3819
|
+
g,
|
|
3820
|
+
{
|
|
3821
|
+
numberOfLines: 1,
|
|
3822
|
+
style: [
|
|
3823
|
+
u("label.xs"),
|
|
3824
|
+
{ color: a ? r.text["accent-primary"] : r.text["medium-emphasis"] }
|
|
3825
|
+
],
|
|
3826
|
+
children: n.label
|
|
3827
|
+
}
|
|
3828
|
+
)
|
|
3829
|
+
]
|
|
3830
|
+
},
|
|
3831
|
+
n.key
|
|
3832
|
+
);
|
|
3833
|
+
})
|
|
3834
|
+
}
|
|
3835
|
+
);
|
|
3836
|
+
}
|
|
3837
|
+
function Ir({ items: s, value: i, onChange: o }) {
|
|
3838
|
+
const { theme: r, scales: t } = b();
|
|
3839
|
+
return /* @__PURE__ */ e(
|
|
3840
|
+
W,
|
|
3841
|
+
{
|
|
3842
|
+
horizontal: !0,
|
|
3843
|
+
showsHorizontalScrollIndicator: !1,
|
|
3844
|
+
contentContainerStyle: {
|
|
3845
|
+
gap: t.spacing.scale[2],
|
|
3846
|
+
paddingHorizontal: t.spacing.scale[4],
|
|
3847
|
+
paddingVertical: t.spacing.scale[2]
|
|
3848
|
+
},
|
|
3849
|
+
children: s.map((n) => {
|
|
3850
|
+
const a = i === n.key;
|
|
3851
|
+
return /* @__PURE__ */ p(
|
|
3852
|
+
f,
|
|
3853
|
+
{
|
|
3854
|
+
onPress: () => o?.(n.key),
|
|
3855
|
+
style: ({ pressed: l }) => ({
|
|
3856
|
+
flexDirection: "row",
|
|
3857
|
+
alignItems: "center",
|
|
3858
|
+
gap: 4,
|
|
3859
|
+
paddingHorizontal: t.spacing.scale[3],
|
|
3860
|
+
height: 36,
|
|
3861
|
+
borderRadius: t.borderRadius.full,
|
|
3862
|
+
backgroundColor: a ? r.brand.primary : l ? r.surface.tertiary : r.surface.secondary
|
|
3863
|
+
}),
|
|
3864
|
+
children: [
|
|
3865
|
+
/* @__PURE__ */ e(
|
|
3866
|
+
g,
|
|
3867
|
+
{
|
|
3868
|
+
style: [
|
|
3869
|
+
u("label.sm"),
|
|
3870
|
+
{
|
|
3871
|
+
color: a ? r.text["on-inverse"] : r.text["high-emphasis"],
|
|
3872
|
+
fontWeight: a ? "700" : "500"
|
|
3873
|
+
}
|
|
3874
|
+
],
|
|
3875
|
+
children: n.label
|
|
3876
|
+
}
|
|
3877
|
+
),
|
|
3878
|
+
n.count !== void 0 && /* @__PURE__ */ e(
|
|
3879
|
+
c,
|
|
3880
|
+
{
|
|
3881
|
+
style: {
|
|
3882
|
+
paddingHorizontal: 6,
|
|
3883
|
+
borderRadius: 999,
|
|
3884
|
+
backgroundColor: a ? r.surface.primary : r.surface.tertiary,
|
|
3885
|
+
minWidth: 20,
|
|
3886
|
+
alignItems: "center"
|
|
3887
|
+
},
|
|
3888
|
+
children: /* @__PURE__ */ e(
|
|
3889
|
+
g,
|
|
3890
|
+
{
|
|
3891
|
+
style: [
|
|
3892
|
+
u("label.xs"),
|
|
3893
|
+
{ color: a ? r.text["accent-primary"] : r.text["medium-emphasis"] }
|
|
3894
|
+
],
|
|
3895
|
+
children: n.count
|
|
3896
|
+
}
|
|
3897
|
+
)
|
|
3898
|
+
}
|
|
3899
|
+
)
|
|
3900
|
+
]
|
|
3901
|
+
},
|
|
3902
|
+
n.key
|
|
3903
|
+
);
|
|
3904
|
+
})
|
|
3905
|
+
}
|
|
3906
|
+
);
|
|
3907
|
+
}
|
|
3908
|
+
function Dr({ steps: s, current: i }) {
|
|
3909
|
+
const { theme: o, scales: r } = b();
|
|
3910
|
+
return /* @__PURE__ */ e(c, { style: { flexDirection: "row", alignItems: "flex-start", gap: 0 }, children: s.map((t, n) => {
|
|
3911
|
+
const a = n < i, l = n === i, d = a || l;
|
|
3912
|
+
return /* @__PURE__ */ p(X.Fragment, { children: [
|
|
3913
|
+
/* @__PURE__ */ p(c, { style: { alignItems: "center", flex: 1 }, children: [
|
|
3914
|
+
/* @__PURE__ */ e(
|
|
3915
|
+
c,
|
|
3916
|
+
{
|
|
3917
|
+
style: {
|
|
3918
|
+
width: 28,
|
|
3919
|
+
height: 28,
|
|
3920
|
+
borderRadius: 14,
|
|
3921
|
+
backgroundColor: d ? o.brand.primary : o.surface.tertiary,
|
|
3922
|
+
alignItems: "center",
|
|
3923
|
+
justifyContent: "center",
|
|
3924
|
+
borderWidth: 2,
|
|
3925
|
+
borderColor: l ? o.border["accent-primary"] : "transparent"
|
|
3926
|
+
},
|
|
3927
|
+
children: /* @__PURE__ */ e(
|
|
3928
|
+
g,
|
|
3929
|
+
{
|
|
3930
|
+
style: [
|
|
3931
|
+
u("label.xs"),
|
|
3932
|
+
{ color: d ? o.text["on-inverse"] : o.text["medium-emphasis"], fontWeight: "700" }
|
|
3933
|
+
],
|
|
3934
|
+
children: a ? "✓" : n + 1
|
|
3935
|
+
}
|
|
3936
|
+
)
|
|
3937
|
+
}
|
|
3938
|
+
),
|
|
3939
|
+
/* @__PURE__ */ e(
|
|
3940
|
+
g,
|
|
3941
|
+
{
|
|
3942
|
+
style: [
|
|
3943
|
+
u("label.xs"),
|
|
3944
|
+
{
|
|
3945
|
+
color: d ? o.text["accent-primary"] : o.text["medium-emphasis"],
|
|
3946
|
+
marginTop: 4,
|
|
3947
|
+
textAlign: "center"
|
|
3948
|
+
}
|
|
3949
|
+
],
|
|
3950
|
+
children: t.label
|
|
3951
|
+
}
|
|
3952
|
+
)
|
|
3953
|
+
] }),
|
|
3954
|
+
n < s.length - 1 && /* @__PURE__ */ e(
|
|
3955
|
+
c,
|
|
3956
|
+
{
|
|
3957
|
+
style: {
|
|
3958
|
+
flex: 0.5,
|
|
3959
|
+
height: 2,
|
|
3960
|
+
backgroundColor: a ? o.brand.primary : o.border["low-emphasis"],
|
|
3961
|
+
marginTop: 13
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
)
|
|
3965
|
+
] }, t.key);
|
|
3966
|
+
}) });
|
|
3967
|
+
}
|
|
3968
|
+
function Tr({ value: s = [], onChange: i, placeholder: o = "タグを入力", maxTags: r = 10 }) {
|
|
3969
|
+
const { theme: t, scales: n } = b(), [a, l] = S(""), d = () => {
|
|
3970
|
+
const h = a.trim();
|
|
3971
|
+
if (h) {
|
|
3972
|
+
if (s.includes(h)) {
|
|
3973
|
+
l("");
|
|
3974
|
+
return;
|
|
3975
|
+
}
|
|
3976
|
+
s.length >= r || (i?.([...s, h]), l(""));
|
|
3977
|
+
}
|
|
3978
|
+
}, m = (h) => {
|
|
3979
|
+
i?.(s.filter((y) => y !== h));
|
|
3980
|
+
};
|
|
3981
|
+
return /* @__PURE__ */ p(
|
|
3982
|
+
c,
|
|
3983
|
+
{
|
|
3984
|
+
style: {
|
|
3985
|
+
flexDirection: "row",
|
|
3986
|
+
flexWrap: "wrap",
|
|
3987
|
+
gap: n.spacing.scale[1],
|
|
3988
|
+
padding: n.spacing.scale[2],
|
|
3989
|
+
borderRadius: n.borderRadius.md,
|
|
3990
|
+
borderWidth: 1,
|
|
3991
|
+
borderColor: t.border["medium-emphasis"],
|
|
3992
|
+
backgroundColor: t.surface.primary
|
|
3993
|
+
},
|
|
3994
|
+
children: [
|
|
3995
|
+
s.map((h) => /* @__PURE__ */ p(
|
|
3996
|
+
c,
|
|
3997
|
+
{
|
|
3998
|
+
style: {
|
|
3999
|
+
flexDirection: "row",
|
|
4000
|
+
alignItems: "center",
|
|
4001
|
+
gap: 4,
|
|
4002
|
+
paddingLeft: n.spacing.scale[2],
|
|
4003
|
+
paddingRight: 4,
|
|
4004
|
+
height: 28,
|
|
4005
|
+
borderRadius: n.borderRadius.full,
|
|
4006
|
+
backgroundColor: t.surface["accent-primary-light"]
|
|
4007
|
+
},
|
|
4008
|
+
children: [
|
|
4009
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["accent-primary"] }], children: h }),
|
|
4010
|
+
/* @__PURE__ */ e(f, { onPress: () => m(h), hitSlop: 6, children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["accent-primary"] }], children: "×" }) })
|
|
4011
|
+
]
|
|
4012
|
+
},
|
|
4013
|
+
h
|
|
4014
|
+
)),
|
|
4015
|
+
/* @__PURE__ */ e(
|
|
4016
|
+
G,
|
|
4017
|
+
{
|
|
4018
|
+
value: a,
|
|
4019
|
+
onChangeText: l,
|
|
4020
|
+
onSubmitEditing: d,
|
|
4021
|
+
onBlur: d,
|
|
4022
|
+
placeholder: s.length === 0 ? o : "",
|
|
4023
|
+
placeholderTextColor: t.text["low-emphasis"],
|
|
4024
|
+
returnKeyType: "done",
|
|
4025
|
+
style: [
|
|
4026
|
+
u("body.md"),
|
|
4027
|
+
{
|
|
4028
|
+
minWidth: 100,
|
|
4029
|
+
flex: 1,
|
|
4030
|
+
color: t.text["high-emphasis"],
|
|
4031
|
+
paddingVertical: 4,
|
|
4032
|
+
paddingHorizontal: 4
|
|
4033
|
+
}
|
|
4034
|
+
]
|
|
4035
|
+
}
|
|
4036
|
+
)
|
|
4037
|
+
]
|
|
4038
|
+
}
|
|
4039
|
+
);
|
|
4040
|
+
}
|
|
4041
|
+
function Pr({ message: s, url: i, title: o, extra: r = [] }) {
|
|
4042
|
+
const { theme: t, scales: n } = b(), l = [
|
|
4043
|
+
{ label: "共有", onPress: async () => {
|
|
4044
|
+
try {
|
|
4045
|
+
await We.share({ message: [s, i].filter(Boolean).join(" "), title: o, url: i });
|
|
4046
|
+
} catch {
|
|
4047
|
+
}
|
|
4048
|
+
} },
|
|
4049
|
+
...r
|
|
4050
|
+
];
|
|
4051
|
+
return /* @__PURE__ */ e(c, { style: { flexDirection: "row", flexWrap: "wrap", gap: n.spacing.scale[2] }, children: l.map((d, m) => /* @__PURE__ */ e(
|
|
4052
|
+
f,
|
|
4053
|
+
{
|
|
4054
|
+
onPress: d.onPress,
|
|
4055
|
+
style: ({ pressed: h }) => ({
|
|
4056
|
+
flexDirection: "row",
|
|
4057
|
+
alignItems: "center",
|
|
4058
|
+
gap: n.spacing.scale[1],
|
|
4059
|
+
paddingHorizontal: n.spacing.scale[3],
|
|
4060
|
+
height: 40,
|
|
4061
|
+
borderRadius: n.borderRadius.full,
|
|
4062
|
+
backgroundColor: h ? t.active["secondary-button"] : t.surface["accent-primary-light"]
|
|
4063
|
+
}),
|
|
4064
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["accent-primary"] }], children: d.label })
|
|
4065
|
+
},
|
|
4066
|
+
m
|
|
4067
|
+
)) });
|
|
4068
|
+
}
|
|
4069
|
+
function Wr(s) {
|
|
4070
|
+
return /* @__PURE__ */ e(we, { ...s, shape: "pill", variant: "filled" });
|
|
4071
|
+
}
|
|
4072
|
+
function Hr({ images: s, initialIndex: i = 0, thumbnailSize: o = 80 }) {
|
|
4073
|
+
const { theme: r, scales: t } = b(), [n, a] = S({ open: !1, index: i }), l = E.get("window").width;
|
|
4074
|
+
return /* @__PURE__ */ p(F, { children: [
|
|
4075
|
+
/* @__PURE__ */ e(
|
|
4076
|
+
L,
|
|
4077
|
+
{
|
|
4078
|
+
data: s,
|
|
4079
|
+
horizontal: !0,
|
|
4080
|
+
showsHorizontalScrollIndicator: !1,
|
|
4081
|
+
contentContainerStyle: { gap: t.spacing.scale[2] },
|
|
4082
|
+
keyExtractor: (d, m) => String(m),
|
|
4083
|
+
renderItem: ({ item: d, index: m }) => /* @__PURE__ */ e(f, { onPress: () => a({ open: !0, index: m }), children: /* @__PURE__ */ e(
|
|
4084
|
+
Y,
|
|
4085
|
+
{
|
|
4086
|
+
source: d,
|
|
4087
|
+
style: {
|
|
4088
|
+
width: o,
|
|
4089
|
+
height: o,
|
|
4090
|
+
borderRadius: t.borderRadius.md,
|
|
4091
|
+
backgroundColor: r.surface.tertiary
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
) })
|
|
4095
|
+
}
|
|
4096
|
+
),
|
|
4097
|
+
/* @__PURE__ */ e(
|
|
4098
|
+
K,
|
|
4099
|
+
{
|
|
4100
|
+
visible: n.open,
|
|
4101
|
+
transparent: !0,
|
|
4102
|
+
animationType: "fade",
|
|
4103
|
+
onRequestClose: () => a({ ...n, open: !1 }),
|
|
4104
|
+
children: /* @__PURE__ */ p(c, { style: { flex: 1, backgroundColor: r.surface.inverse }, children: [
|
|
4105
|
+
/* @__PURE__ */ e(
|
|
4106
|
+
f,
|
|
4107
|
+
{
|
|
4108
|
+
onPress: () => a({ ...n, open: !1 }),
|
|
4109
|
+
style: { position: "absolute", top: 48, right: 16, zIndex: 1, padding: 8 },
|
|
4110
|
+
children: /* @__PURE__ */ e(g, { style: [u("heading.lg"), { color: r.text["on-inverse"] }], children: "×" })
|
|
4111
|
+
}
|
|
4112
|
+
),
|
|
4113
|
+
/* @__PURE__ */ e(
|
|
4114
|
+
L,
|
|
4115
|
+
{
|
|
4116
|
+
data: s,
|
|
4117
|
+
horizontal: !0,
|
|
4118
|
+
pagingEnabled: !0,
|
|
4119
|
+
initialScrollIndex: n.index,
|
|
4120
|
+
getItemLayout: (d, m) => ({
|
|
4121
|
+
length: l,
|
|
4122
|
+
offset: l * m,
|
|
4123
|
+
index: m
|
|
4124
|
+
}),
|
|
4125
|
+
keyExtractor: (d, m) => String(m),
|
|
4126
|
+
onScroll: (d) => {
|
|
4127
|
+
const m = Math.round(d.nativeEvent.contentOffset.x / l);
|
|
4128
|
+
m !== n.index && a((h) => ({ ...h, index: m }));
|
|
4129
|
+
},
|
|
4130
|
+
scrollEventThrottle: 32,
|
|
4131
|
+
renderItem: ({ item: d }) => /* @__PURE__ */ e(c, { style: { width: l, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(
|
|
4132
|
+
Y,
|
|
4133
|
+
{
|
|
4134
|
+
source: d,
|
|
4135
|
+
resizeMode: "contain",
|
|
4136
|
+
style: { width: l, height: "100%" }
|
|
4137
|
+
}
|
|
4138
|
+
) })
|
|
4139
|
+
}
|
|
4140
|
+
),
|
|
4141
|
+
/* @__PURE__ */ e(
|
|
4142
|
+
c,
|
|
4143
|
+
{
|
|
4144
|
+
style: {
|
|
4145
|
+
position: "absolute",
|
|
4146
|
+
bottom: 32,
|
|
4147
|
+
left: 0,
|
|
4148
|
+
right: 0,
|
|
4149
|
+
alignItems: "center"
|
|
4150
|
+
},
|
|
4151
|
+
children: /* @__PURE__ */ p(g, { style: [u("label.md"), { color: r.text["on-inverse"] }], children: [
|
|
4152
|
+
n.index + 1,
|
|
4153
|
+
" / ",
|
|
4154
|
+
s.length
|
|
4155
|
+
] })
|
|
4156
|
+
}
|
|
4157
|
+
)
|
|
4158
|
+
] })
|
|
4159
|
+
}
|
|
4160
|
+
)
|
|
4161
|
+
] });
|
|
4162
|
+
}
|
|
4163
|
+
const ct = {
|
|
4164
|
+
google: "Google でログイン",
|
|
4165
|
+
apple: "Apple でログイン",
|
|
4166
|
+
line: "LINE でログイン",
|
|
4167
|
+
amazon: "Amazon でログイン",
|
|
4168
|
+
github: "GitHub でログイン",
|
|
4169
|
+
x: "X でログイン"
|
|
4170
|
+
};
|
|
4171
|
+
function Mr({
|
|
4172
|
+
provider: s,
|
|
4173
|
+
label: i,
|
|
4174
|
+
onPress: o,
|
|
4175
|
+
disabled: r = !1
|
|
4176
|
+
}) {
|
|
4177
|
+
const { theme: t, scales: n } = b(), a = n.brandExternal, l = {
|
|
4178
|
+
google: {
|
|
4179
|
+
bg: t.surface.primary,
|
|
4180
|
+
fg: t.text["high-emphasis"],
|
|
4181
|
+
border: a.googleBorder
|
|
4182
|
+
},
|
|
4183
|
+
apple: {
|
|
4184
|
+
bg: a.apple,
|
|
4185
|
+
fg: t.text["on-inverse"],
|
|
4186
|
+
border: a.apple
|
|
4187
|
+
},
|
|
4188
|
+
line: {
|
|
4189
|
+
bg: a.line,
|
|
4190
|
+
fg: t.text["on-inverse"],
|
|
4191
|
+
border: a.line
|
|
4192
|
+
},
|
|
4193
|
+
amazon: {
|
|
4194
|
+
bg: a.amazon,
|
|
4195
|
+
fg: t.text["on-inverse"],
|
|
4196
|
+
border: a.amazon
|
|
4197
|
+
},
|
|
4198
|
+
github: {
|
|
4199
|
+
bg: t.surface.inverse,
|
|
4200
|
+
fg: t.text["on-inverse"],
|
|
4201
|
+
border: t.surface.inverse
|
|
4202
|
+
},
|
|
4203
|
+
x: {
|
|
4204
|
+
bg: t.surface.inverse,
|
|
4205
|
+
fg: t.text["on-inverse"],
|
|
4206
|
+
border: t.surface.inverse
|
|
4207
|
+
}
|
|
4208
|
+
}[s];
|
|
4209
|
+
return /* @__PURE__ */ e(
|
|
4210
|
+
f,
|
|
4211
|
+
{
|
|
4212
|
+
onPress: o,
|
|
4213
|
+
disabled: r,
|
|
4214
|
+
style: ({ pressed: d }) => ({
|
|
4215
|
+
minHeight: n.touchTargets.buttonCTA.min,
|
|
4216
|
+
paddingHorizontal: n.spacing.scale[5],
|
|
4217
|
+
alignItems: "center",
|
|
4218
|
+
justifyContent: "center",
|
|
4219
|
+
borderRadius: n.borderRadius.lg,
|
|
4220
|
+
borderWidth: 1,
|
|
4221
|
+
backgroundColor: l.bg,
|
|
4222
|
+
borderColor: l.border,
|
|
4223
|
+
opacity: r ? 0.5 : d ? 0.85 : 1
|
|
4224
|
+
}),
|
|
4225
|
+
children: /* @__PURE__ */ e(c, { style: { flexDirection: "row", alignItems: "center", gap: n.spacing.scale[2] }, children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.fg }], children: i ?? ct[s] }) })
|
|
4226
|
+
}
|
|
4227
|
+
);
|
|
4228
|
+
}
|
|
4229
|
+
const dt = {
|
|
4230
|
+
x: { color: "#000000", letter: "X" },
|
|
4231
|
+
instagram: { color: "#E4405F", letter: "IG" },
|
|
4232
|
+
youtube: { color: "#FF0000", letter: "YT" },
|
|
4233
|
+
tiktok: { color: "#000000", letter: "TT" },
|
|
4234
|
+
facebook: { color: "#1877F2", letter: "f" },
|
|
4235
|
+
line: { color: "#06C755", letter: "L" }
|
|
4236
|
+
};
|
|
4237
|
+
function zr({ brand: s, size: i = 24 }) {
|
|
4238
|
+
const { theme: o } = b(), r = dt[s];
|
|
4239
|
+
return /* @__PURE__ */ e(
|
|
4240
|
+
c,
|
|
4241
|
+
{
|
|
4242
|
+
style: {
|
|
4243
|
+
width: i,
|
|
4244
|
+
height: i,
|
|
4245
|
+
borderRadius: i / 2,
|
|
4246
|
+
backgroundColor: r.color,
|
|
4247
|
+
alignItems: "center",
|
|
4248
|
+
justifyContent: "center"
|
|
4249
|
+
},
|
|
4250
|
+
children: /* @__PURE__ */ e(
|
|
4251
|
+
g,
|
|
4252
|
+
{
|
|
4253
|
+
style: {
|
|
4254
|
+
color: o.text["on-inverse"],
|
|
4255
|
+
fontSize: i * 0.5,
|
|
4256
|
+
fontWeight: "700"
|
|
4257
|
+
},
|
|
4258
|
+
children: r.letter
|
|
4259
|
+
}
|
|
4260
|
+
)
|
|
4261
|
+
}
|
|
4262
|
+
);
|
|
4263
|
+
}
|
|
4264
|
+
function Vr({ count: s = 3, variant: i = "row" }) {
|
|
4265
|
+
const { scales: o } = b();
|
|
4266
|
+
return /* @__PURE__ */ e(c, { style: { gap: o.spacing.scale[3] }, children: Array.from({ length: s }).map((r, t) => i === "card" ? /* @__PURE__ */ p(c, { style: { gap: o.spacing.scale[2] }, children: [
|
|
4267
|
+
/* @__PURE__ */ e(B, { height: 140, radius: o.borderRadius.lg }),
|
|
4268
|
+
/* @__PURE__ */ e(B, { height: 14, width: "60%" }),
|
|
4269
|
+
/* @__PURE__ */ e(B, { height: 12, width: "40%" })
|
|
4270
|
+
] }, t) : i === "list" ? /* @__PURE__ */ p(c, { style: { gap: 8 }, children: [
|
|
4271
|
+
/* @__PURE__ */ e(B, { height: 14, width: "80%" }),
|
|
4272
|
+
/* @__PURE__ */ e(B, { height: 12, width: "50%" })
|
|
4273
|
+
] }, t) : /* @__PURE__ */ p(c, { style: { flexDirection: "row", gap: o.spacing.scale[3], alignItems: "center" }, children: [
|
|
4274
|
+
/* @__PURE__ */ e(B, { width: 48, height: 48, radius: 24 }),
|
|
4275
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 6 }, children: [
|
|
4276
|
+
/* @__PURE__ */ e(B, { height: 14, width: "70%" }),
|
|
4277
|
+
/* @__PURE__ */ e(B, { height: 12, width: "50%" })
|
|
4278
|
+
] })
|
|
4279
|
+
] }, t)) });
|
|
4280
|
+
}
|
|
4281
|
+
function jr(s) {
|
|
4282
|
+
return /* @__PURE__ */ e(at, { ...s });
|
|
4283
|
+
}
|
|
4284
|
+
function Br({ filters: s, sortLabel: i = "並び替え", onPressSort: o }) {
|
|
4285
|
+
const { theme: r, scales: t } = b();
|
|
4286
|
+
return /* @__PURE__ */ p(
|
|
4287
|
+
c,
|
|
4288
|
+
{
|
|
4289
|
+
style: {
|
|
4290
|
+
flexDirection: "row",
|
|
4291
|
+
alignItems: "center",
|
|
4292
|
+
gap: t.spacing.scale[2],
|
|
4293
|
+
paddingHorizontal: t.spacing.scale[3],
|
|
4294
|
+
paddingVertical: t.spacing.scale[2],
|
|
4295
|
+
backgroundColor: r.surface.primary,
|
|
4296
|
+
borderBottomWidth: 1,
|
|
4297
|
+
borderBottomColor: r.border["low-emphasis"]
|
|
4298
|
+
},
|
|
4299
|
+
children: [
|
|
4300
|
+
/* @__PURE__ */ e(
|
|
4301
|
+
W,
|
|
4302
|
+
{
|
|
4303
|
+
horizontal: !0,
|
|
4304
|
+
showsHorizontalScrollIndicator: !1,
|
|
4305
|
+
contentContainerStyle: { gap: t.spacing.scale[2] },
|
|
4306
|
+
style: { flex: 1 },
|
|
4307
|
+
children: s.map((n) => {
|
|
4308
|
+
const a = n.active || !!n.value;
|
|
4309
|
+
return /* @__PURE__ */ p(
|
|
4310
|
+
f,
|
|
4311
|
+
{
|
|
4312
|
+
onPress: n.onPress,
|
|
4313
|
+
style: ({ pressed: l }) => ({
|
|
4314
|
+
flexDirection: "row",
|
|
4315
|
+
alignItems: "center",
|
|
4316
|
+
gap: 4,
|
|
4317
|
+
paddingHorizontal: t.spacing.scale[3],
|
|
4318
|
+
height: 32,
|
|
4319
|
+
borderRadius: t.borderRadius.full,
|
|
4320
|
+
borderWidth: 1,
|
|
4321
|
+
borderColor: a ? r.border["accent-primary"] : r.border["medium-emphasis"],
|
|
4322
|
+
backgroundColor: a ? r.surface["accent-primary-light"] : l ? r.surface.secondary : r.surface.primary
|
|
4323
|
+
}),
|
|
4324
|
+
children: [
|
|
4325
|
+
/* @__PURE__ */ p(
|
|
4326
|
+
g,
|
|
4327
|
+
{
|
|
4328
|
+
style: [
|
|
4329
|
+
u("label.sm"),
|
|
4330
|
+
{ color: a ? r.text["accent-primary"] : r.text["high-emphasis"] }
|
|
4331
|
+
],
|
|
4332
|
+
children: [
|
|
4333
|
+
n.label,
|
|
4334
|
+
n.value ? `: ${n.value}` : ""
|
|
4335
|
+
]
|
|
4336
|
+
}
|
|
4337
|
+
),
|
|
4338
|
+
/* @__PURE__ */ e(
|
|
4339
|
+
g,
|
|
4340
|
+
{
|
|
4341
|
+
style: [
|
|
4342
|
+
u("label.xs"),
|
|
4343
|
+
{ color: a ? r.text["accent-primary"] : r.text["low-emphasis"] }
|
|
4344
|
+
],
|
|
4345
|
+
children: "▾"
|
|
4346
|
+
}
|
|
4347
|
+
)
|
|
4348
|
+
]
|
|
4349
|
+
},
|
|
4350
|
+
n.key
|
|
4351
|
+
);
|
|
4352
|
+
})
|
|
4353
|
+
}
|
|
4354
|
+
),
|
|
4355
|
+
/* @__PURE__ */ e(
|
|
4356
|
+
f,
|
|
4357
|
+
{
|
|
4358
|
+
onPress: o,
|
|
4359
|
+
style: ({ pressed: n }) => ({
|
|
4360
|
+
paddingHorizontal: t.spacing.scale[2],
|
|
4361
|
+
height: 32,
|
|
4362
|
+
justifyContent: "center",
|
|
4363
|
+
borderRadius: t.borderRadius.full,
|
|
4364
|
+
backgroundColor: n ? r.active["tertiary-button"] : "transparent"
|
|
4365
|
+
}),
|
|
4366
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.sm"), { color: r.text["accent-primary"] }], children: i })
|
|
4367
|
+
}
|
|
4368
|
+
)
|
|
4369
|
+
]
|
|
4370
|
+
}
|
|
4371
|
+
);
|
|
4372
|
+
}
|
|
4373
|
+
function Fr({
|
|
4374
|
+
images: s,
|
|
4375
|
+
height: i = 280,
|
|
4376
|
+
showCounter: o = !0,
|
|
4377
|
+
showDots: r = !0
|
|
4378
|
+
}) {
|
|
4379
|
+
const { theme: t, scales: n } = b(), [a, l] = S(0), d = E.get("window").width;
|
|
4380
|
+
return /* @__PURE__ */ p(c, { children: [
|
|
4381
|
+
/* @__PURE__ */ e(
|
|
4382
|
+
L,
|
|
4383
|
+
{
|
|
4384
|
+
data: s,
|
|
4385
|
+
horizontal: !0,
|
|
4386
|
+
pagingEnabled: !0,
|
|
4387
|
+
showsHorizontalScrollIndicator: !1,
|
|
4388
|
+
onScroll: (h) => {
|
|
4389
|
+
const y = Math.round(h.nativeEvent.contentOffset.x / d);
|
|
4390
|
+
y !== a && l(y);
|
|
4391
|
+
},
|
|
4392
|
+
scrollEventThrottle: 16,
|
|
4393
|
+
keyExtractor: (h, y) => String(y),
|
|
4394
|
+
renderItem: ({ item: h }) => /* @__PURE__ */ e(c, { style: { width: d, height: i, backgroundColor: t.surface.tertiary }, children: /* @__PURE__ */ e(Y, { source: h, resizeMode: "cover", style: { width: "100%", height: "100%" } }) })
|
|
4395
|
+
}
|
|
4396
|
+
),
|
|
4397
|
+
o && s.length > 1 && /* @__PURE__ */ e(
|
|
4398
|
+
c,
|
|
4399
|
+
{
|
|
4400
|
+
style: {
|
|
4401
|
+
position: "absolute",
|
|
4402
|
+
top: n.spacing.scale[3],
|
|
4403
|
+
right: n.spacing.scale[3],
|
|
4404
|
+
paddingHorizontal: 10,
|
|
4405
|
+
paddingVertical: 4,
|
|
4406
|
+
borderRadius: n.borderRadius.full,
|
|
4407
|
+
backgroundColor: t.overlay.dark
|
|
4408
|
+
},
|
|
4409
|
+
children: /* @__PURE__ */ p(g, { style: [u("label.xs"), { color: t.text["on-inverse"] }], children: [
|
|
4410
|
+
a + 1,
|
|
4411
|
+
" / ",
|
|
4412
|
+
s.length
|
|
4413
|
+
] })
|
|
4414
|
+
}
|
|
4415
|
+
),
|
|
4416
|
+
r && s.length > 1 && /* @__PURE__ */ e(
|
|
4417
|
+
c,
|
|
4418
|
+
{
|
|
4419
|
+
style: {
|
|
4420
|
+
position: "absolute",
|
|
4421
|
+
bottom: n.spacing.scale[3],
|
|
4422
|
+
left: 0,
|
|
4423
|
+
right: 0,
|
|
4424
|
+
flexDirection: "row",
|
|
4425
|
+
justifyContent: "center",
|
|
4426
|
+
gap: 6
|
|
4427
|
+
},
|
|
4428
|
+
children: s.map((h, y) => /* @__PURE__ */ e(
|
|
4429
|
+
c,
|
|
4430
|
+
{
|
|
4431
|
+
style: {
|
|
4432
|
+
width: y === a ? 16 : 6,
|
|
4433
|
+
height: 6,
|
|
4434
|
+
borderRadius: 3,
|
|
4435
|
+
backgroundColor: y === a ? t.text["on-inverse"] : t.text["on-inverse-secondary"]
|
|
4436
|
+
}
|
|
4437
|
+
},
|
|
4438
|
+
y
|
|
4439
|
+
))
|
|
4440
|
+
}
|
|
4441
|
+
)
|
|
4442
|
+
] });
|
|
4443
|
+
}
|
|
4444
|
+
function be(s, i = "¥") {
|
|
4445
|
+
return `${i}${s.toLocaleString("ja-JP")}`;
|
|
4446
|
+
}
|
|
4447
|
+
function ht({
|
|
4448
|
+
price: s,
|
|
4449
|
+
originalPrice: i,
|
|
4450
|
+
currency: o = "¥",
|
|
4451
|
+
size: r = "md",
|
|
4452
|
+
showTax: t = !0
|
|
4453
|
+
}) {
|
|
4454
|
+
const { theme: n, scales: a } = b(), l = typeof i == "number" && i > s, d = l ? Math.round((1 - s / i) * 100) : 0, m = u(r === "lg" ? "heading.2xl" : r === "sm" ? "label.md" : "heading.lg");
|
|
4455
|
+
return /* @__PURE__ */ p(c, { style: { gap: 2 }, children: [
|
|
4456
|
+
/* @__PURE__ */ p(
|
|
4457
|
+
c,
|
|
4458
|
+
{
|
|
4459
|
+
style: {
|
|
4460
|
+
flexDirection: "row",
|
|
4461
|
+
alignItems: "baseline",
|
|
4462
|
+
gap: a.spacing.scale[2],
|
|
4463
|
+
flexWrap: "wrap"
|
|
4464
|
+
},
|
|
4465
|
+
children: [
|
|
4466
|
+
l && /* @__PURE__ */ p(
|
|
4467
|
+
g,
|
|
4468
|
+
{
|
|
4469
|
+
style: [
|
|
4470
|
+
u("label.md"),
|
|
4471
|
+
{ color: n.caution.base, fontWeight: "700" }
|
|
4472
|
+
],
|
|
4473
|
+
children: [
|
|
4474
|
+
d,
|
|
4475
|
+
"% OFF"
|
|
4476
|
+
]
|
|
4477
|
+
}
|
|
4478
|
+
),
|
|
4479
|
+
/* @__PURE__ */ e(g, { style: [m, { color: n.text["high-emphasis"] }], children: be(s, o) }),
|
|
4480
|
+
t && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: n.text["low-emphasis"] }], children: "税込" })
|
|
4481
|
+
]
|
|
4482
|
+
}
|
|
4483
|
+
),
|
|
4484
|
+
l && /* @__PURE__ */ e(
|
|
4485
|
+
g,
|
|
4486
|
+
{
|
|
4487
|
+
style: [
|
|
4488
|
+
u("body.sm"),
|
|
4489
|
+
{ color: n.text["low-emphasis"], textDecorationLine: "line-through" }
|
|
4490
|
+
],
|
|
4491
|
+
children: be(i, o)
|
|
4492
|
+
}
|
|
4493
|
+
)
|
|
4494
|
+
] });
|
|
4495
|
+
}
|
|
4496
|
+
function Or({ min: s = 1, ...i }) {
|
|
4497
|
+
return /* @__PURE__ */ e(Ye, { min: s, ...i });
|
|
4498
|
+
}
|
|
4499
|
+
function ut({ rating: s, count: i, size: o = 16, layout: r = "row" }) {
|
|
4500
|
+
const { theme: t, scales: n } = b();
|
|
4501
|
+
return /* @__PURE__ */ p(
|
|
4502
|
+
c,
|
|
4503
|
+
{
|
|
4504
|
+
style: {
|
|
4505
|
+
flexDirection: r === "row" ? "row" : "column",
|
|
4506
|
+
alignItems: r === "row" ? "center" : "flex-start",
|
|
4507
|
+
gap: n.spacing.scale[1]
|
|
4508
|
+
},
|
|
4509
|
+
children: [
|
|
4510
|
+
/* @__PURE__ */ e(te, { value: s, size: o, readOnly: !0 }),
|
|
4511
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
4512
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: t.text["high-emphasis"] }], children: s.toFixed(1) }),
|
|
4513
|
+
i !== void 0 && /* @__PURE__ */ p(g, { style: [u("body.sm"), { color: t.text["low-emphasis"] }], children: [
|
|
4514
|
+
"(",
|
|
4515
|
+
i.toLocaleString("ja-JP"),
|
|
4516
|
+
")"
|
|
4517
|
+
] })
|
|
4518
|
+
] })
|
|
4519
|
+
]
|
|
4520
|
+
}
|
|
4521
|
+
);
|
|
4522
|
+
}
|
|
4523
|
+
function gt({
|
|
4524
|
+
image: s,
|
|
4525
|
+
title: i,
|
|
4526
|
+
price: o,
|
|
4527
|
+
originalPrice: r,
|
|
4528
|
+
rating: t,
|
|
4529
|
+
reviewCount: n,
|
|
4530
|
+
badge: a,
|
|
4531
|
+
soldOut: l,
|
|
4532
|
+
onPress: d,
|
|
4533
|
+
layout: m = "vertical"
|
|
4534
|
+
}) {
|
|
4535
|
+
const { theme: h, scales: y } = b(), x = m === "horizontal", C = x ? 96 : "100%", R = x ? 96 : 160, w = (v = !1) => /* @__PURE__ */ p(
|
|
4536
|
+
c,
|
|
4537
|
+
{
|
|
4538
|
+
style: {
|
|
4539
|
+
flexDirection: x ? "row" : "column",
|
|
4540
|
+
gap: y.spacing.scale[3],
|
|
4541
|
+
backgroundColor: h.surface.primary,
|
|
4542
|
+
borderRadius: y.borderRadius.lg,
|
|
4543
|
+
overflow: "hidden",
|
|
4544
|
+
padding: x ? y.spacing.scale[3] : 0,
|
|
4545
|
+
opacity: v ? 0.85 : 1
|
|
4546
|
+
},
|
|
4547
|
+
children: [
|
|
4548
|
+
/* @__PURE__ */ p(c, { style: { position: "relative", width: C, height: R }, children: [
|
|
4549
|
+
/* @__PURE__ */ e(
|
|
4550
|
+
Y,
|
|
4551
|
+
{
|
|
4552
|
+
source: s,
|
|
4553
|
+
style: {
|
|
4554
|
+
width: "100%",
|
|
4555
|
+
height: "100%",
|
|
4556
|
+
borderRadius: y.borderRadius.md,
|
|
4557
|
+
backgroundColor: h.surface.tertiary
|
|
4558
|
+
},
|
|
4559
|
+
resizeMode: "cover"
|
|
4560
|
+
}
|
|
4561
|
+
),
|
|
4562
|
+
l && /* @__PURE__ */ e(
|
|
4563
|
+
c,
|
|
4564
|
+
{
|
|
4565
|
+
style: {
|
|
4566
|
+
position: "absolute",
|
|
4567
|
+
top: 0,
|
|
4568
|
+
left: 0,
|
|
4569
|
+
right: 0,
|
|
4570
|
+
bottom: 0,
|
|
4571
|
+
backgroundColor: h.overlay.medium,
|
|
4572
|
+
alignItems: "center",
|
|
4573
|
+
justifyContent: "center",
|
|
4574
|
+
borderRadius: y.borderRadius.md
|
|
4575
|
+
},
|
|
4576
|
+
children: /* @__PURE__ */ e(g, { style: [u("label.md"), { color: h.text["on-inverse"] }], children: "売り切れ" })
|
|
4577
|
+
}
|
|
4578
|
+
),
|
|
4579
|
+
a && /* @__PURE__ */ e(
|
|
4580
|
+
c,
|
|
4581
|
+
{
|
|
4582
|
+
style: {
|
|
4583
|
+
position: "absolute",
|
|
4584
|
+
top: 8,
|
|
4585
|
+
left: 8
|
|
4586
|
+
},
|
|
4587
|
+
children: /* @__PURE__ */ e(Ee, { tone: "caution", children: a })
|
|
4588
|
+
}
|
|
4589
|
+
)
|
|
4590
|
+
] }),
|
|
4591
|
+
/* @__PURE__ */ p(c, { style: { flex: 1, gap: 4, padding: x ? 0 : y.spacing.scale[3] }, children: [
|
|
4592
|
+
/* @__PURE__ */ e(
|
|
4593
|
+
g,
|
|
4594
|
+
{
|
|
4595
|
+
numberOfLines: 2,
|
|
4596
|
+
style: [u("body.md"), { color: h.text["high-emphasis"] }],
|
|
4597
|
+
children: i
|
|
4598
|
+
}
|
|
4599
|
+
),
|
|
4600
|
+
t !== void 0 && /* @__PURE__ */ e(ut, { rating: t, count: n, size: 14 }),
|
|
4601
|
+
/* @__PURE__ */ e(ht, { price: o, originalPrice: r, size: "sm" })
|
|
4602
|
+
] })
|
|
4603
|
+
]
|
|
4604
|
+
}
|
|
4605
|
+
);
|
|
4606
|
+
return d ? /* @__PURE__ */ e(f, { onPress: d, disabled: l, children: ({ pressed: v }) => w(v) }) : w(!1);
|
|
4607
|
+
}
|
|
4608
|
+
function Ar({
|
|
4609
|
+
title: s,
|
|
4610
|
+
action: i,
|
|
4611
|
+
products: o,
|
|
4612
|
+
cardWidth: r = 160
|
|
4613
|
+
}) {
|
|
4614
|
+
const { scales: t } = b();
|
|
4615
|
+
return /* @__PURE__ */ p(c, { children: [
|
|
4616
|
+
s && /* @__PURE__ */ e(lt, { title: s, action: i }),
|
|
4617
|
+
/* @__PURE__ */ e(
|
|
4618
|
+
L,
|
|
4619
|
+
{
|
|
4620
|
+
data: o,
|
|
4621
|
+
horizontal: !0,
|
|
4622
|
+
showsHorizontalScrollIndicator: !1,
|
|
4623
|
+
keyExtractor: (n, a) => String(a),
|
|
4624
|
+
contentContainerStyle: {
|
|
4625
|
+
gap: t.spacing.scale[3],
|
|
4626
|
+
paddingHorizontal: t.spacing.scale[4],
|
|
4627
|
+
paddingBottom: t.spacing.scale[2]
|
|
4628
|
+
},
|
|
4629
|
+
renderItem: ({ item: n }) => /* @__PURE__ */ e(c, { style: { width: r }, children: /* @__PURE__ */ e(gt, { ...n }) })
|
|
4630
|
+
}
|
|
4631
|
+
)
|
|
4632
|
+
] });
|
|
4633
|
+
}
|
|
4634
|
+
function pt(s, i) {
|
|
4635
|
+
return `${i}${s.toLocaleString("ja-JP")}`;
|
|
4636
|
+
}
|
|
4637
|
+
function Er({ lines: s, currency: i = "¥" }) {
|
|
4638
|
+
const { theme: o, scales: r } = b();
|
|
4639
|
+
return /* @__PURE__ */ e(
|
|
4640
|
+
c,
|
|
4641
|
+
{
|
|
4642
|
+
style: {
|
|
4643
|
+
backgroundColor: o.surface.primary,
|
|
4644
|
+
borderColor: o.border["low-emphasis"],
|
|
4645
|
+
borderWidth: 1,
|
|
4646
|
+
borderRadius: r.borderRadius.lg,
|
|
4647
|
+
padding: r.spacing.scale[4],
|
|
4648
|
+
gap: r.spacing.scale[2]
|
|
4649
|
+
},
|
|
4650
|
+
children: s.map((t, n) => {
|
|
4651
|
+
const a = t.emphasis === "total", l = t.emphasis === "discount", d = l ? o.text.caution : a ? o.text["accent-primary"] : o.text["high-emphasis"], m = u(a ? "label.lg" : "body.md"), h = u(a ? "heading.lg" : "body.md");
|
|
4652
|
+
return /* @__PURE__ */ p(X.Fragment, { children: [
|
|
4653
|
+
a && /* @__PURE__ */ e(q, {}),
|
|
4654
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
4655
|
+
/* @__PURE__ */ e(g, { style: [m, { color: o.text["medium-emphasis"] }], children: t.label }),
|
|
4656
|
+
/* @__PURE__ */ p(g, { style: [h, { color: d }], children: [
|
|
4657
|
+
l && t.value > 0 ? "-" : "",
|
|
4658
|
+
pt(t.value, i)
|
|
4659
|
+
] })
|
|
4660
|
+
] })
|
|
4661
|
+
] }, n);
|
|
4662
|
+
})
|
|
4663
|
+
}
|
|
4664
|
+
);
|
|
4665
|
+
}
|
|
4666
|
+
function Lr({
|
|
4667
|
+
authorName: s,
|
|
4668
|
+
authorAvatar: i,
|
|
4669
|
+
rating: o,
|
|
4670
|
+
date: r,
|
|
4671
|
+
title: t,
|
|
4672
|
+
comment: n,
|
|
4673
|
+
helpfulCount: a
|
|
4674
|
+
}) {
|
|
4675
|
+
const { theme: l, scales: d } = b();
|
|
4676
|
+
return /* @__PURE__ */ p(
|
|
4677
|
+
c,
|
|
4678
|
+
{
|
|
4679
|
+
style: {
|
|
4680
|
+
backgroundColor: l.surface.primary,
|
|
4681
|
+
borderRadius: d.borderRadius.lg,
|
|
4682
|
+
borderWidth: 1,
|
|
4683
|
+
borderColor: l.border["low-emphasis"],
|
|
4684
|
+
padding: d.spacing.scale[4],
|
|
4685
|
+
gap: d.spacing.scale[2]
|
|
4686
|
+
},
|
|
4687
|
+
children: [
|
|
4688
|
+
/* @__PURE__ */ p(c, { style: { flexDirection: "row", alignItems: "center", gap: d.spacing.scale[2] }, children: [
|
|
4689
|
+
/* @__PURE__ */ e(Oe, { source: i, fallback: s[0], size: "sm" }),
|
|
4690
|
+
/* @__PURE__ */ p(c, { style: { flex: 1 }, children: [
|
|
4691
|
+
/* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.text["high-emphasis"] }], children: s }),
|
|
4692
|
+
r && /* @__PURE__ */ e(g, { style: [u("body.sm"), { color: l.text["low-emphasis"] }], children: r })
|
|
4693
|
+
] }),
|
|
4694
|
+
/* @__PURE__ */ e(te, { value: o, size: 14, readOnly: !0 })
|
|
4695
|
+
] }),
|
|
4696
|
+
t && /* @__PURE__ */ e(g, { style: [u("label.md"), { color: l.text["high-emphasis"] }], children: t }),
|
|
4697
|
+
/* @__PURE__ */ e(g, { style: [u("body.md"), { color: l.text["high-emphasis"] }], children: n }),
|
|
4698
|
+
a !== void 0 && /* @__PURE__ */ p(g, { style: [u("label.sm"), { color: l.text["low-emphasis"] }], children: [
|
|
4699
|
+
"参考になった ",
|
|
4700
|
+
a
|
|
4701
|
+
] })
|
|
4702
|
+
]
|
|
4703
|
+
}
|
|
4704
|
+
);
|
|
4705
|
+
}
|
|
4706
|
+
function $r({ average: s, total: i, distribution: o }) {
|
|
4707
|
+
const { theme: r, scales: t } = b();
|
|
4708
|
+
return /* @__PURE__ */ p(
|
|
4709
|
+
c,
|
|
4710
|
+
{
|
|
4711
|
+
style: {
|
|
4712
|
+
flexDirection: "row",
|
|
4713
|
+
gap: t.spacing.scale[4],
|
|
4714
|
+
padding: t.spacing.scale[4],
|
|
4715
|
+
backgroundColor: r.surface.primary,
|
|
4716
|
+
borderRadius: t.borderRadius.lg,
|
|
4717
|
+
borderWidth: 1,
|
|
4718
|
+
borderColor: r.border["low-emphasis"]
|
|
4719
|
+
},
|
|
4720
|
+
children: [
|
|
4721
|
+
/* @__PURE__ */ p(c, { style: { alignItems: "center", gap: t.spacing.scale[1], minWidth: 100 }, children: [
|
|
4722
|
+
/* @__PURE__ */ e(g, { style: [u("heading.3xl"), { color: r.text["high-emphasis"] }], children: s.toFixed(1) }),
|
|
4723
|
+
/* @__PURE__ */ e(te, { value: s, size: 16, readOnly: !0 }),
|
|
4724
|
+
/* @__PURE__ */ p(g, { style: [u("body.sm"), { color: r.text["low-emphasis"] }], children: [
|
|
4725
|
+
i.toLocaleString("ja-JP"),
|
|
4726
|
+
" 件"
|
|
4727
|
+
] })
|
|
4728
|
+
] }),
|
|
4729
|
+
/* @__PURE__ */ e(c, { style: { flex: 1, gap: 4 }, children: [5, 4, 3, 2, 1].map((n) => {
|
|
4730
|
+
const a = o[n] ?? 0, l = i > 0 ? a / i * 100 : 0;
|
|
4731
|
+
return /* @__PURE__ */ p(
|
|
4732
|
+
c,
|
|
4733
|
+
{
|
|
4734
|
+
style: { flexDirection: "row", alignItems: "center", gap: t.spacing.scale[2] },
|
|
4735
|
+
children: [
|
|
4736
|
+
/* @__PURE__ */ e(g, { style: [u("label.sm"), { color: r.text["medium-emphasis"], width: 16 }], children: n }),
|
|
4737
|
+
/* @__PURE__ */ e(
|
|
4738
|
+
c,
|
|
4739
|
+
{
|
|
4740
|
+
style: {
|
|
4741
|
+
flex: 1,
|
|
4742
|
+
height: 6,
|
|
4743
|
+
borderRadius: 3,
|
|
4744
|
+
backgroundColor: r.surface.tertiary,
|
|
4745
|
+
overflow: "hidden"
|
|
4746
|
+
},
|
|
4747
|
+
children: /* @__PURE__ */ e(
|
|
4748
|
+
c,
|
|
4749
|
+
{
|
|
4750
|
+
style: {
|
|
4751
|
+
width: `${l}%`,
|
|
4752
|
+
height: "100%",
|
|
4753
|
+
backgroundColor: r.object.rating
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
)
|
|
4757
|
+
}
|
|
4758
|
+
),
|
|
4759
|
+
/* @__PURE__ */ e(
|
|
4760
|
+
g,
|
|
4761
|
+
{
|
|
4762
|
+
style: [
|
|
4763
|
+
u("body.sm"),
|
|
4764
|
+
{ color: r.text["low-emphasis"], width: 40, textAlign: "right" }
|
|
4765
|
+
],
|
|
4766
|
+
children: a
|
|
4767
|
+
}
|
|
4768
|
+
)
|
|
4769
|
+
]
|
|
4770
|
+
},
|
|
4771
|
+
n
|
|
4772
|
+
);
|
|
4773
|
+
}) })
|
|
4774
|
+
]
|
|
4775
|
+
}
|
|
4776
|
+
);
|
|
4777
|
+
}
|
|
4778
|
+
function _r({
|
|
4779
|
+
header: s,
|
|
4780
|
+
footer: i,
|
|
4781
|
+
bottomNav: o,
|
|
4782
|
+
scrollable: r = !0,
|
|
4783
|
+
children: t
|
|
4784
|
+
}) {
|
|
4785
|
+
const { theme: n } = b(), a = r ? /* @__PURE__ */ e(W, { style: { flex: 1, backgroundColor: n.surface.secondary }, children: t }) : /* @__PURE__ */ e(c, { style: { flex: 1, backgroundColor: n.surface.secondary }, children: t });
|
|
4786
|
+
return /* @__PURE__ */ p(c, { style: { flex: 1, backgroundColor: n.surface.primary }, children: [
|
|
4787
|
+
s,
|
|
4788
|
+
a,
|
|
4789
|
+
i,
|
|
4790
|
+
o
|
|
4791
|
+
] });
|
|
4792
|
+
}
|
|
4793
|
+
function Nr({ header: s, footer: i, cta: o, children: r }) {
|
|
4794
|
+
const { theme: t } = b();
|
|
4795
|
+
return /* @__PURE__ */ p(c, { style: { flex: 1, backgroundColor: t.surface.primary }, children: [
|
|
4796
|
+
s,
|
|
4797
|
+
/* @__PURE__ */ p(W, { style: { flex: 1 }, contentContainerStyle: { paddingBottom: o ? 80 : 0 }, children: [
|
|
4798
|
+
r,
|
|
4799
|
+
i
|
|
4800
|
+
] }),
|
|
4801
|
+
o && /* @__PURE__ */ e(
|
|
4802
|
+
c,
|
|
4803
|
+
{
|
|
4804
|
+
style: {
|
|
4805
|
+
position: "absolute",
|
|
4806
|
+
left: 0,
|
|
4807
|
+
right: 0,
|
|
4808
|
+
bottom: 0
|
|
4809
|
+
},
|
|
4810
|
+
children: o
|
|
4811
|
+
}
|
|
4812
|
+
)
|
|
4813
|
+
] });
|
|
4814
|
+
}
|
|
4815
|
+
export {
|
|
4816
|
+
ir as Accordion,
|
|
4817
|
+
At as Alert,
|
|
4818
|
+
qe as AlertDialog,
|
|
4819
|
+
pr as AppHeader,
|
|
4820
|
+
_r as AppShell,
|
|
4821
|
+
Mt as AutoGrowTextarea,
|
|
4822
|
+
Oe as Avatar,
|
|
4823
|
+
Rt as Badge,
|
|
4824
|
+
it as Banner,
|
|
4825
|
+
mr as BannerCarousel,
|
|
4826
|
+
qt as BottomSheetForm,
|
|
4827
|
+
jr as BottomTabBar,
|
|
4828
|
+
gr as Breadcrumb,
|
|
4829
|
+
z as Button,
|
|
4830
|
+
nt as Calendar,
|
|
4831
|
+
Ct as Card,
|
|
4832
|
+
Sr as CategoryNav,
|
|
4833
|
+
Ir as CategoryScroll,
|
|
4834
|
+
ie as Checkbox,
|
|
4835
|
+
Vt as CheckboxCard,
|
|
4836
|
+
Ne as CheckboxField,
|
|
4837
|
+
jt as CheckboxGroup,
|
|
4838
|
+
we as Chip,
|
|
4839
|
+
kr as ChipSelector,
|
|
4840
|
+
Gt as CoachMark,
|
|
4841
|
+
Kt as CoachMarkOverlay,
|
|
4842
|
+
lr as Collapsible,
|
|
4843
|
+
Qt as Combobox,
|
|
4844
|
+
Yt as ConfirmDialog,
|
|
4845
|
+
Ht as CountdownTimer,
|
|
4846
|
+
sr as DatePicker,
|
|
4847
|
+
Re as Dialog,
|
|
4848
|
+
Zt as DropdownFilter,
|
|
4849
|
+
Lt as DropdownMenu,
|
|
4850
|
+
fr as EmptyState,
|
|
4851
|
+
xr as ErrorState,
|
|
4852
|
+
vr as FileUpload,
|
|
4853
|
+
Br as FilterBar,
|
|
4854
|
+
Wr as FilterChip,
|
|
4855
|
+
Rr as Footer,
|
|
4856
|
+
Ot as FormField,
|
|
4857
|
+
Me as GlassView,
|
|
4858
|
+
Fr as ImageCarousel,
|
|
4859
|
+
Hr as ImageGallery,
|
|
4860
|
+
Ce as Input,
|
|
4861
|
+
$e as Label,
|
|
4862
|
+
br as ListItem,
|
|
4863
|
+
Vr as ListSkeletons,
|
|
4864
|
+
Nr as MarketingShell,
|
|
4865
|
+
Nt as MenuDrawer,
|
|
4866
|
+
Ut as MultiSelect,
|
|
4867
|
+
at as NavigationBar,
|
|
4868
|
+
Tt as NotificationBadge,
|
|
4869
|
+
Ye as NumberInput,
|
|
4870
|
+
Er as OrderSummary,
|
|
4871
|
+
dr as Pagination,
|
|
4872
|
+
er as PillToggle,
|
|
4873
|
+
Ke as Popover,
|
|
4874
|
+
ht as PriceDisplay,
|
|
4875
|
+
gt as ProductCard,
|
|
4876
|
+
Ar as ProductCarousel,
|
|
4877
|
+
It as Progress,
|
|
4878
|
+
Dt as ProgressRing,
|
|
4879
|
+
Dr as ProgressSteps,
|
|
4880
|
+
Or as QuantitySelector,
|
|
4881
|
+
Bt as RadioGroup,
|
|
4882
|
+
ut as RatingDisplay,
|
|
4883
|
+
Et as ResponsiveDialog,
|
|
4884
|
+
Lr as ReviewCard,
|
|
4885
|
+
Xt as ReviewOverlay,
|
|
4886
|
+
$r as ReviewSummary,
|
|
4887
|
+
cr as ScrollArea,
|
|
4888
|
+
yr as SearchBar,
|
|
4889
|
+
lt as SectionHeader,
|
|
4890
|
+
Jt as Select,
|
|
4891
|
+
q as Separator,
|
|
4892
|
+
Pr as ShareButtons,
|
|
4893
|
+
j as Sheet,
|
|
4894
|
+
hr as SimplePagination,
|
|
4895
|
+
B as Skeleton,
|
|
4896
|
+
St as SkeletonText,
|
|
4897
|
+
Ft as Slider,
|
|
4898
|
+
zr as SocialIcon,
|
|
4899
|
+
Mr as SocialLoginButton,
|
|
4900
|
+
kt as Spinner,
|
|
4901
|
+
vt as Stack,
|
|
4902
|
+
te as StarRating,
|
|
4903
|
+
Pt as StatCard,
|
|
4904
|
+
wr as StickyActionBar,
|
|
4905
|
+
ur as SubNav,
|
|
4906
|
+
Cr as SwipeRow,
|
|
4907
|
+
zt as Switch,
|
|
4908
|
+
Wt as SyncStatusBadge,
|
|
4909
|
+
tr as Tabs,
|
|
4910
|
+
or as TabsContent,
|
|
4911
|
+
rr as TabsList,
|
|
4912
|
+
nr as TabsTrigger,
|
|
4913
|
+
Ee as Tag,
|
|
4914
|
+
Tr as TagInput,
|
|
4915
|
+
wt as Text,
|
|
4916
|
+
_e as Textarea,
|
|
4917
|
+
xt as ThemeProvider,
|
|
4918
|
+
ar as TimePicker,
|
|
4919
|
+
_t as ToastProvider,
|
|
4920
|
+
Xr as getTheme,
|
|
4921
|
+
Gr as primitives,
|
|
4922
|
+
u as resolveTypo,
|
|
4923
|
+
ne as scales,
|
|
4924
|
+
Kr as themeNames,
|
|
4925
|
+
Te as themes,
|
|
4926
|
+
b as useTheme,
|
|
4927
|
+
$t as useToast
|
|
4928
|
+
};
|