@seekbuddy/dsh-ui 0.2.0-beta.0 → 0.2.0-beta.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/CHANGELOG.md +34 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/UPSTREAM.md +7 -4
- package/dist/blocks.js +170 -135
- package/dist/chunks/{chunk-VIH56PDF.js → chunk-6SGSJ5KW.js} +2 -2
- package/dist/chunks/{chunk-QJKAQ6PO.js → chunk-7NH2UOZO.js} +2 -2
- package/dist/chunks/{chunk-KETGFAOH.js → chunk-7SKW4S35.js} +2 -2
- package/dist/chunks/chunk-ENKPNYOB.js +26 -0
- package/dist/chunks/{chunk-WUL523OW.js → chunk-EWAZFWLW.js} +1 -1
- package/dist/chunks/{chunk-5JXG4BHW.js → chunk-FFJ6TCCF.js} +1 -1
- package/dist/chunks/{chunk-R6AUJQ3G.js → chunk-FZXK4LTI.js} +1 -1
- package/dist/chunks/chunk-JA3XDLIA.js +1115 -0
- package/dist/chunks/{chunk-TUK6UGXM.js → chunk-L7XALG4J.js} +1 -1
- package/dist/chunks/{chunk-AY44MQMD.js → chunk-OCAQFVT3.js} +180 -60
- package/dist/chunks/{chunk-CI73NXA5.js → chunk-RAXDA2PT.js} +4 -4
- package/dist/chunks/{chunk-5XDVPALS.js → chunk-SN6RSUWC.js} +1 -1
- package/dist/chunks/{chunk-CTQPGUZP.js → chunk-SNVSQWCU.js} +1 -1
- package/dist/chunks/{chunk-ZZNL5PWF.js → chunk-SO3DCAWG.js} +2 -2
- package/dist/chunks/{chunk-IOBKTEKP.js → chunk-UAEFKTV3.js} +1 -1
- package/dist/chunks/{chunk-NE62SYOZ.js → chunk-UGEORMLD.js} +2 -2
- package/dist/chunks/{chunk-TQU54HSM.js → chunk-W6FLI3AK.js} +1 -1
- package/dist/chunks/{chunk-TZ7HRE6D.js → chunk-WX46TSKP.js} +1 -1
- package/dist/chunks/{chunk-XX6MSZLS.js → chunk-XL33IPCV.js} +1 -1
- package/dist/chunks/chunk-XW4L4ZGL.js +967 -0
- package/dist/chunks/chunk-YOBY6PSL.js +850 -0
- package/dist/icons.js +58 -2
- package/dist/index.js +810 -317
- package/dist/markdown.js +84 -7
- package/dist/meta.json +1038 -339
- package/dist/root-inputs.json +20 -1
- package/dist/seekbuddy-card.js +1 -1
- package/dist/seekbuddy-empty.js +2 -2
- package/dist/seekbuddy-internal/Message.js +2 -2
- package/dist/seekbuddy-internal/Pagination.js +1 -1
- package/dist/seekbuddy-internal/StatusBadge.js +1 -1
- package/dist/seekbuddy-internal/Switch.js +1 -1
- package/dist/seekbuddy-internal/Upload.js +1 -1
- package/dist/seekbuddy-internal/date/Calendar.js +1 -1
- package/dist/seekbuddy-internal/date/DatePicker.js +2 -2
- package/dist/seekbuddy-internal/date/DateRangePicker.js +2 -2
- package/dist/seekbuddy-internal/date/TimePicker.js +1 -1
- package/dist/seekbuddy-internal/date/fields.js +5 -5
- package/dist/seekbuddy-spinner.js +1 -1
- package/dist/seekbuddy-tabs.js +1 -1
- package/dist/seekbuddy-timeline.js +2 -2
- package/dist/seekbuddy.js +15 -15
- package/dist/tokens.css +60 -20
- package/dist/types/AnimatedRows.d.ts +45 -0
- package/dist/types/Button.d.ts +1 -1
- package/dist/types/CommandText.d.ts +15 -0
- package/dist/types/DetailDocument.d.ts +77 -0
- package/dist/types/DisclosureRow.d.ts +4 -2
- package/dist/types/DraggableImage.d.ts +18 -0
- package/dist/types/HoverCard.d.ts +11 -3
- package/dist/types/HoverCardGroup.d.ts +24 -0
- package/dist/types/ImageLightbox.d.ts +4 -1
- package/dist/types/InlineEditor.d.ts +22 -0
- package/dist/types/Menu.d.ts +30 -9
- package/dist/types/MenuSurface.d.ts +9 -0
- package/dist/types/PermissionIcon.d.ts +12 -0
- package/dist/types/QuotePreview.d.ts +23 -0
- package/dist/types/SegmentedTabs.d.ts +3 -1
- package/dist/types/TerminalBlock.d.ts +10 -2
- package/dist/types/Tooltip.d.ts +21 -15
- package/dist/types/UserMessageBubble.d.ts +10 -0
- package/dist/types/ZoomControls.d.ts +26 -0
- package/dist/types/blocks.d.ts +2 -0
- package/dist/types/document-zoom.d.ts +16 -0
- package/dist/types/file-drag-actions.d.ts +36 -0
- package/dist/types/focus.d.ts +7 -0
- package/dist/types/icons/artwork.d.ts +421 -0
- package/dist/types/icons/index.d.ts +205 -192
- package/dist/types/icons/shared-artwork.d.ts +6 -12
- package/dist/types/icons.d.ts +1 -1
- package/dist/types/image-drag.d.ts +16 -0
- package/dist/types/index.d.ts +21 -3
- package/dist/types/markdown/MarkdownDelegate.d.ts +26 -3
- package/dist/types/markdown/MarkdownText.d.ts +12 -5
- package/dist/types/markdown/file-link.d.ts +13 -3
- package/dist/types/markdown/highlight.d.ts +22 -0
- package/dist/types/markdown/quote-text.d.ts +7 -0
- package/dist/types/markdown/render.d.ts +9 -4
- package/dist/types/markdown/windows-path-destinations.d.ts +10 -0
- package/dist/types/markdown.d.ts +5 -2
- package/dist/types/overlay-top-margin.d.ts +9 -2
- package/dist/types/tooltip-placement.d.ts +34 -0
- package/dist/types/use-clipboard-copy.d.ts +13 -0
- package/dist/types/useAnchoredPosition.d.ts +22 -22
- package/dist/types/useRowDragPreview.d.ts +19 -0
- package/dist/types/user-text.d.ts +26 -31
- package/package.json +2 -2
- package/dist/chunks/chunk-3HCOU44R.js +0 -697
- package/dist/chunks/chunk-LA3QDZYN.js +0 -2777
- package/dist/chunks/chunk-OQPH36OI.js +0 -754
- package/dist/types/use-copy-feedback.d.ts +0 -13
package/dist/index.js
CHANGED
|
@@ -1,40 +1,52 @@
|
|
|
1
1
|
import {
|
|
2
|
+
MENU_TRANSITION_MS,
|
|
2
3
|
Menu,
|
|
3
4
|
MenuItemButton,
|
|
4
5
|
MenuSurface,
|
|
5
6
|
Pill,
|
|
6
|
-
StateDot,
|
|
7
7
|
closeTopModal,
|
|
8
8
|
focusWithoutRing,
|
|
9
9
|
isBehindModal,
|
|
10
|
+
isMobileDevice,
|
|
10
11
|
modalSelector,
|
|
11
12
|
observeComposition,
|
|
13
|
+
useAnchoredPosition,
|
|
14
|
+
useClipboardCopy,
|
|
12
15
|
useModalLayer
|
|
13
|
-
} from "./chunks/chunk-
|
|
16
|
+
} from "./chunks/chunk-YOBY6PSL.js";
|
|
17
|
+
import {
|
|
18
|
+
Button
|
|
19
|
+
} from "./chunks/chunk-ENKPNYOB.js";
|
|
14
20
|
import {
|
|
21
|
+
DraggableImage,
|
|
15
22
|
HoverCard,
|
|
23
|
+
HoverCardGroup,
|
|
16
24
|
ImageLightbox,
|
|
17
25
|
MarkdownText_module_default,
|
|
18
26
|
ShortcutKeys,
|
|
27
|
+
StateDot,
|
|
19
28
|
Tooltip,
|
|
20
29
|
overlayTopMargin,
|
|
21
30
|
pointerModality,
|
|
22
31
|
useDismissOnOutsidePointer,
|
|
23
32
|
writeClipboard
|
|
24
|
-
} from "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-JA3XDLIA.js";
|
|
25
34
|
import {
|
|
26
35
|
ReferenceIconRegular
|
|
27
|
-
} from "./chunks/chunk-
|
|
36
|
+
} from "./chunks/chunk-FFJ6TCCF.js";
|
|
28
37
|
import {
|
|
29
38
|
IconCheckCircleOutlineRegular,
|
|
30
39
|
IconCheckOutlineRegular,
|
|
31
40
|
IconChevronDownOutlineRegular,
|
|
32
41
|
IconChevronUpOutlineRegular,
|
|
33
42
|
IconCloseOutlineRegular,
|
|
43
|
+
IconPlusOutlineRegular,
|
|
34
44
|
IconRefreshOutlineRegular,
|
|
35
45
|
IconWarningOutlineRegular
|
|
36
|
-
} from "./chunks/chunk-
|
|
37
|
-
import
|
|
46
|
+
} from "./chunks/chunk-XW4L4ZGL.js";
|
|
47
|
+
import {
|
|
48
|
+
__publicField
|
|
49
|
+
} from "./chunks/chunk-ZA47FP7C.js";
|
|
38
50
|
|
|
39
51
|
// src/DisclosureRow.tsx
|
|
40
52
|
import { memo as memo2 } from "react";
|
|
@@ -53,7 +65,7 @@ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-u
|
|
|
53
65
|
element.textContent = ".sFCb2G_root{vertical-align:top;width:max-content;min-width:0;max-width:100%;color:inherit;display:inline-grid;position:relative}.sFCb2G_content{align-items:center;min-width:0;display:flex}.sFCb2G_text{color:inherit}.sFCb2G_text[data-shimmer-text]:after{content:attr(data-shimmer-text)}.sFCb2G_decoration{pointer-events:none;user-select:none;position:absolute;inset:0;overflow:clip}.sFCb2G_sweep{color:var(--dsw-alias-label-shimmer);animation-name:sFCb2G_dsh-row-shimmer-sweep;position:absolute;inset:0;overflow:hidden;transform:translate(-100%);mask-image:linear-gradient(105deg,#0000 0%,#000 40% 60%,#0000 100%)}.sFCb2G_sweep *{color:inherit!important}.sFCb2G_sweep [data-shimmer-decoration]{background:currentColor}.sFCb2G_highlight{width:100%;height:100%;animation-name:sFCb2G_dsh-row-shimmer-highlight;transform:translate(100%)}.sFCb2G_sweep,.sFCb2G_highlight{animation-duration:1.5s;animation-timing-function:steps(48,end);animation-iteration-count:infinite;animation-delay:.3s}@keyframes sFCb2G_dsh-row-shimmer-sweep{0%{transform:translate(-100%)}66.6667%,to{transform:translate(100%)}}@keyframes sFCb2G_dsh-row-shimmer-highlight{0%{transform:translate(100%)}66.6667%,to{transform:translate(-100%)}}@media (prefers-reduced-motion:reduce){.sFCb2G_decoration{display:none}.sFCb2G_sweep,.sFCb2G_highlight{animation:none}}";
|
|
54
66
|
document.head.appendChild(element);
|
|
55
67
|
}
|
|
56
|
-
var TextShimmer_module_default = { "
|
|
68
|
+
var TextShimmer_module_default = { "dsh-row-shimmer-sweep": "sFCb2G_dsh-row-shimmer-sweep", "root": "sFCb2G_root", "sweep": "sFCb2G_sweep", "dsh-row-shimmer-highlight": "sFCb2G_dsh-row-shimmer-highlight", "highlight": "sFCb2G_highlight", "text": "sFCb2G_text", "content": "sFCb2G_content", "decoration": "sFCb2G_decoration" };
|
|
57
69
|
|
|
58
70
|
// src/TextShimmer.tsx
|
|
59
71
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -84,10 +96,10 @@ var id2 = "@seekbuddy/dsh-ui/DisclosureRow.module.css";
|
|
|
84
96
|
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id2 + '"]')) {
|
|
85
97
|
const element = document.createElement("style");
|
|
86
98
|
element.setAttribute("data-dsh-ui-primitives", id2);
|
|
87
|
-
element.textContent = "._1_lb6a_root{flex-direction:column;width:100%;min-width:0;display:flex}._1_lb6a_row{height:calc(24px + var(--dsh-content-font-delta,0px));min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;transition:color .1s;display:flex;position:relative;overflow:hidden}._1_lb6a_row[data-expandable]{cursor:pointer}._1_lb6a_row:hover{color:var(--dsw-alias-label-secondary)}._1_lb6a_leading{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px));color:inherit;background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-right:6px;padding:0;display:inline-flex;position:relative}._1_lb6a_leading svg:not([data-state]){width:calc(14px + var(--dsh-content-font-delta,0px));height:calc(14px + var(--dsh-content-font-delta,0px))}button._1_lb6a_leading{cursor:pointer}._1_lb6a_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}._1_lb6a_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}._1_lb6a_row:hover ._1_lb6a_iconIdle{opacity:0}._1_lb6a_row:hover ._1_lb6a_chevronHover{opacity:1}._1_lb6a_title{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:inherit;flex:none}@media (prefers-reduced-motion:reduce){._1_lb6a_row{transition:none}}";
|
|
99
|
+
element.textContent = "._1_lb6a_root{flex-direction:column;width:100%;min-width:0;display:flex}._1_lb6a_header{align-items:center;min-width:0;display:flex}._1_lb6a_header[data-has-accessory]{gap:8px}._1_lb6a_header[data-has-accessory] ._1_lb6a_row{flex:0 auto}._1_lb6a_row{height:calc(24px + var(--dsh-content-font-delta,0px));min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;align-items:center;transition:color .1s;display:flex;position:relative;overflow:hidden}._1_lb6a_row[data-expandable]{cursor:pointer}@media (hover:hover){._1_lb6a_row:hover{color:var(--dsw-alias-label-secondary)}}._1_lb6a_leading{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px));color:inherit;background:0 0;border:none;flex:none;justify-content:center;align-items:center;margin-right:6px;padding:0;display:inline-flex;position:relative}._1_lb6a_leading svg:not([data-state]){width:calc(14px + var(--dsh-content-font-delta,0px));height:calc(14px + var(--dsh-content-font-delta,0px))}button._1_lb6a_leading{cursor:pointer}._1_lb6a_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}._1_lb6a_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}@media (hover:hover){._1_lb6a_row:hover ._1_lb6a_iconIdle{opacity:0}._1_lb6a_row:hover ._1_lb6a_chevronHover{opacity:1}}._1_lb6a_title{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:inherit;flex:none}@media (prefers-reduced-motion:reduce){._1_lb6a_row{transition:none}}";
|
|
88
100
|
document.head.appendChild(element);
|
|
89
101
|
}
|
|
90
|
-
var DisclosureRow_module_default = { "
|
|
102
|
+
var DisclosureRow_module_default = { "root": "_1_lb6a_root", "leading": "_1_lb6a_leading", "header": "_1_lb6a_header", "row": "_1_lb6a_row", "iconIdle": "_1_lb6a_iconIdle", "chevronHover": "_1_lb6a_chevronHover", "title": "_1_lb6a_title" };
|
|
91
103
|
|
|
92
104
|
// src/DisclosureRow.tsx
|
|
93
105
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -102,6 +114,7 @@ var DisclosureRow = memo2(function DisclosureRow2({
|
|
|
102
114
|
previewChevron = expandable,
|
|
103
115
|
keepContentWhenOpen = false,
|
|
104
116
|
collapsedContent,
|
|
117
|
+
headerAccessory,
|
|
105
118
|
children,
|
|
106
119
|
className,
|
|
107
120
|
rowClassName,
|
|
@@ -127,84 +140,65 @@ var DisclosureRow = memo2(function DisclosureRow2({
|
|
|
127
140
|
] }) : icon;
|
|
128
141
|
const leading = open ? /* @__PURE__ */ jsx2(IconChevronUpOutlineRegular, { className: chevronClassName }) : collapsedLeading;
|
|
129
142
|
return /* @__PURE__ */ jsxs2("div", { className: clsx2(DisclosureRow_module_default.root, className), "data-open": open || void 0, children: [
|
|
130
|
-
/* @__PURE__ */ jsxs2(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
143
|
+
/* @__PURE__ */ jsxs2("div", { className: DisclosureRow_module_default.header, "data-disclosure-header": true, "data-has-accessory": !!headerAccessory || void 0, children: [
|
|
144
|
+
/* @__PURE__ */ jsxs2(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
className: clsx2(DisclosureRow_module_default.row, rowClassName),
|
|
148
|
+
"data-disclosure-row": true,
|
|
149
|
+
"data-expandable": rowExpands || void 0,
|
|
150
|
+
role: rowExpands ? "button" : void 0,
|
|
151
|
+
tabIndex: rowExpands ? 0 : void 0,
|
|
152
|
+
"aria-expanded": rowExpands ? open : void 0,
|
|
153
|
+
onClick: rowExpands ? onToggle : void 0,
|
|
154
|
+
onKeyDown: rowExpands ? toggleFromKeyboard : void 0,
|
|
155
|
+
children: [
|
|
156
|
+
expandable && !rowExpands ? /* @__PURE__ */ jsx2(
|
|
157
|
+
"button",
|
|
158
|
+
{
|
|
159
|
+
type: "button",
|
|
160
|
+
className: clsx2(DisclosureRow_module_default.leading, leadingClassName),
|
|
161
|
+
"aria-label": title,
|
|
162
|
+
"aria-expanded": open,
|
|
163
|
+
onClick: toggleFromLeading,
|
|
164
|
+
children: leading
|
|
165
|
+
}
|
|
166
|
+
) : /* @__PURE__ */ jsx2("span", { className: clsx2(DisclosureRow_module_default.leading, leadingClassName), children: leading }),
|
|
167
|
+
/* @__PURE__ */ jsxs2(TextShimmer, { active: running, className: contentClassName, contentClassName: contentLayoutClassName, children: [
|
|
168
|
+
/* @__PURE__ */ jsx2(TextShimmer, { className: clsx2(DisclosureRow_module_default.title, titleClassName), children: title }),
|
|
169
|
+
(keepContentWhenOpen || !open) && collapsedContent
|
|
170
|
+
] })
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
headerAccessory
|
|
175
|
+
] }),
|
|
160
176
|
open && children
|
|
161
177
|
] });
|
|
162
178
|
});
|
|
163
179
|
|
|
164
|
-
// src/
|
|
165
|
-
import { forwardRef } from "react";
|
|
180
|
+
// src/SegmentedTabs.tsx
|
|
166
181
|
import clsx3 from "clsx";
|
|
167
182
|
|
|
168
|
-
// .build/css/
|
|
169
|
-
var id3 = "@seekbuddy/dsh-ui/
|
|
183
|
+
// .build/css/SegmentedTabs.module.mjs
|
|
184
|
+
var id3 = "@seekbuddy/dsh-ui/SegmentedTabs.module.css";
|
|
170
185
|
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id3 + '"]')) {
|
|
171
186
|
const element = document.createElement("style");
|
|
172
187
|
element.setAttribute("data-dsh-ui-primitives", id3);
|
|
173
|
-
element.textContent = ".
|
|
174
|
-
document.head.appendChild(element);
|
|
175
|
-
}
|
|
176
|
-
var Button_module_default = { "icon": "wa-Ieq_icon", "sm": "wa-Ieq_sm", "primary": "wa-Ieq_primary", "md": "wa-Ieq_md", "outline": "wa-Ieq_outline", "toolbar": "wa-Ieq_toolbar", "ghost": "wa-Ieq_ghost", "button": "wa-Ieq_button" };
|
|
177
|
-
|
|
178
|
-
// src/Button.tsx
|
|
179
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
180
|
-
var Button = forwardRef(function Button2({ variant = "ghost", size = "md", icon, className, children, ...rest }, ref) {
|
|
181
|
-
return /* @__PURE__ */ jsxs3("button", { ref, type: "button", className: clsx3(Button_module_default.button, Button_module_default[variant], Button_module_default[size], className), ...rest, children: [
|
|
182
|
-
icon != null && /* @__PURE__ */ jsx3("span", { className: Button_module_default.icon, children: icon }),
|
|
183
|
-
children
|
|
184
|
-
] });
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// src/SegmentedTabs.tsx
|
|
188
|
-
import clsx4 from "clsx";
|
|
189
|
-
|
|
190
|
-
// .build/css/SegmentedTabs.module.mjs
|
|
191
|
-
var id4 = "@seekbuddy/dsh-ui/SegmentedTabs.module.css";
|
|
192
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id4 + '"]')) {
|
|
193
|
-
const element = document.createElement("style");
|
|
194
|
-
element.setAttribute("data-dsh-ui-primitives", id4);
|
|
195
|
-
element.textContent = ".zfSGJW_tabs{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);padding:4px;display:grid;position:relative}.zfSGJW_indicator{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);pointer-events:none;transition:transform .18s;position:absolute;inset:4px auto 4px 4px}.zfSGJW_tab{border-radius:var(--dsw-radius-md);height:34px;color:var(--dsw-alias-label-secondary);background:0 0;justify-content:center;padding:0 12px;font-size:14px;line-height:20px;transition:color .18s;position:relative}.zfSGJW_tab:hover,.zfSGJW_tab[aria-selected=true]{color:var(--dsw-alias-label-primary);background:0 0}.zfSGJW_tab[aria-selected=true]{font-weight:600}.zfSGJW_tab:focus-visible{text-underline-offset:4px;outline:none;text-decoration:underline 1px}@media (prefers-reduced-motion:reduce){.zfSGJW_indicator,.zfSGJW_tab{transition:none}}";
|
|
188
|
+
element.textContent = ".zfSGJW_tabs{--segmented-tabs-inset:4px;padding:var(--segmented-tabs-inset);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);display:grid;position:relative}.zfSGJW_indicator{inset:var(--segmented-tabs-inset) auto var(--segmented-tabs-inset) var(--segmented-tabs-inset);box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);pointer-events:none;transition:transform .18s;position:absolute}.zfSGJW_tab{border-radius:var(--dsw-radius-md);height:34px;color:var(--dsw-alias-label-secondary);background:0 0;justify-content:center;padding:0 12px;font-size:14px;line-height:20px;transition:color .18s;position:relative}.zfSGJW_tab[aria-selected=true]{color:var(--dsw-alias-label-primary);background:0 0}@media (hover:hover){.zfSGJW_tab:hover{color:var(--dsw-alias-label-primary);background:0 0}}.zfSGJW_tab[aria-selected=true]{font-weight:600}.zfSGJW_tabs[data-size=sm]{--segmented-tabs-inset:2px;border-radius:calc(var(--dsw-radius-md) + var(--segmented-tabs-inset))}.zfSGJW_tabs[data-size=sm] .zfSGJW_tab{height:30px}.zfSGJW_tabs[data-size=sm] .zfSGJW_tab[aria-selected=true]{font-weight:500}.zfSGJW_tab:focus-visible{text-underline-offset:4px;outline:none;text-decoration:underline 1px}@media (prefers-reduced-motion:reduce){.zfSGJW_indicator,.zfSGJW_tab{transition:none}}";
|
|
196
189
|
document.head.appendChild(element);
|
|
197
190
|
}
|
|
198
|
-
var SegmentedTabs_module_default = { "
|
|
191
|
+
var SegmentedTabs_module_default = { "tabs": "zfSGJW_tabs", "tab": "zfSGJW_tab", "indicator": "zfSGJW_indicator" };
|
|
199
192
|
|
|
200
193
|
// src/SegmentedTabs.tsx
|
|
201
|
-
import { jsx as
|
|
194
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
202
195
|
function SegmentedTabs({
|
|
203
196
|
items,
|
|
204
197
|
value,
|
|
205
198
|
onChange,
|
|
206
199
|
label,
|
|
207
|
-
className
|
|
200
|
+
className,
|
|
201
|
+
size = "md"
|
|
208
202
|
}) {
|
|
209
203
|
const selectedIndex = items.findIndex((item) => item.value === value);
|
|
210
204
|
const onKeyDown = (event, index) => {
|
|
@@ -233,23 +227,27 @@ function SegmentedTabs({
|
|
|
233
227
|
tablist.querySelectorAll('[role="tab"]').item(next).focus();
|
|
234
228
|
onChange(nextItem.value);
|
|
235
229
|
};
|
|
236
|
-
return /* @__PURE__ */
|
|
230
|
+
return /* @__PURE__ */ jsxs3(
|
|
237
231
|
"div",
|
|
238
232
|
{
|
|
239
233
|
role: "tablist",
|
|
234
|
+
"data-size": size,
|
|
240
235
|
"aria-label": label,
|
|
241
|
-
className:
|
|
236
|
+
className: clsx3(SegmentedTabs_module_default.tabs, className),
|
|
242
237
|
style: { gridTemplateColumns: `repeat(${items.length}, minmax(0, 1fr))` },
|
|
243
238
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ jsx3(
|
|
245
240
|
"span",
|
|
246
241
|
{
|
|
247
242
|
className: SegmentedTabs_module_default.indicator,
|
|
248
243
|
"aria-hidden": "true",
|
|
249
|
-
style: {
|
|
244
|
+
style: {
|
|
245
|
+
width: `calc((100% - 2 * var(--segmented-tabs-inset)) / ${items.length})`,
|
|
246
|
+
transform: `translateX(${selectedIndex * 100}%)`
|
|
247
|
+
}
|
|
250
248
|
}
|
|
251
249
|
),
|
|
252
|
-
items.map((item, index) => /* @__PURE__ */
|
|
250
|
+
items.map((item, index) => /* @__PURE__ */ jsx3(
|
|
253
251
|
Pill,
|
|
254
252
|
{
|
|
255
253
|
id: item.id,
|
|
@@ -274,43 +272,43 @@ function SegmentedTabs({
|
|
|
274
272
|
}
|
|
275
273
|
|
|
276
274
|
// src/Tag.tsx
|
|
277
|
-
import
|
|
275
|
+
import clsx4 from "clsx";
|
|
278
276
|
|
|
279
277
|
// .build/css/Tag.module.mjs
|
|
280
|
-
var
|
|
281
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
278
|
+
var id4 = "@seekbuddy/dsh-ui/Tag.module.css";
|
|
279
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id4 + '"]')) {
|
|
282
280
|
const element = document.createElement("style");
|
|
283
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
281
|
+
element.setAttribute("data-dsh-ui-primitives", id4);
|
|
284
282
|
element.textContent = ".bkMBDa_tag{corner-shape:round;white-space:nowrap;border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.bkMBDa_tag[data-tone=outline]{border:.5px solid var(--dsw-alias-border-l4);color:var(--dsw-alias-label-tertiary)}.bkMBDa_tag[data-tone=solid]{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.bkMBDa_tag[data-tone=neutral]{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary)}.bkMBDa_tag[data-tone=quiet]{color:var(--dsw-alias-label-tertiary)}.bkMBDa_tag[data-tone=success]{background:color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent);color:var(--dsw-alias-state-success-primary)}.bkMBDa_tag[data-tone=info]{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent);color:var(--dsw-alias-state-business-primary)}.bkMBDa_tag[data-tone=warning]{background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);color:var(--dsw-alias-state-warn-primary)}.bkMBDa_tag[data-tone=danger]{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);color:var(--dsw-alias-state-error-primary)}";
|
|
285
283
|
document.head.appendChild(element);
|
|
286
284
|
}
|
|
287
285
|
var Tag_module_default = { "tag": "bkMBDa_tag" };
|
|
288
286
|
|
|
289
287
|
// src/Tag.tsx
|
|
290
|
-
import { jsx as
|
|
288
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
291
289
|
function Tag({
|
|
292
290
|
tone = "outline",
|
|
293
291
|
className,
|
|
294
292
|
children
|
|
295
293
|
}) {
|
|
296
|
-
return /* @__PURE__ */
|
|
294
|
+
return /* @__PURE__ */ jsx4("span", { className: clsx4(Tag_module_default.tag, className), "data-tone": tone, children });
|
|
297
295
|
}
|
|
298
296
|
|
|
299
297
|
// src/Switch.tsx
|
|
300
|
-
import
|
|
298
|
+
import clsx5 from "clsx";
|
|
301
299
|
|
|
302
300
|
// .build/css/Switch.module.mjs
|
|
303
|
-
var
|
|
304
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
301
|
+
var id5 = "@seekbuddy/dsh-ui/Switch.module.css";
|
|
302
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id5 + '"]')) {
|
|
305
303
|
const element = document.createElement("style");
|
|
306
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
304
|
+
element.setAttribute("data-dsh-ui-primitives", id5);
|
|
307
305
|
element.textContent = ".POxp2W_switch{box-sizing:border-box;corner-shape:round;background:var(--dsw-alias-border-l3);cursor:pointer;border:0;border-radius:999px;flex:none;width:36px;height:20px;padding:2px;position:relative}.POxp2W_switch[aria-checked=true]{background:var(--dsw-alias-brand-primary)}.POxp2W_switch:disabled{cursor:default;opacity:.5}.POxp2W_switch:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.POxp2W_thumb{corner-shape:round;background:var(--dsw-alias-label-primary-foreground);border-radius:50%;width:16px;height:16px;transition:transform .12s;display:block}.POxp2W_switch[aria-checked=false] .POxp2W_thumb{background:var(--dsw-alias-switch-thumb)}.POxp2W_switch[aria-checked=true] .POxp2W_thumb{transform:translate(16px)}";
|
|
308
306
|
document.head.appendChild(element);
|
|
309
307
|
}
|
|
310
308
|
var Switch_module_default = { "switch": "POxp2W_switch", "thumb": "POxp2W_thumb" };
|
|
311
309
|
|
|
312
310
|
// src/Switch.tsx
|
|
313
|
-
import { jsx as
|
|
311
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
314
312
|
function Switch({
|
|
315
313
|
checked,
|
|
316
314
|
onChange,
|
|
@@ -319,7 +317,7 @@ function Switch({
|
|
|
319
317
|
title,
|
|
320
318
|
className
|
|
321
319
|
}) {
|
|
322
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ jsx5(
|
|
323
321
|
"button",
|
|
324
322
|
{
|
|
325
323
|
type: "button",
|
|
@@ -328,31 +326,31 @@ function Switch({
|
|
|
328
326
|
"aria-label": label,
|
|
329
327
|
title,
|
|
330
328
|
disabled,
|
|
331
|
-
className:
|
|
329
|
+
className: clsx5(Switch_module_default.switch, className),
|
|
332
330
|
onClick: () => {
|
|
333
331
|
onChange(!checked);
|
|
334
332
|
},
|
|
335
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ jsx5("span", { className: Switch_module_default.thumb })
|
|
336
334
|
}
|
|
337
335
|
);
|
|
338
336
|
}
|
|
339
337
|
|
|
340
338
|
// src/SegmentedControl.tsx
|
|
341
339
|
import { useEffect, useRef } from "react";
|
|
342
|
-
import
|
|
340
|
+
import clsx6 from "clsx";
|
|
343
341
|
|
|
344
342
|
// .build/css/SegmentedControl.module.mjs
|
|
345
|
-
var
|
|
346
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
343
|
+
var id6 = "@seekbuddy/dsh-ui/SegmentedControl.module.css";
|
|
344
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id6 + '"]')) {
|
|
347
345
|
const element = document.createElement("style");
|
|
348
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
349
|
-
element.textContent = "._4Yr7Ka_control{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px;padding:4px;display:inline-grid;position:relative}._4Yr7Ka_indicator{width:calc((100% - 8px - 2px * (var(--dsh-segment-count) - 1)) / var(--dsh-segment-count));border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);height:calc(100% - 8px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--dsh-segment-index) * (100% + 2px)));pointer-events:none;border:0;transition:transform .16s;position:absolute;top:4px;left:4px}._4Yr7Ka_tab{box-sizing:border-box;z-index:1;border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;padding:0 16px;font-size:13px;font-weight:500;line-height:20px;transition:color .12s;position:relative}._4Yr7Ka_tab:hover:not(:disabled)
|
|
346
|
+
element.setAttribute("data-dsh-ui-primitives", id6);
|
|
347
|
+
element.textContent = "._4Yr7Ka_control{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px;padding:4px;display:inline-grid;position:relative}._4Yr7Ka_indicator{width:calc((100% - 8px - 2px * (var(--dsh-segment-count) - 1)) / var(--dsh-segment-count));border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);height:calc(100% - 8px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--dsh-segment-index) * (100% + 2px)));pointer-events:none;border:0;transition:transform .16s;position:absolute;top:4px;left:4px}._4Yr7Ka_tab{box-sizing:border-box;z-index:1;border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;padding:0 16px;font-size:13px;font-weight:500;line-height:20px;transition:color .12s;position:relative}._4Yr7Ka_tab[aria-selected=true]{color:var(--dsw-alias-label-primary)}@media (hover:hover){._4Yr7Ka_tab:hover:not(:disabled){color:var(--dsw-alias-label-primary)}}._4Yr7Ka_tab:disabled{cursor:default;opacity:.4}._4Yr7Ka_tab:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}@media (prefers-reduced-motion:reduce){._4Yr7Ka_indicator,._4Yr7Ka_tab{transition:none}}";
|
|
350
348
|
document.head.appendChild(element);
|
|
351
349
|
}
|
|
352
|
-
var SegmentedControl_module_default = { "
|
|
350
|
+
var SegmentedControl_module_default = { "control": "_4Yr7Ka_control", "indicator": "_4Yr7Ka_indicator", "tab": "_4Yr7Ka_tab" };
|
|
353
351
|
|
|
354
352
|
// src/SegmentedControl.tsx
|
|
355
|
-
import { jsx as
|
|
353
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
356
354
|
function isWalkKey(key) {
|
|
357
355
|
return key === "ArrowLeft" || key === "ArrowRight" || key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End";
|
|
358
356
|
}
|
|
@@ -369,7 +367,7 @@ function walk(options, from, key) {
|
|
|
369
367
|
return void 0;
|
|
370
368
|
}
|
|
371
369
|
function SegmentedControl({
|
|
372
|
-
id:
|
|
370
|
+
id: id21,
|
|
373
371
|
value,
|
|
374
372
|
options,
|
|
375
373
|
onChange,
|
|
@@ -395,18 +393,18 @@ function SegmentedControl({
|
|
|
395
393
|
"--dsh-segment-count": String(options.length),
|
|
396
394
|
"--dsh-segment-index": String(selected)
|
|
397
395
|
};
|
|
398
|
-
return /* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
396
|
+
return /* @__PURE__ */ jsxs4("div", { ref: list, role: "tablist", "aria-label": label, className: clsx6(SegmentedControl_module_default.control, className), style: indicator, children: [
|
|
397
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: SegmentedControl_module_default.indicator }),
|
|
400
398
|
options.map((option) => {
|
|
401
399
|
const active = option.value === value;
|
|
402
|
-
return /* @__PURE__ */
|
|
400
|
+
return /* @__PURE__ */ jsx6(
|
|
403
401
|
"button",
|
|
404
402
|
{
|
|
405
|
-
id: `${
|
|
403
|
+
id: `${id21}-${option.value}`,
|
|
406
404
|
type: "button",
|
|
407
405
|
role: "tab",
|
|
408
406
|
"aria-selected": active,
|
|
409
|
-
"aria-controls": `${
|
|
407
|
+
"aria-controls": `${id21}-${option.value}-panel`,
|
|
410
408
|
tabIndex: active ? 0 : -1,
|
|
411
409
|
disabled: disabled || option.disabled === true,
|
|
412
410
|
title: option.title,
|
|
@@ -424,20 +422,20 @@ function SegmentedControl({
|
|
|
424
422
|
}
|
|
425
423
|
|
|
426
424
|
// src/Checkbox.tsx
|
|
427
|
-
import
|
|
425
|
+
import clsx7 from "clsx";
|
|
428
426
|
|
|
429
427
|
// .build/css/Checkbox.module.mjs
|
|
430
|
-
var
|
|
431
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
428
|
+
var id7 = "@seekbuddy/dsh-ui/Checkbox.module.css";
|
|
429
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id7 + '"]')) {
|
|
432
430
|
const element = document.createElement("style");
|
|
433
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
431
|
+
element.setAttribute("data-dsh-ui-primitives", id7);
|
|
434
432
|
element.textContent = ".-IUgPq_checkbox{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;font-size:14px;line-height:20px;display:inline-flex}.-IUgPq_checkbox input{width:16px;height:16px;accent-color:var(--dsw-alias-brand-primary);cursor:inherit;flex:none;margin:0}.-IUgPq_checkbox input:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.-IUgPq_checkbox:has(input:disabled){cursor:default;opacity:.5}";
|
|
435
433
|
document.head.appendChild(element);
|
|
436
434
|
}
|
|
437
435
|
var Checkbox_module_default = { "checkbox": "-IUgPq_checkbox" };
|
|
438
436
|
|
|
439
437
|
// src/Checkbox.tsx
|
|
440
|
-
import { jsx as
|
|
438
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
441
439
|
function Checkbox({
|
|
442
440
|
checked,
|
|
443
441
|
onChange,
|
|
@@ -446,8 +444,8 @@ function Checkbox({
|
|
|
446
444
|
title,
|
|
447
445
|
className
|
|
448
446
|
}) {
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
447
|
+
return /* @__PURE__ */ jsxs5("label", { className: clsx7(Checkbox_module_default.checkbox, className), title, children: [
|
|
448
|
+
/* @__PURE__ */ jsx7(
|
|
451
449
|
"input",
|
|
452
450
|
{
|
|
453
451
|
type: "checkbox",
|
|
@@ -458,30 +456,30 @@ function Checkbox({
|
|
|
458
456
|
}
|
|
459
457
|
}
|
|
460
458
|
),
|
|
461
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ jsx7("span", { children: label })
|
|
462
460
|
] });
|
|
463
461
|
}
|
|
464
462
|
|
|
465
463
|
// src/Input.tsx
|
|
466
|
-
import { forwardRef
|
|
467
|
-
import
|
|
464
|
+
import { forwardRef } from "react";
|
|
465
|
+
import clsx8 from "clsx";
|
|
468
466
|
|
|
469
467
|
// .build/css/Input.module.mjs
|
|
470
|
-
var
|
|
471
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
468
|
+
var id8 = "@seekbuddy/dsh-ui/Input.module.css";
|
|
469
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id8 + '"]')) {
|
|
472
470
|
const element = document.createElement("style");
|
|
473
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
471
|
+
element.setAttribute("data-dsh-ui-primitives", id8);
|
|
474
472
|
element.textContent = ".ubd6La_wrap{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);align-items:center;gap:6px;height:32px;padding:0 8px;display:inline-flex}.ubd6La_wrap:focus-within{border-color:var(--dsw-alias-state-business-primary)}.ubd6La_icon{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;display:inline-flex}.ubd6La_input{min-width:0;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:1;font-size:14px;line-height:22px}.ubd6La_input::placeholder{color:var(--dsw-alias-label-dimmed)}";
|
|
475
473
|
document.head.appendChild(element);
|
|
476
474
|
}
|
|
477
475
|
var Input_module_default = { "input": "ubd6La_input", "icon": "ubd6La_icon", "wrap": "ubd6La_wrap" };
|
|
478
476
|
|
|
479
477
|
// src/Input.tsx
|
|
480
|
-
import { jsx as
|
|
481
|
-
var Input =
|
|
482
|
-
return /* @__PURE__ */
|
|
483
|
-
icon != null && /* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
478
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
479
|
+
var Input = forwardRef(function Input2({ icon, className, ...rest }, ref) {
|
|
480
|
+
return /* @__PURE__ */ jsxs6("span", { className: clsx8(Input_module_default.wrap, className), children: [
|
|
481
|
+
icon != null && /* @__PURE__ */ jsx8("span", { className: Input_module_default.icon, children: icon }),
|
|
482
|
+
/* @__PURE__ */ jsx8("input", { ref, className: Input_module_default.input, ...rest })
|
|
485
483
|
] });
|
|
486
484
|
});
|
|
487
485
|
|
|
@@ -489,22 +487,22 @@ var Input = forwardRef2(function Input2({ icon, className, ...rest }, ref) {
|
|
|
489
487
|
import { useId } from "react";
|
|
490
488
|
|
|
491
489
|
// .build/css/MenuGroup.module.mjs
|
|
492
|
-
var
|
|
493
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
490
|
+
var id9 = "@seekbuddy/dsh-ui/MenuGroup.module.css";
|
|
491
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id9 + '"]')) {
|
|
494
492
|
const element = document.createElement("style");
|
|
495
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
493
|
+
element.setAttribute("data-dsh-ui-primitives", id9);
|
|
496
494
|
element.textContent = ".EvD5wW_group{position:relative}.EvD5wW_start{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute;top:0;left:0}.EvD5wW_group+.EvD5wW_group{margin-top:3px}.EvD5wW_heading{z-index:1;color:var(--dsw-alias-label-tertiary);background:0 0;padding:4px 7px 2px;font-size:11px;font-weight:500;line-height:16px;position:sticky;top:0}.EvD5wW_heading[data-stuck]{background:var(--dsw-alias-menu-group-header-fill)}html:not([data-platform=darwin]) .EvD5wW_heading{border-radius:var(--dsw-radius-md)}";
|
|
497
495
|
document.head.appendChild(element);
|
|
498
496
|
}
|
|
499
|
-
var MenuGroup_module_default = { "
|
|
497
|
+
var MenuGroup_module_default = { "group": "EvD5wW_group", "start": "EvD5wW_start", "heading": "EvD5wW_heading" };
|
|
500
498
|
|
|
501
499
|
// src/MenuGroup.tsx
|
|
502
|
-
import { jsx as
|
|
500
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
503
501
|
function MenuGroup({ label, children }) {
|
|
504
502
|
const headingId = useId();
|
|
505
|
-
return /* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ jsxs7("section", { role: "group", "aria-labelledby": headingId, "data-menu-group": "", className: MenuGroup_module_default.group, children: [
|
|
504
|
+
/* @__PURE__ */ jsx9("span", { "aria-hidden": "true", "data-menu-group-start": "", className: MenuGroup_module_default.start }),
|
|
505
|
+
/* @__PURE__ */ jsx9("div", { id: headingId, "data-menu-group-heading": "", className: MenuGroup_module_default.heading, children: label }),
|
|
508
506
|
children
|
|
509
507
|
] });
|
|
510
508
|
}
|
|
@@ -616,63 +614,23 @@ function useAnchoredMaxHeight(ref, cap, signal, margin = MARGIN) {
|
|
|
616
614
|
return maxHeight;
|
|
617
615
|
}
|
|
618
616
|
|
|
619
|
-
// src/useAnchoredPosition.ts
|
|
620
|
-
import { useLayoutEffect as useLayoutEffect2, useState as useState2 } from "react";
|
|
621
|
-
function useAnchoredPosition(options) {
|
|
622
|
-
const { open, anchorRef, panelRef, side = "bottom", align = "start", gap, margin } = options;
|
|
623
|
-
const [position, setPosition] = useState2(null);
|
|
624
|
-
useLayoutEffect2(() => {
|
|
625
|
-
if (!open) {
|
|
626
|
-
setPosition(null);
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
const place = () => {
|
|
630
|
-
const rect = anchorRef.current?.getBoundingClientRect();
|
|
631
|
-
if (rect === void 0) return;
|
|
632
|
-
const panel2 = panelRef.current;
|
|
633
|
-
const width = panel2?.offsetWidth ?? 0;
|
|
634
|
-
const height = panel2?.offsetHeight ?? 0;
|
|
635
|
-
let left = align === "end" ? rect.right - width : rect.left;
|
|
636
|
-
let top = side === "top" ? rect.top - gap - height : rect.bottom + gap;
|
|
637
|
-
if (width > 0) left = Math.min(Math.max(left, margin), window.innerWidth - width - margin);
|
|
638
|
-
if (height > 0) top = Math.min(Math.max(top, overlayTopMargin(margin)), window.innerHeight - height - margin);
|
|
639
|
-
setPosition({ left, top });
|
|
640
|
-
};
|
|
641
|
-
place();
|
|
642
|
-
window.addEventListener("scroll", place, true);
|
|
643
|
-
window.addEventListener("resize", place);
|
|
644
|
-
const panel = panelRef.current;
|
|
645
|
-
let observer = null;
|
|
646
|
-
if (typeof ResizeObserver !== "undefined" && panel !== null) {
|
|
647
|
-
observer = new ResizeObserver(place);
|
|
648
|
-
observer.observe(panel);
|
|
649
|
-
}
|
|
650
|
-
return () => {
|
|
651
|
-
observer?.disconnect();
|
|
652
|
-
window.removeEventListener("scroll", place, true);
|
|
653
|
-
window.removeEventListener("resize", place);
|
|
654
|
-
};
|
|
655
|
-
}, [open, anchorRef, panelRef, side, align, gap, margin]);
|
|
656
|
-
return position;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
617
|
// src/Modal.tsx
|
|
660
618
|
import { useRef as useRef2 } from "react";
|
|
661
619
|
import { createPortal } from "react-dom";
|
|
662
|
-
import
|
|
620
|
+
import clsx9 from "clsx";
|
|
663
621
|
|
|
664
622
|
// .build/css/Modal.module.mjs
|
|
665
|
-
var
|
|
666
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
623
|
+
var id10 = "@seekbuddy/dsh-ui/Modal.module.css";
|
|
624
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id10 + '"]')) {
|
|
667
625
|
const element = document.createElement("style");
|
|
668
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
669
|
-
element.textContent = '.yOh8dq_root{pointer-events:auto;z-index:1000;padding:max(24px, var(--dsh-frame-overlay-top,24px)) 24px;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.yOh8dq_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;backdrop-filter:var(--dsw-mask-blur);position:absolute}.yOh8dq_mask:after{content:"";background:var(--dsw-alias-bg-mask-1);animation:yOh8dq_modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);position:absolute;inset:0}.yOh8dq_dialog{box-sizing:border-box;z-index:1;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);width:min(380px,100%);box-shadow:var(--dsw-elevation-prominent);animation:yOh8dq_modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);border:0;flex-direction:column;gap:20px;padding:0 0 24px;display:flex;position:relative;overflow:hidden}@keyframes yOh8dq_modalEnter{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.yOh8dq_mask:after,.yOh8dq_dialog{animation:none}}.yOh8dq_dialog:focus{outline:none}.yOh8dq_content{flex-direction:column;width:100%;display:flex}.yOh8dq_header{justify-content:space-between;align-items:center;gap:8px;padding:22px 14px 12px 24px;display:flex}.yOh8dq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.yOh8dq_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;display:inline-flex}.yOh8dq_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.yOh8dq_description{color:var(--dsw-alias-label-primary);margin:0;padding:0 24px;font-size:14px;font-weight:400;line-height:22px}.yOh8dq_body{flex-direction:column;min-width:0;margin-top:20px;padding:0 24px;display:flex}.yOh8dq_footer{justify-content:flex-end;align-items:center;gap:8px;padding:0 24px;display:flex}';
|
|
626
|
+
element.setAttribute("data-dsh-ui-primitives", id10);
|
|
627
|
+
element.textContent = '.yOh8dq_root{pointer-events:auto;z-index:1000;padding:max(24px, var(--dsh-frame-overlay-top,24px)) 24px;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.yOh8dq_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;backdrop-filter:var(--dsw-mask-blur);position:absolute}.yOh8dq_mask:after{content:"";background:var(--dsw-alias-bg-mask-1);animation:yOh8dq_modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);position:absolute;inset:0}.yOh8dq_dialog{box-sizing:border-box;z-index:1;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);width:min(380px,100%);box-shadow:var(--dsw-elevation-prominent);animation:yOh8dq_modalEnter var(--ds-transition-duration) var(--ds-ease-in-out);border:0;flex-direction:column;gap:20px;padding:0 0 24px;display:flex;position:relative;overflow:hidden}@keyframes yOh8dq_modalEnter{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.yOh8dq_mask:after,.yOh8dq_dialog{animation:none}}.yOh8dq_dialog:focus{outline:none}.yOh8dq_content{flex-direction:column;width:100%;display:flex}.yOh8dq_header{justify-content:space-between;align-items:center;gap:8px;padding:22px 14px 12px 24px;display:flex}.yOh8dq_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.yOh8dq_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;display:inline-flex}@media (hover:hover){.yOh8dq_close:hover{background:var(--dsw-alias-interactive-bg-hover)}}.yOh8dq_description{color:var(--dsw-alias-label-primary);margin:0;padding:0 24px;font-size:14px;font-weight:400;line-height:22px}.yOh8dq_body{flex-direction:column;min-width:0;margin-top:20px;padding:0 24px;display:flex}.yOh8dq_footer{justify-content:flex-end;align-items:center;gap:8px;padding:0 24px;display:flex}';
|
|
670
628
|
document.head.appendChild(element);
|
|
671
629
|
}
|
|
672
|
-
var Modal_module_default = { "
|
|
630
|
+
var Modal_module_default = { "dialog": "yOh8dq_dialog", "mask": "yOh8dq_mask", "content": "yOh8dq_content", "close": "yOh8dq_close", "footer": "yOh8dq_footer", "body": "yOh8dq_body", "title": "yOh8dq_title", "header": "yOh8dq_header", "root": "yOh8dq_root", "modalEnter": "yOh8dq_modalEnter", "description": "yOh8dq_description" };
|
|
673
631
|
|
|
674
632
|
// src/Modal.tsx
|
|
675
|
-
import { Fragment as Fragment2, jsx as
|
|
633
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
676
634
|
function Modal({
|
|
677
635
|
open,
|
|
678
636
|
onClose,
|
|
@@ -692,8 +650,8 @@ function Modal({
|
|
|
692
650
|
useModalLayer(dialog, open, onClose);
|
|
693
651
|
if (!open) return null;
|
|
694
652
|
return createPortal(
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ jsxs8("div", { className: Modal_module_default.root, role: "presentation", onKeyDownCapture, children: [
|
|
654
|
+
/* @__PURE__ */ jsx10(
|
|
697
655
|
"div",
|
|
698
656
|
{
|
|
699
657
|
className: Modal_module_default.mask,
|
|
@@ -702,26 +660,26 @@ function Modal({
|
|
|
702
660
|
onClick: onClose
|
|
703
661
|
}
|
|
704
662
|
),
|
|
705
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ jsx10(
|
|
706
664
|
"div",
|
|
707
665
|
{
|
|
708
666
|
ref: dialog,
|
|
709
667
|
tabIndex: -1,
|
|
710
668
|
"data-shortcut-modal": shortcutModal,
|
|
711
|
-
className:
|
|
669
|
+
className: clsx9(Modal_module_default.dialog, className),
|
|
712
670
|
role: "dialog",
|
|
713
671
|
"aria-modal": "true",
|
|
714
672
|
"aria-label": title,
|
|
715
|
-
children: headless ? children : /* @__PURE__ */
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
673
|
+
children: headless ? children : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
674
|
+
/* @__PURE__ */ jsxs8("div", { className: clsx9(Modal_module_default.content, contentClassName), children: [
|
|
675
|
+
/* @__PURE__ */ jsxs8("div", { className: Modal_module_default.header, children: [
|
|
676
|
+
/* @__PURE__ */ jsx10("h2", { className: Modal_module_default.title, children: title }),
|
|
677
|
+
/* @__PURE__ */ jsx10("button", { type: "button", className: Modal_module_default.close, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx10(IconCloseOutlineRegular, { size: 14 }) })
|
|
720
678
|
] }),
|
|
721
|
-
description !== void 0 && description !== "" && /* @__PURE__ */
|
|
722
|
-
children !== void 0 && /* @__PURE__ */
|
|
679
|
+
description !== void 0 && description !== "" && /* @__PURE__ */ jsx10("p", { className: Modal_module_default.description, children: description }),
|
|
680
|
+
children !== void 0 && /* @__PURE__ */ jsx10("div", { className: Modal_module_default.body, children })
|
|
723
681
|
] }),
|
|
724
|
-
footer !== void 0 && /* @__PURE__ */
|
|
682
|
+
footer !== void 0 && /* @__PURE__ */ jsx10("div", { className: Modal_module_default.footer, children: footer })
|
|
725
683
|
] })
|
|
726
684
|
}
|
|
727
685
|
)
|
|
@@ -731,17 +689,17 @@ function Modal({
|
|
|
731
689
|
}
|
|
732
690
|
|
|
733
691
|
// .build/css/RiskConfirmation.module.mjs
|
|
734
|
-
var
|
|
735
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
692
|
+
var id11 = "@seekbuddy/dsh-ui/RiskConfirmation.module.css";
|
|
693
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id11 + '"]')) {
|
|
736
694
|
const element = document.createElement("style");
|
|
737
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
695
|
+
element.setAttribute("data-dsh-ui-primitives", id11);
|
|
738
696
|
element.textContent = ".scdcKa_confirmation{width:min(440px,100%);max-height:100%;overflow:hidden}.scdcKa_confirmationContent{overscroll-behavior:contain;min-height:0;overflow-y:auto}@supports (height:100dvh){.scdcKa_confirmation{max-height:calc(100dvh - 48px)}}.scdcKa_warning{color:var(--dsw-alias-label-secondary);align-items:flex-start;gap:10px;font-size:14px;line-height:22px;display:flex}.scdcKa_warning p{margin:0}.scdcKa_warningIcon{color:var(--dsw-alias-state-error-primary);flex:none;margin-top:2px}.scdcKa_acknowledgement{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:flex-start;gap:10px;margin-top:20px;font-size:14px;line-height:22px;display:flex}.scdcKa_acknowledgement input{width:16px;height:16px;accent-color:var(--dsw-alias-button-primary-fill);cursor:pointer;flex:none;margin:3px 0 0}.scdcKa_acknowledgement input:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.scdcKa_acknowledgement input:disabled{cursor:default}.scdcKa_modalAction{min-width:72px}.scdcKa_confirmAction{min-width:136px}";
|
|
739
697
|
document.head.appendChild(element);
|
|
740
698
|
}
|
|
741
|
-
var RiskConfirmation_module_default = { "
|
|
699
|
+
var RiskConfirmation_module_default = { "confirmation": "scdcKa_confirmation", "warningIcon": "scdcKa_warningIcon", "acknowledgement": "scdcKa_acknowledgement", "modalAction": "scdcKa_modalAction", "warning": "scdcKa_warning", "confirmationContent": "scdcKa_confirmationContent", "confirmAction": "scdcKa_confirmAction" };
|
|
742
700
|
|
|
743
701
|
// src/RiskConfirmation.tsx
|
|
744
|
-
import { Fragment as Fragment3, jsx as
|
|
702
|
+
import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
745
703
|
function RiskConfirmation({
|
|
746
704
|
open,
|
|
747
705
|
title,
|
|
@@ -756,7 +714,7 @@ function RiskConfirmation({
|
|
|
756
714
|
onCancel,
|
|
757
715
|
onConfirm
|
|
758
716
|
}) {
|
|
759
|
-
return /* @__PURE__ */
|
|
717
|
+
return /* @__PURE__ */ jsxs9(
|
|
760
718
|
Modal,
|
|
761
719
|
{
|
|
762
720
|
open,
|
|
@@ -765,9 +723,9 @@ function RiskConfirmation({
|
|
|
765
723
|
closeLabel,
|
|
766
724
|
className: RiskConfirmation_module_default.confirmation ?? "",
|
|
767
725
|
contentClassName: RiskConfirmation_module_default.confirmationContent ?? "",
|
|
768
|
-
footer: /* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
726
|
+
footer: /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
727
|
+
/* @__PURE__ */ jsx11(Button, { variant: "outline", className: RiskConfirmation_module_default.modalAction, onClick: onCancel, children: cancelLabel }),
|
|
728
|
+
/* @__PURE__ */ jsx11(
|
|
771
729
|
Button,
|
|
772
730
|
{
|
|
773
731
|
variant: "primary",
|
|
@@ -779,12 +737,12 @@ function RiskConfirmation({
|
|
|
779
737
|
)
|
|
780
738
|
] }),
|
|
781
739
|
children: [
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ jsxs9("div", { className: RiskConfirmation_module_default.warning, children: [
|
|
741
|
+
/* @__PURE__ */ jsx11(IconWarningOutlineRegular, { size: 18, className: RiskConfirmation_module_default.warningIcon }),
|
|
742
|
+
/* @__PURE__ */ jsx11("p", { children: description })
|
|
785
743
|
] }),
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ jsxs9("label", { className: RiskConfirmation_module_default.acknowledgement, children: [
|
|
745
|
+
/* @__PURE__ */ jsx11(
|
|
788
746
|
"input",
|
|
789
747
|
{
|
|
790
748
|
type: "checkbox",
|
|
@@ -796,7 +754,7 @@ function RiskConfirmation({
|
|
|
796
754
|
}
|
|
797
755
|
}
|
|
798
756
|
),
|
|
799
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ jsx11("span", { children: acknowledgeLabel })
|
|
800
758
|
] })
|
|
801
759
|
]
|
|
802
760
|
}
|
|
@@ -804,20 +762,20 @@ function RiskConfirmation({
|
|
|
804
762
|
}
|
|
805
763
|
|
|
806
764
|
// src/ConnectionIndicator.tsx
|
|
807
|
-
import { useEffect as useEffect2, useState as
|
|
765
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
808
766
|
|
|
809
767
|
// .build/css/ConnectionIndicator.module.mjs
|
|
810
|
-
var
|
|
811
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
768
|
+
var id12 = "@seekbuddy/dsh-ui/ConnectionIndicator.module.css";
|
|
769
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id12 + '"]')) {
|
|
812
770
|
const element = document.createElement("style");
|
|
813
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
814
|
-
element.textContent = ".WjD5zG_indicator{box-sizing:border-box;border-radius:var(--dsw-radius-sm);white-space:nowrap;border:1px solid #0000;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;height:28px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;transition:background-color .16s ease-out,color .16s ease-out,border-color .16s ease-out,opacity .15s ease-out;animation:.15s ease-out WjD5zG_indicator-enter;display:inline-grid}.WjD5zG_leaving{opacity:0}@keyframes WjD5zG_indicator-enter{0%{opacity:0}}.WjD5zG_warning{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label);border-color:color-mix(in srgb, var(--dsw-alias-state-warn-label) 20%, transparent);cursor:pointer}.WjD5zG_warning:hover{background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary), var(--dsw-alias-state-warn-primary) 6%)}.WjD5zG_warning:active{background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary), var(--dsw-alias-state-warn-primary) 10%)}.WjD5zG_warning:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.WjD5zG_success{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 20%, transparent)}.WjD5zG_icon{place-items:center;width:14px;height:14px;display:grid}.WjD5zG_icon>svg{color:inherit}.WjD5zG_label{text-align:left}.WjD5zG_dots{text-align:left;width:1em;display:inline-block}.WjD5zG_secondDot{animation:1.5s step-end infinite WjD5zG_reveal-second-dot}.WjD5zG_thirdDot{animation:1.5s step-end infinite WjD5zG_reveal-third-dot}@keyframes WjD5zG_reveal-second-dot{0%,33.32%{opacity:0}33.33%,to{opacity:1}}@keyframes WjD5zG_reveal-third-dot{0%,66.65%{opacity:0}66.66%,to{opacity:1}}@media (prefers-reduced-motion:reduce){.WjD5zG_indicator,.WjD5zG_secondDot,.WjD5zG_thirdDot{animation:none}.WjD5zG_indicator{transition:none}}";
|
|
771
|
+
element.setAttribute("data-dsh-ui-primitives", id12);
|
|
772
|
+
element.textContent = ".WjD5zG_indicator{box-sizing:border-box;border-radius:var(--dsw-radius-sm);white-space:nowrap;border:1px solid #0000;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;height:28px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;transition:background-color .16s ease-out,color .16s ease-out,border-color .16s ease-out,opacity .15s ease-out;animation:.15s ease-out WjD5zG_indicator-enter;display:inline-grid}.WjD5zG_leaving{opacity:0}@keyframes WjD5zG_indicator-enter{0%{opacity:0}}.WjD5zG_warning{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label);border-color:color-mix(in srgb, var(--dsw-alias-state-warn-label) 20%, transparent);cursor:pointer}@media (hover:hover){.WjD5zG_warning:hover{background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary), var(--dsw-alias-state-warn-primary) 6%)}}.WjD5zG_warning:active{background:color-mix(in srgb, var(--dsw-alias-state-warn-tertiary), var(--dsw-alias-state-warn-primary) 10%)}.WjD5zG_warning:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.WjD5zG_success{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary);border-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 20%, transparent)}.WjD5zG_icon{place-items:center;width:14px;height:14px;display:grid}.WjD5zG_icon>svg{color:inherit}.WjD5zG_label{text-align:left}.WjD5zG_dots{text-align:left;width:1em;display:inline-block}.WjD5zG_secondDot{animation:1.5s step-end infinite WjD5zG_reveal-second-dot}.WjD5zG_thirdDot{animation:1.5s step-end infinite WjD5zG_reveal-third-dot}@keyframes WjD5zG_reveal-second-dot{0%,33.32%{opacity:0}33.33%,to{opacity:1}}@keyframes WjD5zG_reveal-third-dot{0%,66.65%{opacity:0}66.66%,to{opacity:1}}@media (prefers-reduced-motion:reduce){.WjD5zG_indicator,.WjD5zG_secondDot,.WjD5zG_thirdDot{animation:none}.WjD5zG_indicator{transition:none}}";
|
|
815
773
|
document.head.appendChild(element);
|
|
816
774
|
}
|
|
817
|
-
var ConnectionIndicator_module_default = { "
|
|
775
|
+
var ConnectionIndicator_module_default = { "indicator-enter": "WjD5zG_indicator-enter", "indicator": "WjD5zG_indicator", "dots": "WjD5zG_dots", "secondDot": "WjD5zG_secondDot", "leaving": "WjD5zG_leaving", "label": "WjD5zG_label", "warning": "WjD5zG_warning", "success": "WjD5zG_success", "thirdDot": "WjD5zG_thirdDot", "reveal-third-dot": "WjD5zG_reveal-third-dot", "reveal-second-dot": "WjD5zG_reveal-second-dot", "icon": "WjD5zG_icon" };
|
|
818
776
|
|
|
819
777
|
// src/ConnectionIndicator.tsx
|
|
820
|
-
import { Fragment as Fragment4, jsx as
|
|
778
|
+
import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
821
779
|
var EXIT_MS = 150;
|
|
822
780
|
function ConnectionIndicator({
|
|
823
781
|
state,
|
|
@@ -828,7 +786,7 @@ function ConnectionIndicator({
|
|
|
828
786
|
restartActionLabel,
|
|
829
787
|
onReconnect
|
|
830
788
|
}) {
|
|
831
|
-
const [rendered, setRendered] =
|
|
789
|
+
const [rendered, setRendered] = useState2(state);
|
|
832
790
|
const leaving = state === void 0 && rendered !== void 0;
|
|
833
791
|
useEffect2(() => {
|
|
834
792
|
if (state !== void 0) {
|
|
@@ -846,13 +804,13 @@ function ConnectionIndicator({
|
|
|
846
804
|
if (rendered === void 0) return null;
|
|
847
805
|
const leavingClass = leaving ? ` ${ConnectionIndicator_module_default.leaving}` : "";
|
|
848
806
|
if (rendered === "recovered") {
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ jsxs10("div", { className: `${ConnectionIndicator_module_default.indicator} ${ConnectionIndicator_module_default.success}${leavingClass}`, role: "status", "aria-label": recoveredLabel, children: [
|
|
808
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.icon, "aria-hidden": "true", children: /* @__PURE__ */ jsx12(IconCheckOutlineRegular, { size: 14 }) }),
|
|
809
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.label, children: recoveredLabel })
|
|
852
810
|
] });
|
|
853
811
|
}
|
|
854
812
|
const connecting = rendered === "connecting";
|
|
855
|
-
return /* @__PURE__ */
|
|
813
|
+
return /* @__PURE__ */ jsxs10(
|
|
856
814
|
"button",
|
|
857
815
|
{
|
|
858
816
|
type: "button",
|
|
@@ -861,13 +819,13 @@ function ConnectionIndicator({
|
|
|
861
819
|
"aria-label": connecting ? restartActionLabel : reconnectActionLabel,
|
|
862
820
|
onClick: onReconnect,
|
|
863
821
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.icon, "aria-hidden": "true", children: connecting ? /* @__PURE__ */ jsx12(StateDot, { state: "ongoing" }) : /* @__PURE__ */ jsx12(IconRefreshOutlineRegular, { size: 14 }) }),
|
|
823
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.label, children: connecting ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
866
824
|
connectingLabel,
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ jsxs10("span", { className: ConnectionIndicator_module_default.dots, "aria-hidden": "true", children: [
|
|
826
|
+
/* @__PURE__ */ jsx12("span", { children: "." }),
|
|
827
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.secondDot, children: "." }),
|
|
828
|
+
/* @__PURE__ */ jsx12("span", { className: ConnectionIndicator_module_default.thirdDot, children: "." })
|
|
871
829
|
] })
|
|
872
830
|
] }) : disconnectedLabel })
|
|
873
831
|
]
|
|
@@ -876,120 +834,642 @@ function ConnectionIndicator({
|
|
|
876
834
|
}
|
|
877
835
|
|
|
878
836
|
// src/user-text.tsx
|
|
879
|
-
import
|
|
837
|
+
import clsx10 from "clsx";
|
|
880
838
|
|
|
881
839
|
// .build/css/user-text.module.mjs
|
|
882
|
-
var
|
|
883
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
840
|
+
var id13 = "@seekbuddy/dsh-ui/user-text.module.css";
|
|
841
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id13 + '"]')) {
|
|
884
842
|
const element = document.createElement("style");
|
|
885
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
843
|
+
element.setAttribute("data-dsh-ui-primitives", id13);
|
|
886
844
|
element.textContent = "._3EOulq_plainRun{font-size:inherit;line-height:inherit}._3EOulq_refChip{max-width:100%;color:var(--dsw-alias-state-business-primary);white-space:inherit;overflow-wrap:anywhere;text-align:inherit;margin:0 2px;font-weight:500;display:inline}._3EOulq_slashChip{font-family:var(--dsw-font-markdown-code-font-family)}._3EOulq_refIcon{vertical-align:-.125em;width:1em;height:1em;margin-right:4px}";
|
|
887
845
|
document.head.appendChild(element);
|
|
888
846
|
}
|
|
889
|
-
var user_text_module_default = { "plainRun": "_3EOulq_plainRun", "refChip": "_3EOulq_refChip", "
|
|
847
|
+
var user_text_module_default = { "plainRun": "_3EOulq_plainRun", "refChip": "_3EOulq_refChip", "refIcon": "_3EOulq_refIcon", "slashChip": "_3EOulq_slashChip" };
|
|
890
848
|
|
|
891
849
|
// src/user-text.tsx
|
|
892
|
-
import { Fragment as Fragment5, jsx as
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
850
|
+
import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
851
|
+
function UserTextRun({ text }) {
|
|
852
|
+
return /* @__PURE__ */ jsx13("span", { className: user_text_module_default.plainRun, children: text });
|
|
853
|
+
}
|
|
854
|
+
function ReferenceChip({
|
|
855
|
+
appearance,
|
|
856
|
+
label,
|
|
857
|
+
title,
|
|
858
|
+
onActivate,
|
|
859
|
+
contextMenuProps
|
|
860
|
+
}) {
|
|
861
|
+
const slash = appearance === "skill" || appearance === "command";
|
|
862
|
+
const contents = /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
863
|
+
!slash && /* @__PURE__ */ jsx13(ReferenceIconRegular, { kind: appearance, size: 16, className: user_text_module_default.refIcon }),
|
|
864
|
+
label
|
|
865
|
+
] });
|
|
866
|
+
const className = clsx10(user_text_module_default.refChip, slash && user_text_module_default.slashChip);
|
|
867
|
+
return onActivate === void 0 ? /* @__PURE__ */ jsx13("span", { ...contextMenuProps, className, "data-ref-chip": appearance, title, children: contents }) : /* @__PURE__ */ jsx13(
|
|
868
|
+
"button",
|
|
869
|
+
{
|
|
870
|
+
type: "button",
|
|
871
|
+
...contextMenuProps,
|
|
872
|
+
className: clsx10(className, MarkdownText_module_default.fileMention),
|
|
873
|
+
"data-ref-chip": appearance,
|
|
874
|
+
title,
|
|
875
|
+
onClick: (event) => {
|
|
876
|
+
if (event.detail > 1 || event.detail !== 0 && event.currentTarget.ownerDocument.getSelection()?.isCollapsed === false)
|
|
877
|
+
return;
|
|
878
|
+
onActivate();
|
|
879
|
+
},
|
|
880
|
+
children: contents
|
|
881
|
+
}
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
// src/UserMessageBubble.tsx
|
|
886
|
+
import clsx11 from "clsx";
|
|
887
|
+
|
|
888
|
+
// .build/css/UserMessageBubble.module.mjs
|
|
889
|
+
var id14 = "@seekbuddy/dsh-ui/UserMessageBubble.module.css";
|
|
890
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id14 + '"]')) {
|
|
891
|
+
const element = document.createElement("style");
|
|
892
|
+
element.setAttribute("data-dsh-ui-primitives", id14);
|
|
893
|
+
element.textContent = "._5Yr1MW_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}";
|
|
894
|
+
document.head.appendChild(element);
|
|
895
|
+
}
|
|
896
|
+
var UserMessageBubble_module_default = { "bubble": "_5Yr1MW_bubble" };
|
|
897
|
+
|
|
898
|
+
// src/UserMessageBubble.tsx
|
|
899
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
900
|
+
function UserMessageBubble({ className, ...props }) {
|
|
901
|
+
return /* @__PURE__ */ jsx14("div", { ...props, className: clsx11(UserMessageBubble_module_default.bubble, className) });
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// src/AnimatedRows.tsx
|
|
905
|
+
import { Component, createRef } from "react";
|
|
906
|
+
|
|
907
|
+
// .build/css/AnimatedRows.module.mjs
|
|
908
|
+
var id15 = "@seekbuddy/dsh-ui/AnimatedRows.module.css";
|
|
909
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id15 + '"]')) {
|
|
910
|
+
const element = document.createElement("style");
|
|
911
|
+
element.setAttribute("data-dsh-ui-primitives", id15);
|
|
912
|
+
element.textContent = ".cJwyhW_exits{contain:strict;pointer-events:none;position:absolute;inset:0;overflow:clip}";
|
|
913
|
+
document.head.appendChild(element);
|
|
914
|
+
}
|
|
915
|
+
var AnimatedRows_module_default = { "exits": "cJwyhW_exits" };
|
|
916
|
+
|
|
917
|
+
// src/AnimatedRows.tsx
|
|
918
|
+
import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
919
|
+
var ROW_FADE_MS = 100;
|
|
920
|
+
var ROW_GLIDE_MS = 200;
|
|
921
|
+
function sameRows(previous, next) {
|
|
922
|
+
return previous.rowKeys.length === next.rowKeys.length && previous.rowKeys.every((key, index) => key === next.rowKeys[index]);
|
|
923
|
+
}
|
|
924
|
+
function intersects(row, viewport) {
|
|
925
|
+
return row.bottom > viewport.top && row.top < viewport.bottom && row.right > viewport.left && row.left < viewport.right;
|
|
926
|
+
}
|
|
927
|
+
var AnimatedRows = class extends Component {
|
|
928
|
+
constructor() {
|
|
929
|
+
super(...arguments);
|
|
930
|
+
__publicField(this, "armed", false);
|
|
931
|
+
__publicField(this, "list", createRef());
|
|
932
|
+
__publicField(this, "overlay", createRef());
|
|
933
|
+
__publicField(this, "movements", /* @__PURE__ */ new Map());
|
|
934
|
+
__publicField(this, "exits", /* @__PURE__ */ new Map());
|
|
935
|
+
}
|
|
936
|
+
getSnapshotBeforeUpdate(previous) {
|
|
937
|
+
const list = this.list.current;
|
|
938
|
+
if (!this.armed || sameRows(previous, this.props) || previous.resetKey !== this.props.resetKey || !previous.ready || !this.props.ready || list === null || typeof list.animate !== "function" || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
939
|
+
return null;
|
|
940
|
+
const viewport = list.getBoundingClientRect();
|
|
941
|
+
const positions = this.readPositions();
|
|
942
|
+
const nextKeys = new Set(this.props.rowKeys);
|
|
943
|
+
const removed = /* @__PURE__ */ new Map();
|
|
944
|
+
for (const [key, row] of positions) {
|
|
945
|
+
if (nextKeys.has(key) || !intersects(row.rect, viewport)) continue;
|
|
946
|
+
const clone = row.element.cloneNode(true);
|
|
947
|
+
clone.removeAttribute("data-row-key");
|
|
948
|
+
clone.inert = true;
|
|
949
|
+
clone.style.paddingInlineStart = getComputedStyle(row.element).paddingInlineStart;
|
|
950
|
+
removed.set(key, { ...row, element: clone });
|
|
951
|
+
}
|
|
952
|
+
return { positions, removed };
|
|
908
953
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
954
|
+
componentDidUpdate(previous, _state, snapshot) {
|
|
955
|
+
if (snapshot === null) {
|
|
956
|
+
if (!sameRows(previous, this.props) || previous.resetKey !== this.props.resetKey || previous.ready !== this.props.ready)
|
|
957
|
+
this.clear();
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
this.cancelMovements();
|
|
961
|
+
const list = this.list.current;
|
|
962
|
+
const overlay = this.overlay.current;
|
|
963
|
+
const viewport = list.getBoundingClientRect();
|
|
964
|
+
const origin = overlay.getBoundingClientRect();
|
|
965
|
+
const positions = this.readPositions();
|
|
966
|
+
for (const [key, row] of positions) {
|
|
967
|
+
this.removeExit(key);
|
|
968
|
+
const previousRow = snapshot.positions.get(key);
|
|
969
|
+
if (!intersects(row.rect, viewport) && (previousRow === void 0 || !intersects(previousRow.rect, viewport)))
|
|
970
|
+
continue;
|
|
971
|
+
if (previousRow === void 0) {
|
|
972
|
+
this.move(row.element, [{ opacity: 0 }, { opacity: 1 }], ROW_FADE_MS);
|
|
973
|
+
continue;
|
|
974
|
+
}
|
|
975
|
+
const dx = previousRow.rect.left - row.rect.left;
|
|
976
|
+
const dy = previousRow.rect.top - row.rect.top;
|
|
977
|
+
if (dx === 0 && dy === 0 && previousRow.opacity === 1) continue;
|
|
978
|
+
this.move(
|
|
979
|
+
row.element,
|
|
980
|
+
[
|
|
981
|
+
{ transform: `translate(${String(dx)}px, ${String(dy)}px)`, opacity: previousRow.opacity },
|
|
982
|
+
{ transform: "translate(0, 0)", opacity: 1 }
|
|
983
|
+
],
|
|
984
|
+
ROW_GLIDE_MS
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
for (const [key, row] of snapshot.removed) {
|
|
988
|
+
const { element } = row;
|
|
989
|
+
this.removeExit(key);
|
|
990
|
+
Object.assign(element.style, {
|
|
991
|
+
position: "absolute",
|
|
992
|
+
margin: "0",
|
|
993
|
+
transform: "none",
|
|
994
|
+
boxSizing: "border-box",
|
|
995
|
+
left: `${String(row.rect.left - origin.left)}px`,
|
|
996
|
+
top: `${String(row.rect.top - origin.top)}px`,
|
|
997
|
+
width: `${String(row.rect.width)}px`,
|
|
998
|
+
height: `${String(row.rect.height)}px`
|
|
999
|
+
});
|
|
1000
|
+
overlay.append(element);
|
|
1001
|
+
const animation = element.animate([{ opacity: row.opacity }, { opacity: 0 }], {
|
|
1002
|
+
duration: ROW_FADE_MS,
|
|
1003
|
+
easing: "ease-out",
|
|
1004
|
+
fill: "forwards"
|
|
1005
|
+
});
|
|
1006
|
+
this.exits.set(key, { element, animation });
|
|
1007
|
+
animation.onfinish = () => {
|
|
1008
|
+
this.removeExit(key);
|
|
1009
|
+
};
|
|
915
1010
|
}
|
|
916
1011
|
}
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
while ((m = re.exec(text)) !== null) {
|
|
920
|
-
const tokenStart = m.index + m[1].length;
|
|
921
|
-
const rawLabel = m[2];
|
|
922
|
-
const label = rawLabel.startsWith('@"') ? rawLabel : rawLabel.replace(TRAILING_PUNCTUATION_RE, "");
|
|
923
|
-
if (label.length <= 1) continue;
|
|
924
|
-
if (label.startsWith("/") && !slashNames.includes(label.slice(1))) continue;
|
|
925
|
-
ranges.push({ start: tokenStart, end: tokenStart + label.length, label, kind: "plain" });
|
|
1012
|
+
componentWillUnmount() {
|
|
1013
|
+
this.clear();
|
|
926
1014
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1015
|
+
readPositions() {
|
|
1016
|
+
const list = this.list.current;
|
|
1017
|
+
const rows = list.querySelectorAll("[data-row-key]");
|
|
1018
|
+
return new Map(
|
|
1019
|
+
Array.from(rows, (element) => [
|
|
1020
|
+
element.dataset.rowKey,
|
|
1021
|
+
{
|
|
1022
|
+
element,
|
|
1023
|
+
rect: element.getBoundingClientRect(),
|
|
1024
|
+
opacity: this.movements.has(element) ? Number(getComputedStyle(element).opacity) : 1
|
|
1025
|
+
}
|
|
1026
|
+
])
|
|
934
1027
|
);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1028
|
+
}
|
|
1029
|
+
move(element, keyframes, duration) {
|
|
1030
|
+
const animation = element.animate(keyframes, { duration, easing: "ease-out" });
|
|
1031
|
+
this.movements.set(element, animation);
|
|
1032
|
+
animation.onfinish = () => {
|
|
1033
|
+
this.movements.delete(element);
|
|
1034
|
+
animation.cancel();
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
cancelMovements() {
|
|
1038
|
+
for (const animation of this.movements.values()) {
|
|
1039
|
+
animation.onfinish = null;
|
|
1040
|
+
animation.cancel();
|
|
1041
|
+
}
|
|
1042
|
+
this.movements.clear();
|
|
1043
|
+
}
|
|
1044
|
+
removeExit(key) {
|
|
1045
|
+
const exit = this.exits.get(key);
|
|
1046
|
+
if (exit === void 0) return;
|
|
1047
|
+
exit.animation.onfinish = null;
|
|
1048
|
+
exit.animation.cancel();
|
|
1049
|
+
exit.element.remove();
|
|
1050
|
+
this.exits.delete(key);
|
|
1051
|
+
}
|
|
1052
|
+
clear() {
|
|
1053
|
+
this.cancelMovements();
|
|
1054
|
+
for (const key of this.exits.keys()) this.removeExit(key);
|
|
1055
|
+
}
|
|
1056
|
+
render() {
|
|
1057
|
+
return /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
1058
|
+
/* @__PURE__ */ jsx15(
|
|
1059
|
+
"div",
|
|
955
1060
|
{
|
|
956
|
-
|
|
957
|
-
className:
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
return;
|
|
963
|
-
open();
|
|
1061
|
+
ref: this.list,
|
|
1062
|
+
className: this.props.className,
|
|
1063
|
+
role: this.props.role,
|
|
1064
|
+
"aria-label": this.props.label,
|
|
1065
|
+
onPointerDownCapture: () => {
|
|
1066
|
+
this.armed = true;
|
|
964
1067
|
},
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1068
|
+
onKeyDownCapture: () => {
|
|
1069
|
+
this.armed = true;
|
|
1070
|
+
},
|
|
1071
|
+
children: this.props.children
|
|
1072
|
+
}
|
|
1073
|
+
),
|
|
1074
|
+
/* @__PURE__ */ jsx15("div", { ref: this.overlay, className: AnimatedRows_module_default.exits, "aria-hidden": "true" })
|
|
1075
|
+
] });
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
// src/useRowDragPreview.ts
|
|
1080
|
+
import { useEffect as useEffect3, useMemo, useRef as useRef3 } from "react";
|
|
1081
|
+
import clsx12 from "clsx";
|
|
1082
|
+
|
|
1083
|
+
// .build/css/RowDragPreview.module.mjs
|
|
1084
|
+
var id16 = "@seekbuddy/dsh-ui/RowDragPreview.module.css";
|
|
1085
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id16 + '"]')) {
|
|
1086
|
+
const element = document.createElement("style");
|
|
1087
|
+
element.setAttribute("data-dsh-ui-primitives", id16);
|
|
1088
|
+
element.textContent = ".oXmfgq_preview{pointer-events:none;position:fixed;top:0}.oXmfgq_preview>:first-child{box-sizing:border-box;width:100%;height:100%;margin:0}";
|
|
1089
|
+
document.head.appendChild(element);
|
|
1090
|
+
}
|
|
1091
|
+
var RowDragPreview_module_default = { "preview": "oXmfgq_preview" };
|
|
1092
|
+
|
|
1093
|
+
// src/useRowDragPreview.ts
|
|
1094
|
+
function useRowDragPreview(className, inheritedProperties) {
|
|
1095
|
+
const current = useRef3(null);
|
|
1096
|
+
const dragging = useRef3(false);
|
|
1097
|
+
const preview = useMemo(() => {
|
|
1098
|
+
const clear = () => {
|
|
1099
|
+
const wasDragging = dragging.current;
|
|
1100
|
+
dragging.current = false;
|
|
1101
|
+
current.current?.remove();
|
|
1102
|
+
current.current = null;
|
|
1103
|
+
return wasDragging;
|
|
1104
|
+
};
|
|
1105
|
+
return {
|
|
1106
|
+
clear,
|
|
1107
|
+
start: (event, row = event.currentTarget) => {
|
|
1108
|
+
clear();
|
|
1109
|
+
dragging.current = true;
|
|
1110
|
+
const rect = row.getBoundingClientRect();
|
|
1111
|
+
const style = getComputedStyle(row);
|
|
1112
|
+
const copy = row.cloneNode(true);
|
|
1113
|
+
copy.removeAttribute("data-row-key");
|
|
1114
|
+
copy.tabIndex = -1;
|
|
1115
|
+
for (const control of copy.querySelectorAll(
|
|
1116
|
+
"button, a[href], input, select, textarea, [tabindex], [contenteditable]"
|
|
1117
|
+
))
|
|
1118
|
+
control.tabIndex = -1;
|
|
1119
|
+
copy.style.color = style.color;
|
|
1120
|
+
copy.style.paddingInlineStart = style.paddingInlineStart;
|
|
1121
|
+
const image = row.ownerDocument.createElement("div");
|
|
1122
|
+
image.className = clsx12(RowDragPreview_module_default.preview, className);
|
|
1123
|
+
image.inert = true;
|
|
1124
|
+
image.setAttribute("aria-hidden", "true");
|
|
1125
|
+
inheritedProperties?.forEach((property) => {
|
|
1126
|
+
image.style.setProperty(property, style.getPropertyValue(property));
|
|
1127
|
+
});
|
|
1128
|
+
Object.assign(image.style, {
|
|
1129
|
+
left: `${String(-rect.width)}px`,
|
|
1130
|
+
width: `${String(rect.width)}px`,
|
|
1131
|
+
height: `${String(rect.height)}px`,
|
|
1132
|
+
font: style.font
|
|
1133
|
+
});
|
|
1134
|
+
image.append(copy);
|
|
1135
|
+
row.ownerDocument.body.append(image);
|
|
1136
|
+
current.current = image;
|
|
1137
|
+
try {
|
|
1138
|
+
event.dataTransfer.setDragImage(image, event.clientX - rect.left, event.clientY - rect.top);
|
|
1139
|
+
} catch (_error) {
|
|
1140
|
+
image.remove();
|
|
1141
|
+
current.current = null;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
}, [className, inheritedProperties]);
|
|
1146
|
+
useEffect3(
|
|
1147
|
+
() => () => {
|
|
1148
|
+
preview.clear();
|
|
1149
|
+
},
|
|
1150
|
+
[preview]
|
|
1151
|
+
);
|
|
1152
|
+
return preview;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
// src/ZoomControls.tsx
|
|
1156
|
+
import clsx13 from "clsx";
|
|
1157
|
+
import { forwardRef as forwardRef2, useEffect as useEffect4, useImperativeHandle, useState as useState3 } from "react";
|
|
1158
|
+
|
|
1159
|
+
// src/document-zoom.ts
|
|
1160
|
+
var DOCUMENT_ZOOM = { minimum: 0.25, maximum: 4, step: 0.25, presets: [0.25, 0.5, 1, 1.5, 2] };
|
|
1161
|
+
|
|
1162
|
+
// .build/css/ZoomControls.module.mjs
|
|
1163
|
+
var id17 = "@seekbuddy/dsh-ui/ZoomControls.module.css";
|
|
1164
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id17 + '"]')) {
|
|
1165
|
+
const element = document.createElement("style");
|
|
1166
|
+
element.setAttribute("data-dsh-ui-primitives", id17);
|
|
1167
|
+
element.textContent = ":where(._16hJkG_panel){bottom:14px}._16hJkG_panel{z-index:2;box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);opacity:0;pointer-events:none;will-change:opacity, transform;align-items:center;gap:2px;padding:4px 6px;font-size:12px;line-height:18px;transition:opacity .16s ease-in,transform .16s cubic-bezier(.4,0,1,1);display:flex;position:absolute;inset-inline-start:50%;transform:translate(-50%,16px)scale(.98);box-shadow:0 8px 24px light-dark(#0000001a,#00000060),0 2px 5px light-dark(#00000009,#00000035)}._16hJkG_visible{opacity:1;pointer-events:auto;transition:opacity .14s ease-out,transform .18s cubic-bezier(.22,1,.36,1);transform:translate(-50%)scale(1)}._16hJkG_controlAnchor{display:flex}._16hJkG_zoomButton{flex:none;width:28px;padding:0}._16hJkG_percent{font-variant-numeric:tabular-nums;justify-content:center;align-items:center;gap:2px;min-width:58px;padding-inline:6px;display:inline-flex}._16hJkG_zoomMenu{min-width:112px}@media (hover:none),(pointer:coarse){._16hJkG_panel{opacity:1;pointer-events:auto;transform:translate(-50%)scale(1)}}@media (prefers-reduced-motion:reduce){._16hJkG_panel,._16hJkG_visible{transition-duration:.01ms}}";
|
|
1168
|
+
document.head.appendChild(element);
|
|
1169
|
+
}
|
|
1170
|
+
var ZoomControls_module_default = { "percent": "_16hJkG_percent", "controlAnchor": "_16hJkG_controlAnchor", "zoomMenu": "_16hJkG_zoomMenu", "visible": "_16hJkG_visible", "panel": "_16hJkG_panel", "zoomButton": "_16hJkG_zoomButton" };
|
|
1171
|
+
|
|
1172
|
+
// src/ZoomControls.tsx
|
|
1173
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1174
|
+
function steppedZoom(zoom, direction) {
|
|
1175
|
+
const step = direction === -1 ? Math.ceil(zoom / DOCUMENT_ZOOM.step) - 1 : Math.floor(zoom / DOCUMENT_ZOOM.step) + 1;
|
|
1176
|
+
return Math.min(DOCUMENT_ZOOM.maximum, Math.max(DOCUMENT_ZOOM.minimum, step * DOCUMENT_ZOOM.step));
|
|
1177
|
+
}
|
|
1178
|
+
var ZoomControls = forwardRef2(function ZoomControls2({ zoom, fit, className, labels, visible, onZoom, onActiveChange }, ref) {
|
|
1179
|
+
const [committed, setCommitted] = useState3(zoom);
|
|
1180
|
+
const [transient, setTransient] = useState3();
|
|
1181
|
+
const [open, setOpen] = useState3(false);
|
|
1182
|
+
const [hovered, setHovered] = useState3(false);
|
|
1183
|
+
const [focused, setFocused] = useState3(false);
|
|
1184
|
+
if (committed !== zoom) {
|
|
1185
|
+
setCommitted(zoom);
|
|
1186
|
+
setTransient(void 0);
|
|
971
1187
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1188
|
+
const displayZoom = transient ?? zoom;
|
|
1189
|
+
useImperativeHandle(ref, () => ({ showZoom: setTransient }), []);
|
|
1190
|
+
useEffect4(() => {
|
|
1191
|
+
onActiveChange(open || hovered || focused);
|
|
1192
|
+
}, [focused, hovered, onActiveChange, open]);
|
|
1193
|
+
const items = [
|
|
1194
|
+
...fit === void 0 ? [] : [
|
|
1195
|
+
{ id: "fit", label: fit.label },
|
|
1196
|
+
{ type: "separator", id: "fit-scale" }
|
|
1197
|
+
],
|
|
1198
|
+
...DOCUMENT_ZOOM.presets.map((value) => ({ id: String(value), label: labels.value(value * 100) }))
|
|
1199
|
+
];
|
|
1200
|
+
const selectedId = fit?.selected === true ? "fit" : DOCUMENT_ZOOM.presets.some((value) => value === displayZoom) ? String(displayZoom) : void 0;
|
|
1201
|
+
return /* @__PURE__ */ jsxs13(
|
|
1202
|
+
"div",
|
|
1203
|
+
{
|
|
1204
|
+
className: clsx13(ZoomControls_module_default.panel, visible && ZoomControls_module_default.visible, className),
|
|
1205
|
+
role: "toolbar",
|
|
1206
|
+
"aria-label": labels.controls,
|
|
1207
|
+
"data-document-zoom-controls": true,
|
|
1208
|
+
"data-document-zoom-visible": visible || void 0,
|
|
1209
|
+
onPointerEnter: (event) => {
|
|
1210
|
+
if (event.pointerType !== "touch") setHovered(true);
|
|
1211
|
+
},
|
|
1212
|
+
onPointerLeave: () => {
|
|
1213
|
+
setHovered(false);
|
|
1214
|
+
},
|
|
1215
|
+
onFocusCapture: () => {
|
|
1216
|
+
setFocused(true);
|
|
1217
|
+
},
|
|
1218
|
+
onBlurCapture: (event) => {
|
|
1219
|
+
if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
|
|
1220
|
+
},
|
|
1221
|
+
children: [
|
|
1222
|
+
/* @__PURE__ */ jsx16(Tooltip, { label: labels.out, side: "top", children: /* @__PURE__ */ jsx16("span", { className: ZoomControls_module_default.controlAnchor, children: /* @__PURE__ */ jsx16(
|
|
1223
|
+
Button,
|
|
1224
|
+
{
|
|
1225
|
+
size: "sm",
|
|
1226
|
+
className: ZoomControls_module_default.zoomButton,
|
|
1227
|
+
"aria-label": labels.out,
|
|
1228
|
+
disabled: displayZoom <= DOCUMENT_ZOOM.minimum,
|
|
1229
|
+
onMouseDown: (event) => {
|
|
1230
|
+
event.preventDefault();
|
|
1231
|
+
},
|
|
1232
|
+
onClick: () => {
|
|
1233
|
+
onZoom(steppedZoom(displayZoom, -1));
|
|
1234
|
+
},
|
|
1235
|
+
children: /* @__PURE__ */ jsx16("svg", { width: "14", height: "14", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx16("path", { d: "M2 8h12", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }) })
|
|
1236
|
+
}
|
|
1237
|
+
) }) }),
|
|
1238
|
+
/* @__PURE__ */ jsx16(
|
|
1239
|
+
Menu,
|
|
1240
|
+
{
|
|
1241
|
+
open,
|
|
1242
|
+
side: "top",
|
|
1243
|
+
align: "start",
|
|
1244
|
+
portal: true,
|
|
1245
|
+
compact: true,
|
|
1246
|
+
listClassName: ZoomControls_module_default.zoomMenu,
|
|
1247
|
+
anchor: /* @__PURE__ */ jsxs13(
|
|
1248
|
+
Button,
|
|
1249
|
+
{
|
|
1250
|
+
size: "sm",
|
|
1251
|
+
className: ZoomControls_module_default.percent,
|
|
1252
|
+
"aria-label": labels.menu,
|
|
1253
|
+
"aria-expanded": open,
|
|
1254
|
+
onMouseDown: (event) => {
|
|
1255
|
+
event.preventDefault();
|
|
1256
|
+
},
|
|
1257
|
+
onClick: () => {
|
|
1258
|
+
setOpen((value) => !value);
|
|
1259
|
+
},
|
|
1260
|
+
children: [
|
|
1261
|
+
/* @__PURE__ */ jsx16("span", { children: labels.value(Math.round(displayZoom * 100)) }),
|
|
1262
|
+
/* @__PURE__ */ jsx16(IconChevronDownOutlineRegular, { size: 12 })
|
|
1263
|
+
]
|
|
1264
|
+
}
|
|
1265
|
+
),
|
|
1266
|
+
items,
|
|
1267
|
+
selectedId,
|
|
1268
|
+
onClose: () => {
|
|
1269
|
+
setOpen(false);
|
|
1270
|
+
},
|
|
1271
|
+
onSelect: (selected) => {
|
|
1272
|
+
setOpen(false);
|
|
1273
|
+
if (selected === "fit") fit?.onSelect();
|
|
1274
|
+
else onZoom(Number(selected));
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
),
|
|
1278
|
+
/* @__PURE__ */ jsx16(Tooltip, { label: labels.into, side: "top", children: /* @__PURE__ */ jsx16("span", { className: ZoomControls_module_default.controlAnchor, children: /* @__PURE__ */ jsx16(
|
|
1279
|
+
Button,
|
|
1280
|
+
{
|
|
1281
|
+
size: "sm",
|
|
1282
|
+
className: ZoomControls_module_default.zoomButton,
|
|
1283
|
+
"aria-label": labels.into,
|
|
1284
|
+
disabled: displayZoom >= DOCUMENT_ZOOM.maximum,
|
|
1285
|
+
onMouseDown: (event) => {
|
|
1286
|
+
event.preventDefault();
|
|
1287
|
+
},
|
|
1288
|
+
onClick: () => {
|
|
1289
|
+
onZoom(steppedZoom(displayZoom, 1));
|
|
1290
|
+
},
|
|
1291
|
+
children: /* @__PURE__ */ jsx16(IconPlusOutlineRegular, { size: 14 })
|
|
1292
|
+
}
|
|
1293
|
+
) }) })
|
|
1294
|
+
]
|
|
1295
|
+
}
|
|
1296
|
+
);
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
// src/InlineEditor.tsx
|
|
1300
|
+
import { useLayoutEffect as useLayoutEffect2, useRef as useRef4 } from "react";
|
|
1301
|
+
import clsx14 from "clsx";
|
|
1302
|
+
|
|
1303
|
+
// .build/css/InlineEditor.module.mjs
|
|
1304
|
+
var id18 = "@seekbuddy/dsh-ui/InlineEditor.module.css";
|
|
1305
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id18 + '"]')) {
|
|
1306
|
+
const element = document.createElement("style");
|
|
1307
|
+
element.setAttribute("data-dsh-ui-primitives", id18);
|
|
1308
|
+
element.textContent = ".aMYfeq_editor{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);min-width:0;min-height:28px;max-height:127px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);font-family:Inter, var(--dsw-font-family);resize:none;outline:none;flex:auto;margin:0;padding:3px 8px;overflow-y:auto}.aMYfeq_editor:focus{border-color:var(--dsw-alias-state-business-primary)}";
|
|
1309
|
+
document.head.appendChild(element);
|
|
1310
|
+
}
|
|
1311
|
+
var InlineEditor_module_default = { "editor": "aMYfeq_editor" };
|
|
1312
|
+
|
|
1313
|
+
// src/InlineEditor.tsx
|
|
1314
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1315
|
+
function InlineEditor({
|
|
1316
|
+
value,
|
|
1317
|
+
label,
|
|
1318
|
+
onChange,
|
|
1319
|
+
onSave,
|
|
1320
|
+
onCancel,
|
|
1321
|
+
className
|
|
1322
|
+
}) {
|
|
1323
|
+
const ref = useRef4(null);
|
|
1324
|
+
useLayoutEffect2(() => {
|
|
1325
|
+
const node = ref.current;
|
|
1326
|
+
const fit = () => {
|
|
1327
|
+
node.style.height = "auto";
|
|
1328
|
+
node.style.height = `${node.scrollHeight + node.offsetHeight - node.clientHeight}px`;
|
|
1329
|
+
};
|
|
1330
|
+
fit();
|
|
1331
|
+
const observer = new ResizeObserver(fit);
|
|
1332
|
+
observer.observe(node);
|
|
1333
|
+
return () => {
|
|
1334
|
+
observer.disconnect();
|
|
1335
|
+
};
|
|
1336
|
+
}, [value]);
|
|
1337
|
+
const onKeyDown = (event) => {
|
|
1338
|
+
if (event.key === "Escape") {
|
|
1339
|
+
onCancel();
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
const composing = event.nativeEvent.isComposing || Reflect.get(event.nativeEvent, "keyCode") === 229;
|
|
1343
|
+
if (event.key !== "Enter" || event.shiftKey || composing) return;
|
|
1344
|
+
event.preventDefault();
|
|
1345
|
+
onSave();
|
|
1346
|
+
};
|
|
1347
|
+
return /* @__PURE__ */ jsx17(
|
|
1348
|
+
"textarea",
|
|
1349
|
+
{
|
|
1350
|
+
ref,
|
|
1351
|
+
autoFocus: true,
|
|
1352
|
+
rows: 1,
|
|
1353
|
+
className: clsx14(InlineEditor_module_default.editor, className),
|
|
1354
|
+
"aria-label": label,
|
|
1355
|
+
value,
|
|
1356
|
+
onChange: (event) => {
|
|
1357
|
+
onChange(event.currentTarget.value);
|
|
1358
|
+
},
|
|
1359
|
+
onKeyDown
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// src/QuotePreview.tsx
|
|
1365
|
+
import { useLayoutEffect as useLayoutEffect3, useRef as useRef5, useState as useState4 } from "react";
|
|
1366
|
+
|
|
1367
|
+
// .build/css/QuotePreview.module.mjs
|
|
1368
|
+
var id19 = "@seekbuddy/dsh-ui/QuotePreview.module.css";
|
|
1369
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id19 + '"]')) {
|
|
1370
|
+
const element = document.createElement("style");
|
|
1371
|
+
element.setAttribute("data-dsh-ui-primitives", id19);
|
|
1372
|
+
element.textContent = ".Qd5ZYq_quote{box-sizing:border-box;vertical-align:baseline;max-width:min(80%,300px);color:var(--dsw-alias-state-business-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(20px + var(--dsh-content-font-delta,0px));align-items:baseline;gap:4px;margin:0;padding:0;display:inline-flex}.Qd5ZYq_popoverText{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;white-space:pre-wrap;padding:8px 10px;font-size:14px;line-height:20px;display:block}.Qd5ZYq_source{min-width:0;color:inherit;font:inherit;line-height:inherit;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;outline:none;padding:0;overflow:hidden}.Qd5ZYq_marker,.Qd5ZYq_remove{width:16px;height:16px;color:inherit;user-select:none;flex:none;align-self:center;place-items:center;padding:0;display:grid}.Qd5ZYq_marker{pointer-events:none}.Qd5ZYq_remove{corner-shape:round;cursor:pointer;background:0 0;border:none;border-radius:50%}.Qd5ZYq_quoteMark,.Qd5ZYq_closeMark{grid-area:1/1;transition:opacity .12s}.Qd5ZYq_closeMark,.Qd5ZYq_quote[data-removable]:focus-within .Qd5ZYq_quoteMark{opacity:0}.Qd5ZYq_quote[data-removable]:focus-within .Qd5ZYq_closeMark{opacity:1}@media (hover:hover){.Qd5ZYq_quote[data-removable]:hover .Qd5ZYq_quoteMark{opacity:0}.Qd5ZYq_quote[data-removable]:hover .Qd5ZYq_closeMark{opacity:1}}@media (hover:none){.Qd5ZYq_quote[data-removable] .Qd5ZYq_quoteMark{opacity:0}.Qd5ZYq_quote[data-removable] .Qd5ZYq_closeMark{opacity:1}}";
|
|
1373
|
+
document.head.appendChild(element);
|
|
1374
|
+
}
|
|
1375
|
+
var QuotePreview_module_default = { "quote": "Qd5ZYq_quote", "popoverText": "Qd5ZYq_popoverText", "marker": "Qd5ZYq_marker", "remove": "Qd5ZYq_remove", "quoteMark": "Qd5ZYq_quoteMark", "source": "Qd5ZYq_source", "closeMark": "Qd5ZYq_closeMark" };
|
|
1376
|
+
|
|
1377
|
+
// src/QuotePreview.tsx
|
|
1378
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1379
|
+
function QuoteMarkIcon({ className }) {
|
|
1380
|
+
return /* @__PURE__ */ jsx18("svg", { width: 16, height: 16, className, viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsxs14("g", { transform: "translate(6.8 2.4)", children: [
|
|
1381
|
+
/* @__PURE__ */ jsx18(
|
|
1382
|
+
"path",
|
|
1383
|
+
{
|
|
1384
|
+
d: "M2.8125 0.583008L3.2002 1.16602C2.43912 1.6713 1.88491 2.41238 1.60547 3.25684H2.98926V6.70605H0V4.52148C1.96593e-05 2.70313 0.9109 1.00575 2.42578 0L2.8125 0.583008Z",
|
|
1385
|
+
fill: "currentColor"
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
/* @__PURE__ */ jsx18(
|
|
1389
|
+
"path",
|
|
1390
|
+
{
|
|
1391
|
+
d: "M7.50781 0.583008L7.89551 1.16602C7.13443 1.6713 6.58022 2.41238 6.30078 3.25684H7.68457V6.70605H4.69531V4.52148C4.69533 2.70313 5.60621 1.00575 7.12109 0L7.50781 0.583008Z",
|
|
1392
|
+
fill: "currentColor"
|
|
1393
|
+
}
|
|
1394
|
+
)
|
|
1395
|
+
] }) });
|
|
1396
|
+
}
|
|
1397
|
+
function QuotePreview({ text, removal }) {
|
|
1398
|
+
const sourceRef = useRef5(null);
|
|
1399
|
+
const [truncated, setTruncated] = useState4(false);
|
|
1400
|
+
useLayoutEffect3(() => {
|
|
1401
|
+
const source = sourceRef.current;
|
|
1402
|
+
if (source === null) return;
|
|
1403
|
+
const measure = () => {
|
|
1404
|
+
const clipped = source.scrollWidth > source.clientWidth;
|
|
1405
|
+
setTruncated(clipped);
|
|
1406
|
+
};
|
|
1407
|
+
measure();
|
|
1408
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
1409
|
+
const observer = new ResizeObserver(measure);
|
|
1410
|
+
observer.observe(source);
|
|
1411
|
+
return () => {
|
|
1412
|
+
observer.disconnect();
|
|
1413
|
+
};
|
|
1414
|
+
}, [text]);
|
|
1415
|
+
const remove = (event) => {
|
|
1416
|
+
event.preventDefault();
|
|
1417
|
+
event.stopPropagation();
|
|
1418
|
+
removal?.onRemove();
|
|
1419
|
+
};
|
|
1420
|
+
const preview = /* @__PURE__ */ jsxs14("span", { className: QuotePreview_module_default.quote, "data-quote-preview": "", "data-removable": removal === void 0 ? void 0 : "", children: [
|
|
1421
|
+
removal === void 0 ? /* @__PURE__ */ jsx18("span", { className: QuotePreview_module_default.marker, "aria-hidden": true, children: /* @__PURE__ */ jsx18(QuoteMarkIcon, { className: QuotePreview_module_default.quoteMark }) }) : /* @__PURE__ */ jsxs14(
|
|
1422
|
+
"button",
|
|
1423
|
+
{
|
|
1424
|
+
type: "button",
|
|
1425
|
+
className: QuotePreview_module_default.remove,
|
|
1426
|
+
"aria-label": removal.label,
|
|
1427
|
+
onPointerDown: (event) => {
|
|
1428
|
+
event.preventDefault();
|
|
1429
|
+
event.stopPropagation();
|
|
1430
|
+
},
|
|
1431
|
+
onKeyDown: (event) => {
|
|
1432
|
+
event.stopPropagation();
|
|
1433
|
+
},
|
|
1434
|
+
onClick: remove,
|
|
1435
|
+
children: [
|
|
1436
|
+
/* @__PURE__ */ jsx18(QuoteMarkIcon, { className: QuotePreview_module_default.quoteMark }),
|
|
1437
|
+
/* @__PURE__ */ jsx18(IconCloseOutlineRegular, { size: 12, className: QuotePreview_module_default.closeMark })
|
|
1438
|
+
]
|
|
1439
|
+
}
|
|
1440
|
+
),
|
|
1441
|
+
/* @__PURE__ */ jsx18("span", { ref: sourceRef, className: QuotePreview_module_default.source, "data-quote-preview-text": "", children: text })
|
|
1442
|
+
] });
|
|
1443
|
+
return /* @__PURE__ */ jsx18(
|
|
1444
|
+
HoverCard,
|
|
1445
|
+
{
|
|
1446
|
+
inline: true,
|
|
1447
|
+
grouped: true,
|
|
1448
|
+
fitContent: true,
|
|
1449
|
+
openDelayMs: 0,
|
|
1450
|
+
disabled: !truncated,
|
|
1451
|
+
anchor: preview,
|
|
1452
|
+
content: /* @__PURE__ */ jsx18("span", { className: QuotePreview_module_default.popoverText, "data-quote-popover": "", "aria-hidden": "true", children: text })
|
|
1453
|
+
}
|
|
1454
|
+
);
|
|
975
1455
|
}
|
|
976
1456
|
|
|
977
1457
|
// src/Toast.tsx
|
|
978
|
-
import { Fragment as
|
|
1458
|
+
import { Fragment as Fragment7, useEffect as useEffect5, useLayoutEffect as useLayoutEffect4, useRef as useRef6, useState as useState5 } from "react";
|
|
979
1459
|
import { createPortal as createPortal2 } from "react-dom";
|
|
980
1460
|
|
|
981
1461
|
// .build/css/Toast.module.mjs
|
|
982
|
-
var
|
|
983
|
-
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' +
|
|
1462
|
+
var id20 = "@seekbuddy/dsh-ui/Toast.module.css";
|
|
1463
|
+
if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id20 + '"]')) {
|
|
984
1464
|
const element = document.createElement("style");
|
|
985
|
-
element.setAttribute("data-dsh-ui-primitives",
|
|
986
|
-
element.textContent = "._7whosa_toast{z-index:1100;pointer-events:none;border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-toast-bg);width:max-content;max-width:min(640px,100vw - 48px);color:var(--dsw-alias-toast-label);box-shadow:var(--dsw-shadow-lv3);animation:_7whosa_dsh-toast-in .16s ease-out, _7whosa_dsh-toast-fade 1s ease var(--dsh-toast-hold,3s) forwards;align-items:center;gap:10px;padding:12px 16px;font-size:14px;line-height:22px;display:flex;position:fixed;top:40px;left:50%;transform:translate(-50%)}._7whosa_icon{color:var(--dsw-alias-state-warn-label);flex:none;place-items:center;display:grid}._7whosa_icon._7whosa_success{color:var(--dsw-alias-state-success-primary)}._7whosa_text{min-width:0}._7whosa_action{color:var(--dsw-static-deepseek-400);font:inherit;cursor:pointer;pointer-events:auto;background:0 0;border:0;margin-inline:3px;padding:0;display:inline}._7whosa_action:hover{opacity:.8}@keyframes _7whosa_dsh-toast-in{0%{opacity:0;transform:translate(-50%,-6px)}to{opacity:1;transform:translate(-50%)}}@keyframes _7whosa_dsh-toast-fade{to{opacity:0;visibility:hidden}}@media (prefers-reduced-motion:reduce){._7whosa_toast{animation:_7whosa_dsh-toast-fade 1s ease var(--dsh-toast-hold,3s) forwards}}";
|
|
1465
|
+
element.setAttribute("data-dsh-ui-primitives", id20);
|
|
1466
|
+
element.textContent = "._7whosa_toast{z-index:1100;pointer-events:none;border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-toast-bg);width:max-content;max-width:min(640px,100vw - 48px);color:var(--dsw-alias-toast-label);box-shadow:var(--dsw-shadow-lv3);animation:_7whosa_dsh-toast-in .16s ease-out, _7whosa_dsh-toast-fade 1s ease var(--dsh-toast-hold,3s) forwards;align-items:center;gap:10px;padding:12px 16px;font-size:14px;line-height:22px;display:flex;position:fixed;top:40px;left:50%;transform:translate(-50%)}._7whosa_icon{color:var(--dsw-alias-state-warn-label);flex:none;place-items:center;display:grid}._7whosa_icon._7whosa_success{color:var(--dsw-alias-state-success-primary)}._7whosa_text{min-width:0}._7whosa_action{color:var(--dsw-static-deepseek-400);font:inherit;cursor:pointer;pointer-events:auto;background:0 0;border:0;margin-inline:3px;padding:0;display:inline}@media (hover:hover){._7whosa_action:hover{opacity:.8}}@keyframes _7whosa_dsh-toast-in{0%{opacity:0;transform:translate(-50%,-6px)}to{opacity:1;transform:translate(-50%)}}@keyframes _7whosa_dsh-toast-fade{to{opacity:0;visibility:hidden}}@media (prefers-reduced-motion:reduce){._7whosa_toast{animation:_7whosa_dsh-toast-fade 1s ease var(--dsh-toast-hold,3s) forwards}}";
|
|
987
1467
|
document.head.appendChild(element);
|
|
988
1468
|
}
|
|
989
|
-
var Toast_module_default = { "
|
|
1469
|
+
var Toast_module_default = { "dsh-toast-fade": "_7whosa_dsh-toast-fade", "toast": "_7whosa_toast", "success": "_7whosa_success", "action": "_7whosa_action", "icon": "_7whosa_icon", "dsh-toast-in": "_7whosa_dsh-toast-in", "text": "_7whosa_text" };
|
|
990
1470
|
|
|
991
1471
|
// src/Toast.tsx
|
|
992
|
-
import { jsx as
|
|
1472
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
993
1473
|
var HOLD_MS = 3e3;
|
|
994
1474
|
var FADE_MS = 1e3;
|
|
995
1475
|
function Toast({
|
|
@@ -1001,11 +1481,11 @@ function Toast({
|
|
|
1001
1481
|
actions,
|
|
1002
1482
|
onDone
|
|
1003
1483
|
}) {
|
|
1004
|
-
const latestOnDone =
|
|
1005
|
-
|
|
1484
|
+
const latestOnDone = useRef6(onDone);
|
|
1485
|
+
useLayoutEffect4(() => {
|
|
1006
1486
|
latestOnDone.current = onDone;
|
|
1007
1487
|
}, [onDone]);
|
|
1008
|
-
|
|
1488
|
+
useEffect5(() => {
|
|
1009
1489
|
const timer = setTimeout(() => {
|
|
1010
1490
|
latestOnDone.current();
|
|
1011
1491
|
}, holdMs + FADE_MS);
|
|
@@ -1013,8 +1493,8 @@ function Toast({
|
|
|
1013
1493
|
clearTimeout(timer);
|
|
1014
1494
|
};
|
|
1015
1495
|
}, [holdMs]);
|
|
1016
|
-
const [left, setLeft] =
|
|
1017
|
-
|
|
1496
|
+
const [left, setLeft] = useState5(null);
|
|
1497
|
+
useLayoutEffect4(() => {
|
|
1018
1498
|
if (anchor == null) return;
|
|
1019
1499
|
const measure = () => {
|
|
1020
1500
|
const rect = anchor.getBoundingClientRect();
|
|
@@ -1027,7 +1507,7 @@ function Toast({
|
|
|
1027
1507
|
};
|
|
1028
1508
|
}, [anchor]);
|
|
1029
1509
|
return createPortal2(
|
|
1030
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ jsxs15(
|
|
1031
1511
|
"div",
|
|
1032
1512
|
{
|
|
1033
1513
|
className: Toast_module_default.toast,
|
|
@@ -1037,12 +1517,12 @@ function Toast({
|
|
|
1037
1517
|
"--dsh-toast-hold": `${String(holdMs)}ms`
|
|
1038
1518
|
},
|
|
1039
1519
|
children: [
|
|
1040
|
-
tone === "success" ? /* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1520
|
+
tone === "success" ? /* @__PURE__ */ jsx19("span", { className: `${Toast_module_default.icon} ${Toast_module_default.success}`, "aria-hidden": true, children: /* @__PURE__ */ jsx19(IconCheckCircleOutlineRegular, {}) }) : icon !== void 0 && /* @__PURE__ */ jsx19("span", { className: Toast_module_default.icon, "aria-hidden": true, children: icon }),
|
|
1521
|
+
/* @__PURE__ */ jsxs15("span", { className: Toast_module_default.text, children: [
|
|
1042
1522
|
text,
|
|
1043
|
-
actions?.map((action) => /* @__PURE__ */
|
|
1523
|
+
actions?.map((action) => /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
1044
1524
|
action.prefix,
|
|
1045
|
-
/* @__PURE__ */
|
|
1525
|
+
/* @__PURE__ */ jsx19("button", { type: "button", className: Toast_module_default.action, onClick: action.onClick, children: action.label })
|
|
1046
1526
|
] }, action.label))
|
|
1047
1527
|
] })
|
|
1048
1528
|
]
|
|
@@ -1139,19 +1619,27 @@ function isDarwinDesktop() {
|
|
|
1139
1619
|
return document.documentElement.dataset.platform === "darwin";
|
|
1140
1620
|
}
|
|
1141
1621
|
export {
|
|
1622
|
+
AnimatedRows,
|
|
1142
1623
|
Button,
|
|
1143
1624
|
Checkbox,
|
|
1144
1625
|
ConnectionIndicator,
|
|
1626
|
+
DOCUMENT_ZOOM,
|
|
1145
1627
|
DisclosureRow,
|
|
1628
|
+
DraggableImage,
|
|
1146
1629
|
HoverCard,
|
|
1630
|
+
HoverCardGroup,
|
|
1147
1631
|
ImageLightbox,
|
|
1632
|
+
InlineEditor,
|
|
1148
1633
|
Input,
|
|
1634
|
+
MENU_TRANSITION_MS,
|
|
1149
1635
|
Menu,
|
|
1150
1636
|
MenuGroup,
|
|
1151
1637
|
MenuItemButton,
|
|
1152
1638
|
MenuSurface,
|
|
1153
1639
|
Modal,
|
|
1154
1640
|
Pill,
|
|
1641
|
+
QuotePreview,
|
|
1642
|
+
ReferenceChip,
|
|
1155
1643
|
RiskConfirmation,
|
|
1156
1644
|
SegmentedControl,
|
|
1157
1645
|
SegmentedTabs,
|
|
@@ -1162,21 +1650,26 @@ export {
|
|
|
1162
1650
|
TextShimmer,
|
|
1163
1651
|
Toast,
|
|
1164
1652
|
Tooltip,
|
|
1653
|
+
UserMessageBubble,
|
|
1654
|
+
UserTextRun,
|
|
1655
|
+
ZoomControls,
|
|
1165
1656
|
closeTopModal,
|
|
1166
1657
|
fileSizeText,
|
|
1167
1658
|
focusWithoutRing,
|
|
1168
1659
|
isBehindModal,
|
|
1169
1660
|
isDarwinDesktop,
|
|
1661
|
+
isMobileDevice,
|
|
1170
1662
|
modalSelector,
|
|
1171
1663
|
observeComposition,
|
|
1172
1664
|
observeStickyMenuGroups,
|
|
1173
1665
|
pointerModality,
|
|
1174
|
-
projectUserText,
|
|
1175
1666
|
rankByName,
|
|
1176
1667
|
relativeTime,
|
|
1177
1668
|
useAnchoredMaxHeight,
|
|
1178
1669
|
useAnchoredPosition,
|
|
1670
|
+
useClipboardCopy,
|
|
1179
1671
|
useDismissOnOutsidePointer,
|
|
1180
1672
|
useModalLayer,
|
|
1673
|
+
useRowDragPreview,
|
|
1181
1674
|
writeClipboard
|
|
1182
1675
|
};
|