@seekbuddy/dsh-ui 0.0.0-stage → 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.
Files changed (213) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/LICENSE +22 -0
  3. package/README.md +175 -2
  4. package/README.zh.md +176 -0
  5. package/THIRD_PARTY_NOTICES.md +42 -0
  6. package/UPSTREAM.md +59 -0
  7. package/dist/blocks.js +1617 -0
  8. package/dist/chunks/chunk-23KOEBWJ.js +104 -0
  9. package/dist/chunks/chunk-6SGSJ5KW.js +57 -0
  10. package/dist/chunks/chunk-7NH2UOZO.js +155 -0
  11. package/dist/chunks/chunk-7SKW4S35.js +66 -0
  12. package/dist/chunks/chunk-B3EEK7A2.js +408 -0
  13. package/dist/chunks/chunk-CEBTQO6W.js +24 -0
  14. package/dist/chunks/chunk-ENKPNYOB.js +26 -0
  15. package/dist/chunks/chunk-EWAZFWLW.js +27 -0
  16. package/dist/chunks/chunk-F352IICS.js +57 -0
  17. package/dist/chunks/chunk-FFJ6TCCF.js +31 -0
  18. package/dist/chunks/chunk-FZXK4LTI.js +129 -0
  19. package/dist/chunks/chunk-JA3XDLIA.js +1115 -0
  20. package/dist/chunks/chunk-L7XALG4J.js +36 -0
  21. package/dist/chunks/chunk-OCAQFVT3.js +3172 -0
  22. package/dist/chunks/chunk-RAXDA2PT.js +202 -0
  23. package/dist/chunks/chunk-RNVSCTW7.js +24 -0
  24. package/dist/chunks/chunk-RZOP2PFC.js +152 -0
  25. package/dist/chunks/chunk-SN6RSUWC.js +61 -0
  26. package/dist/chunks/chunk-SNVSQWCU.js +22 -0
  27. package/dist/chunks/chunk-SO3DCAWG.js +170 -0
  28. package/dist/chunks/chunk-UAEFKTV3.js +144 -0
  29. package/dist/chunks/chunk-UGEORMLD.js +89 -0
  30. package/dist/chunks/chunk-W6FLI3AK.js +112 -0
  31. package/dist/chunks/chunk-WX46TSKP.js +328 -0
  32. package/dist/chunks/chunk-XL33IPCV.js +261 -0
  33. package/dist/chunks/chunk-XW4L4ZGL.js +967 -0
  34. package/dist/chunks/chunk-YOBY6PSL.js +850 -0
  35. package/dist/chunks/chunk-ZA47FP7C.js +7 -0
  36. package/dist/icons.js +859 -0
  37. package/dist/index.js +1675 -0
  38. package/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  39. package/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  40. package/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  41. package/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  42. package/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  43. package/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  44. package/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  45. package/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  46. package/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  47. package/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  48. package/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  49. package/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  50. package/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  51. package/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  52. package/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  53. package/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  54. package/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  55. package/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  56. package/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  57. package/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  58. package/dist/katex.css +1 -0
  59. package/dist/katex.css.d.ts +2 -0
  60. package/dist/markdown.js +225 -0
  61. package/dist/meta.json +7575 -0
  62. package/dist/root-inputs.json +86 -0
  63. package/dist/seekbuddy-card.js +7 -0
  64. package/dist/seekbuddy-empty.js +8 -0
  65. package/dist/seekbuddy-internal/DangerButton.js +7 -0
  66. package/dist/seekbuddy-internal/Mark.js +7 -0
  67. package/dist/seekbuddy-internal/Message.js +10 -0
  68. package/dist/seekbuddy-internal/Pagination.js +9 -0
  69. package/dist/seekbuddy-internal/StatusBadge.js +7 -0
  70. package/dist/seekbuddy-internal/SubtleButton.js +7 -0
  71. package/dist/seekbuddy-internal/Switch.js +7 -0
  72. package/dist/seekbuddy-internal/Upload.js +7 -0
  73. package/dist/seekbuddy-internal/date/Calendar.js +8 -0
  74. package/dist/seekbuddy-internal/date/DatePicker.js +9 -0
  75. package/dist/seekbuddy-internal/date/DateRangePicker.js +9 -0
  76. package/dist/seekbuddy-internal/date/TimePicker.js +8 -0
  77. package/dist/seekbuddy-internal/date/fields.js +16 -0
  78. package/dist/seekbuddy-internal/qr/QrCode.js +7 -0
  79. package/dist/seekbuddy-spinner.js +7 -0
  80. package/dist/seekbuddy-tabs.js +7 -0
  81. package/dist/seekbuddy-timeline.js +8 -0
  82. package/dist/seekbuddy.js +89 -0
  83. package/dist/theme-bootstrap.js +13 -0
  84. package/dist/theme.js +37 -0
  85. package/dist/tokens.css +974 -0
  86. package/dist/tokens.css.d.ts +2 -0
  87. package/dist/types/AnimatedRows.d.ts +45 -0
  88. package/dist/types/Button.d.ts +18 -0
  89. package/dist/types/Checkbox.d.ts +19 -0
  90. package/dist/types/CodeFileIcon.d.ts +11 -0
  91. package/dist/types/CodeToolbar.d.ts +29 -0
  92. package/dist/types/CommandText.d.ts +15 -0
  93. package/dist/types/ConfigField.d.ts +32 -0
  94. package/dist/types/ConnectionIndicator.d.ts +25 -0
  95. package/dist/types/DetailDocument.d.ts +77 -0
  96. package/dist/types/DiffBlock.d.ts +51 -0
  97. package/dist/types/DisclosureRow.d.ts +37 -0
  98. package/dist/types/DraggableImage.d.ts +18 -0
  99. package/dist/types/FileTypeIcon.d.ts +42 -0
  100. package/dist/types/FoldToggle.d.ts +19 -0
  101. package/dist/types/HoverCard.d.ts +44 -0
  102. package/dist/types/HoverCardGroup.d.ts +24 -0
  103. package/dist/types/ImageLightbox.d.ts +29 -0
  104. package/dist/types/ImagePreview.d.ts +11 -0
  105. package/dist/types/InlineEditor.d.ts +22 -0
  106. package/dist/types/Input.d.ts +11 -0
  107. package/dist/types/JsonTree.d.ts +58 -0
  108. package/dist/types/LinkIcon.d.ts +33 -0
  109. package/dist/types/Menu.d.ts +163 -0
  110. package/dist/types/MenuGroup.d.ts +21 -0
  111. package/dist/types/MenuSurface.d.ts +24 -0
  112. package/dist/types/Modal.d.ts +43 -0
  113. package/dist/types/PermissionIcon.d.ts +50 -0
  114. package/dist/types/Pill.d.ts +12 -0
  115. package/dist/types/QuotePreview.d.ts +23 -0
  116. package/dist/types/ReadBlock.d.ts +47 -0
  117. package/dist/types/ReferenceIcon.d.ts +20 -0
  118. package/dist/types/RiskConfirmation.d.ts +19 -0
  119. package/dist/types/SearchBlock.d.ts +71 -0
  120. package/dist/types/SegmentedControl.d.ts +34 -0
  121. package/dist/types/SegmentedTabs.d.ts +27 -0
  122. package/dist/types/ShortcutKeys.d.ts +10 -0
  123. package/dist/types/SiteGlyph.d.ts +24 -0
  124. package/dist/types/StateDot.d.ts +19 -0
  125. package/dist/types/Switch.d.ts +19 -0
  126. package/dist/types/Tag.d.ts +31 -0
  127. package/dist/types/TerminalBlock.d.ts +85 -0
  128. package/dist/types/TextShimmer.d.ts +22 -0
  129. package/dist/types/Toast.d.ts +48 -0
  130. package/dist/types/Tooltip.d.ts +69 -0
  131. package/dist/types/UserMessageBubble.d.ts +10 -0
  132. package/dist/types/WebBlock.d.ts +60 -0
  133. package/dist/types/ZoomControls.d.ts +26 -0
  134. package/dist/types/ansi.d.ts +16 -0
  135. package/dist/types/blocks.d.ts +21 -0
  136. package/dist/types/clipboard.d.ts +8 -0
  137. package/dist/types/code-file-icon-artwork.d.ts +53 -0
  138. package/dist/types/code-file-types.d.ts +29 -0
  139. package/dist/types/code-highlighting.d.ts +11 -0
  140. package/dist/types/css-modules.d.ts +6 -0
  141. package/dist/types/darwin-desktop.d.ts +8 -0
  142. package/dist/types/document-zoom.d.ts +16 -0
  143. package/dist/types/file-drag-actions.d.ts +36 -0
  144. package/dist/types/file-size.d.ts +7 -0
  145. package/dist/types/focus.d.ts +15 -0
  146. package/dist/types/guide-artwork.d.ts +14 -0
  147. package/dist/types/head-tail-cap.d.ts +22 -0
  148. package/dist/types/icons/artwork.d.ts +421 -0
  149. package/dist/types/icons/index.d.ts +397 -0
  150. package/dist/types/icons/props.d.ts +8 -0
  151. package/dist/types/icons/shared-artwork.d.ts +36 -0
  152. package/dist/types/icons.d.ts +6 -0
  153. package/dist/types/image-drag.d.ts +16 -0
  154. package/dist/types/index.d.ts +71 -0
  155. package/dist/types/input-modality.d.ts +18 -0
  156. package/dist/types/keyboard-composition.d.ts +10 -0
  157. package/dist/types/markdown/CodeBlock.d.ts +34 -0
  158. package/dist/types/markdown/JsonBlock.d.ts +7 -0
  159. package/dist/types/markdown/MarkdownDelegate.d.ts +68 -0
  160. package/dist/types/markdown/MarkdownText.d.ts +54 -0
  161. package/dist/types/markdown/cjkFriendlyStrong.d.ts +8 -0
  162. package/dist/types/markdown/file-link.d.ts +22 -0
  163. package/dist/types/markdown/highlight.d.ts +169 -0
  164. package/dist/types/markdown/incremental.d.ts +79 -0
  165. package/dist/types/markdown/katex.d.ts +18 -0
  166. package/dist/types/markdown/local-image-syntax.d.ts +9 -0
  167. package/dist/types/markdown/mathCompatibility.d.ts +10 -0
  168. package/dist/types/markdown/parse.d.ts +24 -0
  169. package/dist/types/markdown/plain-text.d.ts +21 -0
  170. package/dist/types/markdown/quote-text.d.ts +7 -0
  171. package/dist/types/markdown/render.d.ts +145 -0
  172. package/dist/types/markdown/useViewportHighlighting.d.ts +10 -0
  173. package/dist/types/markdown/windows-path-destinations.d.ts +10 -0
  174. package/dist/types/markdown.d.ts +12 -0
  175. package/dist/types/overlay-top-margin.d.ts +14 -0
  176. package/dist/types/plugin-artwork.d.ts +16 -0
  177. package/dist/types/pointer-grace.d.ts +21 -0
  178. package/dist/types/rank-by-name.d.ts +21 -0
  179. package/dist/types/relative-time.d.ts +22 -0
  180. package/dist/types/seekbuddy/Card.d.ts +28 -0
  181. package/dist/types/seekbuddy/DangerButton.d.ts +31 -0
  182. package/dist/types/seekbuddy/Empty.d.ts +34 -0
  183. package/dist/types/seekbuddy/Mark.d.ts +27 -0
  184. package/dist/types/seekbuddy/Message.d.ts +52 -0
  185. package/dist/types/seekbuddy/Pagination.d.ts +66 -0
  186. package/dist/types/seekbuddy/Spinner.d.ts +20 -0
  187. package/dist/types/seekbuddy/StatusBadge.d.ts +33 -0
  188. package/dist/types/seekbuddy/SubtleButton.d.ts +30 -0
  189. package/dist/types/seekbuddy/Switch.d.ts +36 -0
  190. package/dist/types/seekbuddy/Tabs.d.ts +49 -0
  191. package/dist/types/seekbuddy/Timeline.d.ts +42 -0
  192. package/dist/types/seekbuddy/Upload.d.ts +101 -0
  193. package/dist/types/seekbuddy/date/Calendar.d.ts +94 -0
  194. package/dist/types/seekbuddy/date/DatePicker.d.ts +29 -0
  195. package/dist/types/seekbuddy/date/DateRangePicker.d.ts +41 -0
  196. package/dist/types/seekbuddy/date/TimePicker.d.ts +35 -0
  197. package/dist/types/seekbuddy/date/date.d.ts +79 -0
  198. package/dist/types/seekbuddy/date/fields.d.ts +45 -0
  199. package/dist/types/seekbuddy/index.d.ts +49 -0
  200. package/dist/types/seekbuddy/qr/QrCode.d.ts +37 -0
  201. package/dist/types/seekbuddy/qr/qr.d.ts +38 -0
  202. package/dist/types/theme-bootstrap.d.ts +3 -0
  203. package/dist/types/theme-core.d.ts +14 -0
  204. package/dist/types/theme.d.ts +4 -0
  205. package/dist/types/tooltip-placement.d.ts +34 -0
  206. package/dist/types/use-clipboard-copy.d.ts +13 -0
  207. package/dist/types/useAnchoredMaxHeight.d.ts +13 -0
  208. package/dist/types/useAnchoredPosition.d.ts +35 -0
  209. package/dist/types/useDismissOnOutsidePointer.d.ts +10 -0
  210. package/dist/types/useModalLayer.d.ts +26 -0
  211. package/dist/types/useRowDragPreview.d.ts +19 -0
  212. package/dist/types/user-text.d.ts +31 -0
  213. package/package.json +151 -4
@@ -0,0 +1,202 @@
1
+ import {
2
+ DatePicker
3
+ } from "./chunk-UGEORMLD.js";
4
+ import {
5
+ DateRangePicker
6
+ } from "./chunk-7NH2UOZO.js";
7
+ import {
8
+ TimePicker
9
+ } from "./chunk-UAEFKTV3.js";
10
+
11
+ // src/seekbuddy/date/fields.tsx
12
+ import clsx from "clsx";
13
+ import { useAnchoredPosition, useDismissOnOutsidePointer } from "@seekbuddy/dsh-ui";
14
+ import { IconClockOutlineRegular } from "@seekbuddy/dsh-ui/icons";
15
+ import { useCallback, useId, useRef, useState } from "react";
16
+ import { createPortal } from "react-dom";
17
+
18
+ // .build/css/seekbuddy/date/fields.module.mjs
19
+ var id = "@seekbuddy/dsh-ui/seekbuddy/date/fields.module.css";
20
+ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id + '"]')) {
21
+ const element = document.createElement("style");
22
+ element.setAttribute("data-dsh-ui-primitives", id);
23
+ element.textContent = ".FzjDnq_field{display:inline-flex;position:relative}.FzjDnq_trigger{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);min-width:160px;height:32px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);cursor:pointer;text-align:left;align-items:center;gap:6px;padding:0 8px;font-size:14px;line-height:22px;display:inline-flex}.FzjDnq_trigger:hover:not(:disabled){border-color:var(--dsw-alias-border-l3)}.FzjDnq_trigger:focus-visible,.FzjDnq_open{border-color:var(--dsw-alias-state-business-primary);outline:none}.FzjDnq_trigger:disabled{cursor:not-allowed;opacity:.4}.FzjDnq_value{font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.FzjDnq_placeholder{color:var(--dsw-alias-label-dimmed)}.FzjDnq_icon{width:16px;height:16px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.FzjDnq_srOnly{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.FzjDnq_panel{z-index:1100;box-sizing:border-box;border-radius:var(--dsw-radius-lg);background:var(--dsw-specific-menu);backdrop-filter:var(--dsw-menu-backdrop-filter);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);padding:12px;position:fixed}";
24
+ document.head.appendChild(element);
25
+ }
26
+ var fields_module_default = { "placeholder": "FzjDnq_placeholder", "panel": "FzjDnq_panel", "value": "FzjDnq_value", "srOnly": "FzjDnq_srOnly", "icon": "FzjDnq_icon", "trigger": "FzjDnq_trigger", "open": "FzjDnq_open", "field": "FzjDnq_field" };
27
+
28
+ // src/seekbuddy/date/fields.tsx
29
+ import { jsx, jsxs } from "react/jsx-runtime";
30
+ var MEASURE_STYLE = { visibility: "hidden", left: 0, top: 0 };
31
+ function FieldShell({ labels, display, placeholder, disabled = false, icon, className, children }) {
32
+ const id2 = useId();
33
+ const rootRef = useRef(null);
34
+ const triggerRef = useRef(null);
35
+ const panelRef = useRef(null);
36
+ const [open, setOpen] = useState(false);
37
+ const position = useAnchoredPosition({ open, anchorRef: triggerRef, panelRef, gap: 4, margin: 8 });
38
+ useDismissOnOutsidePointer(rootRef, open, setOpen, panelRef);
39
+ const close = useCallback(() => {
40
+ setOpen(false);
41
+ triggerRef.current?.focus();
42
+ }, []);
43
+ const onPanelKeyDown = (event) => {
44
+ if (event.key !== "Escape") return;
45
+ event.stopPropagation();
46
+ close();
47
+ };
48
+ const onPanelBlur = (event) => {
49
+ const next = event.relatedTarget;
50
+ if (next instanceof Node && (panelRef.current?.contains(next) === true || rootRef.current?.contains(next) === true))
51
+ return;
52
+ if (next === null) return;
53
+ setOpen(false);
54
+ };
55
+ const panel = open && /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref: panelRef,
59
+ id: `${id2}-dialog`,
60
+ role: "dialog",
61
+ "aria-label": labels.open,
62
+ className: fields_module_default.panel,
63
+ style: position ?? MEASURE_STYLE,
64
+ onKeyDown: onPanelKeyDown,
65
+ onBlur: onPanelBlur,
66
+ children: children(close)
67
+ }
68
+ );
69
+ return /* @__PURE__ */ jsxs("span", { ref: rootRef, className: clsx(fields_module_default.field, className), children: [
70
+ /* @__PURE__ */ jsxs(
71
+ "button",
72
+ {
73
+ ref: triggerRef,
74
+ type: "button",
75
+ className: clsx(fields_module_default.trigger, open && fields_module_default.open),
76
+ disabled,
77
+ "aria-haspopup": "dialog",
78
+ "aria-expanded": open,
79
+ "aria-controls": open ? `${id2}-dialog` : void 0,
80
+ onClick: () => setOpen((current) => !current),
81
+ onKeyDown: (event) => {
82
+ if (event.key === "Escape" && open) close();
83
+ },
84
+ children: [
85
+ /* @__PURE__ */ jsx("span", { className: clsx(fields_module_default.value, display === null && fields_module_default.placeholder), children: display ?? placeholder ?? "" }),
86
+ /* @__PURE__ */ jsx("span", { className: fields_module_default.srOnly, children: labels.open }),
87
+ /* @__PURE__ */ jsx("span", { className: fields_module_default.icon, "aria-hidden": "true", children: icon })
88
+ ]
89
+ }
90
+ ),
91
+ panel !== false && createPortal(panel, document.body)
92
+ ] });
93
+ }
94
+ function CalendarGlyph() {
95
+ return /* @__PURE__ */ jsxs(
96
+ "svg",
97
+ {
98
+ viewBox: "0 0 16 16",
99
+ width: "16",
100
+ height: "16",
101
+ fill: "none",
102
+ stroke: "currentColor",
103
+ strokeWidth: "1.3",
104
+ strokeLinecap: "round",
105
+ children: [
106
+ /* @__PURE__ */ jsx("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "2" }),
107
+ /* @__PURE__ */ jsx("path", { d: "M2.5 6.5h11M5.5 2v3M10.5 2v3" })
108
+ ]
109
+ }
110
+ );
111
+ }
112
+ var slashes = (iso) => iso.replaceAll("-", "/");
113
+ function DateField({
114
+ formatValue,
115
+ placeholder,
116
+ disabled,
117
+ className,
118
+ labels,
119
+ onChange,
120
+ ...picker
121
+ }) {
122
+ const display = picker.value === null ? null : formatValue === void 0 ? slashes(picker.value) : formatValue(picker.value);
123
+ return /* @__PURE__ */ jsx(
124
+ FieldShell,
125
+ {
126
+ labels,
127
+ display,
128
+ placeholder,
129
+ disabled,
130
+ icon: /* @__PURE__ */ jsx(CalendarGlyph, {}),
131
+ className,
132
+ children: (close) => /* @__PURE__ */ jsx(
133
+ DatePicker,
134
+ {
135
+ ...picker,
136
+ labels,
137
+ autoFocus: true,
138
+ onChange: (date) => {
139
+ onChange(date);
140
+ close();
141
+ }
142
+ }
143
+ )
144
+ }
145
+ );
146
+ }
147
+ function DateRangeField({
148
+ formatValue,
149
+ placeholder,
150
+ disabled,
151
+ className,
152
+ labels,
153
+ onChange,
154
+ ...picker
155
+ }) {
156
+ const display = picker.value === null ? null : formatValue === void 0 ? `${slashes(picker.value.start)} - ${slashes(picker.value.end)}` : formatValue(picker.value);
157
+ return /* @__PURE__ */ jsx(
158
+ FieldShell,
159
+ {
160
+ labels,
161
+ display,
162
+ placeholder,
163
+ disabled,
164
+ icon: /* @__PURE__ */ jsx(CalendarGlyph, {}),
165
+ className,
166
+ children: (close) => /* @__PURE__ */ jsx(
167
+ DateRangePicker,
168
+ {
169
+ ...picker,
170
+ labels,
171
+ autoFocus: true,
172
+ onChange: (range) => {
173
+ onChange(range);
174
+ close();
175
+ },
176
+ onCancel: close
177
+ }
178
+ )
179
+ }
180
+ );
181
+ }
182
+ function TimeField({ formatValue, placeholder, disabled, className, labels, ...picker }) {
183
+ const display = picker.value === null ? null : formatValue === void 0 ? picker.value : formatValue(picker.value);
184
+ return /* @__PURE__ */ jsx(
185
+ FieldShell,
186
+ {
187
+ labels,
188
+ display,
189
+ placeholder,
190
+ disabled,
191
+ icon: /* @__PURE__ */ jsx(IconClockOutlineRegular, {}),
192
+ className,
193
+ children: () => /* @__PURE__ */ jsx(TimePicker, { ...picker, labels, autoFocus: true })
194
+ }
195
+ );
196
+ }
197
+
198
+ export {
199
+ DateField,
200
+ DateRangeField,
201
+ TimeField
202
+ };
@@ -0,0 +1,24 @@
1
+ // src/seekbuddy/SubtleButton.tsx
2
+ import clsx from "clsx";
3
+ import { forwardRef } from "react";
4
+ import { Button } from "@seekbuddy/dsh-ui";
5
+
6
+ // .build/css/seekbuddy/SubtleButton.module.mjs
7
+ var id = "@seekbuddy/dsh-ui/seekbuddy/SubtleButton.module.css";
8
+ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id + '"]')) {
9
+ const element = document.createElement("style");
10
+ element.setAttribute("data-dsh-ui-primitives", id);
11
+ element.textContent = ".n7ffrG_subtle{color:var(--dsw-alias-label-secondary)}.n7ffrG_subtle:hover:not(:disabled),.n7ffrG_subtle:active:not(:disabled){color:var(--dsw-alias-label-primary)}.n7ffrG_subtle:focus-visible{outline-offset:2px;outline-style:solid}";
12
+ document.head.appendChild(element);
13
+ }
14
+ var SubtleButton_module_default = { "subtle": "n7ffrG_subtle" };
15
+
16
+ // src/seekbuddy/SubtleButton.tsx
17
+ import { jsx } from "react/jsx-runtime";
18
+ var SubtleButton = forwardRef(function SubtleButton2({ className, ...rest }, ref) {
19
+ return /* @__PURE__ */ jsx(Button, { ...rest, ref, variant: "ghost", className: clsx(SubtleButton_module_default.subtle, className) });
20
+ });
21
+
22
+ export {
23
+ SubtleButton
24
+ };
@@ -0,0 +1,152 @@
1
+ // src/seekbuddy/date/date.ts
2
+ var ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
3
+ var ISO_MONTH = /^(\d{4})-(\d{2})$/;
4
+ var ISO_TIME = /^(\d{2}):(\d{2})$/;
5
+ var REFERENCE_SUNDAY_UTC = Date.UTC(2024, 0, 7);
6
+ var pad2 = (value) => String(value).padStart(2, "0");
7
+ var pad4 = (value) => String(value).padStart(4, "0");
8
+ function daysInMonth(y, m) {
9
+ return new Date(Date.UTC(y, m, 0)).getUTCDate();
10
+ }
11
+ function parseIsoDate(iso) {
12
+ const match = ISO_DATE.exec(iso);
13
+ if (match === null) throw new RangeError(`Invalid ISO date: ${iso}`);
14
+ const y = Number(match[1]);
15
+ const m = Number(match[2]);
16
+ const d = Number(match[3]);
17
+ if (m < 1 || m > 12 || d < 1 || d > daysInMonth(y, m)) throw new RangeError(`Invalid ISO date: ${iso}`);
18
+ return { y, m, d };
19
+ }
20
+ function formatIsoDate({ y, m, d }) {
21
+ return `${pad4(y)}-${pad2(m)}-${pad2(d)}`;
22
+ }
23
+ function parseIsoMonth(month) {
24
+ const match = ISO_MONTH.exec(month);
25
+ if (match === null) throw new RangeError(`Invalid ISO month: ${month}`);
26
+ const y = Number(match[1]);
27
+ const m = Number(match[2]);
28
+ if (m < 1 || m > 12) throw new RangeError(`Invalid ISO month: ${month}`);
29
+ return { y, m };
30
+ }
31
+ function formatIsoMonth(y, m) {
32
+ return `${pad4(y)}-${pad2(m)}`;
33
+ }
34
+ function monthOf(iso) {
35
+ const { y, m } = parseIsoDate(iso);
36
+ return formatIsoMonth(y, m);
37
+ }
38
+ function todayIso() {
39
+ const now = /* @__PURE__ */ new Date();
40
+ return formatIsoDate({ y: now.getFullYear(), m: now.getMonth() + 1, d: now.getDate() });
41
+ }
42
+ function fromUtc(ms) {
43
+ const date = new Date(ms);
44
+ return formatIsoDate({ y: date.getUTCFullYear(), m: date.getUTCMonth() + 1, d: date.getUTCDate() });
45
+ }
46
+ function addDays(iso, n) {
47
+ const { y, m, d } = parseIsoDate(iso);
48
+ return fromUtc(Date.UTC(y, m - 1, d + n));
49
+ }
50
+ function addMonths(month, n) {
51
+ const { y, m } = parseIsoMonth(month);
52
+ const total = y * 12 + (m - 1) + n;
53
+ return formatIsoMonth(Math.floor(total / 12), total % 12 + 1);
54
+ }
55
+ function addMonthsToDate(iso, n) {
56
+ const { d } = parseIsoDate(iso);
57
+ const { y, m } = parseIsoMonth(addMonths(monthOf(iso), n));
58
+ return formatIsoDate({ y, m, d: Math.min(d, daysInMonth(y, m)) });
59
+ }
60
+ function compareIso(a, b) {
61
+ if (a < b) return -1;
62
+ if (a > b) return 1;
63
+ return 0;
64
+ }
65
+ function weekdayOf(iso) {
66
+ const { y, m, d } = parseIsoDate(iso);
67
+ return new Date(Date.UTC(y, m - 1, d)).getUTCDay();
68
+ }
69
+ function weekOffset(iso, weekStart) {
70
+ return (weekdayOf(iso) - weekStart + 7) % 7;
71
+ }
72
+ function monthGrid(month, weekStart) {
73
+ const first = `${month}-01`;
74
+ const start = addDays(first, -weekOffset(first, weekStart));
75
+ const cells = [];
76
+ for (let index = 0; index < 42; index += 1) cells.push(addDays(start, index));
77
+ return cells;
78
+ }
79
+ function isInRange(iso, range) {
80
+ return compareIso(range.start, iso) <= 0 && compareIso(iso, range.end) <= 0;
81
+ }
82
+ function normalizeRange(a, b) {
83
+ return compareIso(a, b) <= 0 ? { start: a, end: b } : { start: b, end: a };
84
+ }
85
+ function isOutsideBounds(iso, min, max) {
86
+ return min !== void 0 && compareIso(iso, min) < 0 || max !== void 0 && compareIso(iso, max) > 0;
87
+ }
88
+ function weekdayNames(locale, weekStart, style = "short") {
89
+ const format = new Intl.DateTimeFormat(locale, { weekday: style, timeZone: "UTC" });
90
+ const names = [];
91
+ for (let index = 0; index < 7; index += 1) {
92
+ const weekday = (weekStart + index) % 7;
93
+ names.push(format.format(REFERENCE_SUNDAY_UTC + weekday * 864e5));
94
+ }
95
+ return names;
96
+ }
97
+ function monthTitle(locale, month) {
98
+ const { y, m } = parseIsoMonth(month);
99
+ return new Intl.DateTimeFormat(locale, { year: "numeric", month: "long", timeZone: "UTC" }).format(
100
+ Date.UTC(y, m - 1, 1)
101
+ );
102
+ }
103
+ function formatDate(locale, iso, options) {
104
+ const { y, m, d } = parseIsoDate(iso);
105
+ return new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(Date.UTC(y, m - 1, d));
106
+ }
107
+ function formatDateMedium(locale, iso) {
108
+ return formatDate(locale, iso, { year: "numeric", month: "short", day: "numeric", weekday: "short" });
109
+ }
110
+ function parseIsoTime(time) {
111
+ const match = ISO_TIME.exec(time);
112
+ if (match === null) throw new RangeError(`Invalid ISO time: ${time}`);
113
+ const h = Number(match[1]);
114
+ const min = Number(match[2]);
115
+ if (h > 23 || min > 59) throw new RangeError(`Invalid ISO time: ${time}`);
116
+ return { h, min };
117
+ }
118
+ function timeToMinutes(time) {
119
+ const { h, min } = parseIsoTime(time);
120
+ return h * 60 + min;
121
+ }
122
+ function minutesToTime(minutes) {
123
+ const wrapped = (Math.trunc(minutes) % 1440 + 1440) % 1440;
124
+ return `${pad2(Math.floor(wrapped / 60))}:${pad2(wrapped % 60)}`;
125
+ }
126
+ function clampTime(time, min, max) {
127
+ let minutes = timeToMinutes(time);
128
+ if (min !== void 0) minutes = Math.max(minutes, timeToMinutes(min));
129
+ if (max !== void 0) minutes = Math.min(minutes, timeToMinutes(max));
130
+ return minutesToTime(minutes);
131
+ }
132
+
133
+ export {
134
+ monthOf,
135
+ todayIso,
136
+ addDays,
137
+ addMonths,
138
+ addMonthsToDate,
139
+ compareIso,
140
+ weekOffset,
141
+ monthGrid,
142
+ isInRange,
143
+ normalizeRange,
144
+ isOutsideBounds,
145
+ weekdayNames,
146
+ monthTitle,
147
+ formatDateMedium,
148
+ parseIsoTime,
149
+ timeToMinutes,
150
+ minutesToTime,
151
+ clampTime
152
+ };
@@ -0,0 +1,61 @@
1
+ // src/seekbuddy/Switch.tsx
2
+ import clsx from "clsx";
3
+ import { useState } from "react";
4
+
5
+ // .build/css/seekbuddy/Switch.module.mjs
6
+ var id = "@seekbuddy/dsh-ui/seekbuddy/Switch.module.css";
7
+ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id + '"]')) {
8
+ const element = document.createElement("style");
9
+ element.setAttribute("data-dsh-ui-primitives", id);
10
+ element.textContent = "._3Mj9Ga_switch{--switch-height:20px;--switch-thumb:16px;--switch-pad:2px;appearance:none;box-sizing:border-box;min-width:calc(var(--switch-height) * 1.8);height:var(--switch-height);min-height:0;padding:var(--switch-pad);corner-shape:round;background:color-mix(in srgb, var(--dsw-alias-label-primary) 40%, transparent);color:var(--dsw-alias-label-primary-foreground);cursor:pointer;vertical-align:middle;border:0;border-radius:999px;flex:none;align-items:center;margin:0;display:inline-flex;position:relative}._3Mj9Ga_large{--switch-height:22px;--switch-thumb:18px}._3Mj9Ga_small{--switch-height:16px;--switch-thumb:12px}._3Mj9Ga_on{background:var(--dsw-alias-brand-primary)}._3Mj9Ga_switch:disabled{cursor:not-allowed;opacity:.5}._3Mj9Ga_switch:focus-visible{outline-offset:2px;outline-style:solid}._3Mj9Ga_thumb{top:var(--switch-pad);width:var(--switch-thumb);height:var(--switch-thumb);corner-shape:round;background:var(--dsw-alias-switch-thumb);border-radius:50%;position:absolute;inset-inline-start:var(--switch-pad)}._3Mj9Ga_on ._3Mj9Ga_thumb{background:var(--dsw-alias-label-primary-foreground);inset-inline-start:calc(100% - var(--switch-thumb) - var(--switch-pad))}._3Mj9Ga_inner{min-width:0;padding-inline:calc(var(--switch-thumb) + var(--switch-pad) + 4px) 6px;font:var(--dsw-font-xxs-12);white-space:nowrap;align-items:center;line-height:1;display:inline-flex}._3Mj9Ga_large ._3Mj9Ga_inner{padding-inline:calc(var(--switch-thumb) + var(--switch-pad) + 5px) 8px;font:var(--dsw-font-xs-13);line-height:1}._3Mj9Ga_small ._3Mj9Ga_inner{padding-inline:calc(var(--switch-thumb) + var(--switch-pad) + 3px) 5px;font:var(--dsw-font-xxxs-11);line-height:1}._3Mj9Ga_on ._3Mj9Ga_inner{padding-inline:6px calc(var(--switch-thumb) + var(--switch-pad) + 4px)}._3Mj9Ga_on._3Mj9Ga_large ._3Mj9Ga_inner{padding-inline:8px calc(var(--switch-thumb) + var(--switch-pad) + 5px)}._3Mj9Ga_on._3Mj9Ga_small ._3Mj9Ga_inner{padding-inline:5px calc(var(--switch-thumb) + var(--switch-pad) + 3px)}";
11
+ document.head.appendChild(element);
12
+ }
13
+ var Switch_module_default = { "thumb": "_3Mj9Ga_thumb", "inner": "_3Mj9Ga_inner", "on": "_3Mj9Ga_on", "large": "_3Mj9Ga_large", "switch": "_3Mj9Ga_switch", "small": "_3Mj9Ga_small" };
14
+
15
+ // src/seekbuddy/Switch.tsx
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function Switch({
18
+ checked,
19
+ defaultChecked,
20
+ defaultValue,
21
+ checkedChildren,
22
+ unCheckedChildren,
23
+ disabled,
24
+ size = "medium",
25
+ onChange,
26
+ onClick,
27
+ className,
28
+ ...rest
29
+ }) {
30
+ const [inner, setInner] = useState(defaultChecked ?? defaultValue ?? false);
31
+ const isControlled = checked !== void 0;
32
+ const on = isControlled ? checked : inner;
33
+ const hasChildren = checkedChildren !== void 0 || unCheckedChildren !== void 0;
34
+ return /* @__PURE__ */ jsxs(
35
+ "button",
36
+ {
37
+ ...rest,
38
+ type: "button",
39
+ role: "switch",
40
+ "aria-checked": on,
41
+ disabled,
42
+ className: clsx(Switch_module_default.switch, Switch_module_default[size], on && Switch_module_default.on, hasChildren && Switch_module_default.withChildren, className),
43
+ onClick: (event) => {
44
+ if (disabled) return;
45
+ const next = !on;
46
+ onClick?.(next, event);
47
+ if (event.defaultPrevented) return;
48
+ if (!isControlled) setInner(next);
49
+ onChange?.(next, event);
50
+ },
51
+ children: [
52
+ /* @__PURE__ */ jsx("span", { className: Switch_module_default.thumb, "aria-hidden": "true" }),
53
+ hasChildren && /* @__PURE__ */ jsx("span", { className: Switch_module_default.inner, children: on ? checkedChildren : unCheckedChildren })
54
+ ]
55
+ }
56
+ );
57
+ }
58
+
59
+ export {
60
+ Switch
61
+ };
@@ -0,0 +1,22 @@
1
+ // src/seekbuddy/Card.tsx
2
+ import clsx from "clsx";
3
+
4
+ // .build/css/seekbuddy/Card.module.mjs
5
+ var id = "@seekbuddy/dsh-ui/seekbuddy/Card.module.css";
6
+ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id + '"]')) {
7
+ const element = document.createElement("style");
8
+ element.setAttribute("data-dsh-ui-primitives", id);
9
+ element.textContent = ".wbxAxW_card{--card-pad:16px;box-sizing:border-box;padding:var(--card-pad);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);--dsw-elevation-stroke-color:var(--dsw-alias-border-l3);box-shadow:var(--dsw-elevation-panel);border:0;margin:0;list-style:none}.wbxAxW_none{--card-pad:0}.wbxAxW_sm{--card-pad:14px}.wbxAxW_md{--card-pad:16px}.wbxAxW_interactive{cursor:pointer}.wbxAxW_interactive:hover{background-image:linear-gradient(var(--dsw-alias-interactive-bg-hover), var(--dsw-alias-interactive-bg-hover))}.wbxAxW_card:focus-visible{outline-offset:2px;outline-style:solid}";
10
+ document.head.appendChild(element);
11
+ }
12
+ var Card_module_default = { "sm": "wbxAxW_sm", "md": "wbxAxW_md", "card": "wbxAxW_card", "interactive": "wbxAxW_interactive", "none": "wbxAxW_none" };
13
+
14
+ // src/seekbuddy/Card.tsx
15
+ import { jsx } from "react/jsx-runtime";
16
+ function Card({ padding = "md", interactive = false, as: Element = "div", className, ...rest }) {
17
+ return /* @__PURE__ */ jsx(Element, { ...rest, className: clsx(Card_module_default.card, Card_module_default[padding], interactive && Card_module_default.interactive, className) });
18
+ }
19
+
20
+ export {
21
+ Card
22
+ };
@@ -0,0 +1,170 @@
1
+ import {
2
+ Spinner
3
+ } from "./chunk-EWAZFWLW.js";
4
+
5
+ // src/seekbuddy/Message.tsx
6
+ import clsx from "clsx";
7
+ import { createContext, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
8
+ import { createPortal } from "react-dom";
9
+ import { IconCheckOutlineRegular, IconCloseOutlineRegular, IconWarningOutlineRegular } from "@seekbuddy/dsh-ui/icons";
10
+
11
+ // .build/css/seekbuddy/Message.module.mjs
12
+ var id = "@seekbuddy/dsh-ui/seekbuddy/Message.module.css";
13
+ if (typeof document !== "undefined" && !document.querySelector('style[data-dsh-ui-primitives="' + id + '"]')) {
14
+ const element = document.createElement("style");
15
+ element.setAttribute("data-dsh-ui-primitives", id);
16
+ element.textContent = ".Hl-94G_stack{z-index:1100;pointer-events:none;flex-direction:column;align-items:center;gap:8px;max-width:min(560px,100vw - 48px);display:flex;position:fixed;top:120px;left:50%;transform:translate(-50%)}.Hl-94G_message{box-sizing:border-box;border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-button-contrast-fill);max-width:100%;color:var(--dsw-alias-label-primary-inverted);font:var(--dsw-font-s-14);box-shadow:var(--dsw-shadow-lv3);align-items:center;gap:10px;padding:12px 16px;animation:.16s ease-out Hl-94G_seekbuddy-message-in;display:flex}.Hl-94G_leaving{animation:1s forwards Hl-94G_seekbuddy-message-out}.Hl-94G_icon{flex:none;place-items:center;display:grid}.Hl-94G_content{min-width:0}.Hl-94G_success .Hl-94G_icon{color:var(--dsw-alias-state-success-primary)}.Hl-94G_error .Hl-94G_icon{color:var(--dsw-alias-state-error-primary)}.Hl-94G_warning .Hl-94G_icon{color:var(--dsw-alias-state-warn-label)}@keyframes Hl-94G_seekbuddy-message-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}@keyframes Hl-94G_seekbuddy-message-out{to{opacity:0}}@media (prefers-reduced-motion:reduce){.Hl-94G_message{animation:none}.Hl-94G_leaving{animation:1s forwards Hl-94G_seekbuddy-message-out}}";
17
+ document.head.appendChild(element);
18
+ }
19
+ var Message_module_default = { "content": "Hl-94G_content", "success": "Hl-94G_success", "warning": "Hl-94G_warning", "stack": "Hl-94G_stack", "leaving": "Hl-94G_leaving", "icon": "Hl-94G_icon", "message": "Hl-94G_message", "seekbuddy-message-out": "Hl-94G_seekbuddy-message-out", "error": "Hl-94G_error", "seekbuddy-message-in": "Hl-94G_seekbuddy-message-in" };
20
+
21
+ // src/seekbuddy/Message.tsx
22
+ import { jsx, jsxs } from "react/jsx-runtime";
23
+ var FADE_MS = 1e3;
24
+ var DEFAULT_DURATION = 3;
25
+ var MessageContext = createContext(null);
26
+ function MessageProvider({ top = 120, maxCount = 3, children }) {
27
+ const prefix = useId();
28
+ const sequence = useRef(0);
29
+ const store = useRef([]);
30
+ const [entries, setEntries] = useState([]);
31
+ const autoTimers = useRef(/* @__PURE__ */ new Map());
32
+ const leaveTimers = useRef(/* @__PURE__ */ new Map());
33
+ const settings = useRef({ maxCount });
34
+ settings.current.maxCount = maxCount;
35
+ useEffect(() => {
36
+ const auto = autoTimers.current;
37
+ const leave = leaveTimers.current;
38
+ return () => {
39
+ for (const timer of auto.values()) clearTimeout(timer);
40
+ for (const timer of leave.values()) clearTimeout(timer);
41
+ auto.clear();
42
+ leave.clear();
43
+ };
44
+ }, []);
45
+ const api = useMemo(() => {
46
+ const sync = () => setEntries(store.current.slice());
47
+ const clearTimers = (id2) => {
48
+ const auto = autoTimers.current.get(id2);
49
+ if (auto !== void 0) clearTimeout(auto);
50
+ autoTimers.current.delete(id2);
51
+ const leave = leaveTimers.current.get(id2);
52
+ if (leave !== void 0) clearTimeout(leave);
53
+ leaveTimers.current.delete(id2);
54
+ };
55
+ const close = (id2) => {
56
+ const entry = store.current.find((item) => item.id === id2);
57
+ if (entry === void 0 || entry.leaving) return;
58
+ clearTimers(id2);
59
+ entry.leaving = true;
60
+ sync();
61
+ leaveTimers.current.set(
62
+ id2,
63
+ setTimeout(() => {
64
+ leaveTimers.current.delete(id2);
65
+ store.current = store.current.filter((item) => item.id !== id2);
66
+ sync();
67
+ entry.onClose?.();
68
+ }, FADE_MS)
69
+ );
70
+ };
71
+ const open = (options) => {
72
+ const type = options.type ?? "info";
73
+ sequence.current += 1;
74
+ const id2 = options.key ?? `${prefix}-${sequence.current}`;
75
+ const duration = options.duration ?? (type === "loading" ? 0 : DEFAULT_DURATION);
76
+ clearTimers(id2);
77
+ const entry = {
78
+ id: id2,
79
+ type,
80
+ content: options.content,
81
+ icon: options.icon,
82
+ onClose: options.onClose,
83
+ leaving: false
84
+ };
85
+ const index = store.current.findIndex((item) => item.id === id2);
86
+ if (index === -1) store.current = [...store.current, entry];
87
+ else store.current = store.current.map((item, position) => position === index ? entry : item);
88
+ const live = store.current.filter((item) => !item.leaving);
89
+ for (const stale of live.slice(0, Math.max(0, live.length - settings.current.maxCount))) close(stale.id);
90
+ sync();
91
+ if (duration > 0)
92
+ autoTimers.current.set(
93
+ id2,
94
+ setTimeout(() => close(id2), duration * 1e3)
95
+ );
96
+ return () => close(id2);
97
+ };
98
+ const shorthand = (type) => (content, duration) => open({ type, content, duration });
99
+ return {
100
+ open,
101
+ success: shorthand("success"),
102
+ info: shorthand("info"),
103
+ warning: shorthand("warning"),
104
+ error: shorthand("error"),
105
+ loading: shorthand("loading"),
106
+ destroy: (key) => {
107
+ if (key !== void 0) close(key);
108
+ else for (const entry of store.current) close(entry.id);
109
+ }
110
+ };
111
+ }, [prefix]);
112
+ return /* @__PURE__ */ jsxs(MessageContext.Provider, { value: api, children: [
113
+ children,
114
+ entries.length > 0 && typeof document !== "undefined" ? createPortal(
115
+ /* @__PURE__ */ jsx("div", { className: Message_module_default.stack, style: { top }, children: entries.map((entry) => /* @__PURE__ */ jsxs(
116
+ "div",
117
+ {
118
+ className: clsx(Message_module_default.message, Message_module_default[entry.type], entry.leaving && Message_module_default.leaving),
119
+ role: entry.type === "error" ? "alert" : "status",
120
+ "data-type": entry.type,
121
+ children: [
122
+ /* @__PURE__ */ jsx("span", { className: Message_module_default.icon, "aria-hidden": "true", children: entry.icon === void 0 ? defaultIcon(entry.type) : entry.icon }),
123
+ /* @__PURE__ */ jsx("span", { className: Message_module_default.content, children: entry.content })
124
+ ]
125
+ },
126
+ entry.id
127
+ )) }),
128
+ document.body
129
+ ) : null
130
+ ] });
131
+ }
132
+ function useMessage() {
133
+ const api = useContext(MessageContext);
134
+ if (api === null) throw new Error("useMessage() must be called inside a <MessageProvider>");
135
+ return api;
136
+ }
137
+ function defaultIcon(type) {
138
+ if (type === "success") return /* @__PURE__ */ jsx(IconCheckOutlineRegular, {});
139
+ if (type === "error") return /* @__PURE__ */ jsx(IconCloseOutlineRegular, {});
140
+ if (type === "warning") return /* @__PURE__ */ jsx(IconWarningOutlineRegular, { size: 14 });
141
+ if (type === "loading") return /* @__PURE__ */ jsx(Spinner, { size: "sm" });
142
+ return /* @__PURE__ */ jsx(InfoGlyph, {});
143
+ }
144
+ function InfoGlyph() {
145
+ return /* @__PURE__ */ jsxs(
146
+ "svg",
147
+ {
148
+ width: 16,
149
+ height: 16,
150
+ viewBox: "0 0 24 24",
151
+ fill: "none",
152
+ stroke: "currentColor",
153
+ strokeWidth: "2",
154
+ strokeLinecap: "round",
155
+ strokeLinejoin: "round",
156
+ "aria-hidden": "true",
157
+ focusable: "false",
158
+ children: [
159
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
160
+ /* @__PURE__ */ jsx("path", { d: "M12 11v5" }),
161
+ /* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
162
+ ]
163
+ }
164
+ );
165
+ }
166
+
167
+ export {
168
+ MessageProvider,
169
+ useMessage
170
+ };