@cakejp/design-system 0.17.1 → 0.20.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 (101) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/CLAUDE.md +16 -0
  3. package/bin/init.js +191 -28
  4. package/contracts/components.json +176 -17
  5. package/contracts/composition.json +1 -1
  6. package/contracts/rules.json +5 -1
  7. package/contracts/screen-patterns.json +1 -1
  8. package/dist/components/ec/admin-shell.js +7 -6
  9. package/dist/components/ec/order-summary.js +16 -15
  10. package/dist/components/ec/product-card.js +107 -102
  11. package/dist/components/ec/product-option.js +1 -0
  12. package/dist/components/ec/review-card.js +22 -20
  13. package/dist/components/ec/review-form.js +1 -0
  14. package/dist/components/foundations/accordion.js +23 -22
  15. package/dist/components/foundations/alert-dialog.js +7 -7
  16. package/dist/components/foundations/alert.js +1 -0
  17. package/dist/components/foundations/aspect-ratio.js +3 -2
  18. package/dist/components/foundations/avatar.js +1 -0
  19. package/dist/components/foundations/button.js +7 -1
  20. package/dist/components/foundations/calendar.js +1 -0
  21. package/dist/components/foundations/checkbox-group.js +1 -0
  22. package/dist/components/foundations/checkbox.js +1 -0
  23. package/dist/components/foundations/command.js +1 -0
  24. package/dist/components/foundations/context-menu.js +1 -0
  25. package/dist/components/foundations/data-table.js +489 -16
  26. package/dist/components/foundations/dialog.js +13 -13
  27. package/dist/components/foundations/drawer.js +6 -5
  28. package/dist/components/foundations/file-input.js +1 -0
  29. package/dist/components/foundations/form.js +26 -25
  30. package/dist/components/foundations/pagination.js +49 -46
  31. package/dist/components/foundations/popover.js +9 -8
  32. package/dist/components/foundations/radio-group.js +3 -2
  33. package/dist/components/foundations/responsive-dialog.js +1 -0
  34. package/dist/components/foundations/separator.js +7 -6
  35. package/dist/components/foundations/sheet.js +41 -34
  36. package/dist/components/foundations/slider.js +7 -6
  37. package/dist/components/foundations/social-icon.js +30 -10
  38. package/dist/components/foundations/sonner.js +5 -4
  39. package/dist/components/foundations/tabs.js +45 -25
  40. package/dist/components/foundations/toggle-group.js +6 -5
  41. package/dist/components/primitives/admin-header.js +1 -1
  42. package/dist/components/primitives/admin-side-nav.js +196 -86
  43. package/dist/components/primitives/bottom-tab-bar.js +20 -20
  44. package/dist/components/primitives/chat-composer.js +1 -0
  45. package/dist/components/primitives/combobox.js +1 -0
  46. package/dist/components/primitives/content-card.js +111 -0
  47. package/dist/components/primitives/content-carousel.js +9 -8
  48. package/dist/components/primitives/date-picker.js +9 -8
  49. package/dist/components/primitives/footer.js +169 -100
  50. package/dist/components/primitives/form-field.js +1 -0
  51. package/dist/components/primitives/header.js +226 -176
  52. package/dist/components/primitives/image-carousel.js +8 -7
  53. package/dist/components/primitives/image-gallery.js +15 -14
  54. package/dist/components/primitives/image-input.js +9 -8
  55. package/dist/components/primitives/list-item.js +9 -8
  56. package/dist/components/primitives/menu-drawer.js +60 -56
  57. package/dist/components/primitives/multi-select.js +7 -6
  58. package/dist/components/primitives/number-input.js +1 -0
  59. package/dist/components/primitives/prose.js +52 -0
  60. package/dist/components/primitives/search-bar.js +81 -66
  61. package/dist/components/primitives/section-header.js +58 -55
  62. package/dist/components/primitives/share-buttons.js +93 -85
  63. package/dist/components/primitives/status-count-tabs.js +8 -7
  64. package/dist/components/primitives/sticky-action-bar.js +2 -1
  65. package/dist/components/primitives/sub-nav.js +52 -52
  66. package/dist/index.css +1 -1
  67. package/dist/index.js +2027 -752
  68. package/dist/lib/field-labelling.js +7 -6
  69. package/dist/lib/link-component.js +6 -0
  70. package/dist/lib/use-value-length.js +1 -0
  71. package/dist/types/components/ec/product-card.d.ts +12 -19
  72. package/dist/types/components/ec/review-card.d.ts +6 -1
  73. package/dist/types/components/foundations/button.d.ts +1 -1
  74. package/dist/types/components/foundations/chip-variants.d.ts +1 -1
  75. package/dist/types/components/foundations/data-table.d.ts +9 -1
  76. package/dist/types/components/foundations/pagination.d.ts +7 -1
  77. package/dist/types/components/foundations/sheet.d.ts +6 -1
  78. package/dist/types/components/foundations/social-icon.d.ts +1 -1
  79. package/dist/types/components/foundations/tabs.d.ts +2 -1
  80. package/dist/types/components/primitives/admin-side-nav.d.ts +3 -0
  81. package/dist/types/components/primitives/content-card.d.ts +67 -0
  82. package/dist/types/components/primitives/footer.d.ts +21 -1
  83. package/dist/types/components/primitives/header.d.ts +30 -2
  84. package/dist/types/components/primitives/menu-drawer.d.ts +7 -1
  85. package/dist/types/components/primitives/prose.d.ts +35 -0
  86. package/dist/types/components/primitives/search-bar.d.ts +14 -1
  87. package/dist/types/components/primitives/section-header.d.ts +2 -1
  88. package/dist/types/components/primitives/share-buttons.d.ts +26 -4
  89. package/dist/types/components/primitives/sub-nav.d.ts +16 -1
  90. package/dist/types/index.d.ts +7 -2
  91. package/dist/types/lib/link-component.d.ts +35 -0
  92. package/package.json +5 -4
  93. package/src/components/COMPONENT_LOOKUP.md +8 -6
  94. package/src/preset-standalone.css +3 -0
  95. package/src/preset.css +21 -3
  96. package/src/styles/semantic.css +11 -0
  97. package/templates/AGENTS.md +4 -2
  98. package/templates/AGENTS.stub.md +25 -0
  99. package/templates/CLAUDE.md +4 -2
  100. package/templates/CLAUDE.stub.md +25 -0
  101. package/tokens.json +17 -1
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as m } from "react/jsx-runtime";
2
3
  import * as s from "react";
3
4
  import { Slot as f } from "radix-ui";
@@ -7,15 +8,15 @@ import { Label as x } from "./label.js";
7
8
  const y = u, c = s.createContext(
8
9
  {}
9
10
  ), S = ({
10
- ...t
11
- }) => /* @__PURE__ */ m(c.Provider, { value: { name: t.name }, children: /* @__PURE__ */ m(F, { ...t }) }), d = () => {
12
- const t = s.useContext(c), e = s.useContext(l), { getFieldState: o } = I(), r = p({ name: t.name }), n = o(t.name, r);
13
- if (!t)
11
+ ...e
12
+ }) => /* @__PURE__ */ m(c.Provider, { value: { name: e.name }, children: /* @__PURE__ */ m(F, { ...e }) }), d = () => {
13
+ const e = s.useContext(c), t = s.useContext(l), { getFieldState: o } = I(), r = p({ name: e.name }), n = o(e.name, r);
14
+ if (!e)
14
15
  throw new Error("useFormField should be used within <FormField>");
15
- const { id: i } = e;
16
+ const { id: i } = t;
16
17
  return {
17
18
  id: i,
18
- name: t.name,
19
+ name: e.name,
19
20
  formItemId: `${i}-form-item`,
20
21
  formDescriptionId: `${i}-form-item-description`,
21
22
  formMessageId: `${i}-form-item-message`,
@@ -24,20 +25,20 @@ const y = u, c = s.createContext(
24
25
  }, l = s.createContext(
25
26
  {}
26
27
  );
27
- function $({ className: t, ...e }) {
28
+ function $({ className: e, ...t }) {
28
29
  const o = s.useId();
29
30
  return /* @__PURE__ */ m(l.Provider, { value: { id: o }, children: /* @__PURE__ */ m(
30
31
  "div",
31
32
  {
32
33
  "data-slot": "form-item",
33
- className: a("grid gap-2", t),
34
- ...e
34
+ className: a("grid gap-2", e),
35
+ ...t
35
36
  }
36
37
  ) });
37
38
  }
38
39
  function D({
39
- className: t,
40
- ...e
40
+ className: e,
41
+ ...t
41
42
  }) {
42
43
  const { error: o, formItemId: r } = d();
43
44
  return /* @__PURE__ */ m(
@@ -45,46 +46,46 @@ function D({
45
46
  {
46
47
  "data-slot": "form-label",
47
48
  "data-error": !!o,
48
- className: a("data-[error=true]:text-destructive", t),
49
+ className: a("data-[error=true]:text-destructive", e),
49
50
  htmlFor: r,
50
- ...e
51
+ ...t
51
52
  }
52
53
  );
53
54
  }
54
- function M({ ...t }) {
55
- const { error: e, formItemId: o, formDescriptionId: r, formMessageId: n } = d();
55
+ function M({ ...e }) {
56
+ const { error: t, formItemId: o, formDescriptionId: r, formMessageId: n } = d();
56
57
  return /* @__PURE__ */ m(
57
58
  f.Root,
58
59
  {
59
60
  "data-slot": "form-control",
60
61
  id: o,
61
- "aria-describedby": e ? `${r} ${n}` : `${r}`,
62
- "aria-invalid": !!e,
63
- ...t
62
+ "aria-describedby": t ? `${r} ${n}` : `${r}`,
63
+ "aria-invalid": !!t,
64
+ ...e
64
65
  }
65
66
  );
66
67
  }
67
- function N({ className: t, ...e }) {
68
+ function N({ className: e, ...t }) {
68
69
  const { formDescriptionId: o } = d();
69
70
  return /* @__PURE__ */ m(
70
71
  "p",
71
72
  {
72
73
  "data-slot": "form-description",
73
74
  id: o,
74
- className: a("typo-body-sm text-muted-foreground", t),
75
- ...e
75
+ className: a("typo-body-sm text-muted-foreground", e),
76
+ ...t
76
77
  }
77
78
  );
78
79
  }
79
- function w({ className: t, ...e }) {
80
- const { error: o, formMessageId: r } = d(), n = o ? String(o?.message ?? "") : e.children;
80
+ function w({ className: e, ...t }) {
81
+ const { error: o, formMessageId: r } = d(), n = o ? String(o?.message ?? "") : t.children;
81
82
  return n ? /* @__PURE__ */ m(
82
83
  "p",
83
84
  {
84
85
  "data-slot": "form-message",
85
86
  id: r,
86
- className: a("typo-body-sm text-destructive", t),
87
- ...e,
87
+ className: a("typo-body-sm text-destructive", e),
88
+ ...t,
88
89
  children: n
89
90
  }
90
91
  ) : null;
@@ -1,120 +1,123 @@
1
1
  import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { MoreHorizontalIcon as l, ChevronRightIcon as c, ChevronLeftIcon as m } from "lucide-react";
3
+ import { MoreHorizontalIcon as c, ChevronRightIcon as p, ChevronLeftIcon as u } from "lucide-react";
4
4
  import { cn as t } from "../../lib/utils.js";
5
- import { buttonVariants as p } from "./button.js";
6
- function x({ className: a, ...n }) {
5
+ import { resolveLinkComponent as f } from "../../lib/link-component.js";
6
+ import { buttonVariants as d } from "./button.js";
7
+ function v({ className: n, ...a }) {
7
8
  return /* @__PURE__ */ i(
8
9
  "nav",
9
10
  {
10
11
  role: "navigation",
11
12
  "aria-label": "pagination",
12
13
  "data-slot": "pagination",
13
- className: t("mx-auto flex w-full justify-center", a),
14
- ...n
14
+ className: t("mx-auto flex w-full justify-center", n),
15
+ ...a
15
16
  }
16
17
  );
17
18
  }
18
- function N({
19
- className: a,
20
- ...n
19
+ function b({
20
+ className: n,
21
+ ...a
21
22
  }) {
22
23
  return /* @__PURE__ */ i(
23
24
  "ul",
24
25
  {
25
26
  "data-slot": "pagination-content",
26
- className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", a),
27
- ...n
27
+ className: t("flex flex-row flex-wrap items-center justify-center gap-0.5 sm:gap-1", n),
28
+ ...a
28
29
  }
29
30
  );
30
31
  }
31
- function P({ ...a }) {
32
- return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
32
+ function j({ ...n }) {
33
+ return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...n });
33
34
  }
34
35
  function o({
35
- className: a,
36
- isActive: n,
36
+ className: n,
37
+ isActive: a,
37
38
  size: r = "icon",
38
- ...s
39
+ linkComponent: s,
40
+ ...l
39
41
  }) {
42
+ const m = f(s);
40
43
  return /* @__PURE__ */ i(
41
- "a",
44
+ m,
42
45
  {
43
- "aria-current": n ? "page" : void 0,
46
+ "aria-current": a ? "page" : void 0,
44
47
  "data-slot": "pagination-link",
45
- "data-active": n,
48
+ "data-active": a,
46
49
  className: t(
47
- p({
48
- variant: n ? "secondary" : "ghost",
50
+ d({
51
+ variant: a ? "secondary" : "ghost",
49
52
  size: r
50
53
  }),
51
54
  "min-h-9 min-w-9 sm:min-h-10 sm:min-w-10",
52
- a
55
+ n
53
56
  ),
54
- ...s
57
+ ...l
55
58
  }
56
59
  );
57
60
  }
58
- function b({
59
- className: a,
60
- ...n
61
+ function w({
62
+ className: n,
63
+ ...a
61
64
  }) {
62
65
  return /* @__PURE__ */ e(
63
66
  o,
64
67
  {
65
68
  "aria-label": "前のページへ",
66
69
  size: "default",
67
- className: t("gap-1 px-2.5 sm:pl-2.5", a),
68
- ...n,
70
+ className: t("gap-1 px-2.5 sm:pl-2.5", n),
71
+ ...a,
69
72
  children: [
70
- /* @__PURE__ */ i(m, {}),
73
+ /* @__PURE__ */ i(u, {}),
71
74
  /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "前へ" })
72
75
  ]
73
76
  }
74
77
  );
75
78
  }
76
- function v({
77
- className: a,
78
- ...n
79
+ function y({
80
+ className: n,
81
+ ...a
79
82
  }) {
80
83
  return /* @__PURE__ */ e(
81
84
  o,
82
85
  {
83
86
  "aria-label": "次のページへ",
84
87
  size: "default",
85
- className: t("gap-1 px-2.5 sm:pr-2.5", a),
86
- ...n,
88
+ className: t("gap-1 px-2.5 sm:pr-2.5", n),
89
+ ...a,
87
90
  children: [
88
91
  /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "次へ" }),
89
- /* @__PURE__ */ i(c, {})
92
+ /* @__PURE__ */ i(p, {})
90
93
  ]
91
94
  }
92
95
  );
93
96
  }
94
- function j({
95
- className: a,
96
- ...n
97
+ function z({
98
+ className: n,
99
+ ...a
97
100
  }) {
98
101
  return /* @__PURE__ */ e(
99
102
  "span",
100
103
  {
101
104
  "aria-hidden": !0,
102
105
  "data-slot": "pagination-ellipsis",
103
- className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", a),
104
- ...n,
106
+ className: t("flex size-10 shrink-0 items-center justify-center text-muted-foreground", n),
107
+ ...a,
105
108
  children: [
106
- /* @__PURE__ */ i(l, { className: "size-4" }),
109
+ /* @__PURE__ */ i(c, { className: "size-4" }),
107
110
  /* @__PURE__ */ i("span", { className: "sr-only", children: "その他のページ" })
108
111
  ]
109
112
  }
110
113
  );
111
114
  }
112
115
  export {
113
- x as Pagination,
114
- N as PaginationContent,
115
- j as PaginationEllipsis,
116
- P as PaginationItem,
116
+ v as Pagination,
117
+ b as PaginationContent,
118
+ z as PaginationEllipsis,
119
+ j as PaginationItem,
117
120
  o as PaginationLink,
118
- v as PaginationNext,
119
- b as PaginationPrevious
121
+ y as PaginationNext,
122
+ w as PaginationPrevious
120
123
  };
@@ -1,18 +1,19 @@
1
+ "use client";
1
2
  import { jsx as t } from "react/jsx-runtime";
2
3
  import "react";
3
4
  import { Popover as e } from "radix-ui";
4
5
  import { cn as d } from "../../lib/utils.js";
5
- function f({
6
+ function l({
6
7
  ...o
7
8
  }) {
8
9
  return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
9
10
  }
10
- function l({
11
+ function c({
11
12
  ...o
12
13
  }) {
13
14
  return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
14
15
  }
15
- function c({
16
+ function f({
16
17
  className: o,
17
18
  align: r = "center",
18
19
  sideOffset: a = 4,
@@ -32,14 +33,14 @@ function c({
32
33
  }
33
34
  ) });
34
35
  }
35
- function v({
36
+ function u({
36
37
  ...o
37
38
  }) {
38
39
  return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
39
40
  }
40
41
  export {
41
- f as Popover,
42
- v as PopoverAnchor,
43
- c as PopoverContent,
44
- l as PopoverTrigger
42
+ l as Popover,
43
+ u as PopoverAnchor,
44
+ f as PopoverContent,
45
+ c as PopoverTrigger
45
46
  };
@@ -1,9 +1,10 @@
1
+ "use client";
1
2
  import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
3
  import * as l from "react";
3
4
  import { RadioGroup as i } from "radix-ui";
4
5
  import { cn as e } from "../../lib/utils.js";
5
6
  import { FOCUS_RING as m } from "../../lib/focus-ring.js";
6
- import { chipVariants as p } from "./chip-variants.js";
7
+ import { chipVariants as u } from "./chip-variants.js";
7
8
  const n = l.createContext("tile");
8
9
  function x({
9
10
  className: o,
@@ -38,7 +39,7 @@ function y({
38
39
  className: e(
39
40
  // Chip 本体と同一の chipVariants(CVA)を再利用。unselected=filled 意匠。
40
41
  // レイアウト・サイズ・角丸・typo・focus リングはここから供給され、Chip 意匠変更に自動追従する。
41
- p({ variant: "filled", size: "md", shape: "pill" }),
42
+ u({ variant: "filled", size: "md", shape: "pill" }),
42
43
  "cursor-pointer outline-none",
43
44
  // checked = Chip の accent(selected)意匠。Chip accent と同一トークンを参照し、
44
45
  // 静止=薄オレンジ / hover=ベタ塗りオレンジ(Text-on-Inverse)まで一致させる。
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as t } from "react/jsx-runtime";
2
3
  import * as l from "react";
3
4
  import { cn as c } from "../../lib/utils.js";
@@ -1,20 +1,21 @@
1
+ "use client";
1
2
  import { jsx as i } from "react/jsx-runtime";
2
3
  import "react";
3
- import { Separator as n } from "radix-ui";
4
- import { cn as e } from "../../lib/utils.js";
5
- function d({
4
+ import { Separator as e } from "radix-ui";
5
+ import { cn as n } from "../../lib/utils.js";
6
+ function c({
6
7
  className: t,
7
8
  orientation: o = "horizontal",
8
9
  decorative: r = !0,
9
10
  ...a
10
11
  }) {
11
12
  return /* @__PURE__ */ i(
12
- n.Root,
13
+ e.Root,
13
14
  {
14
15
  "data-slot": "separator",
15
16
  decorative: r,
16
17
  orientation: o,
17
- className: e(
18
+ className: n(
18
19
  "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
20
  t
20
21
  ),
@@ -23,5 +24,5 @@ function d({
23
24
  );
24
25
  }
25
26
  export {
26
- d as Separator
27
+ c as Separator
27
28
  };
@@ -1,27 +1,27 @@
1
1
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import "react";
3
- import { XIcon as u } from "lucide-react";
3
+ import { XIcon as h } from "lucide-react";
4
4
  import { Dialog as a } from "radix-ui";
5
5
  import { cn as r } from "../../lib/utils.js";
6
- function x({ ...t }) {
6
+ function y({ ...t }) {
7
7
  return /* @__PURE__ */ e(a.Root, { "data-slot": "sheet", ...t });
8
8
  }
9
- function b({
9
+ function N({
10
10
  ...t
11
11
  }) {
12
12
  return /* @__PURE__ */ e(a.Trigger, { "data-slot": "sheet-trigger", ...t });
13
13
  }
14
- function y({
14
+ function w({
15
15
  ...t
16
16
  }) {
17
17
  return /* @__PURE__ */ e(a.Close, { "data-slot": "sheet-close", ...t });
18
18
  }
19
- function c({
19
+ function m({
20
20
  ...t
21
21
  }) {
22
22
  return /* @__PURE__ */ e(a.Portal, { "data-slot": "sheet-portal", ...t });
23
23
  }
24
- function f({
24
+ function p({
25
25
  className: t,
26
26
  ...o
27
27
  }) {
@@ -37,34 +37,41 @@ function f({
37
37
  }
38
38
  );
39
39
  }
40
- function S({
40
+ function D({
41
41
  className: t,
42
42
  children: o,
43
- side: s = "right",
44
- showCloseButton: l = !0,
45
- ...d
43
+ side: n = "right",
44
+ showCloseButton: d = !0,
45
+ autoFocus: l = !0,
46
+ onOpenAutoFocus: u,
47
+ onCloseAutoFocus: c,
48
+ ...f
46
49
  }) {
47
- return /* @__PURE__ */ i(c, { children: [
48
- /* @__PURE__ */ e(f, {}),
50
+ return /* @__PURE__ */ i(m, { children: [
51
+ /* @__PURE__ */ e(p, {}),
49
52
  /* @__PURE__ */ i(
50
53
  a.Content,
51
54
  {
52
55
  "data-slot": "sheet-content",
53
- onOpenAutoFocus: (n) => n.preventDefault(),
54
- onCloseAutoFocus: (n) => n.preventDefault(),
56
+ onOpenAutoFocus: (s) => {
57
+ l || s.preventDefault(), u?.(s);
58
+ },
59
+ onCloseAutoFocus: (s) => {
60
+ l || s.preventDefault(), c?.(s);
61
+ },
55
62
  className: r(
56
- "fixed z-[var(--Z-Modal)] flex flex-col gap-4 border-[var(--Border-Medium-Emphasis)] bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-[var(--Motion-Duration-Slow)] data-[state=open]:animate-in data-[state=open]:duration-[var(--Motion-Duration-Slower)]",
57
- s === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
58
- s === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
59
- s === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
60
- s === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
63
+ "fixed z-[var(--Z-Modal)] flex flex-col gap-4 border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Elevated)] shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-[var(--Motion-Duration-Slow)] data-[state=open]:animate-in data-[state=open]:duration-[var(--Motion-Duration-Slower)]",
64
+ n === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
65
+ n === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
66
+ n === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
67
+ n === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
61
68
  t
62
69
  ),
63
- ...d,
70
+ ...f,
64
71
  children: [
65
72
  o,
66
- l && /* @__PURE__ */ i(a.Close, { className: "absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)] focus:outline-hidden disabled:pointer-events-none", children: [
67
- /* @__PURE__ */ e(u, { className: "size-5" }),
73
+ d && /* @__PURE__ */ i(a.Close, { className: "absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)] focus:outline-hidden disabled:pointer-events-none", children: [
74
+ /* @__PURE__ */ e(h, { className: "size-5" }),
68
75
  /* @__PURE__ */ e("span", { className: "sr-only", children: "閉じる" })
69
76
  ] })
70
77
  ]
@@ -72,7 +79,7 @@ function S({
72
79
  )
73
80
  ] });
74
81
  }
75
- function N({ className: t, ...o }) {
82
+ function T({ className: t, ...o }) {
76
83
  return /* @__PURE__ */ e(
77
84
  "div",
78
85
  {
@@ -82,7 +89,7 @@ function N({ className: t, ...o }) {
82
89
  }
83
90
  );
84
91
  }
85
- function w({ className: t, ...o }) {
92
+ function C({ className: t, ...o }) {
86
93
  return /* @__PURE__ */ e(
87
94
  "div",
88
95
  {
@@ -92,7 +99,7 @@ function w({ className: t, ...o }) {
92
99
  }
93
100
  );
94
101
  }
95
- function D({
102
+ function E({
96
103
  className: t,
97
104
  ...o
98
105
  }) {
@@ -105,7 +112,7 @@ function D({
105
112
  }
106
113
  );
107
114
  }
108
- function T({
115
+ function M({
109
116
  className: t,
110
117
  ...o
111
118
  }) {
@@ -119,12 +126,12 @@ function T({
119
126
  );
120
127
  }
121
128
  export {
122
- x as Sheet,
123
- y as SheetClose,
124
- S as SheetContent,
125
- T as SheetDescription,
126
- w as SheetFooter,
127
- N as SheetHeader,
128
- D as SheetTitle,
129
- b as SheetTrigger
129
+ y as Sheet,
130
+ w as SheetClose,
131
+ D as SheetContent,
132
+ M as SheetDescription,
133
+ C as SheetFooter,
134
+ T as SheetHeader,
135
+ E as SheetTitle,
136
+ N as SheetTrigger
130
137
  };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as y, jsx as s } from "react/jsx-runtime";
2
3
  import * as p from "react";
3
4
  import { Slider as i } from "radix-ui";
@@ -6,8 +7,8 @@ import { FOCUS_RING as w } from "../../lib/focus-ring.js";
6
7
  import { useFieldLabelling as k } from "../../lib/field-labelling.js";
7
8
  function O({
8
9
  className: b,
9
- defaultValue: t,
10
- value: e,
10
+ defaultValue: e,
11
+ value: t,
11
12
  min: l = 0,
12
13
  max: n = 100,
13
14
  thumbLabels: d,
@@ -16,8 +17,8 @@ function O({
16
17
  ...u
17
18
  }) {
18
19
  const h = k(), m = p.useMemo(
19
- () => Array.isArray(e) ? e : Array.isArray(t) ? t : [l, n],
20
- [e, t, l, n]
20
+ () => Array.isArray(t) ? t : Array.isArray(e) ? e : [l, n],
21
+ [t, e, l, n]
21
22
  ), v = (r, a) => {
22
23
  if (d?.[r]) return { "aria-label": d[r] };
23
24
  if (c) {
@@ -30,8 +31,8 @@ function O({
30
31
  i.Root,
31
32
  {
32
33
  "data-slot": "slider",
33
- defaultValue: t,
34
- value: e,
34
+ defaultValue: e,
35
+ value: t,
35
36
  min: l,
36
37
  max: n,
37
38
  className: o(
@@ -1,36 +1,56 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as v } from "../../lib/utils.js";
4
- const s = {
4
+ const d = {
5
5
  line: "var(--Third-Party-LINE)",
6
6
  x: "var(--Third-Party-X)",
7
7
  facebook: "var(--Third-Party-Facebook)",
8
8
  apple: "var(--Third-Party-Apple)"
9
- }, d = {
9
+ }, s = {
10
10
  line: "M12 2C6.48 2 2 5.81 2 10.4c0 4.17 3.74 7.65 8.78 8.3.34.07.8.22.92.5.1.26.07.67.03.93l-.15.86c-.04.25-.2.98.87.54s5.8-3.41 7.91-5.84C22.14 13.65 22 11.14 22 10.4 22 5.81 17.52 2 12 2zm-3.18 11.1H6.57a.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v3.68h1.75a.5.5 0 01.5.5.5.5 0 01-.5.5zm1.67-.5a.5.5 0 01-.5.5.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v4.18zm4.63 0a.5.5 0 01-.4.49.5.5 0 01-.13.01.5.5 0 01-.4-.21l-2.39-3.24v2.95a.5.5 0 01-.5.5.5.5 0 01-.5-.5V8.42a.5.5 0 01.4-.49h.1a.5.5 0 01.4.21l2.39 3.24V8.42a.5.5 0 01.5-.5.5.5 0 01.5.5v4.18h-.47zm2.7-2.6a.5.5 0 01.5.5.5.5 0 01-.5.5h-1.75v1.1h1.75a.5.5 0 01.5.5.5.5 0 01-.5.5H16.1a.5.5 0 01-.5-.5V8.42a.5.5 0 01.5-.5h2.25a.5.5 0 01.5.5.5.5 0 01-.5.5h-1.75v1.08h1.75z",
11
11
  x: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",
12
12
  facebook: "M22 12a10 10 0 1 0-11.56 9.88v-6.99H7.9V12h2.54V9.8c0-2.5 1.49-3.89 3.77-3.89 1.09 0 2.23.2 2.23.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56V12h2.77l-.44 2.89h-2.33v6.99A10 10 0 0 0 22 12",
13
13
  apple: "M16.5 12.8c0-2.2 1.8-3.2 1.9-3.3-1-1.5-2.6-1.7-3.2-1.7-1.3-.1-2.6.8-3.3.8s-1.7-.8-2.8-.8c-1.5 0-2.8.8-3.6 2.2-1.5 2.6-.4 6.5 1.1 8.7.7 1 1.6 2.2 2.7 2.2s1.5-.7 2.8-.7 1.7.7 2.8.7c1.2 0 1.9-1.1 2.6-2.1.8-1.2 1.2-2.4 1.2-2.5 0 0-2.2-.9-2.2-3.5M14.3 6.4c.6-.7 1-1.7.9-2.8-.9 0-1.9.6-2.5 1.3-.6.6-1 1.7-.9 2.7 1 .1 1.9-.5 2.5-1.2"
14
14
  };
15
- function p({ platform: a, size: c = 24, tone: h = "brand", className: t, style: e, ...i }) {
16
- const l = h === "mono", o = {
15
+ function u({ platform: a, size: o = 24, tone: n = "brand", className: t, style: e, ...i }) {
16
+ const l = n === "mono", c = {
17
17
  viewBox: "0 0 24 24",
18
18
  "aria-hidden": !0,
19
19
  className: v("shrink-0", t),
20
- style: { width: c, height: c, ...e },
20
+ style: { width: o, height: o, ...e },
21
21
  ...i
22
22
  };
23
- return a === "google" ? /* @__PURE__ */ n("svg", { ...o, fill: "none", children: [
23
+ return a === "google" ? /* @__PURE__ */ h("svg", { ...c, fill: "none", children: [
24
24
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#4285F4", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" }),
25
25
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#34A853", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }),
26
26
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }),
27
27
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })
28
- ] }) : a === "amazon" ? /* @__PURE__ */ n("svg", { ...o, fill: "none", children: [
28
+ ] }) : a === "amazon" ? /* @__PURE__ */ h("svg", { ...c, fill: "none", children: [
29
29
  /* @__PURE__ */ r("path", { transform: "translate(-2.4 0) scale(1.2 1)", fill: "currentColor", d: "M13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705a.66.66 0 0 1-.753.077c-1.06-.878-1.25-1.287-1.829-2.126-1.748 1.783-2.988 2.317-5.253 2.317-2.682 0-4.77-1.656-4.77-4.967 0-2.586 1.402-4.347 3.395-5.206 1.728-.762 4.14-.897 5.983-1.107v-.414c0-.762.058-1.664-.39-2.322-.387-.586-1.13-.83-1.788-.83-1.214 0-2.296.623-2.56 1.914-.054.293-.264.58-.553.595l-3.094-.333a.577.577 0 0 1-.481-.675C5.765 1.677 9.16.578 12.232.578c1.553 0 3.583.414 4.808 1.59 1.553 1.44 1.406 3.362 1.406 5.456v4.94c0 1.484.616 2.136 1.195 2.937.203.284.248.624-.01.835l-2.488 2.14v.32z" }),
30
30
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FF9900", d: "M21.397 19.78c-2.768 2.04-6.783 3.13-10.238 3.13-4.84 0-9.198-1.79-12.496-4.764-.259-.234-.029-.553.283-.371 3.558 2.068 7.957 3.316 12.504 3.316 3.067 0 6.44-.636 9.543-1.952.467-.2.862.307.404.641z" }),
31
31
  /* @__PURE__ */ r("path", { fill: l ? "currentColor" : "#FF9900", d: "M22.338 18.549c-.363-.464-2.397-.22-3.31-.111-.279.033-.321-.207-.071-.381 1.622-1.14 4.282-.811 4.593-.429.312.387-.082 3.07-1.605 4.352-.234.196-.457.091-.354-.169.343-.855 1.11-2.8.747-3.262z" })
32
- ] }) : /* @__PURE__ */ r("svg", { ...o, fill: l ? "currentColor" : s[a], children: /* @__PURE__ */ r("path", { d: d[a] }) });
32
+ ] }) : a === "hatena" ? /* @__PURE__ */ h("svg", { ...c, fill: "none", children: [
33
+ !l && /* @__PURE__ */ r(
34
+ "rect",
35
+ {
36
+ x: "1",
37
+ y: "1",
38
+ width: "22",
39
+ height: "22",
40
+ rx: "4",
41
+ fill: "var(--Third-Party-Hatena)"
42
+ }
43
+ ),
44
+ /* @__PURE__ */ r(
45
+ "path",
46
+ {
47
+ fillRule: "evenodd",
48
+ fill: l ? "currentColor" : "#FFFFFF",
49
+ d: "M6 6h4.4c2 0 3.2 1 3.2 2.7 0 1.1-.6 1.9-1.6 2.3 1.3.4 2.1 1.4 2.1 2.8 0 2-1.4 3.2-3.7 3.2H6V6Zm2.4 4.4h1.7c.85 0 1.3-.38 1.3-1.05s-.45-1.05-1.3-1.05H8.4v2.1Zm0 4.5h2c.95 0 1.45-.42 1.45-1.15s-.5-1.15-1.45-1.15h-2v2.3ZM16.2 6h2.4v6.6h-2.4V6Zm0 8.2h2.4V17h-2.4v-2.8Z"
50
+ }
51
+ )
52
+ ] }) : /* @__PURE__ */ r("svg", { ...c, fill: l ? "currentColor" : d[a], children: /* @__PURE__ */ r("path", { d: s[a] }) });
33
53
  }
34
54
  export {
35
- p as SocialIcon
55
+ u as SocialIcon
36
56
  };