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,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface InputProps extends Omit<React.ComponentProps<"input">, "prefix"> {
|
|
3
|
+
/**
|
|
4
|
+
* 入力フィールド左側の装飾。テキスト・アイコン・単位記号など。
|
|
5
|
+
* 例: "¥", "@", <SearchIcon />
|
|
6
|
+
*/
|
|
7
|
+
startAdornment?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 入力フィールド右側の装飾。テキスト・アイコン・ボタンなど。
|
|
10
|
+
* 例: "%", "kg", クリアボタン, パスワード表示ボタン
|
|
11
|
+
* インタラクティブ要素(ボタン等)を渡す場合はこちら(pointer-events 有効)。
|
|
12
|
+
*/
|
|
13
|
+
endAdornment?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare function Input({ className, type, startAdornment, endAdornment, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Input };
|
|
17
|
+
export type { InputProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface MultiSelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface MultiSelectProps {
|
|
7
|
+
options: MultiSelectOption[];
|
|
8
|
+
value?: string[];
|
|
9
|
+
onChange?: (values: string[]) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
emptyLabel?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
/** 選択済みチップの最大表示数(超えると "+N" で省略) @default 3 */
|
|
16
|
+
maxDisplay?: number;
|
|
17
|
+
/** 選択済みをクリアするボタンを表示 @default true */
|
|
18
|
+
clearable?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare function MultiSelect({ options, value, onChange, placeholder, searchPlaceholder, emptyLabel, disabled, className, maxDisplay, clearable, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { MultiSelect };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function IconClose({ size }: {
|
|
3
|
+
size?: number;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function IconBack({ size }: {
|
|
6
|
+
size?: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/** iOS 26 スタイルのシェアアイコン(上向き矢印 + トレイ) */
|
|
9
|
+
declare function IconShareIos({ size }: {
|
|
10
|
+
size?: number;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface NavigationBarProps {
|
|
13
|
+
/** 中央タイトル(絶対配置で常に視覚的中央) */
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 左ボタンのアイコン:
|
|
17
|
+
* - "back" : ← 戻る(デフォルト)
|
|
18
|
+
* - "close" : × 閉じる(iOS 26 モーダル)
|
|
19
|
+
* - ReactNode : カスタム
|
|
20
|
+
*/
|
|
21
|
+
leftIcon?: "back" | "close" | React.ReactNode;
|
|
22
|
+
/** 左ボタンクリックハンドラ */
|
|
23
|
+
onLeft?: () => void;
|
|
24
|
+
/** 左ボタンのアクセシビリティラベル(自動補完: "戻る" / "閉じる") */
|
|
25
|
+
leftLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 右スロット。rightSlot が優先、未指定かつ onShare があればシェアボタンを表示。
|
|
28
|
+
*/
|
|
29
|
+
rightSlot?: React.ReactNode;
|
|
30
|
+
/** シェアボタンを右に表示してそのハンドラを登録する簡便 prop */
|
|
31
|
+
onShare?: () => void;
|
|
32
|
+
/** シェアボタンのアクセシビリティラベル */
|
|
33
|
+
shareLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* true : Liquid Glass ボタン(グラデーション・写真背景の上に重ねるとき)
|
|
36
|
+
* false: 通常ボタン(secondary variant)
|
|
37
|
+
*/
|
|
38
|
+
glass?: boolean;
|
|
39
|
+
/** ヘッダー自体の背景を透明にする(コンテンツに重ねるとき) */
|
|
40
|
+
transparent?: boolean;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* iOS 26 スタイルのナビゲーションバー。
|
|
45
|
+
*
|
|
46
|
+
* - leading : `Button size="icon-xl"` (glass or secondary variant)
|
|
47
|
+
* - center : 絶対配置タイトル(常に視覚的中央)
|
|
48
|
+
* - trailing : `Button size="icon-xl"` (glass or secondary variant)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // 通常(白背景ページ)
|
|
52
|
+
* <NavigationBar title="設定" leftIcon="back" onLeft={back} onShare={share} />
|
|
53
|
+
*
|
|
54
|
+
* // iOS 26 ガラス(グラデーション上に重ねる)
|
|
55
|
+
* <NavigationBar title="Aircraft Stats" leftIcon="close" onLeft={close} onShare={share} glass transparent />
|
|
56
|
+
*/
|
|
57
|
+
declare function NavigationBar({ title, leftIcon, onLeft, leftLabel, rightSlot, onShare, shareLabel, glass, transparent, className, }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export { NavigationBar, IconClose, IconBack, IconShareIos };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface NumberInputProps {
|
|
2
|
+
value?: number;
|
|
3
|
+
onChange?: (value: number) => void;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
/** 数値フォーマッタ(例: 通貨表示) */
|
|
8
|
+
format?: (value: number) => string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 減算ボタンの aria-label。i18n 対応: 英語では "Decrease" を渡す。@default "減らす" */
|
|
14
|
+
decrementLabel?: string;
|
|
15
|
+
/** 加算ボタンの aria-label。i18n 対応: 英語では "Increase" を渡す。@default "増やす" */
|
|
16
|
+
incrementLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function NumberInput({ value, onChange, min, max, step, format, placeholder, disabled, size, className, decrementLabel, incrementLabel, }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { NumberInput };
|
|
20
|
+
export type { NumberInputProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { buttonVariants } from "./button";
|
|
3
|
+
import type { VariantProps } from "class-variance-authority";
|
|
4
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
type PaginationLinkProps = {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
} & Pick<VariantProps<typeof buttonVariants>, "size"> & React.ComponentProps<"a">;
|
|
10
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {
|
|
12
|
+
/** aria-label とボタンテキスト。i18n 対応: 英語では "Previous" を渡す。@default "前へ" */
|
|
13
|
+
label?: string;
|
|
14
|
+
};
|
|
15
|
+
declare function PaginationPrevious({ className, label, ...props }: PaginationPreviousProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {
|
|
17
|
+
/** aria-label とボタンテキスト。i18n 対応: 英語では "Next" を渡す。@default "次へ" */
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function PaginationNext({ className, label, ...props }: PaginationNextProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
type PaginationEllipsisProps = React.ComponentProps<"span"> & {
|
|
22
|
+
/** スクリーンリーダー向けラベル。@default "その他のページ" */
|
|
23
|
+
label?: string;
|
|
24
|
+
};
|
|
25
|
+
declare function PaginationEllipsis({ className, label, ...props }: PaginationEllipsisProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationEllipsis };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface PillToggleOption<T extends string = string> {
|
|
3
|
+
label: string;
|
|
4
|
+
value: T;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface PillToggleProps<T extends string = string> {
|
|
8
|
+
options: PillToggleOption<T>[];
|
|
9
|
+
value: T;
|
|
10
|
+
onChange: (value: T) => void;
|
|
11
|
+
size?: "sm" | "md";
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function PillToggle<T extends string = string>({ options, value, onChange, size, className, }: PillToggleProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { PillToggle };
|
|
16
|
+
export type { PillToggleProps, PillToggleOption };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const SIZE_MAP: {
|
|
3
|
+
sm: {
|
|
4
|
+
size: number;
|
|
5
|
+
stroke: number;
|
|
6
|
+
};
|
|
7
|
+
md: {
|
|
8
|
+
size: number;
|
|
9
|
+
stroke: number;
|
|
10
|
+
};
|
|
11
|
+
lg: {
|
|
12
|
+
size: number;
|
|
13
|
+
stroke: number;
|
|
14
|
+
};
|
|
15
|
+
xl: {
|
|
16
|
+
size: number;
|
|
17
|
+
stroke: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
interface ProgressRingProps {
|
|
21
|
+
/** 0〜100 */
|
|
22
|
+
value: number;
|
|
23
|
+
size?: keyof typeof SIZE_MAP;
|
|
24
|
+
/** 中央テキスト(省略時は % 表示) */
|
|
25
|
+
label?: React.ReactNode;
|
|
26
|
+
showLabel?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function ProgressRing({ value, size, label, showLabel, className, }: ProgressRingProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export { ProgressRing };
|
|
31
|
+
export type { ProgressRingProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Progress as ProgressPrimitive } from "radix-ui";
|
|
3
|
+
type ProgressVariant = "default" | "success" | "warning" | "caution";
|
|
4
|
+
type ProgressDuration = "none" | "sm" | "md" | "lg";
|
|
5
|
+
export interface ProgressProps extends React.ComponentProps<typeof ProgressPrimitive.Root> {
|
|
6
|
+
/**
|
|
7
|
+
* 色バリアント。値の閾値に応じて呼び出し側で切り替える想定 (例: 100% 超で caution)。
|
|
8
|
+
* @default "default"
|
|
9
|
+
*/
|
|
10
|
+
variant?: ProgressVariant;
|
|
11
|
+
/**
|
|
12
|
+
* indicator のトランジション時間プリセット。
|
|
13
|
+
* - "none" : アニメーション無効
|
|
14
|
+
* - "sm" (150ms) : 既定値、Tailwind デフォルトと同等
|
|
15
|
+
* - "md" (300ms) : 緩やか
|
|
16
|
+
* - "lg" (500ms) : 大幅変化向け (達成カードなど)
|
|
17
|
+
* @default "sm"
|
|
18
|
+
*/
|
|
19
|
+
transitionDuration?: ProgressDuration;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Progress — 進捗バー。
|
|
23
|
+
*
|
|
24
|
+
* - value: 0-100
|
|
25
|
+
* - variant: 色バリアント (default/success/warning/caution)
|
|
26
|
+
* - transitionDuration: アニメ速度 (none/sm/md/lg)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <Progress value={42} />
|
|
30
|
+
* <Progress value={120} variant="caution" /> // 予算超過
|
|
31
|
+
* <Progress value={progress} transitionDuration="lg" /> // ホームの達成バー
|
|
32
|
+
*/
|
|
33
|
+
declare function Progress({ className, value, variant, transitionDuration, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { Progress };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
3
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* RadioGroupItem — ラジオ 1 項目
|
|
6
|
+
*
|
|
7
|
+
* 2 つの使い方:
|
|
8
|
+
* 1. **素のラジオ** — `children` を渡さない場合は円のみ描画。外側で
|
|
9
|
+
* `<Label>` と組み合わせる従来の使い方(後方互換)。
|
|
10
|
+
* 2. **ラベル内包** — `children`(+任意の `description`)を渡すと、
|
|
11
|
+
* CheckboxGroupItem と同じ「ラジオ + ラベル」の行型レイアウトで描画。
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <RadioGroup defaultValue="s">
|
|
14
|
+
* <RadioGroupItem value="s">Small</RadioGroupItem>
|
|
15
|
+
* <RadioGroupItem value="m" description="標準サイズ">Medium</RadioGroupItem>
|
|
16
|
+
* </RadioGroup>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function RadioGroupItem({ className, children, description, id, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DialogContent, DialogTitle, DialogDescription, DialogClose, DialogTrigger } from "./dialog";
|
|
3
|
+
declare function useMediaQuery(query: string): boolean;
|
|
4
|
+
interface ResponsiveDialogProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function ResponsiveDialog({ children, ...props }: ResponsiveDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ResponsiveDialogTrigger({ children, ...props }: React.ComponentProps<typeof DialogTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function ResponsiveDialogContent({ children, className, swipeToClose, ...props }: React.ComponentProps<typeof DialogContent> & {
|
|
12
|
+
/**
|
|
13
|
+
* SP(Sheet)側で下スワイプ閉じ(全面 scroll-aware)を有効化。
|
|
14
|
+
* PC(Dialog)は中央モーダルなので無視される。絞り込みモーダル等で
|
|
15
|
+
* 「SP は下スワイプで閉じたい」ときに付ける。
|
|
16
|
+
*/
|
|
17
|
+
swipeToClose?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ResponsiveDialogHeader({ children, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ResponsiveDialogTitle({ children, ...props }: React.ComponentProps<typeof DialogTitle>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ResponsiveDialogDescription({ children, ...props }: React.ComponentProps<typeof DialogDescription>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ResponsiveDialogFooter({ children, className, orientation, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
+
/**
|
|
24
|
+
* アクションボタンの並べ方。
|
|
25
|
+
* - "split"(既定): 均等幅で横並び(各ボタン flex-1)。iOS のボトムシート風。
|
|
26
|
+
* - "stacked": 旧挙動。デスクトップは右寄せ横並び、モバイルは縦積み。
|
|
27
|
+
*/
|
|
28
|
+
orientation?: "split" | "stacked";
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function ResponsiveDialogClose({ children, ...props }: React.ComponentProps<typeof DialogClose>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export { ResponsiveDialog, ResponsiveDialogTrigger, ResponsiveDialogContent, ResponsiveDialogHeader, ResponsiveDialogTitle, ResponsiveDialogDescription, ResponsiveDialogFooter, ResponsiveDialogClose, useMediaQuery, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
/**
|
|
5
|
+
* SelectTrigger のサイズ規格。Button/Input と揃えて 3 段階を用意。
|
|
6
|
+
* 既定は default (h-12) — 既存挙動と完全互換。
|
|
7
|
+
*/
|
|
8
|
+
declare const selectTriggerVariants: (props?: {
|
|
9
|
+
size?: "default" | "sm" | "lg";
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
11
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
|
|
15
|
+
}
|
|
16
|
+
declare function SelectTrigger({ className, children, size, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, selectTriggerVariants, };
|
|
22
|
+
export type { SelectTriggerProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
type SnapPoint = number | string;
|
|
5
|
+
interface VisualViewportInset {
|
|
6
|
+
keyboardInset: number;
|
|
7
|
+
visibleHeight: number | null;
|
|
8
|
+
}
|
|
9
|
+
declare function computeVisualViewportInset(layoutHeight: number, visualHeight: number, visualOffsetTop: number): VisualViewportInset;
|
|
10
|
+
/**
|
|
11
|
+
* Pure decision for the full-surface swipe-to-close gesture, shared by the
|
|
12
|
+
* touch and pointer paths in {@link SwipeToCloseBottomSheet}.
|
|
13
|
+
*
|
|
14
|
+
* Given the cumulative offset from the gesture's start (`dy`/`dx`) and whether
|
|
15
|
+
* the touched scroll region is at its top (`atTop`), classify the gesture:
|
|
16
|
+
* - `null` — below the 6px slop; intent is still ambiguous, keep waiting.
|
|
17
|
+
* - `"drag"` — a downward, vertical-dominant gesture starting at the top;
|
|
18
|
+
* drives the close-drag.
|
|
19
|
+
* - `"scroll"` — anything else (upward, horizontal, or not at the top); the
|
|
20
|
+
* content keeps its own scroll gesture.
|
|
21
|
+
*
|
|
22
|
+
* Exported for unit testing only — not part of the public package API.
|
|
23
|
+
*/
|
|
24
|
+
declare function decideSwipeGesture(dy: number, dx: number, atTop: boolean): "drag" | "scroll" | null;
|
|
25
|
+
/**
|
|
26
|
+
* A single drag sample: vertical position (`y`, px) at a moment in time
|
|
27
|
+
* (`t`, ms — any monotonic clock; `event.timeStamp` in practice).
|
|
28
|
+
*/
|
|
29
|
+
interface DragSample {
|
|
30
|
+
y: number;
|
|
31
|
+
t: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Velocity of the drag (px/ms, positive = downward) over the trailing
|
|
35
|
+
* {@link FLICK_VELOCITY_WINDOW_MS} ending at `releaseT`.
|
|
36
|
+
*
|
|
37
|
+
* Only samples within the window *before release* count, so a flick followed
|
|
38
|
+
* by a pause-then-release reads ~0 (the finger was still at release) and does
|
|
39
|
+
* not register as a flick. Returns 0 when there are fewer than two qualifying
|
|
40
|
+
* samples or the time delta is non-positive.
|
|
41
|
+
*
|
|
42
|
+
* Exported for unit testing only — not part of the public package API.
|
|
43
|
+
*/
|
|
44
|
+
declare function computeFlickVelocity(samples: DragSample[], releaseT: number, windowMs?: number): number;
|
|
45
|
+
/**
|
|
46
|
+
* Pure release decision for the swipe-to-close gesture: dismiss the sheet when
|
|
47
|
+
* either the drag passed the distance threshold (>30% of the sheet height,
|
|
48
|
+
* falling back to 200px when the height is unknown) OR the release was a fast
|
|
49
|
+
* downward flick ({@link FLICK_VELOCITY_THRESHOLD}) — mirroring iOS sheets,
|
|
50
|
+
* which close on a short fast flick even below the distance threshold.
|
|
51
|
+
*
|
|
52
|
+
* `velocity` is downward-positive px/ms (see {@link computeFlickVelocity}); the
|
|
53
|
+
* flick branch also requires a net downward drag so an upward flick never
|
|
54
|
+
* dismisses.
|
|
55
|
+
*
|
|
56
|
+
* Exported for unit testing only — not part of the public package API.
|
|
57
|
+
*/
|
|
58
|
+
declare function decideSwipeDismiss(dragY: number, sheetHeight: number, velocity: number): boolean;
|
|
59
|
+
interface SheetProps extends React.ComponentProps<typeof DialogPrimitive.Root> {
|
|
60
|
+
snapPoints?: SnapPoint[];
|
|
61
|
+
activeSnapPoint?: SnapPoint | null;
|
|
62
|
+
setActiveSnapPoint?: (s: SnapPoint | null) => void;
|
|
63
|
+
/** index in `snapPoints` from which the backdrop overlay starts to fade in */
|
|
64
|
+
fadeFromIndex?: number;
|
|
65
|
+
dismissible?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* When false, the backdrop overlay is not rendered. Use for "push-up"
|
|
68
|
+
* layouts where the sheet shares the viewport with other UI (e.g. a
|
|
69
|
+
* video that resizes as the sheet expands).
|
|
70
|
+
* Default: true.
|
|
71
|
+
*/
|
|
72
|
+
overlay?: boolean;
|
|
73
|
+
}
|
|
74
|
+
declare function Sheet({ snapPoints, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fadeFromIndex, dismissible, overlay, onOpenChange, open, defaultOpen, ...props }: SheetProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
/** ドラッグインジケーター(Apple HIG: 36×5pt, gray, centered) */
|
|
78
|
+
declare function SheetDragIndicator(): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
declare const sheetVariants: (props?: {
|
|
80
|
+
side?: "top" | "left" | "right" | "bottom" | "float" | "float-glass" | "bottom-glass";
|
|
81
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
82
|
+
interface SheetContentProps extends React.ComponentProps<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
83
|
+
/** オーバーレイをガラス調にする(glass系 side では自動で true) */
|
|
84
|
+
glassOverlay?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Portal target element. When provided, the sheet portals into this element
|
|
87
|
+
* instead of document.body. Useful for inheriting CSS transforms (e.g. forced
|
|
88
|
+
* landscape rotation in mobile apps). Defaults to document.body if omitted.
|
|
89
|
+
*/
|
|
90
|
+
container?: HTMLElement | null;
|
|
91
|
+
/**
|
|
92
|
+
* シートのデフォルト内側余白(p-6)を制御。
|
|
93
|
+
* - true(既定): p-6 を付与(従来通り)
|
|
94
|
+
* - false : p-0。スクロール領域+固定フッタなど自前で内側レイアウトを
|
|
95
|
+
* 組むときに使用。これまで padding を強制上書きしていた
|
|
96
|
+
* ケースを正規化する。
|
|
97
|
+
*/
|
|
98
|
+
padding?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Bottom-anchored sheets only (`side="bottom"` / `"bottom-glass"`). When true,
|
|
101
|
+
* <SheetDragIndicator /> is auto-rendered at the top and a downward swipe
|
|
102
|
+
* dragging past ~30% of the sheet height calls onOpenChange(false).
|
|
103
|
+
*
|
|
104
|
+
* The swipe works across the whole sheet surface, not just the indicator:
|
|
105
|
+
* a downward drag dismisses when it starts on the handle, or while the
|
|
106
|
+
* touched scroll region is at its top. Mid-scroll and horizontal gestures
|
|
107
|
+
* stay with the content, so it never hijacks scrolling.
|
|
108
|
+
*
|
|
109
|
+
* Ignored when the parent <Sheet> uses `snapPoints` (snap mode handles its
|
|
110
|
+
* own drag).
|
|
111
|
+
*/
|
|
112
|
+
swipeToClose?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Optional screen-reader description.
|
|
115
|
+
* - string / ReactNode: sr-only な <SheetDescription> を自動レンダリングし
|
|
116
|
+
* `aria-describedby` に紐付ける
|
|
117
|
+
* - undefined(既定): `aria-describedby={undefined}` を明示して
|
|
118
|
+
* Radix の "Missing Description" 警告を抑制。description が概念上
|
|
119
|
+
* 不要なシート(クイック追加 FAB、設定 sheet 等)用。
|
|
120
|
+
* 可視の description を出したい場合は、この prop を使わず子要素として
|
|
121
|
+
* `<SheetDescription>` を直接置く。
|
|
122
|
+
*/
|
|
123
|
+
description?: React.ReactNode;
|
|
124
|
+
}
|
|
125
|
+
declare function SheetContent({ className, children, side, glassOverlay, container, padding, swipeToClose, description, ...props }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
|
|
126
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
declare function SheetFooter({ className, orientation, ...props }: React.ComponentProps<"div"> & {
|
|
128
|
+
/**
|
|
129
|
+
* アクションボタンの並べ方。
|
|
130
|
+
* - "split"(既定): 均等幅で横並び(各ボタン flex-1)。2 ボタンを 50/50 で
|
|
131
|
+
* 並べる iOS のボトムシート風レイアウト。
|
|
132
|
+
* - "stacked": 旧挙動。縦積み(全幅)。
|
|
133
|
+
*/
|
|
134
|
+
orientation?: "split" | "stacked";
|
|
135
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
136
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
138
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetDragIndicator, computeVisualViewportInset, decideSwipeGesture, computeFlickVelocity, decideSwipeDismiss, };
|
|
139
|
+
export type { SheetProps, SheetContentProps, SnapPoint, VisualViewportInset };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type RoundedShorthand = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
3
|
+
export interface SkeletonProps extends Omit<React.ComponentProps<"div">, "width" | "height"> {
|
|
4
|
+
/** width shorthand。数値は px、文字列はそのまま CSS に渡す */
|
|
5
|
+
width?: string | number;
|
|
6
|
+
/** height shorthand。数値は px、文字列はそのまま CSS に渡す */
|
|
7
|
+
height?: string | number;
|
|
8
|
+
/** 角丸プリセット(既定 lg)。`className` で上書きすれば任意の rounded-* も指定可。 */
|
|
9
|
+
rounded?: RoundedShorthand;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Skeleton — 読み込み中のプレースホルダ。
|
|
13
|
+
*
|
|
14
|
+
* - `width` / `height` を数値で渡せば px、文字列ならそのまま CSS に渡る
|
|
15
|
+
* - `rounded` で角丸プリセットを切り替え(既定 `lg`)
|
|
16
|
+
* - `animate-pulse` がデフォルトで適用
|
|
17
|
+
*
|
|
18
|
+
* 複数まとめて並べる場合は `ListSkeleton` / `GridSkeleton` (patterns) を使うと
|
|
19
|
+
* 定型レイアウトが組める。
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // shorthand
|
|
23
|
+
* <Skeleton width={100} height={20} />
|
|
24
|
+
* <Skeleton width="100%" height={56} rounded="2xl" />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // 旧形式 (className のみ) も互換維持
|
|
28
|
+
* <Skeleton className="h-4 w-32" />
|
|
29
|
+
*/
|
|
30
|
+
declare function Skeleton({ className, width, height, rounded, style, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export { Skeleton };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slider as SliderPrimitive } from "radix-ui";
|
|
3
|
+
/**
|
|
4
|
+
* Slider — 数値スライダー
|
|
5
|
+
*
|
|
6
|
+
* Radix UI Slider ラッパー。範囲スライダー(2ハンドル)にも対応。
|
|
7
|
+
*
|
|
8
|
+
* ### 使用例
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Slider defaultValue={[50]} min={0} max={100} step={1} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { Slider };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SocialIconEntry {
|
|
3
|
+
viewBox: string;
|
|
4
|
+
body: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export type SocialIconTone = "mono" | "brand";
|
|
7
|
+
/** platform slug → 表示用ラベル */
|
|
8
|
+
export declare const SOCIAL_ICON_LABELS: Record<string, string>;
|
|
9
|
+
export declare const SOCIAL_ICON_DATA: Record<string, Partial<Record<SocialIconTone, SocialIconEntry>>>;
|
|
10
|
+
export declare const SOCIAL_ICON_PLATFORMS: readonly ["amazon", "android", "apple", "apple-music", "apple-podcasts", "artstation", "baidu", "behance", "boosty", "devianart", "discord", "dprofile", "dribbble", "dzen", "facebook", "figma", "github", "gmail", "google", "google-meet", "google-play", "google-podcast", "imo", "instagram", "kickstarter", "line", "linkedin", "medium", "messenger", "microsoft-teams", "notion", "ok", "ok-only-sign", "onlyfans", "patreon", "paypal", "pinterest", "product-hunt", "qiita", "quora", "reddit", "signal", "sina-weibo", "skype", "slack", "snapchat", "soundcloud", "spotify", "stack-overflow", "telegram", "telegram-only-sign", "threads", "tiktok", "tinder", "tumblr", "twitch", "viber", "vimeo", "vk", "vk-music", "vk-only-sign", "wantedly", "wechat", "whatsapp", "x-ex-twitter", "xing", "yandex-music", "yelp", "youtube", "youtube-music", "youtube-shorts", "zoom"];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { SOCIAL_ICON_LABELS, SOCIAL_ICON_PLATFORMS, type SocialIconTone } from "./social-icon-data";
|
|
3
|
+
export interface SocialIconProps extends Omit<React.ComponentProps<"svg">, "children"> {
|
|
4
|
+
/** プラットフォーム slug(小文字)。例: "github" / "spotify" / "apple-music" */
|
|
5
|
+
platform: string;
|
|
6
|
+
/**
|
|
7
|
+
* 配色。
|
|
8
|
+
* - "brand"(既定): ブランドカラー(元アセットの固有色。DS テーマには連動しない)
|
|
9
|
+
* - "mono": 単色(currentColor — テキスト色に追従)
|
|
10
|
+
*/
|
|
11
|
+
tone?: SocialIconTone;
|
|
12
|
+
/** 一辺のサイズ(px) @default 24 */
|
|
13
|
+
size?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* SocialIcon — SNS / 外部サービスのブランドアイコン
|
|
17
|
+
*
|
|
18
|
+
* `socialicon/` 配下の `Name=BRAND, Colors=Neutral|Original.svg` を
|
|
19
|
+
* `scripts/generate-social-icons.mjs` で取り込んだ安定データ
|
|
20
|
+
* (`social-icon-data.tsx`)を描画する。`platform` はファイル名ではなく
|
|
21
|
+
* 正規化済み slug で指定するため、元アセットの命名・表示名に依存しない。
|
|
22
|
+
*
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <SocialIcon platform="github" />
|
|
25
|
+
* <SocialIcon platform="spotify" tone="mono" className="text-[var(--Text-High-Emphasis)]" />
|
|
26
|
+
* <SocialIcon platform="apple-music" size={32} />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* 配色は元アセット由来のブランド色固定(tone="brand")か、テキスト色追従の
|
|
30
|
+
* 単色(tone="mono" → currentColor)。DS のテーマカラーには連動しない
|
|
31
|
+
* (ブランドロゴは正式色を保つのが正しいため)。
|
|
32
|
+
*
|
|
33
|
+
* 利用可能な platform は {@link SOCIAL_ICON_PLATFORMS}、表示名は
|
|
34
|
+
* {@link SOCIAL_ICON_LABELS}。未収録の指定は何も描画しない(null)。
|
|
35
|
+
*/
|
|
36
|
+
declare function SocialIcon({ platform, tone, size, className, ...props }: SocialIconProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export { SocialIcon, SOCIAL_ICON_PLATFORMS, SOCIAL_ICON_LABELS };
|
|
38
|
+
export type { SocialIconTone };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type SocialProvider = "line" | "google" | "apple" | "amazon";
|
|
3
|
+
interface SocialLoginButtonProps extends React.ComponentProps<"button"> {
|
|
4
|
+
provider: SocialProvider;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function SocialLoginButton({ provider, loading, fullWidth, className, disabled, children, ...props }: SocialLoginButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { SocialLoginButton };
|
|
10
|
+
export type { SocialLoginButtonProps, SocialProvider };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** スピナーのサイズ。デフォルト "md" */
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
/**
|
|
6
|
+
* スクリーンリーダー向けローディングラベル。
|
|
7
|
+
* i18n 対応: 英語では "Loading" を渡す。
|
|
8
|
+
* @default "読み込み中"
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Spinner — ローディング表示
|
|
14
|
+
*
|
|
15
|
+
* ### 使用例
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Spinner size="md" />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function Spinner({ className, size, label, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { Spinner };
|
|
22
|
+
export type { SpinnerProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface StarRatingProps {
|
|
2
|
+
value: number;
|
|
3
|
+
onChange?: (value: number) => void;
|
|
4
|
+
max?: number;
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl";
|
|
6
|
+
/** 右端に "2/5" 形式のテキストを表示 */
|
|
7
|
+
showLabel?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function StarRating({ value, onChange, max, size, showLabel, className, }: StarRatingProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { StarRating };
|
|
12
|
+
export type { StarRatingProps };
|