@ada-cx/lovelace 1.18.4 → 1.19.1
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/dist/components/AgentMessage/AgentMessage.js.map +1 -1
- package/dist/components/AttachmentChip/AttachmentChip.css.js +1 -1
- package/dist/components/AttachmentChip/AttachmentChip.js.map +1 -1
- package/dist/components/Avatar/Avatar.css.js +1 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarPlaceholder.js.map +1 -1
- package/dist/components/Banner/Banner.css.js +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/BannerContainer.js.map +1 -1
- package/dist/components/Banner/BannerContainerSlide.js.map +1 -1
- package/dist/components/BubbleOverlay/BubbleOverlay.js.map +1 -1
- package/dist/components/Button/Button.css.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.css.d.ts +8 -0
- package/dist/components/Card/Card.css.js +7 -0
- package/dist/components/Card/Card.css.js.map +1 -0
- package/dist/components/Card/Card.d.ts +14 -0
- package/dist/components/Card/Card.js +18 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/CardActions.d.ts +7 -0
- package/dist/components/Card/CardActions.js +14 -0
- package/dist/components/Card/CardActions.js.map +1 -0
- package/dist/components/Card/CardBody.d.ts +7 -0
- package/dist/components/Card/CardBody.js +14 -0
- package/dist/components/Card/CardBody.js.map +1 -0
- package/dist/components/Card/CardDescription.d.ts +9 -0
- package/dist/components/Card/CardDescription.js +15 -0
- package/dist/components/Card/CardDescription.js.map +1 -0
- package/dist/components/Card/CardMedia.d.ts +17 -0
- package/dist/components/Card/CardMedia.js +23 -0
- package/dist/components/Card/CardMedia.js.map +1 -0
- package/dist/components/Card/CardRoot.d.ts +22 -0
- package/dist/components/Card/CardRoot.js +25 -0
- package/dist/components/Card/CardRoot.js.map +1 -0
- package/dist/components/Card/CardTitle.d.ts +9 -0
- package/dist/components/Card/CardTitle.js +15 -0
- package/dist/components/Card/CardTitle.js.map +1 -0
- package/dist/components/Card/index.d.ts +6 -0
- package/dist/components/Carousel/Carousel.css.d.ts +6 -0
- package/dist/components/Carousel/Carousel.css.js +7 -0
- package/dist/components/Carousel/Carousel.css.js.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +19 -0
- package/dist/components/Carousel/Carousel.js +141 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/CarouselItem.d.ts +8 -0
- package/dist/components/Carousel/CarouselItem.js +14 -0
- package/dist/components/Carousel/CarouselItem.js.map +1 -0
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.css.js +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/Checkbox/CheckboxIndicator.js.map +1 -1
- package/dist/components/Chip/Chip.css.js +1 -1
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Dialog/Dialog.css.js +1 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/DialogActions.js.map +1 -1
- package/dist/components/Dialog/DialogBody.js.map +1 -1
- package/dist/components/Dialog/DialogContent.js.map +1 -1
- package/dist/components/Dialog/DialogIcon.js.map +1 -1
- package/dist/components/Dialog/DialogRoot.js.map +1 -1
- package/dist/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/components/DialogOverlay/DialogOverlay.js.map +1 -1
- package/dist/components/Divider/Divider.css.js +1 -1
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/DropZone/DropZone.js.map +1 -1
- package/dist/components/FullscreenOverlay/FullscreenOverlay.js.map +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderRoot.js.map +1 -1
- package/dist/components/Header/HeaderTitle.js.map +1 -1
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon/icons/AdaLogo.js.map +1 -1
- package/dist/components/Icon/icons/ArrowDown.js.map +1 -1
- package/dist/components/Icon/icons/ArrowLeft.js.map +1 -1
- package/dist/components/Icon/icons/ArrowNortheast.js.map +1 -1
- package/dist/components/Icon/icons/ArrowNorthwest.js.map +1 -1
- package/dist/components/Icon/icons/ArrowRight.js.map +1 -1
- package/dist/components/Icon/icons/ArrowUp.js.map +1 -1
- package/dist/components/Icon/icons/Bell.js.map +1 -1
- package/dist/components/Icon/icons/BellSlash.js.map +1 -1
- package/dist/components/Icon/icons/Checkmark.js.map +1 -1
- package/dist/components/Icon/icons/CheckmarkCircle.js.map +1 -1
- package/dist/components/Icon/icons/ChevronLeft.js.map +1 -1
- package/dist/components/Icon/icons/ChevronRight.js.map +1 -1
- package/dist/components/Icon/icons/CloudUpload.js.map +1 -1
- package/dist/components/Icon/icons/Document.js.map +1 -1
- package/dist/components/Icon/icons/Download.js.map +1 -1
- package/dist/components/Icon/icons/Ellipses.js.map +1 -1
- package/dist/components/Icon/icons/Email.js.map +1 -1
- package/dist/components/Icon/icons/ExclamationSync.js.map +1 -1
- package/dist/components/Icon/icons/ExclamationTriangle.js.map +1 -1
- package/dist/components/Icon/icons/Eye.js.map +1 -1
- package/dist/components/Icon/icons/EyeSlash.js.map +1 -1
- package/dist/components/Icon/icons/Glyph.js.map +1 -1
- package/dist/components/Icon/icons/Language.js.map +1 -1
- package/dist/components/Icon/icons/MediaSlash.js.map +1 -1
- package/dist/components/Icon/icons/MessagingFill.js.map +1 -1
- package/dist/components/Icon/icons/Minimize.js.map +1 -1
- package/dist/components/Icon/icons/Mute.js.map +1 -1
- package/dist/components/Icon/icons/Paperclip.js.map +1 -1
- package/dist/components/Icon/icons/PersonFill.js.map +1 -1
- package/dist/components/Icon/icons/PlayFill.js.map +1 -1
- package/dist/components/Icon/icons/Send.js.map +1 -1
- package/dist/components/Icon/icons/StarBadgeFill.js.map +1 -1
- package/dist/components/Icon/icons/ThumbsDown.js.map +1 -1
- package/dist/components/Icon/icons/ThumbsUp.js.map +1 -1
- package/dist/components/Icon/icons/Volume.js.map +1 -1
- package/dist/components/Icon/icons/Xmark.js.map +1 -1
- package/dist/components/Icon/icons/XmarkCircle.js.map +1 -1
- package/dist/components/IconButton/IconButton.css.js +1 -1
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Input/Input.context.js.map +1 -1
- package/dist/components/Input/Input.css.js +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/InputAttachments.js.map +1 -1
- package/dist/components/Input/InputButton.js.map +1 -1
- package/dist/components/Input/InputControl.js.map +1 -1
- package/dist/components/Input/InputField.js.map +1 -1
- package/dist/components/Input/InputHelperText.js.map +1 -1
- package/dist/components/Input/InputLabel.js.map +1 -1
- package/dist/components/Input/InputRoot.js.map +1 -1
- package/dist/components/Input/InputTextArea.js.map +1 -1
- package/dist/components/Link/Link.css.js +1 -1
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/MenuItem/Menu.js.map +1 -1
- package/dist/components/MenuItem/MenuItem.js.map +1 -1
- package/dist/components/MenuItem/MenuItemCheckbox.js.map +1 -1
- package/dist/components/MenuItem/MenuItemLabel.js.map +1 -1
- package/dist/components/MenuItem/MenuItemRadio.js.map +1 -1
- package/dist/components/MenuItem/MenuItemRoot.js.map +1 -1
- package/dist/components/MenuItem/MenuItemToggle.js.map +1 -1
- package/dist/components/MessageError/MessageError.js.map +1 -1
- package/dist/components/MessageProse/MessageProse.js.map +1 -1
- package/dist/components/MessageRow/MessageRow.context.js.map +1 -1
- package/dist/components/MessageRow/MessageRow.css.js +1 -1
- package/dist/components/MessageRow/MessageRow.js.map +1 -1
- package/dist/components/MessageRow/MessageRowContent.js.map +1 -1
- package/dist/components/MessageRow/MessageRowRoot.js.map +1 -1
- package/dist/components/PictureMessage/PictureMessage.css.js +1 -1
- package/dist/components/PictureMessage/PictureMessage.js.map +1 -1
- package/dist/components/PillButton/PillButton.css.js +1 -1
- package/dist/components/PillButton/PillButton.js.map +1 -1
- package/dist/components/ProactiveMessage/ProactiveMessage.js.map +1 -1
- package/dist/components/Radio/Radio.css.js +1 -1
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/RadioGroup.js.map +1 -1
- package/dist/components/Radio/RadioIndicator.js.map +1 -1
- package/dist/components/ScrollMarker/ScrollMarker.css.js +1 -1
- package/dist/components/ScrollMarker/ScrollMarker.js.map +1 -1
- package/dist/components/Sheet/Sheet.js.map +1 -1
- package/dist/components/Sheet/SheetActions.js.map +1 -1
- package/dist/components/Sheet/SheetBackButton.js.map +1 -1
- package/dist/components/Sheet/SheetBody.js.map +1 -1
- package/dist/components/Sheet/SheetCloseButton.js.map +1 -1
- package/dist/components/Sheet/SheetHeader.js.map +1 -1
- package/dist/components/Sheet/SheetRoot.js.map +1 -1
- package/dist/components/Sheet/SheetTitle.js.map +1 -1
- package/dist/components/SheetOverlay/SheetOverlay.js.map +1 -1
- package/dist/components/Spinner/Spinner.css.js +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/SurveyRating/SurveyRating.js.map +1 -1
- package/dist/components/SurveySelect/SurveySelect.js.map +1 -1
- package/dist/components/Text/Text.css.js +1 -1
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/ThinkingShimmer/ThinkingShimmer.js.map +1 -1
- package/dist/components/Toast/Toast.css.js +1 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/ToastContainer.js.map +1 -1
- package/dist/components/Toast/index.js +4 -4
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/ToggleIndicator.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.js.map +1 -1
- package/dist/components/UserMessage/UserMessage.js.map +1 -1
- package/dist/components/VideoMessage/VideoMessage.css.js +1 -1
- package/dist/components/VideoMessage/VideoMessage.js.map +1 -1
- package/dist/hooks/overlayRegistry.js.map +1 -1
- package/dist/hooks/usePrefersReducedMotion.js.map +1 -1
- package/dist/hooks/useSubmitOnEnter.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +46 -43
- package/dist/runtime/LovelaceProvider.js +6 -6
- package/dist/runtime/LovelaceProvider.js.map +1 -1
- package/dist/runtime/branding.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tokens/tokens.js.map +1 -1
- package/dist/utils/animation.js.map +1 -1
- package/dist/utils/cx.js.map +1 -1
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +1 -1
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { ChevronLeft as t } from "../Icon/icons/ChevronLeft.js";
|
|
3
|
+
import { ChevronRight as n } from "../Icon/icons/ChevronRight.js";
|
|
4
|
+
import { readPrefersReducedMotion as r } from "../../hooks/usePrefersReducedMotion.js";
|
|
5
|
+
import { IconButton as i } from "../IconButton/IconButton.js";
|
|
6
|
+
import { carouselRoot as a, carouselTrack as o } from "./Carousel.css.js";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Group as l, useLocale as u } from "react-aria-components";
|
|
9
|
+
import { Children as d, isValidElement as f, useEffect as p, useRef as m, useState as h } from "react";
|
|
10
|
+
//#region src/components/Carousel/Carousel.tsx
|
|
11
|
+
function g(e) {
|
|
12
|
+
return Array.from(e.children);
|
|
13
|
+
}
|
|
14
|
+
function _(e, t, n, r, i) {
|
|
15
|
+
let a = e.getBoundingClientRect(), o = t.getBoundingClientRect(), s = getComputedStyle(e), c = Number.parseFloat(s.scrollPaddingInlineStart) || 0, l = Number.parseFloat(s.scrollPaddingInlineEnd) || 0, u = () => o.left - a.left - (i ? l : c), d = () => o.right - a.right + (i ? c : l);
|
|
16
|
+
return n === 0 ? i ? d() : u() : n === r - 1 ? i ? u() : d() : (o.left + o.right) / 2 - (a.left + a.right) / 2;
|
|
17
|
+
}
|
|
18
|
+
function v(e, t) {
|
|
19
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
20
|
+
return r.left >= n.left - 1 && r.right <= n.right + 1;
|
|
21
|
+
}
|
|
22
|
+
function y(e, t) {
|
|
23
|
+
let n = g(e), r = e.scrollWidth - e.clientWidth;
|
|
24
|
+
if (n.length > 0 && r > 0 && Math.abs(e.scrollLeft) >= r - 1) return n.length - 1;
|
|
25
|
+
let i = 0, a = Infinity;
|
|
26
|
+
return n.forEach((r, o) => {
|
|
27
|
+
let s = Math.abs(_(e, r, o, n.length, t));
|
|
28
|
+
s < a && (i = o, a = s);
|
|
29
|
+
}), i;
|
|
30
|
+
}
|
|
31
|
+
function b(e) {
|
|
32
|
+
return typeof CSS > "u" || typeof CSS.supports != "function" || !CSS.supports("selector(:focus-visible)") || e.matches(":focus-visible");
|
|
33
|
+
}
|
|
34
|
+
var x = 600;
|
|
35
|
+
function S({ children: S, label: C, previousLabel: w, nextLabel: T, className: E, style: D }) {
|
|
36
|
+
let O = m(null), [k, A] = h(0), j = m(null), M = m(null), [N, P] = h(!1), { direction: F } = u(), I = F === "rtl", L = d.toArray(S), R = L.length, z = L.map((e) => f(e) ? String(e.key) : "").join("|"), B = () => {
|
|
37
|
+
M.current !== null && (clearTimeout(M.current), M.current = null);
|
|
38
|
+
}, V = () => {
|
|
39
|
+
B(), j.current = null;
|
|
40
|
+
}, H = () => {
|
|
41
|
+
let e = O.current;
|
|
42
|
+
j.current !== null && (V(), e && A(y(e, I)));
|
|
43
|
+
}, U = () => {
|
|
44
|
+
B(), M.current = setTimeout(H, x);
|
|
45
|
+
}, W = m(H);
|
|
46
|
+
W.current = H, p(() => {
|
|
47
|
+
let e = O.current;
|
|
48
|
+
if (!e) return;
|
|
49
|
+
let t = () => W.current();
|
|
50
|
+
return e.addEventListener("scrollend", t), () => {
|
|
51
|
+
e.removeEventListener("scrollend", t), M.current !== null && clearTimeout(M.current);
|
|
52
|
+
};
|
|
53
|
+
}, []), p(() => {
|
|
54
|
+
let e = O.current;
|
|
55
|
+
if (!e) return;
|
|
56
|
+
let t = () => P(e.scrollWidth > e.clientWidth);
|
|
57
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
58
|
+
let n = new ResizeObserver(t);
|
|
59
|
+
n.observe(e);
|
|
60
|
+
for (let t of g(e)) n.observe(t);
|
|
61
|
+
return () => n.disconnect();
|
|
62
|
+
}, [z]);
|
|
63
|
+
let G = Math.min(k, Math.max(R - 1, 0)), K = G > 0, q = G < R - 1, J = (e) => {
|
|
64
|
+
let t = O.current, n = t ? g(t)[e] : void 0;
|
|
65
|
+
if (!t || !n) return;
|
|
66
|
+
let i = t.scrollLeft + _(t, n, e, g(t).length, I);
|
|
67
|
+
typeof t.scrollTo == "function" ? t.scrollTo({
|
|
68
|
+
left: i,
|
|
69
|
+
behavior: r() ? "instant" : "smooth"
|
|
70
|
+
}) : t.scrollLeft = i, j.current = e, A(e);
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ c("div", {
|
|
73
|
+
className: e(a, E),
|
|
74
|
+
style: D,
|
|
75
|
+
children: [/* @__PURE__ */ s(l, {
|
|
76
|
+
ref: O,
|
|
77
|
+
"aria-label": C,
|
|
78
|
+
className: o,
|
|
79
|
+
onPointerDown: V,
|
|
80
|
+
onTouchStart: V,
|
|
81
|
+
onWheel: V,
|
|
82
|
+
onFocus: (e) => {
|
|
83
|
+
let t = e.currentTarget, n = g(t).findIndex((t) => t.contains(e.target)), r = g(t)[n];
|
|
84
|
+
r && b(e.target) && !v(t, r) && J(n);
|
|
85
|
+
},
|
|
86
|
+
onScroll: (e) => {
|
|
87
|
+
let t = y(e.currentTarget, I);
|
|
88
|
+
if (j.current !== null) {
|
|
89
|
+
t === j.current ? V() : U();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
A(t);
|
|
93
|
+
},
|
|
94
|
+
children: S
|
|
95
|
+
}), R > 1 && N && /* @__PURE__ */ c("div", {
|
|
96
|
+
className: "_1vler2p3",
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ s(i, {
|
|
99
|
+
label: w,
|
|
100
|
+
variant: "tertiary",
|
|
101
|
+
size: "xs",
|
|
102
|
+
"aria-disabled": !K || void 0,
|
|
103
|
+
onPress: () => {
|
|
104
|
+
K && J(G - 1);
|
|
105
|
+
},
|
|
106
|
+
children: s(I ? n : t, {})
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ c("div", {
|
|
109
|
+
"aria-hidden": "true",
|
|
110
|
+
"data-testid": "carousel-position",
|
|
111
|
+
className: "_1vler2p4",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ s("span", {
|
|
114
|
+
className: "_1vler2p5",
|
|
115
|
+
children: G + 1
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ s("span", { children: "/" }),
|
|
118
|
+
/* @__PURE__ */ s("span", {
|
|
119
|
+
className: "_1vler2p5",
|
|
120
|
+
children: R
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ s(i, {
|
|
125
|
+
label: T,
|
|
126
|
+
variant: "tertiary",
|
|
127
|
+
size: "xs",
|
|
128
|
+
"aria-disabled": !q || void 0,
|
|
129
|
+
onPress: () => {
|
|
130
|
+
q && J(G + 1);
|
|
131
|
+
},
|
|
132
|
+
children: s(I ? t : n, {})
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { S as Carousel };
|
|
140
|
+
|
|
141
|
+
//# sourceMappingURL=Carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from \"react\";\nimport { Children, isValidElement, useEffect, useRef, useState } from \"react\";\nimport { Group, useLocale } from \"react-aria-components\";\nimport { readPrefersReducedMotion } from \"../../hooks/usePrefersReducedMotion.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { ChevronLeft } from \"../Icon/icons/ChevronLeft.js\";\nimport { ChevronRight } from \"../Icon/icons/ChevronRight.js\";\nimport { IconButton } from \"../IconButton/index.js\";\nimport {\n\tcarouselCounter,\n\tcarouselCounterNumber,\n\tcarouselFooter,\n\tcarouselRoot,\n\tcarouselTrack,\n} from \"./Carousel.css.js\";\n\nexport interface CarouselProps {\n\t/** The slides, each a `CarouselItem`. */\n\tchildren?: ReactNode;\n\t/** Accessible name of the group of slides. */\n\tlabel: string;\n\t/** Accessible name of the previous-slide button. */\n\tpreviousLabel: string;\n\t/** Accessible name of the next-slide button. */\n\tnextLabel: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n}\n\nfunction itemsOf(track: HTMLElement): HTMLElement[] {\n\treturn Array.from(track.children) as HTMLElement[];\n}\n\n/** How far the track must scroll for `item` to sit where it snaps: the first\n * item at the start edge, the last at the end edge and any other in the\n * middle. Physical pixels, so it adds to `scrollLeft` in either direction. */\nfunction offsetToSnap(\n\ttrack: HTMLElement,\n\titem: HTMLElement,\n\tindex: number,\n\tcount: number,\n\tisRtl: boolean,\n): number {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\tconst style = getComputedStyle(track);\n\tconst paddingStart = Number.parseFloat(style.scrollPaddingInlineStart) || 0;\n\tconst paddingEnd = Number.parseFloat(style.scrollPaddingInlineEnd) || 0;\n\tconst left = () =>\n\t\titemRect.left - trackRect.left - (isRtl ? paddingEnd : paddingStart);\n\tconst right = () =>\n\t\titemRect.right - trackRect.right + (isRtl ? paddingStart : paddingEnd);\n\n\tif (index === 0) {\n\t\treturn isRtl ? right() : left();\n\t}\n\tif (index === count - 1) {\n\t\treturn isRtl ? left() : right();\n\t}\n\treturn (\n\t\t(itemRect.left + itemRect.right) / 2 -\n\t\t(trackRect.left + trackRect.right) / 2\n\t);\n}\n\nfunction isFullyVisible(track: HTMLElement, item: HTMLElement): boolean {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\treturn (\n\t\titemRect.left >= trackRect.left - 1 && itemRect.right <= trackRect.right + 1\n\t);\n}\n\nfunction currentIndexOf(track: HTMLElement, isRtl: boolean): number {\n\tconst items = itemsOf(track);\n\t// A track short enough that the last item meets the end edge before it is\n\t// the closest snap point still has to count the end of its range as the last\n\t// item.\n\tconst maxScroll = track.scrollWidth - track.clientWidth;\n\tif (\n\t\titems.length > 0 &&\n\t\tmaxScroll > 0 &&\n\t\tMath.abs(track.scrollLeft) >= maxScroll - 1\n\t) {\n\t\treturn items.length - 1;\n\t}\n\tlet closest = 0;\n\tlet closestDistance = Number.POSITIVE_INFINITY;\n\titems.forEach((item, index) => {\n\t\tconst distance = Math.abs(\n\t\t\toffsetToSnap(track, item, index, items.length, isRtl),\n\t\t);\n\t\tif (distance < closestDistance) {\n\t\t\tclosest = index;\n\t\t\tclosestDistance = distance;\n\t\t}\n\t});\n\treturn closest;\n}\n\n// React Aria focuses a pressable card on pointerdown. A scroll at that moment\n// moves the card from under the finger and cancels the press, so only keyboard\n// focus scrolls. Where `:focus-visible` is not supported, as in jsdom, every\n// focus scrolls.\nfunction isKeyboardFocus(element: Element): boolean {\n\tif (\n\t\ttypeof CSS === \"undefined\" ||\n\t\ttypeof CSS.supports !== \"function\" ||\n\t\t!CSS.supports(\"selector(:focus-visible)\")\n\t) {\n\t\treturn true;\n\t}\n\treturn element.matches(\":focus-visible\");\n}\n\n// Safari before 18.2 has no `scrollend`, so a quiet period after the last\n// scroll event also counts as the end of a button scroll.\nconst SCROLL_SETTLE_MS = 600;\n\n/**\n * A row of slides that scrolls sideways and snaps to each slide. When the\n * slides overflow, a footer shows the previous and next buttons and the\n * position as \"1 / 3\". Keyboard focus on a partly hidden slide scrolls it in.\n */\nexport function Carousel({\n\tchildren,\n\tlabel,\n\tpreviousLabel,\n\tnextLabel,\n\tclassName,\n\tstyle,\n}: CarouselProps) {\n\tconst trackRef = useRef<HTMLDivElement>(null);\n\tconst [currentIndex, setCurrentIndex] = useState(0);\n\t// A button scroll animates past the slides in between. Until it lands, the\n\t// track position names one of those as current, and a second press would\n\t// start from it instead of from the slide the first press asked for.\n\tconst targetIndexRef = useRef<number | null>(null);\n\tconst settleTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst [overflows, setOverflows] = useState(false);\n\tconst { direction } = useLocale();\n\tconst isRtl = direction === \"rtl\";\n\tconst slides = Children.toArray(children);\n\tconst count = slides.length;\n\tconst slideKeys = slides\n\t\t.map((slide) => (isValidElement(slide) ? String(slide.key) : \"\"))\n\t\t.join(\"|\");\n\n\tconst clearSettleTimer = () => {\n\t\tif (settleTimerRef.current !== null) {\n\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\tsettleTimerRef.current = null;\n\t\t}\n\t};\n\tconst releaseTarget = () => {\n\t\tclearSettleTimer();\n\t\ttargetIndexRef.current = null;\n\t};\n\t// The track cannot always align the target slide, for example when the\n\t// slides after it fit beside it. The scroll then stops short of the target,\n\t// so the lock ends with the scroll and the counter takes the real position.\n\tconst settleTarget = () => {\n\t\tconst track = trackRef.current;\n\t\tif (targetIndexRef.current === null) {\n\t\t\treturn;\n\t\t}\n\t\treleaseTarget();\n\t\tif (track) {\n\t\t\tsetCurrentIndex(currentIndexOf(track, isRtl));\n\t\t}\n\t};\n\tconst scheduleSettle = () => {\n\t\tclearSettleTimer();\n\t\tsettleTimerRef.current = setTimeout(settleTarget, SCROLL_SETTLE_MS);\n\t};\n\tconst settleTargetRef = useRef(settleTarget);\n\tsettleTargetRef.current = settleTarget;\n\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst onScrollEnd = () => settleTargetRef.current();\n\t\ttrack.addEventListener(\"scrollend\", onScrollEnd);\n\t\treturn () => {\n\t\t\ttrack.removeEventListener(\"scrollend\", onScrollEnd);\n\t\t\tif (settleTimerRef.current !== null) {\n\t\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: slideKeys isn't read here, but a new set of slides, even one of the same length, must be measured and observed again.\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst measure = () => setOverflows(track.scrollWidth > track.clientWidth);\n\t\tmeasure();\n\t\t// Absent in jsdom, so the measurement above has to stand on its own.\n\t\tif (typeof ResizeObserver === \"undefined\") {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new ResizeObserver(measure);\n\t\tobserver.observe(track);\n\t\tfor (const item of itemsOf(track)) {\n\t\t\tobserver.observe(item);\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [slideKeys]);\n\n\t// A new set of slides can be shorter than the position the track was at.\n\tconst shownIndex = Math.min(currentIndex, Math.max(count - 1, 0));\n\tconst hasPrevious = shownIndex > 0;\n\tconst hasNext = shownIndex < count - 1;\n\n\tconst scrollToItem = (index: number) => {\n\t\tconst track = trackRef.current;\n\t\tconst item = track ? itemsOf(track)[index] : undefined;\n\t\tif (!track || !item) {\n\t\t\treturn;\n\t\t}\n\t\tconst left =\n\t\t\ttrack.scrollLeft +\n\t\t\toffsetToSnap(track, item, index, itemsOf(track).length, isRtl);\n\t\tif (typeof track.scrollTo === \"function\") {\n\t\t\ttrack.scrollTo({\n\t\t\t\tleft,\n\t\t\t\tbehavior: readPrefersReducedMotion() ? \"instant\" : \"smooth\",\n\t\t\t});\n\t\t} else {\n\t\t\ttrack.scrollLeft = left;\n\t\t}\n\t\ttargetIndexRef.current = index;\n\t\tsetCurrentIndex(index);\n\t};\n\n\treturn (\n\t\t<div className={cx(carouselRoot, className)} style={style}>\n\t\t\t<Group\n\t\t\t\tref={trackRef}\n\t\t\t\taria-label={label}\n\t\t\t\tclassName={carouselTrack}\n\t\t\t\tonPointerDown={releaseTarget}\n\t\t\t\tonTouchStart={releaseTarget}\n\t\t\t\tonWheel={releaseTarget}\n\t\t\t\tonFocus={(event) => {\n\t\t\t\t\tconst track = event.currentTarget;\n\t\t\t\t\tconst index = itemsOf(track).findIndex((item) =>\n\t\t\t\t\t\titem.contains(event.target),\n\t\t\t\t\t);\n\t\t\t\t\tconst item = itemsOf(track)[index];\n\t\t\t\t\tif (\n\t\t\t\t\t\titem &&\n\t\t\t\t\t\tisKeyboardFocus(event.target) &&\n\t\t\t\t\t\t!isFullyVisible(track, item)\n\t\t\t\t\t) {\n\t\t\t\t\t\tscrollToItem(index);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonScroll={(event) => {\n\t\t\t\t\tconst index = currentIndexOf(event.currentTarget, isRtl);\n\t\t\t\t\tif (targetIndexRef.current !== null) {\n\t\t\t\t\t\tif (index === targetIndexRef.current) {\n\t\t\t\t\t\t\treleaseTarget();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscheduleSettle();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetCurrentIndex(index);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Group>\n\t\t\t{count > 1 && overflows && (\n\t\t\t\t<div className={carouselFooter}>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={previousLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t// aria-disabled keeps the button focusable at the end, so focus\n\t\t\t\t\t\t// does not jump away after the last press.\n\t\t\t\t\t\taria-disabled={!hasPrevious || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasPrevious) {\n\t\t\t\t\t\t\t\tscrollToItem(shownIndex - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronRight /> : <ChevronLeft />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tdata-testid=\"carousel-position\"\n\t\t\t\t\t\tclassName={carouselCounter}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{shownIndex + 1}</span>\n\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{count}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={nextLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\taria-disabled={!hasNext || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasNext) {\n\t\t\t\t\t\t\t\tscrollToItem(shownIndex + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronLeft /> : <ChevronRight />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AA6BA,SAAS,EAAQ,GAAmC;CACnD,OAAO,MAAM,KAAK,EAAM,QAAQ;AACjC;AAKA,SAAS,EACR,GACA,GACA,GACA,GACA,GACS;CACT,IAAM,IAAY,EAAM,sBAAsB,GACxC,IAAW,EAAK,sBAAsB,GACtC,IAAQ,iBAAiB,CAAK,GAC9B,IAAe,OAAO,WAAW,EAAM,wBAAwB,KAAK,GACpE,IAAa,OAAO,WAAW,EAAM,sBAAsB,KAAK,GAChE,UACL,EAAS,OAAO,EAAU,QAAQ,IAAQ,IAAa,IAClD,UACL,EAAS,QAAQ,EAAU,SAAS,IAAQ,IAAe;CAQ5D,OANI,MAAU,IACN,IAAQ,EAAM,IAAI,EAAK,IAE3B,MAAU,IAAQ,IACd,IAAQ,EAAK,IAAI,EAAM,KAG7B,EAAS,OAAO,EAAS,SAAS,KAClC,EAAU,OAAO,EAAU,SAAS;AAEvC;AAEA,SAAS,EAAe,GAAoB,GAA4B;CACvE,IAAM,IAAY,EAAM,sBAAsB,GACxC,IAAW,EAAK,sBAAsB;CAC5C,OACC,EAAS,QAAQ,EAAU,OAAO,KAAK,EAAS,SAAS,EAAU,QAAQ;AAE7E;AAEA,SAAS,EAAe,GAAoB,GAAwB;CACnE,IAAM,IAAQ,EAAQ,CAAK,GAIrB,IAAY,EAAM,cAAc,EAAM;CAC5C,IACC,EAAM,SAAS,KACf,IAAY,KACZ,KAAK,IAAI,EAAM,UAAU,KAAK,IAAY,GAE1C,OAAO,EAAM,SAAS;CAEvB,IAAI,IAAU,GACV,IAAkB;CAUtB,OATA,EAAM,SAAS,GAAM,MAAU;EAC9B,IAAM,IAAW,KAAK,IACrB,EAAa,GAAO,GAAM,GAAO,EAAM,QAAQ,CAAK,CACrD;EACA,AAAI,IAAW,MACd,IAAU,GACV,IAAkB;CAEpB,CAAC,GACM;AACR;AAMA,SAAS,EAAgB,GAA2B;CAQnD,OANC,OAAO,MAAQ,OACf,OAAO,IAAI,YAAa,cACxB,CAAC,IAAI,SAAS,0BAA0B,KAIlC,EAAQ,QAAQ,gBAAgB;AACxC;AAIA,IAAM,IAAmB;AAOzB,SAAgB,EAAS,EACxB,aACA,UACA,kBACA,cACA,cACA,YACiB;CACjB,IAAM,IAAW,EAAuB,IAAI,GACtC,CAAC,GAAc,KAAmB,EAAS,CAAC,GAI5C,IAAiB,EAAsB,IAAI,GAC3C,IAAiB,EAA6C,IAAI,GAClE,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,EAAE,iBAAc,EAAU,GAC1B,IAAQ,MAAc,OACtB,IAAS,EAAS,QAAQ,CAAQ,GAClC,IAAQ,EAAO,QACf,IAAY,EAChB,KAAK,MAAW,EAAe,CAAK,IAAI,OAAO,EAAM,GAAG,IAAI,EAAG,CAAC,CAChE,KAAK,GAAG,GAEJ,UAAyB;EAC9B,AAAI,EAAe,YAAY,SAC9B,aAAa,EAAe,OAAO,GACnC,EAAe,UAAU;CAE3B,GACM,UAAsB;EAE3B,AADA,EAAiB,GACjB,EAAe,UAAU;CAC1B,GAIM,UAAqB;EAC1B,IAAM,IAAQ,EAAS;EACnB,EAAe,YAAY,SAG/B,EAAc,GACV,KACH,EAAgB,EAAe,GAAO,CAAK,CAAC;CAE9C,GACM,UAAuB;EAE5B,AADA,EAAiB,GACjB,EAAe,UAAU,WAAW,GAAc,CAAgB;CACnE,GACM,IAAkB,EAAO,CAAY;CAmB3C,AAlBA,EAAgB,UAAU,GAE1B,QAAgB;EACf,IAAM,IAAQ,EAAS;EACvB,IAAI,CAAC,GACJ;EAED,IAAM,UAAoB,EAAgB,QAAQ;EAElD,OADA,EAAM,iBAAiB,aAAa,CAAW,SAClC;GAEZ,AADA,EAAM,oBAAoB,aAAa,CAAW,GAC9C,EAAe,YAAY,QAC9B,aAAa,EAAe,OAAO;EAErC;CACD,GAAG,CAAC,CAAC,GAGL,QAAgB;EACf,IAAM,IAAQ,EAAS;EACvB,IAAI,CAAC,GACJ;EAED,IAAM,UAAgB,EAAa,EAAM,cAAc,EAAM,WAAW;EAGxE,IAFA,EAAQ,GAEJ,OAAO,iBAAmB,KAC7B;EAED,IAAM,IAAW,IAAI,eAAe,CAAO;EAC3C,EAAS,QAAQ,CAAK;EACtB,KAAK,IAAM,KAAQ,EAAQ,CAAK,GAC/B,EAAS,QAAQ,CAAI;EAEtB,aAAa,EAAS,WAAW;CAClC,GAAG,CAAC,CAAS,CAAC;CAGd,IAAM,IAAa,KAAK,IAAI,GAAc,KAAK,IAAI,IAAQ,GAAG,CAAC,CAAC,GAC1D,IAAc,IAAa,GAC3B,IAAU,IAAa,IAAQ,GAE/B,KAAgB,MAAkB;EACvC,IAAM,IAAQ,EAAS,SACjB,IAAO,IAAQ,EAAQ,CAAK,CAAC,CAAC,KAAS,KAAA;EAC7C,IAAI,CAAC,KAAS,CAAC,GACd;EAED,IAAM,IACL,EAAM,aACN,EAAa,GAAO,GAAM,GAAO,EAAQ,CAAK,CAAC,CAAC,QAAQ,CAAK;EAU9D,AATI,OAAO,EAAM,YAAa,aAC7B,EAAM,SAAS;GACd;GACA,UAAU,EAAyB,IAAI,YAAY;EACpD,CAAC,IAED,EAAM,aAAa,GAEpB,EAAe,UAAU,GACzB,EAAgB,CAAK;CACtB;CAEA,OACC,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAc,CAAS;EAAU;YAApD,CACC,kBAAC,GAAD;GACC,KAAK;GACL,cAAY;GACZ,WAAW;GACX,eAAe;GACf,cAAc;GACd,SAAS;GACT,UAAU,MAAU;IACnB,IAAM,IAAQ,EAAM,eACd,IAAQ,EAAQ,CAAK,CAAC,CAAC,WAAW,MACvC,EAAK,SAAS,EAAM,MAAM,CAC3B,GACM,IAAO,EAAQ,CAAK,CAAC,CAAC;IAC5B,AACC,KACA,EAAgB,EAAM,MAAM,KAC5B,CAAC,EAAe,GAAO,CAAI,KAE3B,EAAa,CAAK;GAEpB;GACA,WAAW,MAAU;IACpB,IAAM,IAAQ,EAAe,EAAM,eAAe,CAAK;IACvD,IAAI,EAAe,YAAY,MAAM;KACpC,AAAI,MAAU,EAAe,UAC5B,EAAc,IAEd,EAAe;KAEhB;IACD;IACA,EAAgB,CAAK;GACtB;GAEC;EACK,CAAA,GACN,IAAQ,KAAK,KACb,kBAAC,OAAD;GAAK,WAAA;aAAL;IACC,kBAAC,GAAD;KACC,OAAO;KACP,SAAQ;KACR,MAAK;KAGL,iBAAe,CAAC,KAAe,KAAA;KAC/B,eAAe;MACd,AAAI,KACH,EAAa,IAAa,CAAC;KAE7B;eAES,EAAR,IAAS,IAAmB,GAApB,CAAe,CAAkB;IAC/B,CAAA;IACZ,kBAAC,OAAD;KACC,eAAY;KACZ,eAAY;KACZ,WAAA;eAHD;MAKC,kBAAC,QAAD;OAAM,WAAA;iBAAmC,IAAa;MAAQ,CAAA;MAC9D,kBAAC,QAAD,EAAA,UAAM,IAAO,CAAA;MACb,kBAAC,QAAD;OAAM,WAAA;iBAAmC;MAAY,CAAA;KACjD;;IACL,kBAAC,GAAD;KACC,OAAO;KACP,SAAQ;KACR,MAAK;KACL,iBAAe,CAAC,KAAW,KAAA;KAC3B,eAAe;MACd,AAAI,KACH,EAAa,IAAa,CAAC;KAE7B;eAES,EAAR,IAAS,IAAkB,GAAnB,CAAc,CAAmB;IAC/B,CAAA;GACR;IAEF;;AAEP"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface CarouselItemProps {
|
|
3
|
+
/** One slide, usually a `Card`. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/** One slide. Each item snaps to the start of the track. */
|
|
8
|
+
export declare function CarouselItem({ children, className }: CarouselItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { carouselItem as t } from "./Carousel.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Carousel/CarouselItem.tsx
|
|
5
|
+
function r({ children: r, className: i }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: e(t, i),
|
|
8
|
+
children: r
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as CarouselItem };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=CarouselItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselItem.js","names":[],"sources":["../../../src/components/Carousel/CarouselItem.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { carouselItem } from \"./Carousel.css.js\";\n\nexport interface CarouselItemProps {\n\t/** One slide, usually a `Card`. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** One slide. Each item snaps to the start of the track. */\nexport function CarouselItem({ children, className }: CarouselItemProps) {\n\treturn <div className={cx(carouselItem, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAa,EAAE,aAAU,gBAAgC;CACxE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAc,CAAS;EAAI;CAAc,CAAA;AACpE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/components/Checkbox/Checkbox.css.ts
|
|
4
4
|
var t = "s7h2sn0", n = e({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxProps as AriaCheckboxProps } from \"react-aria-components\";\nimport { Checkbox as AriaCheckbox } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxRoot } from \"./Checkbox.css.js\";\nimport { CheckboxIndicator } from \"./CheckboxIndicator.js\";\n\nexport type CheckboxVariant = \"inline\" | \"row\";\n\nexport interface CheckboxProps\n\textends Omit<AriaCheckboxProps, \"children\" | \"className\" | \"style\"> {\n\t/**\n\t * `inline` (default) sits the box beside its label at content width. `row`\n\t * renders the 40px selectable row Figma draws for a menu item — use it for a\n\t * `CheckboxGroup` presented as a list of options.\n\t */\n\tvariant?: CheckboxVariant;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLLabelElement>;\n\t/**\n\t * Inline label. Omit for a standalone box — then pass `aria-label`\n\t * (or `aria-labelledby`) so the control has an accessible name.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * Selection control with an optional inline label. Use to select any number of\n * options, or as a single on/off toggle; for one choice among mutually exclusive\n * options use Radio.\n *\n * Selection is `isSelected`/`defaultSelected`/`onChange` (React Aria); `isIndeterminate`\n * renders the mixed state. Interaction states (hover/focus/pressed/disabled) and RTL\n * are handled by RAC `data-*` and ambient `dir` — not props.\n */\nexport function Checkbox({\n\tvariant = \"inline\",\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxProps) {\n\treturn (\n\t\t<AriaCheckbox\n\t\t\t{...rest}\n\t\t\tclassName={cx(checkboxRoot({ variant }), className)}\n\t\t>\n\t\t\t<CheckboxIndicator hasStateLayer={variant === \"inline\"} />\n\t\t\t{children != null && typeof children !== \"boolean\" && (\n\t\t\t\t<span data-slot=\"label\">{children}</span>\n\t\t\t)}\n\t\t</AriaCheckbox>\n\t);\n}\n"],"mappings":";;;;;;AAoCA,SAAgB,EAAS,EACxB,aAAU,UACV,cACA,aACA,GAAG,KACc;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxProps as AriaCheckboxProps } from \"react-aria-components\";\nimport { Checkbox as AriaCheckbox } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxRoot } from \"./Checkbox.css.js\";\nimport { CheckboxIndicator } from \"./CheckboxIndicator.js\";\n\nexport type CheckboxVariant = \"inline\" | \"row\";\n\nexport interface CheckboxProps\n\textends Omit<AriaCheckboxProps, \"children\" | \"className\" | \"style\"> {\n\t/**\n\t * `inline` (default) sits the box beside its label at content width. `row`\n\t * renders the 40px selectable row Figma draws for a menu item — use it for a\n\t * `CheckboxGroup` presented as a list of options.\n\t */\n\tvariant?: CheckboxVariant;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLLabelElement>;\n\t/**\n\t * Inline label. Omit for a standalone box — then pass `aria-label`\n\t * (or `aria-labelledby`) so the control has an accessible name.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * Selection control with an optional inline label. Use to select any number of\n * options, or as a single on/off toggle; for one choice among mutually exclusive\n * options use Radio.\n *\n * Selection is `isSelected`/`defaultSelected`/`onChange` (React Aria); `isIndeterminate`\n * renders the mixed state. Interaction states (hover/focus/pressed/disabled) and RTL\n * are handled by RAC `data-*` and ambient `dir` — not props.\n */\nexport function Checkbox({\n\tvariant = \"inline\",\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxProps) {\n\treturn (\n\t\t<AriaCheckbox\n\t\t\t{...rest}\n\t\t\tclassName={cx(checkboxRoot({ variant }), className)}\n\t\t>\n\t\t\t<CheckboxIndicator hasStateLayer={variant === \"inline\"} />\n\t\t\t{children != null && typeof children !== \"boolean\" && (\n\t\t\t\t<span data-slot=\"label\">{children}</span>\n\t\t\t)}\n\t\t</AriaCheckbox>\n\t);\n}\n"],"mappings":";;;;;;AAoCA,SAAgB,EAAS,EACxB,aAAU,UACV,cACA,aACA,GAAG,KACc;CACjB,OACC,kBAAC,GAAD;EACC,GAAI;EACJ,WAAW,EAAG,EAAa,EAAE,WAAQ,CAAC,GAAG,CAAS;YAFnD,CAIC,kBAAC,GAAD,EAAmB,eAAe,MAAY,SAAW,CAAA,GACxD,KAAY,QAAQ,OAAO,KAAa,aACxC,kBAAC,QAAD;GAAM,aAAU;GAAS;EAAe,CAAA,CAE5B;;AAEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxGroupProps as AriaCheckboxGroupProps } from \"react-aria-components\";\nimport { CheckboxGroup as AriaCheckboxGroup } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxGroup } from \"./Checkbox.css.js\";\n\nexport interface CheckboxGroupProps\n\textends Omit<AriaCheckboxGroupProps, \"className\" | \"style\" | \"children\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The `Checkbox` options for this group. */\n\tchildren: ReactNode;\n}\n\n/**\n * Multi-select group: any number of child `Checkbox` options may be selected.\n * Owns the selected values (`value`/`onChange`) and the group's accessible\n * name — supply `aria-label` or `aria-labelledby`.\n */\nexport function CheckboxGroup({\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxGroupProps) {\n\treturn (\n\t\t<AriaCheckboxGroup {...rest} className={cx(checkboxGroup, className)}>\n\t\t\t{children}\n\t\t</AriaCheckboxGroup>\n\t);\n}\n"],"mappings":";;;;;AAoBA,SAAgB,EAAc,EAC7B,cACA,aACA,GAAG,KACmB;
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxGroupProps as AriaCheckboxGroupProps } from \"react-aria-components\";\nimport { CheckboxGroup as AriaCheckboxGroup } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxGroup } from \"./Checkbox.css.js\";\n\nexport interface CheckboxGroupProps\n\textends Omit<AriaCheckboxGroupProps, \"className\" | \"style\" | \"children\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The `Checkbox` options for this group. */\n\tchildren: ReactNode;\n}\n\n/**\n * Multi-select group: any number of child `Checkbox` options may be selected.\n * Owns the selected values (`value`/`onChange`) and the group's accessible\n * name — supply `aria-label` or `aria-labelledby`.\n */\nexport function CheckboxGroup({\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxGroupProps) {\n\treturn (\n\t\t<AriaCheckboxGroup {...rest} className={cx(checkboxGroup, className)}>\n\t\t\t{children}\n\t\t</AriaCheckboxGroup>\n\t);\n}\n"],"mappings":";;;;;AAoBA,SAAgB,EAAc,EAC7B,cACA,aACA,GAAG,KACmB;CACtB,OACC,kBAAC,GAAD;EAAmB,GAAI;EAAM,WAAW,EAAG,GAAe,CAAS;EACjE;CACiB,CAAA;AAErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxIndicator.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxIndicator.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxBox, checkboxGlyph } from \"./Checkbox.css.js\";\n\nexport interface CheckboxIndicatorProps {\n\t/**\n\t * Draw the box's own hover/focus/pressed state layer and focus ring. True for a\n\t * standalone `Checkbox`, where the box is the only affordance; false inside a\n\t * row, which draws those on the row itself — leaving it true there would paint\n\t * both.\n\t */\n\thasStateLayer?: boolean;\n\tclassName?: string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * The 24px checkbox box and its check/dash glyphs, with no control of its own.\n *\n * Selection and disabled state are read from whichever ancestor element carries\n * React Aria's `data-selected` / `data-indeterminate` / `data-disabled` — the RAC\n * `Checkbox` label, or a `MenuItem` row — so the same markup and the same styles\n * serve both hosts and cannot drift apart. It must stay a **direct** child of that\n * element; the state rules use a child selector so an unrelated selected ancestor\n * can't reach in.\n */\nexport function CheckboxIndicator({\n\thasStateLayer = true,\n\tclassName,\n\tref,\n}: CheckboxIndicatorProps) {\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\tdata-slot=\"indicator\"\n\t\t\tdata-state-layer={hasStateLayer || undefined}\n\t\t\tclassName={cx(checkboxBox, className)}\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<svg\n\t\t\t\tdata-glyph=\"check\"\n\t\t\t\tclassName={checkboxGlyph}\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path d=\"M3.5 8L6.5 11L12.5 5\" />\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\tdata-glyph=\"dash\"\n\t\t\t\tclassName={checkboxGlyph}\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path d=\"M4 8H12\" />\n\t\t\t</svg>\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AA0BA,SAAgB,EAAkB,EACjC,mBAAgB,IAChB,cACA,UAC0B;
|
|
1
|
+
{"version":3,"file":"CheckboxIndicator.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxIndicator.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxBox, checkboxGlyph } from \"./Checkbox.css.js\";\n\nexport interface CheckboxIndicatorProps {\n\t/**\n\t * Draw the box's own hover/focus/pressed state layer and focus ring. True for a\n\t * standalone `Checkbox`, where the box is the only affordance; false inside a\n\t * row, which draws those on the row itself — leaving it true there would paint\n\t * both.\n\t */\n\thasStateLayer?: boolean;\n\tclassName?: string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * The 24px checkbox box and its check/dash glyphs, with no control of its own.\n *\n * Selection and disabled state are read from whichever ancestor element carries\n * React Aria's `data-selected` / `data-indeterminate` / `data-disabled` — the RAC\n * `Checkbox` label, or a `MenuItem` row — so the same markup and the same styles\n * serve both hosts and cannot drift apart. It must stay a **direct** child of that\n * element; the state rules use a child selector so an unrelated selected ancestor\n * can't reach in.\n */\nexport function CheckboxIndicator({\n\thasStateLayer = true,\n\tclassName,\n\tref,\n}: CheckboxIndicatorProps) {\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\tdata-slot=\"indicator\"\n\t\t\tdata-state-layer={hasStateLayer || undefined}\n\t\t\tclassName={cx(checkboxBox, className)}\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<svg\n\t\t\t\tdata-glyph=\"check\"\n\t\t\t\tclassName={checkboxGlyph}\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path d=\"M3.5 8L6.5 11L12.5 5\" />\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\tdata-glyph=\"dash\"\n\t\t\t\tclassName={checkboxGlyph}\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path d=\"M4 8H12\" />\n\t\t\t</svg>\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AA0BA,SAAgB,EAAkB,EACjC,mBAAgB,IAChB,cACA,UAC0B;CAC1B,OACC,kBAAC,QAAD;EACM;EACL,aAAU;EACV,oBAAkB,KAAiB,KAAA;EACnC,WAAW,EAAG,GAAa,CAAS;EACpC,eAAY;YALb,CAOC,kBAAC,OAAD;GACC,cAAW;GACX,WAAW;GACX,SAAQ;GACR,MAAK;GACL,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,eAAY;aAEZ,kBAAC,QAAD,EAAM,GAAE,uBAAwB,CAAA;EAC5B,CAAA,GACL,kBAAC,OAAD;GACC,cAAW;GACX,WAAW;GACX,SAAQ;GACR,MAAK;GACL,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,eAAY;aAEZ,kBAAC,QAAD,EAAM,GAAE,UAAW,CAAA;EACf,CAAA,CACA;;AAER"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/components/Chip/Chip.css.ts
|
|
4
4
|
var t = e({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","names":[],"sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { ToggleButtonProps as AriaToggleButtonProps } from \"react-aria-components\";\nimport { ToggleButton as AriaToggleButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { chipRoot } from \"./Chip.css.js\";\n\nexport type ChipVariant = \"text\" | \"icon\" | \"number\";\nexport type ChipSize = \"md\" | \"lg\";\n\nexport interface ChipProps\n\textends Omit<AriaToggleButtonProps, \"children\" | \"className\" | \"style\"> {\n\t/** Content shape: `text` (pill label), `icon` (square glyph), or `number` (square value). */\n\tvariant?: ChipVariant;\n\t/** Control height: `md` (40px) or `lg` (48px). */\n\tsize?: ChipSize;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLButtonElement>;\n\t/** Chip content — a label, a numeric value, or a single `<Icon>`. */\n\tchildren: ReactNode;\n}\n\n/**\n * Tap-to-toggle selection chip for NPS and survey flows. Selection is a toggle\n * (`isSelected`/`onChange` from React Aria); the selected state renders the accent fill.\n *\n * The `icon` variant has no visible text — supply an `aria-label` (or `aria-labelledby`)\n * so the control has an accessible name.\n */\nexport function Chip({\n\tvariant = \"text\",\n\tsize = \"md\",\n\tclassName,\n\tchildren,\n\t...rest\n}: ChipProps) {\n\tif (\n\t\timport.meta.env.DEV &&\n\t\tvariant === \"icon\" &&\n\t\t!rest[\"aria-label\"] &&\n\t\t!rest[\"aria-labelledby\"]\n\t) {\n\t\tconsole.warn(\n\t\t\t'[Lovelace] Chip variant=\"icon\" has no accessible name — pass `aria-label` (or `aria-labelledby`). An icon-only chip has no visible text.',\n\t\t);\n\t}\n\treturn (\n\t\t<AriaToggleButton\n\t\t\t{...rest}\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tclassName={cx(chipRoot({ variant, size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</AriaToggleButton>\n\t);\n}\n"],"mappings":";;;;;AA6BA,SAAgB,EAAK,EACpB,aAAU,QACV,UAAO,MACP,cACA,aACA,GAAG,KACU;
|
|
1
|
+
{"version":3,"file":"Chip.js","names":[],"sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { ToggleButtonProps as AriaToggleButtonProps } from \"react-aria-components\";\nimport { ToggleButton as AriaToggleButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { chipRoot } from \"./Chip.css.js\";\n\nexport type ChipVariant = \"text\" | \"icon\" | \"number\";\nexport type ChipSize = \"md\" | \"lg\";\n\nexport interface ChipProps\n\textends Omit<AriaToggleButtonProps, \"children\" | \"className\" | \"style\"> {\n\t/** Content shape: `text` (pill label), `icon` (square glyph), or `number` (square value). */\n\tvariant?: ChipVariant;\n\t/** Control height: `md` (40px) or `lg` (48px). */\n\tsize?: ChipSize;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLButtonElement>;\n\t/** Chip content — a label, a numeric value, or a single `<Icon>`. */\n\tchildren: ReactNode;\n}\n\n/**\n * Tap-to-toggle selection chip for NPS and survey flows. Selection is a toggle\n * (`isSelected`/`onChange` from React Aria); the selected state renders the accent fill.\n *\n * The `icon` variant has no visible text — supply an `aria-label` (or `aria-labelledby`)\n * so the control has an accessible name.\n */\nexport function Chip({\n\tvariant = \"text\",\n\tsize = \"md\",\n\tclassName,\n\tchildren,\n\t...rest\n}: ChipProps) {\n\tif (\n\t\timport.meta.env.DEV &&\n\t\tvariant === \"icon\" &&\n\t\t!rest[\"aria-label\"] &&\n\t\t!rest[\"aria-labelledby\"]\n\t) {\n\t\tconsole.warn(\n\t\t\t'[Lovelace] Chip variant=\"icon\" has no accessible name — pass `aria-label` (or `aria-labelledby`). An icon-only chip has no visible text.',\n\t\t);\n\t}\n\treturn (\n\t\t<AriaToggleButton\n\t\t\t{...rest}\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tclassName={cx(chipRoot({ variant, size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</AriaToggleButton>\n\t);\n}\n"],"mappings":";;;;;AA6BA,SAAgB,EAAK,EACpB,aAAU,QACV,UAAO,MACP,cACA,aACA,GAAG,KACU;CAWb,OACC,kBAAC,GAAD;EACC,GAAI;EACJ,gBAAc;EACd,aAAW;EACX,WAAW,EAAG,EAAS;GAAE;GAAS;EAAK,CAAC,GAAG,CAAS;EAEnD;CACgB,CAAA;AAEpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/components/Dialog/Dialog.css.ts
|
|
4
4
|
var t = "onnuc90", n = e({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":[],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { DialogActions } from \"./DialogActions.js\";\nimport { DialogBody } from \"./DialogBody.js\";\nimport { DialogContent } from \"./DialogContent.js\";\nimport { DialogIcon } from \"./DialogIcon.js\";\nimport { DialogRoot } from \"./DialogRoot.js\";\nimport { DialogTitle } from \"./DialogTitle.js\";\n\nexport type { DialogIntent } from \"./DialogIcon.js\";\nexport type { DialogProps } from \"./DialogRoot.js\";\n\nexport const Dialog = Object.assign(DialogRoot, {\n\tIcon: DialogIcon,\n\tContent: DialogContent,\n\tTitle: DialogTitle,\n\tBody: DialogBody,\n\tActions: DialogActions,\n});\n"],"mappings":";;;;;;;AAUA,IAAa,IAAS,OAAO,OAAO,GAAY;CAC/C,MAAM;CACN,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":[],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import { DialogActions } from \"./DialogActions.js\";\nimport { DialogBody } from \"./DialogBody.js\";\nimport { DialogContent } from \"./DialogContent.js\";\nimport { DialogIcon } from \"./DialogIcon.js\";\nimport { DialogRoot } from \"./DialogRoot.js\";\nimport { DialogTitle } from \"./DialogTitle.js\";\n\nexport type { DialogIntent } from \"./DialogIcon.js\";\nexport type { DialogProps } from \"./DialogRoot.js\";\n\nexport const Dialog = Object.assign(DialogRoot, {\n\tIcon: DialogIcon,\n\tContent: DialogContent,\n\tTitle: DialogTitle,\n\tBody: DialogBody,\n\tActions: DialogActions,\n});\n"],"mappings":";;;;;;;AAUA,IAAa,IAAS,OAAO,OAAO,GAAY;CAC/C,MAAM;CACN,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogActions.js","names":[],"sources":["../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogActions } from \"./Dialog.css.js\";\n\nexport interface DialogActionsProps {\n\t/** The action buttons, stacked full-width in reading order (primary first). */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Full-width vertical button stack. Composition-first: a layout slot. */\nexport function DialogActions({ children, className }: DialogActionsProps) {\n\treturn <div className={cx(dialogActions, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAc,EAAE,aAAU,gBAAiC;
|
|
1
|
+
{"version":3,"file":"DialogActions.js","names":[],"sources":["../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogActions } from \"./Dialog.css.js\";\n\nexport interface DialogActionsProps {\n\t/** The action buttons, stacked full-width in reading order (primary first). */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Full-width vertical button stack. Composition-first: a layout slot. */\nexport function DialogActions({ children, className }: DialogActionsProps) {\n\treturn <div className={cx(dialogActions, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAc,EAAE,aAAU,gBAAiC;CAC1E,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAe,CAAS;EAAI;CAAc,CAAA;AACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBody.js","names":[],"sources":["../../../src/components/Dialog/DialogBody.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogBody } from \"./Dialog.css.js\";\n\nexport interface DialogBodyProps {\n\tchildren?: ReactNode;\n\tclassName?: string;\n\t/** Target for the overlay's `aria-describedby`. */\n\tid?: string;\n}\n\n/** Centered secondary-color body copy. */\nexport function DialogBody({ children, className, id }: DialogBodyProps) {\n\treturn (\n\t\t<p id={id} className={cx(dialogBody, className)}>\n\t\t\t{children}\n\t\t</p>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAW,EAAE,aAAU,cAAW,SAAuB;
|
|
1
|
+
{"version":3,"file":"DialogBody.js","names":[],"sources":["../../../src/components/Dialog/DialogBody.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogBody } from \"./Dialog.css.js\";\n\nexport interface DialogBodyProps {\n\tchildren?: ReactNode;\n\tclassName?: string;\n\t/** Target for the overlay's `aria-describedby`. */\n\tid?: string;\n}\n\n/** Centered secondary-color body copy. */\nexport function DialogBody({ children, className, id }: DialogBodyProps) {\n\treturn (\n\t\t<p id={id} className={cx(dialogBody, className)}>\n\t\t\t{children}\n\t\t</p>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAW,EAAE,aAAU,cAAW,SAAuB;CACxE,OACC,kBAAC,KAAD;EAAO;EAAI,WAAW,EAAG,GAAY,CAAS;EAC5C;CACC,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogContent.js","names":[],"sources":["../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogContent } from \"./Dialog.css.js\";\n\nexport interface DialogContentProps {\n\t/** The `Dialog.Title` + `Dialog.Body` pairing. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Groups Title + Body as Figma's tight \"content\" sub-block. */\nexport function DialogContent({ children, className }: DialogContentProps) {\n\treturn <div className={cx(dialogContent, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAc,EAAE,aAAU,gBAAiC;
|
|
1
|
+
{"version":3,"file":"DialogContent.js","names":[],"sources":["../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogContent } from \"./Dialog.css.js\";\n\nexport interface DialogContentProps {\n\t/** The `Dialog.Title` + `Dialog.Body` pairing. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Groups Title + Body as Figma's tight \"content\" sub-block. */\nexport function DialogContent({ children, className }: DialogContentProps) {\n\treturn <div className={cx(dialogContent, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAc,EAAE,aAAU,gBAAiC;CAC1E,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAe,CAAS;EAAI;CAAc,CAAA;AACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogIcon.js","names":[],"sources":["../../../src/components/Dialog/DialogIcon.tsx"],"sourcesContent":["import { cx } from \"../../utils/cx.js\";\nimport { Checkmark } from \"../Icon/icons/Checkmark.js\";\nimport { ExclamationTriangle } from \"../Icon/icons/ExclamationTriangle.js\";\nimport { dialogIcon } from \"./Dialog.css.js\";\n\nexport type DialogIntent = \"warning\" | \"success\";\n\nexport interface DialogIconProps {\n\t/**\n\t * Selects the glyph + color: `warning` → exclamation triangle, `success` →\n\t * checkmark.\n\t */\n\tintent: DialogIntent;\n\tclassName?: string;\n}\n\n/** Top icon. `intent` selects the glyph + color. */\nexport function DialogIcon({ intent, className }: DialogIconProps) {\n\tconst Glyph = intent === \"warning\" ? ExclamationTriangle : Checkmark;\n\treturn (\n\t\t<span\n\t\t\tdata-intent={intent}\n\t\t\tclassName={cx(dialogIcon({ intent }), className)}\n\t\t>\n\t\t\t<Glyph />\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,EAAW,EAAE,WAAQ,gBAA8B;CAClE,IAAM,IAAQ,MAAW,YAAY,IAAsB;
|
|
1
|
+
{"version":3,"file":"DialogIcon.js","names":[],"sources":["../../../src/components/Dialog/DialogIcon.tsx"],"sourcesContent":["import { cx } from \"../../utils/cx.js\";\nimport { Checkmark } from \"../Icon/icons/Checkmark.js\";\nimport { ExclamationTriangle } from \"../Icon/icons/ExclamationTriangle.js\";\nimport { dialogIcon } from \"./Dialog.css.js\";\n\nexport type DialogIntent = \"warning\" | \"success\";\n\nexport interface DialogIconProps {\n\t/**\n\t * Selects the glyph + color: `warning` → exclamation triangle, `success` →\n\t * checkmark.\n\t */\n\tintent: DialogIntent;\n\tclassName?: string;\n}\n\n/** Top icon. `intent` selects the glyph + color. */\nexport function DialogIcon({ intent, className }: DialogIconProps) {\n\tconst Glyph = intent === \"warning\" ? ExclamationTriangle : Checkmark;\n\treturn (\n\t\t<span\n\t\t\tdata-intent={intent}\n\t\t\tclassName={cx(dialogIcon({ intent }), className)}\n\t\t>\n\t\t\t<Glyph />\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,EAAW,EAAE,WAAQ,gBAA8B;CAClE,IAAM,IAAQ,MAAW,YAAY,IAAsB;CAC3D,OACC,kBAAC,QAAD;EACC,eAAa;EACb,WAAW,EAAG,EAAW,EAAE,UAAO,CAAC,GAAG,CAAS;YAE/C,kBAAC,GAAD,CAAQ,CAAA;CACH,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogRoot.js","names":[],"sources":["../../../src/components/Dialog/DialogRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogContentSurface } from \"./Dialog.css.js\";\n\nexport interface DialogProps {\n\tclassName?: string;\n\t/** Composed parts, canonical order: `Icon` → `Content` → `Actions`. */\n\tchildren: ReactNode;\n}\n\n/**\n * Centered dialog content surface — the icon → content → actions stack. Pure\n * presentation; wrap it in `DialogOverlay` for the scrim-backed, focus-trapped\n * modal (choose `role` / `isDismissable` there).\n *\n * Give the dialog an accessible name via a `Dialog.Title` or the overlay's\n * `aria-label`.\n */\nexport function DialogRoot({ className, children }: DialogProps) {\n\treturn <div className={cx(dialogContentSurface, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAkBA,SAAgB,EAAW,EAAE,cAAW,eAAyB;
|
|
1
|
+
{"version":3,"file":"DialogRoot.js","names":[],"sources":["../../../src/components/Dialog/DialogRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogContentSurface } from \"./Dialog.css.js\";\n\nexport interface DialogProps {\n\tclassName?: string;\n\t/** Composed parts, canonical order: `Icon` → `Content` → `Actions`. */\n\tchildren: ReactNode;\n}\n\n/**\n * Centered dialog content surface — the icon → content → actions stack. Pure\n * presentation; wrap it in `DialogOverlay` for the scrim-backed, focus-trapped\n * modal (choose `role` / `isDismissable` there).\n *\n * Give the dialog an accessible name via a `Dialog.Title` or the overlay's\n * `aria-label`.\n */\nexport function DialogRoot({ className, children }: DialogProps) {\n\treturn <div className={cx(dialogContentSurface, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAkBA,SAAgB,EAAW,EAAE,cAAW,eAAyB;CAChE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAsB,CAAS;EAAI;CAAc,CAAA;AAC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":[],"sources":["../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Heading } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogTitle } from \"./Dialog.css.js\";\n\nexport interface DialogTitleProps {\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Centered heading. Renders `slot=\"title\"` so RAC derives the accessible name. */\nexport function DialogTitle({ children, className }: DialogTitleProps) {\n\treturn (\n\t\t<Heading slot=\"title\" className={cx(dialogTitle, className)}>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n}\n"],"mappings":";;;;;AAWA,SAAgB,EAAY,EAAE,aAAU,gBAA+B;
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","names":[],"sources":["../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Heading } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { dialogTitle } from \"./Dialog.css.js\";\n\nexport interface DialogTitleProps {\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** Centered heading. Renders `slot=\"title\"` so RAC derives the accessible name. */\nexport function DialogTitle({ children, className }: DialogTitleProps) {\n\treturn (\n\t\t<Heading slot=\"title\" className={cx(dialogTitle, className)}>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n}\n"],"mappings":";;;;;AAWA,SAAgB,EAAY,EAAE,aAAU,gBAA+B;CACtE,OACC,kBAAC,GAAD;EAAS,MAAK;EAAQ,WAAW,EAAG,GAAa,CAAS;EACxD;CACO,CAAA;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogOverlay.js","names":[],"sources":["../../../src/components/DialogOverlay/DialogOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tdialogOverlayCard,\n\tdialogOverlayScrim,\n\tdialogOverlaySurface,\n} from \"./DialogOverlay.css.js\";\n\nexport interface DialogOverlayProps {\n\t/** Whether the dialog is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (scrim tap, Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on scrim tap. Escape always cancels (RAC default). Defaults to `true`. */\n\tisDismissable?: boolean;\n\t/**\n\t * `alertdialog` for an interruption that must not be dismissed by tapping away;\n\t * `dialog` otherwise. Defaults to `dialog`.\n\t */\n\trole?: \"dialog\" | \"alertdialog\";\n\t/** Accessible name fallback when the children supply no `slot=\"title\"` heading. */\n\t\"aria-label\"?: string;\n\t/**\n\t * Id of the element describing the dialog — the `alertdialog` pattern expects\n\t * one, so point it at the `Dialog.Body` carrying the message.\n\t */\n\t\"aria-describedby\"?: string;\n\t/** Extends the focus-trap surface (e.g. content arrangement). */\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Centered modal-dialog presentation: dark scrim, centered card, focus-trap,\n * dismiss-on-tap/Escape, scale-in. Wraps arbitrary children (typically a `Dialog`\n * content stack). For a bottom sheet use `SheetOverlay`; for a full-window surface\n * `FullscreenOverlay`; for a non-dimming bubble `BubbleOverlay`.\n *\n * `role=\"alertdialog\"` + `isDismissable={false}` for an interruption that must not\n * be dismissed by tapping away (Escape still cancels); the `dialog` defaults\n * otherwise. Give it an accessible name via a `Dialog.Title` or `aria-label`.\n */\nexport function DialogOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\trole = \"dialog\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-describedby\": ariaDescribedBy,\n\tclassName,\n\tchildren,\n}: DialogOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={dialogOverlayScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={dialogOverlayCard}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\trole={role}\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\t\tclassName={cx(dialogOverlaySurface, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAiDA,SAAgB,EAAc,EAC7B,WACA,iBACA,mBAAgB,IAChB,UAAO,UACP,cAAc,GACd,oBAAoB,GACpB,cACA,eACsB;CAItB,IAAM,EAAE,iBAAc,
|
|
1
|
+
{"version":3,"file":"DialogOverlay.js","names":[],"sources":["../../../src/components/DialogOverlay/DialogOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tdialogOverlayCard,\n\tdialogOverlayScrim,\n\tdialogOverlaySurface,\n} from \"./DialogOverlay.css.js\";\n\nexport interface DialogOverlayProps {\n\t/** Whether the dialog is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (scrim tap, Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on scrim tap. Escape always cancels (RAC default). Defaults to `true`. */\n\tisDismissable?: boolean;\n\t/**\n\t * `alertdialog` for an interruption that must not be dismissed by tapping away;\n\t * `dialog` otherwise. Defaults to `dialog`.\n\t */\n\trole?: \"dialog\" | \"alertdialog\";\n\t/** Accessible name fallback when the children supply no `slot=\"title\"` heading. */\n\t\"aria-label\"?: string;\n\t/**\n\t * Id of the element describing the dialog — the `alertdialog` pattern expects\n\t * one, so point it at the `Dialog.Body` carrying the message.\n\t */\n\t\"aria-describedby\"?: string;\n\t/** Extends the focus-trap surface (e.g. content arrangement). */\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Centered modal-dialog presentation: dark scrim, centered card, focus-trap,\n * dismiss-on-tap/Escape, scale-in. Wraps arbitrary children (typically a `Dialog`\n * content stack). For a bottom sheet use `SheetOverlay`; for a full-window surface\n * `FullscreenOverlay`; for a non-dimming bubble `BubbleOverlay`.\n *\n * `role=\"alertdialog\"` + `isDismissable={false}` for an interruption that must not\n * be dismissed by tapping away (Escape still cancels); the `dialog` defaults\n * otherwise. Give it an accessible name via a `Dialog.Title` or `aria-label`.\n */\nexport function DialogOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\trole = \"dialog\",\n\t\"aria-label\": ariaLabel,\n\t\"aria-describedby\": ariaDescribedBy,\n\tclassName,\n\tchildren,\n}: DialogOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={dialogOverlayScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={dialogOverlayCard}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\trole={role}\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\t\tclassName={cx(dialogOverlaySurface, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAiDA,SAAgB,EAAc,EAC7B,WACA,iBACA,mBAAgB,IAChB,UAAO,UACP,cAAc,GACd,oBAAoB,GACpB,cACA,eACsB;CAItB,IAAM,EAAE,iBAAc,EAAU;CAEhC,OACC,kBAAC,GAAD;EACS;EACM;EACC;EACf,WAAW;EACX,KAAK;YALN,CAOC,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD;GAAO,WAAW;aACjB,kBAAC,GAAD;IACO;IACN,cAAY;IACZ,oBAAkB;IAClB,WAAW,EAAG,GAAsB,CAAS;IAE5C;GACU,CAAA;EACN,CAAA,CACM;;AAEhB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/components/Divider/Divider.css.ts
|
|
4
4
|
var t = e({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","names":[],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { Separator } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tdividerCaption,\n\tdividerHeading,\n\tdividerLabel,\n\tdividerRoot,\n\tdividerRule,\n} from \"./Divider.css.js\";\n\nexport type DividerVariant = \"line\" | \"label\" | \"message\";\n\nexport interface DividerProps\n\textends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n\t/**\n\t * `line` — a plain full-width rule. `label` — a centered marker flanked by two\n\t * rules (e.g. \"1 unread message\"). `message` — a centered system/status message\n\t * with no rule (e.g. \"Today\", \"Agent joined the conversation\").\n\t */\n\tvariant?: DividerVariant;\n\t/**\n\t * Emphasized heading rendered above the caption. Only rendered for `message`;\n\t * may lead with an emoji (e.g. \"⏳ You are #1 in the queue\").\n\t */\n\theading?: ReactNode;\n\t/** The label text (`label`) or caption text (`message`). Ignored for `line`. */\n\tchildren?: ReactNode;\n\tref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A conversation timeline divider — marks date stamps, unread markers, and\n * system/status messages in the chat message list.\n *\n * The `line` and `label` variants expose a `separator` role; `message` is plain\n * text. For a `message` that should be announced (e.g. live queue position), pass\n * `role=\"status\"` / `aria-live` — static stamps like \"Today\" should not.\n */\nexport function Divider({\n\tvariant = \"line\",\n\theading,\n\tchildren,\n\tclassName,\n\tref,\n\t...rest\n}: DividerProps) {\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cx(dividerRoot({ variant }), className)}\n\t\t>\n\t\t\t{variant === \"line\" && <Separator className={dividerRule} />}\n\t\t\t{variant === \"label\" && (\n\t\t\t\t<>\n\t\t\t\t\t<Separator className={dividerRule} />\n\t\t\t\t\t<p className={dividerLabel}>{children}</p>\n\t\t\t\t\t<Separator className={dividerRule} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{variant === \"message\" && (\n\t\t\t\t<>\n\t\t\t\t\t{heading != null && <p className={dividerHeading}>{heading}</p>}\n\t\t\t\t\t<p className={dividerCaption}>{children}</p>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AAuCA,SAAgB,EAAQ,EACvB,aAAU,QACV,YACA,aACA,cACA,QACA,GAAG,KACa;
|
|
1
|
+
{"version":3,"file":"Divider.js","names":[],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { Separator } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tdividerCaption,\n\tdividerHeading,\n\tdividerLabel,\n\tdividerRoot,\n\tdividerRule,\n} from \"./Divider.css.js\";\n\nexport type DividerVariant = \"line\" | \"label\" | \"message\";\n\nexport interface DividerProps\n\textends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n\t/**\n\t * `line` — a plain full-width rule. `label` — a centered marker flanked by two\n\t * rules (e.g. \"1 unread message\"). `message` — a centered system/status message\n\t * with no rule (e.g. \"Today\", \"Agent joined the conversation\").\n\t */\n\tvariant?: DividerVariant;\n\t/**\n\t * Emphasized heading rendered above the caption. Only rendered for `message`;\n\t * may lead with an emoji (e.g. \"⏳ You are #1 in the queue\").\n\t */\n\theading?: ReactNode;\n\t/** The label text (`label`) or caption text (`message`). Ignored for `line`. */\n\tchildren?: ReactNode;\n\tref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A conversation timeline divider — marks date stamps, unread markers, and\n * system/status messages in the chat message list.\n *\n * The `line` and `label` variants expose a `separator` role; `message` is plain\n * text. For a `message` that should be announced (e.g. live queue position), pass\n * `role=\"status\"` / `aria-live` — static stamps like \"Today\" should not.\n */\nexport function Divider({\n\tvariant = \"line\",\n\theading,\n\tchildren,\n\tclassName,\n\tref,\n\t...rest\n}: DividerProps) {\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cx(dividerRoot({ variant }), className)}\n\t\t>\n\t\t\t{variant === \"line\" && <Separator className={dividerRule} />}\n\t\t\t{variant === \"label\" && (\n\t\t\t\t<>\n\t\t\t\t\t<Separator className={dividerRule} />\n\t\t\t\t\t<p className={dividerLabel}>{children}</p>\n\t\t\t\t\t<Separator className={dividerRule} />\n\t\t\t\t</>\n\t\t\t)}\n\t\t\t{variant === \"message\" && (\n\t\t\t\t<>\n\t\t\t\t\t{heading != null && <p className={dividerHeading}>{heading}</p>}\n\t\t\t\t\t<p className={dividerCaption}>{children}</p>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AAuCA,SAAgB,EAAQ,EACvB,aAAU,QACV,YACA,aACA,cACA,QACA,GAAG,KACa;CAChB,OACC,kBAAC,OAAD;EACC,GAAI;EACC;EACL,gBAAc;EACd,WAAW,EAAG,EAAY,EAAE,WAAQ,CAAC,GAAG,CAAS;YAJlD;GAME,MAAY,UAAU,kBAAC,GAAD,EAAW,WAAA,UAAyB,CAAA;GAC1D,MAAY,WACZ,kBAAA,GAAA,EAAA,UAAA;IACC,kBAAC,GAAD,EAAW,WAAA,UAAyB,CAAA;IACpC,kBAAC,KAAD;KAAG,WAAA;KAA0B;IAAY,CAAA;IACzC,kBAAC,GAAD,EAAW,WAAA,UAAyB,CAAA;GACnC,EAAA,CAAA;GAEF,MAAY,aACZ,kBAAA,GAAA,EAAA,UAAA,CACE,KAAW,QAAQ,kBAAC,KAAD;IAAG,WAAA;cAA4B;GAAW,CAAA,GAC9D,kBAAC,KAAD;IAAG,WAAA;IAA4B;GAAY,CAAA,CAC1C,EAAA,CAAA;EAEC;;AAEP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.js","names":[],"sources":["../../../src/components/DropZone/DropZone.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { DropEvent, DropItem } from \"react-aria\";\nimport { isFileDropItem } from \"react-aria\";\nimport { DropZone as AriaDropZone } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { CloudUpload } from \"../Icon/icons/index.js\";\nimport {\n\tdropZoneDescription,\n\tdropZoneLabel,\n\tdropZonePanel,\n\tdropZoneRoot,\n\tdropZoneText,\n} from \"./DropZone.css.js\";\n\ninterface DropZoneBaseProps\n\textends Omit<\n\t\tHTMLAttributes<HTMLDivElement>,\n\t\t\"onDrop\" | \"children\" | \"aria-label\"\n\t> {\n\t/**\n\t * Called when a drop carries items but no file, such as text, a link or a\n\t * folder. The panel shows for any drag, because a drag does not reliably\n\t * expose its contents until the drop.\n\t */\n\tonNoFilesDropped?: () => void;\n\t/**\n\t * Called when a dropped file cannot be read, or when `onFileDrop` or\n\t * `onFilesDrop` throws. Without it such a failure is silent, since the drop\n\t * surface has no error state.\n\t */\n\tonDropError?: (error: Error) => void;\n\t/** Ignore drags and drops, and never show the panel. Children stay mounted. */\n\tisDisabled?: boolean;\n\t/**\n\t * Ignore a drag that starts inside this document, such as selected text, a\n\t * link or an image on the page. The zone shows no panel for it and delivers\n\t * nothing. Use it when the zone covers content the user can drag, and only\n\t * files from outside the page count as a drop.\n\t */\n\tignorePageDrags?: boolean;\n\t/**\n\t * Panel heading, and the accessible name of the keyboard drop button. `aria-label`\n\t * is deliberately not accepted separately — the two would disagree, and the visible\n\t * heading is the name a screen reader should read.\n\t */\n\tlabel?: string;\n\t/** Optional second line under the heading. */\n\tdescription?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\ninterface DropZonePerFileProps {\n\t/**\n\t * Called with the dropped file once it resolves. Exactly one file per drop,\n\t * unless `allowMultiple` is set.\n\t */\n\tonFileDrop: (file: File) => void;\n\t/**\n\t * Called instead of `onFileDrop` when a drop carries more than one file and\n\t * `allowMultiple` is not set.\n\t */\n\tonMultipleFilesRejected?: () => void;\n\t/**\n\t * Accept a drop that carries several files. `onFileDrop` then runs once per\n\t * file, in drop order, after every file resolves.\n\t */\n\tallowMultiple?: boolean;\n\tonFilesDrop?: never;\n}\n\ninterface DropZoneBatchProps {\n\t/**\n\t * Called once per drop with every readable file, in drop order, whatever the\n\t * count. Use it when the consumer decides what a count means.\n\t */\n\tonFilesDrop: (files: File[]) => void;\n\tonFileDrop?: never;\n\tonMultipleFilesRejected?: never;\n\tallowMultiple?: never;\n}\n\n/**\n * Marks a drag that starts inside this document, such as selected text or a\n * transcript image. The marker rides on the drag's own data, so no state can be\n * left over when a drag ends without a `dragend`.\n */\nconst PAGE_DRAG_TYPE = \"application/x-lovelace-page-drag\";\n\nconst isPageDragItem = (item: DropItem) =>\n\titem.kind === \"text\" && item.types.has(PAGE_DRAG_TYPE);\n\n/**\n * Exactly one delivery callback is required. Without one, a zone would accept a\n * drop and deliver the files nowhere.\n */\nexport type DropZoneProps = DropZoneBaseProps &\n\t(DropZonePerFileProps | DropZoneBatchProps);\n\n/**\n * A region that accepts a dropped file (or several, with `allowMultiple`),\n * showing a panel over its children while a drag is over it.\n *\n * The panel fills the nearest positioned ancestor, so the caller decides how much\n * of the UI is droppable.\n */\nexport function DropZone({\n\tonFileDrop,\n\tonFilesDrop,\n\tonMultipleFilesRejected,\n\tonNoFilesDropped,\n\tonDropError,\n\tallowMultiple = false,\n\tisDisabled = false,\n\tignorePageDrags = false,\n\tlabel = \"Drop your file here\",\n\tdescription,\n\tclassName,\n\tchildren,\n\t...rest\n}: DropZoneProps) {\n\t// Resolving a dropped file is async, so a second drop can arrive before the\n\t// first reports. Claim the zone synchronously, while still on the drop event,\n\t// so only one drop per resolution reaches the consumer.\n\tconst resolvingRef = useRef(false);\n\n\t// A page drag is tagged when it starts, and the tag rides on the drag data.\n\t// Every drag begins with a fresh dragenter, so the flag below cannot outlive\n\t// the drag that set it.\n\tconst [pageDragOver, setPageDragOver] = useState(false);\n\tuseEffect(() => {\n\t\tif (!ignorePageDrags) {\n\t\t\treturn;\n\t\t}\n\t\tconst markPageDrag = (event: DragEvent) => {\n\t\t\tevent.dataTransfer?.setData(PAGE_DRAG_TYPE, \"1\");\n\t\t};\n\t\tconst trackDrag = (event: DragEvent) => {\n\t\t\tsetPageDragOver(\n\t\t\t\tBoolean(event.dataTransfer?.types.includes(PAGE_DRAG_TYPE)),\n\t\t\t);\n\t\t};\n\t\tdocument.addEventListener(\"dragstart\", markPageDrag, true);\n\t\tdocument.addEventListener(\"dragenter\", trackDrag, true);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"dragstart\", markPageDrag, true);\n\t\t\tdocument.removeEventListener(\"dragenter\", trackDrag, true);\n\t\t\tsetPageDragOver(false);\n\t\t};\n\t}, [ignorePageDrags]);\n\n\tconst handleDrop = useCallback(\n\t\tasync (event: DropEvent) => {\n\t\t\tif (\n\t\t\t\tresolvingRef.current ||\n\t\t\t\t(ignorePageDrags && event.items.some(isPageDragItem))\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst files = event.items.filter(isFileDropItem);\n\t\t\tif (files.length === 0) {\n\t\t\t\tif (event.items.length > 0) {\n\t\t\t\t\tonNoFilesDropped?.();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (files.length > 1 && !allowMultiple && !onFilesDrop) {\n\t\t\t\tonMultipleFilesRejected?.();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolvingRef.current = true;\n\t\t\t// RAC calls onDrop without awaiting it. Anything thrown here, such as a\n\t\t\t// file the browser cannot read or a consumer's own handler throwing,\n\t\t\t// escapes as an unhandled rejection instead of reaching a caller. Report\n\t\t\t// each failure on its own, so one bad file in a multi-file drop does not\n\t\t\t// lose the rest. The consumer decides what a failed file means.\n\t\t\tconst reportError = (error: unknown) =>\n\t\t\t\tonDropError?.(\n\t\t\t\t\terror instanceof Error ? error : new Error(String(error)),\n\t\t\t\t);\n\t\t\ttry {\n\t\t\t\tconst results = await Promise.allSettled(\n\t\t\t\t\tfiles.map((item) => item.getFile()),\n\t\t\t\t);\n\t\t\t\tconst readable: File[] = [];\n\t\t\t\tfor (const result of results) {\n\t\t\t\t\tif (result.status === \"rejected\") {\n\t\t\t\t\t\treportError(result.reason);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treadable.push(result.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (onFilesDrop) {\n\t\t\t\t\tif (readable.length > 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tonFilesDrop(readable);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treportError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (const file of readable) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tonFileDrop?.(file);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treportError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresolvingRef.current = false;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tallowMultiple,\n\t\t\tignorePageDrags,\n\t\t\tonDropError,\n\t\t\tonFileDrop,\n\t\t\tonFilesDrop,\n\t\t\tonMultipleFilesRejected,\n\t\t\tonNoFilesDropped,\n\t\t],\n\t);\n\n\treturn (\n\t\t<AriaDropZone\n\t\t\t{...rest}\n\t\t\taria-label={label}\n\t\t\tisDisabled={isDisabled}\n\t\t\tonDrop={handleDrop}\n\t\t\tclassName={cx(dropZoneRoot, className)}\n\t\t>\n\t\t\t{({ isDropTarget, isFocusVisible }) => (\n\t\t\t\t<>\n\t\t\t\t\t{children}\n\t\t\t\t\t{((isDropTarget && !pageDragOver) || isFocusVisible) && (\n\t\t\t\t\t\t<div className={dropZonePanel}>\n\t\t\t\t\t\t\t<CloudUpload />\n\t\t\t\t\t\t\t<div className={dropZoneText}>\n\t\t\t\t\t\t\t\t<p className={dropZoneLabel}>{label}</p>\n\t\t\t\t\t\t\t\t{description && (\n\t\t\t\t\t\t\t\t\t<p className={dropZoneDescription}>{description}</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</AriaDropZone>\n\t);\n}\n"],"mappings":";;;;;;;;AAwFA,IAAM,IAAiB,oCAEjB,KAAkB,MACvB,EAAK,SAAS,UAAU,EAAK,MAAM,IAAI,EAAe;AAgBvD,SAAgB,EAAS,EACxB,eACA,gBACA,4BACA,qBACA,gBACA,mBAAgB,IAChB,gBAAa,IACb,qBAAkB,IAClB,WAAQ,uBACR,gBACA,cACA,aACA,GAAG,KACc;CAIjB,IAAM,IAAe,EAAO,GAAM,EAK5B,CAAC,GAAc,KAAmB,EAAS,GAAM;AACvD,SAAgB;AACf,MAAI,CAAC,EACJ;EAED,IAAM,KAAgB,MAAqB;AAC1C,KAAM,cAAc,QAAQ,GAAgB,IAAI;KAE3C,KAAa,MAAqB;AACvC,KACC,EAAQ,EAAM,cAAc,MAAM,SAAS,EAAe,CAC1D;;AAIF,SAFA,SAAS,iBAAiB,aAAa,GAAc,GAAK,EAC1D,SAAS,iBAAiB,aAAa,GAAW,GAAK,QAC1C;AAGZ,GAFA,SAAS,oBAAoB,aAAa,GAAc,GAAK,EAC7D,SAAS,oBAAoB,aAAa,GAAW,GAAK,EAC1D,EAAgB,GAAM;;IAErB,CAAC,EAAgB,CAAC;CAErB,IAAM,IAAa,EAClB,OAAO,MAAqB;AAC3B,MACC,EAAa,WACZ,KAAmB,EAAM,MAAM,KAAK,EAAe,CAEpD;EAED,IAAM,IAAQ,EAAM,MAAM,OAAO,EAAe;AAChD,MAAI,EAAM,WAAW,GAAG;AACvB,GAAI,EAAM,MAAM,SAAS,KACxB,KAAoB;AAErB;;AAED,MAAI,EAAM,SAAS,KAAK,CAAC,KAAiB,CAAC,GAAa;AACvD,QAA2B;AAC3B;;AAED,IAAa,UAAU;EAMvB,IAAM,KAAe,MACpB,IACC,aAAiB,QAAQ,IAAY,MAAM,OAAO,EAAM,CAAC,CACzD;AACF,MAAI;GACH,IAAM,IAAU,MAAM,QAAQ,WAC7B,EAAM,KAAK,MAAS,EAAK,SAAS,CAAC,CACnC,EACK,IAAmB,EAAE;AAC3B,QAAK,IAAM,KAAU,EACpB,CAAI,EAAO,WAAW,aACrB,EAAY,EAAO,OAAO,GAE1B,EAAS,KAAK,EAAO,MAAM;AAG7B,OAAI;QACC,EAAS,SAAS,EACrB,KAAI;AACH,OAAY,EAAS;aACb,GAAO;AACf,OAAY,EAAM;;SAIpB,MAAK,IAAM,KAAQ,EAClB,KAAI;AACH,QAAa,EAAK;YACV,GAAO;AACf,MAAY,EAAM;;YAIZ;AACT,KAAa,UAAU;;IAGzB;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,CACD;AAED,QACC,kBAAC,GAAD;EACC,GAAI;EACJ,cAAY;EACA;EACZ,QAAQ;EACR,WAAW,EAAG,GAAc,EAAU;aAEpC,EAAE,iBAAc,wBACjB,kBAAA,GAAA,EAAA,UAAA,CACE,IACE,KAAgB,CAAC,KAAiB,MACpC,kBAAC,OAAD;GAAK,WAAA;aAAL,CACC,kBAAC,GAAD,EAAe,CAAA,EACf,kBAAC,OAAD;IAAK,WAAA;cAAL,CACC,kBAAC,KAAD;KAAG,WAAA;eAA2B;KAAU,CAAA,EACvC,KACA,kBAAC,KAAD;KAAG,WAAA;eAAiC;KAAgB,CAAA,CAEhD;MACD;KAEL,EAAA,CAAA;EAEU,CAAA"}
|
|
1
|
+
{"version":3,"file":"DropZone.js","names":[],"sources":["../../../src/components/DropZone/DropZone.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { DropEvent, DropItem } from \"react-aria\";\nimport { isFileDropItem } from \"react-aria\";\nimport { DropZone as AriaDropZone } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { CloudUpload } from \"../Icon/icons/index.js\";\nimport {\n\tdropZoneDescription,\n\tdropZoneLabel,\n\tdropZonePanel,\n\tdropZoneRoot,\n\tdropZoneText,\n} from \"./DropZone.css.js\";\n\ninterface DropZoneBaseProps\n\textends Omit<\n\t\tHTMLAttributes<HTMLDivElement>,\n\t\t\"onDrop\" | \"children\" | \"aria-label\"\n\t> {\n\t/**\n\t * Called when a drop carries items but no file, such as text, a link or a\n\t * folder. The panel shows for any drag, because a drag does not reliably\n\t * expose its contents until the drop.\n\t */\n\tonNoFilesDropped?: () => void;\n\t/**\n\t * Called when a dropped file cannot be read, or when `onFileDrop` or\n\t * `onFilesDrop` throws. Without it such a failure is silent, since the drop\n\t * surface has no error state.\n\t */\n\tonDropError?: (error: Error) => void;\n\t/** Ignore drags and drops, and never show the panel. Children stay mounted. */\n\tisDisabled?: boolean;\n\t/**\n\t * Ignore a drag that starts inside this document, such as selected text, a\n\t * link or an image on the page. The zone shows no panel for it and delivers\n\t * nothing. Use it when the zone covers content the user can drag, and only\n\t * files from outside the page count as a drop.\n\t */\n\tignorePageDrags?: boolean;\n\t/**\n\t * Panel heading, and the accessible name of the keyboard drop button. `aria-label`\n\t * is deliberately not accepted separately — the two would disagree, and the visible\n\t * heading is the name a screen reader should read.\n\t */\n\tlabel?: string;\n\t/** Optional second line under the heading. */\n\tdescription?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\ninterface DropZonePerFileProps {\n\t/**\n\t * Called with the dropped file once it resolves. Exactly one file per drop,\n\t * unless `allowMultiple` is set.\n\t */\n\tonFileDrop: (file: File) => void;\n\t/**\n\t * Called instead of `onFileDrop` when a drop carries more than one file and\n\t * `allowMultiple` is not set.\n\t */\n\tonMultipleFilesRejected?: () => void;\n\t/**\n\t * Accept a drop that carries several files. `onFileDrop` then runs once per\n\t * file, in drop order, after every file resolves.\n\t */\n\tallowMultiple?: boolean;\n\tonFilesDrop?: never;\n}\n\ninterface DropZoneBatchProps {\n\t/**\n\t * Called once per drop with every readable file, in drop order, whatever the\n\t * count. Use it when the consumer decides what a count means.\n\t */\n\tonFilesDrop: (files: File[]) => void;\n\tonFileDrop?: never;\n\tonMultipleFilesRejected?: never;\n\tallowMultiple?: never;\n}\n\n/**\n * Marks a drag that starts inside this document, such as selected text or a\n * transcript image. The marker rides on the drag's own data, so no state can be\n * left over when a drag ends without a `dragend`.\n */\nconst PAGE_DRAG_TYPE = \"application/x-lovelace-page-drag\";\n\nconst isPageDragItem = (item: DropItem) =>\n\titem.kind === \"text\" && item.types.has(PAGE_DRAG_TYPE);\n\n/**\n * Exactly one delivery callback is required. Without one, a zone would accept a\n * drop and deliver the files nowhere.\n */\nexport type DropZoneProps = DropZoneBaseProps &\n\t(DropZonePerFileProps | DropZoneBatchProps);\n\n/**\n * A region that accepts a dropped file (or several, with `allowMultiple`),\n * showing a panel over its children while a drag is over it.\n *\n * The panel fills the nearest positioned ancestor, so the caller decides how much\n * of the UI is droppable.\n */\nexport function DropZone({\n\tonFileDrop,\n\tonFilesDrop,\n\tonMultipleFilesRejected,\n\tonNoFilesDropped,\n\tonDropError,\n\tallowMultiple = false,\n\tisDisabled = false,\n\tignorePageDrags = false,\n\tlabel = \"Drop your file here\",\n\tdescription,\n\tclassName,\n\tchildren,\n\t...rest\n}: DropZoneProps) {\n\t// Resolving a dropped file is async, so a second drop can arrive before the\n\t// first reports. Claim the zone synchronously, while still on the drop event,\n\t// so only one drop per resolution reaches the consumer.\n\tconst resolvingRef = useRef(false);\n\n\t// A page drag is tagged when it starts, and the tag rides on the drag data.\n\t// Every drag begins with a fresh dragenter, so the flag below cannot outlive\n\t// the drag that set it.\n\tconst [pageDragOver, setPageDragOver] = useState(false);\n\tuseEffect(() => {\n\t\tif (!ignorePageDrags) {\n\t\t\treturn;\n\t\t}\n\t\tconst markPageDrag = (event: DragEvent) => {\n\t\t\tevent.dataTransfer?.setData(PAGE_DRAG_TYPE, \"1\");\n\t\t};\n\t\tconst trackDrag = (event: DragEvent) => {\n\t\t\tsetPageDragOver(\n\t\t\t\tBoolean(event.dataTransfer?.types.includes(PAGE_DRAG_TYPE)),\n\t\t\t);\n\t\t};\n\t\tdocument.addEventListener(\"dragstart\", markPageDrag, true);\n\t\tdocument.addEventListener(\"dragenter\", trackDrag, true);\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"dragstart\", markPageDrag, true);\n\t\t\tdocument.removeEventListener(\"dragenter\", trackDrag, true);\n\t\t\tsetPageDragOver(false);\n\t\t};\n\t}, [ignorePageDrags]);\n\n\tconst handleDrop = useCallback(\n\t\tasync (event: DropEvent) => {\n\t\t\tif (\n\t\t\t\tresolvingRef.current ||\n\t\t\t\t(ignorePageDrags && event.items.some(isPageDragItem))\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst files = event.items.filter(isFileDropItem);\n\t\t\tif (files.length === 0) {\n\t\t\t\tif (event.items.length > 0) {\n\t\t\t\t\tonNoFilesDropped?.();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (files.length > 1 && !allowMultiple && !onFilesDrop) {\n\t\t\t\tonMultipleFilesRejected?.();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolvingRef.current = true;\n\t\t\t// RAC calls onDrop without awaiting it. Anything thrown here, such as a\n\t\t\t// file the browser cannot read or a consumer's own handler throwing,\n\t\t\t// escapes as an unhandled rejection instead of reaching a caller. Report\n\t\t\t// each failure on its own, so one bad file in a multi-file drop does not\n\t\t\t// lose the rest. The consumer decides what a failed file means.\n\t\t\tconst reportError = (error: unknown) =>\n\t\t\t\tonDropError?.(\n\t\t\t\t\terror instanceof Error ? error : new Error(String(error)),\n\t\t\t\t);\n\t\t\ttry {\n\t\t\t\tconst results = await Promise.allSettled(\n\t\t\t\t\tfiles.map((item) => item.getFile()),\n\t\t\t\t);\n\t\t\t\tconst readable: File[] = [];\n\t\t\t\tfor (const result of results) {\n\t\t\t\t\tif (result.status === \"rejected\") {\n\t\t\t\t\t\treportError(result.reason);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treadable.push(result.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (onFilesDrop) {\n\t\t\t\t\tif (readable.length > 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tonFilesDrop(readable);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treportError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (const file of readable) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tonFileDrop?.(file);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treportError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresolvingRef.current = false;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tallowMultiple,\n\t\t\tignorePageDrags,\n\t\t\tonDropError,\n\t\t\tonFileDrop,\n\t\t\tonFilesDrop,\n\t\t\tonMultipleFilesRejected,\n\t\t\tonNoFilesDropped,\n\t\t],\n\t);\n\n\treturn (\n\t\t<AriaDropZone\n\t\t\t{...rest}\n\t\t\taria-label={label}\n\t\t\tisDisabled={isDisabled}\n\t\t\tonDrop={handleDrop}\n\t\t\tclassName={cx(dropZoneRoot, className)}\n\t\t>\n\t\t\t{({ isDropTarget, isFocusVisible }) => (\n\t\t\t\t<>\n\t\t\t\t\t{children}\n\t\t\t\t\t{((isDropTarget && !pageDragOver) || isFocusVisible) && (\n\t\t\t\t\t\t<div className={dropZonePanel}>\n\t\t\t\t\t\t\t<CloudUpload />\n\t\t\t\t\t\t\t<div className={dropZoneText}>\n\t\t\t\t\t\t\t\t<p className={dropZoneLabel}>{label}</p>\n\t\t\t\t\t\t\t\t{description && (\n\t\t\t\t\t\t\t\t\t<p className={dropZoneDescription}>{description}</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</AriaDropZone>\n\t);\n}\n"],"mappings":";;;;;;;;AAwFA,IAAM,IAAiB,oCAEjB,KAAkB,MACvB,EAAK,SAAS,UAAU,EAAK,MAAM,IAAI,CAAc;AAgBtD,SAAgB,EAAS,EACxB,eACA,gBACA,4BACA,qBACA,gBACA,mBAAgB,IAChB,gBAAa,IACb,qBAAkB,IAClB,WAAQ,uBACR,gBACA,cACA,aACA,GAAG,KACc;CAIjB,IAAM,IAAe,EAAO,EAAK,GAK3B,CAAC,GAAc,KAAmB,EAAS,EAAK;CACtD,QAAgB;EACf,IAAI,CAAC,GACJ;EAED,IAAM,KAAgB,MAAqB;GAC1C,EAAM,cAAc,QAAQ,GAAgB,GAAG;EAChD,GACM,KAAa,MAAqB;GACvC,EACC,EAAQ,EAAM,cAAc,MAAM,SAAS,CAAc,CAC1D;EACD;EAGA,OAFA,SAAS,iBAAiB,aAAa,GAAc,EAAI,GACzD,SAAS,iBAAiB,aAAa,GAAW,EAAI,SACzC;GAGZ,AAFA,SAAS,oBAAoB,aAAa,GAAc,EAAI,GAC5D,SAAS,oBAAoB,aAAa,GAAW,EAAI,GACzD,EAAgB,EAAK;EACtB;CACD,GAAG,CAAC,CAAe,CAAC;CAEpB,IAAM,IAAa,EAClB,OAAO,MAAqB;EAC3B,IACC,EAAa,WACZ,KAAmB,EAAM,MAAM,KAAK,CAAc,GAEnD;EAED,IAAM,IAAQ,EAAM,MAAM,OAAO,CAAc;EAC/C,IAAI,EAAM,WAAW,GAAG;GACvB,AAAI,EAAM,MAAM,SAAS,KACxB,IAAmB;GAEpB;EACD;EACA,IAAI,EAAM,SAAS,KAAK,CAAC,KAAiB,CAAC,GAAa;GACvD,IAA0B;GAC1B;EACD;EACA,EAAa,UAAU;EAMvB,IAAM,KAAe,MACpB,IACC,aAAiB,QAAQ,IAAY,MAAM,OAAO,CAAK,CAAC,CACzD;EACD,IAAI;GACH,IAAM,IAAU,MAAM,QAAQ,WAC7B,EAAM,KAAK,MAAS,EAAK,QAAQ,CAAC,CACnC,GACM,IAAmB,CAAC;GAC1B,KAAK,IAAM,KAAU,GACpB,AAAI,EAAO,WAAW,aACrB,EAAY,EAAO,MAAM,IAEzB,EAAS,KAAK,EAAO,KAAK;GAG5B,IAAI;QACC,EAAS,SAAS,GACrB,IAAI;KACH,EAAY,CAAQ;IACrB,SAAS,GAAO;KACf,EAAY,CAAK;IAClB;UAGD,KAAK,IAAM,KAAQ,GAClB,IAAI;IACH,IAAa,CAAI;GAClB,SAAS,GAAO;IACf,EAAY,CAAK;GAClB;EAGH,UAAU;GACT,EAAa,UAAU;EACxB;CACD,GACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;CACD,CACD;CAEA,OACC,kBAAC,GAAD;EACC,GAAI;EACJ,cAAY;EACA;EACZ,QAAQ;EACR,WAAW,EAAG,GAAc,CAAS;aAEnC,EAAE,iBAAc,wBACjB,kBAAA,GAAA,EAAA,UAAA,CACE,IACE,KAAgB,CAAC,KAAiB,MACpC,kBAAC,OAAD;GAAK,WAAA;aAAL,CACC,kBAAC,GAAD,CAAc,CAAA,GACd,kBAAC,OAAD;IAAK,WAAA;cAAL,CACC,kBAAC,KAAD;KAAG,WAAA;eAA2B;IAAS,CAAA,GACtC,KACA,kBAAC,KAAD;KAAG,WAAA;eAAiC;IAAe,CAAA,CAEhD;KACD;IAEL,EAAA,CAAA;CAEU,CAAA;AAEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullscreenOverlay.js","names":[],"sources":["../../../src/components/FullscreenOverlay/FullscreenOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tfullscreenDialog,\n\tfullscreenModal,\n\tfullscreenScrim,\n} from \"./FullscreenOverlay.css.js\";\n\nexport interface FullscreenOverlayProps {\n\t/** Whether the overlay is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on outside tap. Escape always cancels (RAC default). Defaults to `true`. (The surface fills the window, so there is no scrim to tap.) */\n\tisDismissable?: boolean;\n\t/** Accessible name fallback when the child has no `Sheet.Title`. */\n\t\"aria-label\"?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Modal presentation that fills the whole chat window — no size cap, no rounded\n * corners, focus-trap, slide-up. Wraps arbitrary children (typically a `Sheet`).\n * For a bottom card use `SheetOverlay`; for a centered dialog `Dialog`.\n *\n * Give the dialog an accessible name via a `Sheet.Title` or the\n * `aria-label` prop.\n */\nexport function FullscreenOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\t\"aria-label\": ariaLabel,\n\tclassName,\n\tchildren,\n}: FullscreenOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={fullscreenScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={fullscreenModal}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\tclassName={cx(fullscreenDialog, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAoCA,SAAgB,EAAkB,EACjC,WACA,iBACA,mBAAgB,IAChB,cAAc,GACd,cACA,eAC0B;CAI1B,IAAM,EAAE,iBAAc,
|
|
1
|
+
{"version":3,"file":"FullscreenOverlay.js","names":[],"sources":["../../../src/components/FullscreenOverlay/FullscreenOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tfullscreenDialog,\n\tfullscreenModal,\n\tfullscreenScrim,\n} from \"./FullscreenOverlay.css.js\";\n\nexport interface FullscreenOverlayProps {\n\t/** Whether the overlay is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on outside tap. Escape always cancels (RAC default). Defaults to `true`. (The surface fills the window, so there is no scrim to tap.) */\n\tisDismissable?: boolean;\n\t/** Accessible name fallback when the child has no `Sheet.Title`. */\n\t\"aria-label\"?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Modal presentation that fills the whole chat window — no size cap, no rounded\n * corners, focus-trap, slide-up. Wraps arbitrary children (typically a `Sheet`).\n * For a bottom card use `SheetOverlay`; for a centered dialog `Dialog`.\n *\n * Give the dialog an accessible name via a `Sheet.Title` or the\n * `aria-label` prop.\n */\nexport function FullscreenOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\t\"aria-label\": ariaLabel,\n\tclassName,\n\tchildren,\n}: FullscreenOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={fullscreenScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={fullscreenModal}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\tclassName={cx(fullscreenDialog, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAoCA,SAAgB,EAAkB,EACjC,WACA,iBACA,mBAAgB,IAChB,cAAc,GACd,cACA,eAC0B;CAI1B,IAAM,EAAE,iBAAc,EAAU;CAEhC,OACC,kBAAC,GAAD;EACS;EACM;EACC;EACf,WAAW;EACX,KAAK;YALN,CAOC,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD;GAAO,WAAW;aACjB,kBAAC,GAAD;IACC,cAAY;IACZ,WAAW,EAAG,GAAkB,CAAS;IAExC;GACU,CAAA;EACN,CAAA,CACM;;AAEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","names":[],"sources":["../../../src/components/Header/Header.ts"],"sourcesContent":["import { HeaderRoot } from \"./HeaderRoot\";\nimport { HeaderTitle } from \"./HeaderTitle\";\n\nexport type { HeaderProps } from \"./HeaderRoot\";\n\nexport const Header = Object.assign(HeaderRoot, {\n\tTitle: HeaderTitle,\n});\n"],"mappings":";;;AAKA,IAAa,IAAS,OAAO,OAAO,GAAY,EAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"Header.js","names":[],"sources":["../../../src/components/Header/Header.ts"],"sourcesContent":["import { HeaderRoot } from \"./HeaderRoot\";\nimport { HeaderTitle } from \"./HeaderTitle\";\n\nexport type { HeaderProps } from \"./HeaderRoot\";\n\nexport const Header = Object.assign(HeaderRoot, {\n\tTitle: HeaderTitle,\n});\n"],"mappings":";;;AAKA,IAAa,IAAS,OAAO,OAAO,GAAY,EAC/C,OAAO,EACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderRoot.js","names":[],"sources":["../../../src/components/Header/HeaderRoot.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerRoot } from \"./Header.css.js\";\n\nexport interface HeaderProps extends HTMLAttributes<HTMLElement> {\n\tref?: Ref<HTMLElement>;\n}\n\n/**\n * Chat surface top bar: a `<header>` (implicit `banner`) that lays its children\n * out in a single centered flex row and paints the `header-background` /\n * `header-content` tokens. Purely compositional — the consumer drops controls\n * (`IconButton`, `Avatar`, `Button`, a title) in as children and owns their order.\n */\nexport function HeaderRoot({ className, children, ref, ...rest }: HeaderProps) {\n\treturn (\n\t\t<header {...rest} ref={ref} className={cx(headerRoot, className)}>\n\t\t\t{children}\n\t\t</header>\n\t);\n}\n"],"mappings":";;;;AAcA,SAAgB,EAAW,EAAE,cAAW,aAAU,QAAK,GAAG,KAAqB;
|
|
1
|
+
{"version":3,"file":"HeaderRoot.js","names":[],"sources":["../../../src/components/Header/HeaderRoot.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerRoot } from \"./Header.css.js\";\n\nexport interface HeaderProps extends HTMLAttributes<HTMLElement> {\n\tref?: Ref<HTMLElement>;\n}\n\n/**\n * Chat surface top bar: a `<header>` (implicit `banner`) that lays its children\n * out in a single centered flex row and paints the `header-background` /\n * `header-content` tokens. Purely compositional — the consumer drops controls\n * (`IconButton`, `Avatar`, `Button`, a title) in as children and owns their order.\n */\nexport function HeaderRoot({ className, children, ref, ...rest }: HeaderProps) {\n\treturn (\n\t\t<header {...rest} ref={ref} className={cx(headerRoot, className)}>\n\t\t\t{children}\n\t\t</header>\n\t);\n}\n"],"mappings":";;;;AAcA,SAAgB,EAAW,EAAE,cAAW,aAAU,QAAK,GAAG,KAAqB;CAC9E,OACC,kBAAC,UAAD;EAAQ,GAAI;EAAW;EAAK,WAAW,EAAG,GAAY,CAAS;EAC7D;CACM,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderTitle.js","names":[],"sources":["../../../src/components/Header/HeaderTitle.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { Heading } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerTitle } from \"./Header.css.js\";\n\nexport interface HeaderTitleProps extends HTMLAttributes<HTMLElement> {\n\t/**\n\t * Heading level. Defaults to `1` — the surface's top-level heading, and what\n\t * this rendered before it composed RAC. RAC's own default is `3`, so the\n\t * default here is load-bearing, not decoration. A widget embedded in a\n\t * customer's page may need to sit under that page's outline instead.\n\t */\n\tlevel?: number;\n\tref?: Ref<HTMLHeadingElement>;\n}\n\n/**\n * Header title text, the surface's heading. Grows to fill the bar and truncates\n * with an ellipsis when the label is too long; inherits `header-content` from\n * the surrounding Header.\n *\n * Figma draws it at the body tier — a heading by role, not by size.\n */\nexport function HeaderTitle({\n\tlevel = 1,\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: HeaderTitleProps) {\n\treturn (\n\t\t<Heading\n\t\t\t{...rest}\n\t\t\tlevel={level}\n\t\t\tref={ref}\n\t\t\tclassName={cx(headerTitle, className)}\n\t\t>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAY,EAC3B,WAAQ,GACR,cACA,aACA,QACA,GAAG,KACiB;
|
|
1
|
+
{"version":3,"file":"HeaderTitle.js","names":[],"sources":["../../../src/components/Header/HeaderTitle.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { Heading } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerTitle } from \"./Header.css.js\";\n\nexport interface HeaderTitleProps extends HTMLAttributes<HTMLElement> {\n\t/**\n\t * Heading level. Defaults to `1` — the surface's top-level heading, and what\n\t * this rendered before it composed RAC. RAC's own default is `3`, so the\n\t * default here is load-bearing, not decoration. A widget embedded in a\n\t * customer's page may need to sit under that page's outline instead.\n\t */\n\tlevel?: number;\n\tref?: Ref<HTMLHeadingElement>;\n}\n\n/**\n * Header title text, the surface's heading. Grows to fill the bar and truncates\n * with an ellipsis when the label is too long; inherits `header-content` from\n * the surrounding Header.\n *\n * Figma draws it at the body tier — a heading by role, not by size.\n */\nexport function HeaderTitle({\n\tlevel = 1,\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: HeaderTitleProps) {\n\treturn (\n\t\t<Heading\n\t\t\t{...rest}\n\t\t\tlevel={level}\n\t\t\tref={ref}\n\t\t\tclassName={cx(headerTitle, className)}\n\t\t>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAY,EAC3B,WAAQ,GACR,cACA,aACA,QACA,GAAG,KACiB;CACpB,OACC,kBAAC,GAAD;EACC,GAAI;EACG;EACF;EACL,WAAW,EAAG,GAAa,CAAS;EAEnC;CACO,CAAA;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { icon as iconClass } from \"./Icon.css.js\";\n\nexport interface IconProps extends HTMLAttributes<HTMLSpanElement> {\n\tchildren: ReactNode;\n\tlabel?: string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function Icon({ children, label, className, ref, ...rest }: IconProps) {\n\tconst a11y = label\n\t\t? { role: \"img\" as const, \"aria-label\": label }\n\t\t: { \"aria-hidden\": true as const };\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t\tdata-slot=\"icon\"\n\t\t\t{...a11y}\n\t\t\tclassName={cx(iconClass, className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAK,EAAE,aAAU,UAAO,cAAW,QAAK,GAAG,KAAmB;CAC7E,IAAM,IAAO,IACV;EAAE,MAAM;EAAgB,cAAc;
|
|
1
|
+
{"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { icon as iconClass } from \"./Icon.css.js\";\n\nexport interface IconProps extends HTMLAttributes<HTMLSpanElement> {\n\tchildren: ReactNode;\n\tlabel?: string;\n\tref?: Ref<HTMLSpanElement>;\n}\n\nexport function Icon({ children, label, className, ref, ...rest }: IconProps) {\n\tconst a11y = label\n\t\t? { role: \"img\" as const, \"aria-label\": label }\n\t\t: { \"aria-hidden\": true as const };\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t\tdata-slot=\"icon\"\n\t\t\t{...a11y}\n\t\t\tclassName={cx(iconClass, className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAK,EAAE,aAAU,UAAO,cAAW,QAAK,GAAG,KAAmB;CAC7E,IAAM,IAAO,IACV;EAAE,MAAM;EAAgB,cAAc;CAAM,IAC5C,EAAE,eAAe,GAAc;CAClC,OACC,kBAAC,QAAD;EACM;EACL,GAAI;EACJ,aAAU;EACV,GAAI;EACJ,WAAW,EAAG,GAAW,CAAS;EAEjC;CACI,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdaLogo.js","names":[],"sources":["../../../../src/components/Icon/icons/AdaLogo.tsx"],"sourcesContent":["import { cx } from \"../../../utils/cx.js\";\nimport type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { adaLogo } from \"./AdaLogo.css.js\";\n\n/** The Ada symbol + wordmark logomark. Unlike the square `Icon/*` glyphs this is a\n * wide brand mark (aspect 37.5:12) styled via the `adaLogo` class so a consumer\n * `className` (merged last by `Icon`) can still override its sizing. Paint is\n * `currentColor`, so it inherits the surrounding text color. */\nexport function AdaLogo({ className, ...props }: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props} className={cx(adaLogo, className)}>\n\t\t\t<svg\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"100%\"\n\t\t\t\tviewBox=\"0 0 37.5 12\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td=\"M36.4508 7.12896V6.95856H34.6014C33.6175 6.95856 32.9751 7.43088 32.9751 8.20512C32.9751 8.88768 33.5124 9.32064 34.352 9.32064C35.677 9.32064 36.4508 8.49408 36.4508 7.12896ZM37.5 5.84304V10.1083H36.4508V8.9664C36.0968 9.72768 35.2179 10.213 34.1946 10.213C32.8043 10.213 31.8996 9.42576 31.8996 8.21856C31.8996 6.95856 32.9358 6.15792 34.5357 6.15792H36.031C36.3198 6.15792 36.4508 6.01344 36.4508 5.80368C36.4508 4.89792 35.808 4.28112 34.6801 4.28112C33.7096 4.28112 32.9487 4.88496 32.8965 5.60688H31.8996C32.0176 4.33392 33.2241 3.3888 34.7065 3.3888C36.4244 3.3888 37.5 4.3728 37.5 5.84304ZM29.4615 6.80064C29.4615 5.30496 28.5956 4.33392 27.2711 4.33392C25.946 4.33392 25.0672 5.30496 25.0672 6.80064C25.0672 8.29728 25.946 9.26832 27.2711 9.26832C28.5956 9.26832 29.4615 8.29728 29.4615 6.80064ZM23.9921 6.80064C23.9921 4.87152 25.1199 3.3888 27.179 3.3888C28.1106 3.3888 28.9761 3.86112 29.3694 4.5696V0.77712H30.4191V10.1083H29.3694V9.01872C28.9761 9.74064 28.1106 10.213 27.179 10.213C25.1199 10.213 23.9921 8.72976 23.9921 6.80064ZM21.6164 7.12896V6.95856H19.767C18.7836 6.95856 18.1407 7.43088 18.1407 8.20512C18.1407 8.88768 18.6785 9.32064 19.5181 9.32064C20.8426 9.32064 21.6164 8.49408 21.6164 7.12896ZM22.6656 5.84304V10.1083H21.6164V8.9664C21.2624 9.72768 20.3835 10.213 19.3602 10.213C17.9704 10.213 17.0652 9.42576 17.0652 8.21856C17.0652 6.95856 18.1014 6.15792 19.7013 6.15792H21.1967C21.4855 6.15792 21.6164 6.01344 21.6164 5.80368C21.6164 4.89792 20.9741 4.28112 19.8457 4.28112C18.8752 4.28112 18.1144 4.88496 18.0621 5.60688H17.0652C17.1832 4.33392 18.3897 3.3888 19.8721 3.3888C21.59 3.3888 22.6656 4.3728 22.6656 5.84304ZM5.84318 8.76288C4.10126 8.76288 2.6894 7.35024 2.6894 5.60736C2.6894 3.86448 4.10126 2.45184 5.84318 2.45184C7.58463 2.45184 8.99697 3.86448 8.99697 5.60736C8.99697 7.35024 7.58463 8.76288 5.84318 8.76288ZM5.84318 0C2.61504 0 0.00143921 2.61792 0 5.84832V11.6218C0 11.8306 0.168867 12 0.378032 12H2.31137C2.52005 12 2.6894 11.8306 2.6894 11.6218V10.4866C2.6894 10.2778 2.85875 10.1083 3.06743 10.1083H8.61894C8.82762 10.1083 8.99697 10.2778 8.99697 10.4866V11.6218C8.99697 11.8306 9.16584 12 9.375 12H11.3083C11.517 12 11.6864 11.8306 11.6864 11.6218V5.84832C11.6844 2.61792 9.07085 0 5.84318 0Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;;AASA,SAAgB,EAAQ,EAAE,cAAW,GAAG,KAAsC;
|
|
1
|
+
{"version":3,"file":"AdaLogo.js","names":[],"sources":["../../../../src/components/Icon/icons/AdaLogo.tsx"],"sourcesContent":["import { cx } from \"../../../utils/cx.js\";\nimport type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { adaLogo } from \"./AdaLogo.css.js\";\n\n/** The Ada symbol + wordmark logomark. Unlike the square `Icon/*` glyphs this is a\n * wide brand mark (aspect 37.5:12) styled via the `adaLogo` class so a consumer\n * `className` (merged last by `Icon`) can still override its sizing. Paint is\n * `currentColor`, so it inherits the surrounding text color. */\nexport function AdaLogo({ className, ...props }: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props} className={cx(adaLogo, className)}>\n\t\t\t<svg\n\t\t\t\twidth=\"100%\"\n\t\t\t\theight=\"100%\"\n\t\t\t\tviewBox=\"0 0 37.5 12\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td=\"M36.4508 7.12896V6.95856H34.6014C33.6175 6.95856 32.9751 7.43088 32.9751 8.20512C32.9751 8.88768 33.5124 9.32064 34.352 9.32064C35.677 9.32064 36.4508 8.49408 36.4508 7.12896ZM37.5 5.84304V10.1083H36.4508V8.9664C36.0968 9.72768 35.2179 10.213 34.1946 10.213C32.8043 10.213 31.8996 9.42576 31.8996 8.21856C31.8996 6.95856 32.9358 6.15792 34.5357 6.15792H36.031C36.3198 6.15792 36.4508 6.01344 36.4508 5.80368C36.4508 4.89792 35.808 4.28112 34.6801 4.28112C33.7096 4.28112 32.9487 4.88496 32.8965 5.60688H31.8996C32.0176 4.33392 33.2241 3.3888 34.7065 3.3888C36.4244 3.3888 37.5 4.3728 37.5 5.84304ZM29.4615 6.80064C29.4615 5.30496 28.5956 4.33392 27.2711 4.33392C25.946 4.33392 25.0672 5.30496 25.0672 6.80064C25.0672 8.29728 25.946 9.26832 27.2711 9.26832C28.5956 9.26832 29.4615 8.29728 29.4615 6.80064ZM23.9921 6.80064C23.9921 4.87152 25.1199 3.3888 27.179 3.3888C28.1106 3.3888 28.9761 3.86112 29.3694 4.5696V0.77712H30.4191V10.1083H29.3694V9.01872C28.9761 9.74064 28.1106 10.213 27.179 10.213C25.1199 10.213 23.9921 8.72976 23.9921 6.80064ZM21.6164 7.12896V6.95856H19.767C18.7836 6.95856 18.1407 7.43088 18.1407 8.20512C18.1407 8.88768 18.6785 9.32064 19.5181 9.32064C20.8426 9.32064 21.6164 8.49408 21.6164 7.12896ZM22.6656 5.84304V10.1083H21.6164V8.9664C21.2624 9.72768 20.3835 10.213 19.3602 10.213C17.9704 10.213 17.0652 9.42576 17.0652 8.21856C17.0652 6.95856 18.1014 6.15792 19.7013 6.15792H21.1967C21.4855 6.15792 21.6164 6.01344 21.6164 5.80368C21.6164 4.89792 20.9741 4.28112 19.8457 4.28112C18.8752 4.28112 18.1144 4.88496 18.0621 5.60688H17.0652C17.1832 4.33392 18.3897 3.3888 19.8721 3.3888C21.59 3.3888 22.6656 4.3728 22.6656 5.84304ZM5.84318 8.76288C4.10126 8.76288 2.6894 7.35024 2.6894 5.60736C2.6894 3.86448 4.10126 2.45184 5.84318 2.45184C7.58463 2.45184 8.99697 3.86448 8.99697 5.60736C8.99697 7.35024 7.58463 8.76288 5.84318 8.76288ZM5.84318 0C2.61504 0 0.00143921 2.61792 0 5.84832V11.6218C0 11.8306 0.168867 12 0.378032 12H2.31137C2.52005 12 2.6894 11.8306 2.6894 11.6218V10.4866C2.6894 10.2778 2.85875 10.1083 3.06743 10.1083H8.61894C8.82762 10.1083 8.99697 10.2778 8.99697 10.4866V11.6218C8.99697 11.8306 9.16584 12 9.375 12H11.3083C11.517 12 11.6864 11.8306 11.6864 11.6218V5.84832C11.6844 2.61792 9.07085 0 5.84318 0Z\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;;AASA,SAAgB,EAAQ,EAAE,cAAW,GAAG,KAAsC;CAC7E,OACC,kBAAC,GAAD;EAAM,GAAI;EAAO,WAAW,EAAG,GAAS,CAAS;YAChD,kBAAC,OAAD;GACC,OAAM;GACN,QAAO;GACP,SAAQ;GACR,MAAK;GACL,eAAY;aAEZ,kBAAC,QAAD;IACC,UAAS;IACT,UAAS;IACT,GAAE;GACF,CAAA;EACG,CAAA;CACA,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowDown.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowDown.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowDown(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t{/* Figma symbol carries a drop-shadow filter that offsets the export; recenter\n\t\t\t\t the 16-unit glyph (bbox x[14,30] y[10,26]) within the 24×24 artboard. */}\n\t\t\t\t<g transform=\"translate(-10 -6)\">\n\t\t\t\t\t<path d=\"M29.6059 17.0532C29.4821 16.9282 29.3347 16.829 29.1724 16.7613C29.01 16.6937 28.8359 16.6588 28.66 16.6588C28.4842 16.6588 28.31 16.6937 28.1477 16.7613C27.9853 16.829 27.838 16.9282 27.7142 17.0532L23.3311 21.4531V11.3333C23.3311 10.9797 23.1907 10.6406 22.9409 10.3905C22.6911 10.1405 22.3522 10 21.9989 10C21.6455 10 21.3067 10.1405 21.0568 10.3905C20.807 10.6406 20.6666 10.9797 20.6666 11.3333V21.4531L16.2836 17.0532C16.0327 16.8021 15.6925 16.6611 15.3377 16.6611C14.9829 16.6611 14.6427 16.8021 14.3918 17.0532C14.1409 17.3043 14 17.6448 14 17.9998C14 18.3549 14.1409 18.6954 14.3918 18.9465L21.053 25.613C21.1797 25.7344 21.3291 25.8296 21.4926 25.893C21.6521 25.9636 21.8245 26 21.9989 26C22.1732 26 22.3456 25.9636 22.5051 25.893C22.6686 25.8296 22.818 25.7344 22.9448 25.613L29.6059 18.9465C29.7308 18.8225 29.8299 18.6751 29.8975 18.5126C29.9652 18.3501 30 18.1759 30 17.9998C30 17.8238 29.9652 17.6496 29.8975 17.4871C29.8299 17.3246 29.7308 17.1771 29.6059 17.0532Z\" />\n\t\t\t\t</g>\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAU,GAAoC;
|
|
1
|
+
{"version":3,"file":"ArrowDown.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowDown.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowDown(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t{/* Figma symbol carries a drop-shadow filter that offsets the export; recenter\n\t\t\t\t the 16-unit glyph (bbox x[14,30] y[10,26]) within the 24×24 artboard. */}\n\t\t\t\t<g transform=\"translate(-10 -6)\">\n\t\t\t\t\t<path d=\"M29.6059 17.0532C29.4821 16.9282 29.3347 16.829 29.1724 16.7613C29.01 16.6937 28.8359 16.6588 28.66 16.6588C28.4842 16.6588 28.31 16.6937 28.1477 16.7613C27.9853 16.829 27.838 16.9282 27.7142 17.0532L23.3311 21.4531V11.3333C23.3311 10.9797 23.1907 10.6406 22.9409 10.3905C22.6911 10.1405 22.3522 10 21.9989 10C21.6455 10 21.3067 10.1405 21.0568 10.3905C20.807 10.6406 20.6666 10.9797 20.6666 11.3333V21.4531L16.2836 17.0532C16.0327 16.8021 15.6925 16.6611 15.3377 16.6611C14.9829 16.6611 14.6427 16.8021 14.3918 17.0532C14.1409 17.3043 14 17.6448 14 17.9998C14 18.3549 14.1409 18.6954 14.3918 18.9465L21.053 25.613C21.1797 25.7344 21.3291 25.8296 21.4926 25.893C21.6521 25.9636 21.8245 26 21.9989 26C22.1732 26 22.3456 25.9636 22.5051 25.893C22.6686 25.8296 22.818 25.7344 22.9448 25.613L29.6059 18.9465C29.7308 18.8225 29.8299 18.6751 29.8975 18.5126C29.9652 18.3501 30 18.1759 30 17.9998C30 17.8238 29.9652 17.6496 29.8975 17.4871C29.8299 17.3246 29.7308 17.1771 29.6059 17.0532Z\" />\n\t\t\t\t</g>\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAU,GAAoC;CAC7D,OACC,kBAAC,GAAD;EAAM,GAAI;YACT,kBAAC,GAAD,EAAA,UAGC,kBAAC,KAAD;GAAG,WAAU;aACZ,kBAAC,QAAD,EAAM,GAAE,w9BAAy9B,CAAA;EAC/9B,CAAA,EACG,CAAA;CACF,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowLeft.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowLeft.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\n/**\n * Legacy stroke arrow — not part of the Lovelace 2.0 Figma `Icon/*` frame\n * (which ships chevrons instead). Retained for existing consumers (e.g. the\n * Sheet back button); an open stroke rather than a filled outline, so it\n * renders via `Glyph`'s `stroke` variant.\n */\nexport function ArrowLeft(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph variant=\"stroke\" viewBox=\"0 0 16 16\">\n\t\t\t\t<path d=\"M10 12L6 8L10 4\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAU,GAAoC;
|
|
1
|
+
{"version":3,"file":"ArrowLeft.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowLeft.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\n/**\n * Legacy stroke arrow — not part of the Lovelace 2.0 Figma `Icon/*` frame\n * (which ships chevrons instead). Retained for existing consumers (e.g. the\n * Sheet back button); an open stroke rather than a filled outline, so it\n * renders via `Glyph`'s `stroke` variant.\n */\nexport function ArrowLeft(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph variant=\"stroke\" viewBox=\"0 0 16 16\">\n\t\t\t\t<path d=\"M10 12L6 8L10 4\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAU,GAAoC;CAC7D,OACC,kBAAC,GAAD;EAAM,GAAI;YACT,kBAAC,GAAD;GAAO,SAAQ;GAAS,SAAQ;aAC/B,kBAAC,QAAD,EAAM,GAAE,kBAAmB,CAAA;EACrB,CAAA;CACF,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowNortheast.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowNortheast.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowNortheast(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t<path d=\"M17.9199 6.62C17.8185 6.37565 17.6243 6.18147 17.3799 6.08C17.2597 6.02876 17.1306 6.00158 16.9999 6H6.99994C6.73472 6 6.48037 6.10536 6.29283 6.29289C6.1053 6.48043 5.99994 6.73478 5.99994 7C5.99994 7.26522 6.1053 7.51957 6.29283 7.70711C6.48037 7.89464 6.73472 8 6.99994 8H14.5899L6.28994 16.29C6.19621 16.383 6.12182 16.4936 6.07105 16.6154C6.02028 16.7373 5.99414 16.868 5.99414 17C5.99414 17.132 6.02028 17.2627 6.07105 17.3846C6.12182 17.5064 6.19621 17.617 6.28994 17.71C6.3829 17.8037 6.4935 17.8781 6.61536 17.9289C6.73722 17.9797 6.86793 18.0058 6.99994 18.0058C7.13195 18.0058 7.26266 17.9797 7.38452 17.9289C7.50638 17.8781 7.61698 17.8037 7.70994 17.71L15.9999 9.41V17C15.9999 17.2652 16.1053 17.5196 16.2928 17.7071C16.4804 17.8946 16.7347 18 16.9999 18C17.2652 18 17.5195 17.8946 17.707 17.7071C17.8946 17.5196 17.9999 17.2652 17.9999 17V7C17.9984 6.86932 17.9712 6.74022 17.9199 6.62Z\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAe,GAAoC;
|
|
1
|
+
{"version":3,"file":"ArrowNortheast.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowNortheast.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowNortheast(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t<path d=\"M17.9199 6.62C17.8185 6.37565 17.6243 6.18147 17.3799 6.08C17.2597 6.02876 17.1306 6.00158 16.9999 6H6.99994C6.73472 6 6.48037 6.10536 6.29283 6.29289C6.1053 6.48043 5.99994 6.73478 5.99994 7C5.99994 7.26522 6.1053 7.51957 6.29283 7.70711C6.48037 7.89464 6.73472 8 6.99994 8H14.5899L6.28994 16.29C6.19621 16.383 6.12182 16.4936 6.07105 16.6154C6.02028 16.7373 5.99414 16.868 5.99414 17C5.99414 17.132 6.02028 17.2627 6.07105 17.3846C6.12182 17.5064 6.19621 17.617 6.28994 17.71C6.3829 17.8037 6.4935 17.8781 6.61536 17.9289C6.73722 17.9797 6.86793 18.0058 6.99994 18.0058C7.13195 18.0058 7.26266 17.9797 7.38452 17.9289C7.50638 17.8781 7.61698 17.8037 7.70994 17.71L15.9999 9.41V17C15.9999 17.2652 16.1053 17.5196 16.2928 17.7071C16.4804 17.8946 16.7347 18 16.9999 18C17.2652 18 17.5195 17.8946 17.707 17.7071C17.8946 17.5196 17.9999 17.2652 17.9999 17V7C17.9984 6.86932 17.9712 6.74022 17.9199 6.62Z\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAe,GAAoC;CAClE,OACC,kBAAC,GAAD;EAAM,GAAI;YACT,kBAAC,GAAD,EAAA,UACC,kBAAC,QAAD,EAAM,GAAE,u4BAAw4B,CAAA,EAC14B,CAAA;CACF,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowNorthwest.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowNorthwest.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowNorthwest(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t<path d=\"M6.0742 6.62C6.17568 6.37565 6.36985 6.18147 6.6142 6.08C6.73442 6.02876 6.86352 6.00158 6.9942 6H16.9942C17.2594 6 17.5138 6.10536 17.7013 6.29289C17.8888 6.48043 17.9942 6.73478 17.9942 7C17.9942 7.26522 17.8888 7.51957 17.7013 7.70711C17.5138 7.89464 17.2594 8 16.9942 8H9.4042L17.7042 16.29C17.7979 16.383 17.8723 16.4936 17.9231 16.6154C17.9739 16.7373 18 16.868 18 17C18 17.132 17.9739 17.2627 17.9231 17.3846C17.8723 17.5064 17.7979 17.617 17.7042 17.71C17.6112 17.8037 17.5006 17.8781 17.3788 17.9289C17.2569 17.9797 17.1262 18.0058 16.9942 18.0058C16.8622 18.0058 16.7315 17.9797 16.6096 17.9289C16.4878 17.8781 16.3772 17.8037 16.2842 17.71L7.9942 9.41V17C7.9942 17.2652 7.88885 17.5196 7.70131 17.7071C7.51377 17.8946 7.25942 18 6.9942 18C6.72898 18 6.47463 17.8946 6.28709 17.7071C6.09956 17.5196 5.9942 17.2652 5.9942 17V7C5.99578 6.86932 6.02296 6.74022 6.0742 6.62Z\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAe,GAAoC;
|
|
1
|
+
{"version":3,"file":"ArrowNorthwest.js","names":[],"sources":["../../../../src/components/Icon/icons/ArrowNorthwest.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function ArrowNorthwest(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t<path d=\"M6.0742 6.62C6.17568 6.37565 6.36985 6.18147 6.6142 6.08C6.73442 6.02876 6.86352 6.00158 6.9942 6H16.9942C17.2594 6 17.5138 6.10536 17.7013 6.29289C17.8888 6.48043 17.9942 6.73478 17.9942 7C17.9942 7.26522 17.8888 7.51957 17.7013 7.70711C17.5138 7.89464 17.2594 8 16.9942 8H9.4042L17.7042 16.29C17.7979 16.383 17.8723 16.4936 17.9231 16.6154C17.9739 16.7373 18 16.868 18 17C18 17.132 17.9739 17.2627 17.9231 17.3846C17.8723 17.5064 17.7979 17.617 17.7042 17.71C17.6112 17.8037 17.5006 17.8781 17.3788 17.9289C17.2569 17.9797 17.1262 18.0058 16.9942 18.0058C16.8622 18.0058 16.7315 17.9797 16.6096 17.9289C16.4878 17.8781 16.3772 17.8037 16.2842 17.71L7.9942 9.41V17C7.9942 17.2652 7.88885 17.5196 7.70131 17.7071C7.51377 17.8946 7.25942 18 6.9942 18C6.72898 18 6.47463 17.8946 6.28709 17.7071C6.09956 17.5196 5.9942 17.2652 5.9942 17V7C5.99578 6.86932 6.02296 6.74022 6.0742 6.62Z\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAe,GAAoC;CAClE,OACC,kBAAC,GAAD;EAAM,GAAI;YACT,kBAAC,GAAD,EAAA,UACC,kBAAC,QAAD,EAAM,GAAE,m3BAAo3B,CAAA,EACt3B,CAAA;CACF,CAAA;AAER"}
|