@cakejp/design-system 0.12.0 → 0.14.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 +77 -0
- package/CLAUDE.md +12 -5
- package/MIGRATION.md +45 -0
- package/UPDATING.md +13 -0
- package/bin/check-duplicates.mjs +133 -9
- package/bin/exports-parser.mjs +54 -0
- package/bin/init.js +3 -0
- package/contracts/components.json +504 -209
- package/contracts/composition.json +11 -8
- package/contracts/rules.json +354 -113
- package/contracts/screen-patterns.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +4285 -3422
- package/dist/types/components/ec/admin-shell.d.ts +30 -2
- package/dist/types/components/ec/product-detail-sidebar.d.ts +1 -1
- package/dist/types/components/foundations/card.d.ts +27 -3
- package/dist/types/components/foundations/field.d.ts +26 -3
- package/dist/types/components/foundations/input.d.ts +3 -1
- package/dist/types/components/foundations/social-icon.d.ts +33 -0
- package/dist/types/components/foundations/textarea.d.ts +3 -1
- package/dist/types/components/primitives/chat-composer.d.ts +87 -0
- package/dist/types/components/primitives/combobox.d.ts +24 -0
- package/dist/types/components/primitives/content-carousel.d.ts +7 -1
- package/dist/types/components/primitives/date-picker.d.ts +15 -3
- package/dist/types/components/primitives/funnel-shell.d.ts +2 -0
- package/dist/types/components/primitives/image-input.d.ts +119 -0
- package/dist/types/components/primitives/multi-select.d.ts +24 -0
- package/dist/types/components/primitives/notification-badge.d.ts +1 -1
- package/dist/types/components/primitives/number-input.d.ts +84 -0
- package/dist/types/components/primitives/section-header.d.ts +9 -2
- package/dist/types/components/primitives/section.d.ts +35 -2
- package/dist/types/components/primitives/social-login-button.d.ts +3 -1
- package/dist/types/components/primitives/timeline.d.ts +23 -0
- package/dist/types/components/primitives/workspace-shell.d.ts +2 -0
- package/dist/types/index.d.ts +25 -7
- package/dist/types/lib/pagination-range.d.ts +16 -0
- package/dist/types/lib/use-value-length.d.ts +31 -0
- package/eslint/deprecated.js +44 -0
- package/package.json +8 -3
- package/scripts/codemod/README.md +14 -0
- package/scripts/codemod/template.mjs +62 -0
- package/src/components/COMPONENT_LOOKUP.md +166 -0
- package/src/preset-standalone.css +16 -0
- package/src/preset.css +17 -0
- package/src/styles/typography.css +7 -0
- package/templates/AGENTS.md +4 -0
- package/templates/CLAUDE.md +4 -0
- package/tokens.json +933 -87
- package/dist/types/components/primitives/quantity-selector.d.ts +0 -50
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface QuantitySelectorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
-
/** 現在の数量 */
|
|
4
|
-
value: number;
|
|
5
|
-
/** 最小値 */
|
|
6
|
-
min?: number;
|
|
7
|
-
/** 最大値 */
|
|
8
|
-
max?: number;
|
|
9
|
-
/** 数量変更時のコールバック */
|
|
10
|
-
onChange?: (value: number) => void;
|
|
11
|
-
/** 無効状態 */
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
/** エラー状態 */
|
|
14
|
-
error?: boolean;
|
|
15
|
-
/** サイズ(md = Pattern 2 サークル / sm = Pattern 1 ピル) */
|
|
16
|
-
size?: "sm" | "md";
|
|
17
|
-
/** 数値の直接入力を許可する(デフォルト: false — ボタン操作のみ) */
|
|
18
|
-
editable?: boolean;
|
|
19
|
-
/** 数量1のときにゴミ箱アイコンを表示する */
|
|
20
|
-
showTrash?: boolean;
|
|
21
|
-
/** ゴミ箱アイコン押下時のコールバック(削除確認ダイアログ表示等に使用) */
|
|
22
|
-
onDelete?: () => void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 数量選択コンポーネント(Figma 準拠デザイン)
|
|
26
|
-
*
|
|
27
|
-
* Figma DS の Adjust コンポーネントを再現。2つのパターンを提供:
|
|
28
|
-
*
|
|
29
|
-
* - **`size="sm"`(Pattern 1: コンパクト型)** — カート内での使用。
|
|
30
|
-
* 100×32px のコンパクト型コンテナに −/数字/+ をインライン配置。
|
|
31
|
-
* 背景は `Surface/Tertiary`、角丸 32px。
|
|
32
|
-
*
|
|
33
|
-
* - **`size="md"`(Pattern 2: サークル型)** — 商品詳細での使用。
|
|
34
|
-
* 32×32px の円形ボタンが左右に独立し、中央に 44px 幅の数値コンテナ。
|
|
35
|
-
* ボタン間隔 12px。
|
|
36
|
-
*
|
|
37
|
-
* ### ステート
|
|
38
|
-
* - `disabled`: 全要素のテキスト/アイコンが `Text/Disable` (#B7B5B4)
|
|
39
|
-
* - `error`: コンパクト型は赤枠(2px)、サークル型は数値コンテナが赤枠
|
|
40
|
-
* - `showTrash`: 数量1のとき − がゴミ箱アイコンに変化
|
|
41
|
-
*
|
|
42
|
-
* ### AI 向け使用ルール
|
|
43
|
-
*
|
|
44
|
-
* - **商品詳細ページ**: `size="md"` で配置
|
|
45
|
-
* - **カート内**: `size="sm"` でコンパクトに表示
|
|
46
|
-
* - `min=1` が標準(0 にしない — 削除は別の UI で行う)
|
|
47
|
-
* - `editable=true` で数値の直接入力可能
|
|
48
|
-
*/
|
|
49
|
-
declare function QuantitySelector({ className, value, min, max, onChange, disabled, error, size, editable, showTrash, onDelete, ...props }: QuantitySelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
export { QuantitySelector };
|