@cakejp/design-system 0.22.1 → 0.23.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/CHANGELOG.md +82 -0
- package/CLAUDE.md +3 -1
- package/MIGRATION.md +43 -0
- package/UPDATING.md +1 -1
- package/bin/check-tokens.mjs +20 -0
- package/contracts/components.json +87 -25
- package/contracts/composition.json +9 -9
- package/contracts/rules.json +1 -1
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/admin-shell.js +7 -7
- package/dist/components/ec/anniversary-card.js +1 -1
- package/dist/components/ec/chart-controls.js +7 -7
- package/dist/components/ec/coupon-card.js +10 -10
- package/dist/components/ec/delivery-calendar.js +1 -1
- package/dist/components/ec/mypage-shell.js +1 -1
- package/dist/components/ec/order-section.js +1 -1
- package/dist/components/ec/order-summary.js +7 -5
- package/dist/components/ec/product-card.js +32 -30
- package/dist/components/ec/product-detail-sidebar.js +1 -1
- package/dist/components/ec/product-list-item.js +57 -56
- package/dist/components/ec/product-option.js +30 -30
- package/dist/components/ec/review-summary.js +1 -1
- package/dist/components/ec/shop-card.js +7 -7
- package/dist/components/foundations/accordion.js +1 -1
- package/dist/components/foundations/alert-dialog.js +65 -43
- package/dist/components/foundations/alert.js +74 -68
- package/dist/components/foundations/badge.js +4 -4
- package/dist/components/foundations/button.js +15 -15
- package/dist/components/foundations/checkbox-card.js +18 -18
- package/dist/components/foundations/checkbox.js +6 -6
- package/dist/components/foundations/chip-variants.js +8 -8
- package/dist/components/foundations/data-table.js +244 -209
- package/dist/components/foundations/dialog.js +84 -60
- package/dist/components/foundations/drawer.js +61 -53
- package/dist/components/foundations/field.js +51 -35
- package/dist/components/foundations/file-input.js +1 -1
- package/dist/components/foundations/input.js +9 -8
- package/dist/components/foundations/popover.js +15 -12
- package/dist/components/foundations/progress.js +19 -18
- package/dist/components/foundations/radio-group.js +26 -23
- package/dist/components/foundations/select.js +9 -8
- package/dist/components/foundations/sheet.js +82 -59
- package/dist/components/foundations/skeleton.js +6 -6
- package/dist/components/foundations/slider.js +7 -7
- package/dist/components/foundations/sonner.js +9 -8
- package/dist/components/foundations/switch.js +3 -2
- package/dist/components/foundations/tabs.js +5 -5
- package/dist/components/foundations/textarea.js +7 -6
- package/dist/components/foundations/toggle-group.js +5 -5
- package/dist/components/primitives/admin-header.js +3 -3
- package/dist/components/primitives/admin-side-nav.js +101 -92
- package/dist/components/primitives/category-shortcuts.js +6 -6
- package/dist/components/primitives/chat-composer.js +1 -1
- package/dist/components/primitives/chip.js +25 -25
- package/dist/components/primitives/combobox.js +74 -63
- package/dist/components/primitives/content-carousel.js +64 -62
- package/dist/components/primitives/date-picker.js +99 -96
- package/dist/components/primitives/error-state.js +9 -9
- package/dist/components/primitives/filter-bar.js +4 -4
- package/dist/components/primitives/footer.js +1 -1
- package/dist/components/primitives/form-field.js +8 -8
- package/dist/components/primitives/funnel-shell.js +5 -5
- package/dist/components/primitives/header.js +16 -16
- package/dist/components/primitives/image-carousel.js +42 -41
- package/dist/components/primitives/image-gallery.js +61 -58
- package/dist/components/primitives/image-input.js +2 -2
- package/dist/components/primitives/image-uploader.js +1 -1
- package/dist/components/primitives/kebab-menu.js +20 -16
- package/dist/components/primitives/list-item.js +17 -17
- package/dist/components/primitives/menu-drawer.js +11 -11
- package/dist/components/primitives/multi-select.js +66 -66
- package/dist/components/primitives/notification-list.js +13 -13
- package/dist/components/primitives/number-input.js +118 -112
- package/dist/components/primitives/progress-steps.js +3 -3
- package/dist/components/primitives/search-bar.js +6 -6
- package/dist/components/primitives/section-nav.js +1 -1
- package/dist/components/primitives/side-nav.js +1 -1
- package/dist/components/primitives/sub-nav.js +12 -12
- package/dist/components/primitives/tag.js +3 -3
- package/dist/components/primitives/workspace-shell.js +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +1479 -704
- package/dist/lib/focus-restore.js +67 -0
- package/dist/lib/focus-ring.js +1 -1
- package/dist/lib/ime.js +17 -0
- package/dist/lib/search-normalize.js +30 -0
- package/dist/types/components/ec/admin-shell.d.ts +1 -1
- package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
- package/dist/types/components/foundations/alert.d.ts +14 -1
- package/dist/types/components/foundations/card.d.ts +3 -3
- package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
- package/dist/types/components/foundations/data-table.d.ts +1 -1
- package/dist/types/components/foundations/dialog.d.ts +2 -2
- package/dist/types/components/foundations/drawer.d.ts +1 -1
- package/dist/types/components/foundations/field.d.ts +23 -3
- package/dist/types/components/foundations/popover.d.ts +1 -1
- package/dist/types/components/foundations/sheet.d.ts +4 -3
- package/dist/types/components/foundations/sonner.d.ts +3 -2
- package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
- package/dist/types/components/primitives/combobox.d.ts +6 -0
- package/dist/types/components/primitives/date-picker.d.ts +8 -3
- package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
- package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
- package/dist/types/components/primitives/number-input.d.ts +20 -1
- package/dist/types/components/primitives/progress-steps.d.ts +1 -1
- package/dist/types/components/primitives/section.d.ts +1 -1
- package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
- package/dist/types/index.d.ts +3 -4
- package/dist/types/lib/focus-restore.d.ts +52 -0
- package/dist/types/lib/focus-ring.d.ts +3 -0
- package/dist/types/lib/ime.d.ts +36 -0
- package/dist/types/lib/search-normalize.d.ts +28 -0
- package/package.json +3 -1
- package/src/components/COMPONENT_LOOKUP.md +12 -12
- package/src/preset-standalone.css +43 -21
- package/src/preset.css +36 -18
- package/src/styles/primitive.css +1 -0
- package/src/styles/semantic.css +12 -2
- package/tokens.json +22 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 日本語入力(IME)の変換中に押されたキーを見分けるための判定。
|
|
3
|
+
*
|
|
4
|
+
* 判定は 2 段構え:
|
|
5
|
+
* 1. `isComposing` — 標準。Chrome / Firefox はこれで足りる
|
|
6
|
+
* 2. `keyCode === 229` — Safari(WebKit)は変換を終えるキーの keydown を compositionend の
|
|
7
|
+
* 後に出すため、その keydown では `isComposing` が false になる。代わりに keyCode が
|
|
8
|
+
* 229("process" キー)になるので、それも変換中として扱う。一部の Android WebView も
|
|
9
|
+
* `isComposing` を立てずに 229 だけを送る
|
|
10
|
+
*/
|
|
11
|
+
/** 判定に必要な最小限の形(React.KeyboardEvent と DOM の KeyboardEvent の両方を受ける)。 */
|
|
12
|
+
export interface ImeKeyEventLike {
|
|
13
|
+
nativeEvent?: {
|
|
14
|
+
isComposing?: boolean;
|
|
15
|
+
keyCode?: number;
|
|
16
|
+
};
|
|
17
|
+
isComposing?: boolean;
|
|
18
|
+
keyCode?: number;
|
|
19
|
+
}
|
|
20
|
+
/** 変換中の keydown なら true。 */
|
|
21
|
+
export declare function isImeComposing(event: ImeKeyEventLike): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* オーバーレイ(Dialog / Sheet / AlertDialog / Drawer / Popover)の `onEscapeKeyDown` で使う。
|
|
24
|
+
* 変換中の Esc(変換の取り消し)なら `preventDefault()` して true を返す。
|
|
25
|
+
*
|
|
26
|
+
* Radix の DismissableLayer は `key === "Escape"` だけを見て閉じるため、変換を取り消すつもりの
|
|
27
|
+
* Esc で入力中のダイアログやシートごと閉じ、入力した内容が消えていた。preventDefault すると
|
|
28
|
+
* Radix は閉じない。変換していないときの Esc は従来どおり閉じる。
|
|
29
|
+
* consumer の `onEscapeKeyDown` を先に呼んでから、このガードを呼ぶこと。
|
|
30
|
+
*/
|
|
31
|
+
export declare function guardEscapeDuringIme(event: Pick<Event, "preventDefault"> & ImeKeyEventLike): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* consumer の `onEscapeKeyDown` を先に呼び、そのあと変換中の Esc を止めるハンドラーを作る。
|
|
34
|
+
* Content 部品の `onEscapeKeyDown` にそのまま渡す。
|
|
35
|
+
*/
|
|
36
|
+
export declare function composeEscapeKeyDownWithImeGuard(handler: ((event: KeyboardEvent) => void) | undefined): (event: KeyboardEvent) => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## 絞り込み検索の表記ゆれ吸収(Combobox 等)
|
|
3
|
+
*
|
|
4
|
+
* 日本語の候補を部分一致で絞り込むとき、次の違いを同じとみなす:
|
|
5
|
+
* - 大文字 / 小文字(`Tokyo` / `tokyo`)
|
|
6
|
+
* - 全角 / 半角(NFKC。`ABC` / `ABC`、`シブヤ` / `シブヤ`)
|
|
7
|
+
* - ひらがな / カタカナ(`しぶや` / `シブヤ`)
|
|
8
|
+
* - 漢字に挟まれた「ヶ / ケ / ヵ / が」(`市ヶ谷` / `市ケ谷`、`霞が関` / `霞ケ関`)
|
|
9
|
+
*
|
|
10
|
+
* 「ヶ」系の同一視は漢字に挟まれたときだけに限る(`ケーキ` が `がーき` に当たらないように)。
|
|
11
|
+
* 姉妹 DS(KSK #853)の Combobox の既定の絞り込みを移植したもの。
|
|
12
|
+
*/
|
|
13
|
+
/** 文脈に依らない正規化: NFKC(全角半角)→ 小文字 → カタカナをひらがなへ */
|
|
14
|
+
declare function normalizeSearchText(text: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* 表記ゆれ用の正規化。{@link normalizeSearchText} 済みの文字列について、漢字に挟まれた
|
|
17
|
+
* 「ヶ / ケ / ヵ / が」を同じ字にする。直後が文字列の終わりでも同一視する(「市ヶ」まで打った途中でも
|
|
18
|
+
* 当たるように)。`isQuery` のときは先頭の直前を漢字とみなす(「ヶ谷」と打っても候補の「漢字 + ケ」に当たるように)。
|
|
19
|
+
*/
|
|
20
|
+
declare function normalizeKeVariants(normalized: string, isQuery: boolean): string;
|
|
21
|
+
/**
|
|
22
|
+
* 候補(ラベル・別名)のどれかが検索語を部分一致で含むか。
|
|
23
|
+
* 素の正規化での部分一致、または「ヶ」系もそろえた正規化での部分一致のどちらかで当てる
|
|
24
|
+
* (同一視は「追加で当てる」だけにし、`ケ谷` → `市ケ谷` のような素の一致を落とさない)。
|
|
25
|
+
* 検索語が空白だけのときは全件に当たる。
|
|
26
|
+
*/
|
|
27
|
+
declare function matchesSearch(candidates: ReadonlyArray<string | undefined>, query: string): boolean;
|
|
28
|
+
export { normalizeSearchText, normalizeKeVariants, matchesSearch };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cakejp/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cake.jp Design System — UI コンポーネント・カラートークン・タイポグラフィ",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
"generate:lint-rules": "node scripts/generate-lint-rules.mjs",
|
|
97
97
|
"generate:lookup": "node scripts/generate-component-lookup.mjs",
|
|
98
98
|
"lint:contrast": "node scripts/check-contrast.mjs",
|
|
99
|
+
"check:bundle": "node scripts/check-bundle-size.mjs",
|
|
99
100
|
"lint:css-vars": "node scripts/check-css-vars.mjs",
|
|
100
101
|
"lint:vrt-baselines": "node scripts/check-vrt-baselines.mjs",
|
|
101
102
|
"check": "tsc --noEmit -p tsconfig.app.json && npm run typecheck:stories && bash scripts/check-deps.sh && bash scripts/check-drift.sh && bash scripts/check-docs-drift.sh && bash scripts/lint-scratch.sh && bash scripts/check-story-reuse.sh && bash scripts/check-responsive.sh && node scripts/check-border-color.mjs && node scripts/check-css-vars.mjs && npm run lint:contrast && bash scripts/lint-scratch.sh --components && bash scripts/check-generated-drift.sh && bash scripts/check-agents-mirror.sh && node scripts/check-vrt-baselines.mjs",
|
|
@@ -164,6 +165,7 @@
|
|
|
164
165
|
"@xyflow/react": "^12.10.1",
|
|
165
166
|
"cmdk": "^1.1.1",
|
|
166
167
|
"date-fns": "^4.1.0",
|
|
168
|
+
"esbuild": "^0.27.4",
|
|
167
169
|
"eslint": "^9.39.1",
|
|
168
170
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
169
171
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
|-----------|--------|----------|---------|
|
|
14
14
|
| Accordion, AccordionItem, AccordionTrigger, AccordionContent | `@/components/foundations/accordion` | — | Default(単一展開), 複数展開, 商品ページFAQ例, interaction: 単一展開の排他と折りたたみ |
|
|
15
15
|
| AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger | `@/components/foundations/alert-dialog` | — | Default, 破壊的操作(アカウント削除), コンパクトサイズ |
|
|
16
|
-
| Alert, AlertTitle, AlertDescription | `@/components/foundations/alert` | **variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`<br>**variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning` | Success(成功), Info(お知らせ), Error(エラー), Warning(注意), Inline Info(インライン情報), Inline Caution(インラインエラー), Inline Warning(インライン警告), Prop-based Warning(旧 Banner 相当), Prop-based Error(エラー), Prop-based Info(お知らせ), Prop-based Success(成功), Prop-based with Action(アクション付き), Prop-based Inline Info(インライン情報), Prop-based Inline Caution(インラインエラー), Prop-based Inline Warning(インライン警告), Info + ボタン, Error(複数メッセージ), 全 Bordered バリアント, 全 Inline バリアント |
|
|
16
|
+
| Alert, AlertTitle, AlertDescription | `@/components/foundations/alert` | **variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning`<br>**variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning` | Success(成功), Info(お知らせ), Error(エラー), Warning(注意), Inline Info(インライン情報), Inline Caution(インラインエラー), Inline Warning(インライン警告), Prop-based Warning(旧 Banner 相当), Prop-based Error(エラー), Prop-based Info(お知らせ), Prop-based Success(成功), Prop-based with Action(アクション付き), Prop-based Inline Info(インライン情報), Prop-based Inline Caution(インラインエラー), Prop-based Inline Warning(インライン警告), Info + ボタン, Error(複数メッセージ), 全 Bordered バリアント, 全 Inline バリアント |
|
|
17
17
|
| AspectRatio | `@/components/foundations/aspect-ratio` | — | Square, Banner16x9, ProductImage4x3, RatioComparison |
|
|
18
18
|
| Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount | `@/components/foundations/avatar` | — | Default, フォールバック, サイズ比較, バッジ付き, グループ表示, レビュー表示例 |
|
|
19
|
-
| Badge | `@/components/foundations/badge` | **variant**: `default`, `destructive`, `success`, `info-subtle`, `success-subtle`, `accent-subtle`, `caution-subtle`, `warning-subtle`, `muted-subtle`, `secondary`, `outline`, `ghost` | Default(商品ハイライト), Secondary(カテゴリ), Success(成功・完了), Warning(注意), Destructive(エラー), Outline(枠線), WithIcon, 注文ステータス例, 全バリアント一覧 |
|
|
19
|
+
| Badge | `@/components/foundations/badge` | **variant**: `default`, `destructive`, `success`, `info-subtle`, `success-subtle`, `accent-subtle`, `caution-subtle`, `warning-subtle`, `muted-subtle`, `secondary`, `outline`, `ghost`, `link` | Default(商品ハイライト), Secondary(カテゴリ), Success(成功・完了), Warning(注意), Destructive(エラー), Outline(枠線), WithIcon, 注文ステータス例, 全バリアント一覧 |
|
|
20
20
|
| Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis | `@/components/foundations/breadcrumb` | — | Default, 省略表示, 長いパス, 商品ページ例 |
|
|
21
|
-
| Button | `@/components/foundations/button` | **variant**: `default`, `secondary`, `tertiary`, `destructive`, `ghost` | Default(CTA), Secondary(副次的), Secondary(追加済み), Tertiary(低優先度), Outline(枠線), Ghost(透明), Destructive(破壊的), Link(リンク), Inverse(暗背景用 primary), Ghost Inverse(暗背景用 secondary), Inverse + Ghost Inverse(dark CTA 帯), Overlay(画像上), サイズ比較, XL(56px / rounded-18px), Hero(56px / pill), Large, FullWidth, Disabled(無効), Loading(処理中), interaction: loading の幅・フォーカス・送信抑止, WithIcon, IconOnly |
|
|
21
|
+
| Button | `@/components/foundations/button` | **variant**: `default`, `secondary`, `tertiary`, `destructive`, `ghost`, `outline`, `link`, `inverse`, `ghost-inverse`, `overlay`<br>**size**: `default`, `xs`, `sm`, `lg`, `xl`, `hero`, `icon`, `icon-xs`, `icon-sm`, `icon-lg`, `icon-xl` | Default(CTA), Secondary(副次的), Secondary(追加済み), Tertiary(低優先度), Outline(枠線), Ghost(透明), Destructive(破壊的), Link(リンク), Inverse(暗背景用 primary), Ghost Inverse(暗背景用 secondary), Inverse + Ghost Inverse(dark CTA 帯), Overlay(画像上), サイズ比較, XL(56px / rounded-18px), Hero(56px / pill), Large, FullWidth, Disabled(無効), Loading(処理中), interaction: loading の幅・フォーカス・送信抑止, WithIcon, IconOnly |
|
|
22
22
|
| Calendar, CalendarDayButton | `@/components/foundations/calendar` | — | Default, お届け日選択, 日付範囲選択 |
|
|
23
23
|
| Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent | `@/components/foundations/card` | **surface**: `default`, `primary` | Default, アクション付き, surface=, サーフェス文脈の伝播, 注文サマリー例 |
|
|
24
24
|
| CheckboxCardGroup, CheckboxCardItem | `@/components/foundations/checkbox-card` | — | Default, 説明付き, 無効状態, 展開コンテンツ付き, ギフトオプション選択例, アレルギー情報例, バッジ付き, エラー状態, interaction: 読み上げ名と説明の分離 |
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
| Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator | `@/components/foundations/command` | — | Default, ProductSearch, DeliveryOptions |
|
|
29
29
|
| ConfirmDialogProvider | `@/components/foundations/confirm-dialog` | — | Destructive, Default, Queue, interaction: 確定・キャンセル・Esc とフォーカス復帰, interaction: 待ち行列で 1 件ずつ表示, interaction: 閉じかけに次の確認が来てもフォーカスは呼び出し元へ, interaction: メニュー項目から呼ぶと閉じた後はメニューのトリガーへ |
|
|
30
30
|
| ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup | `@/components/foundations/context-menu` | — | Default, WithCheckboxItems |
|
|
31
|
-
| DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState | `@/components/foundations/data-table` | **state**: `default`, `selected`<br>**width**: `auto`, `max`, `hug`<br>**align**: `left`, `right`, `center` | Default, チェックボックス選択, タイトル固定, セクション, 空状態, 新規追加行, セル型バリエーション, 実用例(注文管理), 入力系セル一覧, ソートヘッダー, D&D並び替え, interaction:
|
|
31
|
+
| DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState | `@/components/foundations/data-table` | **state**: `default`, `selected`<br>**width**: `auto`, `max`, `hug`<br>**align**: `left`, `right`, `center` | Default, チェックボックス選択, タイトル固定, セクション, 空状態, 新規追加行, セル型バリエーション, 実用例(注文管理), 入力系セル一覧, ソートヘッダー, D&D並び替え, interaction: チェック欄の操作と選択通知, interaction: セル内の操作で行クリックが発火しない |
|
|
32
32
|
| Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger | `@/components/foundations/dialog` | — | Default, 確認ダイアログ, フォーム入力, サイズ(size), サイズ(SP は画面幅に収まる), interaction: 開閉とフォーカストラップ, NestedSelectKeyboard, NestedDatePickerKeyboard |
|
|
33
33
|
| Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription | `@/components/foundations/drawer` | — | Default, カート追加クイックビュー |
|
|
34
34
|
| DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent | `@/components/foundations/dropdown-menu` | — | Default, グループ付き, 注文アクション例 |
|
|
35
|
-
| Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator | `@/components/foundations/field` | — | フォーム一式, ラベル付き区切り, Field / FieldLabel(1
|
|
35
|
+
| Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator | `@/components/foundations/field` | — | フォーム一式, ラベル付き区切り, Field / FieldLabel(1フィールドの箱), 詰めた並び(gap=sm + 小見出し) |
|
|
36
36
|
| FileInput | `@/components/foundations/file-input` | — | Default, 複数選択 + accept, 無効, maxSize 超過エラー, FormField 連携, interaction: native FormData と controlled value の同期 |
|
|
37
|
-
| Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField | `@/components/foundations/form` | — | RHF register / reset 統合, DeliveryAddressForm, ReviewForm, ContactForm, RHF: register() + 保存済みの初期値, RHF: Controller + 保存済みの初期値 |
|
|
37
|
+
| Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField | `@/components/foundations/form` | — | RHF register / reset 統合, DeliveryAddressForm, ReviewForm, ContactForm, RHF: register() + 保存済みの初期値, RHF: Controller + 保存済みの初期値, RHF: NumberInput + 保存済みの初期値 |
|
|
38
38
|
| HoverCard, HoverCardTrigger, HoverCardContent | `@/components/foundations/hover-card` | — | Default, DeliveryInfo, RatingDetail |
|
|
39
39
|
| IconBadge | `@/components/foundations/icon-badge` | **size**: `md`, `ml`, `lg` | md(44px), ml(48px), lg(72px), サイズ比較, Card 内(間隔=Card の gap-4), リスト見出し(md) |
|
|
40
40
|
| Input | `@/components/foundations/input` | — | Default, WithLabel, Email, Password, Tel, Search, WithIcon, Disabled, Invalid(エラー), Textarea, フォーム例(配送先), 文字数カウンタ |
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
| NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport | `@/components/foundations/navigation-menu` | — | Default, WithoutViewport |
|
|
44
44
|
| Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis | `@/components/foundations/pagination` | — | Default, 省略付き, 表示窓を自動計算, 最初のページ, 商品一覧ページ例 |
|
|
45
45
|
| Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription | `@/components/foundations/popover` | — | Default, DeliveryDatePicker, AllergyInfo |
|
|
46
|
-
| Progress | `@/components/foundations/progress` | — | Default, 送料無料まで,
|
|
46
|
+
| Progress | `@/components/foundations/progress` | — | Default, 送料無料まで, 送料無料達成, interaction: 値が読み上げに伝わる |
|
|
47
47
|
| RadioGroup, RadioGroupItem | `@/components/foundations/radio-group` | — | Default, 説明付き, 選択済み, 無効状態, エラーパターン, 補足説明なし, 配送方法選択例, チップ型(choice chip), チップ型(制御・無効), チップ型(エラー), 支払い方法(クレカ入力済), 支払い方法(クレカ未入力) |
|
|
48
48
|
| ResponsiveDialog, ResponsiveDialogTrigger, ResponsiveDialogContent, ResponsiveDialogHeader, ResponsiveDialogFooter, ResponsiveDialogTitle, ResponsiveDialogDescription, ResponsiveDialogClose | `@/components/foundations/responsive-dialog` | — | 確認ダイアログ, フォーム入力, 幅を広げる(size), お知らせ(閉じるのみ), お届け日選択(選択リスト) |
|
|
49
49
|
| ScrollArea, ScrollBar | `@/components/foundations/scroll-area` | — | Default, HorizontalTagScroll, OrderHistoryList |
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
| Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption | `@/components/foundations/table` | — | Default, フッター付き, 商品比較例, カート注文サマリー |
|
|
61
61
|
| Tabs, TabsList, TabsTrigger, TabsContent | `@/components/foundations/tabs` | **variant**: `underbar`, `segment`<br>**scrollable**: `true`<br>**size**: `md`, `sm` | Default(Underbar), タブ数バリエーション, 横スクロール(多数タブ), PC モード(文字幅ベース), Segment(ピル型), Segment 3択, 狭幅(サイドバー 266px), 縦向き(orientation=vertical), interaction: 縦向きの並びと上下キー, interaction: クリックと矢印キーでの切り替え |
|
|
62
62
|
| Textarea | `@/components/foundations/textarea` | — | Default, 無効, メッセージカード入力例, エラーパターン, レビュー投稿例, 文字数カウンタ |
|
|
63
|
-
| ToggleGroup, ToggleGroupItem | `@/components/foundations/toggle-group` | **width**: `fit`, `full`<br>**variant**: `default`, `outline`<br>**
|
|
63
|
+
| ToggleGroup, ToggleGroupItem | `@/components/foundations/toggle-group` | **width**: `fit`, `full`<br>**variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, 複数選択, サイズ, アイコン付き, アイコンのみ, 無効 |
|
|
64
64
|
| Toggle | `@/components/foundations/toggle` | **variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, TextFormatting, FavoriteToggle, Outline, Sizes |
|
|
65
65
|
| Tooltip, TooltipTrigger, TooltipContent, TooltipProvider | `@/components/foundations/tooltip` | — | Default, 表示位置, アイコンボタン例 |
|
|
66
66
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
| Component | Import | Variants | Stories |
|
|
72
72
|
|-----------|--------|----------|---------|
|
|
73
73
|
| AdminHeader | `@/components/primitives/admin-header` | — | — |
|
|
74
|
-
| AdminSideNav | `@/components/primitives/admin-side-nav` | — | 下端寄り・多数項目・キーボード操作, interaction: flyout の開閉・フォーカス・viewport
|
|
74
|
+
| AdminSideNav | `@/components/primitives/admin-side-nav` | — | 下端寄り・多数項目・キーボード操作, interaction: flyout の開閉・フォーカス・viewport 境界, interaction: ドロワーのリンクを別タブで開くときは閉じない |
|
|
75
75
|
| BannerCarousel | `@/components/primitives/banner-carousel` | — | Default, SmallBanners, LargeBanners |
|
|
76
76
|
| BottomTabBar | `@/components/primitives/bottom-tab-bar` | — | Default(ホーム), アクティブ状態, バッジ付き, バッジオーバーフロー(99+), バナー付き, 記念日アクティブ |
|
|
77
77
|
| BulkActionBar | `@/components/primitives/bulk-action-bar` | — | — |
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
| ChatComposer | `@/components/primitives/chat-composer` | — | 基本, 添付あり, ⌘Enter 送信, 送信中, 無効化, 文字数カウンタ |
|
|
81
81
|
| Chip | `@/components/primitives/chip` | **variant**: `filled`, `accent`, `selected`<br>**size**: `sm`, `md`, `lg`, `tile`<br>**shape**: `pill`, `square` | Default, 人気キーワード, 全バリアント, States(hover / disabled), サイズ比較, サイズタイル(狭い横並び), フィルター選択, 削除可能(選択済みフィルター), 検索画面での使用例 |
|
|
82
82
|
| CoachMark | `@/components/primitives/coach-mark` | — | オンボーディング, 全方向, オンボーディング各方向 |
|
|
83
|
-
| Combobox | `@/components/primitives/combobox` | — | Default |
|
|
83
|
+
| Combobox | `@/components/primitives/combobox` | — | Default, interaction: 表記ゆれの絞り込みと読み上げ名, interaction: 連続した部分一致・元の並びのまま, 一覧を開いた状態(a11y 検査) |
|
|
84
84
|
| Container | `@/components/primitives/container` | — | Default(page / default gutter), サイズ比較, gutter 比較 |
|
|
85
85
|
| ContentCard, ContentList | `@/components/primitives/content-card` | — | 縦(グリッド一覧), 一覧での高さ揃え, 横(画像が左), リスト(Medium 型), 長いタグラベル |
|
|
86
86
|
| ContentCarousel | `@/components/primitives/content-carousel` | — | ヒーローバナー, 自動再生(5秒), peek表示, peek表示(Container の中), 多列カード(PC 3枚), 1枚のみ |
|
|
87
|
-
| DatePicker, DateTimePicker | `@/components/primitives/date-picker` | — | 日付ピッカー, 初期値あり, 選択範囲を制限, 特定日を無効化, FormField 連携, 無効化, クリア可能(任意項目), interaction: クリア後のフォーカス, interaction: FormField のエラーと接続 |
|
|
87
|
+
| DatePicker, DateTimePicker | `@/components/primitives/date-picker` | — | 日付ピッカー, 初期値あり, 選択範囲を制限, 特定日を無効化, FormField 連携, 無効化, クリア可能(任意項目), interaction: クリア後のフォーカス, interaction: 選択中の日の月を開く, interaction: 選択中の日の再押下で値が消えない, interaction: FormField のエラーと接続 |
|
|
88
88
|
| EmptyState | `@/components/primitives/empty-state` | — | お気に入り商品(空), カート(空), ブックマーク(空), 検索結果なし, 汎用(説明のみ) |
|
|
89
89
|
| ErrorState, NotFoundIllustration | `@/components/primitives/error-state` | — | ネットワークエラー, サーバーエラー, ページが見つからない, タイムアウト, 404(notFound variant), 404(文言上書き), イラスト単体 |
|
|
90
90
|
| FilterBar | `@/components/primitives/filter-bar` | — | SP, SP(選択済み), PC, 地域フィルター, もっと絞り込む |
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
| KebabMenu | `@/components/primitives/kebab-menu` | — | — |
|
|
100
100
|
| ListItem | `@/components/primitives/list-item` | — | デフォルト(矢印), キャプション付き, アイコン付き, テキスト値, バッジ付き, トグル, 矢印なし, 選択状態, メニューリスト(複数行), アイコン付きメニュー, インタラクティブ(hover / focus) |
|
|
101
101
|
| MenuDrawer | `@/components/primitives/menu-drawer` | — | デフォルト(最小構成), ログイン済 (ユーザー名表示), 未ログイン (ログインボタン表示), サムネイル付きカテゴリ, バナー付き, 全部入り (大規模アプリ向け), ログインリンク非表示 |
|
|
102
|
-
| MultiSelect | `@/components/primitives/multi-select` | — | Default, interaction: Chip
|
|
102
|
+
| MultiSelect | `@/components/primitives/multi-select` | — | Default, interaction: Chip 削除後のフォーカス, 一覧を開いた状態(a11y 検査) |
|
|
103
103
|
| NotificationBadge | `@/components/primitives/notification-badge` | **color**: `red`, `green`<br>**size**: `sm`, `md` | Default, ドットバッジ, 数値バッジ, カラーバリエーション, ヘッダーでの使用例, 非表示状態 |
|
|
104
104
|
| NotificationList | `@/components/primitives/notification-list` | — | デフォルト, 横並び(管理画面向け), 空の状態 |
|
|
105
105
|
| NumberInput, QuantitySelector | `@/components/primitives/number-input` | — | Default, コンパクト型(sm), サイズ比較, 最小・最大値, 無効状態, エラー状態, ゴミ箱アイコン, ゴミ箱+削除確認ダイアログ, 直接入力パターン, 商品詳細での使用例, カート内での使用例, 価格・在庫入力(管理画面), interaction: 増減と min/max のクランプ, interaction: 上限・下限でもフォーカスを保つ, interaction: error の aria-invalid, interaction: FormField と接続 |
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
* 以下の「Typography Helper」セクションで提供する。
|
|
29
29
|
* ============================================ */
|
|
30
30
|
|
|
31
|
+
/* レイヤーの順序を固定する(base < components。どちらも consumer の非レイヤー CSS より弱い)。
|
|
32
|
+
他の @layer ブロックより前に置く。 */
|
|
33
|
+
@layer base, components;
|
|
34
|
+
|
|
31
35
|
/* --- Layer 1: Primitive Colors ---
|
|
32
36
|
*
|
|
33
37
|
* 正本 src/styles/primitive.css のメインカラーファミリー(Orange/Gray/Forest/
|
|
@@ -116,6 +120,7 @@
|
|
|
116
120
|
--Primitive-Sea-900: #0017B6FF;
|
|
117
121
|
|
|
118
122
|
/* Wood */
|
|
123
|
+
--Primitive-Wood-25: #FCF9F2FF;
|
|
119
124
|
--Primitive-Wood-50: #F8F1E0FF;
|
|
120
125
|
--Primitive-Wood-100: #EFDBB1FF;
|
|
121
126
|
--Primitive-Wood-200: #E5C47FFF;
|
|
@@ -178,7 +183,7 @@
|
|
|
178
183
|
* (および tokens.json 未収録グループは primitive 実値)まで解決し、
|
|
179
184
|
* 素の `:root` / `.dark` として展開したもの。
|
|
180
185
|
*
|
|
181
|
-
* 展開対象(全
|
|
186
|
+
* 展開対象(全 78 semantic トークン名): Surface-* / Text-* / Object-* / Hover-* /
|
|
182
187
|
* Active-* / Border-* / Brand-* / Overlay-* / Surface-Glass-* / Caution-* /
|
|
183
188
|
* Focus-High-Emphasis / Third-Party-*。一覧・hex 整合は
|
|
184
189
|
* __tests__/preset-standalone-coverage.test.ts でガードしている。
|
|
@@ -189,8 +194,10 @@
|
|
|
189
194
|
*/
|
|
190
195
|
:root {
|
|
191
196
|
--Surface-Primary: #FFFFFF;
|
|
192
|
-
--Surface-Secondary: #
|
|
193
|
-
--Surface-Tertiary: #
|
|
197
|
+
--Surface-Secondary: #FCF9F2;
|
|
198
|
+
--Surface-Tertiary: #FCF9F2;
|
|
199
|
+
--Surface-Neutral-Secondary: #FBF9F8;
|
|
200
|
+
--Surface-Neutral-Tertiary: #F4F2F1;
|
|
194
201
|
--Surface-Elevated: #FFFFFF;
|
|
195
202
|
--Surface-Caution: #EC0000;
|
|
196
203
|
--Surface-Caution-Light: #FFE7E6;
|
|
@@ -274,6 +281,8 @@
|
|
|
274
281
|
--Surface-Primary: #000000E5;
|
|
275
282
|
--Surface-Secondary: #FFFFFF1A;
|
|
276
283
|
--Surface-Tertiary: #FFFFFF33;
|
|
284
|
+
--Surface-Neutral-Secondary: #FFFFFF1A;
|
|
285
|
+
--Surface-Neutral-Tertiary: #FFFFFF33;
|
|
277
286
|
--Surface-Elevated: #3A3736;
|
|
278
287
|
--Surface-Caution: #EC0000;
|
|
279
288
|
--Surface-Caution-Light: #FFE7E6;
|
|
@@ -406,11 +415,11 @@
|
|
|
406
415
|
--popover-foreground: var(--Text-High-Emphasis);
|
|
407
416
|
--primary: var(--Brand-Cake-Orange);
|
|
408
417
|
--primary-foreground: var(--Text-on-Inverse);
|
|
409
|
-
--secondary: var(--Surface-Secondary);
|
|
418
|
+
--secondary: var(--Surface-Neutral-Secondary);
|
|
410
419
|
--secondary-foreground: var(--Text-Medium-Emphasis);
|
|
411
|
-
--muted: var(--Surface-Tertiary);
|
|
420
|
+
--muted: var(--Surface-Neutral-Tertiary);
|
|
412
421
|
--muted-foreground: var(--Text-Low-Emphasis);
|
|
413
|
-
--accent: var(--Surface-Secondary);
|
|
422
|
+
--accent: var(--Surface-Neutral-Secondary);
|
|
414
423
|
--accent-foreground: var(--Text-High-Emphasis);
|
|
415
424
|
--destructive: var(--Object-Caution);
|
|
416
425
|
--border: var(--Border-Medium-Emphasis);
|
|
@@ -427,11 +436,11 @@
|
|
|
427
436
|
--popover-foreground: var(--Text-High-Emphasis);
|
|
428
437
|
--primary: var(--Brand-Cake-Orange);
|
|
429
438
|
--primary-foreground: var(--Text-on-Inverse);
|
|
430
|
-
--secondary: var(--Surface-Tertiary);
|
|
439
|
+
--secondary: var(--Surface-Neutral-Tertiary);
|
|
431
440
|
--secondary-foreground: var(--Text-Medium-Emphasis);
|
|
432
|
-
--muted: var(--Surface-Tertiary);
|
|
441
|
+
--muted: var(--Surface-Neutral-Tertiary);
|
|
433
442
|
--muted-foreground: var(--Text-Low-Emphasis);
|
|
434
|
-
--accent: var(--Surface-Secondary);
|
|
443
|
+
--accent: var(--Surface-Neutral-Secondary);
|
|
435
444
|
--accent-foreground: var(--Text-High-Emphasis);
|
|
436
445
|
--destructive: var(--Object-Caution);
|
|
437
446
|
--border: var(--Border-Medium-Emphasis);
|
|
@@ -484,6 +493,16 @@
|
|
|
484
493
|
--Z-SkipLink: 50;
|
|
485
494
|
}
|
|
486
495
|
|
|
496
|
+
/* --- Scrollbar hide ---
|
|
497
|
+
* src/preset.css の `@utility scrollbar-hide` と同等(Tailwind 非使用 consumer 向け)。 */
|
|
498
|
+
.scrollbar-hide {
|
|
499
|
+
-ms-overflow-style: none;
|
|
500
|
+
scrollbar-width: none;
|
|
501
|
+
}
|
|
502
|
+
.scrollbar-hide::-webkit-scrollbar {
|
|
503
|
+
display: none;
|
|
504
|
+
}
|
|
505
|
+
|
|
487
506
|
/* --- Typography Helper Classes ---
|
|
488
507
|
* Tailwindのtypo-*と同等のCSSクラス。
|
|
489
508
|
* 本番CSSでこれらのクラスを使えば、DSと同じタイポグラフィが適用される。
|
|
@@ -512,18 +531,21 @@
|
|
|
512
531
|
.typo-label-xs { font-size: 10px; line-height: 1.5; font-weight: 500; }
|
|
513
532
|
|
|
514
533
|
/* --- Touch target utility ---
|
|
515
|
-
* Tailwind を使わない consumer でも preset と同じ44px操作領域を利用できる。
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
534
|
+
* Tailwind を使わない consumer でも preset と同じ44px操作領域を利用できる。
|
|
535
|
+
* @layer components に入れているのは、consumer の className(utilities の `absolute` など)や非レイヤー CSS が常に勝つようにするため。 */
|
|
536
|
+
@layer components {
|
|
537
|
+
.tap-target {
|
|
538
|
+
position: relative;
|
|
539
|
+
}
|
|
540
|
+
.tap-target::after {
|
|
541
|
+
content: "";
|
|
542
|
+
position: absolute;
|
|
543
|
+
top: 50%;
|
|
544
|
+
left: 50%;
|
|
545
|
+
width: max(100%, 2.75rem);
|
|
546
|
+
height: max(100%, 2.75rem);
|
|
547
|
+
transform: translate(-50%, -50%);
|
|
548
|
+
}
|
|
527
549
|
}
|
|
528
550
|
|
|
529
551
|
/* --- Base layer(ルート地色 / #208) ---
|
package/src/preset.css
CHANGED
|
@@ -249,11 +249,11 @@
|
|
|
249
249
|
--popover-foreground: var(--Text-High-Emphasis);
|
|
250
250
|
--primary: var(--Brand-Cake-Orange);
|
|
251
251
|
--primary-foreground: var(--Text-on-Inverse);
|
|
252
|
-
--secondary: var(--Surface-Secondary);
|
|
252
|
+
--secondary: var(--Surface-Neutral-Secondary);
|
|
253
253
|
--secondary-foreground: var(--Text-Medium-Emphasis);
|
|
254
|
-
--muted: var(--Surface-Tertiary);
|
|
254
|
+
--muted: var(--Surface-Neutral-Tertiary);
|
|
255
255
|
--muted-foreground: var(--Text-Low-Emphasis);
|
|
256
|
-
--accent: var(--Surface-Secondary);
|
|
256
|
+
--accent: var(--Surface-Neutral-Secondary);
|
|
257
257
|
--accent-foreground: var(--Text-High-Emphasis);
|
|
258
258
|
--destructive: var(--Object-Caution);
|
|
259
259
|
--border: var(--Border-Medium-Emphasis);
|
|
@@ -285,11 +285,11 @@
|
|
|
285
285
|
--popover-foreground: var(--Text-High-Emphasis);
|
|
286
286
|
--primary: var(--Brand-Cake-Orange);
|
|
287
287
|
--primary-foreground: var(--Text-on-Inverse);
|
|
288
|
-
--secondary: var(--Surface-Tertiary);
|
|
288
|
+
--secondary: var(--Surface-Neutral-Tertiary);
|
|
289
289
|
--secondary-foreground: var(--Text-Medium-Emphasis);
|
|
290
|
-
--muted: var(--Surface-Tertiary);
|
|
290
|
+
--muted: var(--Surface-Neutral-Tertiary);
|
|
291
291
|
--muted-foreground: var(--Text-Low-Emphasis);
|
|
292
|
-
--accent: var(--Surface-Secondary);
|
|
292
|
+
--accent: var(--Surface-Neutral-Secondary);
|
|
293
293
|
--accent-foreground: var(--Text-High-Emphasis);
|
|
294
294
|
--destructive: var(--Object-Caution);
|
|
295
295
|
--border: var(--Border-Medium-Emphasis);
|
|
@@ -372,20 +372,38 @@
|
|
|
372
372
|
animation: slide-in-left var(--Motion-Duration-Base, 200ms) var(--Motion-Easing-Standard, cubic-bezier(0, 0, 0.58, 1));
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
/* --- Scrollbar hide utility ---
|
|
376
|
+
* 横スクロール部品(カルーセル・タブ列・カテゴリ列など)がスクロールバーを隠すために使う。
|
|
377
|
+
* Tailwind v4 本体に `scrollbar-hide` は無い。`scrollbar-none` も、この DS が使う tailwindcss 4.2.1 では
|
|
378
|
+
* クラスを書いても CSS が生成されなかった(実測: compile の build(["scrollbar-none"]) の出力が空)。
|
|
379
|
+
* 加えて Safari 18.2 未満では `scrollbar-width` が効かないため、DS が 1 本に定義する。
|
|
380
|
+
* Firefox / 標準 = scrollbar-width、旧 Edge = -ms-overflow-style、WebKit = ::-webkit-scrollbar。
|
|
381
|
+
* Tailwind を通さない経路(preset-standalone.css)にも同名の素の CSS を置いている。 */
|
|
382
|
+
@utility scrollbar-hide {
|
|
383
|
+
-ms-overflow-style: none;
|
|
384
|
+
scrollbar-width: none;
|
|
385
|
+
&::-webkit-scrollbar {
|
|
386
|
+
display: none;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
375
390
|
/* --- Touch target utility ---
|
|
376
391
|
* 見た目が44px未満の小型操作部品に付け、透明な疑似要素で実効操作領域だけを拡張する。
|
|
377
|
-
* 隣接ターゲットと重なる密度では使わず、親レイアウト側の gap も確保する。
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
392
|
+
* 隣接ターゲットと重なる密度では使わず、親レイアウト側の gap も確保する。
|
|
393
|
+
* @layer components に入れているのは、consumer の className(utilities の `absolute` など)や非レイヤー CSS が常に勝つようにするため。 */
|
|
394
|
+
@layer components {
|
|
395
|
+
.tap-target {
|
|
396
|
+
position: relative;
|
|
397
|
+
}
|
|
398
|
+
.tap-target::after {
|
|
399
|
+
content: "";
|
|
400
|
+
position: absolute;
|
|
401
|
+
top: 50%;
|
|
402
|
+
left: 50%;
|
|
403
|
+
width: max(100%, 2.75rem);
|
|
404
|
+
height: max(100%, 2.75rem);
|
|
405
|
+
transform: translate(-50%, -50%);
|
|
406
|
+
}
|
|
389
407
|
}
|
|
390
408
|
|
|
391
409
|
/* --- Base layer --- */
|
package/src/styles/primitive.css
CHANGED
package/src/styles/semantic.css
CHANGED
|
@@ -14,8 +14,16 @@
|
|
|
14
14
|
|
|
15
15
|
/* Surface */
|
|
16
16
|
--Surface-Primary: var(--Primitive-White-alpha-1000);
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/* 情報をまとめる押せない面(説明ボックス・フォームのまとまり・Section subtle・Card 既定・表の見出し行など)。
|
|
18
|
+
light はケーキ配色の「スポンジ」= Wood-25 のベージュ。押せる部品・状態の地・画面全体の地には使わず、
|
|
19
|
+
下の Surface-Neutral-* を使う。dark は従来どおり半透明白(値は変えていない)。 */
|
|
20
|
+
--Surface-Secondary: var(--Primitive-Wood-25);
|
|
21
|
+
--Surface-Tertiary: var(--Primitive-Wood-25);
|
|
22
|
+
/* グレーを保つ地。押せる部品(Button tertiary・Chip・Tag/Badge 等のラベル)、hover / active / selected / disabled の地、
|
|
23
|
+
溝・トラック、スケルトン・画像の仮の地、画面全体の地(AdminShell 等の min-h-screen)に使う。
|
|
24
|
+
light は旧 Surface-Secondary / Tertiary と同値、dark は Surface-Secondary / Tertiary と同値。 */
|
|
25
|
+
--Surface-Neutral-Secondary: var(--Primitive-Gray-50);
|
|
26
|
+
--Surface-Neutral-Tertiary: var(--Primitive-Gray-100);
|
|
19
27
|
/* 浮遊レイヤー(メニュー・ポップオーバー・ダイアログ・シート)と、
|
|
20
28
|
スクロール内容の上に重なるエッジ固定バー(Header / StickyActionBar /
|
|
21
29
|
BottomTabBar / AdminHeader / AdminSideNav / OrderSummary fixed)の地。
|
|
@@ -137,6 +145,8 @@
|
|
|
137
145
|
--Surface-Primary: var(--Primitive-Gray-alpha-900);
|
|
138
146
|
--Surface-Secondary: var(--Primitive-White-alpha-100);
|
|
139
147
|
--Surface-Tertiary: var(--Primitive-White-alpha-200);
|
|
148
|
+
--Surface-Neutral-Secondary: var(--Primitive-White-alpha-100);
|
|
149
|
+
--Surface-Neutral-Tertiary: var(--Primitive-White-alpha-200);
|
|
140
150
|
/* dark の Surface-Primary は #000000E5 でアルファ付き。ページ地としては
|
|
141
151
|
下地に合成される前提なので妥当だが、浮遊レイヤーに使うと後ろが透ける。
|
|
142
152
|
一段明るい不透明色を elevation として持つ(issue #262)。 */
|
package/tokens.json
CHANGED
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"900": "#0017B6"
|
|
79
79
|
},
|
|
80
80
|
"Wood": {
|
|
81
|
+
"25": "#FCF9F2",
|
|
81
82
|
"50": "#F8F1E0",
|
|
82
83
|
"100": "#EFDBB1",
|
|
83
84
|
"200": "#E5C47F",
|
|
@@ -110,14 +111,24 @@
|
|
|
110
111
|
"usage": "メイン背景"
|
|
111
112
|
},
|
|
112
113
|
"secondary": {
|
|
114
|
+
"value": "Primitive-Wood-25",
|
|
115
|
+
"hex": "#FCF9F2",
|
|
116
|
+
"usage": "情報をまとめる押せない面(説明ボックス・フォームのまとまり・Card 既定・表の見出し行など)。ケーキ配色の「スポンジ」のベージュ。押せる部品・状態の地・画面全体の地には使わない(neutral-secondary を使う)"
|
|
117
|
+
},
|
|
118
|
+
"tertiary": {
|
|
119
|
+
"value": "Primitive-Wood-25",
|
|
120
|
+
"hex": "#FCF9F2",
|
|
121
|
+
"usage": "情報をまとめる押せない面(Section background=\"subtle\"・Alert 中立の地など)。light は secondary と同じベージュ。押せる部品・状態の地・溝には使わない(neutral-tertiary を使う)"
|
|
122
|
+
},
|
|
123
|
+
"neutral-secondary": {
|
|
113
124
|
"value": "Primitive-Gray-50",
|
|
114
125
|
"hex": "#FBF9F8",
|
|
115
|
-
"usage": "
|
|
126
|
+
"usage": "グレーを保つ地。画面全体の地(AdminShell 等の min-h-screen)、hover / selected / disabled の地、画像・アバターの仮の地、ラベル部品"
|
|
116
127
|
},
|
|
117
|
-
"tertiary": {
|
|
128
|
+
"neutral-tertiary": {
|
|
118
129
|
"value": "Primitive-Gray-100",
|
|
119
130
|
"hex": "#F4F2F1",
|
|
120
|
-
"usage": "
|
|
131
|
+
"usage": "グレーを保つ地。Button tertiary・Chip・Badge 等の押せる部品とラベル、hover / active / disabled の地、溝・トラック・スケルトン"
|
|
121
132
|
},
|
|
122
133
|
"elevated": {
|
|
123
134
|
"value": "Primitive-White-alpha-1000",
|
|
@@ -489,6 +500,14 @@
|
|
|
489
500
|
"value": "var(--Primitive-White-alpha-200)",
|
|
490
501
|
"usage": "Surface-Tertiary のCSS契約値"
|
|
491
502
|
},
|
|
503
|
+
"neutral-secondary": {
|
|
504
|
+
"value": "var(--Primitive-White-alpha-100)",
|
|
505
|
+
"usage": "Surface-Neutral-Secondary のCSS契約値(dark は Surface-Secondary と同値)"
|
|
506
|
+
},
|
|
507
|
+
"neutral-tertiary": {
|
|
508
|
+
"value": "var(--Primitive-White-alpha-200)",
|
|
509
|
+
"usage": "Surface-Neutral-Tertiary のCSS契約値(dark は Surface-Tertiary と同値)"
|
|
510
|
+
},
|
|
492
511
|
"elevated": {
|
|
493
512
|
"value": "var(--Primitive-Gray-800)",
|
|
494
513
|
"usage": "Surface-Elevated のCSS契約値"
|