@cakejp/design-system 0.11.0 → 0.13.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/CLAUDE.md +22 -1
  3. package/README.md +48 -0
  4. package/UPDATING.md +9 -0
  5. package/bin/check-duplicates.mjs +256 -0
  6. package/bin/exports-parser.mjs +54 -0
  7. package/bin/init.js +11 -0
  8. package/contracts/components.json +395 -37
  9. package/contracts/composition.json +10 -7
  10. package/contracts/rules.json +21 -3
  11. package/dist/index.css +1 -1
  12. package/dist/index.js +6134 -3475
  13. package/dist/types/components/ec/admin-shell.d.ts +39 -2
  14. package/dist/types/components/ec/mypage-shell.d.ts +10 -1
  15. package/dist/types/components/ec/product-card.d.ts +3 -1
  16. package/dist/types/components/ec/product-list-item.d.ts +8 -1
  17. package/dist/types/components/foundations/alert.d.ts +5 -1
  18. package/dist/types/components/foundations/button.d.ts +1 -1
  19. package/dist/types/components/foundations/card.d.ts +36 -2
  20. package/dist/types/components/foundations/chip-variants.d.ts +17 -0
  21. package/dist/types/components/foundations/field.d.ts +81 -0
  22. package/dist/types/components/foundations/file-input.d.ts +75 -0
  23. package/dist/types/components/foundations/icon-badge.d.ts +2 -2
  24. package/dist/types/components/foundations/input.d.ts +11 -1
  25. package/dist/types/components/foundations/radio-group.d.ts +12 -2
  26. package/dist/types/components/foundations/skip-link.d.ts +39 -0
  27. package/dist/types/components/foundations/textarea.d.ts +11 -1
  28. package/dist/types/components/primitives/chat-composer.d.ts +87 -0
  29. package/dist/types/components/primitives/chip.d.ts +2 -7
  30. package/dist/types/components/primitives/content-carousel.d.ts +58 -0
  31. package/dist/types/components/primitives/date-picker.d.ts +44 -0
  32. package/dist/types/components/primitives/error-state.d.ts +43 -16
  33. package/dist/types/components/primitives/funnel-shell.d.ts +12 -1
  34. package/dist/types/components/primitives/header.d.ts +15 -1
  35. package/dist/types/components/primitives/image-input.d.ts +119 -0
  36. package/dist/types/components/primitives/section-header.d.ts +9 -2
  37. package/dist/types/components/primitives/section-nav.d.ts +28 -2
  38. package/dist/types/components/primitives/section.d.ts +35 -2
  39. package/dist/types/components/primitives/share-buttons.d.ts +8 -2
  40. package/dist/types/components/primitives/standard-page-shell.d.ts +11 -1
  41. package/dist/types/components/primitives/timeline.d.ts +23 -0
  42. package/dist/types/components/primitives/workspace-shell.d.ts +21 -1
  43. package/dist/types/index.d.ts +80 -4
  44. package/dist/types/lib/pagination-range.d.ts +16 -0
  45. package/dist/types/lib/use-value-length.d.ts +31 -0
  46. package/package.json +2 -1
  47. package/src/preset-standalone.css +322 -4
  48. package/src/preset.css +17 -0
  49. package/src/styles/semantic.css +7 -0
  50. package/src/styles/typography.css +15 -1
  51. package/templates/AGENTS.md +11 -0
  52. package/templates/CLAUDE.md +11 -0
  53. package/tokens.json +18 -2
package/bin/init.js CHANGED
@@ -30,6 +30,10 @@ if (cmd === "help" || cmd === "--help" || cmd === "-h") {
30
30
  npx cakejp-ds init --force 既存ファイルを上書き
31
31
  npx cakejp-ds codemod v0.2-to-v0.3 [DIR] 旧 API を新 API に自動移行
32
32
  npx cakejp-ds check-migration [DIR] 旧 API 利用箇所を検出
33
+ npx cakejp-ds check-duplicates [DIR] DS に既にある部品の二重実装を検出(--strict で検出時 exit 1)
34
+ 意図的に残すローカル実装は、対象 export の直前行に
35
+ 「// cakejp-ds-allow-duplicate: <理由>」を書くと抑制できる(理由必須)
36
+ 詳細: npx cakejp-ds check-duplicates --help
33
37
  `)
34
38
  process.exit(0)
35
39
  }
@@ -53,6 +57,13 @@ if (cmd === "check-migration") {
53
57
  process.exit(0)
54
58
  }
55
59
 
60
+ if (cmd === "check-duplicates") {
61
+ // process.argv の調整(check-duplicates.mjs 側は process.argv.slice(2) を見る)
62
+ process.argv = [process.argv[0], process.argv[1], ...args.slice(1)]
63
+ await import(join(pkgRoot, "bin/check-duplicates.mjs"))
64
+ process.exit(0)
65
+ }
66
+
56
67
  if (cmd !== "init" && cmd !== "postinstall") {
57
68
  console.error(`未知のコマンド: ${cmd}`)
58
69
  console.error(`npx cakejp-ds help を参照してください`)