contain-css-svelte 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controls/ButtonLink.svelte +5 -1
- package/dist/controls/Input.svelte.d.ts +1 -1
- package/dist/controls/Option.svelte +3 -3
- package/dist/controls/Select.svelte +4 -3
- package/dist/controls/Slider.svelte +5 -1
- package/dist/cssprops.js +3 -0
- package/dist/dropdowns/DropdownMenu.svelte +40 -31
- package/dist/layout/Bar.svelte +4 -2
- package/dist/layout/Container.svelte.d.ts +6 -4
- package/dist/layout/DataListItem.svelte +1 -1
- package/dist/layout/FormProvider.svelte +3 -1
- package/dist/layout/GridLayout.svelte +1 -1
- package/dist/layout/Inline.svelte +5 -1
- package/dist/layout/Page.svelte +29 -1
- package/dist/layout/ResponsiveText.svelte +1 -1
- package/dist/layout/ResponsiveText.svelte.d.ts +2 -0
- package/dist/layout/Sidebar.svelte +22 -7
- package/dist/layout/SplitPane.svelte +3 -3
- package/dist/layout/Stack.svelte +5 -1
- package/dist/layout/TabBar.svelte +2 -3
- package/dist/layout/Table.svelte +21 -11
- package/dist/layout/Tile.svelte +1 -0
- package/dist/overlays/Dialog.svelte +2 -2
- package/dist/overlays/Dialog.svelte.d.ts +2 -2
- package/dist/overlays/Tooltip.svelte +65 -27
- package/dist/overlays/Tooltip.svelte.d.ts +1 -0
- package/dist/review/loadReviewAppPage.d.ts +1 -1
- package/dist/review/scenarios/IncredibleAppShell.svelte +44 -37
- package/dist/review/scenarios/LaunchStudio.svelte +108 -83
- package/dist/review/scenarios/LayoutWorkbench.svelte +49 -34
- package/dist/review/scenarios/TableWorkbench.svelte +82 -74
- package/dist/review/scenarios/VisualSystemBoard.svelte +387 -0
- package/dist/review/scenarios/VisualSystemBoard.svelte.d.ts +3 -0
- package/dist/review/scenarios.d.ts +8 -4
- package/dist/review/scenarios.js +9 -4
- package/dist/types.d.ts +3 -0
- package/dist/vars/colors.css +1 -1
- package/dist/vars/defaults.css +8 -1
- package/dist/vars/layout.css +7 -0
- package/dist/vars/themes/bootstrap.css +1 -0
- package/package.json +1 -1
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
let tooltipDiv = $state();
|
|
3
3
|
let targetDiv = $state();
|
|
4
4
|
let tooltipMeasurementDiv = $state();
|
|
5
|
-
let { tooltipText = "", vertical = "bottom", horizontal = "right", children, tooltip, } = $props();
|
|
5
|
+
let { tooltipText = "", vertical = "bottom", horizontal = "right", children, tooltip, block = false, } = $props();
|
|
6
|
+
// svelte-ignore state_referenced_locally
|
|
6
7
|
let renderedVertical = $state(vertical);
|
|
8
|
+
// svelte-ignore state_referenced_locally
|
|
7
9
|
let renderedHorizontal = $state(horizontal);
|
|
8
10
|
function showPopover() {
|
|
9
11
|
// Get the position of the target element
|
|
10
12
|
// with respect to our screen
|
|
13
|
+
if (!targetDiv?.children[0])
|
|
14
|
+
return;
|
|
15
|
+
if (!tooltipDiv || !tooltipMeasurementDiv)
|
|
16
|
+
return;
|
|
11
17
|
const targetRect = targetDiv.children[0].getBoundingClientRect();
|
|
12
18
|
let targetHeight = tooltipMeasurementDiv.getBoundingClientRect().height;
|
|
13
19
|
let targetWidth = tooltipMeasurementDiv.getBoundingClientRect().width;
|
|
@@ -64,35 +70,67 @@ function showPopover() {
|
|
|
64
70
|
}
|
|
65
71
|
</script>
|
|
66
72
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class="tooltip-wrapper"
|
|
70
|
-
onmouseenter={() => showPopover()}
|
|
71
|
-
onmouseleave={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
72
|
-
onfocusin={() => showPopover()}
|
|
73
|
-
onfocusout={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
74
|
-
bind:this={targetDiv}
|
|
75
|
-
>
|
|
76
|
-
{@render children?.()}
|
|
73
|
+
{#if block}
|
|
74
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
77
75
|
<div
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class:right={renderedHorizontal === "right"}
|
|
76
|
+
class="tooltip-wrapper"
|
|
77
|
+
onmouseenter={() => showPopover()}
|
|
78
|
+
onmouseleave={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
79
|
+
onfocusin={() => showPopover()}
|
|
80
|
+
onfocusout={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
81
|
+
bind:this={targetDiv}
|
|
85
82
|
>
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
{@render children?.()}
|
|
84
|
+
<div
|
|
85
|
+
popover="auto"
|
|
86
|
+
class="tooltip"
|
|
87
|
+
bind:this={tooltipDiv}
|
|
88
|
+
class:bottom={renderedVertical === "bottom"}
|
|
89
|
+
class:top={renderedVertical === "top"}
|
|
90
|
+
class:left={renderedHorizontal === "left"}
|
|
91
|
+
class:right={renderedHorizontal === "right"}
|
|
92
|
+
>
|
|
93
|
+
{#if tooltip}{@render tooltip()}{:else}
|
|
94
|
+
{tooltipText}
|
|
95
|
+
{/if}
|
|
96
|
+
</div>
|
|
97
|
+
<div class="tooltip invisible measure" bind:this={tooltipMeasurementDiv}>
|
|
98
|
+
{#if tooltip}{@render tooltip()}{:else}
|
|
99
|
+
{tooltipText}
|
|
100
|
+
{/if}
|
|
101
|
+
</div>
|
|
89
102
|
</div>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
{:else}
|
|
104
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
105
|
+
<span
|
|
106
|
+
class="tooltip-wrapper"
|
|
107
|
+
onmouseenter={() => showPopover()}
|
|
108
|
+
onmouseleave={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
109
|
+
onfocusin={() => showPopover()}
|
|
110
|
+
onfocusout={() => (tooltipDiv ? tooltipDiv.togglePopover(false) : null)}
|
|
111
|
+
bind:this={targetDiv}
|
|
112
|
+
>
|
|
113
|
+
{@render children?.()}
|
|
114
|
+
<span
|
|
115
|
+
popover="auto"
|
|
116
|
+
class="tooltip"
|
|
117
|
+
bind:this={tooltipDiv}
|
|
118
|
+
class:bottom={renderedVertical === "bottom"}
|
|
119
|
+
class:top={renderedVertical === "top"}
|
|
120
|
+
class:left={renderedHorizontal === "left"}
|
|
121
|
+
class:right={renderedHorizontal === "right"}
|
|
122
|
+
>
|
|
123
|
+
{#if tooltip}{@render tooltip()}{:else}
|
|
124
|
+
{tooltipText}
|
|
125
|
+
{/if}
|
|
126
|
+
</span>
|
|
127
|
+
<span class="tooltip invisible measure" bind:this={tooltipMeasurementDiv}>
|
|
128
|
+
{#if tooltip}{@render tooltip()}{:else}
|
|
129
|
+
{tooltipText}
|
|
130
|
+
{/if}
|
|
131
|
+
</span>
|
|
132
|
+
</span>
|
|
133
|
+
{/if}
|
|
96
134
|
|
|
97
135
|
<style>/* Warning: because we define a fallback
|
|
98
136
|
media query, the media query can override the container
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReviewThemeName } from "./themes";
|
|
2
2
|
export declare function loadReviewAppPage(scenario: string, theme: ReviewThemeName): {
|
|
3
|
-
scenario: "incredible-app-shell" | "layout-workbench" | "launch-studio" | "table-workbench";
|
|
3
|
+
scenario: "incredible-app-shell" | "layout-workbench" | "launch-studio" | "table-workbench" | "visual-system-board";
|
|
4
4
|
theme: "canyon-modern-serif-fancy" | "forest-editorial-rounded" | "dark-ibm-layered" | "light-airy-solid" | "bootstrap" | "dark" | "light" | "light-or-dark" | "material" | "purple" | "retro";
|
|
5
5
|
themeLabel: string;
|
|
6
6
|
};
|
|
@@ -16,32 +16,32 @@ import Stack from "../../layout/Stack.svelte";
|
|
|
16
16
|
import TextLayout from "../../typography/TextLayout.svelte";
|
|
17
17
|
let showSummary = $state(false);
|
|
18
18
|
let loggedIn = $state(true);
|
|
19
|
-
let search = $state("
|
|
20
|
-
let sortBy = $state("
|
|
19
|
+
let search = $state("reefer");
|
|
20
|
+
let sortBy = $state("berth");
|
|
21
21
|
let showAssignedOnly = $state(true);
|
|
22
22
|
let confidenceThreshold = $state(68);
|
|
23
23
|
let statusMessage = $derived(loggedIn
|
|
24
24
|
? showSummary
|
|
25
|
-
? "
|
|
26
|
-
: "
|
|
27
|
-
: "Signed out.
|
|
25
|
+
? "Manifest filters are open for inspection."
|
|
26
|
+
: "All containers are lashed, logged, and behaving like responsible rectangles."
|
|
27
|
+
: "Signed out. The bridge should still hold together cleanly.");
|
|
28
28
|
const workItems = [
|
|
29
29
|
{
|
|
30
|
-
title: "
|
|
31
|
-
detail: "
|
|
32
|
-
owner: "
|
|
33
|
-
cta: "
|
|
30
|
+
title: "Inspect reefer stack on bay 42",
|
|
31
|
+
detail: "Cold chain · Temperature report updated 42 minutes ago",
|
|
32
|
+
owner: "RF",
|
|
33
|
+
cta: "Inspect",
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
title: "
|
|
37
|
-
detail: "
|
|
38
|
-
owner: "
|
|
36
|
+
title: "Rebalance twist-lock notes for port rail",
|
|
37
|
+
detail: "Deck crew · Spacing review completed yesterday",
|
|
38
|
+
owner: "TL",
|
|
39
39
|
cta: "Compare",
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
title: "Confirm
|
|
43
|
-
detail: "
|
|
44
|
-
owner: "
|
|
42
|
+
title: "Confirm manifest names for nested cargo cards",
|
|
43
|
+
detail: "Harbor ops · Needs input from the quay team",
|
|
44
|
+
owner: "QC",
|
|
45
45
|
cta: "Open",
|
|
46
46
|
},
|
|
47
47
|
];
|
|
@@ -58,8 +58,8 @@ function logout() {
|
|
|
58
58
|
{#snippet header()}
|
|
59
59
|
<Bar secondary>
|
|
60
60
|
<Stack class="brand">
|
|
61
|
-
<div class="eyebrow">
|
|
62
|
-
<h1>
|
|
61
|
+
<div class="eyebrow">North Atlantic Harbor Desk</div>
|
|
62
|
+
<h1>Harbor Containership Console</h1>
|
|
63
63
|
</Stack>
|
|
64
64
|
|
|
65
65
|
<Inline class="header-actions">
|
|
@@ -73,9 +73,7 @@ function logout() {
|
|
|
73
73
|
</Button>
|
|
74
74
|
|
|
75
75
|
<span class="session">
|
|
76
|
-
Logged in as <span class="user"
|
|
77
|
-
>{loggedIn ? "Joe Schmoe" : "Guest"}</span
|
|
78
|
-
>
|
|
76
|
+
Logged in as <span class="user">{loggedIn ? "Captain Box" : "Guest"}</span>
|
|
79
77
|
</span>
|
|
80
78
|
|
|
81
79
|
<MiniButton aria-label="Log out" title="Log out" onclick={logout}>
|
|
@@ -87,12 +85,14 @@ function logout() {
|
|
|
87
85
|
|
|
88
86
|
<TextLayout>
|
|
89
87
|
<Stack class="hero-copy">
|
|
90
|
-
<p class="kicker">
|
|
91
|
-
<h1>
|
|
88
|
+
<p class="kicker">Containership Operations</p>
|
|
89
|
+
<h1>A bridge display for very opinionated cargo rectangles</h1>
|
|
92
90
|
<p>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
The harbor team uses this console to track reefers, dry boxes, twist
|
|
92
|
+
locks, and manifest oddities before the ship clears the breakwater. By
|
|
93
|
+
dawn, every suspicious seal, late manifest, and chilled pallet should
|
|
94
|
+
have a berth assignment, a watch officer, and a paper trail tidy enough
|
|
95
|
+
to survive a salty breeze.
|
|
96
96
|
</p>
|
|
97
97
|
<p>{statusMessage}</p>
|
|
98
98
|
</Stack>
|
|
@@ -100,14 +100,17 @@ function logout() {
|
|
|
100
100
|
<Form layout="above" fullWidth globalInputStyles>
|
|
101
101
|
<Fieldset>
|
|
102
102
|
{#snippet legend()}
|
|
103
|
-
Filters
|
|
103
|
+
Manifest Filters
|
|
104
104
|
{/snippet}
|
|
105
105
|
|
|
106
106
|
<FormItem>
|
|
107
107
|
{#snippet label()}
|
|
108
|
-
Search
|
|
108
|
+
Search Cargo
|
|
109
109
|
{/snippet}
|
|
110
|
-
<Input
|
|
110
|
+
<Input
|
|
111
|
+
bind:value={search}
|
|
112
|
+
placeholder="Search containers, bays, or crews"
|
|
113
|
+
/>
|
|
111
114
|
</FormItem>
|
|
112
115
|
|
|
113
116
|
<FormItem>
|
|
@@ -115,22 +118,24 @@ function logout() {
|
|
|
115
118
|
Sort By
|
|
116
119
|
{/snippet}
|
|
117
120
|
<Select bind:value={sortBy} data-audit-action="open-select">
|
|
118
|
-
<option value="
|
|
119
|
-
<option value="
|
|
120
|
-
<option value="
|
|
121
|
+
<option value="berth">Berth Order</option>
|
|
122
|
+
<option value="temperature">Temperature Risk</option>
|
|
123
|
+
<option value="bay">Bay Number</option>
|
|
121
124
|
</Select>
|
|
122
125
|
</FormItem>
|
|
123
126
|
|
|
124
127
|
<FormItem>
|
|
125
128
|
{#snippet label()}
|
|
126
|
-
|
|
129
|
+
Watchlist
|
|
127
130
|
{/snippet}
|
|
128
|
-
<Checkbox bind:checked={showAssignedOnly}>
|
|
131
|
+
<Checkbox bind:checked={showAssignedOnly}>
|
|
132
|
+
Only show containers on my deck watch
|
|
133
|
+
</Checkbox>
|
|
129
134
|
</FormItem>
|
|
130
135
|
|
|
131
136
|
<FormItem>
|
|
132
137
|
{#snippet label()}
|
|
133
|
-
|
|
138
|
+
Seaworthiness Threshold ({confidenceThreshold}%)
|
|
134
139
|
{/snippet}
|
|
135
140
|
<Slider bind:value={confidenceThreshold} min={0} max={100} step={1} />
|
|
136
141
|
</FormItem>
|
|
@@ -142,7 +147,7 @@ function logout() {
|
|
|
142
147
|
<Form layout="above" fullWidth>
|
|
143
148
|
<Fieldset>
|
|
144
149
|
{#snippet legend()}
|
|
145
|
-
Summary
|
|
150
|
+
Manifest Summary
|
|
146
151
|
{/snippet}
|
|
147
152
|
<FormItem>
|
|
148
153
|
{#snippet label()}
|
|
@@ -150,8 +155,10 @@ function logout() {
|
|
|
150
155
|
{/snippet}
|
|
151
156
|
<p>
|
|
152
157
|
Query <strong>{search}</strong>, sorted by <strong>{sortBy}</strong>,
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
watchlist only: <strong>{showAssignedOnly ? "yes" : "no"}</strong>,
|
|
159
|
+
seaworthiness: <strong>{confidenceThreshold}%</strong>. The manifest
|
|
160
|
+
clerk has underlined this in blue pencil, which is how serious
|
|
161
|
+
container people express whimsy.
|
|
155
162
|
</p>
|
|
156
163
|
</FormItem>
|
|
157
164
|
</Fieldset>
|