@internetarchive/elements 0.2.3-alpha-webdev8378.2 → 0.2.3
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/LICENSE +661 -661
- package/README.md +320 -320
- package/dist/src/elements/ia-combo-box/caret-closed.svg +8 -8
- package/dist/src/elements/ia-combo-box/caret-open.svg +8 -8
- package/dist/src/elements/ia-combo-box/clear.svg +8 -8
- package/dist/src/elements/ia-otp-form/ia-otp-form.js +88 -88
- package/dist/src/elements/ia-otp-form/ia-otp-form.js.map +1 -1
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.js +149 -149
- package/dist/src/elements/ia-status-indicator/ia-status-indicator.js.map +1 -1
- package/dist/src/labs/ia-snow/flake.svg +1 -1
- package/dist/src/themes/theme-styles.d.ts.map +1 -1
- package/dist/src/themes/theme-styles.js +77 -87
- package/dist/src/themes/theme-styles.js.map +1 -1
- package/package.json +118 -120
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.d.ts +0 -71
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.d.ts.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js +0 -319
- package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/models.d.ts +0 -16
- package/dist/src/elements/ia-dropdown-search-bar/models.d.ts.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/models.js +0 -2
- package/dist/src/elements/ia-dropdown-search-bar/models.js.map +0 -1
- package/dist/src/elements/ia-dropdown-search-bar/search.svg +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
viewBox="0 0 8 4"
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
>
|
|
5
|
-
<path
|
|
6
|
-
d="m6.7226499.58397485c.22976435-.15317623.54019902-.09108929.69337525.13867505.13615665.20423498.10222882.47220947-.06836249.63681849l-.07031256.05655676-3.2773501 2.18490006-3.2773501-2.18490006c-.22976434-.15317623-.29185128-.4636109-.13867505-.69337525.13615665-.20423497.39656688-.27598409.61412572-.18182636l.07924953.04315131 2.7226499 1.81402515z"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 8 4"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m6.7226499.58397485c.22976435-.15317623.54019902-.09108929.69337525.13867505.13615665.20423498.10222882.47220947-.06836249.63681849l-.07031256.05655676-3.2773501 2.18490006-3.2773501-2.18490006c-.22976434-.15317623-.29185128-.4636109-.13867505-.69337525.13615665-.20423497.39656688-.27598409.61412572-.18182636l.07924953.04315131 2.7226499 1.81402515z"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
viewBox="0 0 8 4"
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
>
|
|
5
|
-
<path
|
|
6
|
-
d="m6.7226499 3.51689722c.22976435.15317623.54019902.0910893.69337525-.13867505.13615665-.20423497.10222882-.47220946-.06836249-.63681849l-.07031256-.05655675-3.2773501-2.18490007-3.2773501 2.18490007c-.22976434.15317623-.29185128.4636109-.13867505.69337524.13615665.20423498.39656688.27598409.61412572.18182636l.07924953-.04315131 2.7226499-1.81402514z"
|
|
7
|
-
></path>
|
|
8
|
-
</svg>
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 8 4"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m6.7226499 3.51689722c.22976435.15317623.54019902.0910893.69337525-.13867505.13615665-.20423497.10222882-.47220946-.06836249-.63681849l-.07031256-.05655675-3.2773501-2.18490007-3.2773501 2.18490007c-.22976434.15317623-.29185128.4636109-.13867505.69337524.13615665.20423498.39656688.27598409.61412572.18182636l.07924953-.04315131 2.7226499-1.81402514z"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
viewBox="0 0 100 100"
|
|
3
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
>
|
|
5
|
-
<path
|
|
6
|
-
d="m50 0c27.6142375 0 50 22.3857625 50 50s-22.3857625 50-50 50-50-22.3857625-50-50 22.3857625-50 50-50zm23.8159475 26.1840525c-1.4033215-1.4033215-3.5816761-1.5592461-5.1572272-.4677738l-.5598841.4677738-18.0988362 18.0989475-18.0988362-18.0989475-.5598841-.4677738c-1.5755511-1.0914723-3.7539057-.9355477-5.1572272.4677738-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113l18.0989475 18.0988362-18.0989475 18.0988362c-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113 1.4033215 1.4033215 3.5816761 1.5592461 5.1572272.4677738l.5598841-.4677738 18.0988362-18.0989475 18.0988362 18.0989475.5598841.4677738c1.5755511 1.0914723 3.7539057.9355477 5.1572272-.4677738 1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113l-18.0989475-18.0988362 18.0989475-18.0988362c1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113z"
|
|
7
|
-
fill-rule="evenodd"
|
|
8
|
-
></path>
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 100 100"
|
|
3
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
+
>
|
|
5
|
+
<path
|
|
6
|
+
d="m50 0c27.6142375 0 50 22.3857625 50 50s-22.3857625 50-50 50-50-22.3857625-50-50 22.3857625-50 50-50zm23.8159475 26.1840525c-1.4033215-1.4033215-3.5816761-1.5592461-5.1572272-.4677738l-.5598841.4677738-18.0988362 18.0989475-18.0988362-18.0989475-.5598841-.4677738c-1.5755511-1.0914723-3.7539057-.9355477-5.1572272.4677738-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113l18.0989475 18.0988362-18.0989475 18.0988362c-1.5787367 1.5787367-1.5787367 4.1383746 0 5.7171113 1.4033215 1.4033215 3.5816761 1.5592461 5.1572272.4677738l.5598841-.4677738 18.0988362-18.0989475 18.0988362 18.0989475.5598841.4677738c1.5755511 1.0914723 3.7539057.9355477 5.1572272-.4677738 1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113l-18.0989475-18.0988362 18.0989475-18.0988362c1.5787367-1.5787367 1.5787367-4.1383746 0-5.7171113z"
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
></path>
|
|
9
9
|
</svg>
|
|
@@ -28,25 +28,25 @@ let IAOTPForm = class IAOTPForm extends LitElement {
|
|
|
28
28
|
this.numericOnly = true;
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return html `
|
|
32
|
-
<div class="input-section">
|
|
33
|
-
<ia-otp-input
|
|
34
|
-
.numChars=${this.numPasscodeChars}
|
|
35
|
-
?numericOnly=${this.numericOnly}
|
|
31
|
+
return html `
|
|
32
|
+
<div class="input-section">
|
|
33
|
+
<ia-otp-input
|
|
34
|
+
.numChars=${this.numPasscodeChars}
|
|
35
|
+
?numericOnly=${this.numericOnly}
|
|
36
36
|
?disabled=${this.validationStatus === 'loading' ||
|
|
37
|
-
this.validationStatus === 'success'}
|
|
38
|
-
></ia-otp-input>
|
|
39
|
-
<ia-status-indicator
|
|
40
|
-
part="status-indicator"
|
|
41
|
-
.mode=${this.validationStatus}
|
|
42
|
-
></ia-status-indicator>
|
|
43
|
-
</div>
|
|
37
|
+
this.validationStatus === 'success'}
|
|
38
|
+
></ia-otp-input>
|
|
39
|
+
<ia-status-indicator
|
|
40
|
+
part="status-indicator"
|
|
41
|
+
.mode=${this.validationStatus}
|
|
42
|
+
></ia-status-indicator>
|
|
43
|
+
</div>
|
|
44
44
|
${this.validationStatus === 'error'
|
|
45
|
-
? html `<p class="error-msg">
|
|
46
|
-
${msg('The code entered is invalid or expired')}
|
|
45
|
+
? html `<p class="error-msg">
|
|
46
|
+
${msg('The code entered is invalid or expired')}
|
|
47
47
|
</p>`
|
|
48
|
-
: nothing}
|
|
49
|
-
${this.resendCodeButtonTemplate}
|
|
48
|
+
: nothing}
|
|
49
|
+
${this.resendCodeButtonTemplate}
|
|
50
50
|
`;
|
|
51
51
|
}
|
|
52
52
|
willUpdate(changed) {
|
|
@@ -62,19 +62,19 @@ let IAOTPForm = class IAOTPForm extends LitElement {
|
|
|
62
62
|
/* The button to display to send a new code */
|
|
63
63
|
get resendCodeButtonTemplate() {
|
|
64
64
|
return this.newCodeSending
|
|
65
|
-
? html `<span part="new-code-message" class="new-code-msg"
|
|
66
|
-
>${msg('Emailing...')}</span
|
|
65
|
+
? html `<span part="new-code-message" class="new-code-msg"
|
|
66
|
+
>${msg('Emailing...')}</span
|
|
67
67
|
>`
|
|
68
|
-
: html `
|
|
69
|
-
<button
|
|
70
|
-
class="new-code-btn link"
|
|
71
|
-
part="new-code-button"
|
|
68
|
+
: html `
|
|
69
|
+
<button
|
|
70
|
+
class="new-code-btn link"
|
|
71
|
+
part="new-code-button"
|
|
72
72
|
.disabled=${this.validationStatus === 'loading' ||
|
|
73
|
-
this.validationStatus === 'success'}
|
|
74
|
-
@click=${this.handleNewCodeRequested}
|
|
75
|
-
>
|
|
76
|
-
${msg('Email me another code')}
|
|
77
|
-
</button>
|
|
73
|
+
this.validationStatus === 'success'}
|
|
74
|
+
@click=${this.handleNewCodeRequested}
|
|
75
|
+
>
|
|
76
|
+
${msg('Email me another code')}
|
|
77
|
+
</button>
|
|
78
78
|
`;
|
|
79
79
|
}
|
|
80
80
|
/* Emits an event to request the new code */
|
|
@@ -88,67 +88,67 @@ let IAOTPForm = class IAOTPForm extends LitElement {
|
|
|
88
88
|
static get styles() {
|
|
89
89
|
return [
|
|
90
90
|
themeStyles,
|
|
91
|
-
css `
|
|
92
|
-
:host {
|
|
93
|
-
--font-size-standard--: var(--font-size-standard);
|
|
94
|
-
--font-size-lg--: var(--font-size-lg);
|
|
95
|
-
--color-success--: var(--color-success);
|
|
96
|
-
--color-danger--: var(--color-danger);
|
|
97
|
-
--link-color--: var(--link-color);
|
|
98
|
-
|
|
99
|
-
display: flex;
|
|
100
|
-
flex-direction: column;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.input-section {
|
|
106
|
-
display: flex;
|
|
107
|
-
flex-direction: row;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: center;
|
|
110
|
-
gap: 5px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
ia-status-indicator {
|
|
114
|
-
--icon-width: calc(var(--font-size-lg--) * 1.33);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.error-msg {
|
|
118
|
-
margin-top: 10px;
|
|
119
|
-
font-size: var(--font-size-standard--);
|
|
120
|
-
color: var(--color-danger--);
|
|
121
|
-
margin-bottom: -10px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.new-code-btn {
|
|
125
|
-
font-family: inherit;
|
|
126
|
-
font-size: var(--font-size-standard--);
|
|
127
|
-
display: block;
|
|
128
|
-
width: fit-content;
|
|
129
|
-
margin-top: 10px;
|
|
130
|
-
border: 0;
|
|
131
|
-
padding: 0;
|
|
132
|
-
appearance: none;
|
|
133
|
-
background: none;
|
|
134
|
-
color: var(--link-color--);
|
|
135
|
-
text-decoration: none;
|
|
136
|
-
cursor: pointer;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.new-code-btn:hover,
|
|
140
|
-
.new-code-btn:focus {
|
|
141
|
-
text-decoration: underline;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.new-code-msg {
|
|
145
|
-
margin-top: 10px;
|
|
146
|
-
font-size: var(--font-size-standard--);
|
|
147
|
-
color: var(--link-color--);
|
|
148
|
-
display: flex;
|
|
149
|
-
flex-direction: column;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
}
|
|
91
|
+
css `
|
|
92
|
+
:host {
|
|
93
|
+
--font-size-standard--: var(--font-size-standard);
|
|
94
|
+
--font-size-lg--: var(--font-size-lg);
|
|
95
|
+
--color-success--: var(--color-success);
|
|
96
|
+
--color-danger--: var(--color-danger);
|
|
97
|
+
--link-color--: var(--link-color);
|
|
98
|
+
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.input-section {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: row;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
gap: 5px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
ia-status-indicator {
|
|
114
|
+
--icon-width: calc(var(--font-size-lg--) * 1.33);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.error-msg {
|
|
118
|
+
margin-top: 10px;
|
|
119
|
+
font-size: var(--font-size-standard--);
|
|
120
|
+
color: var(--color-danger--);
|
|
121
|
+
margin-bottom: -10px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.new-code-btn {
|
|
125
|
+
font-family: inherit;
|
|
126
|
+
font-size: var(--font-size-standard--);
|
|
127
|
+
display: block;
|
|
128
|
+
width: fit-content;
|
|
129
|
+
margin-top: 10px;
|
|
130
|
+
border: 0;
|
|
131
|
+
padding: 0;
|
|
132
|
+
appearance: none;
|
|
133
|
+
background: none;
|
|
134
|
+
color: var(--link-color--);
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.new-code-btn:hover,
|
|
140
|
+
.new-code-btn:focus {
|
|
141
|
+
text-decoration: underline;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.new-code-msg {
|
|
145
|
+
margin-top: 10px;
|
|
146
|
+
font-size: var(--font-size-standard--);
|
|
147
|
+
color: var(--link-color--);
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
}
|
|
152
152
|
`,
|
|
153
153
|
];
|
|
154
154
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ia-otp-form.js","sourceRoot":"","sources":["../../../../src/elements/ia-otp-form/ia-otp-form.ts"],"names":[],"mappings":"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","sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"ia-otp-form.js","sourceRoot":"","sources":["../../../../src/elements/ia-otp-form/ia-otp-form.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n html,\n LitElement,\n TemplateResult,\n CSSResultGroup,\n css,\n nothing,\n PropertyValues,\n} from 'lit';\nimport { msg } from '@lit/localize';\nimport { property, customElement, query } from 'lit/decorators.js';\n\nimport themeStyles from '@src/themes/theme-styles';\n\nimport type { IAOTPInput } from '@src/elements/ia-otp-input/ia-otp-input';\nimport type { LoadingStatus } from '@src/elements/ia-status-indicator/ia-status-indicator';\n\nimport '@src/elements/ia-status-indicator/ia-status-indicator';\nimport '@src/elements/ia-otp-input/ia-otp-input';\n\n/**\n * Custom events fired by the component\n */\nconst Events = {\n NewCodeRequested: 'newCodeRequested',\n CodeSubmitted: 'codeSubmitted', // Bubbles up from ia-otp-input\n};\n\n/**\n * Form for entering OTP codes, including success/loading/error states and a request new code button\n */\n@customElement('ia-otp-form')\nexport class IAOTPForm extends LitElement {\n /* The state of the validation process */\n @property({ type: String })\n validationStatus: LoadingStatus = 'ready';\n\n /* Whether to display a loading indicator instead of the button text */\n @property({ type: Boolean })\n newCodeSending: boolean = false;\n\n /* Number of characters to expect for the passcode */\n @property({ type: Number })\n numPasscodeChars: number = 6;\n\n /* Whether to restrict entry to numeric characters */\n @property({ type: Boolean })\n numericOnly: boolean = true;\n\n @query('ia-otp-input')\n private OTPInput!: IAOTPInput;\n\n render(): TemplateResult {\n return html`\n <div class=\"input-section\">\n <ia-otp-input\n .numChars=${this.numPasscodeChars}\n ?numericOnly=${this.numericOnly}\n ?disabled=${this.validationStatus === 'loading' ||\n this.validationStatus === 'success'}\n ></ia-otp-input>\n <ia-status-indicator\n part=\"status-indicator\"\n .mode=${this.validationStatus}\n ></ia-status-indicator>\n </div>\n ${this.validationStatus === 'error'\n ? html`<p class=\"error-msg\">\n ${msg('The code entered is invalid or expired')}\n </p>`\n : nothing}\n ${this.resendCodeButtonTemplate}\n `;\n }\n\n protected willUpdate(changed: PropertyValues): void {\n if (\n changed.has('validationStatus') &&\n this.OTPInput &&\n this.validationStatus === 'error'\n ) {\n this.OTPInput.prefillValue = '';\n }\n\n if (changed.has('newCodeSending') && this.newCodeSending && this.OTPInput) {\n this.OTPInput.prefillValue = '';\n }\n }\n\n /* The button to display to send a new code */\n private get resendCodeButtonTemplate(): TemplateResult {\n return this.newCodeSending\n ? html`<span part=\"new-code-message\" class=\"new-code-msg\"\n >${msg('Emailing...')}</span\n >`\n : html`\n <button\n class=\"new-code-btn link\"\n part=\"new-code-button\"\n .disabled=${this.validationStatus === 'loading' ||\n this.validationStatus === 'success'}\n @click=${this.handleNewCodeRequested}\n >\n ${msg('Email me another code')}\n </button>\n `;\n }\n\n /* Emits an event to request the new code */\n private async handleNewCodeRequested(): Promise<void> {\n this.dispatchEvent(\n new CustomEvent(Events.NewCodeRequested, {\n bubbles: true,\n composed: true,\n }),\n );\n this.OTPInput.prefillValue = '';\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --font-size-standard--: var(--font-size-standard);\n --font-size-lg--: var(--font-size-lg);\n --color-success--: var(--color-success);\n --color-danger--: var(--color-danger);\n --link-color--: var(--link-color);\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n\n .input-section {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 5px;\n }\n\n ia-status-indicator {\n --icon-width: calc(var(--font-size-lg--) * 1.33);\n }\n\n .error-msg {\n margin-top: 10px;\n font-size: var(--font-size-standard--);\n color: var(--color-danger--);\n margin-bottom: -10px;\n }\n\n .new-code-btn {\n font-family: inherit;\n font-size: var(--font-size-standard--);\n display: block;\n width: fit-content;\n margin-top: 10px;\n border: 0;\n padding: 0;\n appearance: none;\n background: none;\n color: var(--link-color--);\n text-decoration: none;\n cursor: pointer;\n }\n\n .new-code-btn:hover,\n .new-code-btn:focus {\n text-decoration: underline;\n }\n\n .new-code-msg {\n margin-top: 10px;\n font-size: var(--font-size-standard--);\n color: var(--link-color--);\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n `,\n ];\n }\n}\n"]}
|
|
@@ -35,79 +35,79 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
|
|
|
35
35
|
}
|
|
36
36
|
/** A circular loading indicator to render when processing */
|
|
37
37
|
get loadingIndicatorTemplate() {
|
|
38
|
-
return html `
|
|
39
|
-
<svg
|
|
40
|
-
class="loading-indicator"
|
|
41
|
-
viewBox="0 0 120 120"
|
|
42
|
-
preserveAspectRatio="none"
|
|
43
|
-
version="1.1"
|
|
44
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
46
|
-
role="status"
|
|
47
|
-
>
|
|
48
|
-
<title>${this.loadingTitle}</title>
|
|
49
|
-
<g stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
50
|
-
<path
|
|
51
|
-
class="loading-ring"
|
|
52
|
-
d="M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
|
|
53
|
-
></path>
|
|
54
|
-
<g
|
|
55
|
-
class="loading-dots ${!this.shouldShowLoadingDots ? 'hidden' : ''}"
|
|
56
|
-
transform="translate(40.000000, 55.000000)"
|
|
57
|
-
>
|
|
58
|
-
<circle id="left-dot" cx="5" cy="5" r="5"></circle>
|
|
59
|
-
<circle id="middle-dot" cx="20" cy="5" r="5"></circle>
|
|
60
|
-
<circle id="right-dot" cx="35" cy="5" r="5"></circle>
|
|
61
|
-
</g>
|
|
62
|
-
</g>
|
|
63
|
-
</svg>
|
|
38
|
+
return html `
|
|
39
|
+
<svg
|
|
40
|
+
class="loading-indicator"
|
|
41
|
+
viewBox="0 0 120 120"
|
|
42
|
+
preserveAspectRatio="none"
|
|
43
|
+
version="1.1"
|
|
44
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
46
|
+
role="status"
|
|
47
|
+
>
|
|
48
|
+
<title>${this.loadingTitle}</title>
|
|
49
|
+
<g stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
50
|
+
<path
|
|
51
|
+
class="loading-ring"
|
|
52
|
+
d="M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
|
|
53
|
+
></path>
|
|
54
|
+
<g
|
|
55
|
+
class="loading-dots ${!this.shouldShowLoadingDots ? 'hidden' : ''}"
|
|
56
|
+
transform="translate(40.000000, 55.000000)"
|
|
57
|
+
>
|
|
58
|
+
<circle id="left-dot" cx="5" cy="5" r="5"></circle>
|
|
59
|
+
<circle id="middle-dot" cx="20" cy="5" r="5"></circle>
|
|
60
|
+
<circle id="right-dot" cx="35" cy="5" r="5"></circle>
|
|
61
|
+
</g>
|
|
62
|
+
</g>
|
|
63
|
+
</svg>
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
66
|
/** A check mark to render on success */
|
|
67
67
|
get successIndicatorTemplate() {
|
|
68
|
-
return html `
|
|
69
|
-
<svg
|
|
70
|
-
class="success-indicator"
|
|
71
|
-
viewBox="0 0 120 120"
|
|
72
|
-
preserveAspectRatio="none"
|
|
73
|
-
version="1.1"
|
|
74
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
75
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
76
|
-
role="status"
|
|
77
|
-
>
|
|
78
|
-
<title>${this.successTitle}</title>
|
|
79
|
-
<g stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
80
|
-
<path
|
|
81
|
-
class="success-icon"
|
|
82
|
-
d="M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
|
|
83
|
-
></path>
|
|
84
|
-
<polygon
|
|
85
|
-
class="success-icon"
|
|
86
|
-
transform="translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) "
|
|
87
|
-
points="96 85 54 85 54 65 76 64.999 76 -2 96 -2"
|
|
88
|
-
></polygon>
|
|
89
|
-
</g>
|
|
90
|
-
</svg>
|
|
68
|
+
return html `
|
|
69
|
+
<svg
|
|
70
|
+
class="success-indicator"
|
|
71
|
+
viewBox="0 0 120 120"
|
|
72
|
+
preserveAspectRatio="none"
|
|
73
|
+
version="1.1"
|
|
74
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
75
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
76
|
+
role="status"
|
|
77
|
+
>
|
|
78
|
+
<title>${this.successTitle}</title>
|
|
79
|
+
<g stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
80
|
+
<path
|
|
81
|
+
class="success-icon"
|
|
82
|
+
d="M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
|
|
83
|
+
></path>
|
|
84
|
+
<polygon
|
|
85
|
+
class="success-icon"
|
|
86
|
+
transform="translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) "
|
|
87
|
+
points="96 85 54 85 54 65 76 64.999 76 -2 96 -2"
|
|
88
|
+
></polygon>
|
|
89
|
+
</g>
|
|
90
|
+
</svg>
|
|
91
91
|
`;
|
|
92
92
|
}
|
|
93
93
|
/** An "!" to render on error */
|
|
94
94
|
get errorIndicatorTemplate() {
|
|
95
|
-
return html `
|
|
96
|
-
<svg
|
|
97
|
-
class="error-indicator"
|
|
98
|
-
viewBox="0 0 120 120"
|
|
99
|
-
preserveAspectRatio="none"
|
|
100
|
-
version="1.1"
|
|
101
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
103
|
-
role="status"
|
|
104
|
-
>
|
|
105
|
-
<title>${this.errorTitle}</title>
|
|
106
|
-
<path
|
|
107
|
-
class="error-icon"
|
|
108
|
-
d="m56.4612493 8.80450354 41.8901185 75.94632926c1.7706782 2.8433173 2.1150372 5.2623412 1.0330766 7.2570716-1.0819604 1.9947304-3.26978 2.9920956-6.5634587 2.9920956h-85.69973905c-3.29367873 0-5.46954894-.9973652-6.52761065-2.9920956-1.0580617-1.9947304-.70175345-4.4137543 1.06892476-7.2570716l41.89011844-75.12308969c1.8184757-2.84331737 3.9693609-4.37738627 6.4526556-4.60220671s4.6341799 1.03483527 6.4526556 3.77896714zm28.5387507 75.19549646-35.037482-62-34.962518 62zm-31-34.7484359v-10.2515641h-8v10.2515641l2.089172 14.7484359h3.8184713zm-8 19.7484359v8h8v-8z"
|
|
109
|
-
/>
|
|
110
|
-
</svg>
|
|
95
|
+
return html `
|
|
96
|
+
<svg
|
|
97
|
+
class="error-indicator"
|
|
98
|
+
viewBox="0 0 120 120"
|
|
99
|
+
preserveAspectRatio="none"
|
|
100
|
+
version="1.1"
|
|
101
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
103
|
+
role="status"
|
|
104
|
+
>
|
|
105
|
+
<title>${this.errorTitle}</title>
|
|
106
|
+
<path
|
|
107
|
+
class="error-icon"
|
|
108
|
+
d="m56.4612493 8.80450354 41.8901185 75.94632926c1.7706782 2.8433173 2.1150372 5.2623412 1.0330766 7.2570716-1.0819604 1.9947304-3.26978 2.9920956-6.5634587 2.9920956h-85.69973905c-3.29367873 0-5.46954894-.9973652-6.52761065-2.9920956-1.0580617-1.9947304-.70175345-4.4137543 1.06892476-7.2570716l41.89011844-75.12308969c1.8184757-2.84331737 3.9693609-4.37738627 6.4526556-4.60220671s4.6341799 1.03483527 6.4526556 3.77896714zm28.5387507 75.19549646-35.037482-62-34.962518 62zm-31-34.7484359v-10.2515641h-8v10.2515641l2.089172 14.7484359h3.8184713zm-8 19.7484359v8h8v-8z"
|
|
109
|
+
/>
|
|
110
|
+
</svg>
|
|
111
111
|
`;
|
|
112
112
|
}
|
|
113
113
|
/* Whether to include the dots in the loading indicator */
|
|
@@ -119,90 +119,90 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
|
|
|
119
119
|
static get styles() {
|
|
120
120
|
return [
|
|
121
121
|
themeStyles,
|
|
122
|
-
css `
|
|
123
|
-
:host {
|
|
124
|
-
--indicator-width--: var(--icon-width);
|
|
125
|
-
|
|
126
|
-
/* Loading */
|
|
127
|
-
--loading-ring-color--: var(--primary-text-color);
|
|
128
|
-
--loading-dot-color--: var(--primary-text-color);
|
|
129
|
-
|
|
130
|
-
/* Success */
|
|
131
|
-
--success-icon-color--: var(--color-success);
|
|
132
|
-
|
|
133
|
-
/* Error */
|
|
134
|
-
--error-icon-color--: var(--color-danger);
|
|
135
|
-
|
|
136
|
-
display: inline-block;
|
|
137
|
-
width: var(--indicator-width--);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.placeholder {
|
|
141
|
-
height: var(--indicator-width--);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.success-icon {
|
|
145
|
-
fill: var(--success-icon-color--);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.error-icon {
|
|
149
|
-
fill: var(--error-icon-color--);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.loading-ring {
|
|
153
|
-
fill: var(--loading-ring-color--);
|
|
154
|
-
animation: rotate 1.3s infinite linear;
|
|
155
|
-
transform-origin: 50px 50px;
|
|
156
|
-
transform-box: fill-box;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.loading-dots {
|
|
160
|
-
fill: var(--loading-dot-color--);
|
|
161
|
-
transition: opacity 0.25s ease-out;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.loading-dots.hidden {
|
|
165
|
-
display: none;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.loading-dots > * {
|
|
169
|
-
opacity: 0;
|
|
170
|
-
animation: dot 1.3s infinite;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.loading-dots #left-dot {
|
|
174
|
-
animation-delay: 0.2s;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.loading-dots #middle-dot {
|
|
178
|
-
animation-delay: 0.4s;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.loading-dots #right-dot {
|
|
182
|
-
animation-delay: 0.6s;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
@keyframes rotate {
|
|
186
|
-
0% {
|
|
187
|
-
transform: rotate(-360deg);
|
|
188
|
-
}
|
|
189
|
-
100% {
|
|
190
|
-
/* This frame is supposed to be inferred, but Safari doesn't rotate it unless we're explicit */
|
|
191
|
-
transform: rotate(0deg);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
@keyframes dot {
|
|
196
|
-
0% {
|
|
197
|
-
opacity: 0;
|
|
198
|
-
}
|
|
199
|
-
25% {
|
|
200
|
-
opacity: 1;
|
|
201
|
-
}
|
|
202
|
-
100% {
|
|
203
|
-
opacity: 0;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
122
|
+
css `
|
|
123
|
+
:host {
|
|
124
|
+
--indicator-width--: var(--icon-width);
|
|
125
|
+
|
|
126
|
+
/* Loading */
|
|
127
|
+
--loading-ring-color--: var(--primary-text-color);
|
|
128
|
+
--loading-dot-color--: var(--primary-text-color);
|
|
129
|
+
|
|
130
|
+
/* Success */
|
|
131
|
+
--success-icon-color--: var(--color-success);
|
|
132
|
+
|
|
133
|
+
/* Error */
|
|
134
|
+
--error-icon-color--: var(--color-danger);
|
|
135
|
+
|
|
136
|
+
display: inline-block;
|
|
137
|
+
width: var(--indicator-width--);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.placeholder {
|
|
141
|
+
height: var(--indicator-width--);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.success-icon {
|
|
145
|
+
fill: var(--success-icon-color--);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.error-icon {
|
|
149
|
+
fill: var(--error-icon-color--);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.loading-ring {
|
|
153
|
+
fill: var(--loading-ring-color--);
|
|
154
|
+
animation: rotate 1.3s infinite linear;
|
|
155
|
+
transform-origin: 50px 50px;
|
|
156
|
+
transform-box: fill-box;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.loading-dots {
|
|
160
|
+
fill: var(--loading-dot-color--);
|
|
161
|
+
transition: opacity 0.25s ease-out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.loading-dots.hidden {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.loading-dots > * {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
animation: dot 1.3s infinite;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.loading-dots #left-dot {
|
|
174
|
+
animation-delay: 0.2s;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.loading-dots #middle-dot {
|
|
178
|
+
animation-delay: 0.4s;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.loading-dots #right-dot {
|
|
182
|
+
animation-delay: 0.6s;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes rotate {
|
|
186
|
+
0% {
|
|
187
|
+
transform: rotate(-360deg);
|
|
188
|
+
}
|
|
189
|
+
100% {
|
|
190
|
+
/* This frame is supposed to be inferred, but Safari doesn't rotate it unless we're explicit */
|
|
191
|
+
transform: rotate(0deg);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@keyframes dot {
|
|
196
|
+
0% {
|
|
197
|
+
opacity: 0;
|
|
198
|
+
}
|
|
199
|
+
25% {
|
|
200
|
+
opacity: 1;
|
|
201
|
+
}
|
|
202
|
+
100% {
|
|
203
|
+
opacity: 0;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
206
|
`,
|
|
207
207
|
];
|
|
208
208
|
}
|