@runwisp/ui 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -7
- package/src/lib/actions/focusTrap.ts +3 -3
- package/src/lib/actions/fold-to-fit.test.ts +36 -0
- package/src/lib/actions/fold-to-fit.ts +89 -0
- package/src/lib/actions/modal-dialog.test.ts +47 -0
- package/src/lib/actions/modal-dialog.ts +48 -0
- package/src/lib/components/AccordionItem.svelte +16 -5
- package/src/lib/components/Badge.svelte +4 -25
- package/src/lib/components/Button.svelte +2 -9
- package/src/lib/components/CodeBlock.svelte +7 -6
- package/src/lib/components/DataGrid.svelte +5 -5
- package/src/lib/components/Drawer.svelte +22 -30
- package/src/lib/components/DurationInput.svelte +6 -25
- package/src/lib/components/FilterBar.svelte +3 -7
- package/src/lib/components/FilterPill.svelte +2 -2
- package/src/lib/components/FormField.svelte +1 -1
- package/src/lib/components/Link.svelte +9 -4
- package/src/lib/components/LogConsole.svelte +101 -424
- package/src/lib/components/Modal.svelte +7 -30
- package/src/lib/components/SearchInput.svelte +1 -1
- package/src/lib/components/Select.svelte +3 -2
- package/src/lib/components/Sparkline.svelte +2 -2
- package/src/lib/components/Spinner.svelte +10 -5
- package/src/lib/components/StatusDot.svelte +1 -1
- package/src/lib/components/StatusIndicator.svelte +37 -104
- package/src/lib/components/Tabs.svelte +15 -1
- package/src/lib/components/Tooltip.svelte +1 -1
- package/src/lib/components/dashboard/RunActions.svelte +156 -0
- package/src/lib/components/dashboard/RunConsoleFrame.svelte +319 -0
- package/src/lib/components/dashboard/RunDetailPanel.svelte +137 -725
- package/src/lib/components/dashboard/RunFacts.svelte +119 -0
- package/src/lib/components/dashboard/RunFilterChips.svelte +52 -0
- package/src/lib/components/dashboard/RunFilterPopover.svelte +9 -10
- package/src/lib/components/dashboard/RunHeaderLine.svelte +295 -0
- package/src/lib/components/dashboard/RunListSkeleton.svelte +43 -0
- package/src/lib/components/dashboard/RunRow.svelte +202 -0
- package/src/lib/components/dashboard/RunsList.svelte +267 -545
- package/src/lib/components/dashboard/bulk-selection.svelte.test.ts +42 -0
- package/src/lib/components/dashboard/bulk-selection.svelte.ts +50 -0
- package/src/lib/components/dashboard/cron-format.test.ts +10 -1
- package/src/lib/components/dashboard/cron-format.ts +7 -3
- package/src/lib/components/dashboard/run-filters.test.ts +62 -2
- package/src/lib/components/dashboard/run-filters.ts +104 -99
- package/src/lib/components/dashboard/run-helpers.test.ts +131 -12
- package/src/lib/components/dashboard/run-helpers.ts +150 -44
- package/src/lib/components/dashboard/status-config.ts +18 -0
- package/src/lib/components/dashboard/types.ts +6 -0
- package/src/lib/components/data-grid-selection.ts +2 -9
- package/src/lib/components/filter-spec.ts +3 -3
- package/src/lib/index.ts +13 -2
- package/src/lib/log-console/AnsiLine.svelte +12 -0
- package/src/lib/log-console/FrameHistoryBlock.svelte +57 -0
- package/src/lib/log-console/LogCache.svelte.ts +1 -1
- package/src/lib/log-console/LogConsoleFooter.svelte +88 -0
- package/src/lib/log-console/ansi.ts +1 -1
- package/src/lib/log-console/frame-history.svelte.test.ts +47 -0
- package/src/lib/log-console/frame-history.svelte.ts +71 -0
- package/src/lib/log-console/wrap-layout.svelte.test.ts +92 -0
- package/src/lib/log-console/wrap-layout.svelte.ts +188 -0
- package/src/lib/theme-tokens.css +21 -21
- package/src/lib/theme.css +13 -13
- package/src/lib/utils/format.test.ts +125 -3
- package/src/lib/utils/format.ts +101 -8
- package/src/lib/utils/toast.svelte.ts +2 -3
- package/src/lib/utils/typing-target.ts +10 -0
- package/src/stories/Accordion.stories.svelte +60 -1
- package/src/stories/CodeBlock.stories.svelte +13 -0
- package/src/stories/Link.stories.svelte +25 -1
- package/src/stories/LogConsole.stories.svelte +2 -2
- package/src/stories/Tabs.stories.svelte +17 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
shown as pills; every other field stays behind "+ Add filter" until the user
|
|
12
12
|
adds it, then lives as a pill. Each pill is self-contained (label + value +
|
|
13
13
|
clear in one element, see FilterPill) so activating a filter never adds a
|
|
14
|
-
second row
|
|
14
|
+
second row, the table below never jumps. Data-mode agnostic: the parent feeds
|
|
15
15
|
`values` to applyFilters (client) or maps it to query params (server).
|
|
16
16
|
-->
|
|
17
17
|
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import SearchInput from "./SearchInput.svelte";
|
|
21
21
|
import FilterPill from "./FilterPill.svelte";
|
|
22
22
|
import Popover from "./Popover.svelte";
|
|
23
|
+
import { isTypingTarget } from "../utils/typing-target.js";
|
|
23
24
|
import { Plus, RotateCcw } from "@lucide/svelte";
|
|
24
25
|
import {
|
|
25
26
|
type FilterField,
|
|
@@ -83,12 +84,7 @@
|
|
|
83
84
|
// `/` focuses the search box, unless the user is already typing somewhere.
|
|
84
85
|
function onWindowKeydown(e: KeyboardEvent) {
|
|
85
86
|
if (e.key !== "/" || !searchEl) return;
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
t instanceof HTMLElement &&
|
|
89
|
-
(t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)
|
|
90
|
-
)
|
|
91
|
-
return;
|
|
87
|
+
if (isTypingTarget(e.target)) return;
|
|
92
88
|
e.preventDefault();
|
|
93
89
|
searchEl.focus();
|
|
94
90
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<!--
|
|
5
5
|
One filter, one element. The pill is both the control and its own "chip":
|
|
6
6
|
inactive it reads `Label ▾` (muted); active it reads `Label: value ✕` (accent)
|
|
7
|
-
with an inline clear. Active vs inactive is a restyle of the SAME element
|
|
7
|
+
with an inline clear. Active vs inactive is a restyle of the SAME element, it
|
|
8
8
|
never spawns a second row, so the table below never jumps. Clicking the body
|
|
9
9
|
opens a type-specific editor popover (select menu / number / date range).
|
|
10
10
|
-->
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
let {
|
|
27
27
|
field,
|
|
28
28
|
values = $bindable({}),
|
|
29
|
-
// Open the editor on mount
|
|
29
|
+
// Open the editor on mount, set when the pill was just added from the
|
|
30
30
|
// "+ Add filter" menu, so the user lands straight in the value picker.
|
|
31
31
|
autoOpen = false,
|
|
32
32
|
onClose,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
children: Snippet;
|
|
14
14
|
class?: string;
|
|
15
15
|
// The id of the control this field labels. Pass the SAME id to the wrapped
|
|
16
|
-
// input/select so the <label for> actually points at it
|
|
16
|
+
// input/select so the <label for> actually points at it, otherwise the
|
|
17
17
|
// label is dead (clicking it does nothing; screen readers can't associate
|
|
18
18
|
// it). Falls back to a generated id when the field has no focusable target.
|
|
19
19
|
id?: string;
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
6
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
7
7
|
|
|
8
|
-
type LinkVariant = "default" | "muted" | "primary" | "danger";
|
|
8
|
+
type LinkVariant = "default" | "muted" | "primary" | "danger" | "unstyled";
|
|
9
9
|
type LinkUnderline = "always" | "hover" | "none";
|
|
10
10
|
|
|
11
11
|
// Use Link for off-site URLs (`external` opens a new tab with rel=noopener
|
|
12
|
-
// noreferrer).
|
|
13
|
-
//
|
|
12
|
+
// noreferrer). `unstyled` adds no classes beyond `class` (no `underline`
|
|
13
|
+
// either), for nav rows and menu items that bring their own layout. An
|
|
14
|
+
// in-app href must still come from SvelteKit's resolve(): being a
|
|
15
|
+
// component, Link sits outside svelte/no-navigation-without-resolve.
|
|
14
16
|
interface Props extends Omit<HTMLAnchorAttributes, "href" | "children" | "class"> {
|
|
15
17
|
href: string;
|
|
16
18
|
variant?: LinkVariant;
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
muted: "text-on-surface-muted hover:text-on-surface",
|
|
42
44
|
primary: "text-primary hover:text-primary-hover",
|
|
43
45
|
danger: "text-danger-surface hover:text-danger-hover",
|
|
46
|
+
unstyled: "",
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
const underlineClasses: Record<LinkUnderline, string> = {
|
|
@@ -52,7 +55,9 @@
|
|
|
52
55
|
|
|
53
56
|
<a
|
|
54
57
|
{href}
|
|
55
|
-
class=
|
|
58
|
+
class={variant === "unstyled"
|
|
59
|
+
? className
|
|
60
|
+
: `${baseClasses} ${variantClasses[variant]} ${underlineClasses[underline]} ${className}`}
|
|
56
61
|
target={external ? "_blank" : undefined}
|
|
57
62
|
rel={external ? "noopener noreferrer" : undefined}
|
|
58
63
|
{...restProps}
|