@crowdstrike/glide-core 0.32.3 → 0.34.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/dist/accordion.js +3 -2
- package/dist/button-group.button.js +3 -2
- package/dist/button-group.js +3 -2
- package/dist/button.js +5 -10
- package/dist/button.styles.js +0 -12
- package/dist/checkbox-group.js +8 -7
- package/dist/checkbox.js +11 -9
- package/dist/checkbox.styles.js +1 -1
- package/dist/drawer.js +3 -2
- package/dist/dropdown.js +51 -45
- package/dist/dropdown.option.d.ts +2 -0
- package/dist/dropdown.option.js +26 -25
- package/dist/dropdown.styles.js +11 -2
- package/dist/form-controls-layout.js +3 -2
- package/dist/icon-button.js +2 -2
- package/dist/inline-alert.d.ts +4 -0
- package/dist/inline-alert.js +25 -6
- package/dist/input.js +7 -7
- package/dist/input.styles.js +3 -2
- package/dist/label.js +3 -2
- package/dist/library/assert-slot.js +2 -2
- package/dist/library/assert-slot.test.js +92 -0
- package/dist/library/localize.d.ts +1 -0
- package/dist/link.js +2 -2
- package/dist/menu.js +61 -30
- package/dist/menu.styles.js +1 -0
- package/dist/modal.icon-button.js +3 -2
- package/dist/modal.js +3 -2
- package/dist/option.d.ts +5 -0
- package/dist/option.js +28 -5
- package/dist/options.d.ts +2 -0
- package/dist/options.group.js +3 -2
- package/dist/options.js +7 -8
- package/dist/options.styles.js +0 -6
- package/dist/popover.js +3 -2
- package/dist/radio-group.js +4 -3
- package/dist/radio-group.radio.js +3 -2
- package/dist/select.d.ts +90 -0
- package/dist/select.js +532 -0
- package/dist/slider.js +3 -3
- package/dist/slider.styles.js +1 -3
- package/dist/spinner.js +2 -2
- package/dist/split-button.js +3 -2
- package/dist/split-button.primary-button.js +2 -2
- package/dist/split-button.primary-link.js +2 -2
- package/dist/split-button.secondary-button.js +2 -2
- package/dist/styles/opacity-and-scale-animation.js +2 -1
- package/dist/styles/variables.css +12 -8
- package/dist/tab.group.js +3 -2
- package/dist/tab.js +3 -2
- package/dist/tab.panel.js +3 -2
- package/dist/tag.d.ts +1 -0
- package/dist/tag.js +8 -2
- package/dist/tag.styles.js +9 -1
- package/dist/textarea.js +8 -7
- package/dist/textarea.styles.js +3 -2
- package/dist/toast.js +2 -2
- package/dist/toast.toasts.js +3 -2
- package/dist/toggle.js +3 -2
- package/dist/tooltip.container.js +3 -2
- package/dist/tooltip.js +6 -9
- package/dist/translations/en.js +1 -0
- package/dist/translations/fr.d.ts +1 -1
- package/dist/translations/fr.js +1 -0
- package/dist/translations/ja.d.ts +1 -1
- package/dist/translations/ja.js +1 -0
- package/package.json +4 -4
- package/dist/library/shadow-root-mode.d.ts +0 -2
- package/dist/library/shadow-root-mode.js +0 -4
@@ -16,7 +16,8 @@ export default (selector) => {
|
|
16
16
|
|
17
17
|
${unsafeCSS(selector)} {
|
18
18
|
@media (prefers-reduced-motion: no-preference) {
|
19
|
-
animation: opacity-and-scale
|
19
|
+
animation: opacity-and-scale var(--glide-core-duration-moderate-02)
|
20
|
+
var(--glide-core-animation-swoop);
|
20
21
|
}
|
21
22
|
}
|
22
23
|
`;
|
@@ -123,7 +123,7 @@
|
|
123
123
|
--glide-core-color-severity-stroke-high: #ffbf66;
|
124
124
|
--glide-core-color-severity-stroke-medium: #ffcc00;
|
125
125
|
--glide-core-color-severity-stroke-low: #c9c9c9;
|
126
|
-
--glide-core-color-severity-text-
|
126
|
+
--glide-core-color-severity-text-critical: #2c0907;
|
127
127
|
--glide-core-color-severity-text-high: #331e00;
|
128
128
|
--glide-core-color-severity-text-medium: #332900;
|
129
129
|
--glide-core-color-severity-text-low: #212121;
|
@@ -145,7 +145,7 @@
|
|
145
145
|
--glide-core-private-color-button-stroke-default: #006ad4;
|
146
146
|
--glide-core-private-color-button-text-primary: #ffffff;
|
147
147
|
--glide-core-private-color-button-icon-primary: #ffffff;
|
148
|
-
--glide-core-private-color-checkbox-surface-background-selected
|
148
|
+
--glide-core-private-color-checkbox-surface-background-selected: #ffffff;
|
149
149
|
--glide-core-private-color-checkbox-surface-background-idle: #ffffff;
|
150
150
|
--glide-core-private-color-checkbox-icon-default--disabled: #d9d9d9;
|
151
151
|
--glide-core-private-color-radio-icon-default--disabled: #d9d9d9;
|
@@ -153,7 +153,7 @@
|
|
153
153
|
--glide-core-private-color-dialog-and-modal-surface-overlay: #0000008c;
|
154
154
|
--glide-core-private-color-skeleton-loader-surface-linear-gradient-sides: #0000000d;
|
155
155
|
--glide-core-private-color-skeleton-loader-surface-linear-gradient-middle: #0000001a;
|
156
|
-
--glide-core-private-color-slider-
|
156
|
+
--glide-core-private-color-slider-surface-handle: #f0f0f0;
|
157
157
|
--glide-core-private-color-tabs-stroke-underline: #e3e3e3;
|
158
158
|
--glide-core-private-color-template-surface-container-detail: #ffffffe5;
|
159
159
|
--glide-core-private-color-tooltip-surface-container: #212121;
|
@@ -284,7 +284,7 @@
|
|
284
284
|
--glide-core-color-severity-stroke-high: #e7a649;
|
285
285
|
--glide-core-color-severity-stroke-medium: #f0cf4f;
|
286
286
|
--glide-core-color-severity-stroke-low: #727272;
|
287
|
-
--glide-core-color-severity-text-
|
287
|
+
--glide-core-color-severity-text-critical: #e67873;
|
288
288
|
--glide-core-color-severity-text-high: #ffb64f;
|
289
289
|
--glide-core-color-severity-text-medium: #f0cf4f;
|
290
290
|
--glide-core-color-severity-text-low: #f9f9f9;
|
@@ -306,7 +306,7 @@
|
|
306
306
|
--glide-core-private-color-button-stroke-default: #5394d5;
|
307
307
|
--glide-core-private-color-button-text-primary: #f9f9f9;
|
308
308
|
--glide-core-private-color-button-icon-primary: #f9f9f9;
|
309
|
-
--glide-core-private-color-checkbox-surface-background-selected
|
309
|
+
--glide-core-private-color-checkbox-surface-background-selected: #ffffff;
|
310
310
|
--glide-core-private-color-checkbox-surface-background-idle: #1414144d;
|
311
311
|
--glide-core-private-color-checkbox-icon-default--disabled: #434343;
|
312
312
|
--glide-core-private-color-radio-icon-default--disabled: #434343;
|
@@ -314,7 +314,7 @@
|
|
314
314
|
--glide-core-private-color-dialog-and-modal-surface-overlay: #141414d9;
|
315
315
|
--glide-core-private-color-skeleton-loader-surface-linear-gradient-sides: #ffffff0d;
|
316
316
|
--glide-core-private-color-skeleton-loader-surface-linear-gradient-middle: #ffffff1a;
|
317
|
-
--glide-core-private-color-slider-
|
317
|
+
--glide-core-private-color-slider-surface-handle: #2c2c2c;
|
318
318
|
--glide-core-private-color-tabs-stroke-underline: #ffffff26;
|
319
319
|
--glide-core-private-color-template-surface-container-detail: #222222;
|
320
320
|
--glide-core-private-color-tooltip-surface-container: #dcdcdc;
|
@@ -337,12 +337,18 @@
|
|
337
337
|
--glide-core-duration-fast-02: 100ms;
|
338
338
|
--glide-core-duration-moderate-01: 150ms;
|
339
339
|
--glide-core-duration-moderate-02: 250ms;
|
340
|
+
--glide-core-duration-moderate-03: 325ms;
|
340
341
|
--glide-core-duration-slow-01: 400ms;
|
341
342
|
--glide-core-duration-slow-02: 900ms;
|
342
343
|
}
|
343
344
|
|
344
345
|
/* src/styles/variables/miscellaneous.css */
|
345
346
|
:root {
|
347
|
+
--glide-core-typography-family-primary: "Nunito", system-ui;
|
348
|
+
--glide-core-typography-family-monospace:
|
349
|
+
"Oxygen Mono",
|
350
|
+
ui-monospace,
|
351
|
+
monospace;
|
346
352
|
--glide-core-effect-hovered: 0px 0px 2px 0px var(--glide-core-color-effect-color-elevation-hovered);
|
347
353
|
--glide-core-effect-lifted: 0px 2px 8px 0px var(--glide-core-color-effect-color-elevation-lifted);
|
348
354
|
--glide-core-effect-raised: 0px 3px 1px 0px var(--glide-core-color-effect-color-elevation-raised-1), 0px 3px 8px 0 var(--glide-core-color-effect-color-elevation-raised-2);
|
@@ -394,8 +400,6 @@
|
|
394
400
|
--glide-core-typography-size-body-default: 0.875rem;
|
395
401
|
--glide-core-typography-size-body-small: 0.75rem;
|
396
402
|
--glide-core-typography-size-component-chartlabel-md: 0.625rem;
|
397
|
-
--glide-core-typography-family-primary: "Nunito";
|
398
|
-
--glide-core-typography-family-monospace: "Oxygen Mono";
|
399
403
|
--glide-core-typography-weight-light: 300;
|
400
404
|
--glide-core-typography-weight-regular: 400;
|
401
405
|
--glide-core-typography-weight-semibold: 600;
|
package/dist/tab.group.js
CHANGED
@@ -18,7 +18,6 @@ import chevronIcon from './icons/chevron.js';
|
|
18
18
|
import onResize from './library/on-resize.js';
|
19
19
|
import styles from './tab.group.styles.js';
|
20
20
|
import assertSlot from './library/assert-slot.js';
|
21
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
22
21
|
import final from './library/final.js';
|
23
22
|
/**
|
24
23
|
* @readonly
|
@@ -47,10 +46,12 @@ let TabGroup = class TabGroup extends LitElement {
|
|
47
46
|
this.#selectedTabIndicatorElementRef = createRef();
|
48
47
|
this.#tabListElementRef = createRef();
|
49
48
|
}
|
49
|
+
/* c8 ignore start */
|
50
50
|
static { this.shadowRootOptions = {
|
51
51
|
...LitElement.shadowRootOptions,
|
52
|
-
mode:
|
52
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
53
53
|
}; }
|
54
|
+
/* c8 ignore end */
|
54
55
|
static { this.styles = styles; }
|
55
56
|
render() {
|
56
57
|
return html `<div
|
package/dist/tab.js
CHANGED
@@ -9,7 +9,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
10
10
|
import packageJson from '../package.json' with { type: 'json' };
|
11
11
|
import styles from './tab.styles.js';
|
12
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
13
12
|
import final from './library/final.js';
|
14
13
|
import required from './library/required.js';
|
15
14
|
import uniqueId from './library/unique-id.js';
|
@@ -42,10 +41,12 @@ let Tab = class Tab extends LitElement {
|
|
42
41
|
this.role = 'tab';
|
43
42
|
this.#isSelected = false;
|
44
43
|
}
|
44
|
+
/* c8 ignore start */
|
45
45
|
static { this.shadowRootOptions = {
|
46
46
|
...LitElement.shadowRootOptions,
|
47
|
-
mode:
|
47
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
48
48
|
}; }
|
49
|
+
/* c8 ignore end */
|
49
50
|
static { this.styles = styles; }
|
50
51
|
/**
|
51
52
|
* @default false
|
package/dist/tab.panel.js
CHANGED
@@ -9,7 +9,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
10
10
|
import packageJson from '../package.json' with { type: 'json' };
|
11
11
|
import styles from './tab.panel.styles.js';
|
12
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
13
12
|
import final from './library/final.js';
|
14
13
|
import required from './library/required.js';
|
15
14
|
import uniqueId from './library/unique-id.js';
|
@@ -38,10 +37,12 @@ let TabPanel = class TabPanel extends LitElement {
|
|
38
37
|
this.id = uniqueId();
|
39
38
|
this.#isSelected = false;
|
40
39
|
}
|
40
|
+
/* c8 ignore start */
|
41
41
|
static { this.shadowRootOptions = {
|
42
42
|
...LitElement.shadowRootOptions,
|
43
|
-
mode:
|
43
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
44
44
|
}; }
|
45
|
+
/* c8 ignore end */
|
45
46
|
static { this.styles = styles; }
|
46
47
|
// Private because it's only meant to be used by Tab Group.
|
47
48
|
get privateIsSelected() {
|
package/dist/tag.d.ts
CHANGED
package/dist/tag.js
CHANGED
@@ -14,7 +14,6 @@ import { LocalizeController } from './library/localize.js';
|
|
14
14
|
import pencilIcon from './icons/pencil.js';
|
15
15
|
import styles from './tag.styles.js';
|
16
16
|
import xIcon from './icons/x.js';
|
17
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
18
17
|
import final from './library/final.js';
|
19
18
|
import required from './library/required.js';
|
20
19
|
/**
|
@@ -36,6 +35,8 @@ let Tag = class Tag extends LitElement {
|
|
36
35
|
this.disabled = false;
|
37
36
|
// Private because it's only meant to be used by Dropdown.
|
38
37
|
this.privateEditable = false;
|
38
|
+
// Private because it's only meant to be used by Dropdown.
|
39
|
+
this.privateReadonly = false;
|
39
40
|
this.removable = false;
|
40
41
|
this.version = packageJson.version;
|
41
42
|
this.#animationDuration = 100;
|
@@ -54,10 +55,11 @@ let Tag = class Tag extends LitElement {
|
|
54
55
|
this.#localize = new LocalizeController(this);
|
55
56
|
this.#removalButtonElementRef = createRef();
|
56
57
|
}
|
58
|
+
/* c8 ignore start */
|
57
59
|
static { this.shadowRootOptions = {
|
58
60
|
...LitElement.shadowRootOptions,
|
59
61
|
delegatesFocus: true,
|
60
|
-
mode:
|
62
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
61
63
|
}; }
|
62
64
|
static { this.styles = styles; }
|
63
65
|
click() {
|
@@ -78,6 +80,7 @@ let Tag = class Tag extends LitElement {
|
|
78
80
|
component: true,
|
79
81
|
added: true,
|
80
82
|
disabled: this.disabled,
|
83
|
+
readonly: this.privateReadonly,
|
81
84
|
})}
|
82
85
|
data-test="component"
|
83
86
|
data-animation-duration=${this.#animationDuration}
|
@@ -194,6 +197,9 @@ __decorate([
|
|
194
197
|
__decorate([
|
195
198
|
property({ attribute: 'private-editable', reflect: true, type: Boolean })
|
196
199
|
], Tag.prototype, "privateEditable", void 0);
|
200
|
+
__decorate([
|
201
|
+
property({ attribute: 'private-readonly', reflect: true, type: Boolean })
|
202
|
+
], Tag.prototype, "privateReadonly", void 0);
|
197
203
|
__decorate([
|
198
204
|
property({ reflect: true, type: Boolean })
|
199
205
|
], Tag.prototype, "removable", void 0);
|
package/dist/tag.styles.js
CHANGED
@@ -54,11 +54,19 @@ export default [
|
|
54
54
|
}
|
55
55
|
|
56
56
|
&.disabled {
|
57
|
-
background: var(
|
57
|
+
background-color: var(
|
58
|
+
--glide-core-color-static-surface-container-secondary
|
59
|
+
);
|
58
60
|
border-color: var(--glide-core-color-interactive-stroke-primary);
|
59
61
|
color: var(--glide-core-color-interactive-icon-default--disabled);
|
60
62
|
}
|
61
63
|
|
64
|
+
&.readonly {
|
65
|
+
background-color: var(--glide-core-color-static-surface-container);
|
66
|
+
border-color: var(--glide-core-color-interactive-stroke-primary);
|
67
|
+
color: var(--glide-core-color-interactive-text-default);
|
68
|
+
}
|
69
|
+
|
62
70
|
&.removed {
|
63
71
|
@media (prefers-reduced-motion: no-preference) {
|
64
72
|
animation-duration: var(--private-animation-duration);
|
package/dist/textarea.js
CHANGED
@@ -15,7 +15,6 @@ import { when } from 'lit/directives/when.js';
|
|
15
15
|
import packageJson from '../package.json' with { type: 'json' };
|
16
16
|
import { LocalizeController } from './library/localize.js';
|
17
17
|
import styles from './textarea.styles.js';
|
18
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
19
18
|
import final from './library/final.js';
|
20
19
|
import required from './library/required.js';
|
21
20
|
/**
|
@@ -69,11 +68,13 @@ import required from './library/required.js';
|
|
69
68
|
*/
|
70
69
|
let Textarea = class Textarea extends LitElement {
|
71
70
|
static { this.formAssociated = true; }
|
71
|
+
/* c8 ignore start */
|
72
72
|
static { this.shadowRootOptions = {
|
73
73
|
...LitElement.shadowRootOptions,
|
74
|
-
mode:
|
74
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
75
75
|
delegatesFocus: true,
|
76
76
|
}; }
|
77
|
+
/* c8 ignore end */
|
77
78
|
static { this.styles = styles; }
|
78
79
|
checkValidity() {
|
79
80
|
this.isCheckingValidity = true;
|
@@ -196,7 +197,7 @@ let Textarea = class Textarea extends LitElement {
|
|
196
197
|
reportValidity() {
|
197
198
|
this.isReportValidityOrSubmit = true;
|
198
199
|
const isValid = this.#internals.reportValidity();
|
199
|
-
// Ensures
|
200
|
+
// Ensures getters referencing `this.validity.valid` re-run.
|
200
201
|
this.requestUpdate();
|
201
202
|
return isValid;
|
202
203
|
}
|
@@ -263,12 +264,12 @@ let Textarea = class Textarea extends LitElement {
|
|
263
264
|
this.isReportValidityOrSubmit = true;
|
264
265
|
const isFirstInvalidFormElement = this.form?.querySelector(':invalid') === this;
|
265
266
|
if (isFirstInvalidFormElement) {
|
266
|
-
// - `
|
267
|
-
//
|
268
|
-
//
|
267
|
+
// - `delegatesFocus` is preferred because it's declarative. But it's limited to
|
268
|
+
// focusing the first focusable element. That doesn't work for us because the first
|
269
|
+
// focusable element is the Tooltip when it's present.
|
269
270
|
//
|
270
271
|
// - Canceling this event means the input won't get focus, even if we were to use
|
271
|
-
// `
|
272
|
+
// `delegatesFocus`.
|
272
273
|
//
|
273
274
|
// - The browser will ignore this if Input isn't the first invalid form control.
|
274
275
|
//
|
package/dist/textarea.styles.js
CHANGED
@@ -114,10 +114,11 @@ export default [
|
|
114
114
|
}
|
115
115
|
|
116
116
|
&[readonly] {
|
117
|
-
background-color:
|
117
|
+
background-color: var(
|
118
|
+
--glide-core-color-interactive-surface-container--disabled
|
119
|
+
);
|
118
120
|
border-color: transparent;
|
119
121
|
outline: none;
|
120
|
-
padding-inline-start: 0;
|
121
122
|
resize: none;
|
122
123
|
transition: none;
|
123
124
|
}
|
package/dist/toast.js
CHANGED
@@ -9,7 +9,6 @@ import { LitElement, html } from 'lit';
|
|
9
9
|
import { customElement, property } from 'lit/decorators.js';
|
10
10
|
import packageJson from '../package.json' with { type: 'json' };
|
11
11
|
import Toasts from './toast.toasts.js';
|
12
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
13
12
|
import final from './library/final.js';
|
14
13
|
import required from './library/required.js';
|
15
14
|
import Link from './link.js';
|
@@ -46,9 +45,10 @@ let Toast = class Toast extends LitElement {
|
|
46
45
|
this.variant = 'informational';
|
47
46
|
this.version = packageJson.version;
|
48
47
|
}
|
48
|
+
/* c8 ignore start */
|
49
49
|
static { this.shadowRootOptions = {
|
50
50
|
...LitElement.shadowRootOptions,
|
51
|
-
mode:
|
51
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
52
52
|
}; }
|
53
53
|
dismiss() {
|
54
54
|
this.dispatchEvent(new Event('dismiss', { bubbles: true, composed: true }));
|
package/dist/toast.toasts.js
CHANGED
@@ -17,7 +17,6 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
17
17
|
import xIcon from './icons/x.js';
|
18
18
|
import { LocalizeController } from './library/localize.js';
|
19
19
|
import styles from './toast.toasts.styles.js';
|
20
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
21
20
|
import final from './library/final.js';
|
22
21
|
import Toast from './toast.js';
|
23
22
|
import Link from './link.js';
|
@@ -40,10 +39,12 @@ let Toasts = class Toasts extends LitElement {
|
|
40
39
|
this.#componentElementRef = createRef();
|
41
40
|
this.#localize = new LocalizeController(this);
|
42
41
|
}
|
42
|
+
/* c8 ignore start */
|
43
43
|
static { this.shadowRootOptions = {
|
44
44
|
...LitElement.shadowRootOptions,
|
45
|
-
mode:
|
45
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
46
46
|
}; }
|
47
|
+
/* c8 ignore end */
|
47
48
|
static { this.styles = styles; }
|
48
49
|
dismiss(toast) {
|
49
50
|
const index = this.toasts.indexOf(toast);
|
package/dist/toggle.js
CHANGED
@@ -12,7 +12,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
12
|
import { when } from 'lit/directives/when.js';
|
13
13
|
import packageJson from '../package.json' with { type: 'json' };
|
14
14
|
import styles from './toggle.styles.js';
|
15
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
16
15
|
import final from './library/final.js';
|
17
16
|
import required from './library/required.js';
|
18
17
|
/**
|
@@ -42,10 +41,12 @@ let Toggle = class Toggle extends LitElement {
|
|
42
41
|
this.version = packageJson.version;
|
43
42
|
this.#inputElementRef = createRef();
|
44
43
|
}
|
44
|
+
/* c8 ignore start */
|
45
45
|
static { this.shadowRootOptions = {
|
46
46
|
...LitElement.shadowRootOptions,
|
47
|
-
mode:
|
47
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
48
48
|
}; }
|
49
|
+
/* c8 ignore end */
|
49
50
|
static { this.styles = styles; }
|
50
51
|
click() {
|
51
52
|
this.#inputElementRef.value?.click();
|
@@ -10,7 +10,6 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
10
10
|
import { map } from 'lit/directives/map.js';
|
11
11
|
import { when } from 'lit/directives/when.js';
|
12
12
|
import styles from './tooltip.container.styles.js';
|
13
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
14
13
|
import final from './library/final.js';
|
15
14
|
import uniqueId from './library/unique-id.js';
|
16
15
|
// This component exists because Tooltip's target and its tooltip both need to
|
@@ -46,10 +45,12 @@ let TooltipContainer = class TooltipContainer extends LitElement {
|
|
46
45
|
this.shortcut = [];
|
47
46
|
this.#isDisabled = false;
|
48
47
|
}
|
48
|
+
/* c8 ignore start */
|
49
49
|
static { this.shadowRootOptions = {
|
50
50
|
...LitElement.shadowRootOptions,
|
51
|
-
mode:
|
51
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
52
52
|
}; }
|
53
|
+
/* c8 ignore end */
|
53
54
|
static { this.styles = styles; }
|
54
55
|
/**
|
55
56
|
* @default false
|
package/dist/tooltip.js
CHANGED
@@ -14,7 +14,6 @@ import packageJson from '../package.json' with { type: 'json' };
|
|
14
14
|
import styles from './tooltip.styles.js';
|
15
15
|
import './tooltip.container.js';
|
16
16
|
import assertSlot from './library/assert-slot.js';
|
17
|
-
import shadowRootMode from './library/shadow-root-mode.js';
|
18
17
|
import final from './library/final.js';
|
19
18
|
import required from './library/required.js';
|
20
19
|
/**
|
@@ -48,10 +47,12 @@ let Tooltip = class Tooltip extends LitElement {
|
|
48
47
|
this.#targetSlotElementRef = createRef();
|
49
48
|
this.#tooltipElementRef = createRef();
|
50
49
|
}
|
50
|
+
/* c8 ignore start */
|
51
51
|
static { this.shadowRootOptions = {
|
52
52
|
...LitElement.shadowRootOptions,
|
53
|
-
mode:
|
53
|
+
mode: window.navigator.webdriver ? 'open' : 'closed',
|
54
54
|
}; }
|
55
|
+
/* c8 ignore end */
|
55
56
|
static { this.styles = styles; }
|
56
57
|
/**
|
57
58
|
* @default undefined
|
@@ -265,11 +266,7 @@ let Tooltip = class Tooltip extends LitElement {
|
|
265
266
|
])}
|
266
267
|
</div>
|
267
268
|
|
268
|
-
<div
|
269
|
-
class=${classMap({
|
270
|
-
content: true,
|
271
|
-
})}
|
272
|
-
>
|
269
|
+
<div class="content">
|
273
270
|
<slot class="default-slot" name="private">
|
274
271
|
<!--
|
275
272
|
@type {TooltipContainer}
|
@@ -333,8 +330,8 @@ let Tooltip = class Tooltip extends LitElement {
|
|
333
330
|
#onTargetSlotChange() {
|
334
331
|
const container = this.querySelector('glide-core-private-tooltip-container');
|
335
332
|
const target = this.#targetSlotElementRef.value?.assignedElements().at(0);
|
336
|
-
if (container &&
|
337
|
-
target
|
333
|
+
if (container && !this.disabled && !this.screenreaderHidden) {
|
334
|
+
target?.setAttribute('aria-describedby', container.id);
|
338
335
|
}
|
339
336
|
}
|
340
337
|
#onTargetSlotFocusIn() {
|
package/dist/translations/en.js
CHANGED
@@ -16,6 +16,7 @@ const translation = {
|
|
16
16
|
severityInformational: 'Severity: Informational',
|
17
17
|
severityCritical: 'Severity: Critical',
|
18
18
|
severityMedium: 'Severity: Medium',
|
19
|
+
severityHigh: 'Severity: High',
|
19
20
|
success: 'Success:',
|
20
21
|
error: 'Error:',
|
21
22
|
informational: 'Informational:',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Translation } from '../library/localize.js';
|
2
|
-
export declare const PENDING_STRINGS: readonly ["severityInformational", "severityCritical", "severityMedium", "success", "error", "informational", "loading", "noAvailableOptions", "noMatchingOptions", "maximum", "setMaximum", "minimum", "setMinimum", "add"];
|
2
|
+
export declare const PENDING_STRINGS: readonly ["severityInformational", "severityCritical", "severityMedium", "severityHigh", "success", "error", "informational", "loading", "noAvailableOptions", "noMatchingOptions", "maximum", "setMaximum", "minimum", "setMinimum", "add"];
|
3
3
|
type PendingTranslation = (typeof PENDING_STRINGS)[number];
|
4
4
|
declare const translation: Omit<Translation, PendingTranslation>;
|
5
5
|
export default translation;
|
package/dist/translations/fr.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { Translation } from '../library/localize.js';
|
2
|
-
export declare const PENDING_STRINGS: readonly ["severityInformational", "severityCritical", "severityMedium", "success", "error", "informational", "loading", "noAvailableOptions", "noMatchingOptions", "maximum", "setMaximum", "minimum", "setMinimum", "add"];
|
2
|
+
export declare const PENDING_STRINGS: readonly ["severityInformational", "severityCritical", "severityMedium", "severityHigh", "success", "error", "informational", "loading", "noAvailableOptions", "noMatchingOptions", "maximum", "setMaximum", "minimum", "setMinimum", "add"];
|
3
3
|
type PendingTranslation = (typeof PENDING_STRINGS)[number];
|
4
4
|
declare const translation: Omit<Translation, PendingTranslation>;
|
5
5
|
export default translation;
|
package/dist/translations/ja.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crowdstrike/glide-core",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.34.0",
|
4
4
|
"description": "A Web Component design system",
|
5
5
|
"author": "CrowdStrike UX Team",
|
6
6
|
"license": "Apache-2.0",
|
@@ -68,7 +68,6 @@
|
|
68
68
|
"@figma/rest-api-spec": "^0.32.0",
|
69
69
|
"@html-eslint/eslint-plugin": "^0.41.0",
|
70
70
|
"@jridgewell/trace-mapping": "^0.3.29",
|
71
|
-
"@lit-labs/ssr": "^3.3.1",
|
72
71
|
"@open-wc/testing": "^4.0.0",
|
73
72
|
"@playwright/test": "^1.54.2",
|
74
73
|
"@rollup/plugin-commonjs": "^28.0.2",
|
@@ -90,8 +89,8 @@
|
|
90
89
|
"@types/istanbul-lib-report": "^3.0.3",
|
91
90
|
"@types/istanbul-reports": "^3.0.4",
|
92
91
|
"@types/mocha": "^10.0.10",
|
92
|
+
"@types/serialize-javascript": "^5.0.4",
|
93
93
|
"@types/sinon": "^17.0.3",
|
94
|
-
"@typescript-eslint/rule-tester": "^8.33.0",
|
95
94
|
"@typescript-eslint/types": "^8.33.0",
|
96
95
|
"@typescript-eslint/utils": "^8.33.0",
|
97
96
|
"@web/dev-server-esbuild": "^1.0.4",
|
@@ -135,6 +134,7 @@
|
|
135
134
|
"react": "^19.1.0",
|
136
135
|
"react-dom": "^19.1.0",
|
137
136
|
"rimraf": "^6.0.1",
|
137
|
+
"serialize-javascript": "^6.0.2",
|
138
138
|
"sinon": "^19.0.2",
|
139
139
|
"storybook": "^8.6.14",
|
140
140
|
"stylelint": "^16.21.1",
|
@@ -189,7 +189,7 @@
|
|
189
189
|
"test:development:playwright": "npm-run-all --parallel test:development:playwright:coverage test:development:playwright:ui",
|
190
190
|
"test:development:playwright:coverage": "http-server ./dist/playwright/coverage-report --port 6008 --silent",
|
191
191
|
"test:development:playwright:ui": "playwright test --config ./src/playwright/playwright.config.ts --ui-port 6007 --update-snapshots --update-source-method=overwrite",
|
192
|
-
"test:development:playwright:update": "PLAYWRIGHT_SKIP_COVERAGE=true playwright test --config ./src/playwright/playwright.config.ts --quiet --
|
192
|
+
"test:development:playwright:update": "PLAYWRIGHT_SKIP_COVERAGE=true playwright test --config ./src/playwright/playwright.config.ts --quiet --grep @accessibility --update-snapshots --update-source-method=overwrite --workers 100%",
|
193
193
|
"test:development:web-test-runner": "web-test-runner --watch",
|
194
194
|
"test:production": "pnpm start:production:esbuild && npm-run-all --aggregate-output --print-label --parallel test:production:*",
|
195
195
|
"test:production:playwright": "playwright test --config ./src/playwright/playwright.config.ts --grep 'is accessible|@eslint|@events|@forms|@keyboard|@miscellaneous|@mouse|@stylelint'",
|