@parallelworks/ui 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/chunks/BareModal-DBa84JZO.js +80 -0
  2. package/dist/chunks/{CodePreviewEditor-CSPRILMp.js → CodePreviewEditor-CBtYRZi6.js} +2 -1
  3. package/dist/chunks/CreateModal-6zZZHxCI.js +595 -0
  4. package/dist/chunks/Loader-BXoXTZGc.js +47 -0
  5. package/dist/chunks/{Monaco-CC4ak1JG.js → Monaco-CvFXoW3r.js} +11 -5
  6. package/dist/chunks/{Provider-DvVvScTQ.js → Provider-jQCAN3NN.js} +73 -2
  7. package/dist/chunks/{SwitchToggle-2uRw8ZeJ.js → SwitchToggle-D0ud8cd5.js} +36 -29
  8. package/dist/chunks/{Table-C5z6qWjM.js → Table-ByziK93x.js} +1 -1
  9. package/dist/chunks/{editor-D55tumuZ.js → editor-CEXg6C8X.js} +5 -41
  10. package/dist/chunks/list-CvDWt0TC.js +1259 -0
  11. package/dist/chunks/useCssIsDark-DHr05dG2.js +38 -0
  12. package/dist/components/AddMenu.d.ts +17 -0
  13. package/dist/components/BareModal.d.ts +17 -0
  14. package/dist/components/Button.d.ts +18 -0
  15. package/dist/components/Card.d.ts +19 -0
  16. package/dist/components/ConfirmModal.d.ts +17 -0
  17. package/dist/components/CreateModal.d.ts +92 -0
  18. package/dist/components/Filter.d.ts +15 -0
  19. package/dist/components/FilterPill.d.ts +7 -0
  20. package/dist/components/IconButton.d.ts +17 -0
  21. package/dist/components/Input.d.ts +14 -0
  22. package/dist/components/LetterBadge.d.ts +6 -0
  23. package/dist/components/Loader.d.ts +2 -1
  24. package/dist/components/Pagination.d.ts +15 -0
  25. package/dist/components/Provider.d.ts +39 -12
  26. package/dist/components/SettingModeOption.d.ts +13 -0
  27. package/dist/components/SettingRow.d.ts +18 -0
  28. package/dist/components/SettingsCard.d.ts +24 -0
  29. package/dist/components/SettingsGroup.d.ts +8 -0
  30. package/dist/components/Sort.d.ts +9 -0
  31. package/dist/components/Toggle.d.ts +6 -0
  32. package/dist/components/dropdownUtils.d.ts +10 -0
  33. package/dist/components/ghostButton.d.ts +4 -0
  34. package/dist/components/inputClasses.d.ts +1 -0
  35. package/dist/editor/index.d.ts +0 -1
  36. package/dist/editor/index.js +2 -2
  37. package/dist/file-explorer/index.js +27 -28
  38. package/dist/form/index.js +4 -4
  39. package/dist/index.d.ts +21 -1
  40. package/dist/index.js +433 -8
  41. package/dist/list/HoverCard.d.ts +22 -0
  42. package/dist/list/ListPager.d.ts +7 -0
  43. package/dist/list/ListViewControls.d.ts +12 -0
  44. package/dist/list/index.d.ts +6 -0
  45. package/dist/list/index.js +2 -2
  46. package/dist/list/listSearch.d.ts +27 -0
  47. package/dist/list/listView.d.ts +129 -0
  48. package/dist/list/textEntry.d.ts +2 -0
  49. package/dist/logviewer/index.js +1 -1
  50. package/dist/styles/theme.css +21 -0
  51. package/dist/styles.css +1 -1
  52. package/dist/workflow/index.js +8 -8
  53. package/package.json +2 -6
  54. package/dist/chunks/Loader-DQiZ75fa.js +0 -25
  55. package/dist/chunks/Markdown-C5Re2ezs.js +0 -101
  56. package/dist/chunks/Modal-sOUEwebV.js +0 -121
  57. package/dist/chunks/list-7PyDF1tz.js +0 -465
  58. package/dist/components/Modal.d.ts +0 -26
  59. /package/dist/{editor → components}/useCssIsDark.d.ts +0 -0
@@ -1,10 +1,10 @@
1
1
  import { AngleRightIcon, EyeIcon, EyeOffIcon, SuccessCheckmark, TrashIcon } from "../icons.js";
2
- import { c as useStrings, s as useSlots } from "../chunks/Provider-DvVvScTQ.js";
2
+ import { c as useStrings, s as useSlots } from "../chunks/Provider-jQCAN3NN.js";
3
3
  import { n as TOOLTIP_ID, r as TooltipInfo } from "../chunks/Tooltip-WgbiC_nd.js";
4
- import { a as UncontrolledCollapsiblePanel, c as Dropdown, f as isCategory, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-2uRw8ZeJ.js";
5
- import { t as Loader } from "../chunks/Loader-DQiZ75fa.js";
4
+ import { a as UncontrolledCollapsiblePanel, c as Dropdown, f as isCategory, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-D0ud8cd5.js";
5
+ import { t as Loader } from "../chunks/Loader-BXoXTZGc.js";
6
6
  import { n as StatusDot } from "../chunks/StatusBadge-DXp4zkSd.js";
7
- import { n as Table } from "../chunks/Table-C5z6qWjM.js";
7
+ import { n as Table } from "../chunks/Table-ByziK93x.js";
8
8
  import { a as resolvedFlag, c as FieldWrapper, i as initializeValues, n as flattenGroups, o as applySecondaryField, r as impureSetValueFromPath, s as findSecondaryOption, t as enforceOneMustBeTrue } from "../chunks/lib-DTgL8klR.js";
9
9
  import cx from "classnames";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
package/dist/index.d.ts CHANGED
@@ -13,10 +13,15 @@ export { default as CustomListbox } from './components/Listbox.js';
13
13
  export { default as Loader } from './components/Loader.js';
14
14
  export { default as Markdown } from './components/Markdown.js';
15
15
  export type { MarkdownProps } from './components/Markdown.js';
16
- export { default as Modal, type ModalProps } from './components/Modal.js';
16
+ export { BareModal, modalPanelClasses } from './components/BareModal.js';
17
+ export { ConfirmModal } from './components/ConfirmModal.js';
18
+ export { CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, type CreateModalSelectOption, CreateModalSwitch, CreateModalTextarea, } from './components/CreateModal.js';
19
+ export { AddMenu, type HeaderAddMenuItem } from './components/AddMenu.js';
20
+ export { dangerButtonClasses, ghostButtonClasses, primaryButtonClasses, } from './components/ghostButton.js';
17
21
  export { default as MultiSelectDropdown } from './components/MultiSelect.js';
18
22
  export { Overview } from './components/Overview.js';
19
23
  export { UIProvider, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowJsonResolver, type RunFileResult, type WorkflowJsonRef, type UIData, type UINavigation, type UINotify, type UISlots, type UIStrings, } from './components/Provider.js';
24
+ export { useCssIsDark } from './components/useCssIsDark.js';
20
25
  export { Indicator } from './components/Indicator.js';
21
26
  export { ControlledCollapsiblePanel, MaybeCollapsible, UncontrolledCollapsiblePanel, } from './components/CollapsiblePanel.js';
22
27
  export { default as SectionHeader } from './components/SectionHeader.js';
@@ -25,3 +30,18 @@ export { StatusBadge, StatusDot } from './components/StatusBadge.js';
25
30
  export { default as SwitchToggle } from './components/SwitchToggle.js';
26
31
  export { CompactTable, Table } from './components/Table.js';
27
32
  export { formatTooltipContent, GlobalTooltip, TOOLTIP_ID, TooltipInfo, } from './components/Tooltip.js';
33
+ export { Button, MethodButton } from './components/Button.js';
34
+ export { Card, CardHeader } from './components/Card.js';
35
+ export { Input, Textarea } from './components/Input.js';
36
+ export { inputClasses } from './components/inputClasses.js';
37
+ export { IconButton } from './components/IconButton.js';
38
+ export { Toggle } from './components/Toggle.js';
39
+ export { LetterBadge } from './components/LetterBadge.js';
40
+ export { FilterPill } from './components/FilterPill.js';
41
+ export { default as Filter } from './components/Filter.js';
42
+ export { default as Sort, type TDirection } from './components/Sort.js';
43
+ export { Pagination } from './components/Pagination.js';
44
+ export { default as SettingsCard } from './components/SettingsCard.js';
45
+ export { default as SettingsGroup } from './components/SettingsGroup.js';
46
+ export { SettingRow, SettingSection } from './components/SettingRow.js';
47
+ export { SettingModeOption } from './components/SettingModeOption.js';
package/dist/index.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import { DEFAULT_PRESET, THEME_PRESETS, THEME_TOKENS, applyTheme, contrastRatio, deriveTheme, isDarkColor } from "./theme/index.js";
2
- import { i as Callout, n as CopyCodeBlock, r as CopyToClipboard, t as Markdown } from "./chunks/Markdown-C5Re2ezs.js";
3
- import { a as useProvisionCorsRules, c as useStrings, i as useNotify, l as useWorkflowJsonResolver, o as useRunFile, r as useNavigation, s as useSlots, t as UIProvider } from "./chunks/Provider-DvVvScTQ.js";
2
+ import { AlertIcon, AngleRightIcon, EyeIcon, EyeOffIcon, FilterIcon, LoaderIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon } from "./icons.js";
3
+ import { a as CreateModalSwitch, c as ConfirmModal, d as primaryButtonClasses, f as Markdown, h as Callout, i as CreateModalSelect, l as dangerButtonClasses, m as CopyToClipboard, n as CreateModalAutocompleteField, o as CreateModalTextarea, p as CopyCodeBlock, r as CreateModalField, s as AddMenu, t as CreateModal, u as ghostButtonClasses } from "./chunks/CreateModal-6zZZHxCI.js";
4
+ import { a as useProvisionCorsRules, c as useStrings, i as useNotify, l as useWorkflowJsonResolver, n as useLink, o as useRunFile, r as useNavigation, s as useSlots, t as UIProvider } from "./chunks/Provider-jQCAN3NN.js";
4
5
  import { i as formatTooltipContent, n as TOOLTIP_ID, r as TooltipInfo, t as GlobalTooltip } from "./chunks/Tooltip-WgbiC_nd.js";
5
- import { a as UncontrolledCollapsiblePanel, c as Dropdown, d as flattenOptions, f as isCategory, i as MaybeCollapsible, l as DropdownCaret, n as SectionHeader, o as MultiSelectDropdown, p as isOption, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle, u as filterOption } from "./chunks/SwitchToggle-2uRw8ZeJ.js";
6
- import { t as Loader } from "./chunks/Loader-DQiZ75fa.js";
7
- import { t as Modal } from "./chunks/Modal-sOUEwebV.js";
6
+ import { a as UncontrolledCollapsiblePanel, c as Dropdown, d as flattenOptions, f as isCategory, i as MaybeCollapsible, l as DropdownCaret, n as SectionHeader, o as MultiSelectDropdown, p as isOption, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle, u as filterOption } from "./chunks/SwitchToggle-D0ud8cd5.js";
7
+ import { t as Loader } from "./chunks/Loader-BXoXTZGc.js";
8
+ import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-DBa84JZO.js";
9
+ import { t as useCssIsDark } from "./chunks/useCssIsDark-DHr05dG2.js";
8
10
  import { t as Indicator } from "./chunks/Indicator-hBSIxOPK.js";
9
11
  import { t as SwitchToggleSmall } from "./chunks/SwitchToggleSmall-FcsaYSTs.js";
10
12
  import { n as StatusDot, t as StatusBadge } from "./chunks/StatusBadge-DXp4zkSd.js";
11
- import { n as Table, t as CompactTable } from "./chunks/Table-C5z6qWjM.js";
13
+ import { n as Table, t as CompactTable } from "./chunks/Table-ByziK93x.js";
12
14
  import cx from "classnames";
13
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- import React from "react";
16
+ import React, { forwardRef, useState } from "react";
15
17
  import Skeleton from "react-loading-skeleton";
16
18
  //#region src/components/DescriptionList.tsx
17
19
  function DescriptionListItem({ label, children, tooltip, className, ...props }) {
@@ -110,4 +112,427 @@ function Overview({ Icon, name, type, children, right, className, loading, iconS
110
112
  });
111
113
  }
112
114
  //#endregion
113
- export { Callout, CompactTable, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, GlobalTooltip, Indicator, Loader, Markdown, MaybeCollapsible, Modal, MultiSelectDropdown, Overview, SectionHeader, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, contrastRatio, deriveTheme, filterOption, flattenOptions, formatTooltipContent, isCategory, isDarkColor, isOption, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowJsonResolver };
115
+ //#region src/components/Button.tsx
116
+ var Button = forwardRef(({ children, variant = "primary", size = "default", loading, icon, iconPosition = "right", fullWidth = true, className = "", disabled, ...props }, ref) => {
117
+ const baseClasses = "inline-flex items-center justify-center gap-2 font-semibold rounded-lg transition-all duration-200 cursor-pointer border-none mt-2 disabled:opacity-50 disabled:cursor-not-allowed";
118
+ const variantClasses = {
119
+ primary: "bg-gradient-to-br from-[var(--gradient-start,var(--theme-element))] to-[var(--gradient-mid,var(--theme-link))] text-white shadow-[0_4px_14px_0_rgba(59,130,246,0.3)] hover:enabled:-translate-y-0.5 hover:enabled:shadow-[0_6px_20px_0_rgba(59,130,246,0.4)] active:enabled:translate-y-0",
120
+ secondary: "bg-[var(--theme-muted-panel-bg)] text-[var(--theme-app)] border border-[var(--theme-border)] hover:enabled:bg-[var(--theme-border)]",
121
+ outline: "bg-transparent text-[var(--theme-app)] border border-[var(--theme-border)] hover:enabled:bg-[var(--theme-muted-panel-bg)] hover:enabled:border-[var(--theme-muted-text-color)]",
122
+ ghost: "bg-transparent text-[var(--theme-muted-text-color)] hover:enabled:text-[var(--theme-app)] hover:enabled:bg-[var(--theme-muted-panel-bg)]"
123
+ };
124
+ const sizeClasses = {
125
+ sm: "py-2 px-4 text-[0.8125rem]",
126
+ default: "py-3 px-5 text-sm",
127
+ lg: "py-4 px-6 text-base"
128
+ };
129
+ const widthClass = fullWidth ? "w-full" : "w-auto";
130
+ return /* @__PURE__ */ jsx("button", {
131
+ ref,
132
+ disabled: disabled || loading,
133
+ className: cx(baseClasses, variantClasses[variant], sizeClasses[size], widthClass, className),
134
+ ...props,
135
+ children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LoaderIcon, { className: "size-[18px]" }), children] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
136
+ icon && iconPosition === "left" && /* @__PURE__ */ jsx("span", {
137
+ className: "flex items-center",
138
+ children: icon
139
+ }),
140
+ children,
141
+ icon && iconPosition === "right" && /* @__PURE__ */ jsx("span", {
142
+ className: "flex items-center",
143
+ children: icon
144
+ })
145
+ ] })
146
+ });
147
+ });
148
+ Button.displayName = "Button";
149
+ function MethodButton({ icon, label, description, href, className = "", ...props }) {
150
+ const Link = useLink();
151
+ const baseClasses = "flex items-center w-full p-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-xl text-[var(--theme-app)] text-[0.9375rem] font-medium cursor-pointer transition-all duration-200 no-underline mb-3 last:mb-0 hover:bg-[var(--theme-border)] hover:border-[var(--theme-muted-text-color)] hover:-translate-y-0.5 active:translate-y-0";
152
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
153
+ icon && /* @__PURE__ */ jsx("span", {
154
+ className: "size-10 rounded-lg bg-gradient-to-br from-[var(--gradient-start,var(--theme-element))] to-[var(--gradient-mid,var(--theme-link))] flex items-center justify-center shrink-0 mr-4 [&_svg]:size-5 [&_svg]:text-white",
155
+ children: icon
156
+ }),
157
+ /* @__PURE__ */ jsxs("span", {
158
+ className: "flex-1 text-left",
159
+ children: [/* @__PURE__ */ jsx("span", {
160
+ className: "block font-semibold text-[var(--theme-app)]",
161
+ children: label
162
+ }), description && /* @__PURE__ */ jsx("span", {
163
+ className: "block text-[0.8125rem] text-[var(--theme-muted-text-color)] font-normal mt-0.5",
164
+ children: description
165
+ })]
166
+ }),
167
+ /* @__PURE__ */ jsx(AngleRightIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2 transition-all duration-200 group-hover:translate-x-[3px] group-hover:text-[var(--theme-app)]" })
168
+ ] });
169
+ if (href) {
170
+ if (href.startsWith("/api/") || href.startsWith("http")) return /* @__PURE__ */ jsx("a", {
171
+ href,
172
+ className: cx("group", baseClasses, className),
173
+ children: content
174
+ });
175
+ return /* @__PURE__ */ jsx(Link, {
176
+ to: href,
177
+ className: cx("group", baseClasses, className),
178
+ children: content
179
+ });
180
+ }
181
+ return /* @__PURE__ */ jsx("button", {
182
+ className: cx("group", baseClasses, className),
183
+ ...props,
184
+ children: content
185
+ });
186
+ }
187
+ //#endregion
188
+ //#region src/components/Card.tsx
189
+ function Card({ children, className = "", wide, compact, interactive, authShadow }) {
190
+ return /* @__PURE__ */ jsx("div", {
191
+ className: cx("w-full bg-[var(--theme-panel-bg)] backdrop-blur-xl border border-[var(--theme-border)] rounded-2xl", authShadow ? "shadow-[0_25px_80px_-20px_rgba(0,0,0,0.4),0_10px_30px_-10px_rgba(0,0,0,0.25)]" : "shadow-md", wide && "max-w-[560px] p-8", compact && "max-w-[400px] p-6", !wide && !compact && "max-w-[520px] p-10", interactive && "ds-card-interactive cursor-pointer", className),
192
+ children
193
+ });
194
+ }
195
+ function CardHeader({ badge, title, description, className = "", align = "center" }) {
196
+ return /* @__PURE__ */ jsxs("div", {
197
+ className: cx(align === "center" ? "text-center" : "text-left", "mb-6", className),
198
+ children: [
199
+ badge && /* @__PURE__ */ jsx("div", {
200
+ className: "inline-flex items-center gap-1.5 py-1.5 px-3 text-xs font-medium bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-full text-[var(--theme-muted-text-color)] mb-4 transition-colors duration-200",
201
+ children: badge
202
+ }),
203
+ /* @__PURE__ */ jsx("h1", {
204
+ className: "text-2xl font-bold tracking-tight text-[var(--theme-app)]",
205
+ style: { letterSpacing: "-0.025em" },
206
+ children: title
207
+ }),
208
+ description && /* @__PURE__ */ jsx("p", {
209
+ className: "text-[var(--theme-muted-text-color)] text-sm leading-relaxed mt-2",
210
+ children: description
211
+ })
212
+ ]
213
+ });
214
+ }
215
+ //#endregion
216
+ //#region src/components/Input.tsx
217
+ var Input = forwardRef(({ label, error, className = "", mono, type, ...props }, ref) => {
218
+ const [showPassword, setShowPassword] = useState(false);
219
+ const isPassword = type === "password";
220
+ const inputType = isPassword && showPassword ? "text" : type;
221
+ const inputClasses = cx("w-full py-3 px-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-lg text-[var(--theme-app)] text-sm transition-all duration-200 box-border", "focus:outline-none focus:border-[var(--theme-element)] focus:shadow-[0_0_0_3px_color-mix(in_srgb,var(--theme-element)_25%,transparent)]", "placeholder:text-[var(--theme-muted-text-color)]", "disabled:bg-[var(--theme-muted-panel-bg)] disabled:text-[var(--theme-muted-text-color)] disabled:cursor-not-allowed disabled:opacity-70", mono && "font-mono text-[0.8125rem]", error && "border-[#ef4444]", isPassword && "pr-11", className);
222
+ return /* @__PURE__ */ jsxs("div", {
223
+ className: "flex flex-col gap-1.5",
224
+ children: [
225
+ label && /* @__PURE__ */ jsx("label", {
226
+ className: "text-[0.8125rem] font-medium text-[var(--theme-app)]",
227
+ htmlFor: props.id || props.name,
228
+ children: label
229
+ }),
230
+ /* @__PURE__ */ jsxs("div", {
231
+ className: isPassword ? "relative w-full" : "",
232
+ children: [/* @__PURE__ */ jsx("input", {
233
+ ref,
234
+ type: inputType,
235
+ className: inputClasses,
236
+ ...props
237
+ }), isPassword && /* @__PURE__ */ jsx("button", {
238
+ type: "button",
239
+ className: "absolute right-3 top-1/2 -translate-y-1/2 bg-transparent border-none text-[var(--theme-muted-text-color)] cursor-pointer p-1 transition-colors duration-200 flex items-center justify-center hover:text-[var(--theme-app)]",
240
+ onClick: () => setShowPassword(!showPassword),
241
+ tabIndex: -1,
242
+ "aria-label": showPassword ? "Hide password" : "Show password",
243
+ children: showPassword ? /* @__PURE__ */ jsx(EyeOffIcon, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(EyeIcon, { className: "w-5 h-5" })
244
+ })]
245
+ }),
246
+ error && /* @__PURE__ */ jsxs("span", {
247
+ className: "text-[0.8125rem] text-[#ef4444] flex items-center gap-1.5",
248
+ children: [/* @__PURE__ */ jsx(AlertIcon, { className: "w-4 h-4" }), error]
249
+ })
250
+ ]
251
+ });
252
+ });
253
+ Input.displayName = "Input";
254
+ var Textarea = forwardRef(({ label, error, className = "", mono, ...props }, ref) => {
255
+ const textareaClasses = cx("w-full py-3 px-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-lg text-[var(--theme-app)] text-sm transition-all duration-200 box-border min-h-[140px] resize-y", "focus:outline-none focus:border-[var(--theme-element)] focus:shadow-[0_0_0_3px_color-mix(in_srgb,var(--theme-element)_25%,transparent)]", "placeholder:text-[var(--theme-muted-text-color)]", mono && "font-mono text-[0.8125rem]", error && "border-[#ef4444]", className);
256
+ return /* @__PURE__ */ jsxs("div", {
257
+ className: "flex flex-col gap-1.5",
258
+ children: [
259
+ label && /* @__PURE__ */ jsx("label", {
260
+ className: "text-[0.8125rem] font-medium text-[var(--theme-app)]",
261
+ htmlFor: props.id || props.name,
262
+ children: label
263
+ }),
264
+ /* @__PURE__ */ jsx("textarea", {
265
+ ref,
266
+ className: textareaClasses,
267
+ ...props
268
+ }),
269
+ error && /* @__PURE__ */ jsxs("span", {
270
+ className: "text-[0.8125rem] text-[#ef4444] flex items-center gap-1.5",
271
+ children: [/* @__PURE__ */ jsx(AlertIcon, { className: "w-4 h-4" }), error]
272
+ })
273
+ ]
274
+ });
275
+ });
276
+ Textarea.displayName = "Textarea";
277
+ //#endregion
278
+ //#region src/components/inputClasses.ts
279
+ var inputClasses = "w-full rounded-md border theme-border bg-(--theme-input-bg) px-3 py-2 text-sm text-(--theme-panel) outline-none focus:ring-2 focus:ring-(--theme-element)";
280
+ //#endregion
281
+ //#region src/components/IconButton.tsx
282
+ var IconButton = forwardRef(({ icon, label, variant = "default", size = "md", active = false, showTooltip = true, className, disabled, ...props }, ref) => {
283
+ const sizeClasses = {
284
+ sm: "w-7 h-7 [&_svg]:w-3.5 [&_svg]:h-3.5",
285
+ md: "w-9 h-9 [&_svg]:w-4 [&_svg]:h-4",
286
+ lg: "w-11 h-11 [&_svg]:w-5 [&_svg]:h-5"
287
+ };
288
+ const variantClasses = {
289
+ default: cx("bg-[var(--theme-muted-panel-bg)] text-[var(--theme-muted-text-color)]", "hover:bg-[var(--theme-border)] hover:text-[var(--theme-app)]", active && "bg-[var(--theme-element)]/10 text-[var(--theme-element)]"),
290
+ ghost: cx("bg-transparent text-[var(--theme-muted-text-color)]", "hover:bg-[var(--theme-muted-panel-bg)] hover:text-[var(--theme-app)]", active && "text-[var(--theme-element)]"),
291
+ primary: cx("bg-[var(--theme-element)] text-white", "hover:bg-[var(--theme-element)]/90", active && "ring-2 ring-[var(--theme-element)]/50"),
292
+ success: cx("bg-[#22c55e] text-white", "hover:bg-[#22c55e]/90", active && "ring-2 ring-[#22c55e]/50")
293
+ };
294
+ return /* @__PURE__ */ jsx("button", {
295
+ ref,
296
+ type: "button",
297
+ "aria-label": label,
298
+ disabled,
299
+ "data-tooltip-id": showTooltip ? TOOLTIP_ID : void 0,
300
+ "data-tooltip-content": label,
301
+ "data-tooltip-delay-show": 300,
302
+ "data-tooltip-class-name": "!bg-[var(--theme-app)] !text-[var(--theme-app-bg)] !text-xs !py-1 !px-2 !rounded-md",
303
+ className: cx("inline-flex items-center justify-center rounded-lg", "transition-all duration-200 cursor-pointer", "disabled:opacity-50 disabled:cursor-not-allowed", sizeClasses[size], variantClasses[variant], className),
304
+ ...props,
305
+ children: icon
306
+ });
307
+ });
308
+ IconButton.displayName = "IconButton";
309
+ //#endregion
310
+ //#region src/components/Toggle.tsx
311
+ function Toggle({ checked, onChange, disabled, label }) {
312
+ return /* @__PURE__ */ jsxs("label", {
313
+ onClick: (e) => e.stopPropagation(),
314
+ className: cx("relative inline-flex items-center", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
315
+ children: [/* @__PURE__ */ jsx("input", {
316
+ type: "checkbox",
317
+ className: "peer sr-only",
318
+ checked,
319
+ onChange: (e) => onChange(e.target.checked),
320
+ disabled,
321
+ "aria-label": label
322
+ }), /* @__PURE__ */ jsx("div", { className: "h-6 w-11 rounded-full bg-(--theme-muted-panel-bg) transition-colors peer-checked:bg-(--theme-element) peer-focus-visible:ring-2 peer-focus-visible:ring-[color-mix(in_srgb,var(--theme-element)_25%,transparent)] after:absolute after:start-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-sm after:transition-transform after:content-[\"\"] motion-reduce:after:transition-none peer-checked:after:translate-x-5" })]
323
+ });
324
+ }
325
+ //#endregion
326
+ //#region src/components/LetterBadge.tsx
327
+ /** A compact letter badge ("AI", "PUB", "SSH") used as a type mark in place of
328
+ * an icon. Size the box and text via className (e.g. "h-5 w-5 text-[8px]"). */
329
+ function LetterBadge({ text, className }) {
330
+ return /* @__PURE__ */ jsx("span", {
331
+ className: cx("inline-flex shrink-0 items-center justify-center rounded-[3px] border theme-border font-bold leading-none tracking-tight text-(--theme-app)", className),
332
+ children: text
333
+ });
334
+ }
335
+ //#endregion
336
+ //#region src/components/FilterPill.tsx
337
+ function FilterPill({ active, onClick, children }) {
338
+ return /* @__PURE__ */ jsx("button", {
339
+ type: "button",
340
+ onClick,
341
+ className: cx("px-3 py-1.5 text-xs font-medium rounded-full border transition-all duration-200", active ? "bg-[var(--theme-panel-bg)] border-[var(--theme-border)] text-[var(--theme-panel)] shadow-sm" : "bg-transparent border-transparent text-[var(--theme-muted-text-color)] hover:text-[var(--theme-panel)] hover:bg-[var(--theme-hover)]"),
342
+ children
343
+ });
344
+ }
345
+ //#endregion
346
+ //#region src/components/Filter.tsx
347
+ function Filter({ filter, setFilter, placeholder = "Filter...", pills, activePill, onPillChange }) {
348
+ return /* @__PURE__ */ jsxs("div", {
349
+ className: "flex items-center gap-2",
350
+ children: [/* @__PURE__ */ jsxs("div", {
351
+ className: "relative flex items-center",
352
+ children: [/* @__PURE__ */ jsx("input", {
353
+ placeholder,
354
+ type: "text",
355
+ value: filter,
356
+ onChange: (e) => setFilter(e.target.value.toLowerCase()),
357
+ className: "shadow-sm focus:ring-1 block w-full pr-3 sm:text-sm theme-border rounded-md py-1.5 pl-8"
358
+ }), /* @__PURE__ */ jsx("div", {
359
+ className: "absolute inset-y-0 left-0 flex py-2.5 pl-2",
360
+ children: /* @__PURE__ */ jsx(FilterIcon, {})
361
+ })]
362
+ }), pills && onPillChange && /* @__PURE__ */ jsx("div", {
363
+ className: "flex gap-1",
364
+ children: pills.map((pill) => /* @__PURE__ */ jsx("button", {
365
+ type: "button",
366
+ onClick: () => onPillChange(pill.value),
367
+ className: cx("px-2.5 py-1 text-xs rounded-full transition-colors border", activePill === pill.value ? "bg-(--theme-element) text-(--theme-element-text) border-transparent" : "theme-border theme-text hover:theme-hover"),
368
+ children: pill.label
369
+ }, pill.value))
370
+ })]
371
+ });
372
+ }
373
+ //#endregion
374
+ //#region src/components/Sort.tsx
375
+ var SortIcon = ({ currentlySorted, currentDirection, name }) => {
376
+ const style = { transform: "translateY(2px)" };
377
+ if (currentlySorted === name) {
378
+ if (currentDirection === "ascending") return /* @__PURE__ */ jsx(SortDownIcon, { style });
379
+ else if (currentDirection === "descending") return /* @__PURE__ */ jsx(SortUpIcon, { style });
380
+ } else return /* @__PURE__ */ jsx(SortUnsortedIcon, { style });
381
+ return null;
382
+ };
383
+ function Sort({ currentlySorted, name, setCurrentDirection, setCurrentlySorted, currentDirection }) {
384
+ const sort = (sorted, direction) => {
385
+ if (sorted === name) {
386
+ if (direction === "ascending") setCurrentDirection("descending");
387
+ else if (direction === "descending") {
388
+ setCurrentDirection("unsorted");
389
+ setCurrentlySorted("");
390
+ }
391
+ } else {
392
+ setCurrentDirection("ascending");
393
+ setCurrentlySorted(name);
394
+ }
395
+ };
396
+ return /* @__PURE__ */ jsx("div", {
397
+ className: "inline",
398
+ children: /* @__PURE__ */ jsx("button", {
399
+ onClick: () => sort(currentlySorted, currentDirection),
400
+ children: /* @__PURE__ */ jsx(SortIcon, {
401
+ currentDirection,
402
+ currentlySorted,
403
+ name
404
+ })
405
+ })
406
+ });
407
+ }
408
+ //#endregion
409
+ //#region src/components/Pagination.tsx
410
+ function Pagination({ endingNumber, endingTime, nextCallback, prevCallback, roundedBottom, startingNumber, startingTime, nextDisabled, prevDisabled, name, useTimeRange = false }) {
411
+ const t = useStrings().list;
412
+ return /* @__PURE__ */ jsxs("nav", {
413
+ className: cx(roundedBottom && "rounded-b-2xl", "theme-muted-panel flex items-center justify-between border-t theme-border px-4 py-1 sm:px-6"),
414
+ "aria-label": "Pagination",
415
+ children: [/* @__PURE__ */ jsx("div", {
416
+ className: cx("hidden", (startingNumber !== void 0 && startingNumber !== null && endingNumber !== void 0 && endingNumber !== null || startingTime && endingTime) && "sm:block"),
417
+ children: /* @__PURE__ */ jsx("p", {
418
+ className: "text-sm whitespace-nowrap",
419
+ children: useTimeRange && startingTime && endingTime ? t.paginationShowingTimeRange(name ?? "", startingTime, endingTime) : t.paginationShowing(name ?? "", startingNumber ?? "", endingNumber ?? "")
420
+ })
421
+ }), /* @__PURE__ */ jsxs("div", {
422
+ className: "flex flex-1 justify-between sm:justify-end gap-x-2",
423
+ children: [/* @__PURE__ */ jsx("button", {
424
+ disabled: prevDisabled,
425
+ onClick: prevCallback,
426
+ className: cx("link text-sm", prevDisabled && "disabled"),
427
+ children: t.paginationPrevious
428
+ }), /* @__PURE__ */ jsx("button", {
429
+ disabled: nextDisabled,
430
+ onClick: nextCallback,
431
+ className: cx("link text-sm", nextDisabled && "disabled"),
432
+ children: t.paginationNext
433
+ })]
434
+ })]
435
+ });
436
+ }
437
+ //#endregion
438
+ //#region src/components/SettingsCard.tsx
439
+ /**
440
+ * A settings card: an optional sentence-case section label sits above a
441
+ * bordered panel of rows. The label carries the breathing-room rhythm between
442
+ * cards; the rows inside provide their own dividers via SettingRow's `isFirst`.
443
+ */
444
+ function SettingsCard({ title, description, action, actionAlign = "adjacent", overflowVisible, children, className }) {
445
+ return /* @__PURE__ */ jsxs("section", {
446
+ className: cx("mt-10 first:mt-0", className),
447
+ children: [(title || action) && /* @__PURE__ */ jsxs("div", {
448
+ className: "mb-3 px-0.5",
449
+ children: [/* @__PURE__ */ jsxs("div", {
450
+ className: cx("flex items-center gap-1.5", actionAlign === "right" && "justify-between"),
451
+ children: [title && /* @__PURE__ */ jsx("h2", {
452
+ className: "text-[15px] font-semibold theme-text leading-none",
453
+ children: title
454
+ }), action]
455
+ }), description && /* @__PURE__ */ jsx("p", {
456
+ className: "text-xs theme-muted-text mt-1.5 leading-snug",
457
+ children: description
458
+ })]
459
+ }), /* @__PURE__ */ jsx("div", {
460
+ className: cx("panel", overflowVisible ? "overflow-visible" : "overflow-hidden"),
461
+ children
462
+ })]
463
+ });
464
+ }
465
+ //#endregion
466
+ //#region src/components/SettingsGroup.tsx
467
+ function SettingsGroup({ title, children, className }) {
468
+ return /* @__PURE__ */ jsxs("div", {
469
+ className: cx("mt-8 first:mt-0", className),
470
+ children: [title && /* @__PURE__ */ jsx("h2", {
471
+ className: "text-[11px] font-semibold uppercase tracking-wider theme-muted-text mb-2 px-1",
472
+ children: title
473
+ }), /* @__PURE__ */ jsx("div", {
474
+ className: "panel divide-y divide-(--theme-border)",
475
+ children
476
+ })]
477
+ });
478
+ }
479
+ //#endregion
480
+ //#region src/components/SettingRow.tsx
481
+ function SettingRow({ label, htmlFor, helpText, children, isFirst, fill, onClick }) {
482
+ return /* @__PURE__ */ jsxs("div", {
483
+ onClick,
484
+ className: cx("px-5 py-5 grid grid-cols-1 gap-x-8 gap-y-2", fill ? "md:grid-cols-[200px_1fr]" : "md:grid-cols-[1fr_auto]", !isFirst && "border-t theme-border", onClick && "cursor-pointer select-none hover:theme-hover transition-colors"),
485
+ children: [/* @__PURE__ */ jsxs("div", {
486
+ className: "flex flex-col gap-y-1",
487
+ children: [/* @__PURE__ */ jsx("label", {
488
+ htmlFor,
489
+ className: "font-semibold theme-text leading-tight",
490
+ children: label
491
+ }), helpText && /* @__PURE__ */ jsx("div", {
492
+ className: "theme-muted-text text-xs leading-snug",
493
+ children: helpText
494
+ })]
495
+ }), /* @__PURE__ */ jsx("div", {
496
+ className: cx("min-w-0", !fill && "flex items-center justify-end"),
497
+ children
498
+ })]
499
+ });
500
+ }
501
+ function SettingSection({ title, isFirst }) {
502
+ return /* @__PURE__ */ jsx("div", {
503
+ className: cx("px-5 py-3 theme-muted-panel", !isFirst && "border-t theme-border"),
504
+ children: /* @__PURE__ */ jsx("h2", {
505
+ className: "font-semibold text-sm uppercase tracking-wider theme-muted-text",
506
+ children: title
507
+ })
508
+ });
509
+ }
510
+ //#endregion
511
+ //#region src/components/SettingModeOption.tsx
512
+ /** A labeled + described radio option row, used inside a SettingsCard to pick
513
+ * between modes (e.g. default vs custom). Stacked rows share the card's
514
+ * dividers via `isFirst`. */
515
+ function SettingModeOption({ name, checked, onSelect, label, description, isFirst, disabled }) {
516
+ return /* @__PURE__ */ jsxs("label", {
517
+ className: cx("flex items-start gap-3 px-5 py-4", disabled ? "cursor-default opacity-60" : "cursor-pointer", !isFirst && "border-t theme-border"),
518
+ children: [/* @__PURE__ */ jsx("input", {
519
+ type: "radio",
520
+ name,
521
+ checked,
522
+ onChange: onSelect,
523
+ disabled,
524
+ className: "mt-0.5 w-4 h-4 theme-input shrink-0"
525
+ }), /* @__PURE__ */ jsxs("div", {
526
+ className: "min-w-0",
527
+ children: [/* @__PURE__ */ jsx("div", {
528
+ className: "font-semibold theme-text leading-tight",
529
+ children: label
530
+ }), /* @__PURE__ */ jsx("div", {
531
+ className: "theme-muted-text text-xs leading-snug mt-0.5",
532
+ children: description
533
+ })]
534
+ })]
535
+ });
536
+ }
537
+ //#endregion
538
+ export { AddMenu, BareModal, Button, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, Pagination, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, useCssIsDark, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowJsonResolver };
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ type HoverCoords = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare function useHoverCard<T extends HTMLElement>(): {
7
+ triggerRef: import("react").RefObject<T | null>;
8
+ coords: HoverCoords | null;
9
+ scheduleOpen: () => void;
10
+ scheduleClose: () => void;
11
+ keepOpen: () => void;
12
+ };
13
+ export declare function HoverCardSurface({ x, y, widthClassName, relayoutKey, onKeepOpen, onLeave, children, }: {
14
+ x: number;
15
+ y: number;
16
+ widthClassName: string;
17
+ relayoutKey?: unknown;
18
+ onKeepOpen: () => void;
19
+ onLeave: () => void;
20
+ children: ReactNode;
21
+ }): import("react").ReactPortal;
22
+ export {};
@@ -0,0 +1,7 @@
1
+ /** Footer pager bar for paginated new-nav lists: "{start}–{end} of {total}" with prev/next. Renders nothing for a single page. */
2
+ export declare function ListPager({ page, pageSize, total, onPageChange, }: {
3
+ page: number;
4
+ pageSize: number;
5
+ total: number;
6
+ onPageChange: (page: number) => void;
7
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import type { ListView } from './listView.js';
2
+ /** Shared chrome for the toolbar control buttons (Filter, Display, Search) so
3
+ * they read as a consistent button cluster — matched by ListSearchControl. */
4
+ export declare const listControlButtonClasses = "relative flex h-7 w-7 items-center justify-center rounded-md border border-(--theme-border) text-(--theme-muted-text-color) hover:bg-(--theme-muted-panel-bg) hover:text-(--theme-app) transition-colors";
5
+ export declare function ListDisplayMenu<T>({ view, label, }: {
6
+ view: ListView<T>;
7
+ label?: string;
8
+ }): import("react").JSX.Element;
9
+ export declare function ListFilterMenu<T>({ view, label, }: {
10
+ view: ListView<T>;
11
+ label?: string;
12
+ }): import("react").JSX.Element | null;
@@ -1,2 +1,8 @@
1
1
  export { assembleRowMenu, copySubmenu, MoreButton, rowContextMenuProps, toolbarActionToRowAction, toRowMenuItem, useRowMenu, useRowMenuActive, type OpenMenu, type RowAction, type RowMenuItem, } from './RowContextMenu.js';
2
2
  export { actionsColumnWidth, GroupRow, ListActionsHeader, ListError, ListSkeleton, listTableFixedProps, listTableProps, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, } from './ListTable.js';
3
+ export { DEFAULT_ORDER, FAVORITE_ORDER, useListView, type ActionDef, type ColumnDef, type FilterFacet, type ListView, type ListViewChrome, type ListViewConfig, type OrderByOption, } from './listView.js';
4
+ export { ListCount, ListSearchControl, useListSearch, type ListSearch, } from './listSearch.js';
5
+ export { listControlButtonClasses, ListDisplayMenu, ListFilterMenu, } from './ListViewControls.js';
6
+ export { ListPager } from './ListPager.js';
7
+ export { HoverCardSurface, useHoverCard } from './HoverCard.js';
8
+ export { isTextEntryContext } from './textEntry.js';
@@ -1,2 +1,2 @@
1
- import { _ as useRowMenu, a as NAME_MIN_WIDTH_PX, c as actionsColumnWidth, d as MoreButton, f as assembleRowMenu, g as toolbarActionToRowAction, h as toRowMenuItem, i as ListSkeleton, l as listTableFixedProps, m as rowContextMenuProps, n as ListActionsHeader, o as NameCell, p as copySubmenu, r as ListError, s as RowSelectCheckbox, t as GroupRow, u as listTableProps, v as useRowMenuActive } from "../chunks/list-7PyDF1tz.js";
2
- export { GroupRow, ListActionsHeader, ListError, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, actionsColumnWidth, assembleRowMenu, copySubmenu, listTableFixedProps, listTableProps, rowContextMenuProps, toRowMenuItem, toolbarActionToRowAction, useRowMenu, useRowMenuActive };
1
+ import { A as useRowMenu, C as listTableProps, D as rowContextMenuProps, E as copySubmenu, O as toRowMenuItem, S as listTableFixedProps, T as assembleRowMenu, _ as ListSkeleton, a as ListSearchControl, b as RowSelectCheckbox, c as ListFilterMenu, d as DEFAULT_ORDER, f as FAVORITE_ORDER, g as ListError, h as ListActionsHeader, i as ListCount, j as useRowMenuActive, k as toolbarActionToRowAction, l as listControlButtonClasses, m as GroupRow, n as useHoverCard, o as useListSearch, p as useListView, r as ListPager, s as ListDisplayMenu, t as HoverCardSurface, u as isTextEntryContext, v as NAME_MIN_WIDTH_PX, w as MoreButton, x as actionsColumnWidth, y as NameCell } from "../chunks/list-CvDWt0TC.js";
2
+ export { DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardSurface, ListActionsHeader, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPager, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, actionsColumnWidth, assembleRowMenu, copySubmenu, isTextEntryContext, listControlButtonClasses, listTableFixedProps, listTableProps, rowContextMenuProps, toRowMenuItem, toolbarActionToRowAction, useHoverCard, useListSearch, useListView, useRowMenu, useRowMenuActive };
@@ -0,0 +1,27 @@
1
+ /** Pass `enabled: false` to suspend the global ⌘F/`/` hijack (e.g. when search isn't shown and browser Find should stay active). */
2
+ export declare function useListSearch(enabled?: boolean, storageKey?: string): {
3
+ filter: string;
4
+ setFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
5
+ searchOpen: boolean;
6
+ openSearch: () => void;
7
+ closeSearch: () => void;
8
+ clearSearch: () => void;
9
+ terms: string[];
10
+ addTerm: (term: string) => void;
11
+ removeTerm: (term: string) => void;
12
+ queries: string[];
13
+ inputRef: import("react").RefObject<HTMLInputElement | null>;
14
+ };
15
+ export type ListSearch = ReturnType<typeof useListSearch>;
16
+ export declare function ListSearchControl({ search, placeholder, label, }: {
17
+ search: ListSearch;
18
+ placeholder: string;
19
+ label?: string;
20
+ }): import("react").JSX.Element;
21
+ export declare function ListCount({ total, matches, filterActive, noun, nounPlural, }: {
22
+ total: number;
23
+ matches: number;
24
+ filterActive: boolean;
25
+ noun: string;
26
+ nounPlural: string;
27
+ }): import("react").JSX.Element;