@nvidia-elements/core 0.2.2 → 0.2.3
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/CHANGELOG.md +9 -0
- package/dist/accordion/accordion2.js +39 -39
- package/dist/alert/alert-group2.js +14 -14
- package/dist/alert/alert2.js +20 -20
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +6 -6
- package/dist/badge/badge2.js +21 -21
- package/dist/breadcrumb/breadcrumb2.js +12 -12
- package/dist/bundles/index.d.ts +418 -1802
- package/dist/bundles/index.js +6 -6
- package/dist/button/button.d.ts +5 -2
- package/dist/button/button2.js +13 -13
- package/dist/button/button2.js.map +1 -1
- package/dist/button-group/button-group2.js +15 -15
- package/dist/card/card2.js +17 -17
- package/dist/chat-message/chat-message2.js +7 -7
- package/dist/checkbox/checkbox-group2.js +7 -7
- package/dist/checkbox/checkbox2.js +7 -7
- package/dist/color/color2.js +7 -7
- package/dist/combobox/combobox2.js +10 -10
- package/dist/copy-button/copy-button2.js +10 -10
- package/dist/custom-elements-jsx.d.ts +346 -613
- package/dist/custom-elements-vue.d.ts +346 -613
- package/dist/custom-elements.json +4870 -14220
- package/dist/data.html.json +252 -168
- package/dist/data.snippets.json +42 -42
- package/dist/date/date2.js +7 -7
- package/dist/datetime/datetime2.js +7 -7
- package/dist/dialog/dialog-footer2.js +6 -6
- package/dist/dialog/dialog-header2.js +6 -6
- package/dist/dialog/dialog2.js +19 -19
- package/dist/divider/divider2.js +5 -5
- package/dist/dot/dot2.js +8 -8
- package/dist/drawer/drawer-content2.js +6 -6
- package/dist/drawer/drawer-footer2.js +6 -6
- package/dist/drawer/drawer-header2.js +6 -6
- package/dist/drawer/drawer2.js +19 -19
- package/dist/dropdown/dropdown-footer2.js +6 -6
- package/dist/dropdown/dropdown-header2.js +6 -6
- package/dist/dropdown/dropdown2.js +16 -16
- package/dist/dropdown-group/dropdown-group.js +16 -16
- package/dist/dropzone/dropzone.d.ts +1 -404
- package/dist/dropzone/dropzone2.js +14 -14
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +10 -10
- package/dist/format-number/format-number2.js +16 -16
- package/dist/format-relative-time/format-relative-time2.js +7 -7
- package/dist/forms/control/control2.js +19 -19
- package/dist/forms/control-group/control-group2.js +6 -6
- package/dist/forms/control-message/control-message2.js +9 -9
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +10 -10
- package/dist/grid/footer/footer2.js +6 -6
- package/dist/grid/grid2.js +12 -12
- package/dist/grid/header/header2.js +9 -9
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +9 -9
- package/dist/icon/icon2.js +15 -15
- package/dist/icon-button/icon-button2.js +9 -9
- package/dist/index.js +4 -4
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +6 -6
- package/dist/internal/controllers/keynav-grid.controller.js +39 -39
- package/dist/internal/controllers/type-button.controller.examples.js.map +1 -1
- package/dist/internal/controllers/type-button.controller.examples.json +1 -1
- package/dist/internal/controllers/type-command.controller.d.ts +10 -1
- package/dist/internal/controllers/type-command.controller.js +23 -14
- package/dist/internal/controllers/type-command.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.utils.js +7 -7
- package/dist/internal/index.d.ts +0 -1
- package/dist/internal/index.js +40 -41
- package/dist/internal/services/global.service.js +1 -1
- package/dist/logo/logo2.js +6 -6
- package/dist/menu/menu-item.d.ts +4 -2
- package/dist/menu/menu-item2.js +12 -12
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu2.js +10 -10
- package/dist/month/month2.js +7 -7
- package/dist/notification/notification-group2.js +11 -11
- package/dist/notification/notification2.js +22 -22
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +6 -6
- package/dist/page/page-panel/page-panel-header2.js +6 -6
- package/dist/page/page-panel/page-panel2.js +14 -14
- package/dist/page/page2.js +9 -9
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +10 -10
- package/dist/pagination/pagination.d.ts +1 -404
- package/dist/pagination/pagination2.js +17 -17
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +21 -21
- package/dist/password/password2.js +7 -7
- package/dist/preferences-input/preferences-input.d.ts +1 -404
- package/dist/preferences-input/preferences-input2.js +9 -9
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +8 -8
- package/dist/progress-ring/progress-ring2.js +15 -15
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +15 -15
- package/dist/pulse/pulse2.js +6 -6
- package/dist/radio/radio-group2.js +7 -7
- package/dist/radio/radio2.js +7 -7
- package/dist/range/range2.js +5 -5
- package/dist/resize-handle/resize-handle.d.ts +1 -404
- package/dist/resize-handle/resize-handle2.js +16 -16
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +8 -8
- package/dist/select/select2.js +18 -18
- package/dist/skeleton/skeleton2.js +7 -7
- package/dist/sort-button/sort-button.d.ts +4 -2
- package/dist/sort-button/sort-button2.js +19 -19
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +14 -14
- package/dist/star-rating/star-rating2.js +6 -6
- package/dist/steps/steps.d.ts +4 -2
- package/dist/steps/steps2.js +36 -36
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/switch-group2.js +6 -6
- package/dist/switch/switch2.js +7 -7
- package/dist/tabs/tabs-group2.js +21 -21
- package/dist/tabs/tabs.d.ts +4 -2
- package/dist/tabs/tabs2.js +30 -30
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag.d.ts +5 -2
- package/dist/tag/tag2.js +20 -20
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +7 -7
- package/dist/toast/toast2.js +21 -21
- package/dist/toggletip/toggletip-footer2.js +6 -6
- package/dist/toggletip/toggletip-header2.js +6 -6
- package/dist/toggletip/toggletip2.js +17 -17
- package/dist/toolbar/toolbar2.js +11 -11
- package/dist/tooltip/tooltip2.js +16 -16
- package/dist/tree/tree-node2.js +30 -30
- package/dist/tree/tree2.js +14 -14
- package/dist/week/week2.js +7 -7
- package/package.json +3 -3
- package/dist/internal/base/button.d.ts +0 -114
- package/dist/internal/base/button.js +0 -117
- package/dist/internal/base/button.js.map +0 -1
package/dist/page/page2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
+
import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
3
|
+
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
|
+
import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
5
5
|
import i from "./page.js";
|
|
6
6
|
import { LitElement as a, html as o } from "lit";
|
|
7
7
|
import { property as s } from "lit/decorators/property.js";
|
|
@@ -11,12 +11,12 @@ var c = class extends a {
|
|
|
11
11
|
super(...e), this.documentScroll = !1;
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
|
-
this.styles =
|
|
14
|
+
this.styles = n([i]);
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-page",
|
|
19
|
-
version: "0.2.
|
|
19
|
+
version: "0.2.3"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -26,14 +26,14 @@ var c = class extends a {
|
|
|
26
26
|
return o`<div internal-host><slot name="header"></slot><slot name="subheader"></slot><slot name="left-aside"></slot><slot name="left"></slot><slot></slot><slot name="bottom"></slot><slot name="right"></slot><slot name="right-aside"></slot><slot name="subfooter"></slot><slot name="footer"></slot></div>`;
|
|
27
27
|
}
|
|
28
28
|
connectedCallback() {
|
|
29
|
-
super.connectedCallback(),
|
|
29
|
+
super.connectedCallback(), t(this);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
r([s({
|
|
33
33
|
type: Boolean,
|
|
34
34
|
reflect: !0,
|
|
35
35
|
attribute: "document-scroll"
|
|
36
|
-
})], c.prototype, "documentScroll", void 0), c =
|
|
36
|
+
})], c.prototype, "documentScroll", void 0), c = r([e({ excessiveInstanceLimit: 0 })], c);
|
|
37
37
|
//#endregion
|
|
38
38
|
export { c as Page };
|
|
39
39
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { TypeNativePopoverController as e } from "../internal/controllers/type-native-popover.controller.js";
|
|
2
|
+
import { scopedRegistry as t } from "../internal/decorators/scoped-registry.js";
|
|
3
|
+
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
|
+
import { popoverStyles as r } from "../internal/styles/popover2.js";
|
|
5
|
+
import { __decorate as i } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
6
6
|
import { ProgressRing as a } from "../progress-ring/progress-ring2.js";
|
|
7
7
|
import o from "./page-loader.js";
|
|
8
8
|
import { LitElement as s, html as c } from "lit";
|
|
9
9
|
import { state as l } from "lit/decorators/state.js";
|
|
10
10
|
//#region src/page-loader/page-loader.ts
|
|
11
11
|
var u = class extends s {
|
|
12
|
-
constructor(...
|
|
13
|
-
super(...
|
|
12
|
+
constructor(...t) {
|
|
13
|
+
super(...t), this.position = "center", this.popoverType = "manual", this.typeNativePopoverController = new e(this), this.anchor = globalThis.document?.body;
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
|
-
this.styles =
|
|
16
|
+
this.styles = n([r, o]);
|
|
17
17
|
}
|
|
18
18
|
static {
|
|
19
19
|
this.metadata = {
|
|
20
20
|
tag: "nve-page-loader",
|
|
21
|
-
version: "0.2.
|
|
21
|
+
version: "0.2.3"
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
@@ -28,7 +28,7 @@ var u = class extends s {
|
|
|
28
28
|
return c`<div internal-host><nve-progress-ring part="progress-ring" status="accent" size="xl"></nve-progress-ring><slot></slot></div>`;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
i([l()], u.prototype, "anchor", void 0), u = i([t()], u);
|
|
32
32
|
//#endregion
|
|
33
33
|
export { u as PageLoader };
|
|
34
34
|
|
|
@@ -2,410 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import { KeynavListConfig } from '../internal';
|
|
3
3
|
import { IconButton } from '../icon-button';
|
|
4
4
|
import { Select } from '../select';
|
|
5
|
-
declare const Pagination_base:
|
|
6
|
-
new (...args: any[]): {
|
|
7
|
-
get readOnly(): boolean;
|
|
8
|
-
set readOnly(value: boolean | unknown);
|
|
9
|
-
get disabled(): boolean;
|
|
10
|
-
set disabled(value: boolean | unknown);
|
|
11
|
-
get required(): boolean;
|
|
12
|
-
set required(value: number | unknown);
|
|
13
|
-
name: string;
|
|
14
|
-
get noValidate(): boolean;
|
|
15
|
-
set noValidate(value: boolean | unknown);
|
|
16
|
-
_value: number | undefined;
|
|
17
|
-
get value(): number | undefined;
|
|
18
|
-
set value(value: number | unknown);
|
|
19
|
-
updateValue(value: number): void;
|
|
20
|
-
readonly form: HTMLFormElement | null;
|
|
21
|
-
readonly willValidate: boolean;
|
|
22
|
-
readonly validity: ValidityState;
|
|
23
|
-
readonly validationMessage: string;
|
|
24
|
-
readonly valueAsString: string;
|
|
25
|
-
valueAsNumber: number;
|
|
26
|
-
readonly type: string;
|
|
27
|
-
readonly _metadata: import('@nvidia-elements/forms').FormControlMetadata;
|
|
28
|
-
_formInternals: ElementInternals;
|
|
29
|
-
_initialValue: number | undefined;
|
|
30
|
-
readonly _validators: import('@nvidia-elements/forms').Validator[];
|
|
31
|
-
readonly _internals: ElementInternals;
|
|
32
|
-
connectedCallback(): void;
|
|
33
|
-
disconnectedCallback(): void;
|
|
34
|
-
_stopInternalPropagation: (event: Event) => void;
|
|
35
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
36
|
-
_handleAttributeChange(name: string, newValue: string): void;
|
|
37
|
-
formResetCallback(): void;
|
|
38
|
-
formStateRestoreCallback(state: number, _reason: string): void;
|
|
39
|
-
reportValidity(): boolean;
|
|
40
|
-
checkValidity(): boolean;
|
|
41
|
-
setValidity(validity: Partial<ValidityState>, message?: string): void;
|
|
42
|
-
dispatchInputEvent(): void;
|
|
43
|
-
dispatchChangeEvent(): void;
|
|
44
|
-
dispatchUpdateEvent(type: "input" | "change"): void;
|
|
45
|
-
_updateFormState(): void;
|
|
46
|
-
_requestUpdate(): void;
|
|
47
|
-
accessKey: string;
|
|
48
|
-
readonly accessKeyLabel: string;
|
|
49
|
-
autocapitalize: string;
|
|
50
|
-
autocorrect: boolean;
|
|
51
|
-
dir: string;
|
|
52
|
-
draggable: boolean;
|
|
53
|
-
hidden: boolean | "until-found";
|
|
54
|
-
inert: boolean;
|
|
55
|
-
innerText: string;
|
|
56
|
-
lang: string;
|
|
57
|
-
readonly offsetHeight: number;
|
|
58
|
-
readonly offsetLeft: number;
|
|
59
|
-
readonly offsetParent: Element | null;
|
|
60
|
-
readonly offsetTop: number;
|
|
61
|
-
readonly offsetWidth: number;
|
|
62
|
-
outerText: string;
|
|
63
|
-
popover: string | null;
|
|
64
|
-
spellcheck: boolean;
|
|
65
|
-
title: string;
|
|
66
|
-
translate: boolean;
|
|
67
|
-
writingSuggestions: string;
|
|
68
|
-
attachInternals(): ElementInternals;
|
|
69
|
-
click(): void;
|
|
70
|
-
hidePopover(): void;
|
|
71
|
-
showPopover(options?: ShowPopoverOptions): void;
|
|
72
|
-
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
|
|
73
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
74
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
75
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
76
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
77
|
-
readonly attributes: NamedNodeMap;
|
|
78
|
-
get classList(): DOMTokenList;
|
|
79
|
-
set classList(value: string);
|
|
80
|
-
className: string;
|
|
81
|
-
readonly clientHeight: number;
|
|
82
|
-
readonly clientLeft: number;
|
|
83
|
-
readonly clientTop: number;
|
|
84
|
-
readonly clientWidth: number;
|
|
85
|
-
readonly currentCSSZoom: number;
|
|
86
|
-
readonly customElementRegistry: CustomElementRegistry | null;
|
|
87
|
-
id: string;
|
|
88
|
-
innerHTML: string;
|
|
89
|
-
readonly localName: string;
|
|
90
|
-
readonly namespaceURI: string | null;
|
|
91
|
-
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
92
|
-
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
93
|
-
outerHTML: string;
|
|
94
|
-
readonly ownerDocument: Document;
|
|
95
|
-
get part(): DOMTokenList;
|
|
96
|
-
set part(value: string);
|
|
97
|
-
readonly prefix: string | null;
|
|
98
|
-
readonly scrollHeight: number;
|
|
99
|
-
scrollLeft: number;
|
|
100
|
-
scrollTop: number;
|
|
101
|
-
readonly scrollWidth: number;
|
|
102
|
-
readonly shadowRoot: ShadowRoot | null;
|
|
103
|
-
slot: string;
|
|
104
|
-
readonly tagName: string;
|
|
105
|
-
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
106
|
-
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
107
|
-
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
108
|
-
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
109
|
-
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
110
|
-
closest<E extends Element = Element>(selectors: string): E | null;
|
|
111
|
-
computedStyleMap(): StylePropertyMapReadOnly;
|
|
112
|
-
getAttribute(qualifiedName: string): string | null;
|
|
113
|
-
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
114
|
-
getAttributeNames(): string[];
|
|
115
|
-
getAttributeNode(qualifiedName: string): Attr | null;
|
|
116
|
-
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
117
|
-
getBoundingClientRect(): DOMRect;
|
|
118
|
-
getClientRects(): DOMRectList;
|
|
119
|
-
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
120
|
-
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
121
|
-
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
122
|
-
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
123
|
-
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
124
|
-
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
125
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
126
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
127
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
128
|
-
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
129
|
-
getHTML(options?: GetHTMLOptions): string;
|
|
130
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
131
|
-
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
132
|
-
hasAttributes(): boolean;
|
|
133
|
-
hasPointerCapture(pointerId: number): boolean;
|
|
134
|
-
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
135
|
-
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
136
|
-
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
137
|
-
matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
|
|
138
|
-
matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
|
|
139
|
-
matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
|
|
140
|
-
matches(selectors: string): boolean;
|
|
141
|
-
releasePointerCapture(pointerId: number): void;
|
|
142
|
-
removeAttribute(qualifiedName: string): void;
|
|
143
|
-
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
144
|
-
removeAttributeNode(attr: Attr): Attr;
|
|
145
|
-
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
146
|
-
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
147
|
-
scroll(options?: ScrollToOptions): void;
|
|
148
|
-
scroll(x: number, y: number): void;
|
|
149
|
-
scrollBy(options?: ScrollToOptions): void;
|
|
150
|
-
scrollBy(x: number, y: number): void;
|
|
151
|
-
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
152
|
-
scrollTo(options?: ScrollToOptions): void;
|
|
153
|
-
scrollTo(x: number, y: number): void;
|
|
154
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
155
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
156
|
-
setAttributeNode(attr: Attr): Attr | null;
|
|
157
|
-
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
158
|
-
setHTMLUnsafe(html: string): void;
|
|
159
|
-
setPointerCapture(pointerId: number): void;
|
|
160
|
-
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
161
|
-
webkitMatchesSelector(selectors: string): boolean;
|
|
162
|
-
get textContent(): string;
|
|
163
|
-
set textContent(value: string | null);
|
|
164
|
-
readonly baseURI: string;
|
|
165
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
166
|
-
readonly firstChild: ChildNode | null;
|
|
167
|
-
readonly isConnected: boolean;
|
|
168
|
-
readonly lastChild: ChildNode | null;
|
|
169
|
-
readonly nextSibling: ChildNode | null;
|
|
170
|
-
readonly nodeName: string;
|
|
171
|
-
readonly nodeType: number;
|
|
172
|
-
nodeValue: string | null;
|
|
173
|
-
readonly parentElement: HTMLElement | null;
|
|
174
|
-
readonly parentNode: ParentNode | null;
|
|
175
|
-
readonly previousSibling: ChildNode | null;
|
|
176
|
-
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
177
|
-
cloneNode(subtree?: boolean): Node;
|
|
178
|
-
compareDocumentPosition(other: Node): number;
|
|
179
|
-
contains(other: Node | null): boolean;
|
|
180
|
-
getRootNode(options?: GetRootNodeOptions): Node;
|
|
181
|
-
hasChildNodes(): boolean;
|
|
182
|
-
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
183
|
-
isDefaultNamespace(namespace: string | null): boolean;
|
|
184
|
-
isEqualNode(otherNode: Node | null): boolean;
|
|
185
|
-
isSameNode(otherNode: Node | null): boolean;
|
|
186
|
-
lookupNamespaceURI(prefix: string | null): string | null;
|
|
187
|
-
lookupPrefix(namespace: string | null): string | null;
|
|
188
|
-
normalize(): void;
|
|
189
|
-
removeChild<T_1 extends Node>(child: T_1): T_1;
|
|
190
|
-
replaceChild<T_1 extends Node>(node: Node, child: T_1): T_1;
|
|
191
|
-
readonly ELEMENT_NODE: 1;
|
|
192
|
-
readonly ATTRIBUTE_NODE: 2;
|
|
193
|
-
readonly TEXT_NODE: 3;
|
|
194
|
-
readonly CDATA_SECTION_NODE: 4;
|
|
195
|
-
readonly ENTITY_REFERENCE_NODE: 5;
|
|
196
|
-
readonly ENTITY_NODE: 6;
|
|
197
|
-
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
198
|
-
readonly COMMENT_NODE: 8;
|
|
199
|
-
readonly DOCUMENT_NODE: 9;
|
|
200
|
-
readonly DOCUMENT_TYPE_NODE: 10;
|
|
201
|
-
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
202
|
-
readonly NOTATION_NODE: 12;
|
|
203
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
204
|
-
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
205
|
-
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
206
|
-
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
207
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
208
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
209
|
-
dispatchEvent(event: Event): boolean;
|
|
210
|
-
ariaActiveDescendantElement: Element | null;
|
|
211
|
-
ariaAtomic: string | null;
|
|
212
|
-
ariaAutoComplete: string | null;
|
|
213
|
-
ariaBrailleLabel: string | null;
|
|
214
|
-
ariaBrailleRoleDescription: string | null;
|
|
215
|
-
ariaBusy: string | null;
|
|
216
|
-
ariaChecked: string | null;
|
|
217
|
-
ariaColCount: string | null;
|
|
218
|
-
ariaColIndex: string | null;
|
|
219
|
-
ariaColIndexText: string | null;
|
|
220
|
-
ariaColSpan: string | null;
|
|
221
|
-
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
222
|
-
ariaCurrent: string | null;
|
|
223
|
-
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
224
|
-
ariaDescription: string | null;
|
|
225
|
-
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
226
|
-
ariaDisabled: string | null;
|
|
227
|
-
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
228
|
-
ariaExpanded: string | null;
|
|
229
|
-
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
230
|
-
ariaHasPopup: string | null;
|
|
231
|
-
ariaHidden: string | null;
|
|
232
|
-
ariaInvalid: string | null;
|
|
233
|
-
ariaKeyShortcuts: string | null;
|
|
234
|
-
ariaLabel: string | null;
|
|
235
|
-
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
236
|
-
ariaLevel: string | null;
|
|
237
|
-
ariaLive: string | null;
|
|
238
|
-
ariaModal: string | null;
|
|
239
|
-
ariaMultiLine: string | null;
|
|
240
|
-
ariaMultiSelectable: string | null;
|
|
241
|
-
ariaOrientation: string | null;
|
|
242
|
-
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
243
|
-
ariaPlaceholder: string | null;
|
|
244
|
-
ariaPosInSet: string | null;
|
|
245
|
-
ariaPressed: string | null;
|
|
246
|
-
ariaReadOnly: string | null;
|
|
247
|
-
ariaRelevant: string | null;
|
|
248
|
-
ariaRequired: string | null;
|
|
249
|
-
ariaRoleDescription: string | null;
|
|
250
|
-
ariaRowCount: string | null;
|
|
251
|
-
ariaRowIndex: string | null;
|
|
252
|
-
ariaRowIndexText: string | null;
|
|
253
|
-
ariaRowSpan: string | null;
|
|
254
|
-
ariaSelected: string | null;
|
|
255
|
-
ariaSetSize: string | null;
|
|
256
|
-
ariaSort: string | null;
|
|
257
|
-
ariaValueMax: string | null;
|
|
258
|
-
ariaValueMin: string | null;
|
|
259
|
-
ariaValueNow: string | null;
|
|
260
|
-
ariaValueText: string | null;
|
|
261
|
-
role: string | null;
|
|
262
|
-
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
263
|
-
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
264
|
-
after(...nodes: (Node | string)[]): void;
|
|
265
|
-
before(...nodes: (Node | string)[]): void;
|
|
266
|
-
remove(): void;
|
|
267
|
-
replaceWith(...nodes: (Node | string)[]): void;
|
|
268
|
-
readonly nextElementSibling: Element | null;
|
|
269
|
-
readonly previousElementSibling: Element | null;
|
|
270
|
-
readonly childElementCount: number;
|
|
271
|
-
readonly children: HTMLCollection;
|
|
272
|
-
readonly firstElementChild: Element | null;
|
|
273
|
-
readonly lastElementChild: Element | null;
|
|
274
|
-
append(...nodes: (Node | string)[]): void;
|
|
275
|
-
moveBefore(node: Node, child: Node | null): void;
|
|
276
|
-
prepend(...nodes: (Node | string)[]): void;
|
|
277
|
-
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
278
|
-
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
279
|
-
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
280
|
-
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
281
|
-
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
282
|
-
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
283
|
-
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
284
|
-
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
285
|
-
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
286
|
-
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
287
|
-
replaceChildren(...nodes: (Node | string)[]): void;
|
|
288
|
-
readonly assignedSlot: HTMLSlotElement | null;
|
|
289
|
-
readonly attributeStyleMap: StylePropertyMap;
|
|
290
|
-
get style(): CSSStyleDeclaration;
|
|
291
|
-
set style(cssText: string);
|
|
292
|
-
contentEditable: string;
|
|
293
|
-
enterKeyHint: string;
|
|
294
|
-
inputMode: string;
|
|
295
|
-
readonly isContentEditable: boolean;
|
|
296
|
-
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
297
|
-
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
298
|
-
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
299
|
-
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
300
|
-
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
301
|
-
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
302
|
-
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
303
|
-
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
304
|
-
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
305
|
-
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
306
|
-
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
307
|
-
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
308
|
-
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
309
|
-
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
310
|
-
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
311
|
-
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
312
|
-
oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
-
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
315
|
-
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
316
|
-
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
317
|
-
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
318
|
-
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
319
|
-
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
320
|
-
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
321
|
-
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
322
|
-
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
323
|
-
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
324
|
-
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
325
|
-
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
326
|
-
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
327
|
-
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
328
|
-
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
-
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
330
|
-
onerror: OnErrorEventHandler;
|
|
331
|
-
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
332
|
-
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
333
|
-
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
334
|
-
oninput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
335
|
-
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
-
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
337
|
-
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
338
|
-
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
339
|
-
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
340
|
-
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
341
|
-
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
342
|
-
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
343
|
-
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
344
|
-
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
345
|
-
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
346
|
-
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
347
|
-
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
348
|
-
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
349
|
-
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
350
|
-
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
351
|
-
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
352
|
-
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
353
|
-
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
354
|
-
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
355
|
-
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
356
|
-
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
357
|
-
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
358
|
-
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
359
|
-
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
360
|
-
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
361
|
-
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
362
|
-
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
363
|
-
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
364
|
-
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
365
|
-
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
366
|
-
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
367
|
-
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
368
|
-
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
369
|
-
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
370
|
-
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
371
|
-
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
372
|
-
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
373
|
-
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
374
|
-
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
375
|
-
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
376
|
-
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
377
|
-
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
378
|
-
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
379
|
-
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
380
|
-
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
381
|
-
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
382
|
-
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
383
|
-
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
384
|
-
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
385
|
-
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
386
|
-
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
387
|
-
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
388
|
-
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
389
|
-
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
390
|
-
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
391
|
-
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
392
|
-
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
393
|
-
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
394
|
-
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
395
|
-
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
396
|
-
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
397
|
-
autofocus: boolean;
|
|
398
|
-
readonly dataset: DOMStringMap;
|
|
399
|
-
nonce: string;
|
|
400
|
-
tabIndex: number;
|
|
401
|
-
blur(): void;
|
|
402
|
-
focus(options?: FocusOptions): void;
|
|
403
|
-
requestUpdate?(name?: string, oldValue?: unknown): void;
|
|
404
|
-
};
|
|
405
|
-
formAssociated: boolean;
|
|
406
|
-
metadata: import('@nvidia-elements/forms').FormControlMetadata;
|
|
407
|
-
readonly observedAttributes: string[];
|
|
408
|
-
} & typeof LitElement;
|
|
5
|
+
declare const Pagination_base: import('@nvidia-elements/forms/mixins').FormControlMixinReturn<typeof LitElement, number>;
|
|
409
6
|
/**
|
|
410
7
|
* @element nve-pagination
|
|
411
8
|
* @description Pagination is a control that enables users to navigate through pages of content.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { formatStandardNumber as e } from "../internal/utils/objects.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { I18nController as t } from "../internal/controllers/i18n.controller.js";
|
|
3
|
+
import { keyNavigationList as n } from "../internal/controllers/keynav-list.controller.js";
|
|
4
|
+
import { attachInternals as r } from "../internal/utils/a11y.js";
|
|
5
|
+
import { typeSSR as i } from "../internal/controllers/type-ssr.controller.js";
|
|
6
|
+
import { scopedRegistry as a } from "../internal/decorators/scoped-registry.js";
|
|
7
|
+
import { useStyles as o } from "../internal/styles/index.js";
|
|
8
|
+
import { __decorate as s } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
9
9
|
import { IconButton as c } from "../icon-button/icon-button2.js";
|
|
10
10
|
import { Select as l } from "../select/select2.js";
|
|
11
11
|
import u from "./pagination.js";
|
|
12
12
|
import { LitElement as d, html as f, nothing as p } from "lit";
|
|
13
13
|
import { property as m } from "lit/decorators/property.js";
|
|
14
|
-
import { FormControlMixin as h } from "@nvidia-elements/forms/
|
|
14
|
+
import { FormControlMixin as h } from "@nvidia-elements/forms/mixins";
|
|
15
15
|
//#region src/pagination/pagination.ts
|
|
16
16
|
var g = class extends h(d) {
|
|
17
17
|
#e;
|
|
18
18
|
static {
|
|
19
|
-
this.styles =
|
|
19
|
+
this.styles = o([u]);
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
22
|
this.metadata = {
|
|
23
23
|
tag: "nve-pagination",
|
|
24
|
-
version: "0.2.
|
|
24
|
+
version: "0.2.3",
|
|
25
25
|
valueSchema: { type: "number" }
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -78,10 +78,10 @@ var g = class extends h(d) {
|
|
|
78
78
|
20,
|
|
79
79
|
50,
|
|
80
80
|
100
|
|
81
|
-
], this.#e = new
|
|
81
|
+
], this.#e = new t(this), this.i18n = this.#e.i18n, this.value = 1;
|
|
82
82
|
}
|
|
83
83
|
async connectedCallback() {
|
|
84
|
-
super.connectedCallback(),
|
|
84
|
+
super.connectedCallback(), r(this), this._internals.role = "toolbar", await this.updateComplete, this.#f();
|
|
85
85
|
}
|
|
86
86
|
disconnectedCallback() {
|
|
87
87
|
super.disconnectedCallback(), this.#u?.unobserve(this);
|
|
@@ -107,16 +107,16 @@ var g = class extends h(d) {
|
|
|
107
107
|
}));
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
|
|
110
|
+
s([m({ type: Number })], g.prototype, "step", void 0), s([m({ type: Array })], g.prototype, "stepSizes", void 0), s([m({ type: Number })], g.prototype, "items", void 0), s([m({ type: Boolean })], g.prototype, "skippable", void 0), s([m({
|
|
111
111
|
type: Boolean,
|
|
112
112
|
attribute: "disable-step"
|
|
113
|
-
})], g.prototype, "disableStep", void 0),
|
|
113
|
+
})], g.prototype, "disableStep", void 0), s([m({
|
|
114
114
|
type: String,
|
|
115
115
|
reflect: !0
|
|
116
|
-
})], g.prototype, "container", void 0),
|
|
117
|
-
a(),
|
|
116
|
+
})], g.prototype, "container", void 0), s([m({ type: Object })], g.prototype, "i18n", void 0), g = s([
|
|
118
117
|
i(),
|
|
119
|
-
|
|
118
|
+
n(),
|
|
119
|
+
a()
|
|
120
120
|
], g);
|
|
121
121
|
//#endregion
|
|
122
122
|
export { g as Pagination };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination2.js","names":["#currentPage","#isLastPage","#isFirstPage","#selectLabel","#label","#previousButton","#setValue","#nextButton","#startButton","#endButton","#select","#setStep","#i18nController","#setupLabelWidth","#resizeObserver"],"sources":["../../src/pagination/pagination.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixin';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n I18nController,\n formatStandardNumber,\n keyNavigationList,\n typeSSR,\n useStyles,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { Select } from '@nvidia-elements/core/select';\nimport styles from './pagination.css?inline';\n\n/* eslint-disable jsdoc/no-types */\n// explicit jsdoc annotation due to inheritance context lost with CEM generator\n\n/**\n * @element nve-pagination\n * @description Pagination is a control that enables users to navigate through pages of content.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/pagination\n * @event input - Dispatched when the value (page) has changed\n * @event change - Dispatched when the value (page) has changed\n * @event first-page - Dispatched when the first page is active\n * @event last-page - Dispatched when the last page is active\n * @slot - default slot for content\n * @slot suffix-label - slot for overriding the \"n of total\" label when total is an approximation\n * @cssprop --background\n * @cssprop --font-size\n * @cssprop --width\n * @csspart icon-button - Base part applied to all icon button elements\n * @csspart previous-icon-button - The previous page icon button\n * @csspart next-icon-button - The next page icon button\n * @csspart start-icon-button - The first page icon button\n * @csspart end-icon-button - The last page icon button\n * @csspart select - The page size select element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n * @property {number} value - value the current page number\n */\n@typeSSR()\n@keyNavigationList<Pagination>()\n@scopedRegistry()\nexport class Pagination extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * The number of items per page.\n */\n @property({ type: Number }) step = 10;\n /**\n * The array of custom step-size.\n */\n @property({ type: Array }) stepSizes = [10, 20, 50, 100];\n\n /**\n * The total number of items.\n */\n @property({ type: Number }) items: number;\n\n /**\n * Whether the pagination is skippable to start/end.\n */\n @property({ type: Boolean }) skippable: boolean;\n\n /**\n * Whether the step selector has a disabled state.\n */\n @property({ type: Boolean, attribute: 'disable-step' }) disableStep: boolean;\n\n /**\n * Determines the container styles of component. Flat applies when nesting within other containers. Inline applies when placing within other inline content.\n */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pagination',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton,\n [Select.metadata.tag]: Select\n };\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n items: this.shadowRoot!.querySelectorAll<HTMLElement>(`${IconButton.metadata.tag}, input, select`),\n layout: 'horizontal'\n };\n }\n\n get #currentPage() {\n return (this.value! - 1) * this.step + this.step;\n }\n\n get #isLastPage() {\n return this.items / this.value! === this.step;\n }\n\n get #isFirstPage() {\n return this.value === 1;\n }\n\n get #selectLabel() {\n const start = (this.value! - 1) * this.step + 1;\n const end = Math.min(this.value! * this.step, this.items || Infinity);\n return `${formatStandardNumber(start)}-${formatStandardNumber(end)}`;\n }\n\n get #label() {\n return this.items\n ? html`<label><slot name=\"suffix-label\">${this.i18n.of} ${formatStandardNumber(this.items)}</slot></label>`\n : nothing;\n }\n\n get #previousButton() {\n return html`<nve-icon-button part=\"icon-button previous-icon-button\"\n @click=${() => this.#setValue(this.value! - 1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.previous}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #nextButton() {\n return html`<nve-icon-button part=\"icon-button next-icon-button\"\n @click=${() => this.#setValue(this.value! + 1)}\n .disabled=${this.disabled || this.#currentPage >= this.items}\n .ariaLabel=${this.i18n.next}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n get #startButton() {\n return html`<nve-icon-button part=\"icon-button start-icon-button\"\n @click=${() => this.#setValue(1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.start}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #endButton() {\n return html`<nve-icon-button part=\"icon-button end-icon-button\"\n @click=${() => this.#setValue(this.items / this.step)}\n .disabled=${this.disabled || (this.value! - 1) * this.step + this.step >= this.items}\n .ariaLabel=${this.i18n.end}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n #resizeObserver: ResizeObserver;\n\n get #select() {\n return this.disableStep\n ? html`<label>${this.#selectLabel} </label>`\n : html`\n <nve-select part=\"select\" .container=${this.container}>\n <select\n .ariaLabel=${this.i18n.currentPage}\n @change=${(e: Event) => this.#setStep(parseInt((e.target as HTMLSelectElement).value, 10))}\n value=${this.step}\n .disabled=${this.disabled || this.disableStep}\n >\n ${this.stepSizes.map(i => html`<option ?selected=${this.step === i} value=${i}>${i}</option>`)}\n </select>\n <div class=\"select-label\">${this.#selectLabel}</div>\n </nve-select>\n `;\n }\n\n render() {\n return html`\n <div internal-host role=\"presentation\">\n ${\n this.skippable && this.items\n ? html`\n ${this.#startButton} ${this.#previousButton} ${this.#select} ${this.#label} ${this.#nextButton}\n ${this.#endButton}\n `\n : html` ${this.#select} ${this.#label} ${this.#previousButton} ${this.#nextButton} `\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = 1;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n await this.updateComplete;\n this.#setupLabelWidth();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#resizeObserver?.unobserve(this);\n }\n\n #setupLabelWidth() {\n const label = this.shadowRoot!.querySelector('.select-label');\n const select = this.shadowRoot!.querySelector('select');\n if (label && select) {\n this.#resizeObserver = new ResizeObserver(\n entries => (select!.style.minWidth = `${entries[0]!.contentRect.width + 36}px`)\n );\n this.#resizeObserver.observe(label);\n }\n }\n\n #setStep(value: number) {\n /* eslint-disable-next-line */\n this.step = value; // stateful due to internalized select element\n this.dispatchEvent(new CustomEvent('step-change', { detail: this.step, bubbles: true, composed: true }));\n this.#setValue(this.value!);\n }\n\n #setValue(value: number) {\n if (this.value !== value) {\n this.value = value;\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n\n if (this.#isLastPage) {\n this.dispatchEvent(new CustomEvent('last-page', { bubbles: true, composed: true }));\n }\n\n if (this.#isFirstPage) {\n this.dispatchEvent(new CustomEvent('first-page', { bubbles: true, composed: true }));\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiDO,IAAA,IAAA,cAAyB,EAA4C,CAAU,EAAE;CA8BtF;;gBAOgB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,aAAa,EACX,MAAM,SACR;EACF;;;4BAE4B;IACzB,EAAW,SAAS,MAAM;IAC1B,EAAO,SAAS,MAAM;EACzB;;CAGA,IAAI,mBAAqC;EACvC,OAAO;GACL,OAAO,KAAK,WAAY,iBAA8B,GAAG,EAAW,SAAS,IAAI,gBAAgB;GACjG,QAAQ;EACV;CACF;CAEA,IAAIA,KAAe;EACjB,QAAQ,KAAK,QAAS,KAAK,KAAK,OAAO,KAAK;CAC9C;CAEA,IAAIC,KAAc;EAChB,OAAO,KAAK,QAAQ,KAAK,UAAW,KAAK;CAC3C;CAEA,IAAIC,KAAe;EACjB,OAAO,KAAK,UAAU;CACxB;CAEA,IAAIC,KAAe;EACjB,IAAM,KAAS,KAAK,QAAS,KAAK,KAAK,OAAO,GACxC,IAAM,KAAK,IAAI,KAAK,QAAS,KAAK,MAAM,KAAK,SA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M,UAAU;EAAK,CAAC,CAAC,GAGhF,KAAKC,MACP,KAAK,cAAc,IAAI,YAAY,cAAc;GAAE,SAAS;GAAM,UAAU;EAAK,CAAC,CAAC;CAEvF;AACF;GAlNG,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAIzB,EAAS,EAAE,MAAM,MAAM,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAK1B,EAAS;CAAE,MAAM;CAAS,WAAW;AAAe,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,MAKrD,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAOxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA;CAtC3B,EAAQ;CACR,EAA8B;CAC9B,EAAe"}
|
|
1
|
+
{"version":3,"file":"pagination2.js","names":["#currentPage","#isLastPage","#isFirstPage","#selectLabel","#label","#previousButton","#setValue","#nextButton","#startButton","#endButton","#select","#setStep","#i18nController","#setupLabelWidth","#resizeObserver"],"sources":["../../src/pagination/pagination.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n I18nController,\n formatStandardNumber,\n keyNavigationList,\n typeSSR,\n useStyles,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { Select } from '@nvidia-elements/core/select';\nimport styles from './pagination.css?inline';\n\n/* eslint-disable jsdoc/no-types */\n// explicit jsdoc annotation due to inheritance context lost with CEM generator\n\n/**\n * @element nve-pagination\n * @description Pagination is a control that enables users to navigate through pages of content.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/pagination\n * @event input - Dispatched when the value (page) has changed\n * @event change - Dispatched when the value (page) has changed\n * @event first-page - Dispatched when the first page is active\n * @event last-page - Dispatched when the last page is active\n * @slot - default slot for content\n * @slot suffix-label - slot for overriding the \"n of total\" label when total is an approximation\n * @cssprop --background\n * @cssprop --font-size\n * @cssprop --width\n * @csspart icon-button - Base part applied to all icon button elements\n * @csspart previous-icon-button - The previous page icon button\n * @csspart next-icon-button - The next page icon button\n * @csspart start-icon-button - The first page icon button\n * @csspart end-icon-button - The last page icon button\n * @csspart select - The page size select element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n * @property {number} value - value the current page number\n */\n@typeSSR()\n@keyNavigationList<Pagination>()\n@scopedRegistry()\nexport class Pagination extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * The number of items per page.\n */\n @property({ type: Number }) step = 10;\n /**\n * The array of custom step-size.\n */\n @property({ type: Array }) stepSizes = [10, 20, 50, 100];\n\n /**\n * The total number of items.\n */\n @property({ type: Number }) items: number;\n\n /**\n * Whether the pagination is skippable to start/end.\n */\n @property({ type: Boolean }) skippable: boolean;\n\n /**\n * Whether the step selector has a disabled state.\n */\n @property({ type: Boolean, attribute: 'disable-step' }) disableStep: boolean;\n\n /**\n * Determines the container styles of component. Flat applies when nesting within other containers. Inline applies when placing within other inline content.\n */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pagination',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton,\n [Select.metadata.tag]: Select\n };\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n items: this.shadowRoot!.querySelectorAll<HTMLElement>(`${IconButton.metadata.tag}, input, select`),\n layout: 'horizontal'\n };\n }\n\n get #currentPage() {\n return (this.value! - 1) * this.step + this.step;\n }\n\n get #isLastPage() {\n return this.items / this.value! === this.step;\n }\n\n get #isFirstPage() {\n return this.value === 1;\n }\n\n get #selectLabel() {\n const start = (this.value! - 1) * this.step + 1;\n const end = Math.min(this.value! * this.step, this.items || Infinity);\n return `${formatStandardNumber(start)}-${formatStandardNumber(end)}`;\n }\n\n get #label() {\n return this.items\n ? html`<label><slot name=\"suffix-label\">${this.i18n.of} ${formatStandardNumber(this.items)}</slot></label>`\n : nothing;\n }\n\n get #previousButton() {\n return html`<nve-icon-button part=\"icon-button previous-icon-button\"\n @click=${() => this.#setValue(this.value! - 1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.previous}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #nextButton() {\n return html`<nve-icon-button part=\"icon-button next-icon-button\"\n @click=${() => this.#setValue(this.value! + 1)}\n .disabled=${this.disabled || this.#currentPage >= this.items}\n .ariaLabel=${this.i18n.next}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n get #startButton() {\n return html`<nve-icon-button part=\"icon-button start-icon-button\"\n @click=${() => this.#setValue(1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.start}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #endButton() {\n return html`<nve-icon-button part=\"icon-button end-icon-button\"\n @click=${() => this.#setValue(this.items / this.step)}\n .disabled=${this.disabled || (this.value! - 1) * this.step + this.step >= this.items}\n .ariaLabel=${this.i18n.end}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n #resizeObserver: ResizeObserver;\n\n get #select() {\n return this.disableStep\n ? html`<label>${this.#selectLabel} </label>`\n : html`\n <nve-select part=\"select\" .container=${this.container}>\n <select\n .ariaLabel=${this.i18n.currentPage}\n @change=${(e: Event) => this.#setStep(parseInt((e.target as HTMLSelectElement).value, 10))}\n value=${this.step}\n .disabled=${this.disabled || this.disableStep}\n >\n ${this.stepSizes.map(i => html`<option ?selected=${this.step === i} value=${i}>${i}</option>`)}\n </select>\n <div class=\"select-label\">${this.#selectLabel}</div>\n </nve-select>\n `;\n }\n\n render() {\n return html`\n <div internal-host role=\"presentation\">\n ${\n this.skippable && this.items\n ? html`\n ${this.#startButton} ${this.#previousButton} ${this.#select} ${this.#label} ${this.#nextButton}\n ${this.#endButton}\n `\n : html` ${this.#select} ${this.#label} ${this.#previousButton} ${this.#nextButton} `\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = 1;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n await this.updateComplete;\n this.#setupLabelWidth();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#resizeObserver?.unobserve(this);\n }\n\n #setupLabelWidth() {\n const label = this.shadowRoot!.querySelector('.select-label');\n const select = this.shadowRoot!.querySelector('select');\n if (label && select) {\n this.#resizeObserver = new ResizeObserver(\n entries => (select!.style.minWidth = `${entries[0]!.contentRect.width + 36}px`)\n );\n this.#resizeObserver.observe(label);\n }\n }\n\n #setStep(value: number) {\n /* eslint-disable-next-line */\n this.step = value; // stateful due to internalized select element\n this.dispatchEvent(new CustomEvent('step-change', { detail: this.step, bubbles: true, composed: true }));\n this.#setValue(this.value!);\n }\n\n #setValue(value: number) {\n if (this.value !== value) {\n this.value = value;\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n\n if (this.#isLastPage) {\n this.dispatchEvent(new CustomEvent('last-page', { bubbles: true, composed: true }));\n }\n\n if (this.#isFirstPage) {\n this.dispatchEvent(new CustomEvent('first-page', { bubbles: true, composed: true }));\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiDO,IAAA,IAAA,cAAyB,EAA4C,CAAU,EAAE;CA8BtF;;gBAOgB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,aAAa,EACX,MAAM,SACR;EACF;;;4BAE4B;IACzB,EAAW,SAAS,MAAM;IAC1B,EAAO,SAAS,MAAM;EACzB;;CAGA,IAAI,mBAAqC;EACvC,OAAO;GACL,OAAO,KAAK,WAAY,iBAA8B,GAAG,EAAW,SAAS,IAAI,gBAAgB;GACjG,QAAQ;EACV;CACF;CAEA,IAAIA,KAAe;EACjB,QAAQ,KAAK,QAAS,KAAK,KAAK,OAAO,KAAK;CAC9C;CAEA,IAAIC,KAAc;EAChB,OAAO,KAAK,QAAQ,KAAK,UAAW,KAAK;CAC3C;CAEA,IAAIC,KAAe;EACjB,OAAO,KAAK,UAAU;CACxB;CAEA,IAAIC,KAAe;EACjB,IAAM,KAAS,KAAK,QAAS,KAAK,KAAK,OAAO,GACxC,IAAM,KAAK,IAAI,KAAK,QAAS,KAAK,MAAM,KAAK,SAAS,QAAQ;EACpE,OAAO,GAAG,EAAqB,CAAK,EAAE,GAAG,EAAqB,CAAG;CACnE;CAEA,IAAIC,KAAS;EACX,OAAO,KAAK,QACR,CAAI,oCAAoC,KAAK,KAAK,GAAG,GAAG,EAAqB,KAAK,KAAK,EAAE,mBACzF;CACN;CAEA,IAAIC,KAAkB;EACpB,OAAO,CAAI,0EACM,KAAKC,GAAU,KAAK,QAAS,CAAC,EAAE,eACnC,KAAK,YAAY,KAAKN,MAAgB,KAAK,KAAK,gBAC/C,KAAK,KAAK,S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