ksk-design-system 2.6.4 → 2.8.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/MIGRATION.md +16 -0
- package/README.md +27 -1
- package/RELEASE.md +0 -4
- package/UPDATING.md +5 -0
- package/bin/lint.js +1 -1
- package/bin/product-theme-override.js +1 -1
- package/contracts/components.json +7 -4
- package/contracts/consumer-requests.json +25 -0
- package/contracts/product-theme-overrides.json +15 -0
- package/contracts/token-hex-cache.json +5 -1
- package/dist/index.js +457 -451
- package/dist/native/ui.js +559 -534
- package/dist/{native-BsJ3ntN3.js → native-_H0V_r0X.js} +30 -6
- package/dist/native.js +1 -1
- package/dist/types/components/patterns/commerce/bottom-tab-bar.d.ts +28 -0
- package/dist/types/native/components/Alert.d.ts +4 -1
- package/dist/types/native/components/StatCard.d.ts +8 -1
- package/dist/types/native/components/index.d.ts +1 -1
- package/dist/types/native/sheet-snap-gesture.d.ts +2 -0
- package/dist/types/tokens/native/themes.d.ts +24 -0
- package/package.json +10 -1
- package/src/components/COMPONENT_LOOKUP.md +1 -1
- package/src/preset-core.css +252 -0
- package/src/preset.css +7 -232
- package/src/styles/semantic.css +9 -0
- package/src/styles/source-safelist.css +4 -2
- package/tokens.json +5 -1
|
@@ -73,6 +73,8 @@ var e = {
|
|
|
73
73
|
line: "#06C755",
|
|
74
74
|
"google-border": "#DADCE0",
|
|
75
75
|
apple: "#000000",
|
|
76
|
+
"apple-surface": "#000000",
|
|
77
|
+
"on-apple": "#FFFFFF",
|
|
76
78
|
amazon: "#232F3E"
|
|
77
79
|
},
|
|
78
80
|
hover: {
|
|
@@ -170,7 +172,9 @@ var e = {
|
|
|
170
172
|
primary: "#60A5FA",
|
|
171
173
|
action: "#93C5FD",
|
|
172
174
|
light: "#1E3A8A",
|
|
173
|
-
"ultra-light": "#1E3A8A"
|
|
175
|
+
"ultra-light": "#1E3A8A",
|
|
176
|
+
"apple-surface": "#FFFFFF",
|
|
177
|
+
"on-apple": "#000000"
|
|
174
178
|
},
|
|
175
179
|
hover: {
|
|
176
180
|
"primary-button": "#3B82F6",
|
|
@@ -273,6 +277,8 @@ var e = {
|
|
|
273
277
|
line: "#06C755",
|
|
274
278
|
"google-border": "#DADCE0",
|
|
275
279
|
apple: "#000000",
|
|
280
|
+
"apple-surface": "#000000",
|
|
281
|
+
"on-apple": "#FFFFFF",
|
|
276
282
|
amazon: "#232F3E"
|
|
277
283
|
},
|
|
278
284
|
hover: {
|
|
@@ -370,7 +376,9 @@ var e = {
|
|
|
370
376
|
primary: "#60A5FA",
|
|
371
377
|
action: "#93C5FD",
|
|
372
378
|
light: "#1E3A8A",
|
|
373
|
-
"ultra-light": "#1E3A8A"
|
|
379
|
+
"ultra-light": "#1E3A8A",
|
|
380
|
+
"apple-surface": "#FFFFFF",
|
|
381
|
+
"on-apple": "#000000"
|
|
374
382
|
},
|
|
375
383
|
hover: {
|
|
376
384
|
"primary-button": "#3B82F6",
|
|
@@ -473,6 +481,8 @@ var e = {
|
|
|
473
481
|
line: "#06C755",
|
|
474
482
|
"google-border": "#DADCE0",
|
|
475
483
|
apple: "#000000",
|
|
484
|
+
"apple-surface": "#000000",
|
|
485
|
+
"on-apple": "#FFFFFF",
|
|
476
486
|
amazon: "#232F3E"
|
|
477
487
|
},
|
|
478
488
|
hover: {
|
|
@@ -570,7 +580,9 @@ var e = {
|
|
|
570
580
|
primary: "#4398F8",
|
|
571
581
|
action: "#7FAAFB",
|
|
572
582
|
light: "#03155A",
|
|
573
|
-
"ultra-light": "#03155A"
|
|
583
|
+
"ultra-light": "#03155A",
|
|
584
|
+
"apple-surface": "#FFFFFF",
|
|
585
|
+
"on-apple": "#000000"
|
|
574
586
|
},
|
|
575
587
|
hover: {
|
|
576
588
|
"primary-button": "#2053F5",
|
|
@@ -673,6 +685,8 @@ var e = {
|
|
|
673
685
|
line: "#06C755",
|
|
674
686
|
"google-border": "#DADCE0",
|
|
675
687
|
apple: "#000000",
|
|
688
|
+
"apple-surface": "#000000",
|
|
689
|
+
"on-apple": "#FFFFFF",
|
|
676
690
|
amazon: "#232F3E"
|
|
677
691
|
},
|
|
678
692
|
hover: {
|
|
@@ -770,7 +784,9 @@ var e = {
|
|
|
770
784
|
primary: "#FB923C",
|
|
771
785
|
action: "#FDBA74",
|
|
772
786
|
light: "#431407",
|
|
773
|
-
"ultra-light": "#431407"
|
|
787
|
+
"ultra-light": "#431407",
|
|
788
|
+
"apple-surface": "#FFFFFF",
|
|
789
|
+
"on-apple": "#000000"
|
|
774
790
|
},
|
|
775
791
|
hover: {
|
|
776
792
|
"primary-button": "#F97316",
|
|
@@ -873,6 +889,8 @@ var e = {
|
|
|
873
889
|
line: "#06C755",
|
|
874
890
|
"google-border": "#DADCE0",
|
|
875
891
|
apple: "#000000",
|
|
892
|
+
"apple-surface": "#000000",
|
|
893
|
+
"on-apple": "#FFFFFF",
|
|
876
894
|
amazon: "#232F3E"
|
|
877
895
|
},
|
|
878
896
|
hover: {
|
|
@@ -970,7 +988,9 @@ var e = {
|
|
|
970
988
|
primary: "#4ADE80",
|
|
971
989
|
action: "#86EFAC",
|
|
972
990
|
light: "#052E16",
|
|
973
|
-
"ultra-light": "#052E16"
|
|
991
|
+
"ultra-light": "#052E16",
|
|
992
|
+
"apple-surface": "#FFFFFF",
|
|
993
|
+
"on-apple": "#000000"
|
|
974
994
|
},
|
|
975
995
|
hover: {
|
|
976
996
|
"primary-button": "#16A34A",
|
|
@@ -1073,6 +1093,8 @@ var e = {
|
|
|
1073
1093
|
line: "#06C755",
|
|
1074
1094
|
"google-border": "#DADCE0",
|
|
1075
1095
|
apple: "#000000",
|
|
1096
|
+
"apple-surface": "#000000",
|
|
1097
|
+
"on-apple": "#FFFFFF",
|
|
1076
1098
|
amazon: "#232F3E"
|
|
1077
1099
|
},
|
|
1078
1100
|
hover: {
|
|
@@ -1170,7 +1192,9 @@ var e = {
|
|
|
1170
1192
|
primary: "#A78BFA",
|
|
1171
1193
|
action: "#C4B5FD",
|
|
1172
1194
|
light: "#3B0764",
|
|
1173
|
-
"ultra-light": "#3B0764"
|
|
1195
|
+
"ultra-light": "#3B0764",
|
|
1196
|
+
"apple-surface": "#FFFFFF",
|
|
1197
|
+
"on-apple": "#000000"
|
|
1174
1198
|
},
|
|
1175
1199
|
hover: {
|
|
1176
1200
|
"primary-button": "#7C3AED",
|
package/dist/native.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./native-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./native-_H0V_r0X.js";
|
|
2
2
|
export { i as getTheme, r as primitives, t as scales, n as themeNames, e as themes };
|
|
@@ -173,5 +173,33 @@ interface BottomTabBarProps extends React.ComponentProps<"nav"> {
|
|
|
173
173
|
* いずれも呼び出し側の義務にしていない(明示値があればそちらが優先)。
|
|
174
174
|
*/
|
|
175
175
|
declare function BottomTabBar({ className, items, centerAction, showLabels, tone, maxWidth, variant, pillPosition, floatingPosition, keyboardBehavior, scrollEdge, navLabel, showOnDesktop, ...props }: BottomTabBarProps): React.JSX.Element;
|
|
176
|
+
interface PlatterRect {
|
|
177
|
+
x: number;
|
|
178
|
+
y: number;
|
|
179
|
+
w: number;
|
|
180
|
+
h: number;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* platter overlay の配置量を求める。
|
|
184
|
+
*
|
|
185
|
+
* overlay は nav の絶対配置子 (`absolute left-0 top-0`) なので、原点は nav の
|
|
186
|
+
* **padding box**。一方 rect 同士の差は **border box** 基準なので、そのまま
|
|
187
|
+
* translate に渡すと nav の border 分だけ右下にずれる (#591)。border 幅
|
|
188
|
+
* (clientLeft / clientTop) を引いて padding box 基準へ揃える。
|
|
189
|
+
*
|
|
190
|
+
* テストから参照するため named export(公開 API ではない)。
|
|
191
|
+
*/
|
|
192
|
+
export declare function computePlatterOffset(navBox: {
|
|
193
|
+
left: number;
|
|
194
|
+
top: number;
|
|
195
|
+
}, anchorBox: {
|
|
196
|
+
left: number;
|
|
197
|
+
top: number;
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
}, navBorder: {
|
|
201
|
+
left: number;
|
|
202
|
+
top: number;
|
|
203
|
+
}): PlatterRect;
|
|
176
204
|
export { BottomTabBar };
|
|
177
205
|
export type { BottomTabBarAction, BottomTabBarFloatingPosition, BottomTabBarItem, BottomTabBarKeyboardBehavior, BottomTabBarProps, };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export type AlertTone = "info" | "success" | "warning" | "caution";
|
|
3
|
+
export type AlertVariant = "inline-info" | "inline-warning" | "inline-caution";
|
|
3
4
|
export interface AlertProps {
|
|
5
|
+
/** Borderless inline presentation, matching the Web Alert variants. Overrides tone. */
|
|
6
|
+
variant?: AlertVariant;
|
|
4
7
|
tone?: AlertTone;
|
|
5
8
|
title?: string;
|
|
6
9
|
description?: string;
|
|
7
10
|
children?: React.ReactNode;
|
|
8
11
|
}
|
|
9
|
-
export declare function Alert({ tone, title, description, children }: AlertProps): React.JSX.Element;
|
|
12
|
+
export declare function Alert({ tone, variant, title, description, children }: AlertProps): React.JSX.Element;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle, type TextProps } from "react-native";
|
|
2
3
|
export interface StatCardProps {
|
|
4
|
+
/** Card surface layout, including stretch within an equal-height row. */
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
/** Minimum label slot height; grows naturally when Dynamic Type needs more space. */
|
|
7
|
+
labelMinHeight?: number;
|
|
8
|
+
/** Reports natural label layout, independently of the label slot minimum. */
|
|
9
|
+
onLabelLayout?: TextProps["onLayout"];
|
|
3
10
|
label: string;
|
|
4
11
|
value: string | number;
|
|
5
12
|
delta?: string;
|
|
6
13
|
trend?: "up" | "down" | "neutral";
|
|
7
14
|
}
|
|
8
|
-
export declare function StatCard({ label, value, delta, trend }: StatCardProps): React.JSX.Element;
|
|
15
|
+
export declare function StatCard({ label, value, delta, trend, style, labelMinHeight, onLabelLayout }: StatCardProps): React.JSX.Element;
|
|
@@ -41,7 +41,7 @@ export { Slider, type SliderProps } from "./Slider";
|
|
|
41
41
|
export { NumberInput, type NumberInputProps } from "./NumberInput";
|
|
42
42
|
export { FormField, type FormFieldProps } from "./FormField";
|
|
43
43
|
export { FormRoot, FormSection, FormActions, type FormRootProps, type FormSectionProps, type FormActionsProps, } from "./Form";
|
|
44
|
-
export { Alert, type AlertProps, type AlertTone } from "./Alert";
|
|
44
|
+
export { Alert, type AlertProps, type AlertTone, type AlertVariant } from "./Alert";
|
|
45
45
|
export { Dialog, type DialogProps, type DialogPosition } from "./Dialog";
|
|
46
46
|
export { Scrim, type ScrimProps, type ScrimAlign } from "./Scrim";
|
|
47
47
|
export { AlertDialog, type AlertDialogProps } from "./AlertDialog";
|
|
@@ -51,3 +51,5 @@ export type ReleaseAction = {
|
|
|
51
51
|
};
|
|
52
52
|
/** 指を離した時の着地先。close は dismissible のときだけ返す。 */
|
|
53
53
|
export declare function resolveRelease(startTY: number, dy: number, startActive: number, config: SnapGestureConfig): ReleaseAction;
|
|
54
|
+
/** The dedicated handle is draggable even when body content is scrolled. */
|
|
55
|
+
export declare function shouldStartHandleDrag(animating: boolean, keyboardReducedViewport: boolean): boolean;
|
|
@@ -72,6 +72,8 @@ export declare const themes: {
|
|
|
72
72
|
readonly line: "#06C755";
|
|
73
73
|
readonly "google-border": "#DADCE0";
|
|
74
74
|
readonly apple: "#000000";
|
|
75
|
+
readonly "apple-surface": "#000000";
|
|
76
|
+
readonly "on-apple": "#FFFFFF";
|
|
75
77
|
readonly amazon: "#232F3E";
|
|
76
78
|
};
|
|
77
79
|
readonly hover: {
|
|
@@ -178,6 +180,8 @@ export declare const themes: {
|
|
|
178
180
|
readonly action: "#93C5FD";
|
|
179
181
|
readonly light: "#1E3A8A";
|
|
180
182
|
readonly "ultra-light": "#1E3A8A";
|
|
183
|
+
readonly "apple-surface": "#FFFFFF";
|
|
184
|
+
readonly "on-apple": "#000000";
|
|
181
185
|
};
|
|
182
186
|
readonly hover: {
|
|
183
187
|
readonly "primary-button": "#3B82F6";
|
|
@@ -288,6 +292,8 @@ export declare const themes: {
|
|
|
288
292
|
readonly line: "#06C755";
|
|
289
293
|
readonly "google-border": "#DADCE0";
|
|
290
294
|
readonly apple: "#000000";
|
|
295
|
+
readonly "apple-surface": "#000000";
|
|
296
|
+
readonly "on-apple": "#FFFFFF";
|
|
291
297
|
readonly amazon: "#232F3E";
|
|
292
298
|
};
|
|
293
299
|
readonly hover: {
|
|
@@ -394,6 +400,8 @@ export declare const themes: {
|
|
|
394
400
|
readonly action: "#93C5FD";
|
|
395
401
|
readonly light: "#1E3A8A";
|
|
396
402
|
readonly "ultra-light": "#1E3A8A";
|
|
403
|
+
readonly "apple-surface": "#FFFFFF";
|
|
404
|
+
readonly "on-apple": "#000000";
|
|
397
405
|
};
|
|
398
406
|
readonly hover: {
|
|
399
407
|
readonly "primary-button": "#3B82F6";
|
|
@@ -504,6 +512,8 @@ export declare const themes: {
|
|
|
504
512
|
readonly line: "#06C755";
|
|
505
513
|
readonly "google-border": "#DADCE0";
|
|
506
514
|
readonly apple: "#000000";
|
|
515
|
+
readonly "apple-surface": "#000000";
|
|
516
|
+
readonly "on-apple": "#FFFFFF";
|
|
507
517
|
readonly amazon: "#232F3E";
|
|
508
518
|
};
|
|
509
519
|
readonly hover: {
|
|
@@ -610,6 +620,8 @@ export declare const themes: {
|
|
|
610
620
|
readonly action: "#7FAAFB";
|
|
611
621
|
readonly light: "#03155A";
|
|
612
622
|
readonly "ultra-light": "#03155A";
|
|
623
|
+
readonly "apple-surface": "#FFFFFF";
|
|
624
|
+
readonly "on-apple": "#000000";
|
|
613
625
|
};
|
|
614
626
|
readonly hover: {
|
|
615
627
|
readonly "primary-button": "#2053F5";
|
|
@@ -720,6 +732,8 @@ export declare const themes: {
|
|
|
720
732
|
readonly line: "#06C755";
|
|
721
733
|
readonly "google-border": "#DADCE0";
|
|
722
734
|
readonly apple: "#000000";
|
|
735
|
+
readonly "apple-surface": "#000000";
|
|
736
|
+
readonly "on-apple": "#FFFFFF";
|
|
723
737
|
readonly amazon: "#232F3E";
|
|
724
738
|
};
|
|
725
739
|
readonly hover: {
|
|
@@ -826,6 +840,8 @@ export declare const themes: {
|
|
|
826
840
|
readonly action: "#FDBA74";
|
|
827
841
|
readonly light: "#431407";
|
|
828
842
|
readonly "ultra-light": "#431407";
|
|
843
|
+
readonly "apple-surface": "#FFFFFF";
|
|
844
|
+
readonly "on-apple": "#000000";
|
|
829
845
|
};
|
|
830
846
|
readonly hover: {
|
|
831
847
|
readonly "primary-button": "#F97316";
|
|
@@ -936,6 +952,8 @@ export declare const themes: {
|
|
|
936
952
|
readonly line: "#06C755";
|
|
937
953
|
readonly "google-border": "#DADCE0";
|
|
938
954
|
readonly apple: "#000000";
|
|
955
|
+
readonly "apple-surface": "#000000";
|
|
956
|
+
readonly "on-apple": "#FFFFFF";
|
|
939
957
|
readonly amazon: "#232F3E";
|
|
940
958
|
};
|
|
941
959
|
readonly hover: {
|
|
@@ -1042,6 +1060,8 @@ export declare const themes: {
|
|
|
1042
1060
|
readonly action: "#86EFAC";
|
|
1043
1061
|
readonly light: "#052E16";
|
|
1044
1062
|
readonly "ultra-light": "#052E16";
|
|
1063
|
+
readonly "apple-surface": "#FFFFFF";
|
|
1064
|
+
readonly "on-apple": "#000000";
|
|
1045
1065
|
};
|
|
1046
1066
|
readonly hover: {
|
|
1047
1067
|
readonly "primary-button": "#16A34A";
|
|
@@ -1152,6 +1172,8 @@ export declare const themes: {
|
|
|
1152
1172
|
readonly line: "#06C755";
|
|
1153
1173
|
readonly "google-border": "#DADCE0";
|
|
1154
1174
|
readonly apple: "#000000";
|
|
1175
|
+
readonly "apple-surface": "#000000";
|
|
1176
|
+
readonly "on-apple": "#FFFFFF";
|
|
1155
1177
|
readonly amazon: "#232F3E";
|
|
1156
1178
|
};
|
|
1157
1179
|
readonly hover: {
|
|
@@ -1258,6 +1280,8 @@ export declare const themes: {
|
|
|
1258
1280
|
readonly action: "#C4B5FD";
|
|
1259
1281
|
readonly light: "#3B0764";
|
|
1260
1282
|
readonly "ultra-light": "#3B0764";
|
|
1283
|
+
readonly "apple-surface": "#FFFFFF";
|
|
1284
|
+
readonly "on-apple": "#000000";
|
|
1261
1285
|
};
|
|
1262
1286
|
readonly hover: {
|
|
1263
1287
|
readonly "primary-button": "#7C3AED";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ksk-design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "KSK Design System — フリーランス向けマルチテーマ対応デザインシステム",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"CLAUDE.md",
|
|
27
27
|
"DESIGN.md",
|
|
28
28
|
"src/preset.css",
|
|
29
|
+
"src/preset-core.css",
|
|
29
30
|
"src/styles",
|
|
30
31
|
"src/themes",
|
|
31
32
|
"src/components/COMPONENT_LOOKUP.md",
|
|
@@ -65,6 +66,14 @@
|
|
|
65
66
|
"import": "./src/preset.css",
|
|
66
67
|
"default": "./src/preset.css"
|
|
67
68
|
},
|
|
69
|
+
"./preset-core": {
|
|
70
|
+
"import": "./src/preset-core.css",
|
|
71
|
+
"default": "./src/preset-core.css"
|
|
72
|
+
},
|
|
73
|
+
"./safelist": {
|
|
74
|
+
"import": "./src/styles/source-safelist.css",
|
|
75
|
+
"default": "./src/styles/source-safelist.css"
|
|
76
|
+
},
|
|
68
77
|
"./styles": {
|
|
69
78
|
"import": "./src/preset.css",
|
|
70
79
|
"default": "./src/preset.css"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
| Slider | `@/components/ui/slider` | — | Default, Range, WithLabel, Range — 最小値/最大値を別々にラベル付け, Disabled |
|
|
70
70
|
| SOCIAL_ICON_LABELS, SOCIAL_ICON_DATA, SOCIAL_ICON_PLATFORMS | `@/components/ui/social-icon-data` | — | — |
|
|
71
71
|
| SocialIcon, SOCIAL_ICON_PLATFORMS, SOCIAL_ICON_LABELS | `@/components/ui/social-icon` | — | Default, AllPlatforms, AllMono, Tones |
|
|
72
|
-
| SocialLoginButton | `@/components/ui/social-login-button` | — | Line, Google, Apple, Amazon, AllProviders, Loading |
|
|
72
|
+
| SocialLoginButton | `@/components/ui/social-login-button` | — | Line, Google, Apple, Amazon, AllProviders, LightAndDark, Loading |
|
|
73
73
|
| Spinner | `@/components/ui/spinner` | — | Default, AllSizes |
|
|
74
74
|
| StarRating | `@/components/ui/star-rating` | — | Interactive, AllowClear, ReadOnly, Sizes |
|
|
75
75
|
| StatusActionBadge, SyncStatusButton | `@/components/ui/status-action-badge` | — | AllStates, Actionable, Compact |
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/* =============================================================
|
|
2
|
+
KSK Design System — Preset Core CSS
|
|
3
|
+
|
|
4
|
+
preset から「DS 部品用の safelist(styles/source-safelist.css)」だけを
|
|
5
|
+
除いたもの。トークン・shadcn 互換ブリッジ・アニメーション・
|
|
6
|
+
container 幅・scrollbar-hide・base layer の保険はすべて含む。
|
|
7
|
+
|
|
8
|
+
使い方(DS 部品を使わないページだけの consumer):
|
|
9
|
+
@import "tailwindcss";
|
|
10
|
+
@import "ksk-design-system/preset-core";
|
|
11
|
+
@import "ksk-design-system/themes/default";
|
|
12
|
+
|
|
13
|
+
DS 部品(Button 等)を使う consumer は従来どおり
|
|
14
|
+
`ksk-design-system/preset`(= preset-core + safelist)を使うこと。
|
|
15
|
+
safelist が無いと、DS 部品内部でしか使わないユーティリティは
|
|
16
|
+
consumer の @source が DS の dist を走査したときにしか生成されない。
|
|
17
|
+
|
|
18
|
+
preset.css はこのファイルと safelist を読み込むだけの薄い入口。
|
|
19
|
+
トークンや base layer を足すときはこのファイルに書く。
|
|
20
|
+
============================================================= */
|
|
21
|
+
|
|
22
|
+
@import "./styles/primitive.css";
|
|
23
|
+
/* 角丸の意味別トークン(issue #553)。定義元は styles/radius.css の1箇所で、
|
|
24
|
+
product-theme.css からも読み込まれる(個別 subpath 構成の消費側対策)。 */
|
|
25
|
+
@import "./styles/radius.css";
|
|
26
|
+
/* ページセクション間の縦リズム(issue #560)。定義元は
|
|
27
|
+
styles/section-spacing.css の1箇所で、product-theme.css からも読み込まれる
|
|
28
|
+
(個別 subpath 構成の消費側対策)。 */
|
|
29
|
+
@import "./styles/section-spacing.css";
|
|
30
|
+
/* 重なり順(issue #563)。定義元は styles/z-index.css の1箇所で、
|
|
31
|
+
product-theme.css からも読み込まれる(個別 subpath 構成の消費側対策)。 */
|
|
32
|
+
@import "./styles/z-index.css";
|
|
33
|
+
/* 影(issue #563)。定義元は styles/shadow.css の1箇所で、
|
|
34
|
+
product-theme.css からも読み込まれる(個別 subpath 構成の消費側対策)。 */
|
|
35
|
+
@import "./styles/shadow.css";
|
|
36
|
+
@import "./styles/semantic.css";
|
|
37
|
+
@import "./styles/categorical.css";
|
|
38
|
+
@import "./styles/typography.css";
|
|
39
|
+
@import "./styles/glass.css";
|
|
40
|
+
@import "./styles/bottom-nav.css";
|
|
41
|
+
@import "./styles/motion.css";
|
|
42
|
+
@import "./styles/sheet-keyboard.css";
|
|
43
|
+
/* プロダクト単位で上書きしてよい寸法・面の公開変数(issue #364)。
|
|
44
|
+
許可リストの正本は contracts/product-theme-overrides.json。 */
|
|
45
|
+
@import "./styles/product-theme.css";
|
|
46
|
+
|
|
47
|
+
/* ─── Bridge Layer: shadcn/ui 互換マッピング ───
|
|
48
|
+
|
|
49
|
+
命名が 2 系統あるのは意図的な設計。統一しない。
|
|
50
|
+
|
|
51
|
+
- `--Surface-Primary` のような **PascalCase-ケバブ** は KSK の semantic 層。
|
|
52
|
+
UI を書くときに参照するのは常にこちら(CLAUDE.md のセルフチェック参照)。
|
|
53
|
+
- `--primary` / `--muted-foreground` のような **小文字ケバブ** は shadcn/ui
|
|
54
|
+
(および Radix ベースの外部コンポーネント)が決め打ちで参照する名前。
|
|
55
|
+
shadcn の CLI で追加したコンポーネントや、consumer が別途入れた
|
|
56
|
+
shadcn 資産をそのまま動かすための互換レイヤーであり、名前は
|
|
57
|
+
shadcn 側の仕様なので KSK 側では変えられない。
|
|
58
|
+
|
|
59
|
+
つまり小文字ケバブ側は「外部規約への適合」であって命名の揺れではない。
|
|
60
|
+
新しいトークンを増やすときは PascalCase 側(semantic.css)に足し、
|
|
61
|
+
shadcn 互換名が必要な場合だけここで var() でエイリアスすること。 */
|
|
62
|
+
:root {
|
|
63
|
+
--radius: 0.5rem;
|
|
64
|
+
|
|
65
|
+
--background: var(--Surface-Primary);
|
|
66
|
+
--foreground: var(--Text-High-Emphasis);
|
|
67
|
+
|
|
68
|
+
--card: var(--Surface-Primary);
|
|
69
|
+
--card-foreground: var(--Text-High-Emphasis);
|
|
70
|
+
|
|
71
|
+
--popover: var(--Surface-Primary);
|
|
72
|
+
--popover-foreground: var(--Text-High-Emphasis);
|
|
73
|
+
|
|
74
|
+
--primary: var(--Brand-Primary);
|
|
75
|
+
--primary-foreground: var(--Text-on-Inverse);
|
|
76
|
+
|
|
77
|
+
--secondary: var(--Surface-Secondary);
|
|
78
|
+
--secondary-foreground: var(--Text-High-Emphasis);
|
|
79
|
+
|
|
80
|
+
--muted: var(--Surface-Tertiary);
|
|
81
|
+
--muted-foreground: var(--Text-Low-Emphasis);
|
|
82
|
+
|
|
83
|
+
--accent: var(--Surface-Secondary);
|
|
84
|
+
--accent-foreground: var(--Text-High-Emphasis);
|
|
85
|
+
|
|
86
|
+
--destructive: var(--Caution-Base);
|
|
87
|
+
--destructive-foreground: var(--Text-on-Inverse);
|
|
88
|
+
|
|
89
|
+
--border: var(--Border-Medium-Emphasis);
|
|
90
|
+
--input: var(--Border-Medium-Emphasis);
|
|
91
|
+
--ring: var(--Focus-High-Emphasis);
|
|
92
|
+
|
|
93
|
+
--sidebar-background: var(--Surface-Primary);
|
|
94
|
+
--sidebar-foreground: var(--Text-High-Emphasis);
|
|
95
|
+
--sidebar-primary: var(--Brand-Primary);
|
|
96
|
+
--sidebar-primary-foreground: var(--Text-on-Inverse);
|
|
97
|
+
--sidebar-accent: var(--Surface-Accent-Primary-Light);
|
|
98
|
+
--sidebar-accent-foreground: var(--Text-Accent-Primary);
|
|
99
|
+
--sidebar-border: var(--Border-Low-Emphasis);
|
|
100
|
+
--sidebar-ring: var(--Focus-High-Emphasis);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.dark {
|
|
104
|
+
--background: var(--Surface-Primary);
|
|
105
|
+
--foreground: var(--Text-High-Emphasis);
|
|
106
|
+
--card: var(--Surface-Secondary);
|
|
107
|
+
--card-foreground: var(--Text-High-Emphasis);
|
|
108
|
+
--popover: var(--Surface-Secondary);
|
|
109
|
+
--popover-foreground: var(--Text-High-Emphasis);
|
|
110
|
+
--primary: var(--Brand-Primary);
|
|
111
|
+
--primary-foreground: var(--Text-on-Inverse);
|
|
112
|
+
--secondary: var(--Surface-Tertiary);
|
|
113
|
+
--secondary-foreground: var(--Text-High-Emphasis);
|
|
114
|
+
--muted: var(--Surface-Tertiary);
|
|
115
|
+
--muted-foreground: var(--Text-Low-Emphasis);
|
|
116
|
+
--accent: var(--Surface-Tertiary);
|
|
117
|
+
--accent-foreground: var(--Text-High-Emphasis);
|
|
118
|
+
--destructive: var(--Caution-Base);
|
|
119
|
+
--destructive-foreground: var(--Text-on-Inverse);
|
|
120
|
+
--border: var(--Border-Medium-Emphasis);
|
|
121
|
+
--input: var(--Border-Medium-Emphasis);
|
|
122
|
+
--ring: var(--Focus-High-Emphasis);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ─── Radius Tokens ───
|
|
126
|
+
定義はこのファイルから styles/radius.css へ切り出した(issue #553)。
|
|
127
|
+
ファイル先頭の @import 群で読み込んでいる。 */
|
|
128
|
+
|
|
129
|
+
/* ─── Section Spacing Tokens ───
|
|
130
|
+
定義はこのファイルから styles/section-spacing.css へ切り出した(issue #560)。
|
|
131
|
+
ファイル先頭の @import 群で読み込んでいる。 */
|
|
132
|
+
|
|
133
|
+
/* ─── Z-Index Scale ───
|
|
134
|
+
定義はこのファイルから styles/z-index.css へ切り出した(issue #563)。
|
|
135
|
+
ファイル先頭の @import 群で読み込んでいる。 */
|
|
136
|
+
|
|
137
|
+
/* ─── Shadow Tokens ───
|
|
138
|
+
定義はこのファイルから styles/shadow.css へ切り出した(issue #563)。
|
|
139
|
+
ファイル先頭の @import 群で読み込んでいる。 */
|
|
140
|
+
|
|
141
|
+
/* ─── Animation ─── */
|
|
142
|
+
@keyframes slide-in-right {
|
|
143
|
+
from { transform: translateX(100%); opacity: 0; }
|
|
144
|
+
to { transform: translateX(0); opacity: 1; }
|
|
145
|
+
}
|
|
146
|
+
@keyframes slide-in-left {
|
|
147
|
+
from { transform: translateX(-100%); opacity: 0; }
|
|
148
|
+
to { transform: translateX(0); opacity: 1; }
|
|
149
|
+
}
|
|
150
|
+
@keyframes fade-in {
|
|
151
|
+
from { opacity: 0; }
|
|
152
|
+
to { opacity: 1; }
|
|
153
|
+
}
|
|
154
|
+
@keyframes fade-in-up {
|
|
155
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
156
|
+
to { opacity: 1; transform: translateY(0); }
|
|
157
|
+
}
|
|
158
|
+
@keyframes scale-in {
|
|
159
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
160
|
+
to { opacity: 1; transform: scale(1); }
|
|
161
|
+
}
|
|
162
|
+
@keyframes celebration-confetti-fall {
|
|
163
|
+
from {
|
|
164
|
+
opacity: 1;
|
|
165
|
+
transform: translate3d(0, -16px, 0) rotate(0deg);
|
|
166
|
+
}
|
|
167
|
+
to {
|
|
168
|
+
opacity: 0;
|
|
169
|
+
transform: translate3d(var(--celebration-drift, 0), 110vh, 0) rotate(var(--celebration-rotate, 360deg));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
@keyframes celebration-confetti-burst {
|
|
173
|
+
0% {
|
|
174
|
+
opacity: 1;
|
|
175
|
+
transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7);
|
|
176
|
+
}
|
|
177
|
+
60% {
|
|
178
|
+
opacity: 1;
|
|
179
|
+
transform: translate3d(var(--celebration-burst-mid-x, 0), var(--celebration-burst-mid-y, 0), 0)
|
|
180
|
+
rotate(calc(var(--celebration-rotate, 360deg) * 0.75)) scale(1);
|
|
181
|
+
}
|
|
182
|
+
80% {
|
|
183
|
+
opacity: 0.9;
|
|
184
|
+
}
|
|
185
|
+
100% {
|
|
186
|
+
opacity: 0;
|
|
187
|
+
transform: translate3d(var(--celebration-burst-x, 0), var(--celebration-burst-y, 0), 0)
|
|
188
|
+
rotate(var(--celebration-rotate, 360deg)) scale(1);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
@keyframes celebration-pop {
|
|
192
|
+
from { opacity: 0; transform: translateY(8px) scale(0.94); }
|
|
193
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
194
|
+
}
|
|
195
|
+
@keyframes celebration-emoji-pop {
|
|
196
|
+
0% { transform: scale(0); }
|
|
197
|
+
50% { transform: scale(1.4); }
|
|
198
|
+
70% { transform: scale(0.9); }
|
|
199
|
+
100% { transform: scale(1); }
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@theme inline {
|
|
203
|
+
/* duration / easing は src/styles/motion.css のトークンを参照する
|
|
204
|
+
(値は従来どおり slide/fade-up=200ms・fade/scale=150ms の ease-out)。 */
|
|
205
|
+
--animate-slide-in-right: slide-in-right var(--Motion-Duration-Base) var(--Motion-Easing-Standard);
|
|
206
|
+
--animate-slide-in-left: slide-in-left var(--Motion-Duration-Base) var(--Motion-Easing-Standard);
|
|
207
|
+
--animate-fade-in: fade-in var(--Motion-Duration-Fast) var(--Motion-Easing-Standard);
|
|
208
|
+
--animate-fade-in-up: fade-in-up var(--Motion-Duration-Base) var(--Motion-Easing-Standard);
|
|
209
|
+
--animate-scale-in: scale-in var(--Motion-Duration-Fast) var(--Motion-Easing-Standard);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* ─── Container Query Breakpoints ───
|
|
213
|
+
@sm: / @md: などは viewport の sm: / md: と別スケール。
|
|
214
|
+
tokens.json の breakpoints.container と同じ値を publish 側にも固定し、
|
|
215
|
+
Tailwind の既定値変更や consumer 側設定に依存させない。 */
|
|
216
|
+
@theme {
|
|
217
|
+
--container-sm: 24rem; /* 384px */
|
|
218
|
+
--container-md: 28rem; /* 448px */
|
|
219
|
+
--container-xl: 36rem; /* 576px */
|
|
220
|
+
--container-2xl: 42rem; /* 672px */
|
|
221
|
+
--container-3xl: 48rem; /* 768px */
|
|
222
|
+
--container-4xl: 56rem; /* 896px */
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* ─── Scrollbar Hide Utility ─── */
|
|
226
|
+
@utility scrollbar-hide {
|
|
227
|
+
-ms-overflow-style: none;
|
|
228
|
+
scrollbar-width: none;
|
|
229
|
+
&::-webkit-scrollbar {
|
|
230
|
+
display: none;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* ─── Base Layer: ボーダー / アウトライン色のセーフティネット ───
|
|
235
|
+
Tailwind CSS v4 の破壊的変更で、border / outline の既定色は
|
|
236
|
+
gray-200 ではなく `currentColor`(=要素の文字色)になった。
|
|
237
|
+
そのため `border` `border-b` のように「幅だけで色を指定しない」
|
|
238
|
+
クラスは、消費側が親に濃い文字色(例: --Text-High-Emphasis = #1C1A1A)
|
|
239
|
+
を敷くと枠線が黒ずむ。これを防ぐため、shadcn / 多くの DS と同じく
|
|
240
|
+
全要素のフォールバック色をテーマ追従の --border / --ring に固定する。
|
|
241
|
+
|
|
242
|
+
※ これは「保険」。コンポーネント側は引き続き
|
|
243
|
+
border-[var(--Border-Low-Emphasis)] のように明示色を指定すること
|
|
244
|
+
(明示色を持つ要素は utilities レイヤが base を上書きするため不変)。 */
|
|
245
|
+
@layer base {
|
|
246
|
+
*,
|
|
247
|
+
::after,
|
|
248
|
+
::before {
|
|
249
|
+
border-color: var(--border);
|
|
250
|
+
outline-color: var(--ring);
|
|
251
|
+
}
|
|
252
|
+
}
|