@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
|
@@ -7,17 +7,17 @@ import j from "iconsax-reactjs/dist/esm/ArrowUp2.js";
|
|
|
7
7
|
import S from "iconsax-reactjs/dist/esm/Add.js";
|
|
8
8
|
import { X as M } from "lucide-react";
|
|
9
9
|
import { cn as A } from "../../lib/utils.js";
|
|
10
|
-
import { Button as
|
|
11
|
-
const v = "flex min-h-12 items-center gap-1 mx-2 rounded-lg px-2 py-3 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] active:bg-[var(--Surface-Tertiary)]";
|
|
10
|
+
import { Button as u } from "../foundations/button.js";
|
|
11
|
+
const v = "flex min-h-12 items-center gap-1 mx-2 rounded-lg px-2 py-3 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Neutral-Secondary)] active:bg-[var(--Surface-Neutral-Tertiary)]";
|
|
12
12
|
function U({
|
|
13
13
|
userName: r,
|
|
14
14
|
isLoggedIn: t = !1,
|
|
15
15
|
hideLoginLink: o = !1,
|
|
16
|
-
sections:
|
|
16
|
+
sections: N,
|
|
17
17
|
banners: c,
|
|
18
18
|
onClose: d,
|
|
19
19
|
onLogin: m,
|
|
20
|
-
loginHref:
|
|
20
|
+
loginHref: g = "/security/login_link/",
|
|
21
21
|
className: b,
|
|
22
22
|
linkComponent: h,
|
|
23
23
|
...y
|
|
@@ -46,7 +46,7 @@ function U({
|
|
|
46
46
|
"さま"
|
|
47
47
|
] }) }) : /* @__PURE__ */ e("div", {}),
|
|
48
48
|
d && /* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
u,
|
|
50
50
|
{
|
|
51
51
|
variant: "ghost",
|
|
52
52
|
size: "icon-sm",
|
|
@@ -60,7 +60,7 @@ function U({
|
|
|
60
60
|
/* @__PURE__ */ e("div", { className: "py-2", children: /* @__PURE__ */ e("ul", { children: /* @__PURE__ */ e("li", { children: /* @__PURE__ */ l(
|
|
61
61
|
p,
|
|
62
62
|
{
|
|
63
|
-
href:
|
|
63
|
+
href: g,
|
|
64
64
|
onClick: m ? (a) => {
|
|
65
65
|
a.preventDefault(), m();
|
|
66
66
|
} : void 0,
|
|
@@ -74,18 +74,18 @@ function U({
|
|
|
74
74
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-[var(--Border-Low-Emphasis)]" })
|
|
75
75
|
] }),
|
|
76
76
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto", children: [
|
|
77
|
-
|
|
77
|
+
N.map((a, i) => /* @__PURE__ */ l("div", { children: [
|
|
78
78
|
a.border && /* @__PURE__ */ e("div", { className: "h-px w-full bg-[var(--Border-Low-Emphasis)]" }),
|
|
79
79
|
/* @__PURE__ */ l("div", { className: "py-2", children: [
|
|
80
80
|
a.title && /* @__PURE__ */ e("div", { className: "px-4 pb-1 pt-2", children: /* @__PURE__ */ l("p", { className: "flex items-center gap-1 typo-label-md font-bold text-[var(--Text-High-Emphasis)]", children: [
|
|
81
81
|
a.icon && /* @__PURE__ */ e("span", { className: "flex size-5 shrink-0 items-center justify-center", children: a.icon }),
|
|
82
82
|
/* @__PURE__ */ e("span", { children: a.title })
|
|
83
83
|
] }) }),
|
|
84
|
-
/* @__PURE__ */ e("ul", { children: a.items.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
84
|
+
/* @__PURE__ */ e("ul", { children: a.items.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(x, { linkComponent: h, item: s }) }, s.label)) }),
|
|
85
85
|
a.itemsExtra && a.itemsExtra.length > 0 && /* @__PURE__ */ l(n, { children: [
|
|
86
|
-
f.has(i) && /* @__PURE__ */ e("ul", { children: a.itemsExtra.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
86
|
+
f.has(i) && /* @__PURE__ */ e("ul", { children: a.itemsExtra.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(x, { linkComponent: h, item: s }) }, s.label)) }),
|
|
87
87
|
/* @__PURE__ */ e(
|
|
88
|
-
|
|
88
|
+
u,
|
|
89
89
|
{
|
|
90
90
|
variant: "ghost",
|
|
91
91
|
className: "flex w-full items-center justify-center gap-1 rounded-none px-4 py-3 typo-label-md text-[var(--Text-Accent-Primary)]",
|
|
@@ -123,7 +123,7 @@ function U({
|
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function x({ item: r, linkComponent: t }) {
|
|
127
127
|
return /* @__PURE__ */ l(
|
|
128
128
|
t ?? "a",
|
|
129
129
|
{
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { ChevronsUpDown as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Command as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { useFieldLabelling as
|
|
10
|
-
import { HIGH_CONTRAST_OUTLINE as
|
|
11
|
-
import { Chip as
|
|
12
|
-
function
|
|
13
|
-
options:
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { ChevronsUpDown as O, Check as P } from "lucide-react";
|
|
5
|
+
import { cn as f } from "../../lib/utils.js";
|
|
6
|
+
import { Button as k } from "../foundations/button.js";
|
|
7
|
+
import { Command as B, CommandInput as H, CommandList as F, CommandEmpty as G, CommandGroup as M, CommandItem as U } from "../foundations/command.js";
|
|
8
|
+
import { Popover as _, PopoverTrigger as $, PopoverContent as q } from "../foundations/popover.js";
|
|
9
|
+
import { useFieldLabelling as z, resolveFieldAria as D } from "../../lib/field-labelling.js";
|
|
10
|
+
import { HIGH_CONTRAST_OUTLINE as J } from "../../lib/high-contrast.js";
|
|
11
|
+
import { Chip as K } from "./chip.js";
|
|
12
|
+
function ie({
|
|
13
|
+
options: p,
|
|
14
14
|
value: l = [],
|
|
15
|
-
onValueChange:
|
|
16
|
-
placeholder:
|
|
17
|
-
searchPlaceholder:
|
|
18
|
-
emptyLabel:
|
|
19
|
-
disabled:
|
|
20
|
-
className:
|
|
21
|
-
id:
|
|
22
|
-
"aria-invalid":
|
|
23
|
-
"aria-describedby":
|
|
24
|
-
"aria-label":
|
|
25
|
-
"aria-labelledby":
|
|
15
|
+
onValueChange: w,
|
|
16
|
+
placeholder: v = "選択してください",
|
|
17
|
+
searchPlaceholder: E = "検索",
|
|
18
|
+
emptyLabel: T = "候補がありません",
|
|
19
|
+
disabled: h,
|
|
20
|
+
className: I,
|
|
21
|
+
id: b,
|
|
22
|
+
"aria-invalid": g,
|
|
23
|
+
"aria-describedby": x,
|
|
24
|
+
"aria-label": n,
|
|
25
|
+
"aria-labelledby": t
|
|
26
26
|
}) {
|
|
27
|
-
const [
|
|
27
|
+
const [C, S] = s.useState(!1), o = p.filter((e) => l.includes(e.value)), c = z(), j = D(
|
|
28
28
|
{
|
|
29
|
-
id:
|
|
30
|
-
"aria-label":
|
|
31
|
-
"aria-labelledby":
|
|
32
|
-
"aria-describedby":
|
|
29
|
+
id: b,
|
|
30
|
+
"aria-label": n,
|
|
31
|
+
"aria-labelledby": t,
|
|
32
|
+
"aria-describedby": x,
|
|
33
33
|
// 渡さないと、利用側の明示指定が FormField 由来の値(error の有無)で上書きされる
|
|
34
|
-
"aria-invalid":
|
|
34
|
+
"aria-invalid": g
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
),
|
|
38
|
-
return
|
|
39
|
-
const e =
|
|
36
|
+
c
|
|
37
|
+
), m = !c && !n && !t ? v : void 0, A = t ? { "aria-labelledby": t } : n ?? m ? { "aria-label": n ?? m } : c ? { "aria-labelledby": c.labelId } : {}, y = (e) => w?.(l.includes(e) ? l.filter((a) => a !== e) : [...l, e]), N = s.useRef(null), u = s.useRef(null), d = s.useRef(null);
|
|
38
|
+
return s.useEffect(() => {
|
|
39
|
+
const e = d.current;
|
|
40
40
|
if (!e) return;
|
|
41
41
|
const a = document.activeElement;
|
|
42
42
|
if (l.includes(e.value)) {
|
|
43
|
-
a?.isConnected &&
|
|
43
|
+
a?.isConnected && u.current?.contains(a) || (d.current = null);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
if (d.current = null, a && a !== document.body && a.isConnected) return;
|
|
47
|
+
const R = Array.from(
|
|
48
|
+
u.current?.querySelectorAll('[data-slot="chip-remove"]') ?? []
|
|
49
49
|
);
|
|
50
|
-
(
|
|
51
|
-
}, [l]), /* @__PURE__ */ i("div", { "data-slot": "multi-select", className:
|
|
52
|
-
/* @__PURE__ */ i(
|
|
53
|
-
/* @__PURE__ */ r(
|
|
54
|
-
|
|
50
|
+
(R[e.index] ?? R[e.index - 1] ?? N.current)?.focus();
|
|
51
|
+
}, [l]), /* @__PURE__ */ i("div", { "data-slot": "multi-select", className: f("flex flex-col gap-2", I), children: [
|
|
52
|
+
/* @__PURE__ */ i(_, { open: C, onOpenChange: S, children: [
|
|
53
|
+
/* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ i(
|
|
54
|
+
k,
|
|
55
55
|
{
|
|
56
|
-
ref:
|
|
56
|
+
ref: N,
|
|
57
57
|
type: "button",
|
|
58
58
|
variant: "tertiary",
|
|
59
59
|
role: "combobox",
|
|
60
|
-
id:
|
|
61
|
-
"aria-expanded":
|
|
60
|
+
id: b,
|
|
61
|
+
"aria-expanded": C,
|
|
62
62
|
"aria-haspopup": "listbox",
|
|
63
|
-
"aria-invalid":
|
|
64
|
-
"aria-describedby":
|
|
65
|
-
"aria-label":
|
|
66
|
-
"aria-labelledby":
|
|
63
|
+
"aria-invalid": g,
|
|
64
|
+
"aria-describedby": x,
|
|
65
|
+
"aria-label": n ?? m,
|
|
66
|
+
"aria-labelledby": t,
|
|
67
67
|
...j,
|
|
68
|
-
disabled:
|
|
69
|
-
className:
|
|
68
|
+
disabled: h,
|
|
69
|
+
className: f(
|
|
70
70
|
"w-full justify-between bg-[var(--Surface-Primary)]",
|
|
71
71
|
// 高コントラスト(prefers-contrast: more / data-contrast="more")のときだけ見える内側 1px の輪郭(#301)
|
|
72
|
-
|
|
72
|
+
J,
|
|
73
73
|
// エラー時の赤枠。トリガーは Button tertiary(枠幅 0)なので border 色だけ変えても見えず、
|
|
74
74
|
// border を足すと 1px 広がる。内側リング(inset-ring)で描いて高さを変えない。
|
|
75
75
|
// inset-ring は ring(フォーカスリング)と別の box-shadow 層なので同時に表示される。
|
|
@@ -79,23 +79,23 @@ function le({
|
|
|
79
79
|
"forced-colors:aria-invalid:outline-solid forced-colors:aria-invalid:outline-1 forced-colors:aria-invalid:-outline-offset-1 forced-colors:aria-invalid:outline-[CanvasText]"
|
|
80
80
|
),
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */ r("span", { className:
|
|
83
|
-
/* @__PURE__ */ r(
|
|
82
|
+
/* @__PURE__ */ r("span", { className: o.length ? "text-[var(--Text-High-Emphasis)]" : "text-[var(--Text-Low-Emphasis)]", children: o.length ? `${o.length}件選択中` : v }),
|
|
83
|
+
/* @__PURE__ */ r(O, { "aria-hidden": "true", className: "text-[var(--Object-Medium-Emphasis)]" })
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
) }),
|
|
87
|
-
/* @__PURE__ */ r(
|
|
88
|
-
/* @__PURE__ */ r(
|
|
89
|
-
/* @__PURE__ */ i(
|
|
90
|
-
/* @__PURE__ */ r(
|
|
91
|
-
/* @__PURE__ */ r(
|
|
92
|
-
|
|
87
|
+
/* @__PURE__ */ r(q, { align: "start", className: "w-[var(--radix-popover-trigger-width)] p-0", ...A, children: /* @__PURE__ */ i(B, { children: [
|
|
88
|
+
/* @__PURE__ */ r(H, { placeholder: E }),
|
|
89
|
+
/* @__PURE__ */ i(F, { children: [
|
|
90
|
+
/* @__PURE__ */ r(G, { children: T }),
|
|
91
|
+
/* @__PURE__ */ r(M, { children: p.map((e) => /* @__PURE__ */ i(
|
|
92
|
+
U,
|
|
93
93
|
{
|
|
94
94
|
value: [e.label, ...e.keywords ?? []].join(" "),
|
|
95
95
|
disabled: e.disabled,
|
|
96
|
-
onSelect: () =>
|
|
96
|
+
onSelect: () => y(e.value),
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */ r(
|
|
98
|
+
/* @__PURE__ */ r(P, { "aria-hidden": "true", className: f(l.includes(e.value) ? "opacity-100" : "opacity-0") }),
|
|
99
99
|
e.label,
|
|
100
100
|
l.includes(e.value) && /* @__PURE__ */ r("span", { className: "sr-only", children: "選択済み" })
|
|
101
101
|
]
|
|
@@ -105,15 +105,15 @@ function le({
|
|
|
105
105
|
] })
|
|
106
106
|
] }) })
|
|
107
107
|
] }),
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
o.length > 0 && /* @__PURE__ */ r("div", { ref: u, className: "flex flex-wrap gap-1.5", role: "group", "aria-label": "選択済み", children: o.map((e, a) => /* @__PURE__ */ r(
|
|
109
|
+
K,
|
|
110
110
|
{
|
|
111
111
|
removable: !0,
|
|
112
112
|
removeLabel: `${e.label}を削除`,
|
|
113
113
|
onRemove: () => {
|
|
114
|
-
|
|
114
|
+
d.current = { value: e.value, index: a }, y(e.value);
|
|
115
115
|
},
|
|
116
|
-
disabled:
|
|
116
|
+
disabled: h,
|
|
117
117
|
children: e.label
|
|
118
118
|
},
|
|
119
119
|
e.value
|
|
@@ -121,5 +121,5 @@ function le({
|
|
|
121
121
|
] });
|
|
122
122
|
}
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
ie as MultiSelect
|
|
125
125
|
};
|
|
@@ -3,24 +3,24 @@ import "react";
|
|
|
3
3
|
import h from "iconsax-reactjs/dist/esm/Notification.js";
|
|
4
4
|
import m from "iconsax-reactjs/dist/esm/ArrowRight2.js";
|
|
5
5
|
import { Badge as p } from "../foundations/badge.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as o } from "../../lib/utils.js";
|
|
7
7
|
function u({
|
|
8
8
|
notifications: r,
|
|
9
9
|
variant: n = "vertical",
|
|
10
10
|
emptyMessage: c = "新着のお知らせはありません",
|
|
11
11
|
linkComponent: d,
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
12
|
+
className: t,
|
|
13
|
+
...i
|
|
14
14
|
}) {
|
|
15
15
|
return r.length === 0 ? /* @__PURE__ */ s(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
18
|
"data-slot": "notification-list",
|
|
19
|
-
className:
|
|
19
|
+
className: o(
|
|
20
20
|
"flex flex-col items-center justify-center gap-3 py-12",
|
|
21
|
-
|
|
21
|
+
t
|
|
22
22
|
),
|
|
23
|
-
...
|
|
23
|
+
...i,
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ a(h, { size: 48, className: "text-[var(--Text-Low-Emphasis)]" }),
|
|
26
26
|
/* @__PURE__ */ a("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: c })
|
|
@@ -30,15 +30,15 @@ function u({
|
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
"data-slot": "notification-list",
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
33
|
+
className: o("w-full divide-y divide-[var(--Border-Low-Emphasis)]", t),
|
|
34
|
+
...i,
|
|
35
35
|
children: r.map((e) => {
|
|
36
|
-
const
|
|
36
|
+
const l = e.href ? d ?? "a" : "div";
|
|
37
37
|
return n === "horizontal" ? /* @__PURE__ */ s(
|
|
38
|
-
|
|
38
|
+
l,
|
|
39
39
|
{
|
|
40
40
|
...e.href ? { href: e.href } : {},
|
|
41
|
-
className: "flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--Surface-Secondary)]",
|
|
41
|
+
className: "flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ a("span", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)] shrink-0 w-[88px]", children: e.date }),
|
|
44
44
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
@@ -50,10 +50,10 @@ function u({
|
|
|
50
50
|
},
|
|
51
51
|
e.id
|
|
52
52
|
) : /* @__PURE__ */ s(
|
|
53
|
-
|
|
53
|
+
l,
|
|
54
54
|
{
|
|
55
55
|
...e.href ? { href: e.href } : {},
|
|
56
|
-
className: "flex items-start gap-3 px-4 py-3.5 transition-colors hover:bg-[var(--Surface-Secondary)]",
|
|
56
|
+
className: "flex items-start gap-3 px-4 py-3.5 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
57
57
|
children: [
|
|
58
58
|
/* @__PURE__ */ a("div", { className: "flex shrink-0 items-center pt-1.5", children: e.isUnread ? /* @__PURE__ */ a("span", { className: "size-2 rounded-full bg-[var(--Brand-Cake-Orange)]" }) : /* @__PURE__ */ a("span", { className: "size-2" }) }),
|
|
59
59
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|