@crowdstrike/glide-core 0.29.1 → 0.30.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 +240 -1
- package/dist/accordion.styles.js +13 -7
- package/dist/button-group.button.js +143 -1
- package/dist/button-group.button.styles.js +43 -15
- package/dist/button-group.js +249 -1
- package/dist/button-group.styles.js +10 -5
- package/dist/button.js +206 -1
- package/dist/button.styles.js +12 -7
- package/dist/checkbox-group.js +479 -14
- package/dist/checkbox-group.styles.js +5 -2
- package/dist/checkbox.js +519 -32
- package/dist/checkbox.styles.js +10 -5
- package/dist/drawer.js +168 -1
- package/dist/drawer.styles.js +5 -2
- package/dist/dropdown.js +2423 -123
- package/dist/dropdown.option.js +536 -1
- package/dist/dropdown.option.styles.js +5 -2
- package/dist/dropdown.styles.js +14 -7
- package/dist/form-controls-layout.js +102 -1
- package/dist/form-controls-layout.styles.js +5 -2
- package/dist/icon-button.js +139 -1
- package/dist/icon-button.styles.js +19 -7
- package/dist/icons/checked.js +28 -1
- package/dist/icons/chevron.js +21 -1
- package/dist/icons/magnifying-glass.js +23 -1
- package/dist/icons/pencil.js +21 -1
- package/dist/icons/severity-critical.js +20 -1
- package/dist/icons/severity-informational.js +20 -1
- package/dist/icons/severity-medium.js +20 -1
- package/dist/icons/x.js +21 -1
- package/dist/inline-alert.js +118 -1
- package/dist/inline-alert.styles.js +5 -2
- package/dist/input.d.ts +8 -2
- package/dist/input.js +505 -41
- package/dist/input.styles.js +25 -4
- package/dist/label.js +303 -1
- package/dist/label.styles.js +11 -5
- package/dist/library/assert-slot.js +136 -1
- package/dist/library/expect-unhandled-rejection.js +14 -1
- package/dist/library/expect-window-error.js +26 -1
- package/dist/library/final.js +18 -1
- package/dist/library/form-control.js +1 -1
- package/dist/library/localize.js +10 -1
- package/dist/library/mouse.js +35 -1
- package/dist/library/on-resize.js +24 -1
- package/dist/library/required.js +35 -1
- package/dist/library/shadow-root-mode.js +4 -1
- package/dist/library/unique-id.js +3 -1
- package/dist/link.js +92 -1
- package/dist/link.styles.js +10 -5
- package/dist/menu.d.ts +3 -2
- package/dist/menu.js +1259 -1
- package/dist/menu.styles.js +34 -17
- package/dist/modal.d.ts +4 -0
- package/dist/modal.icon-button.js +60 -1
- package/dist/modal.icon-button.styles.js +5 -2
- package/dist/modal.js +473 -1
- package/dist/modal.styles.js +71 -22
- package/dist/option.d.ts +74 -0
- package/dist/option.js +498 -0
- package/dist/option.styles.js +140 -0
- package/dist/{menu.options.d.ts → options.d.ts} +5 -6
- package/dist/options.js +130 -0
- package/dist/options.styles.js +21 -0
- package/dist/popover.js +620 -1
- package/dist/popover.styles.js +11 -5
- package/dist/radio-group.js +624 -17
- package/dist/radio-group.radio.js +211 -1
- package/dist/radio-group.radio.styles.js +9 -4
- package/dist/radio-group.styles.js +5 -2
- package/dist/slider.js +1040 -61
- package/dist/slider.styles.js +9 -4
- package/dist/spinner.js +60 -1
- package/dist/spinner.styles.js +5 -2
- package/dist/split-button.js +116 -1
- package/dist/split-button.primary-button.js +100 -1
- package/dist/split-button.primary-button.styles.js +13 -6
- package/dist/split-button.primary-link.js +102 -1
- package/dist/split-button.secondary-button.d.ts +2 -3
- package/dist/split-button.secondary-button.js +121 -1
- package/dist/split-button.secondary-button.styles.js +12 -7
- package/dist/split-button.styles.js +9 -4
- package/dist/styles/focus-outline.js +9 -3
- package/dist/styles/fonts.css +6 -1
- package/dist/styles/opacity-and-scale-animation.js +6 -3
- package/dist/styles/skeleton.js +6 -3
- package/dist/styles/variables.css +410 -1
- package/dist/styles/visually-hidden.js +6 -3
- package/dist/tab.group.js +386 -1
- package/dist/tab.group.styles.js +5 -2
- package/dist/tab.js +133 -1
- package/dist/tab.panel.js +93 -1
- package/dist/tab.panel.styles.js +11 -5
- package/dist/tab.styles.js +9 -4
- package/dist/tag.js +207 -1
- package/dist/tag.styles.js +10 -5
- package/dist/textarea.js +353 -19
- package/dist/textarea.styles.js +23 -4
- package/dist/toast.js +130 -1
- package/dist/toast.toasts.js +248 -25
- package/dist/toast.toasts.styles.js +9 -4
- package/dist/toggle.js +178 -1
- package/dist/toggle.styles.js +25 -5
- package/dist/tooltip.container.d.ts +2 -0
- package/dist/tooltip.container.js +130 -1
- package/dist/tooltip.container.styles.js +18 -4
- package/dist/tooltip.d.ts +6 -0
- package/dist/tooltip.js +484 -1
- package/dist/tooltip.styles.js +21 -5
- package/dist/translations/en.js +36 -1
- package/dist/translations/fr.js +37 -1
- package/dist/translations/ja.js +37 -1
- package/package.json +8 -12
- package/dist/menu.button.d.ts +0 -42
- package/dist/menu.button.js +0 -1
- package/dist/menu.button.styles.js +0 -32
- package/dist/menu.link.d.ts +0 -44
- package/dist/menu.link.js +0 -1
- package/dist/menu.link.styles.js +0 -35
- package/dist/menu.options.js +0 -1
- package/dist/menu.options.styles.d.ts +0 -2
- package/dist/menu.options.styles.js +0 -20
- /package/dist/{menu.button.styles.d.ts → option.styles.d.ts} +0 -0
- /package/dist/{menu.link.styles.d.ts → options.styles.d.ts} +0 -0
package/dist/inline-alert.js
CHANGED
@@ -1 +1,118 @@
|
|
1
|
-
var __decorate
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
import { html, LitElement } from 'lit';
|
8
|
+
import { classMap } from 'lit/directives/class-map.js';
|
9
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
10
|
+
import { customElement, property } from 'lit/decorators.js';
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
12
|
+
import packageJson from '../package.json' with { type: 'json' };
|
13
|
+
import styles from './inline-alert.styles.js';
|
14
|
+
import severityInformationalIcon from './icons/severity-informational.js';
|
15
|
+
import severityMediumIcon from './icons/severity-medium.js';
|
16
|
+
import severityCriticalIcon from './icons/severity-critical.js';
|
17
|
+
import assertSlot from './library/assert-slot.js';
|
18
|
+
import shadowRootMode from './library/shadow-root-mode.js';
|
19
|
+
import final from './library/final.js';
|
20
|
+
/**
|
21
|
+
* @attr {'informational'|'medium'|'high'|'critical'} [variant='informational']
|
22
|
+
*
|
23
|
+
* @readonly
|
24
|
+
* @attr {string} [version]
|
25
|
+
*
|
26
|
+
* @slot {Element | string} - The content of the alert
|
27
|
+
*/
|
28
|
+
let InlineAlert = class InlineAlert extends LitElement {
|
29
|
+
constructor() {
|
30
|
+
super(...arguments);
|
31
|
+
this.variant = 'informational';
|
32
|
+
this.version = packageJson.version;
|
33
|
+
this.#animationDuration = 100;
|
34
|
+
this.#componentElementRef = createRef();
|
35
|
+
}
|
36
|
+
static { this.shadowRootOptions = {
|
37
|
+
...LitElement.shadowRootOptions,
|
38
|
+
mode: shadowRootMode,
|
39
|
+
}; }
|
40
|
+
static { this.styles = styles; }
|
41
|
+
firstUpdated() {
|
42
|
+
this.#componentElementRef.value?.addEventListener('animationend', () => {
|
43
|
+
this.#componentElementRef.value?.classList.remove('added');
|
44
|
+
}, { once: true });
|
45
|
+
}
|
46
|
+
render() {
|
47
|
+
return html `
|
48
|
+
<div
|
49
|
+
class=${classMap({
|
50
|
+
component: true,
|
51
|
+
added: true,
|
52
|
+
[this.variant]: true,
|
53
|
+
})}
|
54
|
+
role="alert"
|
55
|
+
aria-labelledby="label"
|
56
|
+
data-test="component"
|
57
|
+
style="--private-animation-duration: ${this.#animationDuration}ms"
|
58
|
+
${ref(this.#componentElementRef)}
|
59
|
+
>
|
60
|
+
<div
|
61
|
+
aria-hidden="true"
|
62
|
+
class=${classMap({
|
63
|
+
'icon-container': true,
|
64
|
+
[this.variant]: true,
|
65
|
+
})}
|
66
|
+
>
|
67
|
+
${icons[this.variant]}
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<div id="label" class="content">
|
71
|
+
<slot ${assertSlot()}>
|
72
|
+
<!--
|
73
|
+
The content of the alert
|
74
|
+
@required
|
75
|
+
@type {Element | string}
|
76
|
+
-->
|
77
|
+
</slot>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
`;
|
81
|
+
}
|
82
|
+
#animationDuration;
|
83
|
+
#componentElementRef;
|
84
|
+
};
|
85
|
+
__decorate([
|
86
|
+
property({ reflect: true, useDefault: true })
|
87
|
+
], InlineAlert.prototype, "variant", void 0);
|
88
|
+
__decorate([
|
89
|
+
property({ reflect: true })
|
90
|
+
], InlineAlert.prototype, "version", void 0);
|
91
|
+
InlineAlert = __decorate([
|
92
|
+
customElement('glide-core-inline-alert'),
|
93
|
+
final
|
94
|
+
], InlineAlert);
|
95
|
+
export default InlineAlert;
|
96
|
+
const icons = {
|
97
|
+
informational: severityInformationalIcon,
|
98
|
+
medium: severityMediumIcon,
|
99
|
+
high: html `
|
100
|
+
<svg
|
101
|
+
aria-hidden="true"
|
102
|
+
viewBox="0 0 16 16"
|
103
|
+
fill="none"
|
104
|
+
style=${styleMap({
|
105
|
+
height: 'var(--private-size, 1rem)',
|
106
|
+
width: 'var(--private-size, 1rem)',
|
107
|
+
})}
|
108
|
+
>
|
109
|
+
<path
|
110
|
+
fill-rule="evenodd"
|
111
|
+
clip-rule="evenodd"
|
112
|
+
d="M11.8924 1.33334H4.10768C3.75626 1.33333 3.45307 1.33332 3.20336 1.35372C2.93979 1.37525 2.67765 1.4228 2.42539 1.55132C2.04907 1.74307 1.74311 2.04903 1.55136 2.42536C1.42283 2.67761 1.37529 2.93976 1.35376 3.20332C1.33335 3.45303 1.33336 3.75619 1.33337 4.10762V11.8924C1.33336 12.2438 1.33335 12.547 1.35376 12.7967C1.37529 13.0603 1.42283 13.3224 1.55136 13.5747C1.74311 13.951 2.04907 14.2569 2.42539 14.4487C2.67765 14.5772 2.93979 14.6248 3.20336 14.6463C3.45307 14.6667 3.75624 14.6667 4.10766 14.6667H11.8924C12.2438 14.6667 12.547 14.6667 12.7967 14.6463C13.0603 14.6248 13.3224 14.5772 13.5747 14.4487C13.951 14.2569 14.257 13.951 14.4487 13.5747C14.5773 13.3224 14.6248 13.0603 14.6463 12.7967C14.6667 12.547 14.6667 12.2438 14.6667 11.8924V4.10763C14.6667 3.7562 14.6667 3.45303 14.6463 3.20332C14.6248 2.93976 14.5773 2.67761 14.4487 2.42536C14.257 2.04903 13.951 1.74307 13.5747 1.55132C13.3224 1.4228 13.0603 1.37525 12.7967 1.35372C12.547 1.33332 12.2438 1.33333 11.8924 1.33334ZM8.66671 5.33334C8.66671 4.96515 8.36823 4.66667 8.00004 4.66667C7.63185 4.66667 7.33337 4.96515 7.33337 5.33334V8C7.33337 8.36819 7.63185 8.66667 8.00004 8.66667C8.36823 8.66667 8.66671 8.36819 8.66671 8V5.33334ZM8.00004 10C7.63185 10 7.33337 10.2985 7.33337 10.6667C7.33337 11.0349 7.63185 11.3333 8.00004 11.3333H8.00671C8.3749 11.3333 8.67338 11.0349 8.67338 10.6667C8.67338 10.2985 8.3749 10 8.00671 10H8.00004Z"
|
113
|
+
fill="currentColor"
|
114
|
+
/>
|
115
|
+
</svg>
|
116
|
+
`,
|
117
|
+
critical: severityCriticalIcon,
|
118
|
+
};
|
@@ -1,4 +1,6 @@
|
|
1
|
-
import{css}from
|
1
|
+
import { css } from 'lit';
|
2
|
+
export default [
|
3
|
+
css `
|
2
4
|
.component {
|
3
5
|
align-items: flex-start;
|
4
6
|
border: 1px solid;
|
@@ -84,4 +86,5 @@ import{css}from"lit";export default[css`
|
|
84
86
|
flex-grow: 1;
|
85
87
|
overflow-wrap: anywhere;
|
86
88
|
}
|
87
|
-
|
89
|
+
`,
|
90
|
+
];
|
package/dist/input.d.ts
CHANGED
@@ -9,6 +9,9 @@ declare global {
|
|
9
9
|
}
|
10
10
|
/**
|
11
11
|
* @attr {string} label
|
12
|
+
* @attr {string} [aria-controls]
|
13
|
+
* @attr {'true'|'false'|null} [aria-expanded=null]
|
14
|
+
* @attr {'true'|'false'|null} [aria-haspopup=null]
|
12
15
|
* @attr {'on'|'off'|'none'|'sentences'|'words'|'characters'} [autocapitalize='on']
|
13
16
|
* @attr {'on'|'off'} [autocomplete='on']
|
14
17
|
* @attr {boolean} [clearable=false]
|
@@ -24,7 +27,7 @@ declare global {
|
|
24
27
|
* @attr {boolean} [required=false]
|
25
28
|
* @attr {boolean} [spellcheck=false]
|
26
29
|
* @attr {string} [tooltip]
|
27
|
-
* @attr {'date'|'email'|'number'|'password'|'search'|'tel'|'text'|'time'|'url'} [type='text']
|
30
|
+
* @attr {'color'|'date'|'email'|'number'|'password'|'search'|'tel'|'text'|'time'|'url'} [type='text']
|
28
31
|
* @attr {string} [value='']
|
29
32
|
*
|
30
33
|
* @readonly
|
@@ -68,6 +71,9 @@ export default class Input extends LitElement implements FormControl {
|
|
68
71
|
static shadowRootOptions: ShadowRootInit;
|
69
72
|
static styles: import("lit").CSSResult[];
|
70
73
|
label?: string;
|
74
|
+
ariaControls?: string;
|
75
|
+
ariaExpanded: 'true' | 'false' | null;
|
76
|
+
ariaHasPopup: 'true' | 'false' | null;
|
71
77
|
autocapitalize: 'on' | 'off' | 'none' | 'sentences' | 'words' | 'characters';
|
72
78
|
autocomplete: 'on' | 'off';
|
73
79
|
clearable: boolean;
|
@@ -85,7 +91,7 @@ export default class Input extends LitElement implements FormControl {
|
|
85
91
|
required: boolean;
|
86
92
|
spellcheck: boolean;
|
87
93
|
tooltip?: string;
|
88
|
-
type: 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';
|
94
|
+
type: 'color' | 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';
|
89
95
|
value: string;
|
90
96
|
readonly version: string;
|
91
97
|
get form(): HTMLFormElement | null;
|