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,55 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const t = e(
|
|
3
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap typo-label-md transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 cursor-pointer",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-[var(--Brand-Primary)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] rounded-full",
|
|
8
|
+
secondary: "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Secondary-Button)] rounded-full",
|
|
9
|
+
"secondary-switch": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] border border-[var(--Border-Accent-Primary)] hover:bg-[var(--Hover-Secondary-Button)] rounded-full",
|
|
10
|
+
tertiary: "bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)] border border-[var(--Border-Medium-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] rounded-full",
|
|
11
|
+
ghost: "text-[var(--Text-Accent-Primary)] hover:bg-[var(--Hover-Ghost-Button)] rounded-full",
|
|
12
|
+
destructive: "bg-[var(--Caution-Base)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Destructive-Button)] active:bg-[var(--Active-Destructive-Button)] rounded-full",
|
|
13
|
+
link: "text-[var(--Text-Accent-Primary)] underline-offset-4 hover:underline",
|
|
14
|
+
// glass の押下は不透明度を落とさず「わずかに縮んで増光」させる
|
|
15
|
+
// (iOS の Liquid Glass はタップでガラスがハイライトする挙動)。
|
|
16
|
+
// リリース時はオーバーシュートする bezier で液体的に弾ませる。
|
|
17
|
+
glass: "glass glass-specular text-[var(--Text-High-Emphasis)] transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:brightness-[1.06] active:scale-[0.96] active:brightness-110 rounded-full",
|
|
18
|
+
accent: "bg-gradient-to-r from-[var(--Brand-Primary)] to-[var(--Brand-Action)] text-[var(--Text-on-Inverse)] border border-transparent hover:opacity-90 rounded-full",
|
|
19
|
+
// inverse — 暗背景・ヒーローセクション上に乗せる primary CTA。
|
|
20
|
+
// 白背景 + アクセント文字(Brand-Primary)。
|
|
21
|
+
inverse: "bg-[var(--Surface-Primary)] text-[var(--Brand-Primary)] hover:bg-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-800)] disabled:bg-[var(--Primitive-White-Alpha-300)] disabled:text-[var(--Text-Disable)] rounded-full",
|
|
22
|
+
// ghost-inverse — 暗背景・ヒーローセクション上の secondary CTA。
|
|
23
|
+
// 透過背景 + 白文字 + 白枠。
|
|
24
|
+
"ghost-inverse": "border border-[var(--Primitive-White-Alpha-300)] bg-transparent text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-White-Alpha-200)] hover:border-[var(--Primitive-White-Alpha-900)] active:bg-[var(--Primitive-White-Alpha-300)] disabled:border-[var(--Primitive-White-Alpha-200)] disabled:text-[var(--Primitive-White-Alpha-300)] rounded-full"
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
xs: "h-6 px-2 typo-label-xs",
|
|
28
|
+
sm: "h-8 px-3 typo-label-sm",
|
|
29
|
+
default: "h-10 px-4 typo-label-md",
|
|
30
|
+
lg: "h-12 px-6 typo-label-md",
|
|
31
|
+
xl: "h-14 px-8 typo-label-lg",
|
|
32
|
+
// hero — トップページの hero / final-CTA 専用のピル型特大 CTA。
|
|
33
|
+
// min-h-14 + rounded-full + typo-label-lg。xl とは異なり常に丸い。
|
|
34
|
+
hero: "min-h-14 rounded-full px-6 typo-label-lg",
|
|
35
|
+
icon: "size-10",
|
|
36
|
+
"icon-sm": "size-8",
|
|
37
|
+
"icon-lg": "size-12",
|
|
38
|
+
"icon-xl": "size-11",
|
|
39
|
+
match: "h-12 px-4 typo-label-md"
|
|
40
|
+
},
|
|
41
|
+
layout: {
|
|
42
|
+
horizontal: "",
|
|
43
|
+
vertical: "flex-col gap-1 h-14 rounded-2xl py-2 typo-label-sm"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
variant: "default",
|
|
48
|
+
size: "default",
|
|
49
|
+
layout: "horizontal"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
export {
|
|
54
|
+
t as b
|
|
55
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-safe class-name generators.
|
|
3
|
+
*
|
|
4
|
+
* このエントリは **"use client" を持たない**ため Next.js App Router の
|
|
5
|
+
* Server Component から直接 import できる。Button などコンポーネント本体は
|
|
6
|
+
* React フックを含むため "use client" バンドルに入るが、その className
|
|
7
|
+
* 生成関数 (`buttonVariants` 等) は純粋な cva 呼び出しなので、ここから
|
|
8
|
+
* 提供する。
|
|
9
|
+
*
|
|
10
|
+
* 使い方:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // app/some-rsc/page.tsx — Server Component
|
|
13
|
+
* import { buttonVariants } from "ksk-design-system/class-names"
|
|
14
|
+
*
|
|
15
|
+
* export default function Page() {
|
|
16
|
+
* return (
|
|
17
|
+
* <Link href="/" className={buttonVariants({ variant: "tertiary" })}>
|
|
18
|
+
* 戻る
|
|
19
|
+
* </Link>
|
|
20
|
+
* )
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* 既存の `import { buttonVariants } from "ksk-design-system"` も引き続き
|
|
25
|
+
* 動作するが、Server Component から呼ぶ場合はこちら経由が必須。
|
|
26
|
+
*/
|
|
27
|
+
export { buttonVariants, type ButtonVariantsProps, } from "@/lib/server-variants/button-variants";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface BulkActionsProps extends React.ComponentProps<"div"> {
|
|
3
|
+
/** 選択件数 */
|
|
4
|
+
selectedCount: number;
|
|
5
|
+
/** 選択解除ボタンクリック時 */
|
|
6
|
+
onClear?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 一括操作バー(FAB型)
|
|
10
|
+
*
|
|
11
|
+
* テーブル行を1件以上選択すると画面下部に浮き上がるフローティングバー。
|
|
12
|
+
* 選択件数 + アクションボタン群を横並びで表示。
|
|
13
|
+
* selectedCount が 0 のとき自動で非表示になる。
|
|
14
|
+
*/
|
|
15
|
+
declare function BulkActions({ selectedCount, onClear, children, className, ...props }: BulkActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { BulkActions };
|
|
17
|
+
export type { BulkActionsProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Granularity = "hour" | "day" | "week" | "month";
|
|
2
|
+
type Period = "7d" | "30d" | "90d" | "1y" | "custom";
|
|
3
|
+
interface ChartControlsProps {
|
|
4
|
+
granularity?: Granularity;
|
|
5
|
+
onGranularityChange?: (value: Granularity) => void;
|
|
6
|
+
period?: Period;
|
|
7
|
+
onPeriodChange?: (value: Period) => void;
|
|
8
|
+
showComparison?: boolean;
|
|
9
|
+
onComparisonChange?: (value: boolean) => void;
|
|
10
|
+
/** カスタム期間ボタンクリック */
|
|
11
|
+
onCustomPeriod?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function ChartControls({ granularity, onGranularityChange, period, onPeriodChange, showComparison, onComparisonChange, onCustomPeriod, className, }: ChartControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { ChartControls };
|
|
16
|
+
export type { ChartControlsProps, Granularity, Period };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
type SortDirection = "asc" | "desc" | null;
|
|
4
|
+
/** 列の sticky 位置。`true` は `"left"` のエイリアス。 */
|
|
5
|
+
type StickyPosition = "left" | "right" | true;
|
|
6
|
+
/**
|
|
7
|
+
* 横スクロール時に列を「貼り付け」表示するためのスタイル/クラスを生成するヘルパ。
|
|
8
|
+
*
|
|
9
|
+
* `DataTable` 自体が `overflow-x-auto` のスクロールコンテナになっているため、
|
|
10
|
+
* 子の `<th>` / `<td>` に `position: sticky` と `left`/`right` を指定するだけで
|
|
11
|
+
* 縦方向(行)にもスクロールしながら水平方向の固定が可能になります。
|
|
12
|
+
*
|
|
13
|
+
* 行ホバー時の背景色を上書きするため、固定列は不透明な `--Surface-Primary` を
|
|
14
|
+
* 明示的に塗ります(ヘッダー行は `--Surface-Secondary`)。
|
|
15
|
+
*
|
|
16
|
+
* @param position - "left" | "right" | true (= "left")
|
|
17
|
+
* @param offset - 同じ側に複数の固定列がある場合のオフセット(px)
|
|
18
|
+
* @param isHeader - ヘッダー行のセルの場合は true
|
|
19
|
+
*/
|
|
20
|
+
declare function getStickyCellProps(position: StickyPosition, offset?: number, isHeader?: boolean): {
|
|
21
|
+
className: string;
|
|
22
|
+
style: React.CSSProperties;
|
|
23
|
+
};
|
|
24
|
+
interface DataTableProps extends React.ComponentProps<"div"> {
|
|
25
|
+
}
|
|
26
|
+
declare function DataTable({ className, children, ...props }: DataTableProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
interface DataTableTableProps extends React.ComponentProps<"table"> {
|
|
28
|
+
}
|
|
29
|
+
declare function DataTableTable({ className, children, ...props }: DataTableTableProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
interface DataTableHeaderProps extends React.ComponentProps<"thead"> {
|
|
31
|
+
}
|
|
32
|
+
declare function DataTableHeader({ className, children, ...props }: DataTableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
interface DataTableBodyProps extends React.ComponentProps<"tbody"> {
|
|
34
|
+
}
|
|
35
|
+
declare function DataTableBody({ className, children, ...props }: DataTableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
interface DataTableRowProps extends React.ComponentProps<"tr"> {
|
|
37
|
+
selected?: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare function DataTableRow({ className, selected, children, ...props }: DataTableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
interface DataTableHeadProps extends React.ComponentProps<"th"> {
|
|
41
|
+
sortable?: boolean;
|
|
42
|
+
sortDirection?: SortDirection;
|
|
43
|
+
onSort?: () => void;
|
|
44
|
+
/** 横スクロール時に列を貼り付け表示する */
|
|
45
|
+
sticky?: StickyPosition;
|
|
46
|
+
/** 同じ側に複数の固定列がある場合のオフセット(px) */
|
|
47
|
+
stickyOffset?: number;
|
|
48
|
+
}
|
|
49
|
+
declare function DataTableHead({ className, children, sortable, sortDirection, onSort, sticky, stickyOffset, style, ...props }: DataTableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare const dataTableCellVariants: (props?: {
|
|
51
|
+
align?: "center" | "left" | "right";
|
|
52
|
+
width?: "checkbox" | "auto" | "action" | "sm" | "lg" | "xl" | "md" | "narrow";
|
|
53
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
54
|
+
interface DataTableCellProps extends Omit<React.ComponentProps<"td">, "align" | "width">, VariantProps<typeof dataTableCellVariants> {
|
|
55
|
+
/** 横スクロール時に列を貼り付け表示する */
|
|
56
|
+
sticky?: StickyPosition;
|
|
57
|
+
/** 同じ側に複数の固定列がある場合のオフセット(px) */
|
|
58
|
+
stickyOffset?: number;
|
|
59
|
+
}
|
|
60
|
+
declare function DataTableCell({ className, align, width, children, sticky, stickyOffset, style, ...props }: DataTableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
interface DataTableAvatarCellProps extends React.ComponentProps<"td"> {
|
|
62
|
+
src?: string;
|
|
63
|
+
fallback?: string;
|
|
64
|
+
title: string;
|
|
65
|
+
caption?: string;
|
|
66
|
+
/** 横スクロール時に列を貼り付け表示する */
|
|
67
|
+
sticky?: StickyPosition;
|
|
68
|
+
/** 同じ側に複数の固定列がある場合のオフセット(px) */
|
|
69
|
+
stickyOffset?: number;
|
|
70
|
+
}
|
|
71
|
+
declare function DataTableAvatarCell({ className, src, fallback, title, caption, sticky, stickyOffset, style, ...props }: DataTableAvatarCellProps): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
interface DataTableImageCellProps extends React.ComponentProps<"td"> {
|
|
73
|
+
src: string;
|
|
74
|
+
alt?: string;
|
|
75
|
+
title?: string;
|
|
76
|
+
caption?: string;
|
|
77
|
+
imageSize?: number;
|
|
78
|
+
}
|
|
79
|
+
declare function DataTableImageCell({ className, src, alt, title, caption, imageSize, ...props }: DataTableImageCellProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
interface DataTableCheckboxCellProps extends React.ComponentProps<"td"> {
|
|
81
|
+
checked?: boolean;
|
|
82
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
83
|
+
indeterminate?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 描画する要素。ヘッダー行(`<tr>` in `<thead>`)では `"th"` を指定して
|
|
86
|
+
* `<th>` の中に `<td>` がネストされる HTML 妥当性 / hydration エラーを避ける。
|
|
87
|
+
* @default "td"
|
|
88
|
+
*/
|
|
89
|
+
as?: "td" | "th";
|
|
90
|
+
/** 横スクロール時に列を貼り付け表示する */
|
|
91
|
+
sticky?: StickyPosition;
|
|
92
|
+
/** 同じ側に複数の固定列がある場合のオフセット(px) */
|
|
93
|
+
stickyOffset?: number;
|
|
94
|
+
}
|
|
95
|
+
declare function DataTableCheckboxCell({ className, checked, onCheckedChange, indeterminate, as: Element, sticky, stickyOffset, style, ...props }: DataTableCheckboxCellProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
interface DataTableActionMenuItem {
|
|
97
|
+
label: string;
|
|
98
|
+
icon?: React.ReactNode;
|
|
99
|
+
onClick?: () => void;
|
|
100
|
+
destructive?: boolean;
|
|
101
|
+
}
|
|
102
|
+
interface DataTableActionCellProps extends React.ComponentProps<"td"> {
|
|
103
|
+
items: DataTableActionMenuItem[];
|
|
104
|
+
}
|
|
105
|
+
declare function DataTableActionCell({ className, items, ...props }: DataTableActionCellProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
interface DataTableInputCellProps extends Omit<React.ComponentProps<"td">, "onChange"> {
|
|
107
|
+
value?: string;
|
|
108
|
+
onChange?: (value: string) => void;
|
|
109
|
+
placeholder?: string;
|
|
110
|
+
}
|
|
111
|
+
declare function DataTableInputCell({ className, value, onChange, placeholder, ...props }: DataTableInputCellProps): import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
interface DataTableSelectCellProps extends React.ComponentProps<"td"> {
|
|
113
|
+
value?: string;
|
|
114
|
+
onValueChange?: (value: string) => void;
|
|
115
|
+
placeholder?: string;
|
|
116
|
+
options: {
|
|
117
|
+
label: string;
|
|
118
|
+
value: string;
|
|
119
|
+
}[];
|
|
120
|
+
}
|
|
121
|
+
declare function DataTableSelectCell({ className, value, onValueChange, placeholder, options, ...props }: DataTableSelectCellProps): import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
interface DataTableNumberCellProps extends React.ComponentProps<"td"> {
|
|
123
|
+
value: number | string;
|
|
124
|
+
prefix?: string;
|
|
125
|
+
suffix?: string;
|
|
126
|
+
}
|
|
127
|
+
declare function DataTableNumberCell({ className, value, prefix, suffix, children, ...props }: DataTableNumberCellProps): import("react/jsx-runtime").JSX.Element;
|
|
128
|
+
interface DataTableDragHandleCellProps extends React.ComponentProps<"td"> {
|
|
129
|
+
}
|
|
130
|
+
declare function DataTableDragHandleCell({ className, ...props }: DataTableDragHandleCellProps): import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
interface DataTableLinkCellProps extends React.ComponentProps<"td"> {
|
|
132
|
+
href: string;
|
|
133
|
+
external?: boolean;
|
|
134
|
+
children: React.ReactNode;
|
|
135
|
+
}
|
|
136
|
+
declare function DataTableLinkCell({ className, href, external, children, ...props }: DataTableLinkCellProps): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
interface DataTableBulkActionsProps extends React.ComponentProps<"div"> {
|
|
138
|
+
selectedCount: number;
|
|
139
|
+
}
|
|
140
|
+
declare function DataTableBulkActions({ className, selectedCount, children, ...props }: DataTableBulkActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
141
|
+
interface DataTableSectionRowProps extends React.ComponentProps<"tr"> {
|
|
142
|
+
label: string;
|
|
143
|
+
count?: number;
|
|
144
|
+
open?: boolean;
|
|
145
|
+
onToggle?: () => void;
|
|
146
|
+
colSpan?: number;
|
|
147
|
+
}
|
|
148
|
+
declare function DataTableSectionRow({ className, label, count, open, onToggle, colSpan, ...props }: DataTableSectionRowProps): import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
interface DataTableAddRowProps extends React.ComponentProps<"tr"> {
|
|
150
|
+
label?: string;
|
|
151
|
+
onClick?: () => void;
|
|
152
|
+
colSpan?: number;
|
|
153
|
+
}
|
|
154
|
+
declare function DataTableAddRow({ className, label, onClick, colSpan, ...props }: DataTableAddRowProps): import("react/jsx-runtime").JSX.Element;
|
|
155
|
+
interface DataTableEmptyStateProps extends React.ComponentProps<"tr"> {
|
|
156
|
+
icon?: React.ReactNode;
|
|
157
|
+
message?: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
action?: React.ReactNode;
|
|
160
|
+
colSpan?: number;
|
|
161
|
+
}
|
|
162
|
+
declare function DataTableEmptyState({ className, icon, message, description, action, colSpan, ...props }: DataTableEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
163
|
+
export { DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableLinkCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState, };
|
|
164
|
+
export { getStickyCellProps };
|
|
165
|
+
export type { SortDirection, DataTableActionMenuItem, StickyPosition };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface ImageUploaderImage {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
}
|
|
6
|
+
interface ImageUploaderProps extends React.ComponentProps<"div"> {
|
|
7
|
+
images?: ImageUploaderImage[];
|
|
8
|
+
onAdd?: () => void;
|
|
9
|
+
onRemove?: (index: number) => void;
|
|
10
|
+
maxImages?: number;
|
|
11
|
+
columns?: number;
|
|
12
|
+
}
|
|
13
|
+
declare function ImageUploader({ images, onAdd, onRemove, maxImages, columns, className, ...props }: ImageUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { ImageUploader };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface KebabMenuItem {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
destructive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface KebabMenuProps extends React.ComponentProps<"button"> {
|
|
9
|
+
items: KebabMenuItem[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 縦三点メニュー。DropdownMenu(Radix)を内部利用しており、
|
|
13
|
+
* キーボード操作・Esc クローズ・フォーカス管理・role="menu" を備える。
|
|
14
|
+
*/
|
|
15
|
+
declare function KebabMenu({ items, className, ...props }: KebabMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { KebabMenu };
|
|
17
|
+
export type { KebabMenuItem };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface NotificationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
message: string;
|
|
5
|
+
date: string;
|
|
6
|
+
isUnread?: boolean;
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
interface NotificationListProps extends React.ComponentProps<"div"> {
|
|
10
|
+
notifications: NotificationItem[];
|
|
11
|
+
variant?: "vertical" | "horizontal";
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function NotificationList({ notifications, variant, emptyMessage, className, ...props }: NotificationListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { NotificationList };
|
|
16
|
+
export type { NotificationItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface SearchPanelProps extends React.ComponentProps<"div"> {
|
|
3
|
+
onSearch?: () => void;
|
|
4
|
+
onReset?: () => void;
|
|
5
|
+
columns?: 2 | 3 | 4;
|
|
6
|
+
layout?: "grid" | "flex";
|
|
7
|
+
}
|
|
8
|
+
declare function SearchPanel({ children, onSearch, onReset, columns, layout, className, ...props }: SearchPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { SearchPanel };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface StatusTabItem {
|
|
3
|
+
label: string;
|
|
4
|
+
count: number;
|
|
5
|
+
}
|
|
6
|
+
interface StatusTabsProps extends Omit<React.ComponentProps<"div">, "onSelect"> {
|
|
7
|
+
items: StatusTabItem[];
|
|
8
|
+
activeIndex?: number;
|
|
9
|
+
onSelect?: (index: number) => void;
|
|
10
|
+
}
|
|
11
|
+
declare function StatusTabs({ items, activeIndex, onSelect, className, ...props }: StatusTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { StatusTabs };
|
|
13
|
+
export type { StatusTabItem };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface AppHeaderNavItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface AppHeaderProps {
|
|
9
|
+
/**
|
|
10
|
+
* レイアウト:
|
|
11
|
+
* - `default`(既定): `leading` + `title` + `trailing` の 3 カラム
|
|
12
|
+
* - `logo`: 左にロゴ、右に actions(top page 想定)
|
|
13
|
+
* - `logo-center`: ロゴ中央(checkout / minimal flow 想定)
|
|
14
|
+
* - `back`: 左に戻るボタン、中央タイトル、右 actions(sub page)
|
|
15
|
+
* - `back-search`: 左に戻るボタン、中央に検索 slot、右 actions
|
|
16
|
+
*/
|
|
17
|
+
layout?: "default" | "logo" | "logo-center" | "back" | "back-search";
|
|
18
|
+
/** 左端スロット(戻るボタン、ハンバーガー等) */
|
|
19
|
+
leading?: React.ReactNode;
|
|
20
|
+
/** ロゴ要素(layout="logo" / "logo-center" で使用) */
|
|
21
|
+
logo?: React.ReactNode;
|
|
22
|
+
/** 中央タイトル(layout="default" / "back" で使用) */
|
|
23
|
+
title?: React.ReactNode;
|
|
24
|
+
/** サブタイトル(タイトルの下に表示) */
|
|
25
|
+
subtitle?: React.ReactNode;
|
|
26
|
+
/** 中央スロット(layout="back-search" で使用) */
|
|
27
|
+
centerSlot?: React.ReactNode;
|
|
28
|
+
/** 右端スロット(アクションボタン群) */
|
|
29
|
+
trailing?: React.ReactNode;
|
|
30
|
+
/** 旧 prop 名(trailing と等価)。互換用 */
|
|
31
|
+
rightSlot?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* PC 用インラインナビ。`@[768px]` 以上で表示される。
|
|
34
|
+
* SP では非表示(ハンバーガー → MenuDrawer 経由を想定)。
|
|
35
|
+
*/
|
|
36
|
+
nav?: AppHeaderNavItem[];
|
|
37
|
+
/** ヘッダー下部に追加で出すスロット(タブ・ブレッドクラム等) */
|
|
38
|
+
bottomSlot?: React.ReactNode;
|
|
39
|
+
/** 固定ヘッダー(スクロールに追従しない) */
|
|
40
|
+
sticky?: boolean;
|
|
41
|
+
/** 下線ボーダー */
|
|
42
|
+
bordered?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 外観バリアント:
|
|
45
|
+
* - "default" : 通常(Surface-Primary 背景 + ボーダー)
|
|
46
|
+
* - "glass" : Liquid Glass(コンテンツに重ねる半透明)
|
|
47
|
+
* - "transparent" : 完全透明(スクロール連動で背景を切り替えるときの初期状態)
|
|
48
|
+
*/
|
|
49
|
+
variant?: "default" | "glass" | "transparent";
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* AppHeader — アプリ汎用ヘッダー。
|
|
54
|
+
*
|
|
55
|
+
* 5 つの layout モード × 3 つの visual variant の組み合わせで、
|
|
56
|
+
* SP / PC で別実装が必要だったヘッダーを 1 コンポーネントに統合する。
|
|
57
|
+
*
|
|
58
|
+
* @container クエリで SP/PC を切り替えるため、利用側で `@container` を
|
|
59
|
+
* 宣言した親要素の中に置く必要がある(通常 layout shell が宣言)。
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // サブページ(戻る + タイトル)
|
|
63
|
+
* <AppHeader layout="back" leading={<BackButton />} title="設定" />
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // トップ(ロゴ + PC 用 inline nav)
|
|
67
|
+
* <AppHeader
|
|
68
|
+
* layout="logo"
|
|
69
|
+
* logo={<Logo />}
|
|
70
|
+
* nav={[{label: "求人", href: "/jobs"}, {label: "企業", href: "/companies"}]}
|
|
71
|
+
* trailing={<UserMenu />}
|
|
72
|
+
* />
|
|
73
|
+
*/
|
|
74
|
+
declare function AppHeader({ layout, leading, logo, title, subtitle, centerSlot, trailing, rightSlot, nav, bottomSlot, sticky, bordered, variant, className, }: AppHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export { AppHeader };
|
|
76
|
+
export type { AppHeaderProps, AppHeaderNavItem };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface BannerItem {
|
|
2
|
+
/** 背景画像URL(なければ gradient) */
|
|
3
|
+
imageSrc?: string;
|
|
4
|
+
/** グラデーション色(imageSrcがない場合) */
|
|
5
|
+
gradient?: string;
|
|
6
|
+
caption?: string;
|
|
7
|
+
subCaption?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface BannerCarouselProps {
|
|
12
|
+
title?: string;
|
|
13
|
+
items: BannerItem[];
|
|
14
|
+
/** 「もっと見る」テキスト */
|
|
15
|
+
moreLabel?: string;
|
|
16
|
+
onMore?: () => void;
|
|
17
|
+
/** バナーの縦横比 */
|
|
18
|
+
itemAspectRatio?: "2/1" | "3/2" | "4/3";
|
|
19
|
+
/** バナー幅(px) */
|
|
20
|
+
itemWidth?: number;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
declare function BannerCarousel({ title, items, moreLabel, onMore, itemAspectRatio, itemWidth, className, }: BannerCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { BannerCarousel };
|
|
25
|
+
export type { BannerCarouselProps, BannerItem };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const bannerVariants: (props?: {
|
|
4
|
+
variant?: "success" | "info" | "warning" | "caution";
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
interface BannerProps extends React.ComponentProps<"div">, VariantProps<typeof bannerVariants> {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
action?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare function Banner({ className, variant, icon, title, description, action, children, ...props }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Banner, bannerVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface BottomSheetFormProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
submitLabel?: string;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
onSubmit: () => void | Promise<void>;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
/** フォームコンテンツ */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function BottomSheetForm({ open, onOpenChange, title, description, submitLabel, cancelLabel, onSubmit, loading, children, className, }: BottomSheetFormProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { BottomSheetForm };
|
|
17
|
+
export type { BottomSheetFormProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface CategoryNavItem {
|
|
2
|
+
/** カテゴリ名 */
|
|
3
|
+
name: string;
|
|
4
|
+
/** リンクURL */
|
|
5
|
+
href?: string;
|
|
6
|
+
/** アイコン画像URL */
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
/** アイコンの代替テキスト */
|
|
9
|
+
imageAlt?: string;
|
|
10
|
+
/** 選択中フラグ */
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
/** クリックハンドラ */
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface CategoryNavProps {
|
|
16
|
+
/** カテゴリリスト */
|
|
17
|
+
items: CategoryNavItem[];
|
|
18
|
+
/** 追加クラス */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* CategoryIconStrip — カテゴリアイコンフィルター行
|
|
23
|
+
*
|
|
24
|
+
* 商品一覧・検索結果ページ上部に設置するコンパクトなカテゴリフィルター。
|
|
25
|
+
* 小さな円アイコン(40px)+ラベルを横スクロールで並べる。
|
|
26
|
+
*
|
|
27
|
+
* CategoryScroll との違い:
|
|
28
|
+
* - セクションタイトルなし(フィルターとして使用)
|
|
29
|
+
* - アイコンが小さい(40px)
|
|
30
|
+
* - isSelected で選択状態を持てる
|
|
31
|
+
*
|
|
32
|
+
* ### 使用例
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <CategoryIconStrip
|
|
35
|
+
* items={[
|
|
36
|
+
* { name: "バースデー", imageUrl: "/cat1.jpg", isSelected: true, onClick: () => setFilter("birthday") },
|
|
37
|
+
* { name: "記念日", imageUrl: "/cat2.jpg", onClick: () => setFilter("anniversary") },
|
|
38
|
+
* ]}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare function CategoryNav({ items, className }: CategoryNavProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { CategoryNav };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface CategoryScrollItem {
|
|
2
|
+
/** カテゴリ名 */
|
|
3
|
+
name: string;
|
|
4
|
+
/** リンクURL */
|
|
5
|
+
href: string;
|
|
6
|
+
/** サムネイル画像URL */
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CategoryScrollProps {
|
|
10
|
+
/** セクションタイトル */
|
|
11
|
+
title: string;
|
|
12
|
+
/** 「もっと見る」リンクURL */
|
|
13
|
+
moreHref?: string;
|
|
14
|
+
/** カテゴリリスト */
|
|
15
|
+
items: CategoryScrollItem[];
|
|
16
|
+
/** サムネイルサイズ (default: "md") sm=60px, md=100px, lg=120px */
|
|
17
|
+
thumbnailSize?: "sm" | "md" | "lg";
|
|
18
|
+
/** サムネイル形状 (default: "square") square=rounded-lg, circle=rounded-full */
|
|
19
|
+
thumbnailShape?: "square" | "circle";
|
|
20
|
+
/**
|
|
21
|
+
* レイアウト (default: "scroll")
|
|
22
|
+
* - scroll: 横スクロール1行
|
|
23
|
+
* - grid: 列×行のグリッド(横スクロール)
|
|
24
|
+
*/
|
|
25
|
+
layout?: "scroll" | "grid";
|
|
26
|
+
/** グリッドの行数 (layout="grid" 時, default: 3) */
|
|
27
|
+
gridRows?: number;
|
|
28
|
+
/** 追加クラス */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* CategoryScroll — カテゴリスクロールセクション
|
|
33
|
+
*
|
|
34
|
+
* セクションタイトル + カテゴリサムネイル(画像+ラベル)を横スクロールで表示。
|
|
35
|
+
* トップページ・一覧ページのカテゴリナビゲーションに使用。
|
|
36
|
+
*
|
|
37
|
+
* ### 使用例
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <CategoryScroll
|
|
40
|
+
* title="カテゴリから探す"
|
|
41
|
+
* moreHref="/categories"
|
|
42
|
+
* items={categories}
|
|
43
|
+
* thumbnailSize="md"
|
|
44
|
+
* thumbnailShape="square"
|
|
45
|
+
* />
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* ### AI 向け使用ルール
|
|
49
|
+
* - thumbnailShape="circle" + thumbnailSize="sm" でクイックアクセスアイコン風
|
|
50
|
+
* - layout="grid" で複数行グリッド表示(本番カテゴリ準拠)
|
|
51
|
+
*/
|
|
52
|
+
declare function CategoryScroll({ title, moreHref, items, thumbnailSize, thumbnailShape, layout, gridRows, className, }: CategoryScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export { CategoryScroll };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface ChipSelectorOption<T extends string = string> {
|
|
3
|
+
label: string;
|
|
4
|
+
value: T;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface ChipSelectorProps<T extends string = string> {
|
|
8
|
+
options: ChipSelectorOption<T>[];
|
|
9
|
+
value: T[];
|
|
10
|
+
onChange: (value: T[]) => void;
|
|
11
|
+
/** true: 複数選択可 / false: 1つのみ */
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
/** 最大選択数(multiple=true 時のみ有効) */
|
|
14
|
+
max?: number;
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function ChipSelector<T extends string = string>({ options, value, onChange, multiple, max, size, className, }: ChipSelectorProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { ChipSelector };
|
|
20
|
+
export type { ChipSelectorProps, ChipSelectorOption };
|