scb-wc 0.1.78 → 0.1.80
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/README.md +41 -22
- package/all.js +0 -2
- package/index.js +88 -90
- package/mvc/components/all.js +0 -2
- package/mvc/components/scb-accordion/scb-accordion-item.js +3 -173
- package/mvc/components/scb-accordion/scb-accordion.js +4 -33
- package/mvc/components/scb-app-bar/scb-app-bar.js +2 -110
- package/mvc/components/scb-avatar/scb-avatar.js +2 -94
- package/mvc/components/scb-badge/scb-badge.js +2 -72
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -12
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +4 -91
- package/mvc/components/scb-button/scb-button.js +47 -309
- package/mvc/components/scb-calendar/scb-calendar-event.js +2 -6
- package/mvc/components/scb-calendar/scb-calendar.js +6 -120
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +21 -350
- package/mvc/components/scb-card/scb-card.js +54 -819
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +3 -31
- package/mvc/components/scb-checkbox/scb-checkbox.js +5 -127
- package/mvc/components/scb-chip/scb-chip.js +2 -76
- package/mvc/components/scb-collapse/scb-collapse.js +2 -44
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +7 -73
- package/mvc/components/scb-dialog/scb-dialog.js +2 -213
- package/mvc/components/scb-divider/scb-divider.js +1 -69
- package/mvc/components/scb-drawer/scb-drawer.js +6 -102
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +2 -410
- package/mvc/components/scb-dropdown/scb-dropdown.js +17 -222
- package/mvc/components/scb-fab/scb-fab.js +7 -95
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +2 -69
- package/mvc/components/scb-fact-card/scb-fact-card.js +2 -214
- package/mvc/components/scb-footer/scb-footer-section.js +1 -3
- package/mvc/components/scb-footer/scb-footer.js +3 -172
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +2 -112
- package/mvc/components/scb-grid/scb-grid-item.js +1 -32
- package/mvc/components/scb-grid/scb-grid.js +1 -99
- package/mvc/components/scb-grid/scb-stack.js +1 -33
- package/mvc/components/scb-header/scb-header-menu-item.js +1 -5
- package/mvc/components/scb-header/scb-header-tab.js +1 -5
- package/mvc/components/scb-header/scb-header.js +75 -888
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +43 -168
- package/mvc/components/scb-icon-button/scb-icon-button.js +59 -171
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +17 -218
- package/mvc/components/scb-link/scb-link.js +4 -55
- package/mvc/components/scb-list/scb-list-item.js +23 -126
- package/mvc/components/scb-list/scb-list.js +5 -26
- package/mvc/components/scb-menu/scb-menu-item.js +16 -190
- package/mvc/components/scb-menu/scb-menu-section.js +4 -36
- package/mvc/components/scb-menu/scb-menu.js +5 -69
- package/mvc/components/scb-menu/scb-sub-menu.js +2 -7
- package/mvc/components/scb-nav/scb-nav-item.js +1 -28
- package/mvc/components/scb-nav/scb-nav.js +5 -98
- package/mvc/components/scb-notification-card/scb-notification-card.js +7 -364
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +3 -50
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -82
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +2 -31
- package/mvc/components/scb-overlay/scb-overlay.js +3 -43
- package/mvc/components/scb-pagination/scb-pagination.js +19 -221
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +2 -67
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +4 -121
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +2 -56
- package/mvc/components/scb-radio-button/scb-radio-button.js +5 -116
- package/mvc/components/scb-radio-button/scb-radio-group.js +2 -32
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +2 -61
- package/mvc/components/scb-search/scb-search.js +5 -249
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -32
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +2 -70
- package/mvc/components/scb-select/scb-select-option.js +2 -54
- package/mvc/components/scb-select/scb-select.js +4 -244
- package/mvc/components/scb-skeleton/scb-skeleton.js +2 -35
- package/mvc/components/scb-slider/scb-slider.js +5 -9
- package/mvc/components/scb-snackbar/scb-snackbar.js +9 -84
- package/mvc/components/scb-status-pill/scb-status-pill.js +2 -43
- package/mvc/components/scb-stepper/scb-step.js +8 -186
- package/mvc/components/scb-stepper/scb-stepper.js +2 -130
- package/mvc/components/scb-switch/scb-switch.js +4 -49
- package/mvc/components/scb-table/scb-table.js +2 -48
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +2 -53
- package/mvc/components/scb-tabs/scb-primary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-secondary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-tabs.js +4 -31
- package/mvc/components/scb-textfield/scb-textfield.js +142 -388
- package/mvc/components/scb-toc/scb-toc-item.js +3 -251
- package/mvc/components/scb-toc/scb-toc.js +2 -16
- package/mvc/components/scb-tooltip/scb-tooltip.js +8 -155
- package/mvc/components/scb-viz/scb-viz.js +4 -619
- package/mvc/scb-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- package/mvc/vendor/assist-chip.js +3 -3
- package/mvc/vendor/chip-set.js +1 -1
- package/mvc/vendor/chip.js +2 -2
- package/mvc/vendor/elevation.js +2 -2
- package/mvc/vendor/filter-chip.js +1 -1
- package/mvc/vendor/focusable.js +1 -1
- package/mvc/vendor/form-associated.js +1 -1
- package/mvc/vendor/icon.js +2 -2
- package/mvc/vendor/lazy-focus-ring.js +2 -0
- package/mvc/vendor/lazy-ripple.js +2 -0
- package/mvc/vendor/md-focus-ring.js +2 -2
- package/mvc/vendor/ripple.js +2 -2
- package/mvc/vendor/scb-card-variants.internal.js +284 -0
- package/mvc/vendor/scb-chevron.js +10 -0
- package/mvc/vendor/scb-header-drawer.internal.js +71 -0
- package/mvc/vendor/shared-styles.js +1 -1
- package/mvc/vendor/tab-styles.js +3 -3
- package/mvc/vendor/validator.js +1 -1
- package/mvc/vendor/vendor.js +3 -4
- package/package.json +2 -2
- package/scb-accordion/scb-accordion-item.js +33 -32
- package/scb-app-bar/scb-app-bar.js +1 -1
- package/scb-button/scb-button.js +287 -259
- package/scb-calendar/scb-calendar.js +49 -49
- package/scb-calendar-card/scb-calendar-card.js +105 -59
- package/scb-card/scb-card-variants.internal.js +230 -0
- package/scb-card/scb-card.js +387 -528
- package/scb-checkbox/scb-checkbox.js +0 -1
- package/scb-chevron/scb-chevron.js +0 -1
- package/scb-components/scb-button/scb-button.d.ts +14 -2
- package/scb-components/scb-calendar/scb-calendar.d.ts +1 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +16 -4
- package/scb-components/scb-card/scb-card-variants.internal.d.ts +15 -0
- package/scb-components/scb-card/scb-card.d.ts +26 -9
- package/scb-components/scb-cookies-consent/scb-cookies-consent.d.ts +3 -0
- package/scb-components/scb-header/scb-header-drawer.internal.d.ts +31 -0
- package/scb-components/scb-header/scb-header.d.ts +1 -2
- package/scb-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +6 -1
- package/scb-components/scb-icon-button/scb-icon-button.d.ts +28 -29
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -4
- package/scb-components/scb-list/scb-list-item.d.ts +20 -2
- package/scb-components/scb-list/scb-list.d.ts +1 -2
- package/scb-components/scb-nav/scb-nav.d.ts +2 -0
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +1 -0
- package/scb-components/scb-select/scb-select-option.d.ts +2 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +1 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +2 -0
- package/scb-cookies-consent/scb-cookies-consent.js +43 -31
- package/scb-datepicker/scb-datepicker.js +27 -25
- package/scb-dialog/scb-dialog.js +1 -1
- package/scb-dropdown/scb-dropdown.js +29 -28
- package/scb-header/scb-header-drawer.internal.js +78 -0
- package/scb-header/scb-header.js +41 -89
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +181 -88
- package/scb-icon-button/scb-icon-button.js +293 -205
- package/scb-keyfigure-card/scb-keyfigure-card.js +96 -43
- package/scb-list/scb-list-item.js +117 -52
- package/scb-list/scb-list.js +9 -9
- package/scb-nav/scb-nav.js +26 -23
- package/scb-notification-card/scb-notification-card.js +0 -2
- package/scb-options-menu/scb-options-menu-item.js +20 -20
- package/scb-pagination/scb-pagination.js +0 -1
- package/scb-progress-stepper/scb-progress-step.js +19 -17
- package/scb-radio-button/scb-radio-button.js +0 -1
- package/scb-search/scb-search.js +29 -28
- package/scb-segmented-button/scb-segmented-item.js +22 -19
- package/scb-select/scb-select-option.js +20 -14
- package/scb-select/scb-select.js +26 -26
- package/scb-stepper/scb-step.js +34 -31
- package/scb-textfield/scb-textfield.js +39 -39
- package/scb-toc/scb-toc-item.js +26 -26
- package/scb-tooltip/scb-tooltip.js +5 -4
- package/scb-viz/scb-viz.js +1 -1
- package/scb-wc-core.css +1 -1
- package/scb-wc-public-entry/index.d.ts +97 -0
- package/scb-wc-selfhost.css +1 -1
- package/scb-wc.bundle.js +1873 -1476
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +194 -198
- package/mvc/components/scb-chevron/scb-chevron.js +0 -41
- package/mvc/components/scb-datepicker/scb-datepicker.js +0 -296
- package/mvc/vendor/element-internals.js +0 -1
- package/mvc/vendor/filled-icon-button.js +0 -2
- package/mvc/vendor/filled-tonal-icon-button.js +0 -2
- package/mvc/vendor/form-label-activation.js +0 -1
- package/mvc/vendor/form-submitter.js +0 -1
- package/mvc/vendor/icon-button.js +0 -2
- package/mvc/vendor/list.js +0 -8
- package/mvc/vendor/outlined-icon-button.js +0 -2
- package/mvc/vendor/shared-styles2.js +0 -30
- package/scb-components/index.d.ts +0 -99
- package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -39
package/scb-select/scb-select.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ensureFocusRingOnFocusVisible as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
3
|
import "../scb-chevron/scb-chevron.js";
|
|
3
4
|
import "./scb-select-option.js";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { customElement as
|
|
6
|
-
import "
|
|
7
|
-
import { ifDefined as o } from "lit/directives/if-defined.js";
|
|
5
|
+
import { LitElement as n, css as r, html as i } from "lit";
|
|
6
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
7
|
+
import { ifDefined as s } from "lit/directives/if-defined.js";
|
|
8
8
|
//#region src/scb-components/scb-select/scb-select.ts
|
|
9
|
-
var
|
|
9
|
+
var c = class extends n {
|
|
10
10
|
static {
|
|
11
11
|
this.formAssociated = !0;
|
|
12
12
|
}
|
|
@@ -34,7 +34,7 @@ var s = class extends t {
|
|
|
34
34
|
this.size === "extra-small" ? this.setAttribute("data-density", "-5") : this.size === "small" ? this.setAttribute("data-density", "-4") : this.size === "medium" ? this.setAttribute("data-density", "-2") : this.removeAttribute("data-density");
|
|
35
35
|
}
|
|
36
36
|
static {
|
|
37
|
-
this.styles =
|
|
37
|
+
this.styles = r`
|
|
38
38
|
:host {
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
@@ -426,8 +426,8 @@ var s = class extends t {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
render() {
|
|
429
|
-
return
|
|
430
|
-
${this.label ?
|
|
429
|
+
return i`
|
|
430
|
+
${this.label ? i`
|
|
431
431
|
<label
|
|
432
432
|
class="select-label ${this.supportingText ? "" : "select-label--without-supporting"}"
|
|
433
433
|
id="scb-select-label-${this.name}"
|
|
@@ -435,11 +435,11 @@ var s = class extends t {
|
|
|
435
435
|
${this.label}
|
|
436
436
|
</label>
|
|
437
437
|
` : ""}
|
|
438
|
-
${this.supportingText ?
|
|
438
|
+
${this.supportingText ? i`
|
|
439
439
|
<span class="select-sub-label">${this.supportingText}</span>
|
|
440
440
|
` : ""}
|
|
441
441
|
<div class="select">
|
|
442
|
-
<div class="selected-value-container" tabindex="0" @click="${this._toggleOpen}" @keydown="${this._onKeyDown}">
|
|
442
|
+
<div class="selected-value-container" tabindex="0" @click="${this._toggleOpen}" @keydown="${this._onKeyDown}" @focusin=${e}>
|
|
443
443
|
<md-focus-ring inward></md-focus-ring>
|
|
444
444
|
<md-ripple></md-ripple>
|
|
445
445
|
<input
|
|
@@ -462,7 +462,7 @@ var s = class extends t {
|
|
|
462
462
|
</div>
|
|
463
463
|
<div
|
|
464
464
|
class="${this._hasMoreThanFourOptions() ? "options options--scroll" : "options"}"
|
|
465
|
-
style=${
|
|
465
|
+
style=${s(this.zIndex ? `z-index: ${this.zIndex};` : void 0)}
|
|
466
466
|
@click=${this._onSlotClick}
|
|
467
467
|
@keydown=${this._onOptionKeyDown}
|
|
468
468
|
>
|
|
@@ -474,47 +474,47 @@ var s = class extends t {
|
|
|
474
474
|
`;
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
|
-
|
|
477
|
+
t([o({ type: String })], c.prototype, "variant", void 0), t([o({ type: String })], c.prototype, "value", void 0), t([o({ type: Array })], c.prototype, "values", void 0), t([o({ type: Boolean })], c.prototype, "disabled", void 0), t([o({
|
|
478
478
|
type: Boolean,
|
|
479
479
|
reflect: !0
|
|
480
|
-
})],
|
|
480
|
+
})], c.prototype, "required", void 0), t([o({
|
|
481
481
|
type: Boolean,
|
|
482
482
|
reflect: !0
|
|
483
|
-
})],
|
|
483
|
+
})], c.prototype, "open", void 0), t([o({ type: String })], c.prototype, "label", void 0), t([o({ type: String })], c.prototype, "name", void 0), t([o({ type: String })], c.prototype, "placeholder", void 0), t([o({
|
|
484
484
|
type: String,
|
|
485
485
|
attribute: "supporting-text"
|
|
486
|
-
})],
|
|
486
|
+
})], c.prototype, "supportingText", void 0), t([o({
|
|
487
487
|
type: Boolean,
|
|
488
488
|
attribute: "with-radiobuttons"
|
|
489
|
-
})],
|
|
489
|
+
})], c.prototype, "withRadiobuttons", void 0), t([o({
|
|
490
490
|
type: Boolean,
|
|
491
491
|
attribute: "no-highlight-selected",
|
|
492
492
|
reflect: !0
|
|
493
|
-
})],
|
|
493
|
+
})], c.prototype, "noHighlightSelected", void 0), t([o({
|
|
494
494
|
type: String,
|
|
495
495
|
reflect: !0
|
|
496
|
-
})],
|
|
496
|
+
})], c.prototype, "size", void 0), t([o({
|
|
497
497
|
type: String,
|
|
498
498
|
reflect: !0
|
|
499
|
-
})],
|
|
499
|
+
})], c.prototype, "spacing", void 0), t([o({
|
|
500
500
|
type: String,
|
|
501
501
|
attribute: "spacing-top",
|
|
502
502
|
reflect: !0
|
|
503
|
-
})],
|
|
503
|
+
})], c.prototype, "spacingTop", void 0), t([o({
|
|
504
504
|
type: String,
|
|
505
505
|
attribute: "spacing-bottom",
|
|
506
506
|
reflect: !0
|
|
507
|
-
})],
|
|
507
|
+
})], c.prototype, "spacingBottom", void 0), t([o({
|
|
508
508
|
type: String,
|
|
509
509
|
attribute: "spacing-left",
|
|
510
510
|
reflect: !0
|
|
511
|
-
})],
|
|
511
|
+
})], c.prototype, "spacingLeft", void 0), t([o({
|
|
512
512
|
type: String,
|
|
513
513
|
attribute: "spacing-right",
|
|
514
514
|
reflect: !0
|
|
515
|
-
})],
|
|
515
|
+
})], c.prototype, "spacingRight", void 0), t([o({
|
|
516
516
|
type: String,
|
|
517
517
|
attribute: "z-index"
|
|
518
|
-
})],
|
|
518
|
+
})], c.prototype, "zIndex", void 0), c = t([a("scb-select")], c);
|
|
519
519
|
//#endregion
|
|
520
|
-
export {
|
|
520
|
+
export { c as ScbSelect };
|
package/scb-stepper/scb-step.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
1
|
+
import { ensureFocusRingOnFocusVisible as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
3
|
+
import { LitElement as n, css as r, html as i } from "lit";
|
|
4
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
5
5
|
import "@material/web/icon/icon.js";
|
|
6
6
|
import "@material/web/ripple/ripple.js";
|
|
7
7
|
//#region src/scb-components/scb-stepper/scb-step.ts
|
|
8
|
-
var
|
|
8
|
+
var s = class extends n {
|
|
9
9
|
constructor(...e) {
|
|
10
10
|
super(...e), this.label = "", this.subLabel = "", this.symbolVariant = "number", this.number = 0, this.active = !1, this.completed = !1, this.changeOnCompleted = !1, this.islast = !1, this.variant = "horizontal", this.widthWeight = 1, this.icon = "";
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.styles =
|
|
13
|
+
this.styles = r`
|
|
14
14
|
:host {
|
|
15
15
|
font-family: var(--brand-font);
|
|
16
16
|
--scb-step-slide-from-x: 0px;
|
|
@@ -207,20 +207,21 @@ var o = class extends t {
|
|
|
207
207
|
})), e.preventDefault());
|
|
208
208
|
}
|
|
209
209
|
render() {
|
|
210
|
-
let
|
|
210
|
+
let t = this.active ? "step" : void 0, n = this.label ? `${this.label}${this.subLabel ? ": " + this.subLabel : ""}` : void 0;
|
|
211
211
|
switch (this.symbolVariant) {
|
|
212
|
-
case "icon": return
|
|
212
|
+
case "icon": return i`
|
|
213
213
|
<div
|
|
214
214
|
class="scb-step-content"
|
|
215
215
|
tabindex="0"
|
|
216
216
|
role="listitem"
|
|
217
|
-
aria-current=${
|
|
218
|
-
aria-label=${
|
|
217
|
+
aria-current=${t}
|
|
218
|
+
aria-label=${n}
|
|
219
219
|
@keydown=${this.handleKeyDown}
|
|
220
|
+
@focusin=${e}
|
|
220
221
|
>
|
|
221
222
|
<md-ripple></md-ripple>
|
|
222
223
|
<div class="symbol">
|
|
223
|
-
${this.completed && this.changeOnCompleted ?
|
|
224
|
+
${this.completed && this.changeOnCompleted ? i`<md-icon>check</md-icon>` : i`<md-icon>${this.icon}</md-icon>`}
|
|
224
225
|
</div>
|
|
225
226
|
<div class="content">
|
|
226
227
|
<div class="label" data-label="${this.label}"><span class="label-text">${this.label}</span></div>
|
|
@@ -229,18 +230,19 @@ var o = class extends t {
|
|
|
229
230
|
<md-focus-ring></md-focus-ring>
|
|
230
231
|
</div>
|
|
231
232
|
`;
|
|
232
|
-
case "marker": return
|
|
233
|
+
case "marker": return i`
|
|
233
234
|
<div
|
|
234
235
|
class="scb-step-content"
|
|
235
236
|
tabindex="0"
|
|
236
237
|
role="listitem"
|
|
237
|
-
aria-current=${
|
|
238
|
-
aria-label=${
|
|
238
|
+
aria-current=${t}
|
|
239
|
+
aria-label=${n}
|
|
239
240
|
@keydown=${this.handleKeyDown}
|
|
241
|
+
@focusin=${e}
|
|
240
242
|
>
|
|
241
243
|
<md-ripple></md-ripple>
|
|
242
244
|
<div class="symbol">
|
|
243
|
-
${this.completed && this.changeOnCompleted ?
|
|
245
|
+
${this.completed && this.changeOnCompleted ? i`<md-icon>check</md-icon>` : i``}
|
|
244
246
|
</div>
|
|
245
247
|
<div class="content">
|
|
246
248
|
<div class="label" data-label="${this.label}"><span class="label-text">${this.label}</span></div>
|
|
@@ -249,18 +251,19 @@ var o = class extends t {
|
|
|
249
251
|
<md-focus-ring></md-focus-ring>
|
|
250
252
|
</div>
|
|
251
253
|
`;
|
|
252
|
-
default: return
|
|
254
|
+
default: return i`
|
|
253
255
|
<div
|
|
254
256
|
class="scb-step-content"
|
|
255
257
|
tabindex="0"
|
|
256
258
|
role="listitem"
|
|
257
|
-
aria-current=${
|
|
258
|
-
aria-label=${
|
|
259
|
+
aria-current=${t}
|
|
260
|
+
aria-label=${n}
|
|
259
261
|
@keydown=${this.handleKeyDown}
|
|
262
|
+
@focusin=${e}
|
|
260
263
|
>
|
|
261
264
|
<md-ripple></md-ripple>
|
|
262
265
|
<div class="symbol">
|
|
263
|
-
${this.completed && this.changeOnCompleted ?
|
|
266
|
+
${this.completed && this.changeOnCompleted ? i`<md-icon>check</md-icon>` : i`<span>${this.number}</span>`}
|
|
264
267
|
</div>
|
|
265
268
|
<div class="content">
|
|
266
269
|
<div class="label" data-label="${this.label}"><span class="label-text">${this.label}</span></div>
|
|
@@ -272,40 +275,40 @@ var o = class extends t {
|
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
277
|
};
|
|
275
|
-
|
|
278
|
+
t([o({
|
|
276
279
|
type: String,
|
|
277
280
|
reflect: !0
|
|
278
|
-
})],
|
|
281
|
+
})], s.prototype, "label", void 0), t([o({
|
|
279
282
|
type: String,
|
|
280
283
|
reflect: !0,
|
|
281
284
|
attribute: "sub-label"
|
|
282
|
-
})],
|
|
285
|
+
})], s.prototype, "subLabel", void 0), t([o({
|
|
283
286
|
type: String,
|
|
284
287
|
reflect: !0,
|
|
285
288
|
attribute: "symbol-variant"
|
|
286
|
-
})],
|
|
289
|
+
})], s.prototype, "symbolVariant", void 0), t([o({
|
|
287
290
|
type: Number,
|
|
288
291
|
reflect: !0
|
|
289
|
-
})],
|
|
292
|
+
})], s.prototype, "number", void 0), t([o({
|
|
290
293
|
type: Boolean,
|
|
291
294
|
reflect: !0
|
|
292
|
-
})],
|
|
295
|
+
})], s.prototype, "active", void 0), t([o({
|
|
293
296
|
type: Boolean,
|
|
294
297
|
reflect: !0
|
|
295
|
-
})],
|
|
298
|
+
})], s.prototype, "completed", void 0), t([o({
|
|
296
299
|
type: Boolean,
|
|
297
300
|
reflect: !0,
|
|
298
301
|
attribute: "change-on-completed"
|
|
299
|
-
})],
|
|
302
|
+
})], s.prototype, "changeOnCompleted", void 0), t([o({
|
|
300
303
|
type: Boolean,
|
|
301
304
|
reflect: !0
|
|
302
|
-
})],
|
|
305
|
+
})], s.prototype, "islast", void 0), t([o({
|
|
303
306
|
type: String,
|
|
304
307
|
reflect: !0
|
|
305
|
-
})],
|
|
308
|
+
})], s.prototype, "variant", void 0), t([o({
|
|
306
309
|
type: Number,
|
|
307
310
|
reflect: !0,
|
|
308
311
|
attribute: "width-weight"
|
|
309
|
-
})],
|
|
312
|
+
})], s.prototype, "widthWeight", void 0), t([o({ type: String })], s.prototype, "icon", void 0), s = t([a("scb-step")], s);
|
|
310
313
|
//#endregion
|
|
311
|
-
export {
|
|
314
|
+
export { s as ScbStep };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ensureFocusRingReady as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
3
|
import "../scb-icon-button/scb-icon-button.js";
|
|
3
4
|
import "../scb-datepicker/scb-datepicker.js";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { customElement as
|
|
6
|
-
import "@material/web/focus/md-focus-ring.js";
|
|
5
|
+
import { LitElement as n, css as r, html as i } from "lit";
|
|
6
|
+
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
7
7
|
import "@material/web/icon/icon.js";
|
|
8
8
|
import "@material/web/ripple/ripple.js";
|
|
9
9
|
//#region src/scb-components/scb-textfield/scb-textfield.ts
|
|
10
|
-
var
|
|
10
|
+
var c = class extends n {
|
|
11
11
|
static {
|
|
12
12
|
this.formAssociated = !0;
|
|
13
13
|
}
|
|
14
14
|
constructor() {
|
|
15
|
-
super(), this._internals = null, this._inputFocused = !1, this._kbShouldShowRing = !1, this._onGlobalKeydown = (
|
|
16
|
-
|
|
15
|
+
super(), this._internals = null, this._inputFocused = !1, this._kbShouldShowRing = !1, this._onGlobalKeydown = (t) => {
|
|
16
|
+
t.key === "Tab" && (e(), this._kbShouldShowRing = !0, this._inputFocused && this.#o());
|
|
17
17
|
}, this._onGlobalPointerDown = () => {
|
|
18
18
|
this._kbShouldShowRing = !1, this._inputFocused && this.#o();
|
|
19
19
|
}, this._hasRenderedOnce = !1, this._boundField = null, this._onFieldInput = () => {
|
|
@@ -64,7 +64,7 @@ var s = class extends t {
|
|
|
64
64
|
}, "attachInternals" in this && (this._internals = this.attachInternals());
|
|
65
65
|
}
|
|
66
66
|
static {
|
|
67
|
-
this.styles = [
|
|
67
|
+
this.styles = [r`
|
|
68
68
|
:host {
|
|
69
69
|
--scb-textfield-number-max-width: 280px;
|
|
70
70
|
--scb-textfield-text-max-width: 400px;
|
|
@@ -441,9 +441,9 @@ var s = class extends t {
|
|
|
441
441
|
this.size === "extra-small" ? this.setAttribute("data-density", "-5") : this.size === "small" ? this.setAttribute("data-density", "-4") : this.size === "medium" ? this.setAttribute("data-density", "-2") : this.removeAttribute("data-density");
|
|
442
442
|
}
|
|
443
443
|
render() {
|
|
444
|
-
let e = this.leadingIcon ?
|
|
444
|
+
let e = this.leadingIcon ? i`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>` : null, t = this.error ? i`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>` : null;
|
|
445
445
|
this.underLabel = this.error ? this.errorText || "Ogiltig inmatning." : this.supportingText, this.value = this.value || "";
|
|
446
|
-
let n = this.underLabel ? `${this._inputId}-supporting-text` : void 0,
|
|
446
|
+
let n = this.underLabel ? `${this._inputId}-supporting-text` : void 0, r = this.type === "search" && this.value ? i`
|
|
447
447
|
<button
|
|
448
448
|
type="button"
|
|
449
449
|
class="scb-textfield-clear"
|
|
@@ -478,14 +478,14 @@ var s = class extends t {
|
|
|
478
478
|
</svg>
|
|
479
479
|
</button>
|
|
480
480
|
` : null;
|
|
481
|
-
return this.type === "textarea" ?
|
|
481
|
+
return this.type === "textarea" ? i`
|
|
482
482
|
<label
|
|
483
483
|
class="scb-textfield-label ${this.underLabel ? "" : "scb-textfield-label--without-supporting"}"
|
|
484
484
|
for="${this._inputId}"
|
|
485
485
|
>
|
|
486
486
|
${this.label}
|
|
487
487
|
</label>
|
|
488
|
-
${this.underLabel ?
|
|
488
|
+
${this.underLabel ? i`
|
|
489
489
|
<span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
|
|
490
490
|
${this.underLabel}
|
|
491
491
|
</span>
|
|
@@ -506,14 +506,14 @@ var s = class extends t {
|
|
|
506
506
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
507
507
|
</div>
|
|
508
508
|
</div>
|
|
509
|
-
` : this.type === "date" ?
|
|
509
|
+
` : this.type === "date" ? i`
|
|
510
510
|
<label
|
|
511
511
|
class="scb-textfield-label ${this.underLabel ? "" : "scb-textfield-label--without-supporting"}"
|
|
512
512
|
for="${this._inputId}"
|
|
513
513
|
>
|
|
514
514
|
${this.label}
|
|
515
515
|
</label>
|
|
516
|
-
${this.underLabel ?
|
|
516
|
+
${this.underLabel ? i`
|
|
517
517
|
<span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
|
|
518
518
|
${this.underLabel}
|
|
519
519
|
</span>
|
|
@@ -538,7 +538,7 @@ var s = class extends t {
|
|
|
538
538
|
<md-ripple></md-ripple>
|
|
539
539
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
540
540
|
</div>
|
|
541
|
-
${this.error ? t :
|
|
541
|
+
${this.error ? t : i`
|
|
542
542
|
<scb-icon-button
|
|
543
543
|
class="scb-textfield-datepicker-button"
|
|
544
544
|
icon="calendar_today"
|
|
@@ -553,14 +553,14 @@ var s = class extends t {
|
|
|
553
553
|
@date-selected=${this._onDateSelected}
|
|
554
554
|
></scb-datepicker>
|
|
555
555
|
</div>
|
|
556
|
-
` : this.type === "datetime-local" ?
|
|
556
|
+
` : this.type === "datetime-local" ? i`
|
|
557
557
|
<label
|
|
558
558
|
class="scb-textfield-label ${this.underLabel ? "" : "scb-textfield-label--without-supporting"}"
|
|
559
559
|
for="${this._inputId}"
|
|
560
560
|
>
|
|
561
561
|
${this.label}
|
|
562
562
|
</label>
|
|
563
|
-
${this.underLabel ?
|
|
563
|
+
${this.underLabel ? i`
|
|
564
564
|
<span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
|
|
565
565
|
${this.underLabel}
|
|
566
566
|
</span>
|
|
@@ -587,7 +587,7 @@ var s = class extends t {
|
|
|
587
587
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
588
588
|
</div>
|
|
589
589
|
|
|
590
|
-
${this.error ? t :
|
|
590
|
+
${this.error ? t : i`
|
|
591
591
|
<scb-icon-button
|
|
592
592
|
class="scb-textfield-datepicker-button"
|
|
593
593
|
icon="calendar_today"
|
|
@@ -603,14 +603,14 @@ var s = class extends t {
|
|
|
603
603
|
@date-selected=${this._onDateSelected}
|
|
604
604
|
></scb-datepicker>
|
|
605
605
|
</div>
|
|
606
|
-
` : this.type === "time" ?
|
|
606
|
+
` : this.type === "time" ? i`
|
|
607
607
|
<label
|
|
608
608
|
class="scb-textfield-label ${this.underLabel ? "" : "scb-textfield-label--without-supporting"}"
|
|
609
609
|
for="${this._inputId}"
|
|
610
610
|
>
|
|
611
611
|
${this.label}
|
|
612
612
|
</label>
|
|
613
|
-
${this.underLabel ?
|
|
613
|
+
${this.underLabel ? i`
|
|
614
614
|
<span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
|
|
615
615
|
${this.underLabel}
|
|
616
616
|
</span>
|
|
@@ -649,14 +649,14 @@ var s = class extends t {
|
|
|
649
649
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
650
650
|
</div>
|
|
651
651
|
</div>
|
|
652
|
-
` :
|
|
652
|
+
` : i`
|
|
653
653
|
<label
|
|
654
654
|
class="scb-textfield-label ${this.underLabel ? "" : "scb-textfield-label--without-supporting"}"
|
|
655
655
|
for="${this._inputId}"
|
|
656
656
|
>
|
|
657
657
|
${this.label}
|
|
658
658
|
</label>
|
|
659
|
-
${this.underLabel ?
|
|
659
|
+
${this.underLabel ? i`
|
|
660
660
|
<span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
|
|
661
661
|
${this.underLabel}
|
|
662
662
|
</span>
|
|
@@ -675,7 +675,7 @@ var s = class extends t {
|
|
|
675
675
|
aria-invalid=${this.error ? "true" : "false"}
|
|
676
676
|
aria-describedby=${n}
|
|
677
677
|
/>
|
|
678
|
-
${
|
|
678
|
+
${r}
|
|
679
679
|
${t}
|
|
680
680
|
<md-ripple></md-ripple>
|
|
681
681
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
@@ -776,52 +776,52 @@ var s = class extends t {
|
|
|
776
776
|
e && (this._inputFocused && this._kbShouldShowRing ? e.setAttribute("data-kb-focus", "true") : e.removeAttribute("data-kb-focus"));
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
|
-
|
|
779
|
+
t([o({
|
|
780
780
|
type: String,
|
|
781
781
|
reflect: !0
|
|
782
|
-
})],
|
|
782
|
+
})], c.prototype, "type", void 0), t([o({ type: String })], c.prototype, "label", void 0), t([o({
|
|
783
783
|
type: String,
|
|
784
784
|
attribute: "supporting-text"
|
|
785
|
-
})],
|
|
785
|
+
})], c.prototype, "supportingText", void 0), t([o({
|
|
786
786
|
type: String,
|
|
787
787
|
attribute: "error-text"
|
|
788
|
-
})],
|
|
788
|
+
})], c.prototype, "errorText", void 0), t([o({
|
|
789
789
|
type: String,
|
|
790
790
|
attribute: "leading-icon"
|
|
791
|
-
})],
|
|
791
|
+
})], c.prototype, "leadingIcon", void 0), t([o({ type: String })], c.prototype, "name", void 0), t([o({ type: String })], c.prototype, "pattern", void 0), t([o({
|
|
792
792
|
type: String,
|
|
793
793
|
attribute: "value"
|
|
794
|
-
})],
|
|
794
|
+
})], c.prototype, "value", void 0), t([o({ type: String })], c.prototype, "underLabel", void 0), t([o({
|
|
795
795
|
type: Boolean,
|
|
796
796
|
reflect: !0
|
|
797
|
-
})],
|
|
797
|
+
})], c.prototype, "error", void 0), t([o({
|
|
798
798
|
type: Boolean,
|
|
799
799
|
reflect: !0
|
|
800
|
-
})],
|
|
800
|
+
})], c.prototype, "disabled", void 0), t([o({
|
|
801
801
|
type: Boolean,
|
|
802
802
|
reflect: !0
|
|
803
|
-
})],
|
|
803
|
+
})], c.prototype, "required", void 0), t([o({
|
|
804
804
|
type: String,
|
|
805
805
|
reflect: !0
|
|
806
|
-
})],
|
|
806
|
+
})], c.prototype, "size", void 0), t([o({
|
|
807
807
|
type: String,
|
|
808
808
|
reflect: !0
|
|
809
|
-
})],
|
|
809
|
+
})], c.prototype, "spacing", void 0), t([o({
|
|
810
810
|
type: String,
|
|
811
811
|
attribute: "spacing-top",
|
|
812
812
|
reflect: !0
|
|
813
|
-
})],
|
|
813
|
+
})], c.prototype, "spacingTop", void 0), t([o({
|
|
814
814
|
type: String,
|
|
815
815
|
attribute: "spacing-bottom",
|
|
816
816
|
reflect: !0
|
|
817
|
-
})],
|
|
817
|
+
})], c.prototype, "spacingBottom", void 0), t([o({
|
|
818
818
|
type: String,
|
|
819
819
|
attribute: "spacing-left",
|
|
820
820
|
reflect: !0
|
|
821
|
-
})],
|
|
821
|
+
})], c.prototype, "spacingLeft", void 0), t([o({
|
|
822
822
|
type: String,
|
|
823
823
|
attribute: "spacing-right",
|
|
824
824
|
reflect: !0
|
|
825
|
-
})],
|
|
825
|
+
})], c.prototype, "spacingRight", void 0), t([s()], c.prototype, "_showDatepicker", void 0), c = t([a("scb-textfield")], c);
|
|
826
826
|
//#endregion
|
|
827
|
-
export {
|
|
827
|
+
export { c as ScbTextField };
|
package/scb-toc/scb-toc-item.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addLazyFocusRingListeners as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
3
|
import "../scb-chevron/scb-chevron.js";
|
|
3
4
|
import "../scb-divider/scb-divider.js";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { customElement as
|
|
6
|
-
import "@material/web/focus/md-focus-ring.js";
|
|
5
|
+
import { LitElement as n, css as r, html as i } from "lit";
|
|
6
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
7
7
|
import "@material/web/icon/icon.js";
|
|
8
8
|
import "@material/web/ripple/ripple.js";
|
|
9
9
|
//#region src/scb-components/scb-toc/scb-toc-item.ts
|
|
10
|
-
var
|
|
10
|
+
var s, c = class extends n {
|
|
11
11
|
static {
|
|
12
|
-
|
|
12
|
+
s = this;
|
|
13
13
|
}
|
|
14
14
|
constructor(...e) {
|
|
15
|
-
super(...e), this.expanded = !1, this.size = "medium", this.label = "", this.supportingText = "", this.itemHref = "#", this.noDivider = !1, this._unique =
|
|
15
|
+
super(...e), this.expanded = !1, this.size = "medium", this.label = "", this.supportingText = "", this.itemHref = "#", this.noDivider = !1, this._unique = s._uid(), this._overflowVisibleTimer = null, this._slotHasContent = !1, this._trailingSlotHasContent = !1, this._onSlotChange = () => {
|
|
16
16
|
let e = this.renderRoot.querySelector("slot:not([name])"), t = !!e && e.assignedElements({ flatten: !0 }).length > 0;
|
|
17
17
|
this._slotHasContent !== t && (this._slotHasContent = t, this.requestUpdate()), !this._slotHasContent && this.expanded && (this.expanded = !1), this._applyInertByExpanded();
|
|
18
18
|
}, this._toggleAccordion = () => {
|
|
@@ -57,10 +57,10 @@ var o, s = class extends t {
|
|
|
57
57
|
this._uidSeq = 0;
|
|
58
58
|
}
|
|
59
59
|
static _uid() {
|
|
60
|
-
return globalThis.crypto?.randomUUID?.() ?? `${
|
|
60
|
+
return globalThis.crypto?.randomUUID?.() ?? `${s._uidPrefix}-${++s._uidSeq}`;
|
|
61
61
|
}
|
|
62
62
|
static {
|
|
63
|
-
this.styles = [
|
|
63
|
+
this.styles = [r`
|
|
64
64
|
:host {
|
|
65
65
|
display: block;
|
|
66
66
|
--scb-toc-transition-duration: var(--motion-duration-short, 150ms);
|
|
@@ -334,13 +334,13 @@ var o, s = class extends t {
|
|
|
334
334
|
})));
|
|
335
335
|
}
|
|
336
336
|
connectedCallback() {
|
|
337
|
-
super.connectedCallback(), this._slotHasContent = Array.from(this.children).some((e) => {
|
|
337
|
+
super.connectedCallback(), this._removeLazyFocusRingListeners = e(this, this.renderRoot), this._slotHasContent = Array.from(this.children).some((e) => {
|
|
338
338
|
let t = e.getAttribute("slot");
|
|
339
339
|
return t === null || t === "";
|
|
340
340
|
}), this._trailingSlotHasContent = Array.from(this.children).some((e) => e.getAttribute("slot") === "trailing"), !this._slotHasContent && this.expanded && (this.expanded = !1);
|
|
341
341
|
}
|
|
342
342
|
disconnectedCallback() {
|
|
343
|
-
super.disconnectedCallback(), this._overflowVisibleTimer !== null && (window.clearTimeout(this._overflowVisibleTimer), this._overflowVisibleTimer = null);
|
|
343
|
+
this._removeLazyFocusRingListeners?.(), this._removeLazyFocusRingListeners = void 0, super.disconnectedCallback(), this._overflowVisibleTimer !== null && (window.clearTimeout(this._overflowVisibleTimer), this._overflowVisibleTimer = null);
|
|
344
344
|
}
|
|
345
345
|
_applyInertByExpanded() {
|
|
346
346
|
let e = this.renderRoot.querySelector(".scb-toc-item-bottom");
|
|
@@ -399,10 +399,10 @@ var o, s = class extends t {
|
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
render() {
|
|
402
|
-
let e = `bottom-${this._unique}`, t = `toc-label-${this._unique}`, n = `toc-chevron-${this._unique}`,
|
|
403
|
-
return
|
|
402
|
+
let e = `bottom-${this._unique}`, t = `toc-label-${this._unique}`, n = `toc-chevron-${this._unique}`, r = this.supportingText.trim().length > 0;
|
|
403
|
+
return i`
|
|
404
404
|
<div class="scb-toc-item" role="listitem">
|
|
405
|
-
<div class=${`scb-toc-item-top${
|
|
405
|
+
<div class=${`scb-toc-item-top${r ? "" : " no-supporting-text"}`}>
|
|
406
406
|
<div>
|
|
407
407
|
<div class="toc-item-label-wrapper">
|
|
408
408
|
<a
|
|
@@ -415,14 +415,14 @@ var o, s = class extends t {
|
|
|
415
415
|
</a>
|
|
416
416
|
<md-focus-ring for=${t} inward></md-focus-ring>
|
|
417
417
|
</div>
|
|
418
|
-
${
|
|
418
|
+
${r ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
419
419
|
</div>
|
|
420
420
|
|
|
421
|
-
${this._trailingSlotHasContent ?
|
|
421
|
+
${this._trailingSlotHasContent ? i`
|
|
422
422
|
<div class="toc-chevron-button-wrapper">
|
|
423
423
|
<slot name="trailing"></slot>
|
|
424
424
|
</div>
|
|
425
|
-
` : this._slotHasContent ?
|
|
425
|
+
` : this._slotHasContent ? i`
|
|
426
426
|
<div class="toc-chevron-button-wrapper">
|
|
427
427
|
<button
|
|
428
428
|
id=${n}
|
|
@@ -449,29 +449,29 @@ var o, s = class extends t {
|
|
|
449
449
|
</div>
|
|
450
450
|
</div>
|
|
451
451
|
|
|
452
|
-
${this.noDivider ? "" :
|
|
452
|
+
${this.noDivider ? "" : i`<scb-divider></scb-divider>`}
|
|
453
453
|
</div>
|
|
454
454
|
`;
|
|
455
455
|
}
|
|
456
456
|
};
|
|
457
|
-
|
|
457
|
+
t([o({
|
|
458
458
|
type: Boolean,
|
|
459
459
|
reflect: !0
|
|
460
|
-
})],
|
|
460
|
+
})], c.prototype, "expanded", void 0), t([o({
|
|
461
461
|
type: String,
|
|
462
462
|
reflect: !0
|
|
463
|
-
})],
|
|
463
|
+
})], c.prototype, "size", void 0), t([o({
|
|
464
464
|
type: String,
|
|
465
465
|
reflect: !0
|
|
466
|
-
})],
|
|
466
|
+
})], c.prototype, "label", void 0), t([o({
|
|
467
467
|
type: String,
|
|
468
468
|
attribute: "supporting-text"
|
|
469
|
-
})],
|
|
469
|
+
})], c.prototype, "supportingText", void 0), t([o({
|
|
470
470
|
type: String,
|
|
471
471
|
attribute: "item-href"
|
|
472
|
-
})],
|
|
472
|
+
})], c.prototype, "itemHref", void 0), t([o({
|
|
473
473
|
type: Boolean,
|
|
474
474
|
attribute: "no-divider"
|
|
475
|
-
})],
|
|
475
|
+
})], c.prototype, "noDivider", void 0), c = s = t([a("scb-toc-item")], c);
|
|
476
476
|
//#endregion
|
|
477
|
-
export {
|
|
477
|
+
export { c as ScbTocItem };
|