@internetarchive/elements 0.2.7-alpha-webdev8429.3 → 0.2.8-webdev-8565.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.
@@ -1,9 +1,47 @@
1
- import { LitElement, type CSSResultGroup } from 'lit';
1
+ import { LitElement, TemplateResult, CSSResultGroup, PropertyValues } from 'lit';
2
+ import '../ia-status-indicator/ia-status-indicator.js';
2
3
  /**
3
- * A button element to demo the elements library
4
+ * Renders a standardized button built off the ia-button styling and the activity indicator, with the option to show
5
+ * a loading indicator instead of the text or to customize the text, and the ability to pass in any
6
+ * function to run on click.
7
+ *
8
+ * Designed to behave exactly like a native type="submit" or type="reset" button if either type is supplied,
9
+ * i.e. for an <ia-button type="submit" @click=${doSideEffects}></ia-button>,
10
+ * whether the form is submitted via enter or by clicking the button directly, the button will always
11
+ * run doSideEffects() and then submit the form.
4
12
  */
5
13
  export declare class IAButton extends LitElement {
6
- render(): import("lit-html").TemplateResult<1>;
14
+ mode: 'primary' | 'secondary' | 'danger' | 'warning' | 'disabled' | 'transparent' | 'custom' | 'link' | 'danger-link';
15
+ loading: boolean;
16
+ disabled: boolean;
17
+ loadingText: string;
18
+ type: 'button' | 'submit' | 'reset';
19
+ href?: string;
20
+ openLinksNewTab: boolean;
21
+ render(): TemplateResult;
22
+ protected willUpdate(changed: PropertyValues): void;
23
+ private get buttonTemplate();
24
+ private get buttonTextTemplate();
25
+ private get loadingStateTemplate();
26
+ /** Sets up or removes button type emulation as needed */
27
+ private setButtonTypeEmulation;
28
+ /**
29
+ * Triggers form actions (submit/reset) on click, if desired
30
+ * and if actions not already in progress
31
+ */
32
+ private handleComponentClick;
33
+ /**
34
+ * Adds a hidden button to the light DOM to
35
+ * emulate native reset/submit button behavior.
36
+ *
37
+ * Used for:
38
+ * - Submitting/resetting the form (on behalf of handleComponentClick)
39
+ * - Activating any component click events if form is submitted with the enter key
40
+ * (via handleFormActions)
41
+ */
42
+ private addHiddenButton;
43
+ /** Triggers the component's click event manually to prevent extra submission/reset */
44
+ private handleFormActions;
7
45
  static get styles(): CSSResultGroup;
8
46
  }
9
47
  //# sourceMappingURL=ia-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ia-button.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-button/ia-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKjE;;GAEG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM;IAQN,MAAM,KAAK,MAAM,IAAI,cAAc,CAgBlC;CACF"}
1
+ {"version":3,"file":"ia-button.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-button/ia-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACd,cAAc,EAEd,cAAc,EAEf,MAAM,KAAK,CAAC;AAKb,OAAO,4CAA4C,CAAC;AAEpD;;;;;;;;;GASG;AACH,qBACa,QAAS,SAAQ,UAAU;IAEV,IAAI,EAC5B,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,UAAU,GACV,aAAa,GACb,QAAQ,GACR,MAAM,GACN,aAAa,CAAa;IAGD,OAAO,EAAE,OAAO,CAAS;IAGzB,QAAQ,EAAE,OAAO,CAAS;IAG3B,WAAW,EAAE,MAAM,CAAM;IAGV,IAAI,EAC3C,QAAQ,GACR,QAAQ,GACR,OAAO,CAAY;IAGK,IAAI,CAAC,EAAE,MAAM,CAAC;IAGb,eAAe,EAAE,OAAO,CAAS;IAE9D,MAAM,IAAI,cAAc;IAaxB,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAOnD,OAAO,KAAK,cAAc,GAUzB;IAGD,OAAO,KAAK,kBAAkB,GAE7B;IAGD,OAAO,KAAK,oBAAoB,GAQ/B;IAED,yDAAyD;IACzD,OAAO,CAAC,sBAAsB;IAc9B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAevB,sFAAsF;IACtF,OAAO,CAAC,iBAAiB;IAwBzB,MAAM,KAAK,MAAM,IAAI,cAAc,CAiNlC;CACF"}
@@ -1,36 +1,374 @@
1
1
  import { __decorate } from "tslib";
2
- import { css, html, LitElement } from 'lit';
3
- import { customElement } from 'lit/decorators/custom-element.js';
2
+ import { html, LitElement, css, render, } from 'lit';
3
+ import { msg } from '@lit/localize';
4
+ import { property, customElement } from 'lit/decorators.js';
4
5
  import themeStyles from '../../themes/theme-styles.js';
6
+ import '../ia-status-indicator/ia-status-indicator.js';
5
7
  /**
6
- * A button element to demo the elements library
8
+ * Renders a standardized button built off the ia-button styling and the activity indicator, with the option to show
9
+ * a loading indicator instead of the text or to customize the text, and the ability to pass in any
10
+ * function to run on click.
11
+ *
12
+ * Designed to behave exactly like a native type="submit" or type="reset" button if either type is supplied,
13
+ * i.e. for an <ia-button type="submit" @click=${doSideEffects}></ia-button>,
14
+ * whether the form is submitted via enter or by clicking the button directly, the button will always
15
+ * run doSideEffects() and then submit the form.
7
16
  */
8
17
  let IAButton = class IAButton extends LitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ /* Which version of the button to display */
21
+ this.mode = 'primary';
22
+ /* Whether to show a loading indicator instead of the button */
23
+ this.loading = false;
24
+ /* Whether the button should be disabled, regardless of submission status */
25
+ this.disabled = false;
26
+ /* Optional text to include next to the loading indicator */
27
+ this.loadingText = '';
28
+ /* Type of the button - defaults to 'button' to prevent form submission */
29
+ this.type = 'button';
30
+ /* Whether to add a target="_blank" to any wrapping link */
31
+ this.openLinksNewTab = false;
32
+ }
9
33
  render() {
10
34
  return html `
11
- <button>
12
- <slot></slot>
35
+ ${this.href
36
+ ? html `<a
37
+ href=${this.href}
38
+ target=${this.openLinksNewTab ? '_blank' : '_self'}
39
+ >${this.buttonTemplate}</a
40
+ >`
41
+ : this.buttonTemplate}
42
+ <slot name="hidden-button"></slot>
43
+ `;
44
+ }
45
+ willUpdate(changed) {
46
+ if (changed.has('type')) {
47
+ this.setButtonTypeEmulation();
48
+ }
49
+ }
50
+ /* The native button to render */
51
+ get buttonTemplate() {
52
+ return html `
53
+ <button
54
+ part="button"
55
+ class=${this.mode}
56
+ ?disabled=${this.disabled || this.loading}
57
+ >
58
+ ${this.buttonTextTemplate}
13
59
  </button>
14
60
  `;
15
61
  }
62
+ /* The text to render within the button */
63
+ get buttonTextTemplate() {
64
+ return this.loading ? this.loadingStateTemplate : html `<slot></slot>`;
65
+ }
66
+ /* Content to render while button is loading */
67
+ get loadingStateTemplate() {
68
+ return html `
69
+ <span class="loading-indicator" alt="Loading indicator">
70
+ <ia-status-indicator mode="loading"></ia-status-indicator> ${msg(this.loadingText)}
71
+ </span>
72
+ `;
73
+ }
74
+ /** Sets up or removes button type emulation as needed */
75
+ setButtonTypeEmulation() {
76
+ const hiddenButton = this.querySelector('input.hidden-button');
77
+ if (hiddenButton) {
78
+ hiddenButton.type = this.type;
79
+ return;
80
+ }
81
+ this.addHiddenButton();
82
+ this.addEventListener('click', this.handleComponentClick);
83
+ }
84
+ /**
85
+ * Triggers form actions (submit/reset) on click, if desired
86
+ * and if actions not already in progress
87
+ */
88
+ handleComponentClick(e) {
89
+ if (this.type === 'button')
90
+ return;
91
+ // No need to submit/reset the form if it's already submitting/resetting
92
+ const formActionsInProgress = e instanceof CustomEvent && e.detail.formActionsInProgress;
93
+ if (formActionsInProgress)
94
+ return;
95
+ // Request form submission/reset by clicking the hidden native submit/reset button we added earlier
96
+ const hiddenButton = this.querySelector('input.hidden-button');
97
+ hiddenButton.dispatchEvent(new PointerEvent('click'));
98
+ }
99
+ /**
100
+ * Adds a hidden button to the light DOM to
101
+ * emulate native reset/submit button behavior.
102
+ *
103
+ * Used for:
104
+ * - Submitting/resetting the form (on behalf of handleComponentClick)
105
+ * - Activating any component click events if form is submitted with the enter key
106
+ * (via handleFormActions)
107
+ */
108
+ addHiddenButton() {
109
+ if (this.type === 'button')
110
+ return;
111
+ render(html `<input
112
+ type=${this.type}
113
+ class="hidden-button"
114
+ style="display:none"
115
+ slot="hidden-button"
116
+ @click=${(e) => this.handleFormActions(e)}
117
+ />`, this);
118
+ }
119
+ /** Triggers the component's click event manually to prevent extra submission/reset */
120
+ handleFormActions(e) {
121
+ /**
122
+ * Prevents the event from bubbling up to the ia-button component itself.
123
+ * This way, if the click on this button is triggered by a click on the component,
124
+ * we don't accidentally bubble up a second click and end up in an infinite loop.
125
+ *
126
+ * And if the click was triggered by form submission (via the enter key), we can hijack the click
127
+ * event to pass that info to the component, so it knows not to
128
+ * re-attempt submission.
129
+ */
130
+ e.stopPropagation();
131
+ // Detect if click comes from the parent component,
132
+ // in which case there's no need to trigger a second click on it
133
+ const triggeredByComponentClick = !e.isTrusted;
134
+ if (triggeredByComponentClick)
135
+ return;
136
+ // Trigger parent component click events manually,
137
+ // so it knows not to try to re-submit/re-reset the form
138
+ this.dispatchEvent(new CustomEvent('click', { detail: { formActionsInProgress: true } }));
139
+ }
16
140
  static get styles() {
17
141
  return [
18
142
  themeStyles,
19
143
  css `
20
144
  :host {
21
- --primary-background-color--: var(--primary-cta-fill);
22
- --primary-text-color--: var(--primary-cta-text-color);
145
+ --primary-cta-text-color--: var(--primary-cta-text-color);
146
+ --primary-cta-fill--: var(--primary-cta-fill);
147
+ --primary-cta-border--: var(--primary-cta-border);
148
+
149
+ --secondary-cta-text-color--: var(--secondary-cta-text-color);
150
+ --secondary-cta-fill--: var(--secondary-cta-fill);
151
+ --secondary-cta-border--: var(--secondary-cta-border);
152
+
153
+ --danger-cta-text-color--: var(--danger-cta-text-color);
154
+ --danger-cta-fill--: var(--danger-cta-fill);
155
+ --danger-cta-border--: var(--danger-cta-border);
156
+
157
+ --warning-cta-text-color--: var(--warning-cta-text-color);
158
+ --warning-cta-fill--: var(--warning-cta-fill);
159
+ --warning-cta-border--: var(--warning-cta-border);
160
+
161
+ --disabled-cta-text-color--: var(--disabled-cta-text-color);
162
+ --disabled-cta-fill--: var(--disabled-cta-fill);
163
+ --disabled-cta-border--: var(--disabled-cta-border);
164
+
165
+ --link-color--: var(--link-color);
166
+ --color-danger--: var(--color-danger);
167
+
168
+ --button-padding--: var(--button-padding);
169
+ --button-width--: var(--button-width);
170
+ --button-height--: var(--button-height);
171
+ --button-border-width--: var(--button-border-width);
172
+ --button-border-radius--: var(--button-border-radius);
173
+ --base-font-family--: var(--base-font-family);
174
+
175
+ --ia-button-transition--: var(
176
+ --ia-button-transition,
177
+ all 0.1s ease 0s
178
+ );
179
+
180
+ --ia-button-custom-text-color--: var(
181
+ --ia-button-custom-text-color,
182
+ var(--primary-cta-text-color--)
183
+ );
184
+ --ia-button-custom-fill--: var(
185
+ --ia-button-custom-fill,
186
+ var(--primary-cta-fill--)
187
+ );
188
+ --ia-button-custom-border--: var(
189
+ --ia-button-custom-border,
190
+ var(--primary-cta-border--)
191
+ );
192
+ --ia-button-custom-active-text-color--: var(
193
+ --ia-button-custom-active-text-color,
194
+ var(--ia-button-custom-text-color--)
195
+ );
196
+ --ia-button-custom-active-fill--: var(
197
+ --ia-button-custom-active-fill,
198
+ var(--ia-button-custom-fill--)
199
+ );
200
+ --ia-button-custom-active-border--: var(
201
+ --ia-button-custom-active-border,
202
+ var(--ia-button-custom-border--)
203
+ );
204
+
205
+ display: inline-block; /* keeps host sized to button */
23
206
  }
24
207
 
25
208
  button {
26
- padding: 8px 16px;
27
- background-color: var(--primary-background-color--);
28
- color: var(--primary-text-color--);
209
+ font-family: var(--base-font-family--);
210
+ font-size: var(--font-size-standard--);
211
+ height: var(--button-height--);
212
+ min-height: var(--button-height--);
213
+ width: var(--button-width--);
214
+ padding: var(--button-padding--);
215
+ border-width: var(--button-border-width--);
216
+ border-radius: var(--button-border-radius--);
217
+ transition: var(--ia-button-transition--);
218
+ outline-color: var(--primary-cta-text-color--);
219
+
220
+ cursor: pointer;
221
+ line-height: normal;
222
+ border-style: 'solid';
223
+ white-space: nowrap;
224
+ appearance: auto;
225
+ box-sizing: border-box;
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ vertical-align: middle;
230
+ outline-offset: -4px;
231
+ user-select: none;
232
+ text-decoration: none;
233
+ -webkit-user-select: none;
234
+ -moz-user-select: none;
235
+ -ms-user-select: none;
236
+ -o-user-select: none;
237
+ }
238
+
239
+ a {
240
+ text-decoration: none;
241
+ }
242
+
243
+ button:disabled,
244
+ button.disabled {
245
+ cursor: not-allowed;
246
+ color: var(--disabled-cta-text-color--);
247
+ background-color: var(--disabled-cta-fill--);
248
+ border: 1px solid var(--disabled-cta-border--);
249
+ opacity: 0.5;
250
+ }
251
+
252
+ button:enabled:hover {
253
+ opacity: 0.9;
254
+ }
255
+
256
+ button:focus-visible {
257
+ opacity: 0.8;
258
+ outline-style: double;
259
+ }
260
+
261
+ button:active {
262
+ opacity: 0.7;
263
+ }
264
+
265
+ button.primary {
266
+ color: var(--primary-cta-text-color--);
267
+ background-color: var(--primary-cta-fill--);
268
+ border-color: var(--primary-cta-border--);
269
+ }
270
+
271
+ button.secondary {
272
+ color: var(--secondary-cta-text-color--);
273
+ background-color: var(--secondary-cta-fill--);
274
+ border-color: var(--secondary-cta-border--);
275
+ }
276
+
277
+ button.danger {
278
+ color: var(--danger-cta-text-color--);
279
+ background-color: var(--danger-cta-fill--);
280
+ border-color: var(--danger-cta-border--);
281
+ }
282
+
283
+ button.warning {
284
+ color: var(--warning-cta-text-color--);
285
+ background-color: var(--warning-cta-fill--);
286
+ border-color: var(--warning-cta-border--);
287
+ }
288
+
289
+ button.transparent {
290
+ color: inherit;
291
+ border-width: 0;
292
+ background-color: transparent;
293
+ border-color: transparent;
294
+ }
295
+
296
+ button.custom {
297
+ color: var(--ia-button-custom-text-color--);
298
+ background-color: var(--ia-button-custom-fill--);
299
+ border-color: var(--ia-button-custom-border--);
300
+ }
301
+
302
+ button.custom:enabled:is(:hover, :focus, :active) {
303
+ color: var(--ia-button-custom-active-text-color--);
304
+ background-color: var(--ia-button-custom-active-fill--);
305
+ border-color: var(--ia-button-custom-active-border--);
306
+ }
307
+
308
+ :host(.fit-content) button {
309
+ padding: 0;
310
+ height: fit-content;
311
+ }
312
+
313
+ button.link:enabled:hover,
314
+ button.danger-link:enabled:hover {
315
+ text-decoration: underline;
316
+ }
317
+
318
+ button.link,
319
+ button.danger-link {
320
+ margin: 0;
321
+ border: 0;
322
+ appearance: none;
323
+ background: none;
324
+ text-decoration: none;
325
+ cursor: pointer;
326
+ padding: 0;
327
+ }
328
+
329
+ button.link {
330
+ color: var(--link-color--);
331
+ }
332
+
333
+ button.danger-link {
334
+ color: var(--color-danger--);
335
+ }
336
+
337
+ .loading-indicator {
338
+ display: flex;
339
+ flex-direction: row;
340
+ gap: 0.5rem;
341
+ align-items: center;
342
+ }
343
+
344
+ ia-status-indicator {
345
+ --ia-theme-primary-text-color: currentColor;
29
346
  }
30
347
  `,
31
348
  ];
32
349
  }
33
350
  };
351
+ __decorate([
352
+ property({ type: String })
353
+ ], IAButton.prototype, "mode", void 0);
354
+ __decorate([
355
+ property({ type: Boolean })
356
+ ], IAButton.prototype, "loading", void 0);
357
+ __decorate([
358
+ property({ type: Boolean })
359
+ ], IAButton.prototype, "disabled", void 0);
360
+ __decorate([
361
+ property({ type: String })
362
+ ], IAButton.prototype, "loadingText", void 0);
363
+ __decorate([
364
+ property({ type: String, reflect: true })
365
+ ], IAButton.prototype, "type", void 0);
366
+ __decorate([
367
+ property({ type: String })
368
+ ], IAButton.prototype, "href", void 0);
369
+ __decorate([
370
+ property({ type: Boolean })
371
+ ], IAButton.prototype, "openLinksNewTab", void 0);
34
372
  IAButton = __decorate([
35
373
  customElement('ia-button')
36
374
  ], IAButton);
@@ -1 +1 @@
1
- {"version":3,"file":"ia-button.js","sourceRoot":"","sources":["../../../../src/elements/ia-button/ia-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IACtC,MAAM;QACJ,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,WAAW;YACX,GAAG,CAAA;;;;;;;;;;;OAWF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA1BY,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA0BpB","sourcesContent":["import { css, html, LitElement, type CSSResultGroup } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\n\nimport themeStyles from '@src/themes/theme-styles';\n\n/**\n * A button element to demo the elements library\n */\n@customElement('ia-button')\nexport class IAButton extends LitElement {\n render() {\n return html`\n <button>\n <slot></slot>\n </button>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --primary-background-color--: var(--primary-cta-fill);\n --primary-text-color--: var(--primary-cta-text-color);\n }\n\n button {\n padding: 8px 16px;\n background-color: var(--primary-background-color--);\n color: var(--primary-text-color--);\n }\n `,\n ];\n }\n}\n"]}
1
+ {"version":3,"file":"ia-button.js","sourceRoot":"","sources":["../../../../src/elements/ia-button/ia-button.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EAGV,GAAG,EAEH,MAAM,GACP,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD,OAAO,4CAA4C,CAAC;AAEpD;;;;;;;;;GASG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QACL,4CAA4C;QAChB,SAAI,GASZ,SAAS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,EAAE,MAAM,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,EAAE,CAAC,CACtE,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,WAAW;YACX,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4MF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AArX6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCASG;AAGD;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAA0B;AAGzB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAA2B;AAG3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAA0B;AAGV;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAGnB;AAGK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAe;AAGb;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAAkC;AAhCnD,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAuXpB","sourcesContent":["import {\n html,\n LitElement,\n TemplateResult,\n CSSResultGroup,\n css,\n PropertyValues,\n render,\n} from 'lit';\nimport { msg } from '@lit/localize';\nimport { property, customElement } from 'lit/decorators.js';\nimport themeStyles from '@src/themes/theme-styles';\n\nimport '../ia-status-indicator/ia-status-indicator';\n\n/**\n * Renders a standardized button built off the ia-button styling and the activity indicator, with the option to show\n * a loading indicator instead of the text or to customize the text, and the ability to pass in any\n * function to run on click.\n *\n * Designed to behave exactly like a native type=\"submit\" or type=\"reset\" button if either type is supplied,\n * i.e. for an <ia-button type=\"submit\" @click=${doSideEffects}></ia-button>,\n * whether the form is submitted via enter or by clicking the button directly, the button will always\n * run doSideEffects() and then submit the form.\n */\n@customElement('ia-button')\nexport class IAButton extends LitElement {\n /* Which version of the button to display */\n @property({ type: String }) mode:\n | 'primary'\n | 'secondary'\n | 'danger'\n | 'warning'\n | 'disabled'\n | 'transparent'\n | 'custom'\n | 'link'\n | 'danger-link' = 'primary';\n\n /* Whether to show a loading indicator instead of the button */\n @property({ type: Boolean }) loading: boolean = false;\n\n /* Whether the button should be disabled, regardless of submission status */\n @property({ type: Boolean }) disabled: boolean = false;\n\n /* Optional text to include next to the loading indicator */\n @property({ type: String }) loadingText: string = '';\n\n /* Type of the button - defaults to 'button' to prevent form submission */\n @property({ type: String, reflect: true }) type:\n | 'button'\n | 'submit'\n | 'reset' = 'button';\n\n /* An optional href to wrap around the button */\n @property({ type: String }) href?: string;\n\n /* Whether to add a target=\"_blank\" to any wrapping link */\n @property({ type: Boolean }) openLinksNewTab: boolean = false;\n\n render(): TemplateResult {\n return html`\n ${this.href\n ? html`<a\n href=${this.href}\n target=${this.openLinksNewTab ? '_blank' : '_self'}\n >${this.buttonTemplate}</a\n >`\n : this.buttonTemplate}\n <slot name=\"hidden-button\"></slot>\n `;\n }\n\n protected willUpdate(changed: PropertyValues): void {\n if (changed.has('type')) {\n this.setButtonTypeEmulation();\n }\n }\n\n /* The native button to render */\n private get buttonTemplate(): TemplateResult {\n return html`\n <button\n part=\"button\"\n class=${this.mode}\n ?disabled=${this.disabled || this.loading}\n >\n ${this.buttonTextTemplate}\n </button>\n `;\n }\n\n /* The text to render within the button */\n private get buttonTextTemplate(): TemplateResult {\n return this.loading ? this.loadingStateTemplate : html`<slot></slot>`;\n }\n\n /* Content to render while button is loading */\n private get loadingStateTemplate(): TemplateResult {\n return html`\n <span class=\"loading-indicator\" alt=\"Loading indicator\">\n <ia-status-indicator mode=\"loading\"></ia-status-indicator> ${msg(\n this.loadingText,\n )}\n </span>\n `;\n }\n\n /** Sets up or removes button type emulation as needed */\n private setButtonTypeEmulation(): void {\n const hiddenButton: HTMLInputElement | null = this.querySelector(\n 'input.hidden-button',\n );\n\n if (hiddenButton) {\n hiddenButton.type = this.type;\n return;\n }\n\n this.addHiddenButton();\n this.addEventListener('click', this.handleComponentClick);\n }\n\n /**\n * Triggers form actions (submit/reset) on click, if desired\n * and if actions not already in progress\n */\n private handleComponentClick(e: Event): void {\n if (this.type === 'button') return;\n\n // No need to submit/reset the form if it's already submitting/resetting\n const formActionsInProgress =\n e instanceof CustomEvent && e.detail.formActionsInProgress;\n if (formActionsInProgress) return;\n\n // Request form submission/reset by clicking the hidden native submit/reset button we added earlier\n const hiddenButton = this.querySelector(\n 'input.hidden-button',\n ) as HTMLInputElement;\n hiddenButton.dispatchEvent(new PointerEvent('click'));\n }\n\n /**\n * Adds a hidden button to the light DOM to\n * emulate native reset/submit button behavior.\n *\n * Used for:\n * - Submitting/resetting the form (on behalf of handleComponentClick)\n * - Activating any component click events if form is submitted with the enter key\n * (via handleFormActions)\n */\n private addHiddenButton(): void {\n if (this.type === 'button') return;\n\n render(\n html`<input\n type=${this.type}\n class=\"hidden-button\"\n style=\"display:none\"\n slot=\"hidden-button\"\n @click=${(e: Event) => this.handleFormActions(e)}\n />`,\n this,\n );\n }\n\n /** Triggers the component's click event manually to prevent extra submission/reset */\n private handleFormActions(e: Event): void {\n /**\n * Prevents the event from bubbling up to the ia-button component itself.\n * This way, if the click on this button is triggered by a click on the component,\n * we don't accidentally bubble up a second click and end up in an infinite loop.\n *\n * And if the click was triggered by form submission (via the enter key), we can hijack the click\n * event to pass that info to the component, so it knows not to\n * re-attempt submission.\n */\n e.stopPropagation();\n\n // Detect if click comes from the parent component,\n // in which case there's no need to trigger a second click on it\n const triggeredByComponentClick = !e.isTrusted;\n if (triggeredByComponentClick) return;\n\n // Trigger parent component click events manually,\n // so it knows not to try to re-submit/re-reset the form\n this.dispatchEvent(\n new CustomEvent('click', { detail: { formActionsInProgress: true } }),\n );\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --primary-cta-text-color--: var(--primary-cta-text-color);\n --primary-cta-fill--: var(--primary-cta-fill);\n --primary-cta-border--: var(--primary-cta-border);\n\n --secondary-cta-text-color--: var(--secondary-cta-text-color);\n --secondary-cta-fill--: var(--secondary-cta-fill);\n --secondary-cta-border--: var(--secondary-cta-border);\n\n --danger-cta-text-color--: var(--danger-cta-text-color);\n --danger-cta-fill--: var(--danger-cta-fill);\n --danger-cta-border--: var(--danger-cta-border);\n\n --warning-cta-text-color--: var(--warning-cta-text-color);\n --warning-cta-fill--: var(--warning-cta-fill);\n --warning-cta-border--: var(--warning-cta-border);\n\n --disabled-cta-text-color--: var(--disabled-cta-text-color);\n --disabled-cta-fill--: var(--disabled-cta-fill);\n --disabled-cta-border--: var(--disabled-cta-border);\n\n --link-color--: var(--link-color);\n --color-danger--: var(--color-danger);\n\n --button-padding--: var(--button-padding);\n --button-width--: var(--button-width);\n --button-height--: var(--button-height);\n --button-border-width--: var(--button-border-width);\n --button-border-radius--: var(--button-border-radius);\n --base-font-family--: var(--base-font-family);\n\n --ia-button-transition--: var(\n --ia-button-transition,\n all 0.1s ease 0s\n );\n\n --ia-button-custom-text-color--: var(\n --ia-button-custom-text-color,\n var(--primary-cta-text-color--)\n );\n --ia-button-custom-fill--: var(\n --ia-button-custom-fill,\n var(--primary-cta-fill--)\n );\n --ia-button-custom-border--: var(\n --ia-button-custom-border,\n var(--primary-cta-border--)\n );\n --ia-button-custom-active-text-color--: var(\n --ia-button-custom-active-text-color,\n var(--ia-button-custom-text-color--)\n );\n --ia-button-custom-active-fill--: var(\n --ia-button-custom-active-fill,\n var(--ia-button-custom-fill--)\n );\n --ia-button-custom-active-border--: var(\n --ia-button-custom-active-border,\n var(--ia-button-custom-border--)\n );\n\n display: inline-block; /* keeps host sized to button */\n }\n\n button {\n font-family: var(--base-font-family--);\n font-size: var(--font-size-standard--);\n height: var(--button-height--);\n min-height: var(--button-height--);\n width: var(--button-width--);\n padding: var(--button-padding--);\n border-width: var(--button-border-width--);\n border-radius: var(--button-border-radius--);\n transition: var(--ia-button-transition--);\n outline-color: var(--primary-cta-text-color--);\n\n cursor: pointer;\n line-height: normal;\n border-style: 'solid';\n white-space: nowrap;\n appearance: auto;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n outline-offset: -4px;\n user-select: none;\n text-decoration: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n }\n\n a {\n text-decoration: none;\n }\n\n button:disabled,\n button.disabled {\n cursor: not-allowed;\n color: var(--disabled-cta-text-color--);\n background-color: var(--disabled-cta-fill--);\n border: 1px solid var(--disabled-cta-border--);\n opacity: 0.5;\n }\n\n button:enabled:hover {\n opacity: 0.9;\n }\n\n button:focus-visible {\n opacity: 0.8;\n outline-style: double;\n }\n\n button:active {\n opacity: 0.7;\n }\n\n button.primary {\n color: var(--primary-cta-text-color--);\n background-color: var(--primary-cta-fill--);\n border-color: var(--primary-cta-border--);\n }\n\n button.secondary {\n color: var(--secondary-cta-text-color--);\n background-color: var(--secondary-cta-fill--);\n border-color: var(--secondary-cta-border--);\n }\n\n button.danger {\n color: var(--danger-cta-text-color--);\n background-color: var(--danger-cta-fill--);\n border-color: var(--danger-cta-border--);\n }\n\n button.warning {\n color: var(--warning-cta-text-color--);\n background-color: var(--warning-cta-fill--);\n border-color: var(--warning-cta-border--);\n }\n\n button.transparent {\n color: inherit;\n border-width: 0;\n background-color: transparent;\n border-color: transparent;\n }\n\n button.custom {\n color: var(--ia-button-custom-text-color--);\n background-color: var(--ia-button-custom-fill--);\n border-color: var(--ia-button-custom-border--);\n }\n\n button.custom:enabled:is(:hover, :focus, :active) {\n color: var(--ia-button-custom-active-text-color--);\n background-color: var(--ia-button-custom-active-fill--);\n border-color: var(--ia-button-custom-active-border--);\n }\n\n :host(.fit-content) button {\n padding: 0;\n height: fit-content;\n }\n\n button.link:enabled:hover,\n button.danger-link:enabled:hover {\n text-decoration: underline;\n }\n\n button.link,\n button.danger-link {\n margin: 0;\n border: 0;\n appearance: none;\n background: none;\n text-decoration: none;\n cursor: pointer;\n padding: 0;\n }\n\n button.link {\n color: var(--link-color--);\n }\n\n button.danger-link {\n color: var(--color-danger--);\n }\n\n .loading-indicator {\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n align-items: center;\n }\n\n ia-status-indicator {\n --ia-theme-primary-text-color: currentColor;\n }\n `,\n ];\n }\n}\n"]}
@@ -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>
@@ -1 +1 @@
1
- {"version":3,"file":"ia-combo-box.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-combo-box/ia-combo-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,OAAO,EACP,cAAc,EACd,cAAc,EAEd,cAAc,EACf,MAAM,KAAK,CAAC;AAQb,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AA0BlB;;;;GAIG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC;;;;;;;;;;OAUG;IACwB,OAAO,EAAE,gBAAgB,EAAE,CAAM;IAE5D;;OAEG;IACyB,WAAW,CAAC,EAAE,MAAM,CAAC;IAEjD;;;;;;;;;;OAUG;IACyB,QAAQ,EAAE,kBAAkB,CAAoB;IAE5E;;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IAsB9B;;OAEG;IACH,OAAO,KAAK,mBAAmB,GAE9B;IAED;;OAEG;IACH,OAAO,KAAK,kBAAkB,GAE7B;IAED;;OAEG;IACH,OAAO,KAAK,iBAAiB,GAE5B;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,gBAAgB,GAAG,IAAI,CAG5C;IAED;;;OAGG;IACH,OAAO,KAAK,gBAAgB,GAG3B;IAED;;;OAGG;IACH,OAAO,KAAK,kBAAkB,GAG7B;IAED,MAAM,KAAK,MAAM,IAAI,cAAc,CA2KlC;CACF"}
@@ -1055,6 +1055,10 @@ let IAComboBox = class IAComboBox extends LitElement {
1055
1055
  --combo-box-padding--: var(--padding-sm);
1056
1056
  --combo-box-list-width--: var(--combo-box-list-width, unset);
1057
1057
  --combo-box-list-max-height--: var(--combo-box-list-max-height, 250px);
1058
+ --combo-box-list-fade-duration--: var(
1059
+ --combo-box-list-fade-duration,
1060
+ 125ms
1061
+ );
1058
1062
  }
1059
1063
 
1060
1064
  #container {
@@ -1155,7 +1159,7 @@ let IAComboBox = class IAComboBox extends LitElement {
1155
1159
  max-height: 400px;
1156
1160
  box-shadow: 0 0 1px 1px #ddd;
1157
1161
  opacity: 0;
1158
- transition: opacity 0.125s ease;
1162
+ transition: opacity var(--combo-box-list-fade-duration--) ease;
1159
1163
  }
1160
1164
 
1161
1165
  #options-list.visible {