@skf-design-system/ui-components 1.0.2-beta.16 → 1.0.2-beta.18

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.
@@ -6,7 +6,7 @@ const e = class e extends t {
6
6
  }
7
7
  /** @internal */
8
8
  addEventListeners(i) {
9
- i.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
9
+ i.addEventListener(this.triggerEvent, this.open, { signal: this._signal });
10
10
  }
11
11
  };
12
12
  e.styles = [t.styles, a];
@@ -0,0 +1,40 @@
1
+ import '../icon/icon.js';
2
+ import { SkfElement } from '../../internal/components/skf-element.js';
3
+ import { type Language } from '../../utilities/localize.js';
4
+ import { type CSSResultGroup } from 'lit';
5
+ /**
6
+ * The `<skf-pagination>` is a component that displays a list of actions or options
7
+ *
8
+ * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
9
+ *
10
+ * @tagname skf-pagination
11
+ */
12
+ export declare class SkfPagination extends SkfElement {
13
+ #private;
14
+ static styles: CSSResultGroup;
15
+ /** The number of items to display on each 'page' */
16
+ itemsPerPage: number;
17
+ /** Sets the internal language of the component */
18
+ lang: Language;
19
+ /** If true, hides both the delimiter and the total value */
20
+ noTotal: boolean;
21
+ /** The active page number. */
22
+ page: number;
23
+ /** The total number of items being paginated. */
24
+ total: number;
25
+ /** @internal Event that triggers when user selects previous or next page. Fires 'change' event. */
26
+ _handlePageChange(page: number): void;
27
+ /** @internal */
28
+ private _getPageStart;
29
+ /** @internal */
30
+ private _getPageEnd;
31
+ /** @internal */
32
+ private get _disabledNext();
33
+ /** @internal */
34
+ private get disabledPrev();
35
+ /** @internal */
36
+ private _handlePrev;
37
+ /** @internal */
38
+ private _handleNext;
39
+ render(): import("lit").TemplateResult<1>;
40
+ }
@@ -0,0 +1,101 @@
1
+ var m = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var c = (e, a, t) => a.has(e) || m("Cannot " + t);
5
+ var l = (e, a, t) => (c(e, a, "read from private field"), t ? t.call(e) : a.get(e)), u = (e, a, t) => a.has(e) ? m("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t), P = (e, a, t, i) => (c(e, a, "write to private field"), i ? i.call(e, t) : a.set(e, t), t);
6
+ import "../icon/icon.js";
7
+ import { SkfElement as f } from "../../internal/components/skf-element.js";
8
+ import { componentStyles as _ } from "../../styles/component.styles.js";
9
+ import { LocalizeController as v } from "../../utilities/localize.js";
10
+ import { nothing as y, html as b } from "lit";
11
+ import { property as n } from "lit/decorators.js";
12
+ import { styles as $ } from "./pagination.styles.js";
13
+ var x = Object.defineProperty, h = (e, a, t, i) => {
14
+ for (var s = void 0, p = e.length - 1, d; p >= 0; p--)
15
+ (d = e[p]) && (s = d(a, t, s) || s);
16
+ return s && x(a, t, s), s;
17
+ }, r;
18
+ const g = class g extends f {
19
+ constructor() {
20
+ super(...arguments);
21
+ u(this, r);
22
+ P(this, r, new v(this)), this.itemsPerPage = 50, this.lang = "en", this.noTotal = !1, this.page = 1, this.total = 0, this._handlePrev = () => {
23
+ this.disabledPrev || this._handlePageChange(this.page - 1);
24
+ }, this._handleNext = () => {
25
+ this._disabledNext || this._handlePageChange(this.page + 1);
26
+ };
27
+ }
28
+ /** @internal Event that triggers when user selects previous or next page. Fires 'change' event. */
29
+ _handlePageChange(t) {
30
+ this.page = t, this.dispatchEvent(
31
+ new CustomEvent("page-change", {
32
+ detail: { page: t },
33
+ bubbles: !0,
34
+ composed: !0
35
+ })
36
+ );
37
+ }
38
+ /** @internal */
39
+ _getPageStart() {
40
+ const t = this.page, i = this.itemsPerPage;
41
+ return (t - 1) * i + 1;
42
+ }
43
+ /** @internal */
44
+ _getPageEnd() {
45
+ const t = this._getPageStart(), i = this.itemsPerPage, s = this.total;
46
+ return Math.min(t + i - 1, s);
47
+ }
48
+ /** @internal */
49
+ get _disabledNext() {
50
+ return this._getPageEnd() >= this.total;
51
+ }
52
+ /** @internal */
53
+ get disabledPrev() {
54
+ return this.page <= 1;
55
+ }
56
+ render() {
57
+ const t = this._getPageStart(), i = this._getPageEnd(), s = this.total;
58
+ return b`
59
+ <div id="root">
60
+ <span id="pager">${t} - ${i}</span>
61
+ ${this.noTotal ? y : b`<span id="delimiter">${l(this, r).term("of")} ${s}</span>`}
62
+ <button
63
+ @click=${this._handlePrev}
64
+ ?disabled=${this.disabledPrev}
65
+ aria-label=${l(this, r).term("previousPage")}
66
+ type="button"
67
+ >
68
+ <skf-icon data-color="custom" name="chevronLeft"></skf-icon>
69
+ </button>
70
+ <button
71
+ @click=${this._handleNext}
72
+ ?disabled=${this._disabledNext}
73
+ aria-label=${l(this, r).term("nextPage")}
74
+ type="button"
75
+ >
76
+ <skf-icon data-color="custom" name="chevronRight"></skf-icon>
77
+ </button>
78
+ </div>
79
+ `;
80
+ }
81
+ };
82
+ r = new WeakMap(), g.styles = [_, $];
83
+ let o = g;
84
+ h([
85
+ n({ type: Number, attribute: "items-per-page" })
86
+ ], o.prototype, "itemsPerPage");
87
+ h([
88
+ n({ type: String })
89
+ ], o.prototype, "lang");
90
+ h([
91
+ n({ type: Boolean, attribute: "no-total" })
92
+ ], o.prototype, "noTotal");
93
+ h([
94
+ n({ type: Number })
95
+ ], o.prototype, "page");
96
+ h([
97
+ n({ type: Number })
98
+ ], o.prototype, "total");
99
+ export {
100
+ o as SkfPagination
101
+ };
@@ -0,0 +1,8 @@
1
+ import { SkfPagination } from './pagination.component.js';
2
+ export * from './pagination.component.js';
3
+ export default SkfPagination;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'skf-pagination': SkfPagination;
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ import { SkfPagination as a } from "./pagination.component.js";
2
+ a.define("skf-pagination");
3
+ export {
4
+ a as SkfPagination,
5
+ a as default
6
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,50 @@
1
+ import { css as o } from "lit";
2
+ const t = o`
3
+ @layer components {
4
+ @layer base {
5
+ :host {
6
+ contain: layout;
7
+ }
8
+
9
+ #root {
10
+ --_skf-pagination-btn-color: var(--skf-icon-color-secondary);
11
+
12
+ align-items: center;
13
+ display: inline-flex;
14
+ }
15
+
16
+ #pager {
17
+ font-weight: var(--skf-font-weight-bold);
18
+ }
19
+
20
+ #delimiter {
21
+ margin-inline: var(--skf-spacing-25);
22
+ }
23
+
24
+ button {
25
+ border-radius: var(--skf-border-radius-sm);
26
+ color: var(--_skf-pagination-btn-color);
27
+ display: flex;
28
+ margin-inline-start: var(--skf-spacing-50);
29
+ place-content: center;
30
+ }
31
+ }
32
+
33
+ @layer states {
34
+ button:focus-visible {
35
+ outline: var(--skf-border-width-md) solid var(--skf-interactive-border-color-focus);
36
+ }
37
+
38
+ button:disabled {
39
+ --_skf-pagination-btn-color: var(--skf-interactive-icon-color-disabled);
40
+ }
41
+
42
+ button:not(:disabled):hover {
43
+ background-color: var(--skf-interactive-bg-color-secondary-hover);
44
+ }
45
+ }
46
+ }
47
+ `;
48
+ export {
49
+ t as styles
50
+ };
@@ -16,7 +16,7 @@ const n = class n extends h {
16
16
  }
17
17
  /** @internal */
18
18
  addEventListeners(r) {
19
- r.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
19
+ r.addEventListener(this.triggerEvent, this.open, { signal: this._signal });
20
20
  }
21
21
  };
22
22
  n.styles = [h.styles, w];
@@ -55,8 +55,8 @@ export declare class SkfSelect extends FormBase {
55
55
  set selectedValues(values: string[]);
56
56
  get selectedValues(): string[];
57
57
  /** A readonly property that returns the selected slot(s) text content in a array */
58
- set selectedOptionsText(values: string[]);
59
- get selectedOptionsText(): string[];
58
+ set selectedOptionsText(values: (string | null)[]);
59
+ get selectedOptionsText(): (string | null)[];
60
60
  /** If defined, displays provided label */
61
61
  label?: string;
62
62
  /** Sets the internal language of the component */
@@ -258,7 +258,7 @@ const f = class f extends L {
258
258
  ${this.selectedOptions.map(
259
259
  (t) => p`
260
260
  <skf-tag
261
- style="${`view-transition-name: tag-${t.textContent.replace(/[^a-zA-Z]/g, "").toLowerCase()}`}"
261
+ style="${`view-transition-name: tag-${t.textContent}-${t.value.replace(/[^a-zA-Z]/g, "").toLowerCase()}`}"
262
262
  removable
263
263
  .callbackOnRemove=${(e) => (e.stopPropagation(), e.preventDefault(), document.startViewTransition || t.removeAttribute("selected"), document.startViewTransition(() => {
264
264
  t.removeAttribute("selected");
@@ -14,13 +14,13 @@ const e = class e extends t {
14
14
  () => {
15
15
  this.close("blur");
16
16
  },
17
- { signal: this.signal }
18
- ), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener(
17
+ { signal: this._signal }
18
+ ), s.addEventListener("focus", this.open, { signal: this._signal }), s.addEventListener("mouseenter", this.open, { signal: this._signal }), s.addEventListener(
19
19
  "mouseleave",
20
20
  () => {
21
21
  this.close("mouseleave");
22
22
  },
23
- { signal: this.signal }
23
+ { signal: this._signal }
24
24
  );
25
25
  }
26
26
  };
@@ -4856,6 +4856,155 @@
4856
4856
  ],
4857
4857
  "typeDefinitionPath": "components/menu/menu.d.ts"
4858
4858
  },
4859
+ {
4860
+ "kind": "javascript-module",
4861
+ "path": "components/pagination/pagination.js",
4862
+ "declarations": [
4863
+ {
4864
+ "kind": "class",
4865
+ "description": "The `<skf-pagination>` is a component that displays a list of actions or options",
4866
+ "name": "SkfPagination",
4867
+ "members": [
4868
+ {
4869
+ "kind": "field",
4870
+ "name": "#localize",
4871
+ "privacy": "private",
4872
+ "readonly": true,
4873
+ "default": "new LocalizeController(this)"
4874
+ },
4875
+ {
4876
+ "kind": "field",
4877
+ "name": "itemsPerPage",
4878
+ "type": {
4879
+ "text": "number"
4880
+ },
4881
+ "default": "50",
4882
+ "description": "The number of items to display on each 'page'",
4883
+ "attribute": "items-per-page"
4884
+ },
4885
+ {
4886
+ "kind": "field",
4887
+ "name": "lang",
4888
+ "type": {
4889
+ "text": "Language"
4890
+ },
4891
+ "default": "'en'",
4892
+ "description": "Sets the internal language of the component",
4893
+ "attribute": "lang",
4894
+ "expandedType": {
4895
+ "text": "'en' | 'es' | 'pt' | 'sv'"
4896
+ }
4897
+ },
4898
+ {
4899
+ "kind": "field",
4900
+ "name": "noTotal",
4901
+ "type": {
4902
+ "text": "boolean"
4903
+ },
4904
+ "default": "false",
4905
+ "description": "If true, hides both the delimiter and the total value",
4906
+ "attribute": "no-total"
4907
+ },
4908
+ {
4909
+ "kind": "field",
4910
+ "name": "page",
4911
+ "type": {
4912
+ "text": "number"
4913
+ },
4914
+ "default": "1",
4915
+ "description": "The active page number.",
4916
+ "attribute": "page"
4917
+ },
4918
+ {
4919
+ "kind": "field",
4920
+ "name": "total",
4921
+ "type": {
4922
+ "text": "number"
4923
+ },
4924
+ "default": "0",
4925
+ "description": "The total number of items being paginated.",
4926
+ "attribute": "total"
4927
+ }
4928
+ ],
4929
+ "events": [
4930
+ {
4931
+ "name": "page-change",
4932
+ "type": {
4933
+ "text": "CustomEvent"
4934
+ }
4935
+ }
4936
+ ],
4937
+ "attributes": [
4938
+ {
4939
+ "name": "items-per-page",
4940
+ "type": {
4941
+ "text": "number"
4942
+ },
4943
+ "default": "50",
4944
+ "description": "The number of items to display on each 'page'",
4945
+ "fieldName": "itemsPerPage"
4946
+ },
4947
+ {
4948
+ "name": "lang",
4949
+ "type": {
4950
+ "text": "Language"
4951
+ },
4952
+ "default": "'en'",
4953
+ "description": "Sets the internal language of the component",
4954
+ "fieldName": "lang",
4955
+ "expandedType": {
4956
+ "text": "'en' | 'es' | 'pt' | 'sv'"
4957
+ }
4958
+ },
4959
+ {
4960
+ "name": "no-total",
4961
+ "type": {
4962
+ "text": "boolean"
4963
+ },
4964
+ "default": "false",
4965
+ "description": "If true, hides both the delimiter and the total value",
4966
+ "fieldName": "noTotal"
4967
+ },
4968
+ {
4969
+ "name": "page",
4970
+ "type": {
4971
+ "text": "number"
4972
+ },
4973
+ "default": "1",
4974
+ "description": "The active page number.",
4975
+ "fieldName": "page"
4976
+ },
4977
+ {
4978
+ "name": "total",
4979
+ "type": {
4980
+ "text": "number"
4981
+ },
4982
+ "default": "0",
4983
+ "description": "The total number of items being paginated.",
4984
+ "fieldName": "total"
4985
+ }
4986
+ ],
4987
+ "superclass": {
4988
+ "name": "SkfElement",
4989
+ "package": "@internal/components/skf-element.js"
4990
+ },
4991
+ "tagName": "skf-pagination",
4992
+ "customElement": true,
4993
+ "modulePath": "src/components/pagination/pagination.component.ts"
4994
+ }
4995
+ ],
4996
+ "exports": [
4997
+ {
4998
+ "kind": "js",
4999
+ "name": "SkfPagination",
5000
+ "declaration": {
5001
+ "name": "SkfPagination",
5002
+ "module": "src/components/pagination/pagination.component.ts"
5003
+ }
5004
+ }
5005
+ ],
5006
+ "typeDefinitionPath": "components/pagination/pagination.d.ts"
5007
+ },
4859
5008
  {
4860
5009
  "kind": "javascript-module",
4861
5010
  "path": "components/popover/popover.js",
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export { default as SkfMenuItem } from './components/menu/menu-item.js';
23
23
  export { default as SkfMenu } from './components/menu/menu.js';
24
24
  export { default as SkfNavItem } from './components/nav/nav-item.js';
25
25
  export { default as SkfNav } from './components/nav/nav.js';
26
+ export { default as SkfPagination } from './components/pagination/pagination.js';
26
27
  export { default as SkfPopover } from './components/popover/popover.js';
27
28
  export { default as SkfProgress } from './components/progress/progress.js';
28
29
  export { default as SkfRadio } from './components/radio/radio.js';
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import "./components/menu/menu-item.js";
23
23
  import "./components/menu/menu.js";
24
24
  import "./components/nav/nav-item.js";
25
25
  import "./components/nav/nav.js";
26
+ import "./components/pagination/pagination.js";
26
27
  import "./components/popover/popover.js";
27
28
  import "./components/progress/progress.js";
28
29
  import "./components/radio/radio.js";
@@ -43,95 +44,97 @@ import "./components/toast/toast-item.js";
43
44
  import "./components/toast/toast-wrapper.js";
44
45
  import "./components/toast/toast.js";
45
46
  import "./components/tooltip/tooltip.js";
46
- import { SkfAccordionItem as U } from "./components/accordion/accordion-item.component.js";
47
- import { SkfAccordion as X } from "./components/accordion/accordion.component.js";
48
- import { SkfAlert as Z } from "./components/alert/alert.component.js";
49
- import { SkfBreadcrumbItem as $ } from "./components/breadcrumb/breadcrumb-item.component.js";
50
- import { SkfBreadcrumb as ro } from "./components/breadcrumb/breadcrumb.component.js";
51
- import { SkfButton as po } from "./components/button/button.component.js";
52
- import { SkfCard as eo } from "./components/card/card.component.js";
53
- import { SkfCheckbox as io } from "./components/checkbox/checkbox.component.js";
54
- import { SkfDatepickerCalendar as ko } from "./components/datepicker/datepicker-calendar.component.js";
55
- import { SkfDatepickerPopup as ao } from "./components/datepicker/datepicker-popup.component.js";
56
- import { SkfDatepicker as co } from "./components/datepicker/datepicker.component.js";
57
- import { SkfDialog as Io } from "./components/dialog/dialog.component.js";
47
+ import { SkfAccordionItem as V } from "./components/accordion/accordion-item.component.js";
48
+ import { SkfAccordion as Y } from "./components/accordion/accordion.component.js";
49
+ import { SkfAlert as _ } from "./components/alert/alert.component.js";
50
+ import { SkfBreadcrumbItem as oo } from "./components/breadcrumb/breadcrumb-item.component.js";
51
+ import { SkfBreadcrumb as to } from "./components/breadcrumb/breadcrumb.component.js";
52
+ import { SkfButton as mo } from "./components/button/button.component.js";
53
+ import { SkfCard as fo } from "./components/card/card.component.js";
54
+ import { SkfCheckbox as So } from "./components/checkbox/checkbox.component.js";
55
+ import { SkfDatepickerCalendar as xo } from "./components/datepicker/datepicker-calendar.component.js";
56
+ import { SkfDatepickerPopup as no } from "./components/datepicker/datepicker-popup.component.js";
57
+ import { SkfDatepicker as uo } from "./components/datepicker/datepicker.component.js";
58
+ import { SkfDialog as To } from "./components/dialog/dialog.component.js";
58
59
  import { SkfDivider as lo } from "./components/divider/divider.component.js";
59
- import { SkfDrawer as bo } from "./components/drawer/drawer.component.js";
60
- import { SkfHeader as Do } from "./components/header/header.component.js";
60
+ import { SkfDrawer as so } from "./components/drawer/drawer.component.js";
61
+ import { SkfHeader as Bo } from "./components/header/header.component.js";
61
62
  import { SkfHeading as vo } from "./components/heading/heading.component.js";
62
- import { SkfIcon as Po } from "./components/icon/icon.component.js";
63
- import { SkfInput as Lo } from "./components/input/input.component.js";
64
- import { SkfLink as wo } from "./components/link/link.component.js";
65
- import { SkfLoader as Mo } from "./components/loader/loader.component.js";
66
- import { SkfLogo as Oo } from "./components/logo/logo.component.js";
67
- import { SkfMenuItem as Ro } from "./components/menu/menu-item.component.js";
68
- import { SkfMenu as jo } from "./components/menu/menu.component.js";
69
- import { SkfNavItem as yo } from "./components/nav/nav-item.component.js";
70
- import { SkfNav as Eo } from "./components/nav/nav.component.js";
71
- import { SkfPopover as Jo } from "./components/popover/popover.component.js";
72
- import { SkfProgress as Qo } from "./components/progress/progress.component.js";
73
- import { SkfRadio as Vo } from "./components/radio/radio.component.js";
74
- import { SkfSegmentedButtonItem as Yo } from "./components/segmented-button/segmented-button-item.component.js";
75
- import { SkfSegmentedButton as _o } from "./components/segmented-button/segmented-button.component.js";
76
- import { SkfSelectOptionGroup as or } from "./components/select/select-option-group.component.js";
77
- import { SkfSelectOption as tr } from "./components/select/select-option.component.js";
78
- import { SkfSelect as mr } from "./components/select/select.component.js";
79
- import { SkfStepperItem as fr } from "./components/stepper/stepper-item.component.js";
80
- import { SkfStepper as Sr } from "./components/stepper/stepper.component.js";
81
- import { SkfSwitch as xr } from "./components/switch/switch.component.js";
82
- import { SkfTabPanel as nr } from "./components/tabs/tab-panel.component.js";
83
- import { SkfTab as dr } from "./components/tabs/tab.component.js";
84
- import { SkfTabs as Ir } from "./components/tabs/tabs.component.js";
85
- import { SkfTag as lr } from "./components/tag/tag.component.js";
86
- import { SkfTextArea as br } from "./components/textarea/textarea.component.js";
87
- import { SkfToastItem as Dr } from "./components/toast/toast-item.component.js";
88
- import { SkfToastWrapper as vr } from "./components/toast/toast-wrapper.component.js";
89
- import { SkfToast as Pr } from "./components/toast/toast.component.js";
90
- import { SkfTooltip as Lr } from "./components/tooltip/tooltip.component.js";
63
+ import { SkfIcon as Co } from "./components/icon/icon.component.js";
64
+ import { SkfInput as ho } from "./components/input/input.component.js";
65
+ import { SkfLink as Ho } from "./components/link/link.component.js";
66
+ import { SkfLoader as No } from "./components/loader/loader.component.js";
67
+ import { SkfLogo as Go } from "./components/logo/logo.component.js";
68
+ import { SkfMenuItem as Wo } from "./components/menu/menu-item.component.js";
69
+ import { SkfMenu as qo } from "./components/menu/menu.component.js";
70
+ import { SkfNavItem as zo } from "./components/nav/nav-item.component.js";
71
+ import { SkfNav as Fo } from "./components/nav/nav.component.js";
72
+ import { SkfPagination as Ko } from "./components/pagination/pagination.component.js";
73
+ import { SkfPopover as Uo } from "./components/popover/popover.component.js";
74
+ import { SkfProgress as Xo } from "./components/progress/progress.component.js";
75
+ import { SkfRadio as Zo } from "./components/radio/radio.component.js";
76
+ import { SkfSegmentedButtonItem as $o } from "./components/segmented-button/segmented-button-item.component.js";
77
+ import { SkfSegmentedButton as rr } from "./components/segmented-button/segmented-button.component.js";
78
+ import { SkfSelectOptionGroup as pr } from "./components/select/select-option-group.component.js";
79
+ import { SkfSelectOption as er } from "./components/select/select-option.component.js";
80
+ import { SkfSelect as ir } from "./components/select/select.component.js";
81
+ import { SkfStepperItem as kr } from "./components/stepper/stepper-item.component.js";
82
+ import { SkfStepper as ar } from "./components/stepper/stepper.component.js";
83
+ import { SkfSwitch as cr } from "./components/switch/switch.component.js";
84
+ import { SkfTabPanel as ur } from "./components/tabs/tab-panel.component.js";
85
+ import { SkfTab as Tr } from "./components/tabs/tab.component.js";
86
+ import { SkfTabs as lr } from "./components/tabs/tabs.component.js";
87
+ import { SkfTag as sr } from "./components/tag/tag.component.js";
88
+ import { SkfTextArea as Br } from "./components/textarea/textarea.component.js";
89
+ import { SkfToastItem as vr } from "./components/toast/toast-item.component.js";
90
+ import { SkfToastWrapper as Cr } from "./components/toast/toast-wrapper.component.js";
91
+ import { SkfToast as hr } from "./components/toast/toast.component.js";
92
+ import { SkfTooltip as Hr } from "./components/tooltip/tooltip.component.js";
91
93
  export {
92
- X as SkfAccordion,
93
- U as SkfAccordionItem,
94
- Z as SkfAlert,
95
- ro as SkfBreadcrumb,
96
- $ as SkfBreadcrumbItem,
97
- po as SkfButton,
98
- eo as SkfCard,
99
- io as SkfCheckbox,
100
- co as SkfDatepicker,
101
- ko as SkfDatepickerCalendar,
102
- ao as SkfDatepickerPopup,
103
- Io as SkfDialog,
94
+ Y as SkfAccordion,
95
+ V as SkfAccordionItem,
96
+ _ as SkfAlert,
97
+ to as SkfBreadcrumb,
98
+ oo as SkfBreadcrumbItem,
99
+ mo as SkfButton,
100
+ fo as SkfCard,
101
+ So as SkfCheckbox,
102
+ uo as SkfDatepicker,
103
+ xo as SkfDatepickerCalendar,
104
+ no as SkfDatepickerPopup,
105
+ To as SkfDialog,
104
106
  lo as SkfDivider,
105
- bo as SkfDrawer,
106
- Do as SkfHeader,
107
+ so as SkfDrawer,
108
+ Bo as SkfHeader,
107
109
  vo as SkfHeading,
108
- Po as SkfIcon,
109
- Lo as SkfInput,
110
- wo as SkfLink,
111
- Mo as SkfLoader,
112
- Oo as SkfLogo,
113
- jo as SkfMenu,
114
- Ro as SkfMenuItem,
115
- Eo as SkfNav,
116
- yo as SkfNavItem,
117
- Jo as SkfPopover,
118
- Qo as SkfProgress,
119
- Vo as SkfRadio,
120
- _o as SkfSegmentedButton,
121
- Yo as SkfSegmentedButtonItem,
122
- mr as SkfSelect,
123
- tr as SkfSelectOption,
124
- or as SkfSelectOptionGroup,
125
- Sr as SkfStepper,
126
- fr as SkfStepperItem,
127
- xr as SkfSwitch,
128
- dr as SkfTab,
129
- nr as SkfTabPanel,
130
- Ir as SkfTabs,
131
- lr as SkfTag,
132
- br as SkfTextArea,
133
- Pr as SkfToast,
134
- Dr as SkfToastItem,
135
- vr as SkfToastWrapper,
136
- Lr as SkfTooltip
110
+ Co as SkfIcon,
111
+ ho as SkfInput,
112
+ Ho as SkfLink,
113
+ No as SkfLoader,
114
+ Go as SkfLogo,
115
+ qo as SkfMenu,
116
+ Wo as SkfMenuItem,
117
+ Fo as SkfNav,
118
+ zo as SkfNavItem,
119
+ Ko as SkfPagination,
120
+ Uo as SkfPopover,
121
+ Xo as SkfProgress,
122
+ Zo as SkfRadio,
123
+ rr as SkfSegmentedButton,
124
+ $o as SkfSegmentedButtonItem,
125
+ ir as SkfSelect,
126
+ er as SkfSelectOption,
127
+ pr as SkfSelectOptionGroup,
128
+ ar as SkfStepper,
129
+ kr as SkfStepperItem,
130
+ cr as SkfSwitch,
131
+ Tr as SkfTab,
132
+ ur as SkfTabPanel,
133
+ lr as SkfTabs,
134
+ sr as SkfTag,
135
+ Br as SkfTextArea,
136
+ hr as SkfToast,
137
+ vr as SkfToastItem,
138
+ Cr as SkfToastWrapper,
139
+ Hr as SkfTooltip
137
140
  };
@@ -16,6 +16,8 @@ export declare class SkfPopoverBase extends SkfElement {
16
16
  static styles: CSSResultGroup;
17
17
  static classMap: {};
18
18
  _skipClosingThisTick: boolean;
19
+ _abortCtrl: AbortController;
20
+ _signal: AbortSignal;
19
21
  /** @internal - The popover element, aka `this` */
20
22
  $popover: this;
21
23
  /** Where the popover is positioned relative to the anchor element if it fits */
@@ -40,7 +42,6 @@ export declare class SkfPopoverBase extends SkfElement {
40
42
  * Used to store the outside click listener reference for cleanup and to avoid duplicates
41
43
  */
42
44
  _skfPopoverOutsideClickListener?: (e: MouseEvent) => void;
43
- protected signal: AbortSignal;
44
45
  protected popoverController: PopoverController;
45
46
  connectedCallback(): void;
46
47
  disconnectedCallback(): void;
@@ -1,23 +1,21 @@
1
- import { flip as $, offset as O, arrow as E, computePosition as T } from "@floating-ui/dom";
1
+ import { flip as y, offset as $, arrow as O, computePosition as _ } from "@floating-ui/dom";
2
2
  import { SkfElement as C } from "../../components/skf-element.js";
3
- import { PopoverController as k } from "../../controllers/popover.controller.js";
4
- import { uuid as P } from "../../helpers/uuid.js";
5
- import { watch as u } from "../../helpers/watch.js";
6
- import { componentStyles as _ } from "../../../styles/component.styles.js";
7
- import { nothing as A, html as v } from "lit";
8
- import { property as g, state as d, query as S } from "lit/decorators.js";
9
- import { classMap as L } from "lit/directives/class-map.js";
10
- import { styles as x } from "./popover.styles.js";
11
- var F = Object.defineProperty, M = Object.getOwnPropertyDescriptor, r = (m, t, s, o) => {
12
- for (var e = o > 1 ? void 0 : o ? M(t, s) : t, n = m.length - 1, a; n >= 0; n--)
13
- (a = m[n]) && (e = (o ? a(t, s, e) : a(e)) || e);
14
- return o && e && F(t, s, e), e;
15
- };
16
- let h = new AbortController();
17
- var p;
18
- const i = (p = class extends C {
3
+ import { PopoverController as E } from "../../controllers/popover.controller.js";
4
+ import { uuid as T } from "../../helpers/uuid.js";
5
+ import { watch as f } from "../../helpers/watch.js";
6
+ import { componentStyles as k } from "../../../styles/component.styles.js";
7
+ import { nothing as P, html as m } from "lit";
8
+ import { property as u, state as c, query as S } from "lit/decorators.js";
9
+ import { classMap as A } from "lit/directives/class-map.js";
10
+ import { styles as L } from "./popover.styles.js";
11
+ var x = Object.defineProperty, F = Object.getOwnPropertyDescriptor, r = (g, t, s, o) => {
12
+ for (var e = o > 1 ? void 0 : o ? F(t, s) : t, n = g.length - 1, a; n >= 0; n--)
13
+ (a = g[n]) && (e = (o ? a(t, s, e) : a(e)) || e);
14
+ return o && e && x(t, s, e), e;
15
+ }, h;
16
+ const i = (h = class extends C {
19
17
  constructor() {
20
- super(...arguments), this._skipClosingThisTick = !1, this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.signal = h.signal, this.popoverController = new k(this), this._toggleOpen = (t) => {
18
+ super(...arguments), this._skipClosingThisTick = !1, this._abortCtrl = new AbortController(), this._signal = this._abortCtrl.signal, this.$popover = this, this.placement = "top", this.variant = "popup", this.isOpen = !1, this.offset = 0, this.arrow = !1, this.triggerEvent = "mouseenter", this.popoverController = new E(this), this._toggleOpen = (t) => {
21
19
  this.isOpen = t ?? !this.isOpen;
22
20
  }, this._handleToggle = (t) => {
23
21
  const s = t.newState === "open";
@@ -31,9 +29,9 @@ const i = (p = class extends C {
31
29
  this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
32
30
  }, this.reposition = async () => {
33
31
  if (!this.$anchor) return;
34
- const t = [$(), O(this.offset)];
35
- this.arrow && t.push(E({ element: this.$arrow }));
36
- const { x: s, y: o, middlewareData: e } = await T(this.$anchor, this.$popover, {
32
+ const t = [y(), $(this.offset)];
33
+ this.arrow && t.push(O({ element: this.$arrow }));
34
+ const { x: s, y: o, middlewareData: e } = await _(this.$anchor, this.$popover, {
37
35
  placement: this.placement,
38
36
  middleware: t,
39
37
  strategy: "fixed"
@@ -42,7 +40,7 @@ const i = (p = class extends C {
42
40
  left: `${String(s)}px`,
43
41
  top: `${String(o)}px`
44
42
  }), this.arrow) {
45
- const n = this.placement.split("-")[0], a = { top: "bottom", right: "left", bottom: "top", left: "right" }[n] ?? "", c = e.flip?.index, f = e.arrow?.x, l = e.arrow?.y, w = typeof f == "number" ? `${String(f)}px` : "", b = typeof l == "number" ? `${String(l)}px` : "", y = {
43
+ const n = this.placement.split("-")[0], a = { top: "bottom", right: "left", bottom: "top", left: "right" }[n] ?? "", p = e.flip?.index, d = e.arrow?.x, l = e.arrow?.y, v = typeof d == "number" ? `${String(d)}px` : "", b = typeof l == "number" ? `${String(l)}px` : "", w = {
46
44
  bottom: 45,
47
45
  right: 135,
48
46
  top: 225,
@@ -50,19 +48,19 @@ const i = (p = class extends C {
50
48
  };
51
49
  Object.assign(this.$arrow.style, {
52
50
  top: b,
53
- [this.placement.includes("left") ? "right" : "left"]: w,
54
- [c ? n : a]: "calc(var(--_skf-popover-arrow-size) * -1)",
55
- rotate: `${(y[a] + (c ? 180 : 0)).toString()}deg`
51
+ [this.placement.includes("left") ? "right" : "left"]: v,
52
+ [p ? n : a]: "calc(var(--_skf-popover-arrow-size) * -1)",
53
+ rotate: `${(w[a] + (p ? 180 : 0)).toString()}deg`
56
54
  });
57
55
  }
58
56
  }, this.handleEscapeKey = (t) => {
59
57
  t.key === "Escape" && this.close();
60
58
  }, this.open = (t) => {
61
- t.stopPropagation();
59
+ t.stopPropagation(), this.tagName === "SKF-TOOLTIP" && this.isOpen && this.close();
62
60
  const o = this.tagName === "SKF-MENU" ? void 0 : !0;
63
- this._toggleOpen(o), h = new AbortController(), this.signal = h.signal, document.addEventListener("keydown", this.handleEscapeKey, { signal: this.signal }), this.tagName === "SKF-TOOLTIP" && this.$anchor?.setAttribute("aria-describedby", this.id);
61
+ this._toggleOpen(o), this._abortCtrl = new AbortController(), this._signal = this._abortCtrl.signal, document.addEventListener("keydown", this.handleEscapeKey, { signal: this._signal }), this.tagName === "SKF-TOOLTIP" && this.$anchor?.setAttribute("aria-describedby", this.id);
64
62
  }, this.close = (t = "") => {
65
- console.log("Popover closing", t), this._toggleOpen(!1), h.abort(), this.tagName === "SKF-TOOLTIP" && this.$anchor?.removeAttribute("aria-describedby");
63
+ console.log("Popover closing", t), this._toggleOpen(!1), this._abortCtrl.abort(), this.tagName === "SKF-TOOLTIP" && this.$anchor?.removeAttribute("aria-describedby");
66
64
  };
67
65
  }
68
66
  connectedCallback() {
@@ -71,7 +69,7 @@ const i = (p = class extends C {
71
69
  });
72
70
  }
73
71
  disconnectedCallback() {
74
- super.disconnectedCallback(), h.abort();
72
+ super.disconnectedCallback(), this._abortCtrl.abort();
75
73
  }
76
74
  async handleAnchorEl() {
77
75
  if (!this.$anchor) return;
@@ -82,25 +80,25 @@ const i = (p = class extends C {
82
80
  const e = this.contains(o.relatedTarget);
83
81
  t && e || this._skipClosingThisTick || this.close("anchor focus out");
84
82
  },
85
- { signal: this.signal }
83
+ { signal: this._signal }
86
84
  ), this.addEventListener(
87
85
  "focusout",
88
86
  (o) => {
89
87
  const e = this.contains(o.relatedTarget);
90
88
  t && e || this.close("popover focusout");
91
89
  },
92
- { signal: this.signal }
90
+ { signal: this._signal }
93
91
  ), this._skfPopoverOutsideClickListener ??= (o) => {
94
92
  this.isOpen && this.$anchor && !this.contains(o.target) && !this.$anchor.contains(o.target) ? this.close("outside click") : (this._skipClosingThisTick = !0, setTimeout(() => {
95
93
  this._skipClosingThisTick = !1;
96
94
  }, 0));
97
95
  }, document.addEventListener("mousedown", this._skfPopoverOutsideClickListener, {
98
- signal: this.signal
96
+ signal: this._signal
99
97
  });
100
98
  const s = window.top && window.self !== window.top;
101
99
  console.log("contains frames", s), s && window.top && !this._skipClosingThisTick && window.top.addEventListener("mousedown", this._skfPopoverOutsideClickListener, {
102
- signal: this.signal
103
- }), this.$popover.id = await P(this.$anchor.id), ["popup", "menu"].includes(this.variant) && (this.$anchor.setAttribute("aria-haspopup", "true"), this.setAttribute("aria-labelledby", this.$anchor.id)), ["menu"].includes(this.variant) && this.$anchor.setAttribute("aria-controls", this.$popover.id), ["popup"].includes(this.variant) && t && (this.role = "dialog"), ["tooltip"].includes(this.variant) && this.$anchor.addEventListener("focusin", this.open, { signal: this.signal });
100
+ signal: this._signal
101
+ }), this.$popover.id = await T(this.$anchor.id), ["popup", "menu"].includes(this.variant) && (this.$anchor.setAttribute("aria-haspopup", "true"), this.setAttribute("aria-labelledby", this.$anchor.id)), ["menu"].includes(this.variant) && this.$anchor.setAttribute("aria-controls", this.$popover.id), ["popup"].includes(this.variant) && t && (this.role = "dialog"), ["tooltip"].includes(this.variant) && this.$anchor.addEventListener("focusin", this.open, { signal: this._signal });
104
102
  }
105
103
  /** @internal eventlisteners here should implement abort signal */
106
104
  addEventListeners(t) {
@@ -108,13 +106,13 @@ const i = (p = class extends C {
108
106
  }
109
107
  /** @internal */
110
108
  removeEventListeners() {
111
- h.abort();
109
+ this._abortCtrl.abort();
112
110
  }
113
111
  render() {
114
- return ["popup", "menu"].includes(this.variant) && this.$anchor?.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), v`
115
- <div class=${L({ popover: !0, ...p.classMap })} id="root">
112
+ return ["popup", "menu"].includes(this.variant) && this.$anchor?.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), m`
113
+ <div class=${A({ popover: !0, ...h.classMap })} id="root">
116
114
  <slot></slot>
117
- ${this.arrow ? v`<div id="arrow"></div>` : A}
115
+ ${this.arrow ? m`<div id="arrow"></div>` : P}
118
116
  </div>
119
117
  `;
120
118
  }
@@ -129,54 +127,54 @@ const i = (p = class extends C {
129
127
  '[tabindex]:not([tabindex="-1"])'
130
128
  ]).length > 0;
131
129
  function e(n, a) {
132
- const c = Array.from(
130
+ const p = Array.from(
133
131
  n.querySelectorAll(a.join(", "))
134
- ), f = Array.from(n.querySelectorAll("*")).map((l) => l.shadowRoot).filter((l) => l !== null);
135
- for (const l of f)
136
- c.push(
132
+ ), d = Array.from(n.querySelectorAll("*")).map((l) => l.shadowRoot).filter((l) => l !== null);
133
+ for (const l of d)
134
+ p.push(
137
135
  ...e(l, a)
138
136
  );
139
- return c;
137
+ return p;
140
138
  }
141
139
  }
142
- }, p.styles = [_, x], p.classMap = {}, p);
140
+ }, h.styles = [k, L], h.classMap = {}, h);
143
141
  r([
144
- g()
142
+ u()
145
143
  ], i.prototype, "placement", 2);
146
144
  r([
147
- g()
145
+ u()
148
146
  ], i.prototype, "variant", 2);
149
147
  r([
150
- g()
148
+ u()
151
149
  ], i.prototype, "anchor", 2);
152
150
  r([
153
- d()
151
+ c()
154
152
  ], i.prototype, "isOpen", 2);
155
153
  r([
156
- d()
154
+ c()
157
155
  ], i.prototype, "offset", 2);
158
156
  r([
159
- d()
157
+ c()
160
158
  ], i.prototype, "$anchor", 2);
161
159
  r([
162
- d()
160
+ c()
163
161
  ], i.prototype, "arrow", 2);
164
162
  r([
165
- d()
163
+ c()
166
164
  ], i.prototype, "triggerEvent", 2);
167
165
  r([
168
166
  S("#arrow")
169
167
  ], i.prototype, "$arrow", 2);
170
168
  r([
171
- u("isOpen", { afterUpdate: !0 })
169
+ f("isOpen", { afterUpdate: !0 })
172
170
  ], i.prototype, "handleToggleOpen", 2);
173
171
  r([
174
- u("$anchor")
172
+ f("$anchor")
175
173
  ], i.prototype, "handleAnchorEl", 1);
176
174
  r([
177
- u("anchor")
175
+ f("anchor")
178
176
  ], i.prototype, "handleAnchorChange", 2);
179
- let W = i;
177
+ let z = i;
180
178
  export {
181
- W as SkfPopoverBase
179
+ z as SkfPopoverBase
182
180
  };
@@ -1,6 +1,6 @@
1
1
  import "../utilities/localize.js";
2
2
  import { registerTranslation as o } from "@shoelace-style/localize";
3
- const t = {
3
+ const a = {
4
4
  $code: "en",
5
5
  $name: "English",
6
6
  $dir: "ltr",
@@ -12,8 +12,11 @@ const t = {
12
12
  loading: "Loading",
13
13
  mainNavigation: "Main navigation",
14
14
  nextMonth: "Next month",
15
+ nextPage: "Next page",
15
16
  nextYear: "Next year",
17
+ of: "of",
16
18
  previousMonth: "Previous month",
19
+ previousPage: "Previous page",
17
20
  previousYear: "Previous year",
18
21
  required: "Required",
19
22
  selectedDay: "Selected day",
@@ -21,7 +24,7 @@ const t = {
21
24
  showPassword: "Show password",
22
25
  today: "Today"
23
26
  };
24
- o(t);
27
+ o(a);
25
28
  export {
26
- t as default
29
+ a as default
27
30
  };
@@ -1,6 +1,6 @@
1
1
  import "../utilities/localize.js";
2
2
  import { registerTranslation as r } from "@shoelace-style/localize";
3
- const o = {
3
+ const a = {
4
4
  $code: "es",
5
5
  $name: "Spanish",
6
6
  $dir: "ltr",
@@ -12,8 +12,11 @@ const o = {
12
12
  loading: "Cargando",
13
13
  mainNavigation: "Navegación principal",
14
14
  nextMonth: "Próximo mes",
15
+ nextPage: "Próxima página",
15
16
  nextYear: "Próximo año",
17
+ of: "de",
16
18
  previousMonth: "Mes anterior",
19
+ previousPage: "Página anterior",
17
20
  previousYear: "Año anterior",
18
21
  required: "Requerido",
19
22
  selectedDay: "Día seleccionado",
@@ -21,7 +24,7 @@ const o = {
21
24
  showPassword: "Mostrar contraseña",
22
25
  today: "Hoy"
23
26
  };
24
- r(o);
27
+ r(a);
25
28
  export {
26
- o as default
29
+ a as default
27
30
  };
@@ -1,6 +1,6 @@
1
1
  import "../utilities/localize.js";
2
- import { registerTranslation as o } from "@shoelace-style/localize";
3
- const r = {
2
+ import { registerTranslation as r } from "@shoelace-style/localize";
3
+ const a = {
4
4
  $code: "pt",
5
5
  $name: "Português",
6
6
  $dir: "ltr",
@@ -12,8 +12,11 @@ const r = {
12
12
  loading: "Carregando",
13
13
  mainNavigation: "Navegação principal",
14
14
  nextMonth: "Próximo mês",
15
+ nextPage: "Próxima página",
15
16
  nextYear: "Próximo ano",
17
+ of: "de",
16
18
  previousMonth: "Mês anterior",
19
+ previousPage: "Página anterior",
17
20
  previousYear: "Ano anterior",
18
21
  required: "Obrigatório",
19
22
  selectedDay: "Dia selecionado",
@@ -21,7 +24,7 @@ const r = {
21
24
  showPassword: "Mostrar senha",
22
25
  today: "Hoje"
23
26
  };
24
- o(r);
27
+ r(a);
25
28
  export {
26
- r as default
29
+ a as default
27
30
  };
@@ -12,8 +12,11 @@ const n = {
12
12
  loading: "Läser in",
13
13
  mainNavigation: "Huvudnavigering",
14
14
  nextMonth: "Nästa månad",
15
+ nextPage: "Nästa sida",
15
16
  nextYear: "Nästa år",
17
+ of: "av",
16
18
  previousMonth: "Föregående månad",
19
+ previousPage: "Föregående sida",
17
20
  previousYear: "Föregående år",
18
21
  required: "Obligatoriskt",
19
22
  selectedDay: "Vald dag",
@@ -23,6 +23,7 @@ import type { SkfHeader } from "../../components/header/header.component.js";
23
23
  import type { SkfInput } from "../../components/input/input.component.js";
24
24
  import type { SkfMenuItem } from "../../components/menu-item/menu-item.component.js";
25
25
  import type { SkfMenu } from "../../components/menu/menu.component.js";
26
+ import type { SkfPagination } from "../../components/pagination/pagination.component.js";
26
27
  import type { SkfPopover } from "../../components/popover/popover.component.js";
27
28
  import type { SkfProgress } from "../../components/progress/progress.component.js";
28
29
  import type { SkfRadio } from "../../components/radio/radio.component.js";
@@ -793,6 +794,27 @@ export type SkfMenuProps = {
793
794
  }
794
795
 
795
796
 
797
+ export type SkfPaginationProps = {
798
+ /** The number of items to display on each 'page' */
799
+ "items-per-page"?: SkfPagination['itemsPerPage'];
800
+ /** The number of items to display on each 'page' */
801
+ "itemsPerPage"?: SkfPagination['itemsPerPage'];
802
+ /** Sets the internal language of the component */
803
+ "lang"?: SkfPagination['lang'];
804
+ /** If true, hides both the delimiter and the total value */
805
+ "no-total"?: SkfPagination['noTotal'];
806
+ /** If true, hides both the delimiter and the total value */
807
+ "noTotal"?: SkfPagination['noTotal'];
808
+ /** The active page number. */
809
+ "page"?: SkfPagination['page'];
810
+ /** The total number of items being paginated. */
811
+ "total"?: SkfPagination['total'];
812
+
813
+ /** */
814
+ "onpage-change"?: (e: CustomEvent<CustomEvent>) => void;
815
+ }
816
+
817
+
796
818
  export type SkfPopoverProps = {
797
819
  /** The placement of the popover */
798
820
  "placement"?: unknown;
@@ -1956,6 +1978,28 @@ export type SkfTooltipProps = {
1956
1978
  "skf-menu": Partial<SkfMenuProps & BaseProps<SkfMenu> & BaseEvents>;
1957
1979
 
1958
1980
 
1981
+ /**
1982
+ * The `<skf-pagination>` is a component that displays a list of actions or options
1983
+ *
1984
+ * #### Attributes & Properties
1985
+ *
1986
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
1987
+ *
1988
+ * - `items-per-page`/`itemsPerPage`: The number of items to display on each 'page'
1989
+ * - `lang`: Sets the internal language of the component
1990
+ * - `no-total`/`noTotal`: If true, hides both the delimiter and the total value
1991
+ * - `page`: The active page number.
1992
+ * - `total`: The total number of items being paginated.
1993
+ *
1994
+ * #### Events
1995
+ *
1996
+ * Events that will be emitted by the component.
1997
+ *
1998
+ * - `page-change`: undefined
1999
+ */
2000
+ "skf-pagination": Partial<SkfPaginationProps & BaseProps<SkfPagination> & BaseEvents>;
2001
+
2002
+
1959
2003
  /**
1960
2004
  * The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
1961
2005
  *
@@ -24,6 +24,7 @@ import type { SkfHeader } from "../../components/header/header.component.js";
24
24
  import type { SkfInput, CustomEvent } from "../../components/input/input.component.js";
25
25
  import type { SkfMenuItem, CustomEvent } from "../../components/menu-item/menu-item.component.js";
26
26
  import type { SkfMenu, CustomEvent } from "../../components/menu/menu.component.js";
27
+ import type { SkfPagination, CustomEvent } from "../../components/pagination/pagination.component.js";
27
28
  import type { SkfPopover, CustomEvent } from "../../components/popover/popover.component.js";
28
29
  import type { SkfProgress } from "../../components/progress/progress.component.js";
29
30
  import type { SkfRadio, Event } from "../../components/radio/radio.component.js";
@@ -491,6 +492,22 @@ type SkfMenuProps = {
491
492
  "onskf-closed"?: (e: CustomEvent<CustomEvent>) => void;
492
493
  };
493
494
 
495
+ type SkfPaginationProps = {
496
+ /** The number of items to display on each 'page' */
497
+ "items-per-page"?: SkfPagination["itemsPerPage"];
498
+ /** Sets the internal language of the component */
499
+ lang?: SkfPagination["lang"];
500
+ /** If true, hides both the delimiter and the total value */
501
+ "no-total"?: SkfPagination["noTotal"];
502
+ /** The active page number. */
503
+ page?: SkfPagination["page"];
504
+ /** The total number of items being paginated. */
505
+ total?: SkfPagination["total"];
506
+
507
+ /** */
508
+ "onpage-change"?: (e: CustomEvent<CustomEvent>) => void;
509
+ };
510
+
494
511
  type SkfPopoverProps = {
495
512
  /** The placement of the popover */
496
513
  placement?: SkfPopover["undefined"];
@@ -1147,6 +1164,16 @@ export type CustomElements = {
1147
1164
  */
1148
1165
  "skf-menu": DefineComponent<SkfMenuProps>;
1149
1166
 
1167
+ /**
1168
+ * The `<skf-pagination>` is a component that displays a list of actions or options
1169
+ * ---
1170
+ *
1171
+ *
1172
+ * ### **Events:**
1173
+ * - **page-change**
1174
+ */
1175
+ "skf-pagination": DefineComponent<SkfPaginationProps>;
1176
+
1150
1177
  /**
1151
1178
  * The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
1152
1179
  *
@@ -16,8 +16,11 @@ export interface Translation extends DefaultTranslation {
16
16
  loading: string;
17
17
  mainNavigation: string;
18
18
  nextMonth: string;
19
+ nextPage: string;
19
20
  nextYear: string;
21
+ of: string;
20
22
  previousMonth: string;
23
+ previousPage: string;
21
24
  previousYear: string;
22
25
  required: string;
23
26
  selectedDay: string;
@@ -943,6 +943,38 @@
943
943
  ],
944
944
  "references": []
945
945
  },
946
+ {
947
+ "name": "skf-pagination",
948
+ "description": "The `<skf-pagination>` is a component that displays a list of actions or options\n---\n\n\n### **Events:**\n - **page-change**",
949
+ "attributes": [
950
+ {
951
+ "name": "items-per-page",
952
+ "description": "The number of items to display on each 'page'",
953
+ "values": []
954
+ },
955
+ {
956
+ "name": "lang",
957
+ "description": "Sets the internal language of the component",
958
+ "values": [{ "name": "Language" }]
959
+ },
960
+ {
961
+ "name": "no-total",
962
+ "description": "If true, hides both the delimiter and the total value",
963
+ "values": []
964
+ },
965
+ {
966
+ "name": "page",
967
+ "description": "The active page number.",
968
+ "values": []
969
+ },
970
+ {
971
+ "name": "total",
972
+ "description": "The total number of items being paginated.",
973
+ "values": []
974
+ }
975
+ ],
976
+ "references": []
977
+ },
946
978
  {
947
979
  "name": "skf-popover",
948
980
  "description": "The `<skf-popover>` is a general purpose component that displays the slot content in a popover.\n\nSee [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles\n---\n\n\n### **Events:**\n - **skf-opened** - Fired when the popover is opened\n- **skf-closed** - Fired when the popover is closed\n\n### **Slots:**\n - _default_ - The popover content",
@@ -2065,6 +2065,69 @@
2065
2065
  ]
2066
2066
  }
2067
2067
  },
2068
+ {
2069
+ "name": "skf-pagination",
2070
+ "description": "The `<skf-pagination>` is a component that displays a list of actions or options\n---\n\n\n### **Events:**\n - **page-change**",
2071
+ "doc-url": "",
2072
+ "attributes": [
2073
+ {
2074
+ "name": "items-per-page",
2075
+ "description": "The number of items to display on each 'page'",
2076
+ "value": { "type": "number", "default": "50" }
2077
+ },
2078
+ {
2079
+ "name": "lang",
2080
+ "description": "Sets the internal language of the component",
2081
+ "value": { "type": "Language", "default": "'en'" }
2082
+ },
2083
+ {
2084
+ "name": "no-total",
2085
+ "description": "If true, hides both the delimiter and the total value",
2086
+ "value": { "type": "boolean", "default": "false" }
2087
+ },
2088
+ {
2089
+ "name": "page",
2090
+ "description": "The active page number.",
2091
+ "value": { "type": "number", "default": "1" }
2092
+ },
2093
+ {
2094
+ "name": "total",
2095
+ "description": "The total number of items being paginated.",
2096
+ "value": { "type": "number", "default": "0" }
2097
+ }
2098
+ ],
2099
+ "events": [{ "name": "page-change", "type": "CustomEvent" }],
2100
+ "js": {
2101
+ "properties": [
2102
+ {
2103
+ "name": "itemsPerPage",
2104
+ "description": "The number of items to display on each 'page'",
2105
+ "type": "number"
2106
+ },
2107
+ {
2108
+ "name": "lang",
2109
+ "description": "Sets the internal language of the component",
2110
+ "type": "Language"
2111
+ },
2112
+ {
2113
+ "name": "noTotal",
2114
+ "description": "If true, hides both the delimiter and the total value",
2115
+ "type": "boolean"
2116
+ },
2117
+ {
2118
+ "name": "page",
2119
+ "description": "The active page number.",
2120
+ "type": "number"
2121
+ },
2122
+ {
2123
+ "name": "total",
2124
+ "description": "The total number of items being paginated.",
2125
+ "type": "number"
2126
+ }
2127
+ ],
2128
+ "events": [{ "name": "page-change", "type": "CustomEvent" }]
2129
+ }
2130
+ },
2068
2131
  {
2069
2132
  "name": "skf-popover",
2070
2133
  "description": "The `<skf-popover>` is a general purpose component that displays the slot content in a popover.\n\nSee [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles\n---\n\n\n### **Events:**\n - **skf-opened** - Fired when the popover is opened\n- **skf-closed** - Fired when the popover is closed\n\n### **Slots:**\n - _default_ - The popover content",
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "sideEffects": true,
36
36
  "type": "module",
37
37
  "types": "./dist/index.d.ts",
38
- "version": "1.0.2-beta.16",
38
+ "version": "1.0.2-beta.18",
39
39
  "dependencies": {
40
40
  "@floating-ui/dom": "^1.7.3",
41
41
  "@js-temporal/polyfill": "^0.5.1",