@greypan/web-ui 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.CN.md +285 -93
- package/README.md +266 -87
- package/dist/assets/glass.js +1 -1
- package/dist/assets/glass.js.map +1 -1
- package/dist/assets/menu-portal.js +1 -1
- package/dist/assets/menu-portal.js.map +1 -1
- package/dist/assets/overlay-motion.js +1 -1
- package/dist/assets/overlay-motion.js.map +1 -1
- package/dist/components/autocomplete/index.d.ts +367 -4
- package/dist/components/autocomplete/index.js +87 -80
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/autocomplete/style.js +1 -1
- package/dist/components/autocomplete/style.js.map +1 -1
- package/dist/components/avatar/style.js +1 -1
- package/dist/components/avatar/style.js.map +1 -1
- package/dist/components/back-top/style.js +1 -1
- package/dist/components/back-top/style.js.map +1 -1
- package/dist/components/badge/style.js +1 -1
- package/dist/components/badge/style.js.map +1 -1
- package/dist/components/button/index.js +36 -32
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/style.js +1 -1
- package/dist/components/button/style.js.map +1 -1
- package/dist/components/button-group/style.js +1 -1
- package/dist/components/button-group/style.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +366 -5
- package/dist/components/checkbox/index.js +19 -31
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/style.js +1 -1
- package/dist/components/checkbox/style.js.map +1 -1
- package/dist/components/checkbox-group/index.d.ts +366 -4
- package/dist/components/checkbox-group/index.js +16 -25
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/collapse/index.d.ts +29 -1
- package/dist/components/collapse/index.js +105 -46
- package/dist/components/collapse/index.js.map +1 -1
- package/dist/components/collapse/style.js +1 -1
- package/dist/components/collapse/style.js.map +1 -1
- package/dist/components/context-menu/index.d.ts +7 -14
- package/dist/components/context-menu/index.js +113 -164
- package/dist/components/context-menu/index.js.map +1 -1
- package/dist/components/dialog/index.js +26 -25
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/style.js +1 -1
- package/dist/components/dialog/style.js.map +1 -1
- package/dist/components/drawer/index.js +71 -64
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/style.js +1 -1
- package/dist/components/drawer/style.js.map +1 -1
- package/dist/components/dropdown/index.d.ts +6 -14
- package/dist/components/dropdown/index.js +100 -156
- package/dist/components/dropdown/index.js.map +1 -1
- package/dist/components/dropdown-header/style.js +1 -1
- package/dist/components/dropdown-header/style.js.map +1 -1
- package/dist/components/dropdown-item/style.js +1 -1
- package/dist/components/dropdown-item/style.js.map +1 -1
- package/dist/components/empty/style.js +1 -1
- package/dist/components/empty/style.js.map +1 -1
- package/dist/components/image-preview/index.d.ts +58 -0
- package/dist/components/image-preview/index.js +481 -0
- package/dist/components/image-preview/index.js.map +1 -0
- package/dist/components/image-preview/style.js +6 -0
- package/dist/components/image-preview/style.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +20 -19
- package/dist/components/input/index.d.ts +366 -5
- package/dist/components/input/index.js +35 -47
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/style.js +1 -1
- package/dist/components/input/style.js.map +1 -1
- package/dist/components/input-number/index.d.ts +366 -5
- package/dist/components/input-number/index.js +31 -44
- package/dist/components/input-number/index.js.map +1 -1
- package/dist/components/input-number/style.js +1 -1
- package/dist/components/input-number/style.js.map +1 -1
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/index.js +5 -3
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/style.js +1 -1
- package/dist/components/layout/style.js.map +1 -1
- package/dist/components/option/style.js +1 -1
- package/dist/components/option/style.js.map +1 -1
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +55 -60
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/style.js +1 -1
- package/dist/components/popover/style.js.map +1 -1
- package/dist/components/radio/index.d.ts +366 -5
- package/dist/components/radio/index.js +21 -31
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/style.js +1 -1
- package/dist/components/radio/style.js.map +1 -1
- package/dist/components/radio-group/index.d.ts +366 -4
- package/dist/components/radio-group/index.js +16 -25
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/segmented/index.d.ts +366 -4
- package/dist/components/segmented/index.js +28 -35
- package/dist/components/segmented/index.js.map +1 -1
- package/dist/components/segmented/style.js +1 -1
- package/dist/components/segmented/style.js.map +1 -1
- package/dist/components/segmented-trigger/index.js +17 -15
- package/dist/components/segmented-trigger/index.js.map +1 -1
- package/dist/components/segmented-trigger/style.js +1 -1
- package/dist/components/segmented-trigger/style.js.map +1 -1
- package/dist/components/select/index.d.ts +368 -5
- package/dist/components/select/index.js +71 -68
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/style.js +1 -1
- package/dist/components/select/style.js.map +1 -1
- package/dist/components/slider/index.d.ts +366 -5
- package/dist/components/slider/index.js +40 -50
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/style.js +1 -1
- package/dist/components/slider/style.js.map +1 -1
- package/dist/components/spinner/style.js +1 -1
- package/dist/components/spinner/style.js.map +1 -1
- package/dist/components/svg-draw-lines/index.js +1 -1
- package/dist/components/svg-draw-lines/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +366 -5
- package/dist/components/switch/index.js +28 -38
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/style.js +1 -1
- package/dist/components/switch/style.js.map +1 -1
- package/dist/components/textarea/index.d.ts +366 -5
- package/dist/components/textarea/index.js +43 -57
- package/dist/components/textarea/index.js.map +1 -1
- package/dist/components/textarea/style.js +1 -1
- package/dist/components/textarea/style.js.map +1 -1
- package/dist/components/theme/index.js +1 -1
- package/dist/components/theme/index.js.map +1 -1
- package/dist/components/theme/style.js +1 -1
- package/dist/components/theme/style.js.map +1 -1
- package/dist/components/toast/manager.js +2 -2
- package/dist/components/toast/manager.js.map +1 -1
- package/dist/components/toast/style.js +1 -1
- package/dist/components/toast/style.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +43 -58
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/style.js +1 -1
- package/dist/components/tooltip/style.js.map +1 -1
- package/dist/icons/generated/radix-icons-reset.d.ts +6 -0
- package/dist/icons/generated/radix-icons-reset.js +10 -0
- package/dist/icons/generated/radix-icons-reset.js.map +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/shared/focus/pointer-focus.js +37 -0
- package/dist/shared/focus/pointer-focus.js.map +1 -0
- package/dist/shared/form-association/index.js +31 -4
- package/dist/shared/form-association/index.js.map +1 -1
- package/dist/shared/gesture/drag-gesture.js +53 -30
- package/dist/shared/gesture/drag-gesture.js.map +1 -1
- package/dist/shared/gesture/pinch-gesture.js +84 -0
- package/dist/shared/gesture/pinch-gesture.js.map +1 -0
- package/dist/shared/group-management/index.js.map +1 -1
- package/dist/shared/menu-behavior/index.js +112 -0
- package/dist/shared/menu-behavior/index.js.map +1 -0
- package/dist/shared/menu-portal/menu-portal.js.map +1 -1
- package/dist/shared/open-state/index.js +12 -0
- package/dist/shared/open-state/index.js.map +1 -0
- package/dist/shared/option-portal/combobox-shell.js +43 -0
- package/dist/shared/option-portal/combobox-shell.js.map +1 -0
- package/dist/shared/option-portal/index.js +22 -21
- package/dist/shared/option-portal/index.js.map +1 -1
- package/dist/shared/overlay/anchored-panel.js +33 -30
- package/dist/shared/overlay/anchored-panel.js.map +1 -1
- package/dist/shared/overlay/composition.js +57 -0
- package/dist/shared/overlay/composition.js.map +1 -0
- package/dist/shared/overlay/lifecycle.js +41 -0
- package/dist/shared/overlay/lifecycle.js.map +1 -0
- package/dist/shared/overlay/native-dialog-presence.js +15 -15
- package/dist/shared/overlay/native-dialog-presence.js.map +1 -1
- package/dist/shared/{theme → overlay}/overlay-root.js +1 -1
- package/dist/shared/overlay/overlay-root.js.map +1 -0
- package/dist/shared/overlay/overlay.js +43 -41
- package/dist/shared/overlay/overlay.js.map +1 -1
- package/dist/shared/overlay/placement-props.js +19 -0
- package/dist/shared/overlay/placement-props.js.map +1 -0
- package/dist/shared/overlay/portal.js +6 -4
- package/dist/shared/overlay/portal.js.map +1 -1
- package/dist/shared/overlay/positioning-generation.js +20 -0
- package/dist/shared/overlay/positioning-generation.js.map +1 -0
- package/dist/shared/{theme/theme-scope.js → overlay/theme-overlay-scope.js} +2 -2
- package/dist/shared/overlay/theme-overlay-scope.js.map +1 -0
- package/package.json +6 -10
- package/dist/shared/theme/overlay-root.js.map +0 -1
- package/dist/shared/theme/theme-scope.js.map +0 -1
|
@@ -1,7 +1,370 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
|
|
2
|
+
declare const WebUiSlider_base: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
formResetCallback(): void;
|
|
5
|
+
formDisabledCallback(disabled: boolean): void;
|
|
6
|
+
formStateRestoreCallback(state: File | FormData | string | null): void;
|
|
7
|
+
accessKey: string;
|
|
8
|
+
readonly accessKeyLabel: string;
|
|
9
|
+
autocapitalize: string;
|
|
10
|
+
autocorrect: boolean;
|
|
11
|
+
dir: string;
|
|
12
|
+
draggable: boolean;
|
|
13
|
+
hidden: boolean | "until-found";
|
|
14
|
+
inert: boolean;
|
|
15
|
+
innerText: string;
|
|
16
|
+
lang: string;
|
|
17
|
+
readonly offsetHeight: number;
|
|
18
|
+
readonly offsetLeft: number;
|
|
19
|
+
readonly offsetParent: Element | null;
|
|
20
|
+
readonly offsetTop: number;
|
|
21
|
+
readonly offsetWidth: number;
|
|
22
|
+
outerText: string;
|
|
23
|
+
popover: string | null;
|
|
24
|
+
spellcheck: boolean;
|
|
25
|
+
title: string;
|
|
26
|
+
translate: boolean;
|
|
27
|
+
writingSuggestions: string;
|
|
28
|
+
attachInternals(): ElementInternals;
|
|
29
|
+
click(): void;
|
|
30
|
+
hidePopover(): void;
|
|
31
|
+
showPopover(options?: ShowPopoverOptions): void;
|
|
32
|
+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
|
|
33
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
34
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
35
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
36
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
37
|
+
readonly attributes: NamedNodeMap;
|
|
38
|
+
get classList(): DOMTokenList;
|
|
39
|
+
set classList(value: string);
|
|
40
|
+
className: string;
|
|
41
|
+
readonly clientHeight: number;
|
|
42
|
+
readonly clientLeft: number;
|
|
43
|
+
readonly clientTop: number;
|
|
44
|
+
readonly clientWidth: number;
|
|
45
|
+
readonly currentCSSZoom: number;
|
|
46
|
+
readonly customElementRegistry: CustomElementRegistry | null;
|
|
47
|
+
id: string;
|
|
48
|
+
innerHTML: string;
|
|
49
|
+
readonly localName: string;
|
|
50
|
+
readonly namespaceURI: string | null;
|
|
51
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
52
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
53
|
+
outerHTML: string;
|
|
54
|
+
readonly ownerDocument: Document;
|
|
55
|
+
get part(): DOMTokenList;
|
|
56
|
+
set part(value: string);
|
|
57
|
+
readonly prefix: string | null;
|
|
58
|
+
readonly scrollHeight: number;
|
|
59
|
+
scrollLeft: number;
|
|
60
|
+
scrollTop: number;
|
|
61
|
+
readonly scrollWidth: number;
|
|
62
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
63
|
+
slot: string;
|
|
64
|
+
readonly tagName: string;
|
|
65
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
66
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
67
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
68
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
69
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
70
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
71
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
72
|
+
getAttribute(qualifiedName: string): string | null;
|
|
73
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
74
|
+
getAttributeNames(): string[];
|
|
75
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
76
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
77
|
+
getBoundingClientRect(): DOMRect;
|
|
78
|
+
getClientRects(): DOMRectList;
|
|
79
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
80
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
81
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
82
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
83
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
84
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
85
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
86
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
87
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
88
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
89
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
90
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
91
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
92
|
+
hasAttributes(): boolean;
|
|
93
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
94
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
95
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
96
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
97
|
+
matches<K extends keyof HTMLElementTagNameMap>(selectors: K): this is HTMLElementTagNameMap[K];
|
|
98
|
+
matches<K extends keyof SVGElementTagNameMap>(selectors: K): this is SVGElementTagNameMap[K];
|
|
99
|
+
matches<K extends keyof MathMLElementTagNameMap>(selectors: K): this is MathMLElementTagNameMap[K];
|
|
100
|
+
matches(selectors: string): boolean;
|
|
101
|
+
releasePointerCapture(pointerId: number): void;
|
|
102
|
+
removeAttribute(qualifiedName: string): void;
|
|
103
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
104
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
105
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
106
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
107
|
+
scroll(options?: ScrollToOptions): void;
|
|
108
|
+
scroll(x: number, y: number): void;
|
|
109
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
110
|
+
scrollBy(x: number, y: number): void;
|
|
111
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
112
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
113
|
+
scrollTo(x: number, y: number): void;
|
|
114
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
115
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
116
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
117
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
118
|
+
setHTMLUnsafe(html: string): void;
|
|
119
|
+
setPointerCapture(pointerId: number): void;
|
|
120
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
121
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
122
|
+
get textContent(): string;
|
|
123
|
+
set textContent(value: string | null);
|
|
124
|
+
readonly baseURI: string;
|
|
125
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
126
|
+
readonly firstChild: ChildNode | null;
|
|
127
|
+
readonly isConnected: boolean;
|
|
128
|
+
readonly lastChild: ChildNode | null;
|
|
129
|
+
readonly nextSibling: ChildNode | null;
|
|
130
|
+
readonly nodeName: string;
|
|
131
|
+
readonly nodeType: number;
|
|
132
|
+
nodeValue: string | null;
|
|
133
|
+
readonly parentElement: HTMLElement | null;
|
|
134
|
+
readonly parentNode: ParentNode | null;
|
|
135
|
+
readonly previousSibling: ChildNode | null;
|
|
136
|
+
appendChild<T extends Node>(node: T): T;
|
|
137
|
+
cloneNode(subtree?: boolean): Node;
|
|
138
|
+
compareDocumentPosition(other: Node): number;
|
|
139
|
+
contains(other: Node | null): boolean;
|
|
140
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
141
|
+
hasChildNodes(): boolean;
|
|
142
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
143
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
144
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
145
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
146
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
147
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
148
|
+
normalize(): void;
|
|
149
|
+
removeChild<T extends Node>(child: T): T;
|
|
150
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
151
|
+
readonly ELEMENT_NODE: 1;
|
|
152
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
153
|
+
readonly TEXT_NODE: 3;
|
|
154
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
155
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
156
|
+
readonly ENTITY_NODE: 6;
|
|
157
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
158
|
+
readonly COMMENT_NODE: 8;
|
|
159
|
+
readonly DOCUMENT_NODE: 9;
|
|
160
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
161
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
162
|
+
readonly NOTATION_NODE: 12;
|
|
163
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
164
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
165
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
166
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
167
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
168
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
169
|
+
dispatchEvent(event: Event): boolean;
|
|
170
|
+
ariaActiveDescendantElement: Element | null;
|
|
171
|
+
ariaAtomic: string | null;
|
|
172
|
+
ariaAutoComplete: string | null;
|
|
173
|
+
ariaBrailleLabel: string | null;
|
|
174
|
+
ariaBrailleRoleDescription: string | null;
|
|
175
|
+
ariaBusy: string | null;
|
|
176
|
+
ariaChecked: string | null;
|
|
177
|
+
ariaColCount: string | null;
|
|
178
|
+
ariaColIndex: string | null;
|
|
179
|
+
ariaColIndexText: string | null;
|
|
180
|
+
ariaColSpan: string | null;
|
|
181
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
182
|
+
ariaCurrent: string | null;
|
|
183
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
184
|
+
ariaDescription: string | null;
|
|
185
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
186
|
+
ariaDisabled: string | null;
|
|
187
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
188
|
+
ariaExpanded: string | null;
|
|
189
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
190
|
+
ariaHasPopup: string | null;
|
|
191
|
+
ariaHidden: string | null;
|
|
192
|
+
ariaInvalid: string | null;
|
|
193
|
+
ariaKeyShortcuts: string | null;
|
|
194
|
+
ariaLabel: string | null;
|
|
195
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
196
|
+
ariaLevel: string | null;
|
|
197
|
+
ariaLive: string | null;
|
|
198
|
+
ariaModal: string | null;
|
|
199
|
+
ariaMultiLine: string | null;
|
|
200
|
+
ariaMultiSelectable: string | null;
|
|
201
|
+
ariaOrientation: string | null;
|
|
202
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
203
|
+
ariaPlaceholder: string | null;
|
|
204
|
+
ariaPosInSet: string | null;
|
|
205
|
+
ariaPressed: string | null;
|
|
206
|
+
ariaReadOnly: string | null;
|
|
207
|
+
ariaRelevant: string | null;
|
|
208
|
+
ariaRequired: string | null;
|
|
209
|
+
ariaRoleDescription: string | null;
|
|
210
|
+
ariaRowCount: string | null;
|
|
211
|
+
ariaRowIndex: string | null;
|
|
212
|
+
ariaRowIndexText: string | null;
|
|
213
|
+
ariaRowSpan: string | null;
|
|
214
|
+
ariaSelected: string | null;
|
|
215
|
+
ariaSetSize: string | null;
|
|
216
|
+
ariaSort: string | null;
|
|
217
|
+
ariaValueMax: string | null;
|
|
218
|
+
ariaValueMin: string | null;
|
|
219
|
+
ariaValueNow: string | null;
|
|
220
|
+
ariaValueText: string | null;
|
|
221
|
+
role: string | null;
|
|
222
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
223
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
224
|
+
after(...nodes: (Node | string)[]): void;
|
|
225
|
+
before(...nodes: (Node | string)[]): void;
|
|
226
|
+
remove(): void;
|
|
227
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
228
|
+
readonly nextElementSibling: Element | null;
|
|
229
|
+
readonly previousElementSibling: Element | null;
|
|
230
|
+
readonly childElementCount: number;
|
|
231
|
+
readonly children: HTMLCollection;
|
|
232
|
+
readonly firstElementChild: Element | null;
|
|
233
|
+
readonly lastElementChild: Element | null;
|
|
234
|
+
append(...nodes: (Node | string)[]): void;
|
|
235
|
+
moveBefore(node: Node, child: Node | null): void;
|
|
236
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
237
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
238
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
239
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
240
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
241
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
242
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
243
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
244
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
245
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
246
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
247
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
248
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
249
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
250
|
+
get style(): CSSStyleDeclaration;
|
|
251
|
+
set style(cssText: string);
|
|
252
|
+
contentEditable: string;
|
|
253
|
+
enterKeyHint: string;
|
|
254
|
+
inputMode: string;
|
|
255
|
+
readonly isContentEditable: boolean;
|
|
256
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
257
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
258
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
259
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
260
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
261
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
262
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
263
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
264
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
265
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
266
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
267
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
269
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
271
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
272
|
+
oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
275
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
277
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
279
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
280
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
281
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
282
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
283
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
284
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
285
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
286
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
287
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
288
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
289
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
290
|
+
onerror: OnErrorEventHandler;
|
|
291
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
292
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
293
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
294
|
+
oninput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
295
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
297
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
298
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
299
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
300
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
303
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
304
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
305
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
306
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
307
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
308
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
309
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
310
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
311
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
312
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
316
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
317
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
318
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
319
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
320
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
321
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
322
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
323
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
324
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
325
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
326
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
327
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
328
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
330
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
331
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
334
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
335
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
337
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
338
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
339
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
340
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
341
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
342
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
343
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
344
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
345
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
346
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
347
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
348
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
349
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
350
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
351
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
352
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
353
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
354
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
355
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
356
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
357
|
+
autofocus: boolean;
|
|
358
|
+
readonly dataset: DOMStringMap;
|
|
359
|
+
nonce: string;
|
|
360
|
+
tabIndex: number;
|
|
361
|
+
blur(): void;
|
|
362
|
+
focus(options?: FocusOptions): void;
|
|
363
|
+
};
|
|
364
|
+
formAssociated: boolean;
|
|
365
|
+
} & typeof LitElement;
|
|
366
|
+
export declare class WebUiSlider extends WebUiSlider_base {
|
|
3
367
|
static styles: import('lit').CSSResult[];
|
|
4
|
-
static formAssociated: boolean;
|
|
5
368
|
disabled: boolean;
|
|
6
369
|
marks: boolean;
|
|
7
370
|
vertical: boolean;
|
|
@@ -28,9 +391,6 @@ export declare class WebUiSlider extends LitElement {
|
|
|
28
391
|
private readonly _formAssociationController;
|
|
29
392
|
private get _isDisabled();
|
|
30
393
|
willUpdate(changed: Map<string, unknown>): void;
|
|
31
|
-
formResetCallback(): void;
|
|
32
|
-
formDisabledCallback(disabled: boolean): void;
|
|
33
|
-
formStateRestoreCallback(state: string | File | FormData | null): void;
|
|
34
394
|
focus(options?: FocusOptions): void;
|
|
35
395
|
blur(): void;
|
|
36
396
|
private get _slider();
|
|
@@ -56,3 +416,4 @@ declare global {
|
|
|
56
416
|
'web-ui-slider': WebUiSlider;
|
|
57
417
|
}
|
|
58
418
|
}
|
|
419
|
+
export {};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import e from "../../_virtual/_@oxc-project_runtime@0.146.0/helpers/esm/decorate.js";
|
|
2
2
|
import t from "../../assets/glass.js";
|
|
3
|
-
import {
|
|
4
|
-
import { normalizeNumber as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
3
|
+
import { FormAssociated as n, FormAssociationController as r, defineFormAssociation as i } from "../../shared/form-association/index.js";
|
|
4
|
+
import { normalizeNumber as a } from "../../shared/normalize/index.js";
|
|
5
|
+
import { installPointerFocusSuppression as o } from "../../shared/focus/pointer-focus.js";
|
|
6
|
+
import { attachDragGesture as s } from "../../shared/gesture/drag-gesture.js";
|
|
7
|
+
import { clamp as c } from "../../shared/gesture/physics.js";
|
|
8
|
+
import l from "./style.js";
|
|
9
|
+
import { LitElement as u, html as d, unsafeCSS as f } from "lit";
|
|
10
|
+
import { customElement as p, property as m, state as h } from "lit/decorators.js";
|
|
11
|
+
import { classMap as g } from "lit/directives/class-map.js";
|
|
12
|
+
import { styleMap as _ } from "lit/directives/style-map.js";
|
|
12
13
|
//#region src/components/slider/index.ts
|
|
13
|
-
|
|
14
|
+
o();
|
|
15
|
+
var v = class extends n(u) {
|
|
14
16
|
constructor(...e) {
|
|
15
|
-
super(...e), this.disabled = !1, this.marks = !1, this.vertical = !1, this.name = "", this.required = !1, this._value = 0, this._min = 0, this._max = 100, this._step = 1, this._dragging = !1, this._pressed = !1, this._dragGestureHandle = null, this._formAssociation =
|
|
17
|
+
super(...e), this.disabled = !1, this.marks = !1, this.vertical = !1, this.name = "", this.required = !1, this._value = 0, this._min = 0, this._max = 100, this._step = 1, this._dragging = !1, this._pressed = !1, this._dragGestureHandle = null, this._formAssociation = i({
|
|
16
18
|
host: this,
|
|
17
19
|
initialize: () => {
|
|
18
20
|
this._value = this._normalizeValue(this._value);
|
|
@@ -31,38 +33,35 @@ var g = class extends c {
|
|
|
31
33
|
syncValidity: (e) => {
|
|
32
34
|
typeof e.setValidity == "function" && e.setValidity({});
|
|
33
35
|
}
|
|
34
|
-
}).make(), this._formAssociationController = new
|
|
36
|
+
}).make(), this._formAssociationController = new r(this, this._formAssociation);
|
|
35
37
|
}
|
|
36
38
|
static {
|
|
37
|
-
this.styles = [
|
|
38
|
-
}
|
|
39
|
-
static {
|
|
40
|
-
this.formAssociated = !0;
|
|
39
|
+
this.styles = [f(t), f(l)];
|
|
41
40
|
}
|
|
42
41
|
get value() {
|
|
43
42
|
return this._value;
|
|
44
43
|
}
|
|
45
44
|
set value(e) {
|
|
46
|
-
let t =
|
|
45
|
+
let t = a(e, -Infinity, Infinity, 0), n = this._value;
|
|
47
46
|
this._value = t, this._formAssociation.sync(), this.requestUpdate("value", n);
|
|
48
47
|
}
|
|
49
48
|
get min() {
|
|
50
49
|
return this._min;
|
|
51
50
|
}
|
|
52
51
|
set min(e) {
|
|
53
|
-
this._min =
|
|
52
|
+
this._min = a(e, -Infinity, Infinity, 0);
|
|
54
53
|
}
|
|
55
54
|
get max() {
|
|
56
55
|
return this._max;
|
|
57
56
|
}
|
|
58
57
|
set max(e) {
|
|
59
|
-
this._max =
|
|
58
|
+
this._max = a(e, -Infinity, Infinity, 100);
|
|
60
59
|
}
|
|
61
60
|
get step() {
|
|
62
61
|
return this._step;
|
|
63
62
|
}
|
|
64
63
|
set step(e) {
|
|
65
|
-
this._step =
|
|
64
|
+
this._step = a(e, -Infinity, Infinity, 1);
|
|
66
65
|
}
|
|
67
66
|
disconnectedCallback() {
|
|
68
67
|
super.disconnectedCallback(), this._dragGestureHandle?.destroy(), this._dragGestureHandle = null;
|
|
@@ -76,15 +75,6 @@ var g = class extends c {
|
|
|
76
75
|
e !== this.value && (this.value = e);
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
|
-
formResetCallback() {
|
|
80
|
-
this._formAssociation.reset();
|
|
81
|
-
}
|
|
82
|
-
formDisabledCallback(e) {
|
|
83
|
-
this._formAssociation.setDisabled(e);
|
|
84
|
-
}
|
|
85
|
-
formStateRestoreCallback(e) {
|
|
86
|
-
this._formAssociation.restore(e);
|
|
87
|
-
}
|
|
88
78
|
focus(e) {
|
|
89
79
|
this._slider?.focus(e);
|
|
90
80
|
}
|
|
@@ -110,7 +100,7 @@ var g = class extends c {
|
|
|
110
100
|
}
|
|
111
101
|
_normalizeValue(e) {
|
|
112
102
|
if (!Number.isFinite(e)) return this.min;
|
|
113
|
-
let t = Math.min(this.min, this.max), n = Math.max(this.min, this.max), r =
|
|
103
|
+
let t = Math.min(this.min, this.max), n = Math.max(this.min, this.max), r = c(e, t, n), i = Math.round((r - t) / this._safeStep);
|
|
114
104
|
return Number((t + i * this._safeStep).toFixed(this._precision));
|
|
115
105
|
}
|
|
116
106
|
get _precision() {
|
|
@@ -134,15 +124,15 @@ var g = class extends c {
|
|
|
134
124
|
let n = t.getBoundingClientRect();
|
|
135
125
|
if (this.vertical) {
|
|
136
126
|
if (n.height <= 0) return !1;
|
|
137
|
-
let t =
|
|
127
|
+
let t = c(1 - (e.clientY - n.top) / n.height, 0, 1);
|
|
138
128
|
return this._setValue(this.min + t * this._range);
|
|
139
129
|
}
|
|
140
130
|
if (n.width <= 0) return !1;
|
|
141
|
-
let r =
|
|
131
|
+
let r = c((e.clientX - n.left) / n.width, 0, 1);
|
|
142
132
|
return this._setValue(this.min + r * this._range);
|
|
143
133
|
}
|
|
144
134
|
_handlePointerDown(e) {
|
|
145
|
-
this._isDisabled || (this._pressed = !0, this._interactionStartValue = this.value, this._setValueFromPointer(e), this._dragGestureHandle?.destroy(), this._dragGestureHandle =
|
|
135
|
+
this._isDisabled || (this._pressed = !0, this._interactionStartValue = this.value, this._setValueFromPointer(e), this._dragGestureHandle?.destroy(), this._dragGestureHandle = s(e, {
|
|
146
136
|
axis: this.vertical ? "y" : "x",
|
|
147
137
|
threshold: 6,
|
|
148
138
|
onMove: (e, t) => {
|
|
@@ -183,17 +173,17 @@ var g = class extends c {
|
|
|
183
173
|
})));
|
|
184
174
|
}
|
|
185
175
|
render() {
|
|
186
|
-
let e =
|
|
176
|
+
let e = g({
|
|
187
177
|
"wui-slider-track": !0,
|
|
188
178
|
"is-dragging": this._dragging,
|
|
189
179
|
"is-disabled": this._isDisabled
|
|
190
|
-
}), t =
|
|
180
|
+
}), t = g({
|
|
191
181
|
"wui-slider-thumb": !0,
|
|
192
182
|
"wui-glass": !0,
|
|
193
183
|
"is-pressed": this._pressed,
|
|
194
184
|
"is-dragging": this._dragging
|
|
195
|
-
}), n =
|
|
196
|
-
return
|
|
185
|
+
}), n = _({ "--percent": `${this._percent}%` });
|
|
186
|
+
return d`
|
|
197
187
|
<div
|
|
198
188
|
class=${e}
|
|
199
189
|
style=${n}
|
|
@@ -210,9 +200,9 @@ var g = class extends c {
|
|
|
210
200
|
>
|
|
211
201
|
<div class="wui-slider-progress"></div>
|
|
212
202
|
<div class="wui-slider-marks">
|
|
213
|
-
${this._markValues.map((e) =>
|
|
203
|
+
${this._markValues.map((e) => d`<span
|
|
214
204
|
class="wui-slider-mark"
|
|
215
|
-
style=${
|
|
205
|
+
style=${_({ "--percent": `${(e - this.min) / this._range * 100}%` })}
|
|
216
206
|
></span>`)}
|
|
217
207
|
</div>
|
|
218
208
|
<div class=${t}></div>
|
|
@@ -220,35 +210,35 @@ var g = class extends c {
|
|
|
220
210
|
`;
|
|
221
211
|
}
|
|
222
212
|
};
|
|
223
|
-
e([
|
|
213
|
+
e([m({
|
|
224
214
|
type: Boolean,
|
|
225
215
|
reflect: !0
|
|
226
|
-
})],
|
|
216
|
+
})], v.prototype, "disabled", void 0), e([m({
|
|
227
217
|
type: Boolean,
|
|
228
218
|
reflect: !0
|
|
229
|
-
})],
|
|
219
|
+
})], v.prototype, "marks", void 0), e([m({
|
|
230
220
|
type: Boolean,
|
|
231
221
|
reflect: !0
|
|
232
|
-
})],
|
|
222
|
+
})], v.prototype, "vertical", void 0), e([m({
|
|
233
223
|
type: String,
|
|
234
224
|
reflect: !0
|
|
235
|
-
})],
|
|
225
|
+
})], v.prototype, "name", void 0), e([m({
|
|
236
226
|
type: Boolean,
|
|
237
227
|
reflect: !0
|
|
238
|
-
})],
|
|
228
|
+
})], v.prototype, "required", void 0), e([m({
|
|
239
229
|
type: Number,
|
|
240
230
|
reflect: !0
|
|
241
|
-
})],
|
|
231
|
+
})], v.prototype, "value", null), e([m({
|
|
242
232
|
type: Number,
|
|
243
233
|
reflect: !0
|
|
244
|
-
})],
|
|
234
|
+
})], v.prototype, "min", null), e([m({
|
|
245
235
|
type: Number,
|
|
246
236
|
reflect: !0
|
|
247
|
-
})],
|
|
237
|
+
})], v.prototype, "max", null), e([m({
|
|
248
238
|
type: Number,
|
|
249
239
|
reflect: !0
|
|
250
|
-
})],
|
|
240
|
+
})], v.prototype, "step", null), e([h()], v.prototype, "_dragging", void 0), e([h()], v.prototype, "_pressed", void 0), v = e([p("web-ui-slider")], v);
|
|
251
241
|
//#endregion
|
|
252
|
-
export {
|
|
242
|
+
export { v as WebUiSlider };
|
|
253
243
|
|
|
254
244
|
//# sourceMappingURL=index.js.map
|