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,247 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Semantic Color Tokens
|
|
3
|
+
|
|
4
|
+
Layer 2: 用途別カラートークン
|
|
5
|
+
Primitive トークンを参照し、Light / Dark モードを自動切替。
|
|
6
|
+
コンポーネント内では必ずこのレイヤーのトークンを使用すること。
|
|
7
|
+
|
|
8
|
+
命名規則: --{Category}-{Role}
|
|
9
|
+
Category: Surface, Text, Border, Object, Brand, Hover, Active,
|
|
10
|
+
Overlay, Focus, Caution, Success, Warning, Info
|
|
11
|
+
============================================================= */
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
/* ─── Surface(背景) ─── */
|
|
15
|
+
--Surface-Primary: var(--Primitive-White);
|
|
16
|
+
--Surface-Secondary: var(--Primitive-Gray-50);
|
|
17
|
+
--Surface-Tertiary: var(--Primitive-Gray-100);
|
|
18
|
+
--Surface-Quaternary: var(--Primitive-Gray-200);
|
|
19
|
+
--Surface-Disable: var(--Primitive-Gray-100);
|
|
20
|
+
--Surface-Inverse: var(--Primitive-Gray-900);
|
|
21
|
+
--Surface-Accent-Primary: var(--Primitive-Brand-500);
|
|
22
|
+
--Surface-Accent-Primary-Light: var(--Primitive-Brand-50);
|
|
23
|
+
--Surface-Accent-Primary-Ultra-Light: var(--Primitive-Brand-50);
|
|
24
|
+
--Surface-Caution: var(--Primitive-Red-50);
|
|
25
|
+
--Surface-Success: var(--Primitive-Green-50);
|
|
26
|
+
--Surface-Warning: var(--Primitive-Amber-50);
|
|
27
|
+
--Surface-Info: var(--Primitive-Blue-50);
|
|
28
|
+
|
|
29
|
+
/* Subtle 階層: 半透明 fill(中強度)。
|
|
30
|
+
bg-red-500/15 のような既存実装が "Surface-Caution"(Primitive-50)の
|
|
31
|
+
極薄背景では弱すぎ、Strong(fill 全開)では強すぎる場合の中間。
|
|
32
|
+
既存 Surface-Caution は据え置きで後方互換維持。 */
|
|
33
|
+
--Surface-Caution-Subtle: rgba(239, 68, 68, 0.15); /* Red-500 @ 15% */
|
|
34
|
+
--Surface-Success-Subtle: rgba(34, 197, 94, 0.15); /* Green-500 @ 15% */
|
|
35
|
+
--Surface-Warning-Subtle: rgba(249, 115, 22, 0.15); /* Orange-500 @ 15% */
|
|
36
|
+
--Surface-Info-Subtle: rgba(59, 130, 246, 0.15); /* Blue-500 @ 15% */
|
|
37
|
+
--Surface-Accent-Primary-Subtle: color-mix(in srgb, var(--Primitive-Brand-500) 15%, transparent);
|
|
38
|
+
|
|
39
|
+
/* Strong 階層: fill 全開(Primitive-500 そのまま)。
|
|
40
|
+
主にバッジ・ピル・通知ドットなど「強調 fill」用途。 */
|
|
41
|
+
--Surface-Caution-Strong: var(--Primitive-Red-500);
|
|
42
|
+
--Surface-Success-Strong: var(--Primitive-Green-500);
|
|
43
|
+
--Surface-Warning-Strong: var(--Primitive-Orange-500);
|
|
44
|
+
--Surface-Info-Strong: var(--Primitive-Blue-500);
|
|
45
|
+
|
|
46
|
+
/* 動画視聴コンテキスト専用 — テーマに依存しない常時黒オーバーレイ。
|
|
47
|
+
trailer-feed / video-player のような「常に暗背景の動画 UX」で、
|
|
48
|
+
ライト/ダーク両モードでも黒地のままにしたいケース用。
|
|
49
|
+
一般的なオーバーレイには --Overlay-* を使用すること。 */
|
|
50
|
+
--Surface-VideoOverlay-Light: rgba(0, 0, 0, 0.40);
|
|
51
|
+
--Surface-VideoOverlay-Medium: rgba(0, 0, 0, 0.60);
|
|
52
|
+
--Surface-VideoOverlay-Strong: rgba(0, 0, 0, 0.80);
|
|
53
|
+
|
|
54
|
+
/* ─── Text(テキスト) ─── */
|
|
55
|
+
--Text-High-Emphasis: var(--Primitive-Gray-900);
|
|
56
|
+
--Text-Medium-Emphasis: var(--Primitive-Gray-700);
|
|
57
|
+
--Text-Low-Emphasis: var(--Primitive-Gray-500);
|
|
58
|
+
--Text-Disable: var(--Primitive-Gray-400);
|
|
59
|
+
--Text-on-Inverse: var(--Primitive-White);
|
|
60
|
+
--Text-on-Inverse-Secondary: var(--Primitive-White-Alpha-800);
|
|
61
|
+
--Text-Accent-Primary: var(--Primitive-Brand-600);
|
|
62
|
+
--Text-Success: var(--Primitive-Green-700);
|
|
63
|
+
--Text-Caution: var(--Primitive-Red-600);
|
|
64
|
+
--Text-Warning: var(--Primitive-Orange-600);
|
|
65
|
+
--Text-Info: var(--Primitive-Blue-600);
|
|
66
|
+
|
|
67
|
+
/* ─── Object(アイコン・UI要素) ─── */
|
|
68
|
+
--Object-High-Emphasis: var(--Primitive-Gray-900);
|
|
69
|
+
--Object-Medium-Emphasis: var(--Primitive-Gray-600);
|
|
70
|
+
--Object-Low-Emphasis: var(--Primitive-Gray-400);
|
|
71
|
+
--Object-Disable: var(--Primitive-Gray-300);
|
|
72
|
+
--Object-on-Inverse: var(--Primitive-White);
|
|
73
|
+
--Object-Accent-Primary: var(--Primitive-Brand-500);
|
|
74
|
+
--Object-Caution: var(--Primitive-Red-500);
|
|
75
|
+
--Object-Success: var(--Primitive-Green-500);
|
|
76
|
+
--Object-Warning: var(--Primitive-Orange-500);
|
|
77
|
+
--Object-Info: var(--Primitive-Blue-500);
|
|
78
|
+
--Object-Favorite: var(--Primitive-Red-500);
|
|
79
|
+
/* レーティング/評価用 — Warning と意味的に分離。
|
|
80
|
+
★ の塗りや 4.5/5.0 などのレーティング表示で使用。 */
|
|
81
|
+
--Object-Rating: var(--Primitive-Amber-500);
|
|
82
|
+
|
|
83
|
+
/* ─── Border(罫線) ─── */
|
|
84
|
+
--Border-High-Emphasis: var(--Primitive-Gray-700);
|
|
85
|
+
--Border-Medium-Emphasis: var(--Primitive-Gray-300);
|
|
86
|
+
--Border-Low-Emphasis: var(--Primitive-Gray-200);
|
|
87
|
+
--Border-Disable: var(--Primitive-Gray-200);
|
|
88
|
+
--Border-Accent-Primary: var(--Primitive-Brand-500);
|
|
89
|
+
--Border-Caution: var(--Primitive-Red-500);
|
|
90
|
+
--Border-Success: var(--Primitive-Green-500);
|
|
91
|
+
--Border-Warning: var(--Primitive-Orange-500);
|
|
92
|
+
--Border-Info: var(--Primitive-Blue-500);
|
|
93
|
+
/* Border の Subtle 階層 — `/30` 的な薄い枠線が必要なときに。
|
|
94
|
+
Tailwind の `/N` opacity modifier は CSS variable に対しては
|
|
95
|
+
<alpha-value> プレースホルダ前提なので、明示的な Subtle トークンを
|
|
96
|
+
提供することで「border-[var(--Border-Accent-Primary)]/30」のような
|
|
97
|
+
不安定な書き方を避けられる。 */
|
|
98
|
+
--Border-Accent-Primary-Subtle: color-mix(in srgb, var(--Primitive-Brand-500) 30%, transparent);
|
|
99
|
+
--Border-Caution-Subtle: rgba(239, 68, 68, 0.30);
|
|
100
|
+
--Border-Success-Subtle: rgba(34, 197, 94, 0.30);
|
|
101
|
+
--Border-Info-Subtle: rgba(59, 130, 246, 0.30);
|
|
102
|
+
|
|
103
|
+
/* ─── Brand ─── */
|
|
104
|
+
--Brand-Primary: var(--Primitive-Brand-600);
|
|
105
|
+
--Brand-Action: var(--Primitive-Brand-700);
|
|
106
|
+
--Brand-Light: var(--Primitive-Brand-100);
|
|
107
|
+
--Brand-Ultra-Light: var(--Primitive-Brand-50);
|
|
108
|
+
|
|
109
|
+
/* ─── External Brand(外部サービスの公式色)───
|
|
110
|
+
SNS / OAuth プロバイダの公式ブランドカラー。テーマ(Brand-*)には
|
|
111
|
+
連動せず、ライト/ダーク共通で固定。SocialLoginButton 等で生 #hex を
|
|
112
|
+
直書きせずこのトークンを参照する。新規追加時は公式ガイドライン準拠。 */
|
|
113
|
+
--Brand-Line: #06C755;
|
|
114
|
+
--Brand-Google-Border: #DADCE0; /* Google ボタンの罫線(Google 推奨グレー) */
|
|
115
|
+
--Brand-Apple: #000000;
|
|
116
|
+
--Brand-Amazon: #232F3E;
|
|
117
|
+
--Brand-Amazon-Accent: #FF9900;
|
|
118
|
+
|
|
119
|
+
/* ─── Interactive States ─── */
|
|
120
|
+
--Hover-Primary-Button: var(--Primitive-Brand-700);
|
|
121
|
+
--Active-Primary-Button: var(--Primitive-Brand-800);
|
|
122
|
+
--Hover-Secondary-Button: var(--Primitive-Brand-50);
|
|
123
|
+
--Active-Secondary-Button: var(--Primitive-Brand-100);
|
|
124
|
+
--Hover-Tertiary-Button: var(--Primitive-Gray-100);
|
|
125
|
+
--Active-Tertiary-Button: var(--Primitive-Gray-200);
|
|
126
|
+
--Hover-Ghost-Button: var(--Primitive-Gray-100);
|
|
127
|
+
--Hover-Destructive-Button: var(--Primitive-Red-700);
|
|
128
|
+
--Active-Destructive-Button: var(--Primitive-Red-800);
|
|
129
|
+
|
|
130
|
+
/* ─── Overlay ─── */
|
|
131
|
+
--Overlay-Dark: var(--Primitive-Gray-Alpha-800);
|
|
132
|
+
--Overlay-Medium: var(--Primitive-Gray-Alpha-600);
|
|
133
|
+
--Overlay-Light: var(--Primitive-Gray-Alpha-200);
|
|
134
|
+
|
|
135
|
+
/* ─── Focus ─── */
|
|
136
|
+
--Focus-High-Emphasis: var(--Primitive-Brand-400);
|
|
137
|
+
|
|
138
|
+
/* ─── Semantic Functional ─── */
|
|
139
|
+
--Caution-Base: var(--Primitive-Red-600);
|
|
140
|
+
--Caution-Action: var(--Primitive-Red-700);
|
|
141
|
+
--Success-Base: var(--Primitive-Green-600);
|
|
142
|
+
--Warning-Base: var(--Primitive-Orange-600);
|
|
143
|
+
--Info-Base: var(--Primitive-Blue-600);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ─── Dark Mode ─── */
|
|
147
|
+
.dark {
|
|
148
|
+
--Surface-Primary: var(--Primitive-Gray-900);
|
|
149
|
+
--Surface-Secondary: var(--Primitive-Gray-800);
|
|
150
|
+
--Surface-Tertiary: var(--Primitive-Gray-700);
|
|
151
|
+
--Surface-Quaternary: var(--Primitive-Gray-600);
|
|
152
|
+
--Surface-Disable: var(--Primitive-Gray-800);
|
|
153
|
+
--Surface-Inverse: var(--Primitive-White);
|
|
154
|
+
--Surface-Accent-Primary: var(--Primitive-Brand-500);
|
|
155
|
+
--Surface-Accent-Primary-Light: var(--Primitive-Brand-900);
|
|
156
|
+
--Surface-Accent-Primary-Ultra-Light: var(--Primitive-Brand-900);
|
|
157
|
+
--Surface-Caution: #2d1414; /* Red-900(#7F1D1D)より彩度を落とした暗赤色 */
|
|
158
|
+
--Surface-Success: var(--Primitive-Green-900);
|
|
159
|
+
--Surface-Warning: var(--Primitive-Amber-900);
|
|
160
|
+
--Surface-Info: var(--Primitive-Blue-900);
|
|
161
|
+
|
|
162
|
+
/* Subtle 階層(Dark) — Primitive-400 系をベースに alpha 20% で
|
|
163
|
+
暗背景上でも視認できる中強度 fill。 */
|
|
164
|
+
--Surface-Caution-Subtle: rgba(248, 113, 113, 0.20); /* Red-400 @ 20% */
|
|
165
|
+
--Surface-Success-Subtle: rgba(74, 222, 128, 0.20); /* Green-400 @ 20% */
|
|
166
|
+
--Surface-Warning-Subtle: rgba(251, 146, 60, 0.20); /* Orange-400 @ 20% */
|
|
167
|
+
--Surface-Info-Subtle: rgba(96, 165, 250, 0.20); /* Blue-400 @ 20% */
|
|
168
|
+
--Surface-Accent-Primary-Subtle: color-mix(in srgb, var(--Primitive-Brand-400) 20%, transparent);
|
|
169
|
+
|
|
170
|
+
--Surface-Caution-Strong: var(--Primitive-Red-500);
|
|
171
|
+
--Surface-Success-Strong: var(--Primitive-Green-500);
|
|
172
|
+
--Surface-Warning-Strong: var(--Primitive-Orange-500);
|
|
173
|
+
--Surface-Info-Strong: var(--Primitive-Blue-500);
|
|
174
|
+
|
|
175
|
+
/* VideoOverlay はテーマ非依存(常に黒)— Light モードと同じ値。 */
|
|
176
|
+
--Surface-VideoOverlay-Light: rgba(0, 0, 0, 0.40);
|
|
177
|
+
--Surface-VideoOverlay-Medium: rgba(0, 0, 0, 0.60);
|
|
178
|
+
--Surface-VideoOverlay-Strong: rgba(0, 0, 0, 0.80);
|
|
179
|
+
|
|
180
|
+
--Text-High-Emphasis: var(--Primitive-White-Alpha-1000);
|
|
181
|
+
--Text-Medium-Emphasis: var(--Primitive-White-Alpha-800);
|
|
182
|
+
--Text-Low-Emphasis: var(--Primitive-White-Alpha-600);
|
|
183
|
+
--Text-Disable: var(--Primitive-White-Alpha-400);
|
|
184
|
+
--Text-on-Inverse: var(--Primitive-Gray-900);
|
|
185
|
+
--Text-on-Inverse-Secondary: var(--Primitive-Gray-700);
|
|
186
|
+
--Text-Accent-Primary: var(--Primitive-Brand-400);
|
|
187
|
+
--Text-Success: var(--Primitive-Green-400);
|
|
188
|
+
--Text-Caution: var(--Primitive-Red-400);
|
|
189
|
+
--Text-Warning: var(--Primitive-Orange-400);
|
|
190
|
+
--Text-Info: var(--Primitive-Blue-400);
|
|
191
|
+
|
|
192
|
+
--Object-High-Emphasis: var(--Primitive-White-Alpha-1000);
|
|
193
|
+
--Object-Medium-Emphasis: var(--Primitive-White-Alpha-700);
|
|
194
|
+
--Object-Low-Emphasis: var(--Primitive-White-Alpha-500);
|
|
195
|
+
--Object-Disable: var(--Primitive-White-Alpha-300);
|
|
196
|
+
--Object-on-Inverse: var(--Primitive-Gray-900);
|
|
197
|
+
--Object-Accent-Primary: var(--Primitive-Brand-400);
|
|
198
|
+
--Object-Caution: var(--Primitive-Red-400);
|
|
199
|
+
--Object-Success: var(--Primitive-Green-400);
|
|
200
|
+
--Object-Warning: var(--Primitive-Orange-400);
|
|
201
|
+
--Object-Info: var(--Primitive-Blue-400);
|
|
202
|
+
--Object-Favorite: var(--Primitive-Red-400);
|
|
203
|
+
--Object-Rating: var(--Primitive-Amber-400);
|
|
204
|
+
|
|
205
|
+
--Border-High-Emphasis: var(--Primitive-White-Alpha-500);
|
|
206
|
+
--Border-Medium-Emphasis: var(--Primitive-White-Alpha-300);
|
|
207
|
+
--Border-Low-Emphasis: var(--Primitive-White-Alpha-200);
|
|
208
|
+
--Border-Disable: var(--Primitive-White-Alpha-100);
|
|
209
|
+
--Border-Accent-Primary: var(--Primitive-Brand-400);
|
|
210
|
+
--Border-Caution: var(--Primitive-Red-400);
|
|
211
|
+
--Border-Success: var(--Primitive-Green-400);
|
|
212
|
+
--Border-Warning: var(--Primitive-Orange-400);
|
|
213
|
+
--Border-Info: var(--Primitive-Blue-400);
|
|
214
|
+
--Border-Accent-Primary-Subtle: color-mix(in srgb, var(--Primitive-Brand-400) 40%, transparent);
|
|
215
|
+
--Border-Caution-Subtle: rgba(248, 113, 113, 0.40);
|
|
216
|
+
--Border-Success-Subtle: rgba(74, 222, 128, 0.40);
|
|
217
|
+
--Border-Info-Subtle: rgba(96, 165, 250, 0.40);
|
|
218
|
+
|
|
219
|
+
--Brand-Primary: var(--Primitive-Brand-400);
|
|
220
|
+
--Brand-Action: var(--Primitive-Brand-300);
|
|
221
|
+
--Brand-Light: var(--Primitive-Brand-900);
|
|
222
|
+
--Brand-Ultra-Light: var(--Primitive-Brand-900);
|
|
223
|
+
|
|
224
|
+
--Hover-Primary-Button: var(--Primitive-Brand-500);
|
|
225
|
+
--Active-Primary-Button: var(--Primitive-Brand-600);
|
|
226
|
+
--Hover-Secondary-Button: var(--Primitive-Brand-900);
|
|
227
|
+
--Active-Secondary-Button: var(--Primitive-Brand-800);
|
|
228
|
+
--Hover-Tertiary-Button: var(--Primitive-White-Alpha-100);
|
|
229
|
+
--Active-Tertiary-Button: var(--Primitive-White-Alpha-200);
|
|
230
|
+
--Hover-Ghost-Button: var(--Primitive-White-Alpha-100);
|
|
231
|
+
--Hover-Destructive-Button: var(--Primitive-Red-500);
|
|
232
|
+
--Active-Destructive-Button: var(--Primitive-Red-600);
|
|
233
|
+
|
|
234
|
+
--Overlay-Dark: var(--Primitive-Gray-Alpha-900);
|
|
235
|
+
--Overlay-Medium: var(--Primitive-Gray-Alpha-700);
|
|
236
|
+
--Overlay-Light: var(--Primitive-Gray-Alpha-400);
|
|
237
|
+
|
|
238
|
+
/* ─── Focus ─── */
|
|
239
|
+
--Focus-High-Emphasis: var(--Primitive-Brand-400);
|
|
240
|
+
|
|
241
|
+
/* ─── Semantic Functional ─── */
|
|
242
|
+
--Caution-Base: var(--Primitive-Red-400);
|
|
243
|
+
--Caution-Action: var(--Primitive-Red-500);
|
|
244
|
+
--Success-Base: var(--Primitive-Green-400);
|
|
245
|
+
--Warning-Base: var(--Primitive-Orange-400);
|
|
246
|
+
--Info-Base: var(--Primitive-Blue-400);
|
|
247
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Typography Utilities
|
|
3
|
+
|
|
4
|
+
Layer 3: typo-* ユーティリティクラス
|
|
5
|
+
font-size / line-height / font-weight / letter-spacing を
|
|
6
|
+
1クラスに集約し、デザインのブレを防止する。
|
|
7
|
+
|
|
8
|
+
ルール:
|
|
9
|
+
1. 必ず typo-* クラスを使う(text-sm font-bold 等の個別指定は禁止)
|
|
10
|
+
2. typo-* と text-* / font-* / leading-* / tracking-* を混在させない
|
|
11
|
+
3. カラーは別途指定: className="typo-body-sm text-[var(--Text-Low-Emphasis)]"
|
|
12
|
+
4. レスポンシブ対応可: md:typo-heading-xl
|
|
13
|
+
5. CVA 内でも typo-* を使用する
|
|
14
|
+
============================================================= */
|
|
15
|
+
|
|
16
|
+
/* ─── Heading(見出し) ─── */
|
|
17
|
+
|
|
18
|
+
@utility typo-heading-3xl {
|
|
19
|
+
font-size: 28px;
|
|
20
|
+
line-height: 1.5;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
letter-spacing: 0.04em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@utility typo-heading-2xl {
|
|
26
|
+
font-size: 24px;
|
|
27
|
+
line-height: 1.5;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
letter-spacing: 0.04em;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@utility typo-heading-xl {
|
|
33
|
+
font-size: 21px;
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
letter-spacing: 0.04em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@utility typo-heading-lg {
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
line-height: 1.5;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
letter-spacing: 0.04em;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@utility typo-heading-md {
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
line-height: 1.5;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
letter-spacing: 0.04em;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@utility typo-heading-sm {
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
letter-spacing: 0.04em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ─── Body(本文) ─── */
|
|
61
|
+
|
|
62
|
+
@utility typo-body-lg {
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
line-height: 1.75;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@utility typo-body-md {
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
line-height: 1.75;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@utility typo-body-sm {
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
line-height: 1.5;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* body-xs(10px) は本文禁止 — 補助ラベル/メタ情報専用。
|
|
81
|
+
本文の最小は typo-body-sm(12px)。10px を本文に使うとモバイル可読性の
|
|
82
|
+
下限(iOS HIG ~11pt / WCAG 観点)を割る。 */
|
|
83
|
+
@utility typo-body-xs {
|
|
84
|
+
font-size: 10px;
|
|
85
|
+
line-height: 1.5;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* ─── Label(ボタン・ナビ・タグ) ─── */
|
|
90
|
+
|
|
91
|
+
@utility typo-label-lg {
|
|
92
|
+
font-size: 16px;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
letter-spacing: 0.04em;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@utility typo-label-md {
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
line-height: 1.5;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
letter-spacing: 0.04em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility typo-label-sm {
|
|
106
|
+
font-size: 12px;
|
|
107
|
+
line-height: 1.5;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@utility typo-label-xs {
|
|
112
|
+
font-size: 10px;
|
|
113
|
+
line-height: 1.5;
|
|
114
|
+
font-weight: 500;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* ─── Display(ヒーロー・ランディング用) ─── */
|
|
118
|
+
|
|
119
|
+
@utility typo-display-xl {
|
|
120
|
+
font-size: 48px;
|
|
121
|
+
line-height: 1.25;
|
|
122
|
+
font-weight: 700;
|
|
123
|
+
letter-spacing: -0.02em;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@utility typo-display-lg {
|
|
127
|
+
font-size: 36px;
|
|
128
|
+
line-height: 1.3;
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
letter-spacing: -0.01em;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ─── Caption(注釈・法律表記) ───
|
|
134
|
+
caption(11px) は非必須の注釈・法的表記のみ。本文には使わない(本文下限は body-sm=12px)。 */
|
|
135
|
+
|
|
136
|
+
@utility typo-caption {
|
|
137
|
+
font-size: 11px;
|
|
138
|
+
line-height: 1.5;
|
|
139
|
+
font-weight: 400;
|
|
140
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# KSK Design System — テーマガイド
|
|
2
|
+
|
|
3
|
+
## 概要
|
|
4
|
+
|
|
5
|
+
KSK DS のテーマシステムは **Primitive Layer の Brand 色を差し替えるだけ** で、
|
|
6
|
+
全 Semantic トークン → 全コンポーネントの見た目が自動的に切り替わる設計です。
|
|
7
|
+
|
|
8
|
+
## プリセットテーマ
|
|
9
|
+
|
|
10
|
+
| テーマ | ファイル | Brand-500 | 想定業種 |
|
|
11
|
+
|--------|---------|-----------|---------|
|
|
12
|
+
| Default (Blue) | `default.css` | `#3B82F6` | 汎用・SaaS・BtoB |
|
|
13
|
+
| Orange | `orange.css` | `#E04B00` | EC・フード・エンタメ |
|
|
14
|
+
| Blue | `blue.css` | `#3B82F6` | リクルート・HR・建設 |
|
|
15
|
+
| Green | `green.css` | `#16A34A` | ヘルスケア・サステナ・金融 |
|
|
16
|
+
| Violet | `violet.css` | `#7C3AED` | プレミアム・クリエイティブ・教育 |
|
|
17
|
+
|
|
18
|
+
## 新しいクライアントテーマの作り方
|
|
19
|
+
|
|
20
|
+
1. `default.css` をコピーして `{client-name}.css` を作成
|
|
21
|
+
2. `--Primitive-Brand-*` の 50〜900 をクライアントのブランドカラーに置換
|
|
22
|
+
3. プロジェクトの CSS で `@import` する
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
/* クライアントプロジェクト側 */
|
|
26
|
+
@import "ksk-design-system/preset";
|
|
27
|
+
@import "./themes/my-client.css";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## テーマ切替の仕組み
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Brand色を差し替え
|
|
34
|
+
↓
|
|
35
|
+
Primitive Layer(primitive.css の Brand-50〜900)
|
|
36
|
+
↓ 参照
|
|
37
|
+
Semantic Layer(semantic.css の Brand-Primary, Hover-*, Active-* 等)
|
|
38
|
+
↓ 参照
|
|
39
|
+
Bridge Layer(preset.css の --primary, --ring 等 shadcn 互換)
|
|
40
|
+
↓ 参照
|
|
41
|
+
全コンポーネント(Button, Input, Card 等)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**変更は Brand 色の 10 行だけ。** 残り全てが CSS 変数の連鎖で自動反映されます。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Blue Theme
|
|
3
|
+
|
|
4
|
+
BtoB・SaaS・リクルート系向けの信頼感テーマ。
|
|
5
|
+
|
|
6
|
+
使い方:
|
|
7
|
+
@import "ksk-design-system/themes/blue";
|
|
8
|
+
============================================================= */
|
|
9
|
+
|
|
10
|
+
@theme {
|
|
11
|
+
--Primitive-Brand-50: #EFF6FF;
|
|
12
|
+
--Primitive-Brand-100: #DBEAFE;
|
|
13
|
+
--Primitive-Brand-200: #BFDBFE;
|
|
14
|
+
--Primitive-Brand-300: #93C5FD;
|
|
15
|
+
--Primitive-Brand-400: #60A5FA;
|
|
16
|
+
--Primitive-Brand-500: #3B82F6;
|
|
17
|
+
--Primitive-Brand-600: #2563EB;
|
|
18
|
+
--Primitive-Brand-700: #1D4ED8;
|
|
19
|
+
--Primitive-Brand-800: #1E40AF;
|
|
20
|
+
--Primitive-Brand-900: #1E3A8A;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Default Theme (Blue)
|
|
3
|
+
|
|
4
|
+
デフォルトのニュートラルブルーテーマ。
|
|
5
|
+
このファイルをコピーして新しいクライアントテーマを作成できる。
|
|
6
|
+
|
|
7
|
+
使い方:
|
|
8
|
+
@import "ksk-design-system/themes/default";
|
|
9
|
+
============================================================= */
|
|
10
|
+
|
|
11
|
+
/* デフォルトは primitive.css の初期値をそのまま使用するため空 */
|
|
12
|
+
/* Brand 色は Primitive-Brand-500: #3B82F6 (Blue) */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Green Theme
|
|
3
|
+
|
|
4
|
+
ヘルスケア・サステナ・金融系クライアント向け。
|
|
5
|
+
安心感・成長を表現するグリーンテーマ。
|
|
6
|
+
|
|
7
|
+
使い方:
|
|
8
|
+
@import "ksk-design-system/themes/green";
|
|
9
|
+
============================================================= */
|
|
10
|
+
|
|
11
|
+
@theme {
|
|
12
|
+
--Primitive-Brand-50: #F0FDF4;
|
|
13
|
+
--Primitive-Brand-100: #DCFCE7;
|
|
14
|
+
--Primitive-Brand-200: #BBF7D0;
|
|
15
|
+
--Primitive-Brand-300: #86EFAC;
|
|
16
|
+
--Primitive-Brand-400: #4ADE80;
|
|
17
|
+
--Primitive-Brand-500: #16A34A;
|
|
18
|
+
--Primitive-Brand-600: #15803D;
|
|
19
|
+
--Primitive-Brand-700: #166534;
|
|
20
|
+
--Primitive-Brand-800: #14532D;
|
|
21
|
+
--Primitive-Brand-900: #052E16;
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Orange Theme
|
|
3
|
+
|
|
4
|
+
EC・フード・エンタメ系向けのウォームテーマ。
|
|
5
|
+
|
|
6
|
+
使い方:
|
|
7
|
+
@import "ksk-design-system/themes/orange";
|
|
8
|
+
============================================================= */
|
|
9
|
+
|
|
10
|
+
@theme {
|
|
11
|
+
--Primitive-Brand-50: #FFF7ED;
|
|
12
|
+
--Primitive-Brand-100: #FFEDD5;
|
|
13
|
+
--Primitive-Brand-200: #FED7AA;
|
|
14
|
+
--Primitive-Brand-300: #FDBA74;
|
|
15
|
+
--Primitive-Brand-400: #FB923C;
|
|
16
|
+
--Primitive-Brand-500: #F97316;
|
|
17
|
+
--Primitive-Brand-600: #C2410C;
|
|
18
|
+
--Primitive-Brand-700: #9A3412;
|
|
19
|
+
--Primitive-Brand-800: #7C2D12;
|
|
20
|
+
--Primitive-Brand-900: #431407;
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Violet Theme
|
|
3
|
+
|
|
4
|
+
プレミアム・クリエイティブ・教育系クライアント向け。
|
|
5
|
+
洗練された印象のバイオレットテーマ。
|
|
6
|
+
|
|
7
|
+
使い方:
|
|
8
|
+
@import "ksk-design-system/themes/violet";
|
|
9
|
+
============================================================= */
|
|
10
|
+
|
|
11
|
+
@theme {
|
|
12
|
+
--Primitive-Brand-50: #F5F3FF;
|
|
13
|
+
--Primitive-Brand-100: #EDE9FE;
|
|
14
|
+
--Primitive-Brand-200: #DDD6FE;
|
|
15
|
+
--Primitive-Brand-300: #C4B5FD;
|
|
16
|
+
--Primitive-Brand-400: #A78BFA;
|
|
17
|
+
--Primitive-Brand-500: #7C3AED;
|
|
18
|
+
--Primitive-Brand-600: #6D28D9;
|
|
19
|
+
--Primitive-Brand-700: #5B21B6;
|
|
20
|
+
--Primitive-Brand-800: #4C1D95;
|
|
21
|
+
--Primitive-Brand-900: #3B0764;
|
|
22
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
このファイルは ksk-design-system の postinstall で自動設置されました。
|
|
3
|
+
最新ルールを取り込むには: npx ksk-ds init --force
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
# このプロジェクトは ksk-design-system に準拠する
|
|
7
|
+
|
|
8
|
+
Codex(および他の AI エージェント)は UI 作業を始める前に、以下のファイルを**必ず**読み込むこと。
|
|
9
|
+
|
|
10
|
+
## 必読ファイル(node_modules 配下)
|
|
11
|
+
|
|
12
|
+
| ファイル | 内容 |
|
|
13
|
+
|---------|------|
|
|
14
|
+
| `node_modules/ksk-design-system/AGENTS.md` | DS 全体のルール・禁止パターン |
|
|
15
|
+
| `node_modules/ksk-design-system/contracts/components.json` | 全コンポーネントの定義・バリアント |
|
|
16
|
+
| `node_modules/ksk-design-system/contracts/rules.json` | 禁止パターン31件・AIアンチパターン9件 |
|
|
17
|
+
| `node_modules/ksk-design-system/tokens.json` | カラー・余白・角丸・影・タイポ |
|
|
18
|
+
| `node_modules/ksk-design-system/src/components/COMPONENT_LOOKUP.md` | 全コンポーネントのバリアント・インポートパス一覧 |
|
|
19
|
+
|
|
20
|
+
> DS 側のルール更新は `npm update ksk-design-system` で自動反映されます。このファイルは書き換え不要。
|
|
21
|
+
|
|
22
|
+
## 書く前に必ず確認するパターン
|
|
23
|
+
|
|
24
|
+
| 書こうとしているもの | 代わりに使うもの |
|
|
25
|
+
|-------------------|----------------|
|
|
26
|
+
| カスタムカラー(`#xxxxxx` / `rgba(...)` ハードコード) | `var(--Brand-Primary)`, `var(--Surface-*)` 等のセマンティックトークン |
|
|
27
|
+
| カスタム余白(`margin: 17px` 等の非トークン値) | Tailwind の標準スペーシング(`p-4`, `gap-2` 等) |
|
|
28
|
+
| カスタム角丸(`rounded-md`, `rounded-xl` 等) | `rounded-none/sm/lg/2xl/full` のみ使用可 |
|
|
29
|
+
| カスタム影(`shadow-md` 以上) | `shadow-[var(--shadow-md)]`, `shadow-[var(--shadow-dialog)]` |
|
|
30
|
+
| `font-bold` / `font-semibold` 等の個別指定 | `typo-*` クラス(`typo-heading-md`, `typo-label-sm` 等) |
|
|
31
|
+
| `<button>` / `<input>` / `<a href>` 生タグ | `<Button>`, `<Input>`, `<Button variant="link">` |
|
|
32
|
+
| `text-white` / `bg-white` / Tailwind標準色 | `text-[var(--Text-on-Inverse)]`, `bg-[var(--Surface-Primary)]` |
|
|
33
|
+
| グラデーション(`bg-gradient-to-*`) | 単色背景 `bg-[var(--Surface-*)]` |
|
|
34
|
+
| カラーバー(`border-t-4` 等の太ボーダー) | 全周ボーダー `border border-[var(--Border-Low-Emphasis)]` |
|
|
35
|
+
|
|
36
|
+
DS に該当パターンが無い場合のみカスタム実装を許可。その場合は**必ずコメントで理由を記載**すること。
|
|
37
|
+
|
|
38
|
+
## 新規コンポーネントを作る前に必ず確認する
|
|
39
|
+
|
|
40
|
+
**`node_modules/ksk-design-system/src/components/COMPONENT_LOOKUP.md` を読んでから実装・提案すること。**
|
|
41
|
+
以下は「DSにない」と誤解されやすいが既に存在するもの:
|
|
42
|
+
|
|
43
|
+
| やりたいこと | 正しい使い方 |
|
|
44
|
+
|---|---|
|
|
45
|
+
| アイコンだけのボタン | `<Button size="icon">` / `"icon-sm"` / `"icon-lg"` |
|
|
46
|
+
| リンク見た目のボタン | `<Button variant="link">` |
|
|
47
|
+
| チェックボックス | `<Checkbox>` |
|
|
48
|
+
| ラジオボタン | `<RadioGroup><RadioGroupItem>` |
|
|
49
|
+
| Badge の色違い | `<Badge variant="success">` / `"caution"` / `"warning"` / `"info"` |
|
|
50
|
+
| 空状態の表示 | `<EmptyState>` |
|
|
51
|
+
| 数値カード | `<StatCard>` |
|
|
52
|
+
| トースト通知 | `<Toaster>` + `useToast()` |
|
|
53
|
+
| スケルトン | `<Skeleton>` |
|
|
54
|
+
| 下部ナビゲーション | `<BottomTabBar>` |
|
|
55
|
+
| プログレスバー | `<Progress>` |
|
|
56
|
+
| フォームフィールド | `<FormField>` |
|
|
57
|
+
| ケバブメニュー | `<KebabMenu>` |
|
|
58
|
+
| モーダル(PC) | `<Dialog>` |
|
|
59
|
+
| ドロワー(モバイル) | `<Sheet side="bottom">` |
|
|
60
|
+
| PC/モバイル自動切替モーダル | `<ResponsiveDialog>` |
|
|
61
|
+
|
|
62
|
+
## 使用方法
|
|
63
|
+
|
|
64
|
+
### CSS のセットアップ
|
|
65
|
+
|
|
66
|
+
```css
|
|
67
|
+
/* globals.css / app.css など */
|
|
68
|
+
@import "ksk-design-system/preset"; /* DS のトークン・スタイル */
|
|
69
|
+
@import "ksk-design-system/themes/default"; /* または orange / green / violet */
|
|
70
|
+
@import "tailwindcss";
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### コンポーネントの使用
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { Button, Card, Input, FormField } from "ksk-design-system"
|
|
77
|
+
```
|