• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

adobe / spectrum-web-components / 14094674923

26 Mar 2025 10:27PM UTC coverage: 86.218% (-11.8%) from 98.002%
14094674923

Pull #5221

github

web-flow
Merge 2a1ea92e7 into 3184c1e6a
Pull Request #5221: RFC | leverage css module imports in components

1737 of 2032 branches covered (85.48%)

Branch coverage included in aggregate %.

14184 of 16434 relevant lines covered (86.31%)

85.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.09
/packages/tooltip/src/tooltip-directive.ts
1
/*
1✔
2
Copyright 2023 Adobe. All rights reserved.
1✔
3
This file is licensed to you under the Apache License, Version 2.0 (the "License");
1✔
4
you may not use this file except in compliance with the License. You may obtain a copy
1✔
5
of the License at http://www.apache.org/licenses/LICENSE-2.0
1✔
6

1✔
7
Unless required by applicable law or agreed to in writing, software distributed under
1✔
8
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1✔
9
OF ANY KIND, either express or implied. See the License for the specific language
1✔
10
governing permissions and limitations under the License.
1✔
11
*/
1✔
12
import { html, TemplateResult } from '@spectrum-web-components/base';
1✔
13
import { ifDefined } from '@spectrum-web-components/base/src/directives.js';
1✔
14
import {
1✔
15
    OverlayTriggerOptions,
1✔
16
    trigger,
1✔
17
} from '@spectrum-web-components/overlay/src/overlay-trigger-directive.js';
1✔
18

1✔
19
export const tooltip = function tooltip(
1✔
20
    tooltipContent: () => TemplateResult,
2✔
21
    options?: Partial<OverlayTriggerOptions & { variant: string }>
2✔
22
): ReturnType<typeof trigger> {
2✔
23
    return trigger(
2✔
24
        () => {
2✔
25
            import('@spectrum-web-components/tooltip/sp-tooltip.js');
×
26
            return html`
×
27
                <sp-tooltip variant=${ifDefined(options?.variant)}>
×
28
                    ${tooltipContent()}
×
29
                </sp-tooltip>
×
30
            `;
×
31
        },
×
32
        {
2✔
33
            ...options,
2✔
34
            triggerInteraction: 'hover',
2✔
35
            overlayOptions: {
2✔
36
                type: 'hint',
2✔
37
                ...options?.overlayOptions,
2✔
38
            },
2✔
39
        }
2✔
40
    );
2✔
41
};
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc