@cascivo/react 0.6.3 → 0.7.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/README.md +13 -4
- package/dist/breadcrumb/breadcrumb.js +15 -15
- package/dist/card/card.css +1 -1
- package/dist/card/card.module.js +5 -5
- package/dist/dock/dock.js +21 -21
- package/dist/header/header.js +20 -20
- package/dist/index.d.ts +26 -1
- package/dist/layouts/src/columns/columns.css +1 -1
- package/dist/layouts/src/columns/columns.js +7 -3
- package/dist/layouts/src/columns/columns.module.js +4 -1
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.js +6 -3
- package/dist/layouts/src/grid/grid.module.js +3 -2
- package/dist/navigation-menu/navigation-menu.js +54 -50
- package/dist/relative-time/relative-time.js +2 -1
- package/dist/search/search.css +1 -1
- package/dist/search/search.module.js +5 -5
- package/dist/shell-header/shell-header.js +63 -63
- package/dist/side-nav/side-nav.js +127 -120
- package/dist/styles.css +5 -5
- package/dist/switcher/switcher.js +13 -11
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.module.js +7 -7
- package/dist/toc/use-toc-from-region.js +8 -7
- package/package.json +3 -3
- package/readme.body.md +13 -4
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { Tooltip as e } from "../tooltip/tooltip.js";
|
|
4
4
|
import { usePopover as t } from "../popover/use-popover.js";
|
|
5
5
|
import n from "./side-nav.module.js";
|
|
6
|
-
import { cn as r,
|
|
7
|
-
import { builtin as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { Fragment as
|
|
6
|
+
import { cn as r, getLinkComponent as i, useSignal as a, useSignals as o } from "@cascivo/core";
|
|
7
|
+
import { builtin as s, t as c } from "@cascivo/i18n";
|
|
8
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as f, useId as p } from "react";
|
|
10
10
|
//#region ../components/src/side-nav/side-nav.tsx
|
|
11
|
-
function
|
|
11
|
+
function m(e) {
|
|
12
12
|
return !("type" in e);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
function h() {
|
|
15
|
+
return /* @__PURE__ */ u("svg", {
|
|
16
16
|
viewBox: "0 0 16 16",
|
|
17
17
|
width: "14",
|
|
18
18
|
height: "14",
|
|
19
19
|
"aria-hidden": "true",
|
|
20
20
|
className: n.checkMark,
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ u("path", {
|
|
22
22
|
d: "M3.5 8.5l3 3 6-7",
|
|
23
23
|
fill: "none",
|
|
24
24
|
stroke: "currentColor",
|
|
@@ -28,60 +28,60 @@ function m() {
|
|
|
28
28
|
})
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
33
|
-
e.icon ? /* @__PURE__ */
|
|
31
|
+
function g(e, { inMenu: t, onActivate: a, extraClass: o }) {
|
|
32
|
+
let s = t ? "menuitem" : void 0, c = r(n.link, n.sublink, o), f = /* @__PURE__ */ d(l, { children: [
|
|
33
|
+
e.icon ? /* @__PURE__ */ u("span", {
|
|
34
34
|
className: n.icon,
|
|
35
35
|
"aria-hidden": "true",
|
|
36
36
|
children: e.icon
|
|
37
37
|
}) : null,
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ u("span", {
|
|
39
39
|
className: n.label,
|
|
40
40
|
children: e.label
|
|
41
41
|
}),
|
|
42
|
-
e.selected ? /* @__PURE__ */
|
|
42
|
+
e.selected ? /* @__PURE__ */ u(h, {}) : null
|
|
43
43
|
] });
|
|
44
|
-
return e.onSelect && !e.href ? /* @__PURE__ */
|
|
44
|
+
return e.onSelect && !e.href ? /* @__PURE__ */ u("button", {
|
|
45
45
|
type: "button",
|
|
46
|
-
role:
|
|
46
|
+
role: s,
|
|
47
47
|
"aria-current": e.active ? "page" : void 0,
|
|
48
48
|
"data-state": e.active ? "active" : void 0,
|
|
49
49
|
"data-selected": e.selected || void 0,
|
|
50
50
|
disabled: e.disabled,
|
|
51
|
-
className:
|
|
51
|
+
className: c,
|
|
52
52
|
onClick: () => {
|
|
53
|
-
e.onSelect?.(),
|
|
53
|
+
e.onSelect?.(), a?.();
|
|
54
54
|
},
|
|
55
|
-
children:
|
|
56
|
-
}) : /* @__PURE__ */
|
|
55
|
+
children: f
|
|
56
|
+
}) : /* @__PURE__ */ u(i(), {
|
|
57
57
|
href: e.disabled ? void 0 : e.href,
|
|
58
|
-
role:
|
|
58
|
+
role: s,
|
|
59
59
|
"aria-current": e.active ? "page" : void 0,
|
|
60
60
|
"aria-disabled": e.disabled || void 0,
|
|
61
61
|
tabIndex: e.disabled ? -1 : void 0,
|
|
62
62
|
"data-state": e.active ? "active" : void 0,
|
|
63
63
|
"data-selected": e.selected || void 0,
|
|
64
|
-
className:
|
|
64
|
+
className: c,
|
|
65
65
|
onClick: (t) => {
|
|
66
66
|
if (e.disabled) {
|
|
67
67
|
t.preventDefault();
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
e.onSelect?.(),
|
|
70
|
+
e.onSelect?.(), a?.();
|
|
71
71
|
},
|
|
72
|
-
children:
|
|
72
|
+
children: f
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function _(e) {
|
|
76
76
|
if (typeof Intl < "u" && "Segmenter" in Intl) {
|
|
77
77
|
let t = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
78
78
|
for (let n of t.segment(e)) return n.segment;
|
|
79
79
|
}
|
|
80
80
|
return [...e][0] ?? "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
let { triggerRef: r, popoverRef: i, isOpen: a, anchorName: o, open: s, close:
|
|
84
|
-
return /* @__PURE__ */
|
|
82
|
+
function v({ item: e }) {
|
|
83
|
+
let { triggerRef: r, popoverRef: i, isOpen: a, anchorName: o, open: s, close: c, toggle: p } = t(), h = "[role=\"menuitem\"]:not([disabled]):not([aria-disabled=\"true\"])";
|
|
84
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("button", {
|
|
85
85
|
ref: r,
|
|
86
86
|
type: "button",
|
|
87
87
|
"aria-haspopup": "menu",
|
|
@@ -90,27 +90,27 @@ function _({ item: e }) {
|
|
|
90
90
|
"data-state": a.value ? "open" : "closed",
|
|
91
91
|
style: { anchorName: o },
|
|
92
92
|
className: n.groupTrigger,
|
|
93
|
-
onClick: () =>
|
|
93
|
+
onClick: () => p(),
|
|
94
94
|
onKeyDown: (e) => {
|
|
95
95
|
if (e.key === "ArrowDown") {
|
|
96
96
|
e.preventDefault(), a.value || s();
|
|
97
97
|
let t = i.current;
|
|
98
98
|
t && setTimeout(() => {
|
|
99
|
-
t.querySelector(
|
|
99
|
+
t.querySelector(h)?.focus();
|
|
100
100
|
}, 0);
|
|
101
|
-
} else e.key === "Escape" &&
|
|
101
|
+
} else e.key === "Escape" && c();
|
|
102
102
|
},
|
|
103
|
-
children: e.icon ? /* @__PURE__ */
|
|
103
|
+
children: e.icon ? /* @__PURE__ */ u("span", {
|
|
104
104
|
className: n.icon,
|
|
105
105
|
"aria-hidden": "true",
|
|
106
106
|
children: e.icon
|
|
107
|
-
}) : /* @__PURE__ */
|
|
107
|
+
}) : /* @__PURE__ */ u("span", {
|
|
108
108
|
className: n.fallbackIcon,
|
|
109
109
|
"data-fallback-icon": !0,
|
|
110
110
|
"aria-hidden": "true",
|
|
111
|
-
children:
|
|
111
|
+
children: _(e.label)
|
|
112
112
|
})
|
|
113
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ d("div", {
|
|
114
114
|
ref: i,
|
|
115
115
|
popover: "auto",
|
|
116
116
|
role: "menu",
|
|
@@ -120,93 +120,93 @@ function _({ item: e }) {
|
|
|
120
120
|
onKeyDown: (e) => {
|
|
121
121
|
let t = i.current;
|
|
122
122
|
if (!t) return;
|
|
123
|
-
let n = Array.from(t.querySelectorAll(
|
|
124
|
-
e.key === "ArrowDown" ? (e.preventDefault(), n[(a + 1) % n.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), n[(a - 1 + n.length) % n.length]?.focus()) : e.key === "Escape" && (e.preventDefault(),
|
|
123
|
+
let n = Array.from(t.querySelectorAll(h)), a = n.indexOf(e.target);
|
|
124
|
+
e.key === "ArrowDown" ? (e.preventDefault(), n[(a + 1) % n.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), n[(a - 1 + n.length) % n.length]?.focus()) : e.key === "Escape" && (e.preventDefault(), c(), r.current?.focus());
|
|
125
125
|
},
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ u("div", {
|
|
127
127
|
className: n.railFlyoutCaption,
|
|
128
128
|
"aria-hidden": "true",
|
|
129
129
|
children: e.label
|
|
130
|
-
}), e.items.map((e, t) =>
|
|
130
|
+
}), e.items.map((e, t) => m(e) ? /* @__PURE__ */ u(f, { children: g(e, {
|
|
131
131
|
inMenu: !0,
|
|
132
|
-
onActivate:
|
|
132
|
+
onActivate: c,
|
|
133
133
|
extraClass: n.flyoutItem
|
|
134
|
-
}) }, t) : e.type === "separator" ? /* @__PURE__ */
|
|
134
|
+
}) }, t) : e.type === "separator" ? /* @__PURE__ */ u("div", {
|
|
135
135
|
role: "separator",
|
|
136
136
|
className: n.flyoutSeparator
|
|
137
|
-
}, t) : /* @__PURE__ */
|
|
137
|
+
}, t) : /* @__PURE__ */ u("div", {
|
|
138
138
|
className: n.railFlyoutCaption,
|
|
139
139
|
"aria-hidden": "true",
|
|
140
140
|
children: e.label
|
|
141
141
|
}, t))]
|
|
142
142
|
})] });
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
let
|
|
147
|
-
|
|
148
|
-
let
|
|
149
|
-
let t =
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
let e = !
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
"aria-label":
|
|
157
|
-
"data-state":
|
|
158
|
-
"data-expand-on-hover":
|
|
159
|
-
className: r(n.sideNav,
|
|
144
|
+
function y({ items: t, groups: f, collapsed: h, defaultCollapsed: y = !1, onCollapsedChange: b, ariaLabel: x, collapseLabel: S, expandLabel: C, expandOnHover: w = !1, showCollapseToggle: T = !0, header: E, footer: D, className: O }) {
|
|
145
|
+
o();
|
|
146
|
+
let k = x ?? c(s.sideNav.nav), A = S ?? c(s.sideNav.collapse), j = C ?? c(s.sideNav.expand), M = p(), N = a(h ?? y);
|
|
147
|
+
h !== void 0 && (N.value = h);
|
|
148
|
+
let P = f ?? (t ? [{ items: t }] : [{ items: [] }]), F = a(P.flatMap((e) => e.items).filter((e) => e.items?.some((e) => m(e) && e.active)).map((e) => e.label)), I = (e) => {
|
|
149
|
+
let t = F.value;
|
|
150
|
+
F.value = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
151
|
+
}, L = () => {
|
|
152
|
+
let e = !N.value;
|
|
153
|
+
h === void 0 && (N.value = e), b?.(e);
|
|
154
|
+
}, R = N.value;
|
|
155
|
+
return /* @__PURE__ */ d("nav", {
|
|
156
|
+
"aria-label": k,
|
|
157
|
+
"data-state": R ? "collapsed" : "expanded",
|
|
158
|
+
"data-expand-on-hover": R && w ? "" : void 0,
|
|
159
|
+
className: r(n.sideNav, O),
|
|
160
160
|
children: [
|
|
161
|
-
|
|
161
|
+
E && /* @__PURE__ */ u("div", {
|
|
162
162
|
className: n.header,
|
|
163
|
-
children:
|
|
163
|
+
children: E
|
|
164
164
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ u("ul", {
|
|
166
166
|
className: n.list,
|
|
167
|
-
children:
|
|
167
|
+
children: P.map((t, r) => /* @__PURE__ */ d("li", {
|
|
168
168
|
className: n.group,
|
|
169
|
-
children: [t.label && /* @__PURE__ */
|
|
169
|
+
children: [t.label && /* @__PURE__ */ u("h3", {
|
|
170
170
|
className: n.groupLabel,
|
|
171
171
|
children: t.label
|
|
172
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ u("ul", {
|
|
173
173
|
className: n.groupItems,
|
|
174
|
-
children: t.items.map((t,
|
|
175
|
-
let
|
|
174
|
+
children: t.items.map((t, a) => {
|
|
175
|
+
let o = `${r}-${a}`;
|
|
176
176
|
if (t.items) {
|
|
177
|
-
if (
|
|
178
|
-
let e =
|
|
179
|
-
return /* @__PURE__ */
|
|
177
|
+
if (R && !w) return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u(v, { item: t }) }, t.id ?? o);
|
|
178
|
+
let e = F.value.includes(t.label), r = `${M}-group-${o}`;
|
|
179
|
+
return /* @__PURE__ */ d("li", { children: [/* @__PURE__ */ d("button", {
|
|
180
180
|
type: "button",
|
|
181
181
|
"aria-expanded": e,
|
|
182
182
|
"aria-controls": r,
|
|
183
|
-
"aria-label":
|
|
183
|
+
"aria-label": R ? t.label : void 0,
|
|
184
184
|
"data-state": e ? "open" : "closed",
|
|
185
185
|
className: n.groupTrigger,
|
|
186
|
-
onClick: () =>
|
|
186
|
+
onClick: () => I(t.label),
|
|
187
187
|
children: [
|
|
188
|
-
t.icon ? /* @__PURE__ */
|
|
188
|
+
t.icon ? /* @__PURE__ */ u("span", {
|
|
189
189
|
className: n.icon,
|
|
190
190
|
"aria-hidden": "true",
|
|
191
191
|
children: t.icon
|
|
192
|
-
}) :
|
|
192
|
+
}) : R ? /* @__PURE__ */ u("span", {
|
|
193
193
|
className: n.fallbackIcon,
|
|
194
194
|
"data-fallback-icon": !0,
|
|
195
195
|
"aria-hidden": "true",
|
|
196
|
-
children:
|
|
196
|
+
children: _(t.label)
|
|
197
197
|
}) : null,
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ u("span", {
|
|
199
199
|
className: n.label,
|
|
200
|
-
"data-rail-hidden":
|
|
200
|
+
"data-rail-hidden": R || void 0,
|
|
201
201
|
children: t.label
|
|
202
202
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ u("svg", {
|
|
204
204
|
viewBox: "0 0 16 16",
|
|
205
205
|
width: "12",
|
|
206
206
|
height: "12",
|
|
207
207
|
"aria-hidden": "true",
|
|
208
208
|
className: n.groupIndicator,
|
|
209
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ u("path", {
|
|
210
210
|
d: "M4 6l4 4 4-4",
|
|
211
211
|
fill: "none",
|
|
212
212
|
stroke: "currentColor",
|
|
@@ -216,65 +216,51 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
216
216
|
})
|
|
217
217
|
})
|
|
218
218
|
]
|
|
219
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ u("div", {
|
|
220
220
|
id: r,
|
|
221
221
|
"data-state": e ? "open" : "closed",
|
|
222
222
|
className: n.sublist,
|
|
223
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ u("ul", {
|
|
224
224
|
className: n.sublistInner,
|
|
225
|
-
children: t.items.map((e, t) =>
|
|
225
|
+
children: t.items.map((e, t) => m(e) ? /* @__PURE__ */ u("li", { children: g(e, { inMenu: !1 }) }, t) : e.type === "separator" ? /* @__PURE__ */ u("li", {
|
|
226
226
|
role: "separator",
|
|
227
227
|
className: n.subSeparator
|
|
228
|
-
}, t) : /* @__PURE__ */
|
|
228
|
+
}, t) : /* @__PURE__ */ u("li", {
|
|
229
229
|
className: n.subGroupLabel,
|
|
230
230
|
children: e.label
|
|
231
231
|
}, t))
|
|
232
232
|
})
|
|
233
|
-
})] }, t.id ??
|
|
233
|
+
})] }, t.id ?? o);
|
|
234
234
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
children: t.render({ collapsed: L })
|
|
238
|
-
}, t.id ?? a);
|
|
239
|
-
let o = /* @__PURE__ */ u(c, { children: [
|
|
240
|
-
t.icon ? /* @__PURE__ */ l("span", {
|
|
235
|
+
let s = /* @__PURE__ */ d(l, { children: [
|
|
236
|
+
t.icon ? /* @__PURE__ */ u("span", {
|
|
241
237
|
className: n.icon,
|
|
242
238
|
"aria-hidden": "true",
|
|
243
239
|
children: t.icon
|
|
244
|
-
}) :
|
|
240
|
+
}) : R ? /* @__PURE__ */ u("span", {
|
|
245
241
|
className: n.fallbackIcon,
|
|
246
242
|
"data-fallback-icon": !0,
|
|
247
243
|
"aria-hidden": "true",
|
|
248
|
-
children:
|
|
244
|
+
children: _(t.label)
|
|
249
245
|
}) : null,
|
|
250
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ u("span", {
|
|
251
247
|
className: n.label,
|
|
252
|
-
"data-rail-hidden":
|
|
248
|
+
"data-rail-hidden": R || void 0,
|
|
253
249
|
children: t.label
|
|
254
250
|
}),
|
|
255
|
-
t.trailing == null ? null : /* @__PURE__ */
|
|
251
|
+
t.trailing == null ? null : /* @__PURE__ */ u("span", {
|
|
256
252
|
className: n.trailing,
|
|
257
|
-
"data-rail-hidden":
|
|
253
|
+
"data-rail-hidden": R || void 0,
|
|
258
254
|
children: t.trailing
|
|
259
255
|
})
|
|
260
|
-
] }),
|
|
261
|
-
type: "button",
|
|
262
|
-
"aria-current": t.active ? "page" : void 0,
|
|
263
|
-
"aria-label": L ? t.label : void 0,
|
|
264
|
-
"data-state": t.active ? "active" : void 0,
|
|
265
|
-
"data-tone": s,
|
|
266
|
-
className: n.link,
|
|
267
|
-
disabled: t.disabled,
|
|
268
|
-
onClick: (e) => t.onClick?.(e),
|
|
269
|
-
children: o
|
|
270
|
-
}) : /* @__PURE__ */ l("a", {
|
|
256
|
+
] }), c = t.tone && t.tone !== "default" ? t.tone : void 0, f = {
|
|
271
257
|
href: t.disabled ? void 0 : t.href,
|
|
272
258
|
"aria-current": t.active ? "page" : void 0,
|
|
273
|
-
"aria-label":
|
|
259
|
+
"aria-label": R ? t.label : void 0,
|
|
274
260
|
"aria-disabled": t.disabled || void 0,
|
|
275
261
|
tabIndex: t.disabled ? -1 : void 0,
|
|
276
262
|
"data-state": t.active ? "active" : void 0,
|
|
277
|
-
"data-tone":
|
|
263
|
+
"data-tone": c,
|
|
278
264
|
className: n.link,
|
|
279
265
|
onClick: (e) => {
|
|
280
266
|
if (t.disabled) {
|
|
@@ -282,34 +268,55 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
282
268
|
return;
|
|
283
269
|
}
|
|
284
270
|
t.onClick?.(e);
|
|
285
|
-
}
|
|
286
|
-
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
if (t.render) return /* @__PURE__ */ u("li", {
|
|
274
|
+
className: n.customItem,
|
|
275
|
+
children: t.render({
|
|
276
|
+
collapsed: R,
|
|
277
|
+
children: s,
|
|
278
|
+
linkProps: f
|
|
279
|
+
})
|
|
280
|
+
}, t.id ?? o);
|
|
281
|
+
let p = i(), h = t.onClick && !t.href ? /* @__PURE__ */ u("button", {
|
|
282
|
+
type: "button",
|
|
283
|
+
"aria-current": t.active ? "page" : void 0,
|
|
284
|
+
"aria-label": R ? t.label : void 0,
|
|
285
|
+
"data-state": t.active ? "active" : void 0,
|
|
286
|
+
"data-tone": c,
|
|
287
|
+
className: n.link,
|
|
288
|
+
disabled: t.disabled,
|
|
289
|
+
onClick: (e) => t.onClick?.(e),
|
|
290
|
+
children: s
|
|
291
|
+
}) : /* @__PURE__ */ u(p, {
|
|
292
|
+
...f,
|
|
293
|
+
children: s
|
|
287
294
|
});
|
|
288
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ u("li", { children: R && !w ? /* @__PURE__ */ u(e, {
|
|
289
296
|
content: t.label,
|
|
290
297
|
placement: "right",
|
|
291
|
-
children:
|
|
292
|
-
}) :
|
|
298
|
+
children: h
|
|
299
|
+
}) : h }, t.id ?? o);
|
|
293
300
|
})
|
|
294
301
|
})]
|
|
295
302
|
}, r))
|
|
296
303
|
}),
|
|
297
|
-
|
|
304
|
+
D && /* @__PURE__ */ u("div", {
|
|
298
305
|
className: n.footer,
|
|
299
|
-
children:
|
|
306
|
+
children: D
|
|
300
307
|
}),
|
|
301
|
-
|
|
308
|
+
T && /* @__PURE__ */ u("button", {
|
|
302
309
|
type: "button",
|
|
303
|
-
"aria-label":
|
|
310
|
+
"aria-label": R ? j : A,
|
|
304
311
|
className: n.collapseToggle,
|
|
305
|
-
onClick:
|
|
306
|
-
children: /* @__PURE__ */
|
|
312
|
+
onClick: L,
|
|
313
|
+
children: /* @__PURE__ */ u("svg", {
|
|
307
314
|
viewBox: "0 0 16 16",
|
|
308
315
|
width: "14",
|
|
309
316
|
height: "14",
|
|
310
317
|
"aria-hidden": "true",
|
|
311
318
|
className: n.collapseIcon,
|
|
312
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ u("path", {
|
|
313
320
|
d: "M10 4l-4 4 4 4",
|
|
314
321
|
fill: "none",
|
|
315
322
|
stroke: "currentColor",
|
|
@@ -323,4 +330,4 @@ function v({ items: t, groups: d, collapsed: m, defaultCollapsed: v = !1, onColl
|
|
|
323
330
|
});
|
|
324
331
|
}
|
|
325
332
|
//#endregion
|
|
326
|
-
export {
|
|
333
|
+
export { y as SideNav };
|
package/dist/styles.css
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
/*$vite$:1*/
|
|
67
67
|
@layer cascivo.component{._calendar_7pqxh_2{--cascivo-calendar-bg:var(--cascivo-color-surface);--cascivo-calendar-radius:var(--cascivo-radius-overlay);--cascivo-calendar-cell-size:2.25rem;--cascivo-calendar-day-selected-bg:var(--cascivo-color-accent);--cascivo-calendar-day-selected-fg:var(--cascivo-color-accent-foreground,var(--cascivo-color-text-on-accent));--cascivo-calendar-day-today-color:var(--cascivo-color-accent);--cascivo-calendar-range-bg:color-mix(in srgb, var(--cascivo-color-accent) 16%, transparent);gap:var(--cascivo-space-2);padding:var(--cascivo-space-3);font-family:var(--cascivo-font-sans);background-color:var(--cascivo-calendar-bg);border-radius:var(--cascivo-calendar-radius);flex-direction:column;display:inline-flex}._calendar_7pqxh_2[data-size=sm]{--cascivo-calendar-cell-size:1.875rem}._calendar_7pqxh_2[data-size=md]{--cascivo-calendar-cell-size:2.25rem}._calendar_7pqxh_2[data-size=lg]{--cascivo-calendar-cell-size:2.75rem}._header_7pqxh_33{justify-content:space-between;align-items:center;margin-block-end:var(--cascivo-space-1);display:flex}._monthLabel_7pqxh_40{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text)}._navButton_7pqxh_46{border-radius:var(--cascivo-radius-control);cursor:pointer;block-size:2rem;inline-size:2rem;color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-base);background:0 0;border:1px solid #0000;outline:none;justify-content:center;align-items:center;display:inline-flex}._navButton_7pqxh_46:hover{background-color:var(--cascivo-color-bg-subtle);color:var(--cascivo-color-text)}._navButton_7pqxh_46:focus-visible{box-shadow:var(--cascivo-focus-ring)}._navSpacer_7pqxh_69{block-size:2rem;inline-size:2rem}._grid_7pqxh_74{border-collapse:collapse;inline-size:100%}._weekday_7pqxh_79{padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-muted);text-align:center;inline-size:var(--cascivo-calendar-cell-size)}._cell_7pqxh_88{text-align:center;padding:0}._cell_7pqxh_88[data-in-range]{background-color:var(--cascivo-calendar-range-bg)}._cell_7pqxh_88:has([data-in-range]){background-color:var(--cascivo-calendar-range-bg)}._empty_7pqxh_99{inline-size:var(--cascivo-calendar-cell-size);block-size:var(--cascivo-calendar-cell-size)}._day_7pqxh_104{inline-size:var(--cascivo-calendar-cell-size);block-size:var(--cascivo-calendar-cell-size);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-control);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:inline-flex}._day_7pqxh_104:hover:not([aria-disabled]){background-color:var(--cascivo-color-bg-subtle)}._day_7pqxh_104:focus-visible{box-shadow:var(--cascivo-focus-ring)}._day_7pqxh_104[data-today]{font-weight:var(--cascivo-font-semibold);color:var(--cascivo-calendar-day-today-color)}._day_7pqxh_104[data-in-range]{background-color:var(--cascivo-calendar-range-bg)}._day_7pqxh_104[data-selected],._day_7pqxh_104[data-range-start],._day_7pqxh_104[data-range-end]{background-color:var(--cascivo-calendar-day-selected-bg);color:var(--cascivo-calendar-day-selected-fg)}._day_7pqxh_104[aria-disabled]{opacity:.35;cursor:not-allowed}}@media (forced-colors:active){._day_7pqxh_104[data-selected]{outline:2px solid highlight}}
|
|
68
68
|
/*$vite$:1*/
|
|
69
|
-
@layer cascivo.component{.
|
|
69
|
+
@layer cascivo.component{._card_16415_2{background-color:var(--cascivo-color-surface);border-radius:var(--cascivo-radius-surface);padding:var(--_card-p,0);overflow:hidden}._card_16415_2[data-padding=none]{--_card-p:0}._card_16415_2[data-padding=sm]{--_card-p:var(--cascivo-space-4)}._card_16415_2[data-padding=md]{--_card-p:var(--cascivo-space-6)}._card_16415_2[data-padding=lg]{--_card-p:var(--cascivo-space-8)}._card_16415_2[data-variant=default]{border:1px solid var(--cascivo-color-border)}._card_16415_2[data-variant=outlined]{border:1.5px solid var(--cascivo-color-border-strong)}._card_16415_2[data-variant=elevated]{box-shadow:var(--cascivo-shadow-md);border:none}._header_16415_35{padding:var(--_card-p,var(--cascivo-space-6));gap:var(--cascivo-space-1);flex-direction:column;min-inline-size:0;padding-block-end:0;display:flex}._title_16415_46{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-lg);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);margin:0}._content_16415_55{padding:var(--_card-p,var(--cascivo-space-6));color:var(--cascivo-color-text-subtle);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-relaxed)}._footer_16415_63{padding:var(--_card-p,var(--cascivo-space-6));align-items:center;gap:var(--cascivo-space-2);min-inline-size:0;padding-block-start:0;display:flex}._footer_16415_63>*{min-inline-size:0}}
|
|
70
70
|
/*$vite$:1*/
|
|
71
71
|
@layer cascivo.component{._carousel_1dvrl_2{gap:var(--cascivo-space-3);flex-direction:column;inline-size:100%;display:flex}._viewport_1dvrl_9{align-items:center;display:flex;position:relative}._track_1dvrl_15{scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--cascivo-radius-md);inline-size:100%;display:flex;overflow-x:auto}._track_1dvrl_15::-webkit-scrollbar{display:none}._slide_1dvrl_28{scroll-snap-align:center;scroll-snap-stop:always;flex:0 0 100%;inline-size:100%}._nav_1dvrl_35{z-index:1;block-size:2.25rem;inline-size:2.25rem;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-full);box-shadow:var(--cascivo-shadow-sm);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:absolute}._nav_1dvrl_35:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._nav_1dvrl_35:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._nav_1dvrl_35:disabled{opacity:.4;cursor:not-allowed}._prev_1dvrl_65{inset-inline-start:var(--cascivo-space-2)}._next_1dvrl_69{inset-inline-end:var(--cascivo-space-2)}._dots_1dvrl_73{justify-content:center;align-items:center;gap:var(--cascivo-space-2);display:flex}._dot_1dvrl_73{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong);cursor:pointer;block-size:.625rem;inline-size:.625rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out);border:none;padding:0}._dot_1dvrl_73[data-active]{background-color:var(--cascivo-color-accent)}._dot_1dvrl_73:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}}@media (prefers-reduced-motion:reduce){._track_1dvrl_15{scroll-behavior:auto}}@media (forced-colors:active){._nav_1dvrl_35:focus-visible,._dot_1dvrl_73:focus-visible{outline-offset:2px;outline:2px solid highlight}._dot_1dvrl_73[data-active]{background-color:highlight}}
|
|
72
72
|
/*$vite$:1*/
|
|
@@ -156,11 +156,11 @@
|
|
|
156
156
|
/*$vite$:1*/
|
|
157
157
|
@layer cascivo.component{._center_1euo8_2{max-inline-size:var(--_center-max,48rem);padding-inline:var(--cascivo-space-4);inline-size:100%;margin-inline:auto}}
|
|
158
158
|
/*$vite$:1*/
|
|
159
|
-
@layer cascivo.component{.
|
|
159
|
+
@layer cascivo.component{._columns-container_1efih_2{display:grid;container-type:inline-size}._columns_1efih_2{grid-template-columns:repeat(var(--_cols,2), minmax(0, 1fr));gap:var(--_gap,var(--cascivo-space-4));min-inline-size:0;display:grid}@container (width<=40rem){._columns_1efih_2{grid-template-columns:1fr}}}
|
|
160
160
|
/*$vite$:1*/
|
|
161
161
|
@layer cascivo.component{._flex_1cngp_2{gap:var(--_flex-gap,var(--cascivo-space-4));display:flex}._flex_1cngp_2[data-direction=vertical]{flex-direction:column}._flex_1cngp_2[data-direction=horizontal]{flex-direction:row}._flex_1cngp_2[data-wrap]{flex-wrap:wrap}}
|
|
162
162
|
/*$vite$:1*/
|
|
163
|
-
@layer cascivo.component{.
|
|
163
|
+
@layer cascivo.component{._grid-container_qly9o_5{display:grid;container-type:inline-size}._grid_qly9o_2{grid-template-columns:repeat(var(--_grid-cols,12), minmax(0, 1fr));gap:var(--_grid-gap,var(--cascivo-space-4));align-items:var(--_grid-align,stretch);justify-items:var(--_grid-justify,stretch);min-inline-size:0;display:grid;container-type:inline-size}@container (width<=40rem){._grid_qly9o_2:not([data-responsive]){grid-template-columns:1fr}}@container (width>=30rem){._grid_qly9o_2[data-responsive]{grid-template-columns:repeat(var(--_grid-cols-sm,var(--_grid-cols,12)), minmax(0, 1fr))}}@container (width>=40rem){._grid_qly9o_2[data-responsive]{grid-template-columns:repeat(var(--_grid-cols-md,var(--_grid-cols-sm,var(--_grid-cols,12))), minmax(0, 1fr))}}@container (width>=64rem){._grid_qly9o_2[data-responsive]{grid-template-columns:repeat(var(--_grid-cols-lg,var(--_grid-cols-md,var(--_grid-cols-sm,var(--_grid-cols,12)))), minmax(0, 1fr))}}@container (width>=80rem){._grid_qly9o_2[data-responsive]{grid-template-columns:repeat(var(--_grid-cols-xl,var(--_grid-cols-lg,var(--_grid-cols-md,var(--_grid-cols-sm,var(--_grid-cols,12))))), minmax(0, 1fr))}}._grid-item_qly9o_55{grid-column:span var(--_span,1)}@container (width>=30rem){._grid-item_qly9o_55[data-responsive]{grid-column:span var(--_span-sm,var(--_span,1))}}@container (width>=40rem){._grid-item_qly9o_55[data-responsive]{grid-column:span var(--_span-md,var(--_span-sm,var(--_span,1)))}}@container (width>=64rem){._grid-item_qly9o_55[data-responsive]{grid-column:span var(--_span-lg,var(--_span-md,var(--_span-sm,var(--_span,1))))}}@container (width>=80rem){._grid-item_qly9o_55[data-responsive]{grid-column:span var(--_span-xl,var(--_span-lg,var(--_span-md,var(--_span-sm,var(--_span,1)))))}}}
|
|
164
164
|
/*$vite$:1*/
|
|
165
165
|
@layer cascivo.component{._spacer_9ie78_2{block-size:var(--_spacer-size,var(--cascivo-space-4));flex-shrink:0}}
|
|
166
166
|
/*$vite$:1*/
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
/*$vite$:1*/
|
|
227
227
|
@layer cascivo.component{._root_v07bg_2{max-block-size:var(--cascivo-scroll-area-height,none);max-inline-size:var(--cascivo-scroll-area-width,none);scrollbar-width:thin;scrollbar-color:var(--cascivo-color-border) transparent}._root_v07bg_2[data-orientation=vertical]{overflow:hidden auto}._root_v07bg_2[data-orientation=horizontal]{overflow:auto hidden}._root_v07bg_2[data-orientation=both]{overflow:auto}._root_v07bg_2::-webkit-scrollbar{block-size:.5rem;inline-size:.5rem}._root_v07bg_2::-webkit-scrollbar-track{background:0 0}._root_v07bg_2::-webkit-scrollbar-thumb{background-color:var(--cascivo-color-border);border-radius:var(--cascivo-radius-control)}._root_v07bg_2::-webkit-scrollbar-thumb:hover{background-color:var(--cascivo-color-text-subtle)}._root_v07bg_2{background:linear-gradient(var(--cascivo-color-surface) 30%, transparent) center top / 100% 1.5rem no-repeat, linear-gradient(transparent, var(--cascivo-color-surface) 70%) center bottom / 100% 1.5rem no-repeat;background-attachment:local,local}._root_v07bg_2[data-scroll-top]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-scroll-top][data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent), inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-edges=mask][data-scroll-top]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem);mask-image:linear-gradient(#0000,#000 1.5rem)}._root_v07bg_2[data-edges=mask][data-scroll-bottom]{-webkit-mask-image:linear-gradient(0deg,#0000,#000 1.5rem);mask-image:linear-gradient(0deg,#0000,#000 1.5rem)}._root_v07bg_2[data-edges=mask][data-scroll-top][data-scroll-bottom]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000);mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000)}}
|
|
228
228
|
/*$vite$:1*/
|
|
229
|
-
@layer cascivo.component{.
|
|
229
|
+
@layer cascivo.component{._root_1m8s8_2{inline-size:var(--cascivo-search-width,100%);align-items:center;display:inline-flex;position:relative}._root_1m8s8_2[data-size=sm]{--_search-height:2rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-3)}._root_1m8s8_2[data-size=md]{--_search-height:2.5rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-4)}._root_1m8s8_2[data-size=lg]{--_search-height:3rem;--_search-font:var(--cascivo-text-base);--_search-px:var(--cascivo-space-4)}._label_1m8s8_31{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._icon_1m8s8_44{color:var(--cascivo-color-text-muted);pointer-events:none;align-items:center;display:inline-flex;position:absolute;inset-inline-start:var(--_search-px,var(--cascivo-space-4))}._input_1m8s8_53{inline-size:100%;block-size:var(--_search-height,2.5rem);font-family:var(--cascivo-font-sans);font-size:var(--_search-font,var(--cascivo-text-sm));color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;padding-inline-start:calc(var(--_search-px,var(--cascivo-space-4)) + 1rem + var(--cascivo-space-2));padding-inline-end:calc(var(--_search-px,var(--cascivo-space-4)) + 1.5rem)}._input_1m8s8_53::-webkit-search-cancel-button{appearance:none;display:none}._input_1m8s8_53::-webkit-search-decoration{appearance:none;display:none}._input_1m8s8_53::placeholder{color:var(--cascivo-color-text-muted)}._input_1m8s8_53:hover:not(:disabled):not(:focus){border-color:var(--cascivo-color-border-strong)}._input_1m8s8_53:focus{border-color:var(--cascivo-color-accent);box-shadow:var(--cascivo-focus-ring)}._input_1m8s8_53:disabled{opacity:.5;cursor:not-allowed;background-color:var(--cascivo-color-bg-subtle)}._clear_1m8s8_99{block-size:1.5rem;inline-size:1.5rem;font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-none);color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out);background-color:#0000;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-2)}._clear_1m8s8_99:hover:not(:disabled){color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle)}._clear_1m8s8_99:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._clear_1m8s8_99:disabled{cursor:not-allowed}}
|
|
230
230
|
/*$vite$:1*/
|
|
231
231
|
@layer cascivo.component{._wrapper_196gt_2{gap:var(--cascivo-space-1);padding:var(--cascivo-space-1);background-color:var(--cascivo-color-bg-subtle);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-control);display:inline-flex}._wrapper_196gt_2[data-size=sm]{--_seg-h:1.75rem;--_seg-font:var(--cascivo-text-xs);--_seg-px:var(--cascivo-space-2)}._wrapper_196gt_2[data-size=md]{--_seg-h:2.25rem;--_seg-font:var(--cascivo-text-sm);--_seg-px:var(--cascivo-space-3)}._wrapper_196gt_2[data-size=lg]{--_seg-h:2.75rem;--_seg-font:var(--cascivo-text-base);--_seg-px:var(--cascivo-space-4)}._wrapper_196gt_2[data-disabled]{opacity:.5}._segment_196gt_33{height:var(--_seg-h,2.25rem);padding-inline:var(--_seg-px,var(--cascivo-space-3));font-family:var(--cascivo-font-sans);font-size:var(--_seg-font,var(--cascivo-text-sm));font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-subtle);border-radius:var(--cascivo-radius-item);cursor:pointer;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out);white-space:nowrap;background:0 0;border:none}._segment_196gt_33:hover:not(:disabled):not([data-selected]){color:var(--cascivo-color-text);background-color:rgb(from var(--cascivo-color-text) r g b / .05)}._segment_196gt_33:focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:1px}._segment_196gt_33[data-selected]{color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);box-shadow:var(--cascivo-shadow-sm)}._segment_196gt_33:disabled{cursor:not-allowed;opacity:.5}}
|
|
232
232
|
/*$vite$:1*/
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
/*$vite$:1*/
|
|
281
281
|
@layer cascivo.component{._list_1f4du_2{--_marker-size:.875rem;--_track:var(--cascivo-color-border);font-family:var(--cascivo-font-sans);color:var(--cascivo-color-text);margin:0;padding:0;list-style:none;display:flex}._list_1f4du_2[data-orientation=vertical]{flex-direction:column}._list_1f4du_2[data-orientation=horizontal]{flex-direction:row}._item_1f4du_21{gap:var(--cascivo-space-3);display:flex;position:relative}._list_1f4du_2[data-orientation=vertical] ._item_1f4du_21{flex-direction:row;padding-block-end:var(--cascivo-space-5)}._list_1f4du_2[data-orientation=horizontal] ._item_1f4du_21{flex-direction:column;flex:1;padding-inline-end:var(--cascivo-space-5)}._list_1f4du_2[data-orientation=vertical] ._item_1f4du_21:before{content:"";inline-size:1px;block-size:calc(100% - var(--_marker-size));background-color:var(--_track);position:absolute;inset-block-start:var(--_marker-size);inset-inline-start:calc(var(--_marker-size) / 2)}._list_1f4du_2[data-orientation=horizontal] ._item_1f4du_21:before{content:"";block-size:1px;inline-size:calc(100% - var(--_marker-size));background-color:var(--_track);position:absolute;inset-block-start:calc(var(--_marker-size) / 2);inset-inline-start:var(--_marker-size)}._item_1f4du_21:last-child:before{display:none}._marker_1f4du_63{inline-size:var(--_marker-size);block-size:var(--_marker-size);border-radius:var(--cascivo-radius-full);font-size:var(--cascivo-text-xs);border:2px solid var(--cascivo-color-border);background-color:var(--cascivo-color-surface);box-sizing:border-box;flex:none;justify-content:center;align-items:center;line-height:1;display:inline-flex}._item_1f4du_21[data-status=complete] ._marker_1f4du_63{border-color:var(--cascivo-color-success);background-color:var(--cascivo-color-success);color:var(--cascivo-color-success-foreground)}._item_1f4du_21[data-status=current] ._marker_1f4du_63{border-color:var(--cascivo-color-primary);background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-fg)}._item_1f4du_21[data-status=upcoming] ._marker_1f4du_63{border-color:var(--cascivo-color-border-strong);background-color:var(--cascivo-color-surface);color:var(--cascivo-color-text-subtle)}._content_1f4du_96{gap:var(--cascivo-space-1);flex-direction:column;padding-block-start:calc((var(--_marker-size) - 1rem) / 2);display:flex}._title_1f4du_103{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);line-height:var(--cascivo-leading-tight);color:var(--cascivo-color-text)}._time_1f4du_110{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-subtle)}._description_1f4du_115{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-normal)}}@media (forced-colors:active){._marker_1f4du_63{border:2px solid canvastext}._item_1f4du_21[data-status=current] ._marker_1f4du_63{background-color:highlight;border-color:highlight}}
|
|
282
282
|
/*$vite$:1*/
|
|
283
|
-
@layer cascivo.component{.
|
|
283
|
+
@layer cascivo.component{._viewport_cshyp_2{z-index:var(--cascivo-z-toast);gap:var(--cascivo-space-2);inline-size:min(24rem, calc(100vw - var(--cascivo-space-8)));pointer-events:none;flex-direction:column;display:flex;position:fixed;inset-block-end:var(--cascivo-space-4);inset-inline-end:var(--cascivo-space-4)}@media (width<=30rem){._viewport_cshyp_2{inset-inline:var(--cascivo-space-4);inline-size:auto}}._toast_cshyp_23{align-items:flex-start;gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);max-inline-size:calc(min(28rem, 100vw) - var(--cascivo-space-4,1rem));background-color:var(--cascivo-color-surface-overlay);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-overlay);pointer-events:auto;opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter);display:flex;translate:0}@starting-style{._toast_cshyp_23{opacity:0;translate:0 var(--cascivo-space-4)}}._toast_cshyp_23[data-state=dismissing],._toast_cshyp_23[data-state=gone]{opacity:0;translate:0 var(--cascivo-space-4);transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit)}._toast_cshyp_23[data-variant=success]{border-color:color-mix(in oklch, var(--cascivo-color-success) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=success] ._icon_cshyp_62,._toast_cshyp_23[data-variant=success] ._title_cshyp_63{color:var(--cascivo-color-success)}._toast_cshyp_23[data-variant=warning]{border-color:color-mix(in oklch, var(--cascivo-color-warning) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=warning] ._icon_cshyp_62,._toast_cshyp_23[data-variant=warning] ._title_cshyp_63{color:var(--cascivo-color-warning)}._toast_cshyp_23[data-variant=destructive]{border-color:color-mix(in oklch, var(--cascivo-color-destructive) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=destructive] ._icon_cshyp_62,._toast_cshyp_23[data-variant=destructive] ._title_cshyp_63{color:var(--cascivo-color-destructive)}._body_cshyp_92{gap:var(--cascivo-space-1);flex-direction:column;flex:1;min-inline-size:0;display:flex}._title_cshyp_63{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}._description_cshyp_108{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-normal)}._close_cshyp_115{block-size:1.5rem;inline-size:1.5rem;font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}._close_cshyp_115:hover{color:var(--cascivo-color-text)}._close_cshyp_115:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}}@media (forced-colors:active){._toast_cshyp_23{border:1px solid canvastext}._close_cshyp_115:focus-visible{outline-offset:2px;outline:2px solid highlight}}
|
|
284
284
|
/*$vite$:1*/
|
|
285
285
|
@layer cascivo.component{._toc_1w9fk_2{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-snug)}._toc_1w9fk_2 ol{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._toc_1w9fk_2 li{padding-inline-start:calc((var(--toc-level,2) - 2) * var(--cascivo-space-3))}._toc_1w9fk_2 a{padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-2);color:var(--cascivo-color-text-muted);transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);border-inline-start:2px solid #0000;text-decoration:none;display:block}._toc_1w9fk_2 a:hover{color:var(--cascivo-color-text)}._toc_1w9fk_2 a:focus-visible{box-shadow:var(--cascivo-focus-ring);border-radius:var(--cascivo-radius-sm);outline:none}._toc_1w9fk_2 a[aria-current=location]{color:var(--cascivo-color-accent);border-inline-start-color:var(--cascivo-color-accent);font-weight:var(--cascivo-font-medium)}@media (pointer:coarse){._toc_1w9fk_2 a{min-block-size:var(--cascivo-target-min-coarse,2.75rem);align-items:center;display:flex}}}
|
|
286
286
|
/*$vite$:1*/
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./switcher.module.js";
|
|
4
|
-
import { cn as t,
|
|
5
|
-
import { builtin as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/switcher/switcher.tsx
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function c({ items: c, label: l, className: u }) {
|
|
9
|
+
r();
|
|
10
|
+
let d = n();
|
|
11
|
+
return /* @__PURE__ */ o("ul", {
|
|
12
|
+
"aria-label": l ?? a(i.switcher.label),
|
|
13
|
+
className: t(e.switcher, u),
|
|
14
|
+
children: c.map((t, n) => "divider" in t ? /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("span", {
|
|
13
15
|
role: "separator",
|
|
14
16
|
"aria-orientation": "horizontal",
|
|
15
17
|
className: e.divider
|
|
16
|
-
}) }, `divider-${n}`) : /* @__PURE__ */
|
|
18
|
+
}) }, `divider-${n}`) : /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(d, {
|
|
17
19
|
href: t.href,
|
|
18
20
|
"aria-current": t.active ? "page" : void 0,
|
|
19
21
|
"data-state": t.active ? "active" : void 0,
|
|
20
22
|
className: e.item,
|
|
21
|
-
children: [t.icon && /* @__PURE__ */
|
|
23
|
+
children: [t.icon && /* @__PURE__ */ o("span", {
|
|
22
24
|
className: e.icon,
|
|
23
25
|
"aria-hidden": "true",
|
|
24
26
|
children: t.icon
|
|
@@ -27,4 +29,4 @@ function s({ items: s, label: c, className: l }) {
|
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
//#endregion
|
|
30
|
-
export {
|
|
32
|
+
export { c as Switcher };
|
package/dist/toast/toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._viewport_cshyp_2{z-index:var(--cascivo-z-toast);gap:var(--cascivo-space-2);inline-size:min(24rem, calc(100vw - var(--cascivo-space-8)));pointer-events:none;flex-direction:column;display:flex;position:fixed;inset-block-end:var(--cascivo-space-4);inset-inline-end:var(--cascivo-space-4)}@media (width<=30rem){._viewport_cshyp_2{inset-inline:var(--cascivo-space-4);inline-size:auto}}._toast_cshyp_23{align-items:flex-start;gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);max-inline-size:calc(min(28rem, 100vw) - var(--cascivo-space-4,1rem));background-color:var(--cascivo-color-surface-overlay);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-overlay);pointer-events:auto;opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter);display:flex;translate:0}@starting-style{._toast_cshyp_23{opacity:0;translate:0 var(--cascivo-space-4)}}._toast_cshyp_23[data-state=dismissing],._toast_cshyp_23[data-state=gone]{opacity:0;translate:0 var(--cascivo-space-4);transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit)}._toast_cshyp_23[data-variant=success]{border-color:color-mix(in oklch, var(--cascivo-color-success) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=success] ._icon_cshyp_62,._toast_cshyp_23[data-variant=success] ._title_cshyp_63{color:var(--cascivo-color-success)}._toast_cshyp_23[data-variant=warning]{border-color:color-mix(in oklch, var(--cascivo-color-warning) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=warning] ._icon_cshyp_62,._toast_cshyp_23[data-variant=warning] ._title_cshyp_63{color:var(--cascivo-color-warning)}._toast_cshyp_23[data-variant=destructive]{border-color:color-mix(in oklch, var(--cascivo-color-destructive) 35%, var(--cascivo-color-border))}._toast_cshyp_23[data-variant=destructive] ._icon_cshyp_62,._toast_cshyp_23[data-variant=destructive] ._title_cshyp_63{color:var(--cascivo-color-destructive)}._body_cshyp_92{gap:var(--cascivo-space-1);flex-direction:column;flex:1;min-inline-size:0;display:flex}._title_cshyp_63{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}._description_cshyp_108{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-normal)}._close_cshyp_115{block-size:1.5rem;inline-size:1.5rem;font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}._close_cshyp_115:hover{color:var(--cascivo-color-text)}._close_cshyp_115:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}}@media (forced-colors:active){._toast_cshyp_23{border:1px solid canvastext}._close_cshyp_115:focus-visible{outline-offset:2px;outline:2px solid highlight}}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import './toast.css';
|
|
4
4
|
var e = {
|
|
5
|
-
viewport: "
|
|
6
|
-
toast: "
|
|
7
|
-
icon: "
|
|
8
|
-
title: "
|
|
9
|
-
body: "
|
|
10
|
-
description: "
|
|
11
|
-
close: "
|
|
5
|
+
viewport: "_viewport_cshyp_2",
|
|
6
|
+
toast: "_toast_cshyp_23",
|
|
7
|
+
icon: "_icon_cshyp_62",
|
|
8
|
+
title: "_title_cshyp_63",
|
|
9
|
+
body: "_body_cshyp_92",
|
|
10
|
+
description: "_description_cshyp_108",
|
|
11
|
+
close: "_close_cshyp_115"
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { e as default };
|