scb-wc 0.1.231 → 0.1.233
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/all.d.ts +106 -0
- package/package.json +101 -2
- package/scb-components/index.d.ts +106 -0
- package/scb-components/scb-accordion/scb-accordion-item.d.ts +43 -0
- package/scb-components/scb-accordion/scb-accordion.d.ts +32 -0
- package/scb-components/scb-action-card/scb-action-card.d.ts +2 -0
- package/scb-components/scb-app-bar/scb-app-bar.d.ts +39 -0
- package/scb-components/scb-avatar/scb-avatar.d.ts +37 -0
- package/scb-components/scb-badge/scb-badge.d.ts +28 -0
- package/scb-components/scb-breadcrumb/scb-breadcrumb-item.d.ts +17 -0
- package/scb-components/scb-breadcrumb/scb-breadcrumb.d.ts +30 -0
- package/scb-components/scb-button/scb-button.d.ts +69 -0
- package/scb-components/scb-calendar/scb-calendar-event.d.ts +15 -0
- package/scb-components/scb-calendar/scb-calendar.d.ts +89 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +60 -0
- package/scb-components/scb-card/scb-action-card.d.ts +2 -0
- package/scb-components/scb-card/scb-card.d.ts +163 -0
- package/scb-components/scb-card/scb-container-card.d.ts +2 -0
- package/scb-components/scb-card/scb-link-card.d.ts +2 -0
- package/scb-components/scb-card/scb-list-card.d.ts +2 -0
- package/scb-components/scb-card/scb-social-card.d.ts +2 -0
- package/scb-components/scb-checkbox/scb-checkbox-group.d.ts +48 -0
- package/scb-components/scb-checkbox/scb-checkbox.d.ts +63 -0
- package/scb-components/scb-chevron/scb-chevron.d.ts +11 -0
- package/scb-components/scb-chip/scb-chip.d.ts +57 -0
- package/scb-components/scb-collapse/scb-collapse.d.ts +41 -0
- package/scb-components/scb-container-card/scb-container-card.d.ts +2 -0
- package/scb-components/scb-cookies-consent/scb-cookies-consent.d.ts +28 -0
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +52 -0
- package/scb-components/scb-dialog/scb-dialog.d.ts +121 -0
- package/scb-components/scb-divider/scb-divider.d.ts +34 -0
- package/scb-components/scb-drawer/scb-drawer.d.ts +83 -0
- package/scb-components/scb-drop-zone/scb-drop-zone.d.ts +193 -0
- package/scb-components/scb-dropdown/scb-dropdown.d.ts +79 -0
- package/scb-components/scb-fact-card/scb-fact-card-content.d.ts +18 -0
- package/scb-components/scb-fact-card/scb-fact-card.d.ts +55 -0
- package/scb-components/scb-footer/scb-footer-section.d.ts +20 -0
- package/scb-components/scb-footer/scb-footer.d.ts +36 -0
- package/scb-components/scb-form-error-summary/scb-form-error-summary.d.ts +23 -0
- package/scb-components/scb-gallery-grid/scb-gallery-grid.d.ts +25 -0
- package/scb-components/scb-grid/scb-grid-item.d.ts +32 -0
- package/scb-components/scb-grid/scb-grid.d.ts +41 -0
- package/scb-components/scb-grid/scb-stack.d.ts +32 -0
- package/scb-components/scb-header/scb-header-menu-group.d.ts +12 -0
- package/scb-components/scb-header/scb-header-menu-item.d.ts +15 -0
- package/scb-components/scb-header/scb-header-tab.d.ts +15 -0
- package/scb-components/scb-header/scb-header-utility.d.ts +17 -0
- package/scb-components/scb-header/scb-header.d.ts +181 -0
- package/scb-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +68 -0
- package/scb-components/scb-icon/scb-icon.d.ts +19 -0
- package/scb-components/scb-icon-button/scb-icon-button.d.ts +72 -0
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +58 -0
- package/scb-components/scb-link/scb-link.d.ts +25 -0
- package/scb-components/scb-link-button/scb-link-button.d.ts +30 -0
- package/scb-components/scb-link-card/scb-link-card.d.ts +2 -0
- package/scb-components/scb-list/scb-list-item.d.ts +65 -0
- package/scb-components/scb-list/scb-list.d.ts +30 -0
- package/scb-components/scb-list-card/scb-list-card.d.ts +2 -0
- package/scb-components/scb-menu/scb-menu-item.d.ts +65 -0
- package/scb-components/scb-menu/scb-menu-section.d.ts +12 -0
- package/scb-components/scb-menu/scb-menu.d.ts +54 -0
- package/scb-components/scb-menu/scb-sub-menu.d.ts +14 -0
- package/scb-components/scb-nav/scb-nav-item.d.ts +20 -0
- package/scb-components/scb-nav/scb-nav.d.ts +72 -0
- package/scb-components/scb-notification-card/scb-notification-card.d.ts +56 -0
- package/scb-components/scb-options-menu/scb-options-menu-item.d.ts +32 -0
- package/scb-components/scb-options-menu/scb-options-menu.d.ts +37 -0
- package/scb-components/scb-options-menu/scb-options-sub-menu.d.ts +16 -0
- package/scb-components/scb-overlay/scb-overlay.d.ts +24 -0
- package/scb-components/scb-pagination/scb-pagination.d.ts +47 -0
- package/scb-components/scb-progress-indicator/scb-progress-indicator.d.ts +32 -0
- package/scb-components/scb-progress-stepper/scb-progress-step.d.ts +29 -0
- package/scb-components/scb-progress-stepper/scb-progress-stepper.d.ts +29 -0
- package/scb-components/scb-radio-button/scb-radio-button.d.ts +25 -0
- package/scb-components/scb-radio-button/scb-radio-group.d.ts +54 -0
- package/scb-components/scb-scrollspy/scb-scrollspy.d.ts +217 -0
- package/scb-components/scb-search/scb-search.d.ts +116 -0
- package/scb-components/scb-segmented-button/scb-segmented-button.d.ts +86 -0
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +28 -0
- package/scb-components/scb-select/scb-select-option.d.ts +20 -0
- package/scb-components/scb-select/scb-select.d.ts +95 -0
- package/scb-components/scb-skeleton/scb-skeleton.d.ts +36 -0
- package/scb-components/scb-slider/scb-slider.d.ts +64 -0
- package/scb-components/scb-snackbar/scb-snackbar.d.ts +28 -0
- package/scb-components/scb-social-card/scb-social-card.d.ts +2 -0
- package/scb-components/scb-status-pill/scb-status-pill.d.ts +23 -0
- package/scb-components/scb-stepper/scb-step.d.ts +31 -0
- package/scb-components/scb-stepper/scb-stepper.d.ts +50 -0
- package/scb-components/scb-switch/scb-switch.d.ts +65 -0
- package/scb-components/scb-table/scb-table.d.ts +41 -0
- package/scb-components/scb-table-advanced/scb-table-advanced.d.ts +58 -0
- package/scb-components/scb-tabs/scb-primary-tab.d.ts +16 -0
- package/scb-components/scb-tabs/scb-secondary-tab.d.ts +16 -0
- package/scb-components/scb-tabs/scb-tabs.d.ts +23 -0
- package/scb-components/scb-textfield/scb-textfield.d.ts +107 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +44 -0
- package/scb-components/scb-toc/scb-toc.d.ts +30 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +67 -0
- package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +30 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-components/scb-viz/scb-viz.d.ts +246 -0
- package/scb-components/shared/component-size-token.d.ts +1 -0
- package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
- package/scb-components/shared/lazy-ripple.d.ts +9 -0
- package/scb-components/shared/manual-popover.d.ts +7 -0
- package/scb-components/shared/scb-icon-svg.d.ts +3 -0
- package/scb-wc.d.ts +212 -212
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
<scb-scrollspy>
|
|
4
|
+
|
|
5
|
+
Kopplar en navigationsyta (slot="nav" eller extern via nav-selector) till ett innehåll (slot="content").
|
|
6
|
+
När en sektion blir aktiv markeras motsvarande nav-element och rätt <scb-menu-item> får selected.
|
|
7
|
+
|
|
8
|
+
Förväntat markup-upplägg:
|
|
9
|
+
- Nav: <scb-menu-item item-href="#id">, <scb-nav-item href|data-href="#id">, vanliga <a href="#id"> eller <button data-href="#id">
|
|
10
|
+
- Innehåll: element med id som matchar hash:en
|
|
11
|
+
|
|
12
|
+
Extern nav-yta:
|
|
13
|
+
- Placera nav:en var du vill i layouten och koppla den med nav-selector.
|
|
14
|
+
|
|
15
|
+
Observern körs mot scrollcontainern om slot="content" är scrollbar. Annars används viewport.
|
|
16
|
+
|
|
17
|
+
Komponentens syfte är att vara ett beteende, inte en layout. :host använder display: contents.
|
|
18
|
+
För docs och plug-and-play-exempel kan layout="sidebar" användas för att skapa en fast tvåkolumnslayout
|
|
19
|
+
med scrollbart innehåll och nav-yta.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ScbScrollspy extends LitElement {
|
|
22
|
+
static properties: {
|
|
23
|
+
navSelector: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
attribute: string;
|
|
26
|
+
};
|
|
27
|
+
offsetTop: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
attribute: string;
|
|
30
|
+
};
|
|
31
|
+
offsetBottom: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
attribute: string;
|
|
34
|
+
};
|
|
35
|
+
updateHash: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
attribute: string;
|
|
38
|
+
converter: {
|
|
39
|
+
fromAttribute: (value: string | null) => boolean;
|
|
40
|
+
toAttribute: (value: boolean) => "" | null;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
activeId: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
attribute: string;
|
|
46
|
+
reflect: boolean;
|
|
47
|
+
};
|
|
48
|
+
layout: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
reflect: boolean;
|
|
51
|
+
};
|
|
52
|
+
sidebarNavWidth: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
attribute: string;
|
|
55
|
+
};
|
|
56
|
+
sidebarHeight: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
attribute: string;
|
|
59
|
+
};
|
|
60
|
+
stackHeight: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
attribute: string;
|
|
63
|
+
};
|
|
64
|
+
sidebarNavTop: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
attribute: string;
|
|
67
|
+
};
|
|
68
|
+
contentPadding: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
attribute: string;
|
|
71
|
+
};
|
|
72
|
+
spacing: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
reflect: boolean;
|
|
75
|
+
};
|
|
76
|
+
spacingTop: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
attribute: string;
|
|
79
|
+
reflect: boolean;
|
|
80
|
+
};
|
|
81
|
+
spacingBottom: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
attribute: string;
|
|
84
|
+
reflect: boolean;
|
|
85
|
+
};
|
|
86
|
+
spacingLeft: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
attribute: string;
|
|
89
|
+
reflect: boolean;
|
|
90
|
+
};
|
|
91
|
+
spacingRight: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
attribute: string;
|
|
94
|
+
reflect: boolean;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
/** CSS-selector för extern nav-yta. Om satt används den istället för slot="nav". */
|
|
98
|
+
navSelector: string;
|
|
99
|
+
/** Offset i px från toppen av scrollcontainern, exempelvis höjden på en sticky header. */
|
|
100
|
+
offsetTop: number;
|
|
101
|
+
/** Offset i px från botten av scrollcontainern. */
|
|
102
|
+
offsetBottom: number;
|
|
103
|
+
/** Om URL-hash ska uppdateras när aktiv sektion ändras. */
|
|
104
|
+
updateHash: boolean;
|
|
105
|
+
/** Senast aktivt id (utan #). */
|
|
106
|
+
activeId: string;
|
|
107
|
+
/** Layoutläge. Tomt värde innebär att komponenten inte skapar någon layout (display: contents). */
|
|
108
|
+
layout: '' | 'sidebar' | 'stack';
|
|
109
|
+
/** Bredd på nav-kolumnen när layout="sidebar" används. */
|
|
110
|
+
sidebarNavWidth: string;
|
|
111
|
+
/** Höjd på nav- och innehållspanelerna när layout="sidebar" används. */
|
|
112
|
+
sidebarHeight: string;
|
|
113
|
+
/** Maxhöjd på scrollcontainern när layout="stack" används. */
|
|
114
|
+
stackHeight: string;
|
|
115
|
+
/** Top-offset för nav-kolumnen när layout="sidebar" används (vid sticky-läge i wrappern). */
|
|
116
|
+
sidebarNavTop: string;
|
|
117
|
+
/** Inre padding för innehållet när layout="sidebar" eller layout="stack" används. */
|
|
118
|
+
contentPadding: string;
|
|
119
|
+
/** Vertikalt avstånd till omgivande innehåll. spacing sätter både top och bottom om spacing-top / spacing-bottom inte är satta. */
|
|
120
|
+
spacing: undefined;
|
|
121
|
+
/** Överkantens avstånd. Om satt går före spacing. */
|
|
122
|
+
spacingTop: undefined;
|
|
123
|
+
/** Nederkantens avstånd. Om satt går före spacing. */
|
|
124
|
+
spacingBottom: undefined;
|
|
125
|
+
/** Vänsterkantens avstånd. */
|
|
126
|
+
spacingLeft: undefined;
|
|
127
|
+
/** Högerkantens avstånd. */
|
|
128
|
+
spacingRight: undefined;
|
|
129
|
+
private __navEl;
|
|
130
|
+
private __contentEl;
|
|
131
|
+
private __contentShellEl;
|
|
132
|
+
private __links;
|
|
133
|
+
private __observer;
|
|
134
|
+
private __fallbackScrollRoot;
|
|
135
|
+
private __entries;
|
|
136
|
+
private __rafId;
|
|
137
|
+
private __scrollRafId;
|
|
138
|
+
private __hashAllowUpdates;
|
|
139
|
+
private __hashBaselineReady;
|
|
140
|
+
private __hashBaselinePos;
|
|
141
|
+
private __hashBaselineRafId;
|
|
142
|
+
private __hashScrollRoot;
|
|
143
|
+
private __hashSuspend;
|
|
144
|
+
private __hashInitialApplied;
|
|
145
|
+
private __onHashScrollBound;
|
|
146
|
+
private __scrollAnimSeq;
|
|
147
|
+
private __syncingActiveId;
|
|
148
|
+
private __slotsResolvedOnce;
|
|
149
|
+
private __motionMeasureEl;
|
|
150
|
+
private __focusableRafId;
|
|
151
|
+
private __autoOffsetTop;
|
|
152
|
+
private __autoOffsetRafId;
|
|
153
|
+
private __navResizeObserver;
|
|
154
|
+
private __onNavClickBound;
|
|
155
|
+
private __onScrollFallbackBound;
|
|
156
|
+
private __onResizeBound;
|
|
157
|
+
static styles: import("lit").CSSResult;
|
|
158
|
+
connectedCallback(): void;
|
|
159
|
+
protected firstUpdated(): void;
|
|
160
|
+
disconnectedCallback(): void;
|
|
161
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
162
|
+
private __mapSpacingToken;
|
|
163
|
+
private __applySpacing;
|
|
164
|
+
private __teardown;
|
|
165
|
+
private __cancelScrollAnimation;
|
|
166
|
+
private __cancelEnsureContentFocusable;
|
|
167
|
+
private __requestEnsureContentFocusable;
|
|
168
|
+
private __ensureScrollableContentFocusable;
|
|
169
|
+
private __ensureMotionMeasureEl;
|
|
170
|
+
private __disconnectObserver;
|
|
171
|
+
private __resolveInternals;
|
|
172
|
+
private __resolveSlots;
|
|
173
|
+
private __queryExternalNav;
|
|
174
|
+
private __getScrollContainerEl;
|
|
175
|
+
private __isOffsetTopExplicit;
|
|
176
|
+
private __getEffectiveOffsetTop;
|
|
177
|
+
private __cancelAutoOffsetMeasure;
|
|
178
|
+
private __disconnectAutoOffsetObserver;
|
|
179
|
+
private __requestAutoOffsetMeasure;
|
|
180
|
+
private __measureAutoOffset;
|
|
181
|
+
private __setAutoOffsetTop;
|
|
182
|
+
private __rebuildObserver;
|
|
183
|
+
private __enableFallbackScrollSpy;
|
|
184
|
+
private __getObserverRoot;
|
|
185
|
+
private __collectLinks;
|
|
186
|
+
private __getHref;
|
|
187
|
+
private __onIntersect;
|
|
188
|
+
private __requestActiveRecalc;
|
|
189
|
+
private __updateActiveFromEntries;
|
|
190
|
+
private __updateActiveFromRects;
|
|
191
|
+
private __applyActiveId;
|
|
192
|
+
private __applyExternalActiveId;
|
|
193
|
+
private __setActiveId;
|
|
194
|
+
private __applyActiveToNav;
|
|
195
|
+
private __expandAncestors;
|
|
196
|
+
private __scrollToTarget;
|
|
197
|
+
private __getScrollTopInContainer;
|
|
198
|
+
private __animateScroll;
|
|
199
|
+
private __getScrollDurationMs;
|
|
200
|
+
private __getScrollEasingFn;
|
|
201
|
+
private __resolveTimeMs;
|
|
202
|
+
private __resolveTimingFunction;
|
|
203
|
+
private __parseTimeToMs;
|
|
204
|
+
private __parseEasingFunction;
|
|
205
|
+
private __cubicBezier;
|
|
206
|
+
private __detachHashScrollRoot;
|
|
207
|
+
private __cancelHashBaseline;
|
|
208
|
+
private __attachHashScrollRoot;
|
|
209
|
+
private __scheduleHashBaseline;
|
|
210
|
+
private __getHashScrollPos;
|
|
211
|
+
private __onHashScroll;
|
|
212
|
+
private __jumpToTarget;
|
|
213
|
+
private __applyInitialHashIfAny;
|
|
214
|
+
private __onNavClick;
|
|
215
|
+
private __onSlotChange;
|
|
216
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
217
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { LitElement, TemplateResult, PropertyValues } from 'lit';
|
|
2
|
+
import '@material/web/ripple/ripple.js';
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
export declare class ScbSearch extends LitElement {
|
|
5
|
+
static formAssociated: boolean;
|
|
6
|
+
private _internals;
|
|
7
|
+
trailingIcon?: string;
|
|
8
|
+
supportingText: string;
|
|
9
|
+
inputLabel: string;
|
|
10
|
+
clearLabel: string;
|
|
11
|
+
suggestionsLabel: string;
|
|
12
|
+
errorText: string;
|
|
13
|
+
value: string;
|
|
14
|
+
/** Namn för HTML-formulär (hamnar som nyckel i FormData när formuläret skickas) */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Inaktiverat läge; speglas mot inre input och FormData (skickas inte när disabled). */
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
required: boolean;
|
|
19
|
+
error: boolean;
|
|
20
|
+
/** Aktiverar webbläsarens inbyggda autocompletion i inmatningsfältet. */
|
|
21
|
+
autocomplete: boolean;
|
|
22
|
+
spacing: undefined;
|
|
23
|
+
spacingTop: undefined;
|
|
24
|
+
spacingBottom: undefined;
|
|
25
|
+
spacingLeft: undefined;
|
|
26
|
+
spacingRight: undefined;
|
|
27
|
+
size: 'extra-small' | 'small' | 'medium' | 'large';
|
|
28
|
+
fullScreen: boolean;
|
|
29
|
+
private _inputFocused;
|
|
30
|
+
private _visibleSuggestions;
|
|
31
|
+
private _listDepsLoaded;
|
|
32
|
+
private _activeIndex;
|
|
33
|
+
private _listboxId;
|
|
34
|
+
private _boundNativeKeydown?;
|
|
35
|
+
private _kbMode;
|
|
36
|
+
private _listDepsPromise?;
|
|
37
|
+
private _ensureListDepsLoaded;
|
|
38
|
+
private _ensureListDepsWhenNeeded;
|
|
39
|
+
private _valueOnFocus;
|
|
40
|
+
private _lastChangeValue;
|
|
41
|
+
private _kbShouldShowRing;
|
|
42
|
+
private _onGlobalKeydown;
|
|
43
|
+
private _onGlobalPointerDown;
|
|
44
|
+
private _form;
|
|
45
|
+
private _formResetHandler;
|
|
46
|
+
private _formSubmitHandler;
|
|
47
|
+
private _initialValue;
|
|
48
|
+
private _customValidationMessage;
|
|
49
|
+
private _validationMessage;
|
|
50
|
+
private _hasValidationBeenReported;
|
|
51
|
+
constructor();
|
|
52
|
+
static styles: import("lit").CSSResult;
|
|
53
|
+
private _syncDensityForSize;
|
|
54
|
+
connectedCallback(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
firstUpdated(): void;
|
|
57
|
+
updated(changed: PropertyValues): void;
|
|
58
|
+
render(): TemplateResult;
|
|
59
|
+
/** Gör så att native formulär kan sätta disabled på kontrollen. */
|
|
60
|
+
formDisabledCallback(disabled: boolean): void;
|
|
61
|
+
private _getValidationMessage;
|
|
62
|
+
private _syncValidity;
|
|
63
|
+
checkValidity(): boolean;
|
|
64
|
+
reportValidity(): boolean;
|
|
65
|
+
setCustomValidity(message: string): void;
|
|
66
|
+
get form(): HTMLFormElement | null;
|
|
67
|
+
get validity(): ValidityState | undefined;
|
|
68
|
+
get validationMessage(): string;
|
|
69
|
+
get willValidate(): boolean;
|
|
70
|
+
get labels(): NodeList | undefined;
|
|
71
|
+
submit(): void;
|
|
72
|
+
focus(options?: FocusOptions): void;
|
|
73
|
+
blur(): void;
|
|
74
|
+
private get _hasSuggestions();
|
|
75
|
+
private _onSlotChange;
|
|
76
|
+
private _onInput;
|
|
77
|
+
private _onNativeChange;
|
|
78
|
+
private _onFocus;
|
|
79
|
+
private _onBlur;
|
|
80
|
+
private _updateInputRingVisibility;
|
|
81
|
+
private _handleKey;
|
|
82
|
+
private _clearInput;
|
|
83
|
+
private _filterSuggestions;
|
|
84
|
+
private _inputEl;
|
|
85
|
+
private _listEl;
|
|
86
|
+
private _ringEl;
|
|
87
|
+
private _getVisibleItems;
|
|
88
|
+
private _getActiveItem;
|
|
89
|
+
private _moveActive;
|
|
90
|
+
private _scrollActiveIntoView;
|
|
91
|
+
private _itemPayload;
|
|
92
|
+
private _ensureListboxA11y;
|
|
93
|
+
private _ensureOptionA11y;
|
|
94
|
+
private _updateComboboxA11y;
|
|
95
|
+
private _positionOptionRing;
|
|
96
|
+
private _hideOptionRing;
|
|
97
|
+
private _onWindowResize;
|
|
98
|
+
private _onViewportScroll;
|
|
99
|
+
private _syncSuggestionPopover;
|
|
100
|
+
private _positionSuggestionPopover;
|
|
101
|
+
private _listScrollHandler;
|
|
102
|
+
private _listWithHandler?;
|
|
103
|
+
private _attachListScrollListener;
|
|
104
|
+
private _detachListScrollListener;
|
|
105
|
+
private _dispatchStandardInput;
|
|
106
|
+
private _dispatchStandardChangeIfNeeded;
|
|
107
|
+
private _dispatchSubmit;
|
|
108
|
+
private mapSpacingToken;
|
|
109
|
+
private applySpacing;
|
|
110
|
+
private _syncFormValue;
|
|
111
|
+
}
|
|
112
|
+
declare global {
|
|
113
|
+
interface HTMLElementTagNameMap {
|
|
114
|
+
'scb-search': ScbSearch;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import './scb-segmented-item.js';
|
|
3
|
+
/**
|
|
4
|
+
* Komponentöversikt:
|
|
5
|
+
* - Grupp för slottade scb-segmented-item.
|
|
6
|
+
* - Yttre höjd följer knappfamiljen; text, ikon och horisontell luft har komponentegna tokens.
|
|
7
|
+
* - Gruppen äger variant, value/values, required, FormData och validering.
|
|
8
|
+
* - Publika exempel och attribut finns i komponentmappens component.story.mjs.
|
|
9
|
+
* - Styrpunkter och tokenbindningar finns i komponentens component.json.
|
|
10
|
+
*/
|
|
11
|
+
export type ScbSegmentedButtonSize = 'extra-small' | 'small' | 'medium' | 'large';
|
|
12
|
+
export declare class ScbSegmentedButton extends LitElement {
|
|
13
|
+
#private;
|
|
14
|
+
static formAssociated: boolean;
|
|
15
|
+
private _internals;
|
|
16
|
+
variant: 'single-select' | 'multi-select';
|
|
17
|
+
/**
|
|
18
|
+
* Layout: 'horizontal' (default) eller 'responsive'. Responsive blir staplad i smal vy.
|
|
19
|
+
*/
|
|
20
|
+
layout: 'horizontal' | 'responsive';
|
|
21
|
+
size: ScbSegmentedButtonSize;
|
|
22
|
+
/**
|
|
23
|
+
* Aktuellt valt värde (single) eller array av värden (multi)
|
|
24
|
+
*/
|
|
25
|
+
value: string;
|
|
26
|
+
values: string[];
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
required: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Namn för HTML-formulär (FormData-nyckel).
|
|
31
|
+
* single-select: FormData.get(name) → string
|
|
32
|
+
* multi-select: FormData.getAll(name) → string[]
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* Vertikalt avstånd till omgivande innehåll.
|
|
37
|
+
* "N" (0–14) mappar till var(--spacing-N), annars valfritt CSS-värde.
|
|
38
|
+
*/
|
|
39
|
+
spacing: undefined;
|
|
40
|
+
/** Överkantens avstånd. Om satt går före spacing. 0–14 mappar till var(--spacing-N), annars valfritt CSS-värde. */
|
|
41
|
+
spacingTop: undefined;
|
|
42
|
+
/** Nederkantens avstånd. Om satt går före spacing. 0–14 mappar till var(--spacing-N), annars valfritt CSS-värde. */
|
|
43
|
+
spacingBottom: undefined;
|
|
44
|
+
/** Vänsterkantens avstånd. 0–14 mappar till var(--spacing-N), annars valfritt CSS-värde. */
|
|
45
|
+
spacingLeft: undefined;
|
|
46
|
+
/** Högerkantens avstånd. 0–14 mappar till var(--spacing-N), annars valfritt CSS-värde. */
|
|
47
|
+
spacingRight: undefined;
|
|
48
|
+
private _form;
|
|
49
|
+
private _formResetHandler;
|
|
50
|
+
private _initialValue;
|
|
51
|
+
private _initialValues;
|
|
52
|
+
private _customValidationMessage;
|
|
53
|
+
constructor();
|
|
54
|
+
static styles: import("lit").CSSResult;
|
|
55
|
+
connectedCallback(): void;
|
|
56
|
+
disconnectedCallback(): void;
|
|
57
|
+
firstUpdated(): void;
|
|
58
|
+
updated(changed: PropertyValues): void;
|
|
59
|
+
private onSlotClick;
|
|
60
|
+
private updateSegments;
|
|
61
|
+
/**
|
|
62
|
+
* Gör så att native formulär kan sätta disabled på kontrollen.
|
|
63
|
+
*/
|
|
64
|
+
formDisabledCallback(disabled: boolean): void;
|
|
65
|
+
private _getValidationMessage;
|
|
66
|
+
private _syncValidity;
|
|
67
|
+
checkValidity(): boolean;
|
|
68
|
+
reportValidity(): boolean;
|
|
69
|
+
setCustomValidity(message: string): void;
|
|
70
|
+
get validity(): ValidityState | undefined;
|
|
71
|
+
get validationMessage(): string;
|
|
72
|
+
get willValidate(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Synkar value/values → FormData via ElementInternals.
|
|
75
|
+
* single-select: FormData.get(name) → string
|
|
76
|
+
* multi-select: FormData.getAll(name) → string[]
|
|
77
|
+
*/
|
|
78
|
+
private _syncFormValue;
|
|
79
|
+
private mapSpacingToken;
|
|
80
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
81
|
+
}
|
|
82
|
+
declare global {
|
|
83
|
+
interface HTMLElementTagNameMap {
|
|
84
|
+
'scb-segmented-button': ScbSegmentedButton;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/ripple/ripple.js';
|
|
4
|
+
/**
|
|
5
|
+
* Komponentöversikt:
|
|
6
|
+
* - Ett segment i scb-segmented-button.
|
|
7
|
+
* - Har ingen egen publik size. Höjd, padding, gap, ikon och text ärvs via CSS-variabler från scb-segmented-button.
|
|
8
|
+
* - Publika exempel finns i komponentmappens component.story.mjs.
|
|
9
|
+
* - Styrpunkter och tokenbindningar finns i komponentens component.json.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ScbSegmentedItem extends LitElement {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
icon: string;
|
|
16
|
+
href: string;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
private get isEffectivelyDisabled();
|
|
19
|
+
private onHostKeydown;
|
|
20
|
+
private get hasDefaultSlotContent();
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
static styles: import("lit").CSSResult;
|
|
23
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
24
|
+
private updateInteractiveAttributes;
|
|
25
|
+
firstUpdated(): void;
|
|
26
|
+
disconnectedCallback(): void;
|
|
27
|
+
protected updated(changed: PropertyValues): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/ripple/ripple.js';
|
|
3
|
+
/**
|
|
4
|
+
* Option-element för scb-select.
|
|
5
|
+
* @slot - Texten som visas i optionen
|
|
6
|
+
*/
|
|
7
|
+
export declare class ScbSelectOption extends LitElement {
|
|
8
|
+
value: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
showCheckbox: boolean;
|
|
11
|
+
checked: boolean;
|
|
12
|
+
showRadio: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
noHighlightSelected: boolean;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
updated(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
static styles: import("lit").CSSResult;
|
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import './scb-select-option.js';
|
|
3
|
+
import '@material/web/icon/icon.js';
|
|
4
|
+
import '../scb-chevron/scb-chevron.js';
|
|
5
|
+
import '../scb-icon-button/scb-icon-button.js';
|
|
6
|
+
import '../scb-tooltip/scb-tooltip.js';
|
|
7
|
+
export declare class ScbSelect extends LitElement {
|
|
8
|
+
private _optionsObserver;
|
|
9
|
+
static formAssociated: boolean;
|
|
10
|
+
private _internals;
|
|
11
|
+
constructor();
|
|
12
|
+
focusedIndex: number;
|
|
13
|
+
variant: 'single-select' | 'multi-select';
|
|
14
|
+
value: string;
|
|
15
|
+
values: string[];
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
required: boolean;
|
|
18
|
+
error: boolean;
|
|
19
|
+
open: boolean;
|
|
20
|
+
label: string;
|
|
21
|
+
name: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
supportingText: string;
|
|
24
|
+
errorText: string;
|
|
25
|
+
helpText: string;
|
|
26
|
+
helpLabel: string;
|
|
27
|
+
withRadiobuttons: boolean;
|
|
28
|
+
noHighlightSelected: boolean;
|
|
29
|
+
size: 'extra-small' | 'small' | 'medium' | 'large';
|
|
30
|
+
spacing: undefined;
|
|
31
|
+
spacingTop: undefined;
|
|
32
|
+
spacingBottom: undefined;
|
|
33
|
+
spacingLeft: undefined;
|
|
34
|
+
spacingRight: undefined;
|
|
35
|
+
zIndex: undefined;
|
|
36
|
+
private _form;
|
|
37
|
+
private _formResetHandler;
|
|
38
|
+
private _formSubmitHandler;
|
|
39
|
+
private _initialValue;
|
|
40
|
+
private _initialValues;
|
|
41
|
+
private _customValidationMessage;
|
|
42
|
+
private _validationMessage;
|
|
43
|
+
private _hasValidationBeenReported;
|
|
44
|
+
private _selectId;
|
|
45
|
+
private _placementFrame;
|
|
46
|
+
private _optionsPlacement;
|
|
47
|
+
private _activeDescendant;
|
|
48
|
+
private _syncDensityForSize;
|
|
49
|
+
static styles: import("lit").CSSResult;
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
private _getMultiValues;
|
|
53
|
+
private _mapSpacingToken;
|
|
54
|
+
private _applySpacing;
|
|
55
|
+
private _onDocumentClick;
|
|
56
|
+
private _setOpen;
|
|
57
|
+
private _toggleOpen;
|
|
58
|
+
private _focusTrigger;
|
|
59
|
+
private _getOptions;
|
|
60
|
+
private _ensureOptionIds;
|
|
61
|
+
private _getInitialFocusedIndex;
|
|
62
|
+
private _setFocusedIndex;
|
|
63
|
+
private _prepareOptionsScroll;
|
|
64
|
+
private _moveFocusedIndex;
|
|
65
|
+
private _getFocusedOption;
|
|
66
|
+
private _scheduleOptionsPlacement;
|
|
67
|
+
private _updateOptionsPlacement;
|
|
68
|
+
private _syncOptionsPopover;
|
|
69
|
+
private _resetOptionsPlacement;
|
|
70
|
+
private _hasMoreThanFourOptions;
|
|
71
|
+
private _selectOption;
|
|
72
|
+
private _onSlotClick;
|
|
73
|
+
private _getOptionLabel;
|
|
74
|
+
private _getSelectedLabel;
|
|
75
|
+
firstUpdated(): void;
|
|
76
|
+
updated(changedProperties: PropertyValues): void;
|
|
77
|
+
private _syncFormValue;
|
|
78
|
+
private _getValidationMessage;
|
|
79
|
+
private _syncValidity;
|
|
80
|
+
checkValidity(): boolean;
|
|
81
|
+
reportValidity(): boolean;
|
|
82
|
+
setCustomValidity(message: string): void;
|
|
83
|
+
get form(): HTMLFormElement | null;
|
|
84
|
+
get validity(): ValidityState | undefined;
|
|
85
|
+
get validationMessage(): string;
|
|
86
|
+
get willValidate(): boolean;
|
|
87
|
+
get labels(): NodeList | undefined;
|
|
88
|
+
private _updateOptionsChecked;
|
|
89
|
+
private _renderLabel;
|
|
90
|
+
private _renderSupportingText;
|
|
91
|
+
private _getVisibleSupportingText;
|
|
92
|
+
render(): TemplateResult<1>;
|
|
93
|
+
private _onKeyDown;
|
|
94
|
+
private _onOptionKeyDown;
|
|
95
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Enkel skeleton loader för att visa platshållare vid laddning.
|
|
4
|
+
*
|
|
5
|
+
* @property {'rectangular' | 'rounded' | 'circular'} variant - Form på platshållaren.
|
|
6
|
+
* @property {string} width - Bredd på skeleton, till exempel px, rem eller %.
|
|
7
|
+
* @property {string} height - Höjd på skeleton, till exempel px, rem eller %.
|
|
8
|
+
* @property {'small' | 'medium' | 'large'} border-size - Radiusnivå för variant="rounded".
|
|
9
|
+
* @property {string} assistive-text - Text för skärmläsare när laddningen ska annonseras.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ScbSkeleton extends LitElement {
|
|
12
|
+
variant: 'rectangular' | 'rounded' | 'circular';
|
|
13
|
+
width: string;
|
|
14
|
+
height: string;
|
|
15
|
+
borderSize: 'small' | 'medium' | 'large' | '';
|
|
16
|
+
assistiveText: string;
|
|
17
|
+
private _managedAriaHidden;
|
|
18
|
+
private _managedRole;
|
|
19
|
+
private _managedAriaLive;
|
|
20
|
+
private _managedAriaLabel;
|
|
21
|
+
spacing: undefined;
|
|
22
|
+
spacingTop: undefined;
|
|
23
|
+
spacingBottom: undefined;
|
|
24
|
+
spacingLeft: undefined;
|
|
25
|
+
spacingRight: undefined;
|
|
26
|
+
static styles: import("lit").CSSResult;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
private mapSpacingToken;
|
|
29
|
+
private applySpacing;
|
|
30
|
+
private clearManagedAccessibility;
|
|
31
|
+
private syncAccessibility;
|
|
32
|
+
private getRoundedRadius;
|
|
33
|
+
protected firstUpdated(_changed: PropertyValues): void;
|
|
34
|
+
protected updated(changed: PropertyValues): void;
|
|
35
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '@material/web/slider/slider.js';
|
|
3
|
+
export declare class ScbSlider extends LitElement {
|
|
4
|
+
static formAssociated: boolean;
|
|
5
|
+
private _internals;
|
|
6
|
+
private _customValidationMessage;
|
|
7
|
+
private _validationMessage;
|
|
8
|
+
private _hasValidationBeenReported;
|
|
9
|
+
private _hasCapturedInitialValues;
|
|
10
|
+
private _initialValue;
|
|
11
|
+
private _initialValueStart;
|
|
12
|
+
private _initialValueEnd;
|
|
13
|
+
private readonly _errorTextId;
|
|
14
|
+
ticks: boolean;
|
|
15
|
+
step: number;
|
|
16
|
+
value: number;
|
|
17
|
+
range: boolean;
|
|
18
|
+
valueStart: number;
|
|
19
|
+
valueEnd: number;
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
labeled: boolean;
|
|
23
|
+
valueLabel?: string;
|
|
24
|
+
valueLabelStart?: string;
|
|
25
|
+
valueLabelEnd?: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
name: string;
|
|
28
|
+
nameStart?: string;
|
|
29
|
+
nameEnd?: string;
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
ariaLabelStart: string;
|
|
32
|
+
ariaLabelEnd: string;
|
|
33
|
+
error: boolean;
|
|
34
|
+
errorText: string;
|
|
35
|
+
constructor();
|
|
36
|
+
static styles: import("lit").CSSResult;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
39
|
+
formDisabledCallback(disabled: boolean): void;
|
|
40
|
+
formResetCallback(): void;
|
|
41
|
+
private _captureInitialValues;
|
|
42
|
+
private _toFiniteNumber;
|
|
43
|
+
private _bounds;
|
|
44
|
+
private _clampToBounds;
|
|
45
|
+
private _normalizeValues;
|
|
46
|
+
private _syncFormValue;
|
|
47
|
+
private _syncValidity;
|
|
48
|
+
checkValidity(): boolean;
|
|
49
|
+
reportValidity(): boolean;
|
|
50
|
+
setCustomValidity(message: string): void;
|
|
51
|
+
get form(): HTMLFormElement | null;
|
|
52
|
+
get validity(): ValidityState | undefined;
|
|
53
|
+
get validationMessage(): string;
|
|
54
|
+
get willValidate(): boolean;
|
|
55
|
+
get labels(): NodeList | undefined;
|
|
56
|
+
private _onInput;
|
|
57
|
+
private _onChange;
|
|
58
|
+
render(): TemplateResult;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface HTMLElementTagNameMap {
|
|
62
|
+
'scb-slider': ScbSlider;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../scb-icon-button/scb-icon-button.js';
|
|
3
|
+
import '../scb-button/scb-button.js';
|
|
4
|
+
export declare class ScbSnackbar extends LitElement {
|
|
5
|
+
message: string;
|
|
6
|
+
open: boolean;
|
|
7
|
+
actionText: string;
|
|
8
|
+
showClose: boolean;
|
|
9
|
+
closeLabel: string;
|
|
10
|
+
fixed: boolean;
|
|
11
|
+
fadeout: boolean;
|
|
12
|
+
withLongerAction: boolean;
|
|
13
|
+
spacing: undefined;
|
|
14
|
+
spacingTop: undefined;
|
|
15
|
+
spacingBottom: undefined;
|
|
16
|
+
spacingLeft: undefined;
|
|
17
|
+
spacingRight: undefined;
|
|
18
|
+
private _fadeoutTimer;
|
|
19
|
+
static styles: import("lit").CSSResult;
|
|
20
|
+
private mapSpacingToken;
|
|
21
|
+
private applySpacing;
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
private handleAction;
|
|
25
|
+
private handleClose;
|
|
26
|
+
updated(changedProps: Map<string, unknown>): void;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
}
|