scb-wc 0.1.64 → 0.1.65

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.
@@ -0,0 +1,94 @@
1
+ export * from './scb-accordion/scb-accordion-item';
2
+ export * from './scb-accordion/scb-accordion';
3
+ export * from './scb-app-bar/scb-app-bar';
4
+ export * from './scb-avatar/scb-avatar';
5
+ export * from './scb-badge/scb-badge';
6
+ export * from './scb-breadcrumb/scb-breadcrumb-item';
7
+ export * from './scb-breadcrumb/scb-breadcrumb';
8
+ export * from './scb-button/scb-button';
9
+ export * from './scb-calendar/scb-calendar-event';
10
+ export * from './scb-calendar/scb-calendar';
11
+ export * from './scb-calendar-card/scb-calendar-card';
12
+ export * from './scb-card/scb-action-card';
13
+ export * from './scb-card/scb-card';
14
+ export * from './scb-card/scb-container-card';
15
+ export * from './scb-card/scb-link-card';
16
+ export * from './scb-card/scb-list-card';
17
+ export * from './scb-card/scb-social-card';
18
+ export * from './scb-checkbox/scb-checkbox-group';
19
+ export * from './scb-checkbox/scb-checkbox';
20
+ export * from './scb-chevron/scb-chevron';
21
+ export * from './scb-chip/scb-chip';
22
+ export * from './scb-collapse/scb-collapse';
23
+ export * from './scb-cookies-consent/scb-cookies-consent';
24
+ export * from './scb-datepicker/scb-datepicker';
25
+ export * from './scb-dialog/scb-dialog';
26
+ export * from './scb-divider/scb-divider';
27
+ export * from './scb-drawer/scb-drawer';
28
+ export * from './scb-drop-zone/scb-drop-zone';
29
+ export * from './scb-dropdown/scb-dropdown';
30
+ export * from './scb-fab/scb-fab';
31
+ export * from './scb-fact-card/scb-fact-card-content';
32
+ export * from './scb-fact-card/scb-fact-card';
33
+ export * from './scb-footer/scb-footer-section';
34
+ export * from './scb-footer/scb-footer';
35
+ export * from './scb-gallery-grid/scb-gallery-grid';
36
+ export * from './scb-grid/scb-grid-item';
37
+ export * from './scb-grid/scb-grid';
38
+ export * from './scb-grid/scb-stack';
39
+ export * from './scb-header/scb-header-menu-group';
40
+ export * from './scb-header/scb-header-menu-item';
41
+ export * from './scb-header/scb-header-tab';
42
+ export * from './scb-header/scb-header-utility';
43
+ export * from './scb-header/scb-header';
44
+ export * from './scb-horizontal-scroller/scb-horizontal-scroller';
45
+ export * from './scb-icon-button/scb-icon-button';
46
+ export * from './scb-keyfigure-card/scb-keyfigure-card';
47
+ export * from './scb-link/scb-link';
48
+ export * from './scb-list/scb-list-item';
49
+ export * from './scb-list/scb-list';
50
+ export * from './scb-menu/scb-menu-item';
51
+ export * from './scb-menu/scb-menu-section';
52
+ export * from './scb-menu/scb-menu';
53
+ export * from './scb-menu/scb-sub-menu';
54
+ export * from './scb-nav/scb-nav-item';
55
+ export * from './scb-nav/scb-nav';
56
+ export * from './scb-notification-card/scb-notification-card';
57
+ export * from './scb-options-menu/scb-options-menu-item';
58
+ export * from './scb-options-menu/scb-options-menu';
59
+ export * from './scb-options-menu/scb-options-sub-menu';
60
+ export * from './scb-overlay/scb-overlay';
61
+ export * from './scb-pagination/scb-pagination';
62
+ export * from './scb-progress-indicator/scb-progress-indicator';
63
+ export * from './scb-progress-stepper/scb-progress-step';
64
+ export * from './scb-progress-stepper/scb-progress-stepper';
65
+ export * from './scb-radio-button/scb-radio-button';
66
+ export * from './scb-radio-button/scb-radio-group';
67
+ export * from './scb-scrollspy/scb-scrollspy';
68
+ export * from './scb-search/scb-search';
69
+ export * from './scb-segmented-button/scb-segmented-button';
70
+ export * from './scb-segmented-button/scb-segmented-item';
71
+ export * from './scb-select/scb-select-option';
72
+ export * from './scb-select/scb-select';
73
+ export * from './scb-skeleton/scb-skeleton';
74
+ export * from './scb-slider/scb-slider';
75
+ export * from './scb-snackbar/scb-snackbar';
76
+ export * from './scb-status-pill/scb-status-pill';
77
+ export * from './scb-stepper/scb-step';
78
+ export * from './scb-stepper/scb-stepper';
79
+ export * from './scb-switch/scb-switch';
80
+ export * from './scb-table/scb-table';
81
+ export * from './scb-table-advanced/scb-table-advanced';
82
+ export * from './scb-tabs/scb-primary-tab';
83
+ export * from './scb-tabs/scb-secondary-tab';
84
+ export * from './scb-tabs/scb-tabs';
85
+ export * from './scb-textfield/scb-textfield';
86
+ export * from './scb-toc/scb-toc-item';
87
+ export * from './scb-toc/scb-toc';
88
+ export * from './scb-tooltip/scb-tooltip';
89
+ export * from './scb-viz/scb-viz-actions-runtime';
90
+ export * from './scb-viz/scb-viz-print-runtime';
91
+ export * from './scb-viz/scb-viz-series-differentiation-registry';
92
+ export * from './scb-viz/scb-viz-series-differentiation-runtime';
93
+ export * from './scb-viz/scb-viz-table-runtime';
94
+ export * from './scb-viz/scb-viz';
@@ -0,0 +1,11 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class ScbChevron extends LitElement {
3
+ open: boolean;
4
+ static styles: import('lit').CSSResult;
5
+ render(): import('lit-html').TemplateResult<1>;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'scb-chevron': ScbChevron;
10
+ }
11
+ }
@@ -0,0 +1,39 @@
1
+ import { LitElement, PropertyValues, TemplateResult } from 'lit';
2
+ export declare class ScbDatepicker extends LitElement {
3
+ private _currentDate;
4
+ private _selectedDate;
5
+ private _showMonthDropdown;
6
+ private _showYearDropdown;
7
+ variant: 'datetime-local' | 'date';
8
+ lang: 'sv' | 'en';
9
+ selectedValue: string;
10
+ open: boolean;
11
+ private _selectedHour;
12
+ private _selectedMinute;
13
+ private readonly _viewportMargin;
14
+ private readonly _popupOffset;
15
+ private _onWindowReposition;
16
+ private _isRenderedInsideDialog;
17
+ private _positionPopupWithinViewport;
18
+ static styles: import('lit').CSSResult[];
19
+ updated(changed: PropertyValues): void;
20
+ disconnectedCallback(): void;
21
+ private _monthNames;
22
+ render(): TemplateResult;
23
+ private _getMonthDays;
24
+ private _outsideClickHandler;
25
+ private _toggleMonthDropdown;
26
+ private _toggleYearDropdown;
27
+ private _onMonthChangeCustom;
28
+ private _onYearChangeCustom;
29
+ private _prevMonth;
30
+ private _prevYear;
31
+ private _nextMonth;
32
+ private _nextYear;
33
+ private _isToday;
34
+ private _isSelected;
35
+ private _selectDate;
36
+ private _fireDateTimeChange;
37
+ private _onTimeChange;
38
+ private _close;
39
+ }
@@ -467,3 +467,4 @@ var s = class extends t {
467
467
  };
468
468
  e([o()], s.prototype, "_currentDate", void 0), e([o()], s.prototype, "_selectedDate", void 0), e([o()], s.prototype, "_showMonthDropdown", void 0), e([o()], s.prototype, "_showYearDropdown", void 0), e([a({ type: String })], s.prototype, "variant", void 0), e([a({ type: String })], s.prototype, "lang", void 0), e([a({ type: String })], s.prototype, "selectedValue", void 0), e([a({ type: Boolean })], s.prototype, "open", void 0), e([o()], s.prototype, "_selectedHour", void 0), e([o()], s.prototype, "_selectedMinute", void 0), s = e([i("scb-datepicker")], s);
469
469
  //#endregion
470
+ export { s as ScbDatepicker };
@@ -3,7 +3,7 @@ import "../scb-icon-button/scb-icon-button.js";
3
3
  import { LitElement as t, css as n, html as r } from "lit";
4
4
  import { customElement as i, property as a } from "lit/decorators.js";
5
5
  //#region src/scb-components/scb-table/scb-table.ts
6
- var o = 88, s = 16, c = class extends t {
6
+ var o = 96, s = 32, c = class extends t {
7
7
  constructor(...e) {
8
8
  super(...e), this.dataSorting = !1, this.columnWidthMode = "auto", this._sortedColumn = null, this._sortDirection = "asc", this._columnWidthFrame = null, this._onSlotChange = () => {
9
9
  this._attachThListeners();
@@ -105,7 +105,7 @@ var o = 88, s = 16, c = class extends t {
105
105
  }), n.forEach((e) => {
106
106
  e.style.borderTop = "1px solid var(--md-sys-color-on-surface)";
107
107
  }), r.forEach((e, t) => {
108
- e.style.textAlign = "left", e.style.padding = "12px", e.style.position = "relative", e.style.backgroundColor = "var(--md-sys-color-surface)", e.style.fontFamily = "var(--md-sys-typescale-label-medium-font)", e.style.fontSize = "var(--md-sys-typescale-label-medium-size)", e.style.lineHeight = "var(--md-sys-typescale-label-medium-line-height)", e.style.fontWeight = " var(--weight-bold)", e.style.letterSpacing = "var(--md-sys-typescale-label-medium-tracking)", e.style.verticalAlign = "bottom", e.style.borderRight = "1px solid var(--md-sys-color-on-surface)", e.style.borderBottom = "1px solid var(--md-sys-color-on-surface)";
108
+ e.style.textAlign = "left", e.style.padding = "12px", e.style.position = "relative", e.style.backgroundColor = "var(--md-sys-color-surface)", e.style.fontFamily = "var(--md-sys-typescale-label-medium-font)", e.style.fontSize = "var(--md-sys-typescale-label-medium-size)", e.style.lineHeight = "var(--md-sys-typescale-label-medium-line-height)", e.style.fontWeight = " var(--weight-bold)", e.style.letterSpacing = "var(--md-sys-typescale-label-medium-tracking)", e.style.verticalAlign = "bottom", e.style.borderRight = "1px solid var(--md-sys-color-on-surface)", e.style.borderBottom = "1px solid var(--md-sys-color-on-surface)", e.style.overflowWrap = "normal", e.style.wordBreak = "normal", e.style.hyphens = "manual";
109
109
  let n = (e.textContent ?? "").replace(/\s+/g, " ").trim();
110
110
  for (; e.firstChild;) e.removeChild(e.firstChild);
111
111
  let r = document.createElement("p");
@@ -116,7 +116,7 @@ var o = 88, s = 16, c = class extends t {
116
116
  i.style.display = "flex", i.style.gap = "8px", i.style.flexWrap = "nowrap", i.style.alignItems = "center", i.appendChild(r), i.appendChild(n), e.appendChild(i);
117
117
  } else e.appendChild(r);
118
118
  }), i.forEach((e) => {
119
- e.style.padding = "12px", e.style.textAlign = "left", e.style.borderTop = "1px solid var(--md-sys-color-outline-variant)", e.style.verticalAlign = "text-top", e.style.backgroundColor = "var(--md-sys-color-surface)", e.style.fontFamily = "var(--md-sys-typescale-body-medium-font)", e.style.fontSize = "var(--md-sys-typescale-body-medium-size)", e.style.lineHeight = "var(--md-sys-typescale-body-medium-line-height)", e.style.fontWeight = "var(--md-sys-typescale-body-medium-weight)", e.style.letterSpacing = "var(--md-sys-typescale-body-medium-tracking)", e.style.borderRight = "1px solid var(--md-sys-color-on-surface)", e.style.borderBottom = "1px solid var(--md-sys-color-on-surface)", e.style.overflowWrap = "break-word", e.style.wordBreak = "normal", e.style.hyphens = "manual";
119
+ e.style.padding = "12px", e.style.textAlign = "left", e.style.borderTop = "1px solid var(--md-sys-color-outline-variant)", e.style.verticalAlign = "text-top", e.style.backgroundColor = "var(--md-sys-color-surface)", e.style.fontFamily = "var(--md-sys-typescale-body-medium-font)", e.style.fontSize = "var(--md-sys-typescale-body-medium-size)", e.style.lineHeight = "var(--md-sys-typescale-body-medium-line-height)", e.style.fontWeight = "var(--md-sys-typescale-body-medium-weight)", e.style.letterSpacing = "var(--md-sys-typescale-body-medium-tracking)", e.style.borderRight = "1px solid var(--md-sys-color-on-surface)", e.style.borderBottom = "1px solid var(--md-sys-color-on-surface)", e.style.overflowWrap = "normal", e.style.wordBreak = "normal", e.style.hyphens = "manual";
120
120
  }), a.forEach((e) => {
121
121
  let t = Array.from(e.cells);
122
122
  t.forEach((e, n) => {
@@ -163,8 +163,8 @@ var o = 88, s = 16, c = class extends t {
163
163
  e.firstElementChild || (t.textContent = e.textContent ?? "");
164
164
  let n = window.getComputedStyle(e), r = document.createElement("div");
165
165
  r.style.position = "absolute", r.style.left = "-99999px", r.style.top = "0", r.style.visibility = "hidden", r.style.pointerEvents = "none", r.style.width = "max-content", r.style.maxWidth = "none", r.style.whiteSpace = "nowrap", r.style.fontFamily = n.fontFamily, r.style.fontSize = n.fontSize, r.style.fontWeight = n.fontWeight, r.style.lineHeight = n.lineHeight, r.style.letterSpacing = n.letterSpacing, t instanceof HTMLElement && (t.style.width = "max-content", t.style.maxWidth = "none", t.style.whiteSpace = "nowrap"), r.appendChild(t), document.body.appendChild(r);
166
- let i = parseFloat(n.paddingLeft || "0"), a = parseFloat(n.paddingRight || "0"), o = r.getBoundingClientRect().width + i + a;
167
- return document.body.removeChild(r), o;
166
+ let i = parseFloat(n.paddingLeft || "0"), a = parseFloat(n.paddingRight || "0"), o = parseFloat(n.borderLeftWidth || "0"), s = parseFloat(n.borderRightWidth || "0"), c = r.getBoundingClientRect().width + i + a + o + s;
167
+ return document.body.removeChild(r), c;
168
168
  }
169
169
  _measureColumnReadableBodyWidth(e, t) {
170
170
  return Array.from(e.querySelectorAll("tbody tr")).reduce((e, n) => {
@@ -177,8 +177,8 @@ var o = 88, s = 16, c = class extends t {
177
177
  _measureCellTextWidth(e, t) {
178
178
  let n = window.getComputedStyle(e), r = document.createElement("span");
179
179
  r.textContent = t, r.style.position = "absolute", r.style.left = "-99999px", r.style.top = "0", r.style.visibility = "hidden", r.style.pointerEvents = "none", r.style.whiteSpace = "nowrap", r.style.fontFamily = n.fontFamily, r.style.fontSize = n.fontSize, r.style.fontWeight = n.fontWeight, r.style.lineHeight = n.lineHeight, r.style.letterSpacing = n.letterSpacing, document.body.appendChild(r);
180
- let i = parseFloat(n.paddingLeft || "0"), a = parseFloat(n.paddingRight || "0"), o = r.getBoundingClientRect().width + i + a;
181
- return document.body.removeChild(r), o;
180
+ let i = parseFloat(n.paddingLeft || "0"), a = parseFloat(n.paddingRight || "0"), o = parseFloat(n.borderLeftWidth || "0"), s = parseFloat(n.borderRightWidth || "0"), c = r.getBoundingClientRect().width + i + a + o + s;
181
+ return document.body.removeChild(r), c;
182
182
  }
183
183
  _onThClick(e) {
184
184
  this.dataSorting && (this._sortedColumn === e ? this._sortDirection = this._sortDirection === "asc" ? "desc" : "asc" : (this._sortedColumn = e, this._sortDirection = "asc"), this._sortTable(e, this._sortDirection), this._attachThListeners(), this.dispatchEvent(new CustomEvent("tablesortchange", {