@godxjp/ui 31.31.8 → 32.0.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/README.md +102 -121
- package/agent/START-HERE.md +10 -10
- package/agent/components/Accordion.json +2 -2
- package/agent/components/AccountChip.json +1 -1
- package/agent/components/Actions.json +1 -1
- package/agent/components/Activity.json +2 -2
- package/agent/components/Affix.json +1 -1
- package/agent/components/Alert.json +22 -6
- package/agent/components/AlertDialog.json +8 -1
- package/agent/components/Anchor.json +4 -3
- package/agent/components/AppLauncher.json +2 -2
- package/agent/components/AppProvider.json +19 -11
- package/agent/components/AppSettingPicker.json +18 -2
- package/agent/components/AppShell.json +4 -5
- package/agent/components/AreaChart.json +0 -1
- package/agent/components/AspectRatio.json +2 -2
- package/agent/components/Attachments.json +3 -3
- package/agent/components/AuthAccountSummary.json +1 -1
- package/agent/components/AuthDivider.json +1 -1
- package/agent/components/AuthExpiryProvider.json +0 -1
- package/agent/components/AuthFooter.json +2 -2
- package/agent/components/AuthIdentity.json +3 -3
- package/agent/components/AuthStack.json +1 -1
- package/agent/components/Avatar.json +2 -12
- package/agent/components/Badge.json +1 -1
- package/agent/components/BarChart.json +0 -1
- package/agent/components/BranchScopePicker.json +1 -1
- package/agent/components/Breadcrumb.json +1 -1
- package/agent/components/Button.json +3 -3
- package/agent/components/Calendar.json +1 -1
- package/agent/components/Card.json +2 -2
- package/agent/components/CardBar.json +0 -1
- package/agent/components/CardContent.json +0 -1
- package/agent/components/Carousel.json +4 -3
- package/agent/components/Cascader.json +1 -1
- package/agent/components/CenteredShell.json +78 -17
- package/agent/components/ChatBubble.json +3 -3
- package/agent/components/ChatBubbleList.json +3 -3
- package/agent/components/ChatComposer.json +3 -3
- package/agent/components/ChatSuggestion.json +3 -3
- package/agent/components/Checkbox.json +1 -1
- package/agent/components/CheckboxGroup.json +0 -1
- package/agent/components/CodeBlock.json +1 -1
- package/agent/components/Collapsible.json +4 -4
- package/agent/components/ColorPicker.json +1 -1
- package/agent/components/Command.json +5 -5
- package/agent/components/CommandPalette.json +1 -1
- package/agent/components/CompactBarTrend.json +1 -1
- package/agent/components/Conversations.json +3 -3
- package/agent/components/CredentialReveal.json +1 -1
- package/agent/components/DataState.json +2 -2
- package/agent/components/DataTable.json +1 -1
- package/agent/components/DatePicker.json +1 -1
- package/agent/components/Descriptions.json +1 -1
- package/agent/components/Dialog.json +2 -2
- package/agent/components/DraggablePanel.json +5 -4
- package/agent/components/DropdownMenu.json +1 -1
- package/agent/components/EmojiPicker.json +3 -2
- package/agent/components/EmptyState.json +1 -1
- package/agent/components/ErrorSurface.json +3 -3
- package/agent/components/FeatureList.json +1 -1
- package/agent/components/Field.json +0 -1
- package/agent/components/Flex.json +34 -4
- package/agent/components/FloatButton.json +6 -5
- package/agent/components/Form.json +1 -1
- package/agent/components/FormErrors.json +0 -1
- package/agent/components/FormField.json +6 -6
- package/agent/components/FormFieldArray.json +0 -1
- package/agent/components/FormFieldControl.json +0 -1
- package/agent/components/FormRoot.json +1 -1
- package/agent/components/Heading.json +3 -0
- package/agent/components/Icon.json +1 -1
- package/agent/components/Image.json +7 -4
- package/agent/components/InfiniteQueryState.json +1 -1
- package/agent/components/Input.json +1 -1
- package/agent/components/InputOTP.json +2 -2
- package/agent/components/Label.json +3 -3
- package/agent/components/LegalDocumentShell.json +5 -4
- package/agent/components/Legend.json +1 -1
- package/agent/components/LineChart.json +0 -1
- package/agent/components/Link.json +0 -1
- package/agent/components/ListRow.json +1 -1
- package/agent/components/Logo.json +5 -4
- package/agent/components/Marquee.json +4 -3
- package/agent/components/Masonry.json +4 -3
- package/agent/components/MasterDetail.json +1 -1
- package/agent/components/MegaMenu.json +4 -3
- package/agent/components/MobileShell.json +4 -4
- package/agent/components/NavList.json +1 -1
- package/agent/components/NumberInput.json +1 -1
- package/agent/components/OrgChart.json +4 -3
- package/agent/components/OrgSwitcher.json +1 -1
- package/agent/components/OverlayPortalProvider.json +0 -1
- package/agent/components/PageContainer.json +3 -3
- package/agent/components/PageCover.json +3 -2
- package/agent/components/Pagination.json +1 -1
- package/agent/components/PasswordInput.json +1 -1
- package/agent/components/PasswordStrength.json +1 -1
- package/agent/components/PermissionMatrix.json +1 -1
- package/agent/components/PieChart.json +0 -1
- package/agent/components/Popover.json +31 -6
- package/agent/components/PrefetchLink.json +1 -1
- package/agent/components/Progress.json +1 -1
- package/agent/components/Prose.json +1 -1
- package/agent/components/QrCode.json +1 -1
- package/agent/components/Radio.json +0 -1
- package/agent/components/RadioGroup.json +2 -2
- package/agent/components/RangeTimeline.json +2 -1
- package/agent/components/Rating.json +1 -1
- package/agent/components/RecordPicker.json +1 -1
- package/agent/components/ResizablePanel.json +1 -1
- package/agent/components/ResponsiveGrid.json +2 -2
- package/agent/components/Reveal.json +3 -3
- package/agent/components/ScrollArea.json +2 -2
- package/agent/components/SearchInput.json +1 -1
- package/agent/components/Segmented.json +1 -1
- package/agent/components/Select.json +7 -5
- package/agent/components/Separator.json +1 -1
- package/agent/components/ServiceCatalogCta.json +0 -1
- package/agent/components/ServiceLauncherCard.json +1 -1
- package/agent/components/ServiceRolePanel.json +1 -1
- package/agent/components/Sheet.json +5 -5
- package/agent/components/Sidebar.json +1 -1
- package/agent/components/Skeleton.json +26 -12
- package/agent/components/Slider.json +2 -2
- package/agent/components/SortableList.json +3 -2
- package/agent/components/SplitPane.json +1 -1
- package/agent/components/StatCard.json +1 -1
- package/agent/components/Steps.json +1 -1
- package/agent/components/Swatch.json +1 -1
- package/agent/components/Switch.json +1 -1
- package/agent/components/Table.json +1 -1
- package/agent/components/Tabs.json +3 -3
- package/agent/components/Text.json +5 -1
- package/agent/components/TextDiff.json +5 -4
- package/agent/components/Textarea.json +1 -1
- package/agent/components/ThemeScope.json +1 -1
- package/agent/components/ThoughtChain.json +3 -3
- package/agent/components/TimePicker.json +1 -1
- package/agent/components/Timeline.json +1 -1
- package/agent/components/TimelineGrid.json +5 -4
- package/agent/components/Toaster.json +0 -1
- package/agent/components/Toggle.json +3 -3
- package/agent/components/ToggleGroup.json +1 -1
- package/agent/components/Toolbar.json +10 -3
- package/agent/components/Tooltip.json +9 -9
- package/agent/components/Topbar.json +1 -1
- package/agent/components/TopbarItem.json +1 -1
- package/agent/components/Transfer.json +2 -2
- package/agent/components/Tree.json +1 -1
- package/agent/components/TreeSelect.json +1 -1
- package/agent/components/TwoFactorSetup.json +1 -1
- package/agent/components/Upload.json +1 -1
- package/agent/components/UploadCropDialog.json +1 -1
- package/agent/components/Welcome.json +3 -3
- package/agent/components/formatDate.json +2 -2
- package/agent/components/inertiaUpload.json +0 -1
- package/agent/components/useZodForm.json +0 -1
- package/agent/components-index.json +80 -154
- package/agent/components.json +541 -1737
- package/agent/index.json +10 -10
- package/agent/llms.txt +9 -9
- package/agent/patterns/account-recovery-settings.json +1 -1
- package/agent/patterns/auth-recovery-panels.json +2 -2
- package/agent/patterns/error-pages.json +1 -1
- package/agent/patterns/pricing-plans.json +17 -0
- package/agent/patterns-index.json +17 -1
- package/agent/patterns.json +21 -4
- package/agent/rules.json +30 -65
- package/agent/tokens.json +27 -57
- package/agent/vocabulary.json +3 -3
- package/dist/app/app-provider.d.ts +5 -3
- package/dist/app/app-provider.js +47 -12
- package/dist/app/date-format-labels.d.ts +3 -1
- package/dist/app/date-format-labels.js +2 -4
- package/dist/app/date-formats.d.ts +21 -2
- package/dist/app/date-formats.js +51 -2
- package/dist/app/index.d.ts +3 -1
- package/dist/app/index.js +5 -0
- package/dist/app/locales.d.ts +58 -3
- package/dist/app/locales.js +134 -8
- package/dist/app/preset.d.ts +25 -0
- package/dist/app/preset.js +10 -0
- package/dist/app/request-headers.d.ts +3 -3
- package/dist/app/request-headers.js +19 -10
- package/dist/app/settings-scope.d.ts +54 -0
- package/dist/app/settings-scope.js +46 -0
- package/dist/app/tenant-theme.js +8 -3
- package/dist/app/time-format-labels.d.ts +4 -1
- package/dist/app/time-format-labels.js +7 -1
- package/dist/app/types.d.ts +10 -2
- package/dist/app/use-formatting.d.ts +1 -1
- package/dist/components/admin/index.d.ts +1 -1
- package/dist/components/admin/index.js +1 -1
- package/dist/components/data-display/accordion.d.ts +51 -1
- package/dist/components/data-display/accordion.js +247 -1
- package/dist/components/data-display/avatar.d.ts +16 -1
- package/dist/components/data-display/avatar.js +109 -1
- package/dist/components/data-display/credential-reveal.d.ts +9 -2
- package/dist/components/data-display/credential-reveal.js +156 -1
- package/dist/components/data-display/image.js +5 -3
- package/dist/components/data-display/index.d.ts +0 -21
- package/dist/components/data-display/index.js +1 -43
- package/dist/components/data-display/popover.d.ts +15 -3
- package/dist/components/data-display/popover.js +168 -2
- package/dist/components/data-entry/branch-scope-picker.d.ts +1 -1
- package/dist/components/data-entry/index.d.ts +5 -12
- package/dist/components/data-entry/index.js +11 -12
- package/dist/components/data-entry/input-otp.d.ts +48 -2
- package/dist/components/data-entry/input-otp.js +94 -1
- package/dist/components/data-entry/number-input.d.ts +1 -1
- package/dist/components/data-entry/password-input.d.ts +38 -2
- package/dist/components/data-entry/password-input.js +56 -1
- package/dist/components/data-entry/rating.d.ts +38 -2
- package/dist/components/data-entry/rating.js +127 -1
- package/dist/components/data-entry/segmented.d.ts +94 -2
- package/dist/components/data-entry/segmented.js +104 -1
- package/dist/components/{ui/tag-input.d.ts → data-entry/select-tags-inline.d.ts} +7 -4
- package/dist/components/{ui/tag-input.js → data-entry/select-tags-inline.js} +4 -4
- package/dist/components/data-entry/select.js +4 -0
- package/dist/components/data-entry/toggle-group.d.ts +108 -2
- package/dist/components/data-entry/toggle-group.js +189 -1
- package/dist/components/data-entry/toggle.d.ts +86 -2
- package/dist/components/data-entry/toggle.js +153 -2
- package/dist/components/feedback/alert.d.ts +5 -3
- package/dist/components/feedback/alert.js +14 -2
- package/dist/components/feedback/index.d.ts +2 -6
- package/dist/components/feedback/index.js +1 -13
- package/dist/components/feedback/skeleton.d.ts +4 -17
- package/dist/components/feedback/skeleton.js +3 -40
- package/dist/components/general/index.d.ts +2 -4
- package/dist/components/general/index.js +1 -6
- package/dist/components/general/typography.d.ts +4 -58
- package/dist/components/general/typography.js +7 -141
- package/dist/components/layout/aspect-ratio.d.ts +24 -1
- package/dist/components/layout/aspect-ratio.js +18 -1
- package/dist/components/layout/auth-divider.js +1 -1
- package/dist/components/layout/auth-identity.js +6 -2
- package/dist/components/layout/centered-shell.d.ts +13 -8
- package/dist/components/layout/centered-shell.js +43 -1
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/flex.js +73 -1
- package/dist/components/layout/index.d.ts +1 -13
- package/dist/components/layout/index.js +0 -12
- package/dist/components/layout/separator.d.ts +25 -2
- package/dist/components/layout/separator.js +71 -1
- package/dist/components/navigation/{app-setting-toggle.d.ts → app-setting-cycle.d.ts} +3 -4
- package/dist/components/navigation/{app-setting-toggle.js → app-setting-cycle.js} +3 -3
- package/dist/components/navigation/app-setting-picker.d.ts +6 -2
- package/dist/components/navigation/app-setting-picker.js +20 -2
- package/dist/components/navigation/index.d.ts +3 -11
- package/dist/components/navigation/index.js +1 -9
- package/dist/components/navigation/tabs.js +1 -1
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/index.d.ts +11 -5
- package/dist/components/ui/index.js +5 -5
- package/dist/contracts/measurement.json +2 -2
- package/dist/email/brand-mark.d.ts +3 -2
- package/dist/email/brand-mark.js +1 -1
- package/dist/email/tokens.generated.d.ts +6 -6
- package/dist/email/tokens.generated.js +6 -6
- package/dist/i18n/locale-tags.d.ts +25 -0
- package/dist/i18n/locale-tags.js +59 -0
- package/dist/i18n/translate.d.ts +20 -3
- package/dist/i18n/translate.js +25 -14
- package/dist/i18n/use-translation.d.ts +3 -3
- package/dist/i18n/use-translation.js +4 -2
- package/dist/{components/navigation → lab}/anchor.d.ts +2 -2
- package/dist/{components/navigation → lab}/anchor.js +5 -5
- package/dist/{components/data-display → lab}/carousel.js +2 -2
- package/dist/{components/layout → lab}/draggable-panel.d.ts +8 -8
- package/dist/{components/layout → lab}/draggable-panel.js +2 -2
- package/dist/{components/data-entry → lab}/emoji-picker.d.ts +2 -2
- package/dist/{components/data-entry → lab}/emoji-picker.js +6 -6
- package/dist/{components/general → lab}/float-button.d.ts +8 -8
- package/dist/{components/general → lab}/float-button.js +7 -7
- package/dist/lab/index.d.ts +39 -0
- package/dist/lab/index.js +48 -0
- package/dist/{components/layout → lab}/legal-document-shell.d.ts +2 -2
- package/dist/{components/layout → lab}/legal-document-shell.js +4 -4
- package/dist/{components/data-display → lab}/marquee.d.ts +5 -5
- package/dist/{components/data-display → lab}/marquee.js +5 -5
- package/dist/{components/layout → lab}/masonry.d.ts +2 -2
- package/dist/{components/layout → lab}/masonry.js +3 -3
- package/dist/{components/navigation → lab}/mega-menu.d.ts +4 -4
- package/dist/{components/navigation → lab}/mega-menu.js +2 -2
- package/dist/{components/data-display → lab}/org-chart.d.ts +2 -2
- package/dist/{components/data-display → lab}/org-chart.js +4 -4
- package/dist/{components/layout → lab}/page-cover.d.ts +2 -2
- package/dist/{components/layout → lab}/page-cover.js +2 -2
- package/dist/{components/data-display → lab}/range-timeline.d.ts +1 -1
- package/dist/{components/data-display → lab}/range-timeline.js +6 -6
- package/dist/{components/data-entry → lab}/sortable-list.d.ts +2 -2
- package/dist/{components/data-entry → lab}/sortable-list.js +3 -3
- package/dist/{components/data-display → lab}/text-diff.d.ts +3 -3
- package/dist/{components/data-display → lab}/text-diff.js +4 -4
- package/dist/{components/data-display → lab}/timeline-grid.d.ts +2 -2
- package/dist/{components/data-display → lab}/timeline-grid.js +1 -1
- package/dist/lib/control-styles.js +1 -1
- package/dist/lib/datetime/format.js +20 -6
- package/dist/lib/datetime/sync.d.ts +6 -2
- package/dist/lib/datetime/sync.js +14 -18
- package/dist/lib/platform.d.ts +1 -1
- package/dist/props/components/app.prop.d.ts +28 -13
- package/dist/props/components/data-display.prop.d.ts +19 -29
- package/dist/props/components/feedback.prop.d.ts +15 -44
- package/dist/props/components/general.prop.d.ts +2 -64
- package/dist/props/components/index.d.ts +9 -1
- package/dist/props/components/layout.prop.d.ts +41 -57
- package/dist/props/registry.d.ts +48 -101
- package/dist/props/registry.js +45 -129
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +3 -12
- package/dist/styles/alert-layout.css +0 -29
- package/dist/styles/data-display-layout.css +14 -22
- package/dist/styles/fonts/OFL.txt +93 -0
- package/dist/styles/form-layout.css +4 -0
- package/dist/styles/index.css +0 -2
- package/dist/styles/layers.json +44 -179
- package/dist/styles/text-layout.css +0 -15
- package/dist/styles.css +2 -0
- package/dist/themes/godx.css +43 -0
- package/dist/themes/godx.d.ts +13 -0
- package/dist/themes/godx.js +12 -0
- package/dist/tokens/components/feedback.css +0 -6
- package/dist/tokens/derived.css +23 -22
- package/dist/tokens/foundation.css +4 -6
- package/docs/COMPOSITION-VS-COMPONENT.md +58 -33
- package/docs/CONSUMER-RULES.md +1 -1
- package/docs/CUSTOMER-THEMING.md +17 -53
- package/docs/migrations/v32.md +98 -0
- package/package.json +58 -19
- package/scripts/_agent-setup.mjs +54 -3
- package/scripts/brand-accent.generated.mjs +15 -2
- package/scripts/cli.mjs +36 -11
- package/scripts/codemod.mjs +522 -0
- package/scripts/consumer-rule.md +21 -43
- package/scripts/postinstall.mjs +10 -47
- package/scripts/prune-css.mjs +1 -1
- package/scripts/ui-audit.mjs +5 -2
- package/dist/components/data-display/chat-bubble.d.ts +0 -30
- package/dist/components/data-display/chat-bubble.js +0 -229
- package/dist/components/data-display/hover-card.d.ts +0 -1
- package/dist/components/data-display/hover-card.js +0 -7
- package/dist/components/data-display/thought-chain.d.ts +0 -42
- package/dist/components/data-display/thought-chain.js +0 -177
- package/dist/components/data-display/thumbnail.d.ts +0 -37
- package/dist/components/data-display/thumbnail.js +0 -20
- package/dist/components/data-display/welcome.d.ts +0 -26
- package/dist/components/data-display/welcome.js +0 -37
- package/dist/components/data-entry/attachments.d.ts +0 -19
- package/dist/components/data-entry/attachments.js +0 -366
- package/dist/components/data-entry/chat-composer.d.ts +0 -51
- package/dist/components/data-entry/chat-composer.js +0 -200
- package/dist/components/data-entry/chat-suggestion.d.ts +0 -28
- package/dist/components/data-entry/chat-suggestion.js +0 -309
- package/dist/components/data-entry/tag-input.d.ts +0 -2
- package/dist/components/data-entry/tag-input.js +0 -5
- package/dist/components/feedback/banner.d.ts +0 -21
- package/dist/components/feedback/banner.js +0 -19
- package/dist/components/feedback/callout.d.ts +0 -23
- package/dist/components/feedback/callout.js +0 -42
- package/dist/components/layout/auth-shell.d.ts +0 -10
- package/dist/components/layout/auth-shell.js +0 -42
- package/dist/components/layout/space-compact.d.ts +0 -65
- package/dist/components/layout/space-compact.js +0 -52
- package/dist/components/navigation/conversations.d.ts +0 -39
- package/dist/components/navigation/conversations.js +0 -371
- package/dist/components/ui/accordion.d.ts +0 -51
- package/dist/components/ui/accordion.js +0 -254
- package/dist/components/ui/aspect-ratio.d.ts +0 -24
- package/dist/components/ui/aspect-ratio.js +0 -21
- package/dist/components/ui/avatar.d.ts +0 -16
- package/dist/components/ui/avatar.js +0 -115
- package/dist/components/ui/credential-reveal.d.ts +0 -9
- package/dist/components/ui/credential-reveal.js +0 -160
- package/dist/components/ui/hover-card.d.ts +0 -47
- package/dist/components/ui/hover-card.js +0 -205
- package/dist/components/ui/input-otp.d.ts +0 -48
- package/dist/components/ui/input-otp.js +0 -101
- package/dist/components/ui/password-input.d.ts +0 -38
- package/dist/components/ui/password-input.js +0 -60
- package/dist/components/ui/rating.d.ts +0 -38
- package/dist/components/ui/rating.js +0 -131
- package/dist/components/ui/segmented.d.ts +0 -94
- package/dist/components/ui/segmented.js +0 -108
- package/dist/components/ui/separator.d.ts +0 -25
- package/dist/components/ui/separator.js +0 -74
- package/dist/components/ui/toggle-group.d.ts +0 -108
- package/dist/components/ui/toggle-group.js +0 -194
- package/dist/components/ui/toggle.d.ts +0 -86
- package/dist/components/ui/toggle.js +0 -156
- package/docs/CANONICAL-CONTRACTS.md +0 -206
- package/docs/COMPONENTS.md +0 -163
- package/docs/DATETIME.md +0 -78
- package/docs/DEVELOPMENT.md +0 -269
- package/docs/FRAME-A11Y-CI.md +0 -287
- package/docs/FRAME-COVERAGE-LEDGER.md +0 -123
- package/docs/FRAME-COVERAGE-REPORT.md +0 -228
- package/docs/FRAME-COVERAGE-STANDARD.md +0 -65
- package/docs/FRAME-COVERAGE.md +0 -29
- package/docs/MEASUREMENT-CONTRACT.md +0 -109
- package/docs/PROPS-REGISTRY.md +0 -61
- package/docs/PROPS-VOCABULARY.md +0 -100
- package/docs/REGISTRY.md +0 -70
- package/docs/TESTING.md +0 -107
- package/docs/THEME-API-COVERAGE.md +0 -538
- package/docs/WHAT-BELONGS-HERE.md +0 -179
- package/docs/asset-modules.d.ts +0 -53
- package/docs/assets/cover-terrain.svg +0 -6
- package/docs/assets/portrait-amber.svg +0 -5
- package/docs/assets/portrait-clay.svg +0 -5
- package/docs/assets/portrait-indigo.svg +0 -5
- package/docs/assets/portrait-iris.svg +0 -5
- package/docs/assets/portrait-moss.svg +0 -5
- package/docs/assets/portrait-plum.svg +0 -5
- package/docs/assets/portrait-slate.svg +0 -5
- package/docs/assets/service-mark-rose.svg +0 -6
- package/docs/assets/service-mark-teal.svg +0 -5
- package/docs/assets/shot-landscape.svg +0 -12
- package/docs/assets/shot-portrait.svg +0 -10
- package/docs/assets/tcgm/card-1.svg +0 -1
- package/docs/assets/tcgm/card-2.svg +0 -1
- package/docs/assets/tcgm/card-3.svg +0 -1
- package/docs/assets/tcgm/card-4.svg +0 -1
- package/docs/assets/tcgm/card-5.svg +0 -1
- package/docs/assets/tcgm/card-6.svg +0 -1
- package/docs/assets/tcgm/hero-prism.svg +0 -1
- package/docs/assets/tcgm/scene-1.svg +0 -1
- package/docs/assets/tcgm/scene-2.svg +0 -1
- package/docs/assets/tcgm/scene-3.svg +0 -1
- package/docs/assets/tcgm/scene-4.svg +0 -1
- package/docs/assets/tcgm/scene-5.svg +0 -1
- package/docs/assets/tcgm/tcgm-lockup-color.svg +0 -1
- package/docs/assets/tcgm/tcgm-symbol-color.svg +0 -1
- package/docs/charts/cjk-category-axis.tsx +0 -81
- package/docs/charts/compact-bar-trend.tsx +0 -327
- package/docs/charts/size-tiers.tsx +0 -192
- package/docs/data-display/accordion.tsx +0 -99
- package/docs/data-display/avatar.tsx +0 -502
- package/docs/data-display/badge.tsx +0 -335
- package/docs/data-display/card/examples/detail-panel.tsx +0 -106
- package/docs/data-display/card/examples/tab-list.tsx +0 -97
- package/docs/data-display/card/index.md +0 -3
- package/docs/data-display/card/index.tsx +0 -390
- package/docs/data-display/carousel.tsx +0 -160
- package/docs/data-display/charts.tsx +0 -278
- package/docs/data-display/chat-bubble.tsx +0 -397
- package/docs/data-display/code-block.tsx +0 -188
- package/docs/data-display/collapsible.tsx +0 -162
- package/docs/data-display/credential-reveal.tsx +0 -148
- package/docs/data-display/data-table/examples/antd-parity.tsx +0 -257
- package/docs/data-display/data-table/examples/approval-queue.tsx +0 -212
- package/docs/data-display/data-table/examples/grid-features.tsx +0 -158
- package/docs/data-display/data-table/examples/list-page.tsx +0 -175
- package/docs/data-display/data-table/examples/selectable-inbox.tsx +0 -113
- package/docs/data-display/data-table/examples/server-paged.tsx +0 -179
- package/docs/data-display/data-table/examples/striped-list.tsx +0 -173
- package/docs/data-display/data-table/index.md +0 -9
- package/docs/data-display/data-table/index.tsx +0 -407
- package/docs/data-display/descriptions.tsx +0 -263
- package/docs/data-display/empty-state.tsx +0 -164
- package/docs/data-display/feature-list.tsx +0 -159
- package/docs/data-display/hover-card.tsx +0 -181
- package/docs/data-display/image.tsx +0 -170
- package/docs/data-display/legend.tsx +0 -158
- package/docs/data-display/list-row.tsx +0 -441
- package/docs/data-display/markdown.tsx +0 -86
- package/docs/data-display/marquee.tsx +0 -254
- package/docs/data-display/org-chart.tsx +0 -165
- package/docs/data-display/permission-matrix.tsx +0 -188
- package/docs/data-display/popover-touch.tsx +0 -27
- package/docs/data-display/popover.tsx +0 -331
- package/docs/data-display/progress.tsx +0 -162
- package/docs/data-display/prose.tsx +0 -169
- package/docs/data-display/qr-code.tsx +0 -68
- package/docs/data-display/scroll-area.tsx +0 -420
- package/docs/data-display/service-launcher-card.tsx +0 -445
- package/docs/data-display/stat-card.tsx +0 -354
- package/docs/data-display/swatch.tsx +0 -107
- package/docs/data-display/table.tsx +0 -362
- package/docs/data-display/text-diff.tsx +0 -89
- package/docs/data-display/thought-chain.tsx +0 -176
- package/docs/data-display/thumbnail.tsx +0 -128
- package/docs/data-display/timeline-grid.tsx +0 -119
- package/docs/data-display/timeline.tsx +0 -671
- package/docs/data-display/touch-actions.tsx +0 -36
- package/docs/data-display/tree.tsx +0 -724
- package/docs/data-display/welcome.tsx +0 -115
- package/docs/data-entry/attachments.tsx +0 -160
- package/docs/data-entry/block-editor.tsx +0 -105
- package/docs/data-entry/branch-scope-picker.tsx +0 -128
- package/docs/data-entry/calendar.tsx +0 -226
- package/docs/data-entry/cascader.tsx +0 -380
- package/docs/data-entry/chat-composer.tsx +0 -619
- package/docs/data-entry/chat-suggestion.tsx +0 -301
- package/docs/data-entry/checkbox.tsx +0 -256
- package/docs/data-entry/color-picker.tsx +0 -189
- package/docs/data-entry/command-palette.tsx +0 -179
- package/docs/data-entry/command.tsx +0 -341
- package/docs/data-entry/country-picker-recipe.tsx +0 -175
- package/docs/data-entry/date-picker.tsx +0 -452
- package/docs/data-entry/emoji-picker.tsx +0 -35
- package/docs/data-entry/form/examples/employee-settings.tsx +0 -267
- package/docs/data-entry/form/examples/invoice-form.tsx +0 -387
- package/docs/data-entry/form-dynamic-fields.tsx +0 -199
- package/docs/data-entry/form-field/examples/a11y-contract.tsx +0 -242
- package/docs/data-entry/form-field/examples/create-form.tsx +0 -107
- package/docs/data-entry/form-field/index.md +0 -8
- package/docs/data-entry/form-field/index.tsx +0 -337
- package/docs/data-entry/form-inertia.tsx +0 -80
- package/docs/data-entry/form-root.tsx +0 -112
- package/docs/data-entry/form.tsx +0 -1498
- package/docs/data-entry/input-otp.tsx +0 -258
- package/docs/data-entry/input.tsx +0 -796
- package/docs/data-entry/label.tsx +0 -102
- package/docs/data-entry/markdown-editor.tsx +0 -69
- package/docs/data-entry/number-input.tsx +0 -279
- package/docs/data-entry/password-input.tsx +0 -102
- package/docs/data-entry/password-strength.tsx +0 -99
- package/docs/data-entry/radio-group.tsx +0 -316
- package/docs/data-entry/rating.tsx +0 -91
- package/docs/data-entry/record-picker.tsx +0 -209
- package/docs/data-entry/search-input.tsx +0 -121
- package/docs/data-entry/segmented-in-filter-row.tsx +0 -60
- package/docs/data-entry/segmented.tsx +0 -300
- package/docs/data-entry/select-async-contracts.tsx +0 -108
- package/docs/data-entry/select-matrix.tsx +0 -209
- package/docs/data-entry/select.tsx +0 -547
- package/docs/data-entry/slider.tsx +0 -212
- package/docs/data-entry/sortable-list.tsx +0 -76
- package/docs/data-entry/switch.tsx +0 -314
- package/docs/data-entry/tag-input.tsx +0 -145
- package/docs/data-entry/textarea.tsx +0 -249
- package/docs/data-entry/time-picker.tsx +0 -187
- package/docs/data-entry/time-range-picker.tsx +0 -55
- package/docs/data-entry/toggle-count.tsx +0 -348
- package/docs/data-entry/toggle-group.tsx +0 -438
- package/docs/data-entry/toggle.tsx +0 -217
- package/docs/data-entry/transfer.tsx +0 -115
- package/docs/data-entry/tree-select.tsx +0 -204
- package/docs/data-entry/upload-crop-dialog.tsx +0 -109
- package/docs/data-entry/upload.tsx +0 -310
- package/docs/feedback/alert-dialog.tsx +0 -270
- package/docs/feedback/alert.tsx +0 -248
- package/docs/feedback/auth-expiry.tsx +0 -104
- package/docs/feedback/banner.tsx +0 -183
- package/docs/feedback/callout.tsx +0 -220
- package/docs/feedback/danger-confirm.tsx +0 -91
- package/docs/feedback/dialog-touch.tsx +0 -24
- package/docs/feedback/dialog.tsx +0 -373
- package/docs/feedback/sheet.tsx +0 -510
- package/docs/feedback/skeleton.tsx +0 -168
- package/docs/feedback/toast.tsx +0 -135
- package/docs/feedback/tooltip.tsx +0 -171
- package/docs/feedback/two-factor-setup.tsx +0 -68
- package/docs/foundation/_email-specimen.ts +0 -274
- package/docs/foundation/_theme-editor-scope.ts +0 -222
- package/docs/foundation/colors.tsx +0 -207
- package/docs/foundation/density.tsx +0 -242
- package/docs/foundation/email-tokens.tsx +0 -323
- package/docs/foundation/radius-shadow.tsx +0 -154
- package/docs/foundation/spacing.tsx +0 -216
- package/docs/foundation/theme-editor.tsx +0 -654
- package/docs/foundation/typography.tsx +0 -147
- package/docs/general/actions.tsx +0 -175
- package/docs/general/activity.tsx +0 -289
- package/docs/general/button/examples/destructive-confirm.tsx +0 -90
- package/docs/general/button/examples/form-actions.tsx +0 -87
- package/docs/general/button/examples/toolbar.tsx +0 -160
- package/docs/general/button/index.md +0 -16
- package/docs/general/button/index.tsx +0 -236
- package/docs/general/float-button.tsx +0 -133
- package/docs/general/icon.tsx +0 -217
- package/docs/general/logo.tsx +0 -194
- package/docs/general/reveal.tsx +0 -309
- package/docs/general/typography.tsx +0 -542
- package/docs/i18n/messages/en.json +0 -1715
- package/docs/i18n/messages/ja.json +0 -1708
- package/docs/i18n/messages/vi.json +0 -1708
- package/docs/layout/account-chip.tsx +0 -72
- package/docs/layout/admin-collection.tsx +0 -122
- package/docs/layout/affix.tsx +0 -209
- package/docs/layout/app-launcher.tsx +0 -211
- package/docs/layout/app-shell-arrangements.tsx +0 -225
- package/docs/layout/app-shell-narrow-bar.tsx +0 -205
- package/docs/layout/app-shell-states.tsx +0 -171
- package/docs/layout/app-shell.tsx +0 -395
- package/docs/layout/aspect-ratio.tsx +0 -135
- package/docs/layout/auth-account-summary.tsx +0 -103
- package/docs/layout/auth-divider.tsx +0 -28
- package/docs/layout/auth-footer.tsx +0 -37
- package/docs/layout/auth-identity.tsx +0 -70
- package/docs/layout/auth-recovery/examples/mfa-challenge.md +0 -41
- package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +0 -254
- package/docs/layout/auth-recovery/examples/mobile-390.md +0 -25
- package/docs/layout/auth-recovery/examples/mobile-390.tsx +0 -82
- package/docs/layout/auth-recovery/examples/password-recovery.md +0 -24
- package/docs/layout/auth-recovery/examples/password-recovery.tsx +0 -197
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +0 -27
- package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +0 -156
- package/docs/layout/auth-recovery/index.md +0 -140
- package/docs/layout/auth-recovery/index.tsx +0 -96
- package/docs/layout/auth-shell-context.tsx +0 -103
- package/docs/layout/auth-shell-device.tsx +0 -112
- package/docs/layout/auth-shell-registration.tsx +0 -338
- package/docs/layout/auth-shell-variants.tsx +0 -143
- package/docs/layout/auth-shell.tsx +0 -59
- package/docs/layout/auth-stack.tsx +0 -40
- package/docs/layout/centered-shell.tsx +0 -102
- package/docs/layout/draggable-panel.tsx +0 -127
- package/docs/layout/error-surface/examples/application-403.tsx +0 -84
- package/docs/layout/error-surface/examples/application-404.tsx +0 -77
- package/docs/layout/error-surface/examples/system-500.tsx +0 -47
- package/docs/layout/error-surface/examples/system-503.tsx +0 -48
- package/docs/layout/error-surface/index.md +0 -153
- package/docs/layout/error-surface/index.tsx +0 -239
- package/docs/layout/flex.tsx +0 -444
- package/docs/layout/legal-document-shell/_data.ts +0 -110
- package/docs/layout/legal-document-shell/examples/desktop-1440.md +0 -12
- package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +0 -83
- package/docs/layout/legal-document-shell/examples/mobile-390.md +0 -22
- package/docs/layout/legal-document-shell/examples/mobile-390.tsx +0 -70
- package/docs/layout/legal-document-shell/examples/tablet-1024.md +0 -3
- package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +0 -84
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +0 -18
- package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +0 -61
- package/docs/layout/legal-document-shell/index.md +0 -51
- package/docs/layout/legal-document-shell/index.tsx +0 -101
- package/docs/layout/masonry.tsx +0 -291
- package/docs/layout/master-detail.tsx +0 -390
- package/docs/layout/mobile-shell.tsx +0 -106
- package/docs/layout/nav-list.tsx +0 -584
- package/docs/layout/org-switcher.tsx +0 -131
- package/docs/layout/page-container.tsx +0 -1020
- package/docs/layout/page-cover.tsx +0 -56
- package/docs/layout/resizable-panel.tsx +0 -419
- package/docs/layout/responsive-grid.tsx +0 -403
- package/docs/layout/separator.tsx +0 -327
- package/docs/layout/service-role-panel.tsx +0 -144
- package/docs/layout/sidebar.tsx +0 -689
- package/docs/layout/space-compact.tsx +0 -202
- package/docs/layout/split-pane.tsx +0 -532
- package/docs/layout/topbar-item.tsx +0 -233
- package/docs/layout/topbar.tsx +0 -360
- package/docs/navigation/anchor.tsx +0 -295
- package/docs/navigation/app-setting-picker.tsx +0 -178
- package/docs/navigation/app-setting-toggle.tsx +0 -111
- package/docs/navigation/breadcrumb.tsx +0 -207
- package/docs/navigation/card-tabs.tsx +0 -344
- package/docs/navigation/conversations.tsx +0 -176
- package/docs/navigation/dropdown-menu.tsx +0 -345
- package/docs/navigation/filter-bar.tsx +0 -247
- package/docs/navigation/mega-menu-panel.tsx +0 -86
- package/docs/navigation/mega-menu.tsx +0 -254
- package/docs/navigation/pagination.tsx +0 -293
- package/docs/navigation/steps.tsx +0 -315
- package/docs/navigation/tabs-rtl.tsx +0 -28
- package/docs/navigation/tabs.tsx +0 -755
- package/docs/navigation/toolbar.tsx +0 -347
- package/docs/providers/app-provider.tsx +0 -191
- package/docs/providers/format-date.tsx +0 -230
- package/docs/providers/theme-scope.tsx +0 -186
- package/docs/query/button-refetch.tsx +0 -161
- package/docs/query/data-state.tsx +0 -262
- package/docs/query/infinite-query-state.tsx +0 -97
- package/docs/query/mutation-feedback.tsx +0 -128
- package/docs/query/touch-actions.tsx +0 -68
- package/docs/react-router/prefetch-link.tsx +0 -262
- package/docs/roadmap/ai-chat-components.md +0 -206
- package/docs/roadmap/antd-parity.md +0 -155
- package/docs/roadmap/badge-tag-chip-count.md +0 -172
- package/docs/roadmap/list-masonry.md +0 -159
- package/docs/roadmap/parity-audit-data-display-feedback.md +0 -567
- package/docs/roadmap/parity-audit-data-entry.md +0 -368
- package/docs/roadmap/parity-audit-layout-navigation-general.md +0 -459
- package/docs/roadmap/parity-backlog.md +0 -77
- package/docs/roadmap/tree-components.md +0 -151
- package/docs/roadmap/website-components.md +0 -813
- package/docs/showcase/acme-portal.tsx +0 -461
- package/docs/showcase/acme-website.tsx +0 -499
- package/docs/showcase/caimono-price-comparison.tsx +0 -919
- package/docs/showcase/case1-warehouse-dashboard.tsx +0 -358
- package/docs/showcase/case2-employee-me.tsx +0 -438
- package/docs/showcase/case3-approval-workflow.tsx +0 -531
- package/docs/showcase/case4-login.tsx +0 -312
- package/docs/showcase/case5-shift-calendar.tsx +0 -702
- package/docs/showcase/case6-agency-handy.tsx +0 -1120
- package/docs/showcase/futurelastic-web.tsx +0 -441
- package/docs/showcase/marketing-page.tsx +0 -895
- package/docs/showcase/org-switcher.tsx +0 -320
- package/docs/showcase/permission-matrix.tsx +0 -354
- package/docs/showcase/public-landing.tsx +0 -210
- package/docs/showcase/settings-account-sections.tsx +0 -559
- package/docs/showcase/settings-security-mfa.tsx +0 -145
- package/docs/showcase/table-approval-queue.tsx +0 -199
- package/docs/showcase/table-bulk-actions.tsx +0 -468
- package/docs/showcase/table-compact-kintone.tsx +0 -438
- package/docs/showcase/table-conditional-format.tsx +0 -367
- package/docs/showcase/table-crud-list.tsx +0 -544
- package/docs/showcase/table-density.tsx +0 -349
- package/docs/showcase/table-expandable-rows.tsx +0 -496
- package/docs/showcase/table-filter-chips.tsx +0 -468
- package/docs/showcase/table-footer-totals.tsx +0 -328
- package/docs/showcase/table-grouped-subtotals.tsx +0 -398
- package/docs/showcase/table-master-detail.tsx +0 -482
- package/docs/showcase/table-pagination.tsx +0 -409
- package/docs/showcase/table-states.tsx +0 -371
- package/docs/showcase/table-sticky-columns.tsx +0 -377
- package/docs/showcase/table-tree-rows.tsx +0 -451
- package/docs/showcase/table-view-tabs.tsx +0 -488
- package/docs/showcase/tcgm-website.tsx +0 -1047
- package/docs/showcase/tenant-brand-color.tsx +0 -338
- package/docs/showcase/theme-customization.tsx +0 -1292
- package/docs/showcase/theme-lab.tsx +0 -2125
- package/docs/themes/flat.css +0 -466
- package/docs/themes/glassmorphism.css +0 -960
- package/docs/themes/index.ts +0 -219
- package/docs/themes/neubrutalism.css +0 -481
- /package/dist/components/navigation/{filter-bar.d.ts → toolbar.d.ts} +0 -0
- /package/dist/components/navigation/{filter-bar.js → toolbar.js} +0 -0
- /package/dist/{components/data-display → lab}/carousel.d.ts +0 -0
- /package/dist/{components/data-entry → lab}/emoji-data.d.ts +0 -0
- /package/dist/{components/data-entry → lab}/emoji-data.js +0 -0
- /package/dist/{components/data-display → lab}/marquee-reveal.d.ts +0 -0
- /package/dist/{components/data-display → lab}/marquee-reveal.js +0 -0
|
@@ -1,919 +0,0 @@
|
|
|
1
|
-
/** Caimono comparison composition. Public components and scoped token overrides only.
|
|
2
|
-
* Fixed source snapshot, not live merchant data. See /tmp/caimono-gaps.md for fidelity limits.
|
|
3
|
-
*/
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { Button, Heading, Text } from "@godxjp/ui/general";
|
|
6
|
-
import { Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
|
|
7
|
-
import {
|
|
8
|
-
Badge,
|
|
9
|
-
Card,
|
|
10
|
-
CardContent,
|
|
11
|
-
CardHeader,
|
|
12
|
-
CardTitle,
|
|
13
|
-
CardDescription,
|
|
14
|
-
DataTable,
|
|
15
|
-
Descriptions,
|
|
16
|
-
EmptyState,
|
|
17
|
-
type ColumnDef,
|
|
18
|
-
} from "@godxjp/ui/data-display";
|
|
19
|
-
import {
|
|
20
|
-
Form,
|
|
21
|
-
Checkbox,
|
|
22
|
-
FormField,
|
|
23
|
-
NumberInput,
|
|
24
|
-
SearchInput,
|
|
25
|
-
Segmented,
|
|
26
|
-
Select,
|
|
27
|
-
} from "@godxjp/ui/data-entry";
|
|
28
|
-
import {
|
|
29
|
-
Alert,
|
|
30
|
-
AlertDescription,
|
|
31
|
-
Dialog,
|
|
32
|
-
DialogBody,
|
|
33
|
-
DialogContent,
|
|
34
|
-
DialogDescription,
|
|
35
|
-
DialogFooter,
|
|
36
|
-
DialogHeader,
|
|
37
|
-
DialogTitle,
|
|
38
|
-
} from "@godxjp/ui/feedback";
|
|
39
|
-
import { AppSettingPicker } from "@godxjp/ui/navigation";
|
|
40
|
-
import { AreaChart } from "@godxjp/ui/charts";
|
|
41
|
-
import { useTranslation } from "@godxjp/ui/i18n";
|
|
42
|
-
|
|
43
|
-
// CUSTOMER-THEMING.md permits per-subtree custom-property overrides.
|
|
44
|
-
// No ordinary CSS declarations; reapply to portalled content because it leaves the page scope.
|
|
45
|
-
const theme = {
|
|
46
|
-
"--primary": "20.86956522 100.00000000% 36.07843137%", // #B84000, accessible action, not decorative orange
|
|
47
|
-
"--primary-hover": "20.92105263 100.00000000% 29.80392157%",
|
|
48
|
-
"--primary-foreground": "0 0% 100%",
|
|
49
|
-
"--ring": "218.00000000 75.63025210% 46.66666667%",
|
|
50
|
-
"--focus-ring-color": "218.00000000 75.63025210% 46.66666667%",
|
|
51
|
-
"--background": "210.00000000 22.22222222% 96.47058824%",
|
|
52
|
-
"--foreground": "220.27397260 76.84210526% 18.62745098%",
|
|
53
|
-
"--card": "0 0% 100%",
|
|
54
|
-
"--card-foreground": "220.27397260 76.84210526% 18.62745098%",
|
|
55
|
-
"--popover": "0 0% 100%",
|
|
56
|
-
"--popover-foreground": "220.27397260 76.84210526% 18.62745098%",
|
|
57
|
-
"--muted-foreground": "215.67567568 18.40796020% 39.41176471%",
|
|
58
|
-
"--border": "214.28571429 26.92307692% 89.80392157%",
|
|
59
|
-
"--input": "216.36363636 14.79820628% 56.27450980%",
|
|
60
|
-
"--accent": "32.72727273 100.00000000% 95.68627451%",
|
|
61
|
-
"--accent-foreground": "220.27397260 76.84210526% 18.62745098%",
|
|
62
|
-
"--text-primary": "20.86956522 100.00000000% 36.07843137%",
|
|
63
|
-
"--success": "155.55555556 69.23076923% 22.94117647%",
|
|
64
|
-
"--text-success": "155.55555556 69.23076923% 22.94117647%",
|
|
65
|
-
"--text-warning": "37.20930233 100.00000000% 25.29411765%",
|
|
66
|
-
"--text-error": "353.19148936 64.97695853% 42.54901961%",
|
|
67
|
-
"--text-info": "218.10810811 74.74747475% 38.82352941%",
|
|
68
|
-
"--radius-md": "10px",
|
|
69
|
-
"--radius-xl": "16px",
|
|
70
|
-
"--control-radius": "var(--radius-md)",
|
|
71
|
-
"--button-radius": "var(--radius-md)",
|
|
72
|
-
"--card-radius": "var(--radius-xl)",
|
|
73
|
-
"--radius-2xl": "24px",
|
|
74
|
-
"--card-shadow": "0 12px 36px rgb(11 35 84 / .06)",
|
|
75
|
-
"--font-sans-base":
|
|
76
|
-
'Inter, "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
|
77
|
-
"--font-sans-ja":
|
|
78
|
-
'"Noto Sans JP", "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif',
|
|
79
|
-
"--chart-1": "#B84000",
|
|
80
|
-
} as React.CSSProperties;
|
|
81
|
-
|
|
82
|
-
const snapshot = Date.parse("2026-09-13T09:00:00Z");
|
|
83
|
-
type Offer = {
|
|
84
|
-
id: string;
|
|
85
|
-
merchant: string;
|
|
86
|
-
model: string;
|
|
87
|
-
variant: string;
|
|
88
|
-
condition: string;
|
|
89
|
-
price: number;
|
|
90
|
-
shipping: { Tokyo: number | null; Osaka: number | null };
|
|
91
|
-
points: number;
|
|
92
|
-
observedAt: string;
|
|
93
|
-
eta: number | null;
|
|
94
|
-
inStock: boolean;
|
|
95
|
-
coupon?: number;
|
|
96
|
-
};
|
|
97
|
-
const common = { model: "AERO-H1", variant: "black", condition: "new", inStock: true };
|
|
98
|
-
const offers: Offer[] = [
|
|
99
|
-
{
|
|
100
|
-
...common,
|
|
101
|
-
id: "mori",
|
|
102
|
-
merchant: "mori",
|
|
103
|
-
price: 24800,
|
|
104
|
-
shipping: { Tokyo: 600, Osaka: 1000 },
|
|
105
|
-
points: 248,
|
|
106
|
-
observedAt: "2026-09-13T08:48:00Z",
|
|
107
|
-
eta: 1,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
...common,
|
|
111
|
-
id: "aoi",
|
|
112
|
-
merchant: "aoi",
|
|
113
|
-
price: 25100,
|
|
114
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
115
|
-
points: 251,
|
|
116
|
-
observedAt: "2026-09-13T08:42:00Z",
|
|
117
|
-
eta: 2,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
...common,
|
|
121
|
-
id: "hako",
|
|
122
|
-
merchant: "hako",
|
|
123
|
-
price: 25500,
|
|
124
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
125
|
-
points: 255,
|
|
126
|
-
observedAt: "2026-09-13T08:38:00Z",
|
|
127
|
-
eta: 3,
|
|
128
|
-
coupon: 1000,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
...common,
|
|
132
|
-
id: "kumo",
|
|
133
|
-
merchant: "kumo",
|
|
134
|
-
price: 23900,
|
|
135
|
-
shipping: { Tokyo: null, Osaka: null },
|
|
136
|
-
points: 239,
|
|
137
|
-
observedAt: "2026-09-13T08:20:00Z",
|
|
138
|
-
eta: 2,
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
...common,
|
|
142
|
-
id: "haru",
|
|
143
|
-
merchant: "haru",
|
|
144
|
-
price: 22900,
|
|
145
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
146
|
-
points: 229,
|
|
147
|
-
observedAt: "2026-09-11T08:00:00Z",
|
|
148
|
-
eta: 4,
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
...common,
|
|
152
|
-
id: "mika",
|
|
153
|
-
merchant: "mika",
|
|
154
|
-
price: 21800,
|
|
155
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
156
|
-
points: 218,
|
|
157
|
-
observedAt: "2026-09-13T08:30:00Z",
|
|
158
|
-
eta: null,
|
|
159
|
-
inStock: false,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
...common,
|
|
163
|
-
id: "neko-used",
|
|
164
|
-
merchant: "neko",
|
|
165
|
-
condition: "used",
|
|
166
|
-
price: 18800,
|
|
167
|
-
shipping: { Tokyo: 500, Osaka: 800 },
|
|
168
|
-
points: 0,
|
|
169
|
-
observedAt: "2026-09-13T08:40:00Z",
|
|
170
|
-
eta: 3,
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
...common,
|
|
174
|
-
id: "aoi-cream",
|
|
175
|
-
merchant: "aoi",
|
|
176
|
-
variant: "cream",
|
|
177
|
-
price: 26100,
|
|
178
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
179
|
-
points: 261,
|
|
180
|
-
observedAt: "2026-09-13T08:42:00Z",
|
|
181
|
-
eta: 2,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
...common,
|
|
185
|
-
id: "mori-cream",
|
|
186
|
-
merchant: "mori",
|
|
187
|
-
variant: "cream",
|
|
188
|
-
price: 25700,
|
|
189
|
-
shipping: { Tokyo: 600, Osaka: 1000 },
|
|
190
|
-
points: 257,
|
|
191
|
-
observedAt: "2026-09-13T08:48:00Z",
|
|
192
|
-
eta: 1,
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
...common,
|
|
196
|
-
id: "wrong-model",
|
|
197
|
-
merchant: "other",
|
|
198
|
-
model: "AERO-H2",
|
|
199
|
-
price: 9000,
|
|
200
|
-
shipping: { Tokyo: 0, Osaka: 0 },
|
|
201
|
-
points: 0,
|
|
202
|
-
observedAt: "2026-09-13T08:48:00Z",
|
|
203
|
-
eta: 1,
|
|
204
|
-
},
|
|
205
|
-
];
|
|
206
|
-
const history = {
|
|
207
|
-
"30": [
|
|
208
|
-
["2026-08-15", 27500],
|
|
209
|
-
["2026-08-19", 26800],
|
|
210
|
-
["2026-08-23", 26800],
|
|
211
|
-
["2026-08-27", 27200],
|
|
212
|
-
["2026-08-31", 25900],
|
|
213
|
-
["2026-09-04", 26100],
|
|
214
|
-
["2026-09-09", 25500],
|
|
215
|
-
["2026-09-13", 25100],
|
|
216
|
-
],
|
|
217
|
-
"90": [
|
|
218
|
-
["2026-06-16", 29900],
|
|
219
|
-
["2026-06-29", 28900],
|
|
220
|
-
["2026-07-12", 29100],
|
|
221
|
-
["2026-07-25", 27900],
|
|
222
|
-
["2026-08-07", 28100],
|
|
223
|
-
["2026-08-20", 26900],
|
|
224
|
-
["2026-09-02", 25700],
|
|
225
|
-
["2026-09-13", 25100],
|
|
226
|
-
],
|
|
227
|
-
} satisfies Record<string, [string, number][]>;
|
|
228
|
-
|
|
229
|
-
export default function CaimonoPriceComparison() {
|
|
230
|
-
const { t, locale } = useTranslation();
|
|
231
|
-
// Re-declare derived font aliases in this nested scope; root aliases are already resolved.
|
|
232
|
-
const font =
|
|
233
|
-
locale === "ja"
|
|
234
|
-
? theme["--font-sans-ja" as keyof React.CSSProperties]
|
|
235
|
-
: theme["--font-sans-base" as keyof React.CSSProperties];
|
|
236
|
-
const scopedTheme = {
|
|
237
|
-
...theme,
|
|
238
|
-
"--font-family-sans": font,
|
|
239
|
-
"--font-family-body": font,
|
|
240
|
-
"--font-family-display": font,
|
|
241
|
-
} as React.CSSProperties;
|
|
242
|
-
const [variant, setVariant] = React.useState("black");
|
|
243
|
-
const [condition, setCondition] = React.useState("new");
|
|
244
|
-
const [destination, setDestination] = React.useState<"Tokyo" | "Osaka">("Tokyo");
|
|
245
|
-
const [query, setQuery] = React.useState("");
|
|
246
|
-
const [sort, setSort] = React.useState("total");
|
|
247
|
-
const [free, setFree] = React.useState(false);
|
|
248
|
-
const [stock, setStock] = React.useState(false);
|
|
249
|
-
const [fast, setFast] = React.useState(false);
|
|
250
|
-
const [coupon, setCoupon] = React.useState(false);
|
|
251
|
-
const [period, setPeriod] = React.useState<"30" | "90">("30");
|
|
252
|
-
const [dialog, setDialog] = React.useState<"offer" | "alert" | "quote" | null>(null);
|
|
253
|
-
const [selectedId, setSelectedId] = React.useState<string | null>(null);
|
|
254
|
-
const [threshold, setThreshold] = React.useState<number | null>(25000);
|
|
255
|
-
const [notice, setNotice] = React.useState("");
|
|
256
|
-
const [favorite, setFavorite] = React.useState(false);
|
|
257
|
-
const favoriteKey = `caimono:favorite:JP:AERO-H1:${variant}:${condition}`;
|
|
258
|
-
React.useEffect(() => {
|
|
259
|
-
try {
|
|
260
|
-
setFavorite(localStorage.getItem(favoriteKey) === "1");
|
|
261
|
-
} catch {
|
|
262
|
-
setFavorite(false);
|
|
263
|
-
}
|
|
264
|
-
}, [favoriteKey]);
|
|
265
|
-
/*
|
|
266
|
-
* THE MARKET, not the viewer. A Japanese price-comparison board quotes JPY and stamps Tokyo time
|
|
267
|
-
* whichever language it is read in — translating the page does not move the shop. Both live here
|
|
268
|
-
* as market data so `Intl` derives the formatting from a value rather than from a literal at the
|
|
269
|
-
* call site, which is what `check:no-consumer-coupling` asks for and why it flagged the literals.
|
|
270
|
-
*/
|
|
271
|
-
const MARKET = { currency: "JPY", timeZone: "Asia/Tokyo" } as const;
|
|
272
|
-
|
|
273
|
-
const money = (value: number | null) =>
|
|
274
|
-
value === null
|
|
275
|
-
? t("caimono.unknownTotal")
|
|
276
|
-
: new Intl.NumberFormat(locale, { style: "currency", currency: MARKET.currency }).format(
|
|
277
|
-
value,
|
|
278
|
-
);
|
|
279
|
-
const number = (value: number) => new Intl.NumberFormat(locale).format(value);
|
|
280
|
-
const date = (value: string | number) =>
|
|
281
|
-
new Intl.DateTimeFormat(locale, {
|
|
282
|
-
dateStyle: "medium",
|
|
283
|
-
timeStyle: "short",
|
|
284
|
-
timeZone: MARKET.timeZone,
|
|
285
|
-
}).format(new Date(value));
|
|
286
|
-
const evaluate = (offer: Offer, applyCoupon = coupon) => {
|
|
287
|
-
const shipping = offer.shipping[destination];
|
|
288
|
-
const discount =
|
|
289
|
-
applyCoupon && snapshot < Date.parse("2026-09-14T09:00:00Z") ? (offer.coupon ?? 0) : 0;
|
|
290
|
-
const age = snapshot - Date.parse(offer.observedAt);
|
|
291
|
-
const reason =
|
|
292
|
-
!Number.isFinite(age) || age < 0 || age > 86400000
|
|
293
|
-
? "stale"
|
|
294
|
-
: !offer.inStock
|
|
295
|
-
? "outStock"
|
|
296
|
-
: shipping === null
|
|
297
|
-
? "needsShipping"
|
|
298
|
-
: null;
|
|
299
|
-
return {
|
|
300
|
-
...offer,
|
|
301
|
-
shippingCost: shipping,
|
|
302
|
-
discount,
|
|
303
|
-
total: shipping === null ? null : offer.price + shipping - discount,
|
|
304
|
-
reason,
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
const scoped = offers.filter(
|
|
308
|
-
(o) => o.model === "AERO-H1" && o.variant === variant && o.condition === condition,
|
|
309
|
-
);
|
|
310
|
-
const rows = scoped
|
|
311
|
-
.map((o) => evaluate(o))
|
|
312
|
-
.filter(
|
|
313
|
-
(o) =>
|
|
314
|
-
t(`caimono.merchants.${o.merchant}`)
|
|
315
|
-
.toLocaleLowerCase(locale)
|
|
316
|
-
.includes(query.toLocaleLowerCase(locale)) &&
|
|
317
|
-
(!free || o.shippingCost === 0) &&
|
|
318
|
-
(!stock || o.inStock) &&
|
|
319
|
-
(!fast || o.eta === 1),
|
|
320
|
-
)
|
|
321
|
-
.sort(
|
|
322
|
-
(a, b) =>
|
|
323
|
-
Number(!!a.reason) - Number(!!b.reason) ||
|
|
324
|
-
(sort === "delivery"
|
|
325
|
-
? (a.eta ?? Infinity) - (b.eta ?? Infinity)
|
|
326
|
-
: (a.total ?? Infinity) - (b.total ?? Infinity)) ||
|
|
327
|
-
a.id.localeCompare(b.id),
|
|
328
|
-
);
|
|
329
|
-
const eligible = rows.filter((o) => !o.reason && o.total !== null);
|
|
330
|
-
const minimum = eligible.length ? Math.min(...eligible.map((o) => o.total!)) : null;
|
|
331
|
-
const best = eligible.find((o) => o.total === minimum);
|
|
332
|
-
const selected = scoped.find((o) => o.id === selectedId);
|
|
333
|
-
const detail = selected ? evaluate(selected) : undefined;
|
|
334
|
-
const reset = () => {
|
|
335
|
-
setQuery("");
|
|
336
|
-
setFree(false);
|
|
337
|
-
setStock(false);
|
|
338
|
-
setFast(false);
|
|
339
|
-
};
|
|
340
|
-
const openOffer = (id: string) => {
|
|
341
|
-
setSelectedId(id);
|
|
342
|
-
setNotice("");
|
|
343
|
-
setDialog("offer");
|
|
344
|
-
};
|
|
345
|
-
const columns: ColumnDef<(typeof rows)[number]>[] = [
|
|
346
|
-
{
|
|
347
|
-
key: "merchant",
|
|
348
|
-
header: t("caimono.shop"),
|
|
349
|
-
render: (o) => (
|
|
350
|
-
<Flex direction="col" gap="xs">
|
|
351
|
-
<Text weight="semibold">{t(`caimono.merchants.${o.merchant}`)}</Text>
|
|
352
|
-
<Text size="sm" tone="muted">
|
|
353
|
-
{t(`caimono.${o.condition}`)}
|
|
354
|
-
</Text>
|
|
355
|
-
<Text size="xs" tone="muted">
|
|
356
|
-
{t("caimono.observed", { date: date(o.observedAt) })}
|
|
357
|
-
</Text>
|
|
358
|
-
</Flex>
|
|
359
|
-
),
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
key: "total",
|
|
363
|
-
header: t("caimono.cash"),
|
|
364
|
-
render: (o) => (
|
|
365
|
-
<Flex direction="col" gap="xs">
|
|
366
|
-
<Text size="xl" weight="bold" tabular>
|
|
367
|
-
{money(o.total)}
|
|
368
|
-
</Text>
|
|
369
|
-
{!o.reason && o.total === minimum ? (
|
|
370
|
-
<Badge tone="success">{t("caimono.best")}</Badge>
|
|
371
|
-
) : o.reason ? (
|
|
372
|
-
<Text size="sm" tone="warning">
|
|
373
|
-
{t(`caimono.${o.reason}`)}
|
|
374
|
-
</Text>
|
|
375
|
-
) : null}
|
|
376
|
-
<Text size="sm" tone="muted">
|
|
377
|
-
{t("caimono.itemValue", { amount: money(o.price) })}
|
|
378
|
-
</Text>
|
|
379
|
-
<Text size="sm" tone="muted">
|
|
380
|
-
{t("caimono.shippingValue", {
|
|
381
|
-
amount: o.shippingCost === null ? t("caimono.unknown") : money(o.shippingCost),
|
|
382
|
-
})}
|
|
383
|
-
</Text>
|
|
384
|
-
{o.discount > 0 && (
|
|
385
|
-
<Text size="sm" tone="success">
|
|
386
|
-
{t("caimono.discountValue", { amount: money(o.discount) })}
|
|
387
|
-
</Text>
|
|
388
|
-
)}
|
|
389
|
-
</Flex>
|
|
390
|
-
),
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
key: "eta",
|
|
394
|
-
header: t("caimono.delivery"),
|
|
395
|
-
render: (o) => (
|
|
396
|
-
<Flex direction="col" gap="xs">
|
|
397
|
-
<Text>
|
|
398
|
-
{o.eta === null
|
|
399
|
-
? t("caimono.unknown")
|
|
400
|
-
: t("caimono.eta", {
|
|
401
|
-
duration: new Intl.NumberFormat(locale, {
|
|
402
|
-
style: "unit",
|
|
403
|
-
unit: "day",
|
|
404
|
-
unitDisplay: "long",
|
|
405
|
-
}).format(o.eta),
|
|
406
|
-
})}
|
|
407
|
-
</Text>
|
|
408
|
-
<Text tone={o.inStock ? "success" : "muted"}>
|
|
409
|
-
{t(o.inStock ? "caimono.inStock" : "caimono.outStock")}
|
|
410
|
-
</Text>
|
|
411
|
-
<Text size="sm" tone="muted">
|
|
412
|
-
{t(o.condition === "new" ? "caimono.manufacturer" : "caimono.sellerWarranty")}
|
|
413
|
-
</Text>
|
|
414
|
-
<Text size="sm" tone="muted">
|
|
415
|
-
{t("caimono.pointsValue", { count: number(o.points) })}
|
|
416
|
-
</Text>
|
|
417
|
-
</Flex>
|
|
418
|
-
),
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
key: "actions",
|
|
422
|
-
header: t("caimono.action"),
|
|
423
|
-
render: (o) => (
|
|
424
|
-
<Button
|
|
425
|
-
variant={!o.reason && o.total === minimum ? "default" : "outline"}
|
|
426
|
-
size="sm"
|
|
427
|
-
onClick={() => openOffer(o.id)}
|
|
428
|
-
aria-label={t("caimono.detailFor", { merchant: t(`caimono.merchants.${o.merchant}`) })}
|
|
429
|
-
>
|
|
430
|
-
{t("caimono.breakdown")}
|
|
431
|
-
</Button>
|
|
432
|
-
),
|
|
433
|
-
},
|
|
434
|
-
];
|
|
435
|
-
const chartData = history[period].map(([day, total]) => ({
|
|
436
|
-
day: new Intl.DateTimeFormat(locale, {
|
|
437
|
-
month: "short",
|
|
438
|
-
day: "numeric",
|
|
439
|
-
timeZone: MARKET.timeZone,
|
|
440
|
-
}).format(new Date(`${day}T00:00:00+09:00`)),
|
|
441
|
-
total,
|
|
442
|
-
}));
|
|
443
|
-
return (
|
|
444
|
-
<Flex direction="col" gap="none" data-tenant="caimono" style={scopedTheme}>
|
|
445
|
-
<PageContainer
|
|
446
|
-
title={t("caimono.brand")}
|
|
447
|
-
subtitle={t("caimono.eyebrow")}
|
|
448
|
-
extra={<AppSettingPicker kind="locale" appearance="icon" />}
|
|
449
|
-
stickyFooter
|
|
450
|
-
footer={
|
|
451
|
-
<Flex direction="col" gap="sm">
|
|
452
|
-
<Flex hideFrom="md" justify="between" align="center" gap="sm" wrap>
|
|
453
|
-
<Text weight="bold" tabular>
|
|
454
|
-
{minimum === null ? t("caimono.noEligible") : money(minimum)}
|
|
455
|
-
</Text>
|
|
456
|
-
<Button disabled={!best} onClick={() => best && openOffer(best.id)}>
|
|
457
|
-
{t("caimono.bestDetails")}
|
|
458
|
-
</Button>
|
|
459
|
-
</Flex>
|
|
460
|
-
<Text size="sm" tone="muted">
|
|
461
|
-
{t("caimono.footerNote")}
|
|
462
|
-
</Text>
|
|
463
|
-
</Flex>
|
|
464
|
-
}
|
|
465
|
-
>
|
|
466
|
-
<Alert tone="info">
|
|
467
|
-
<AlertDescription>{t("caimono.demo")}</AlertDescription>
|
|
468
|
-
</Alert>
|
|
469
|
-
<Card style={{ "--card-radius": "var(--radius-2xl)" } as React.CSSProperties}>
|
|
470
|
-
<CardContent solo>
|
|
471
|
-
<ResponsiveGrid columns={{ base: 1, md: 2 }} gap="xl">
|
|
472
|
-
<Form>
|
|
473
|
-
<Flex direction="col" gap="md">
|
|
474
|
-
<Badge tone="neutral">{t("caimono.synthetic")}</Badge>
|
|
475
|
-
<Heading level={1}>{t("caimono.product")}</Heading>
|
|
476
|
-
<Text tone="muted">{t("caimono.productMeta", { count: number(1) })}</Text>
|
|
477
|
-
<FormField label={t("caimono.variant")}>
|
|
478
|
-
<Select
|
|
479
|
-
value={variant}
|
|
480
|
-
onValueChange={setVariant}
|
|
481
|
-
options={["black", "cream"].map((value) => ({
|
|
482
|
-
value,
|
|
483
|
-
label: t(`caimono.${value}`),
|
|
484
|
-
}))}
|
|
485
|
-
/>
|
|
486
|
-
</FormField>
|
|
487
|
-
<FormField label={t("caimono.condition")}>
|
|
488
|
-
<Segmented
|
|
489
|
-
value={condition}
|
|
490
|
-
onValueChange={setCondition}
|
|
491
|
-
options={["new", "used"].map((value) => ({
|
|
492
|
-
value,
|
|
493
|
-
label: t(`caimono.${value}`),
|
|
494
|
-
}))}
|
|
495
|
-
/>
|
|
496
|
-
</FormField>
|
|
497
|
-
</Flex>
|
|
498
|
-
</Form>
|
|
499
|
-
<Flex direction="col" gap="md">
|
|
500
|
-
<Text tone="muted">{t("caimono.lowest")}</Text>
|
|
501
|
-
<Text size="4xl" weight="bold" tabular>
|
|
502
|
-
{minimum === null ? t("caimono.noEligible") : money(minimum)}
|
|
503
|
-
</Text>
|
|
504
|
-
<Text>{t("caimono.incl")}</Text>
|
|
505
|
-
<Text size="sm" tone="muted">
|
|
506
|
-
{t(coupon ? "caimono.couponActive" : "caimono.couponInactive")}
|
|
507
|
-
</Text>
|
|
508
|
-
<Flex gap="sm" wrap>
|
|
509
|
-
<Button disabled={!best} onClick={() => best && openOffer(best.id)}>
|
|
510
|
-
{t("caimono.bestDetails")}
|
|
511
|
-
</Button>
|
|
512
|
-
<Button
|
|
513
|
-
variant="outline"
|
|
514
|
-
onClick={() => {
|
|
515
|
-
const totals = scoped
|
|
516
|
-
.map((o) => evaluate(o, false))
|
|
517
|
-
.filter((o) => !o.reason && o.total !== null)
|
|
518
|
-
.map((o) => o.total!);
|
|
519
|
-
setThreshold(totals.length ? Math.max(1, Math.min(...totals) - 1000) : 25000);
|
|
520
|
-
setNotice("");
|
|
521
|
-
setDialog("alert");
|
|
522
|
-
}}
|
|
523
|
-
>
|
|
524
|
-
{t("caimono.priceAlert")}
|
|
525
|
-
</Button>
|
|
526
|
-
<Button
|
|
527
|
-
variant="ghost"
|
|
528
|
-
aria-pressed={favorite}
|
|
529
|
-
onClick={() => {
|
|
530
|
-
try {
|
|
531
|
-
localStorage.setItem(favoriteKey, favorite ? "0" : "1");
|
|
532
|
-
setFavorite(!favorite);
|
|
533
|
-
setNotice(t(favorite ? "caimono.favoriteOff" : "caimono.favoriteOn"));
|
|
534
|
-
} catch {
|
|
535
|
-
setNotice(t("caimono.storageFail"));
|
|
536
|
-
}
|
|
537
|
-
}}
|
|
538
|
-
>
|
|
539
|
-
{t(favorite ? "caimono.saved" : "caimono.save")}
|
|
540
|
-
</Button>
|
|
541
|
-
</Flex>
|
|
542
|
-
</Flex>
|
|
543
|
-
</ResponsiveGrid>
|
|
544
|
-
</CardContent>
|
|
545
|
-
</Card>
|
|
546
|
-
<Heading level={2}>{t("caimono.offers")}</Heading>
|
|
547
|
-
<Text tone="muted" size="sm">
|
|
548
|
-
{t("caimono.snapshot", { date: date(snapshot) })}
|
|
549
|
-
</Text>
|
|
550
|
-
<Form>
|
|
551
|
-
<ResponsiveGrid columns={{ base: 1, md: 3 }} gap="md">
|
|
552
|
-
<FormField label={t("caimono.findShop")}>
|
|
553
|
-
<SearchInput
|
|
554
|
-
value={query}
|
|
555
|
-
onValueChange={setQuery}
|
|
556
|
-
placeholder={t("caimono.searchPlaceholder")}
|
|
557
|
-
/>
|
|
558
|
-
</FormField>
|
|
559
|
-
<FormField label={t("caimono.deliverTo")}>
|
|
560
|
-
<Select
|
|
561
|
-
value={destination}
|
|
562
|
-
onValueChange={(v: string) => setDestination(v === "Osaka" ? "Osaka" : "Tokyo")}
|
|
563
|
-
options={["Tokyo", "Osaka"].map((value) => ({
|
|
564
|
-
value,
|
|
565
|
-
label: t(`caimono.${value}`),
|
|
566
|
-
}))}
|
|
567
|
-
/>
|
|
568
|
-
</FormField>
|
|
569
|
-
<FormField label={t("caimono.sort")}>
|
|
570
|
-
<Select
|
|
571
|
-
value={sort}
|
|
572
|
-
onValueChange={setSort}
|
|
573
|
-
options={[
|
|
574
|
-
{ value: "total", label: t("caimono.totalSort") },
|
|
575
|
-
{ value: "delivery", label: t("caimono.deliverySort") },
|
|
576
|
-
]}
|
|
577
|
-
/>
|
|
578
|
-
</FormField>
|
|
579
|
-
</ResponsiveGrid>
|
|
580
|
-
</Form>
|
|
581
|
-
<Flex gap="md" wrap align="center">
|
|
582
|
-
<Checkbox checked={free} onCheckedChange={(v) => setFree(v === true)}>
|
|
583
|
-
{t("caimono.free")}
|
|
584
|
-
</Checkbox>
|
|
585
|
-
<Checkbox checked={stock} onCheckedChange={(v) => setStock(v === true)}>
|
|
586
|
-
{t("caimono.stockOnly")}
|
|
587
|
-
</Checkbox>
|
|
588
|
-
<Checkbox checked={fast} onCheckedChange={(v) => setFast(v === true)}>
|
|
589
|
-
{t("caimono.fast", {
|
|
590
|
-
duration: new Intl.NumberFormat(locale, {
|
|
591
|
-
style: "unit",
|
|
592
|
-
unit: "day",
|
|
593
|
-
unitDisplay: "long",
|
|
594
|
-
}).format(1),
|
|
595
|
-
})}
|
|
596
|
-
</Checkbox>
|
|
597
|
-
<Button variant="ghost" size="sm" onClick={reset}>
|
|
598
|
-
{t("caimono.reset")}
|
|
599
|
-
</Button>
|
|
600
|
-
</Flex>
|
|
601
|
-
<Text role="status" size="sm">
|
|
602
|
-
{t("caimono.counts", { total: number(rows.length), eligible: number(eligible.length) })}
|
|
603
|
-
</Text>
|
|
604
|
-
<Card>
|
|
605
|
-
<CardContent flush>
|
|
606
|
-
<DataTable
|
|
607
|
-
data={rows}
|
|
608
|
-
columns={columns}
|
|
609
|
-
getRowId={(o) => o.id}
|
|
610
|
-
rowTone={(o) => (!o.reason && o.total === minimum ? "success" : undefined)}
|
|
611
|
-
empty={
|
|
612
|
-
<EmptyState
|
|
613
|
-
title={t("caimono.noResultTitle")}
|
|
614
|
-
description={t("caimono.noResultBody")}
|
|
615
|
-
/>
|
|
616
|
-
}
|
|
617
|
-
/>
|
|
618
|
-
</CardContent>
|
|
619
|
-
</Card>
|
|
620
|
-
<Text size="sm" tone="muted">
|
|
621
|
-
{t("caimono.limitNote")}
|
|
622
|
-
</Text>
|
|
623
|
-
<ResponsiveGrid columns={{ base: 1, md: 3 }} gap="lg">
|
|
624
|
-
<Card>
|
|
625
|
-
<CardHeader>
|
|
626
|
-
<CardTitle>{t("caimono.couponTitle")}</CardTitle>
|
|
627
|
-
</CardHeader>
|
|
628
|
-
<CardContent>
|
|
629
|
-
<Flex direction="col" gap="sm">
|
|
630
|
-
<Checkbox checked={coupon} onCheckedChange={(v) => setCoupon(v === true)}>
|
|
631
|
-
{t("caimono.couponLabel", { amount: money(1000) })}
|
|
632
|
-
</Checkbox>
|
|
633
|
-
<Text size="sm" tone="muted">
|
|
634
|
-
{t("caimono.couponHelp")}
|
|
635
|
-
</Text>
|
|
636
|
-
<Text size="sm" tone="muted">
|
|
637
|
-
{t("caimono.expires", { date: date("2026-09-14T09:00:00Z") })}
|
|
638
|
-
</Text>
|
|
639
|
-
</Flex>
|
|
640
|
-
</CardContent>
|
|
641
|
-
</Card>
|
|
642
|
-
<Card>
|
|
643
|
-
<CardHeader>
|
|
644
|
-
<CardTitle>{t("caimono.whyRank")}</CardTitle>
|
|
645
|
-
</CardHeader>
|
|
646
|
-
<CardContent>
|
|
647
|
-
<Flex direction="col" gap="sm">
|
|
648
|
-
{["rule1", "rule2", "rule3"].map((key) => (
|
|
649
|
-
<Text key={key} size="sm">
|
|
650
|
-
{t(`caimono.${key}`)}
|
|
651
|
-
</Text>
|
|
652
|
-
))}
|
|
653
|
-
<Text size="sm" tone="muted">
|
|
654
|
-
{t("caimono.kaimiBody")}
|
|
655
|
-
</Text>
|
|
656
|
-
</Flex>
|
|
657
|
-
</CardContent>
|
|
658
|
-
</Card>
|
|
659
|
-
<Card>
|
|
660
|
-
<CardHeader>
|
|
661
|
-
<CardTitle>{t("caimono.buyAssist")}</CardTitle>
|
|
662
|
-
</CardHeader>
|
|
663
|
-
<CardContent>
|
|
664
|
-
<Flex direction="col" gap="md">
|
|
665
|
-
<Text size="sm" tone="muted">
|
|
666
|
-
{t("caimono.buyAssistBody")}
|
|
667
|
-
</Text>
|
|
668
|
-
<Button
|
|
669
|
-
variant="outline"
|
|
670
|
-
onClick={() => {
|
|
671
|
-
setNotice("");
|
|
672
|
-
setDialog("quote");
|
|
673
|
-
}}
|
|
674
|
-
>
|
|
675
|
-
{t("caimono.quote")}
|
|
676
|
-
</Button>
|
|
677
|
-
</Flex>
|
|
678
|
-
</CardContent>
|
|
679
|
-
</Card>
|
|
680
|
-
</ResponsiveGrid>
|
|
681
|
-
<Card>
|
|
682
|
-
<CardHeader>
|
|
683
|
-
<CardTitle>{t("caimono.historyTitle")}</CardTitle>
|
|
684
|
-
<CardDescription>{t("caimono.historyScope")}</CardDescription>
|
|
685
|
-
</CardHeader>
|
|
686
|
-
<CardContent>
|
|
687
|
-
<Flex direction="col" gap="md">
|
|
688
|
-
<FormField label={t("caimono.period")}>
|
|
689
|
-
<Segmented
|
|
690
|
-
value={period}
|
|
691
|
-
onValueChange={(v) => setPeriod(v === "90" ? "90" : "30")}
|
|
692
|
-
options={[30, 90].map((value) => ({
|
|
693
|
-
value: String(value),
|
|
694
|
-
label: new Intl.NumberFormat(locale, {
|
|
695
|
-
style: "unit",
|
|
696
|
-
unit: "day",
|
|
697
|
-
unitDisplay: "long",
|
|
698
|
-
}).format(value),
|
|
699
|
-
}))}
|
|
700
|
-
/>
|
|
701
|
-
</FormField>
|
|
702
|
-
<AreaChart
|
|
703
|
-
label={t("caimono.historyTitle")}
|
|
704
|
-
showCaption={false}
|
|
705
|
-
description={t("caimono.historyScope")}
|
|
706
|
-
data={chartData}
|
|
707
|
-
categoryKey="day"
|
|
708
|
-
series={[{ dataKey: "total", label: t("caimono.historyMetric") }]}
|
|
709
|
-
numberFormat={{ style: "currency", currency: MARKET.currency }}
|
|
710
|
-
/>
|
|
711
|
-
</Flex>
|
|
712
|
-
</CardContent>
|
|
713
|
-
<CardContent flush>
|
|
714
|
-
<DataTable
|
|
715
|
-
data={chartData}
|
|
716
|
-
getRowId={(r) => r.day}
|
|
717
|
-
columns={[
|
|
718
|
-
{ key: "day", header: t("caimono.date") },
|
|
719
|
-
{
|
|
720
|
-
key: "total",
|
|
721
|
-
header: t("caimono.price"),
|
|
722
|
-
render: (r) => <Text tabular>{money(r.total)}</Text>,
|
|
723
|
-
},
|
|
724
|
-
]}
|
|
725
|
-
/>
|
|
726
|
-
</CardContent>
|
|
727
|
-
</Card>
|
|
728
|
-
<Card>
|
|
729
|
-
<CardHeader>
|
|
730
|
-
<CardTitle>{t("caimono.reviewTitle")}</CardTitle>
|
|
731
|
-
</CardHeader>
|
|
732
|
-
<CardContent>
|
|
733
|
-
<ResponsiveGrid columns={{ base: 1, md: 2 }} gap="lg">
|
|
734
|
-
<Flex direction="col" gap="sm">
|
|
735
|
-
<Heading level={3}>{t("caimono.editorial")}</Heading>
|
|
736
|
-
<Text tone="muted">{t("caimono.editorialBody")}</Text>
|
|
737
|
-
</Flex>
|
|
738
|
-
<Flex direction="col" gap="sm">
|
|
739
|
-
<Heading level={3}>{t("caimono.community")}</Heading>
|
|
740
|
-
<Text tone="muted">{t("caimono.communityBody")}</Text>
|
|
741
|
-
</Flex>
|
|
742
|
-
</ResponsiveGrid>
|
|
743
|
-
</CardContent>
|
|
744
|
-
</Card>
|
|
745
|
-
<Card>
|
|
746
|
-
<CardHeader>
|
|
747
|
-
<CardTitle>{t("caimono.specTitle")}</CardTitle>
|
|
748
|
-
</CardHeader>
|
|
749
|
-
<CardContent>
|
|
750
|
-
<Descriptions
|
|
751
|
-
items={[
|
|
752
|
-
{ label: t("caimono.model"), value: t("caimono.modelValue") },
|
|
753
|
-
{ label: t("caimono.connection"), value: t("caimono.wireless") },
|
|
754
|
-
{ label: t("caimono.unit"), value: number(1) },
|
|
755
|
-
{ label: t("caimono.market"), value: t("caimono.japan") },
|
|
756
|
-
]}
|
|
757
|
-
/>
|
|
758
|
-
</CardContent>
|
|
759
|
-
</Card>
|
|
760
|
-
<Text weight="semibold">{t("caimono.disclosure")}</Text>
|
|
761
|
-
<Text tone="muted" size="sm">
|
|
762
|
-
{t("caimono.disclosureText", {
|
|
763
|
-
duration: new Intl.NumberFormat(locale, {
|
|
764
|
-
style: "unit",
|
|
765
|
-
unit: "hour",
|
|
766
|
-
unitDisplay: "long",
|
|
767
|
-
}).format(24),
|
|
768
|
-
})}
|
|
769
|
-
</Text>
|
|
770
|
-
<Text role="status">{dialog === null ? notice : ""}</Text>
|
|
771
|
-
</PageContainer>
|
|
772
|
-
<Dialog
|
|
773
|
-
open={dialog !== null}
|
|
774
|
-
onOpenChange={(open) => {
|
|
775
|
-
if (!open) {
|
|
776
|
-
setDialog(null);
|
|
777
|
-
setNotice("");
|
|
778
|
-
}
|
|
779
|
-
}}
|
|
780
|
-
>
|
|
781
|
-
<DialogContent style={scopedTheme}>
|
|
782
|
-
<DialogHeader>
|
|
783
|
-
<DialogTitle>
|
|
784
|
-
{t(
|
|
785
|
-
dialog === "alert"
|
|
786
|
-
? "caimono.alertTitle"
|
|
787
|
-
: dialog === "quote"
|
|
788
|
-
? "caimono.quoteTitle"
|
|
789
|
-
: "caimono.breakdownTitle",
|
|
790
|
-
)}
|
|
791
|
-
</DialogTitle>
|
|
792
|
-
<DialogDescription>
|
|
793
|
-
{t(
|
|
794
|
-
dialog === "alert"
|
|
795
|
-
? "caimono.alertBody"
|
|
796
|
-
: dialog === "quote"
|
|
797
|
-
? "caimono.quoteBody"
|
|
798
|
-
: "caimono.breakdownNote",
|
|
799
|
-
)}
|
|
800
|
-
</DialogDescription>
|
|
801
|
-
</DialogHeader>
|
|
802
|
-
<DialogBody>
|
|
803
|
-
{dialog === "offer" && detail && (
|
|
804
|
-
<Flex direction="col" gap="md">
|
|
805
|
-
<Heading level={3}>{t(`caimono.merchants.${detail.merchant}`)}</Heading>
|
|
806
|
-
<Descriptions
|
|
807
|
-
columns={1}
|
|
808
|
-
items={[
|
|
809
|
-
{ label: t("caimono.item"), value: money(detail.price) },
|
|
810
|
-
{
|
|
811
|
-
label: t("caimono.shipping"),
|
|
812
|
-
value:
|
|
813
|
-
detail.shippingCost === null
|
|
814
|
-
? t("caimono.unknown")
|
|
815
|
-
: money(detail.shippingCost),
|
|
816
|
-
},
|
|
817
|
-
{ label: t("caimono.fee"), value: money(0) },
|
|
818
|
-
{ label: t("caimono.discount"), value: money(detail.discount) },
|
|
819
|
-
{ label: t("caimono.cash"), value: money(detail.total) },
|
|
820
|
-
{ label: t("caimono.points"), value: number(detail.points) },
|
|
821
|
-
]}
|
|
822
|
-
/>
|
|
823
|
-
<Text tone="muted">{t("caimono.notDeducted")}</Text>
|
|
824
|
-
{detail.reason && (
|
|
825
|
-
<Alert tone="warning">
|
|
826
|
-
<AlertDescription>
|
|
827
|
-
{t(`caimono.${detail.reason}`)} {t("caimono.notRankedExplain")}
|
|
828
|
-
</AlertDescription>
|
|
829
|
-
</Alert>
|
|
830
|
-
)}
|
|
831
|
-
</Flex>
|
|
832
|
-
)}
|
|
833
|
-
{dialog === "alert" && (
|
|
834
|
-
<Flex direction="col" gap="md">
|
|
835
|
-
<Text>
|
|
836
|
-
{t("caimono.alertScope", {
|
|
837
|
-
variant: t(`caimono.${variant}`),
|
|
838
|
-
condition: t(`caimono.${condition}`),
|
|
839
|
-
destination: t(`caimono.${destination}`),
|
|
840
|
-
})}
|
|
841
|
-
</Text>
|
|
842
|
-
<FormField label={t("caimono.alertLabel")} helper={t("caimono.alertHelp")}>
|
|
843
|
-
<NumberInput
|
|
844
|
-
value={threshold}
|
|
845
|
-
onValueChange={setThreshold}
|
|
846
|
-
min={1}
|
|
847
|
-
max={10000000}
|
|
848
|
-
precision={0}
|
|
849
|
-
/>
|
|
850
|
-
</FormField>
|
|
851
|
-
</Flex>
|
|
852
|
-
)}
|
|
853
|
-
{dialog === "quote" && (
|
|
854
|
-
<Flex direction="col" gap="md">
|
|
855
|
-
<Descriptions
|
|
856
|
-
columns={1}
|
|
857
|
-
items={[
|
|
858
|
-
{ label: t("caimono.domestic"), value: money(minimum) },
|
|
859
|
-
...["assistFee", "intlShip", "importCost"].map((key) => ({
|
|
860
|
-
label: t(`caimono.${key}`),
|
|
861
|
-
value: t("caimono.pendingQuote"),
|
|
862
|
-
})),
|
|
863
|
-
{ label: t("caimono.landed"), value: t("caimono.notFinal") },
|
|
864
|
-
]}
|
|
865
|
-
/>
|
|
866
|
-
<Text tone="muted">{t("caimono.quoteNote")}</Text>
|
|
867
|
-
</Flex>
|
|
868
|
-
)}
|
|
869
|
-
<Text role="status">{notice}</Text>
|
|
870
|
-
</DialogBody>
|
|
871
|
-
<DialogFooter>
|
|
872
|
-
<Button
|
|
873
|
-
variant="outline"
|
|
874
|
-
onClick={() => {
|
|
875
|
-
setDialog(null);
|
|
876
|
-
setNotice("");
|
|
877
|
-
}}
|
|
878
|
-
>
|
|
879
|
-
{t("caimono.close")}
|
|
880
|
-
</Button>
|
|
881
|
-
{dialog === "alert" && (
|
|
882
|
-
<Button
|
|
883
|
-
disabled={
|
|
884
|
-
threshold === null ||
|
|
885
|
-
!Number.isSafeInteger(threshold) ||
|
|
886
|
-
threshold < 1 ||
|
|
887
|
-
threshold > 10000000
|
|
888
|
-
}
|
|
889
|
-
onClick={() => {
|
|
890
|
-
try {
|
|
891
|
-
localStorage.setItem(
|
|
892
|
-
`caimono:alert:${variant}:${condition}:${destination}`,
|
|
893
|
-
JSON.stringify({
|
|
894
|
-
model: "AERO-H1",
|
|
895
|
-
variant,
|
|
896
|
-
condition,
|
|
897
|
-
destination,
|
|
898
|
-
currency: MARKET.currency,
|
|
899
|
-
market: "JP",
|
|
900
|
-
threshold,
|
|
901
|
-
metric: "cash_total_without_conditional_coupon",
|
|
902
|
-
createdAt: new Date().toISOString(),
|
|
903
|
-
}),
|
|
904
|
-
);
|
|
905
|
-
setNotice(t("caimono.alertSaved"));
|
|
906
|
-
} catch {
|
|
907
|
-
setNotice(t("caimono.storageFail"));
|
|
908
|
-
}
|
|
909
|
-
}}
|
|
910
|
-
>
|
|
911
|
-
{t("caimono.alertSave")}
|
|
912
|
-
</Button>
|
|
913
|
-
)}
|
|
914
|
-
</DialogFooter>
|
|
915
|
-
</DialogContent>
|
|
916
|
-
</Dialog>
|
|
917
|
-
</Flex>
|
|
918
|
-
);
|
|
919
|
-
}
|