@webtides/element-library 0.1.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/CHANGELOG.md +109 -0
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/all.js +26 -0
- package/custom-elements.json +7683 -0
- package/index.js +3 -0
- package/package.json +132 -0
- package/patches/@glidejs+glide+3.6.2.patch +11 -0
- package/src/components/accordion/accordion.changelog.md +47 -0
- package/src/components/accordion/accordion.define.js +3 -0
- package/src/components/accordion/accordion.events.js +3 -0
- package/src/components/accordion/accordion.js +144 -0
- package/src/components/accordion/accordion.readme.md +71 -0
- package/src/components/accordion/accordion.style.js +64 -0
- package/src/components/accordion-group/accordion-group.changelog.md +35 -0
- package/src/components/accordion-group/accordion-group.define.js +3 -0
- package/src/components/accordion-group/accordion-group.js +63 -0
- package/src/components/accordion-group/accordion-group.readme.md +56 -0
- package/src/components/amount-field/amount-field.changelog.md +40 -0
- package/src/components/amount-field/amount-field.define.js +3 -0
- package/src/components/amount-field/amount-field.js +91 -0
- package/src/components/amount-field/amount-field.readme.md +65 -0
- package/src/components/amount-field/amount-field.style.js +58 -0
- package/src/components/button/button.changelog.md +19 -0
- package/src/components/button/button.define.js +3 -0
- package/src/components/button/button.js +174 -0
- package/src/components/button/button.readme.md +91 -0
- package/src/components/button/button.style.js +251 -0
- package/src/components/carousel/carousel.changelog.md +58 -0
- package/src/components/carousel/carousel.define.js +3 -0
- package/src/components/carousel/carousel.events.js +3 -0
- package/src/components/carousel/carousel.js +232 -0
- package/src/components/carousel/carousel.readme.md +78 -0
- package/src/components/carousel/carousel.style.js +142 -0
- package/src/components/carousel/glide/components/ShadowAnchors.js +12 -0
- package/src/components/carousel/glide/components/ShadowClones.js +41 -0
- package/src/components/carousel/glide/components/ShadowGaps.js +28 -0
- package/src/components/carousel/glide/components/ShadowHtml.js +32 -0
- package/src/components/checkbox-field/checkbox-field.changelog.md +47 -0
- package/src/components/checkbox-field/checkbox-field.define.js +3 -0
- package/src/components/checkbox-field/checkbox-field.js +102 -0
- package/src/components/checkbox-field/checkbox-field.readme.md +66 -0
- package/src/components/checkbox-field/checkbox-field.style.js +69 -0
- package/src/components/dialog/dialog.changelog.md +24 -0
- package/src/components/dialog/dialog.define.js +3 -0
- package/src/components/dialog/dialog.events.js +8 -0
- package/src/components/dialog/dialog.js +271 -0
- package/src/components/dialog/dialog.readme.md +122 -0
- package/src/components/dialog/dialog.style.js +124 -0
- package/src/components/dropdown/dropdown.changelog.md +39 -0
- package/src/components/dropdown/dropdown.define.js +3 -0
- package/src/components/dropdown/dropdown.js +98 -0
- package/src/components/dropdown/dropdown.readme.md +69 -0
- package/src/components/dropdown/dropdown.style.js +17 -0
- package/src/components/form-field/form-field.changelog.md +35 -0
- package/src/components/form-field/form-field.define.js +3 -0
- package/src/components/form-field/form-field.events.js +4 -0
- package/src/components/form-field/form-field.js +210 -0
- package/src/components/form-field/form-field.readme.md +80 -0
- package/src/components/form-field/form-field.style.js +25 -0
- package/src/components/input-field/input-field.changelog.md +39 -0
- package/src/components/input-field/input-field.define.js +3 -0
- package/src/components/input-field/input-field.js +71 -0
- package/src/components/input-field/input-field.readme.md +90 -0
- package/src/components/input-field/input-field.style.js +33 -0
- package/src/components/lazy-src/lazy-src.changelog.md +57 -0
- package/src/components/lazy-src/lazy-src.define.js +3 -0
- package/src/components/lazy-src/lazy-src.events.js +5 -0
- package/src/components/lazy-src/lazy-src.js +100 -0
- package/src/components/lazy-src/lazy-src.readme.md +63 -0
- package/src/components/notification/notification.changelog.md +22 -0
- package/src/components/notification/notification.define.js +3 -0
- package/src/components/notification/notification.events.js +6 -0
- package/src/components/notification/notification.js +280 -0
- package/src/components/notification/notification.readme.md +98 -0
- package/src/components/notification/notification.style.js +113 -0
- package/src/components/password-field/password-field.changelog.md +22 -0
- package/src/components/password-field/password-field.define.js +3 -0
- package/src/components/password-field/password-field.js +113 -0
- package/src/components/password-field/password-field.readme.md +60 -0
- package/src/components/password-field/password-field.style.js +62 -0
- package/src/components/radio-field/radio-field.changelog.md +21 -0
- package/src/components/radio-field/radio-field.define.js +3 -0
- package/src/components/radio-field/radio-field.js +140 -0
- package/src/components/radio-field/radio-field.readme.md +72 -0
- package/src/components/radio-field/radio-field.style.js +108 -0
- package/src/components/scroll-to/scroll-to.changelog.md +39 -0
- package/src/components/scroll-to/scroll-to.define.js +3 -0
- package/src/components/scroll-to/scroll-to.js +40 -0
- package/src/components/scroll-to/scroll-to.readme.md +50 -0
- package/src/components/scroll-to-top/scroll-to-top.changelog.md +39 -0
- package/src/components/scroll-to-top/scroll-to-top.define.js +3 -0
- package/src/components/scroll-to-top/scroll-to-top.js +78 -0
- package/src/components/scroll-to-top/scroll-to-top.readme.md +48 -0
- package/src/components/scroll-to-top/scroll-to-top.style.js +9 -0
- package/src/components/select-field/select-field.changelog.md +30 -0
- package/src/components/select-field/select-field.define.js +3 -0
- package/src/components/select-field/select-field.js +83 -0
- package/src/components/select-field/select-field.readme.md +131 -0
- package/src/components/select-field/select-field.style.js +24 -0
- package/src/components/slider/slider.changelog.md +177 -0
- package/src/components/slider/slider.define.js +3 -0
- package/src/components/slider/slider.events.js +4 -0
- package/src/components/slider/slider.js +338 -0
- package/src/components/slider/slider.readme.md +87 -0
- package/src/components/slider/slider.style.js +107 -0
- package/src/components/sticky/sticky.changelog.md +43 -0
- package/src/components/sticky/sticky.define.js +3 -0
- package/src/components/sticky/sticky.js +105 -0
- package/src/components/sticky/sticky.readme.md +63 -0
- package/src/components/sticky/sticky.style.js +21 -0
- package/src/components/svg-use/svg-use.changelog.md +41 -0
- package/src/components/svg-use/svg-use.define.js +3 -0
- package/src/components/svg-use/svg-use.js +39 -0
- package/src/components/svg-use/svg-use.readme.md +50 -0
- package/src/components/svg-use/svg-use.style.js +20 -0
- package/src/components/switch-field/switch-field.changelog.md +21 -0
- package/src/components/switch-field/switch-field.define.js +3 -0
- package/src/components/switch-field/switch-field.js +99 -0
- package/src/components/switch-field/switch-field.readme.md +58 -0
- package/src/components/switch-field/switch-field.style.js +98 -0
- package/src/components/tab-group/tab-group.changelog.md +35 -0
- package/src/components/tab-group/tab-group.define.js +3 -0
- package/src/components/tab-group/tab-group.js +109 -0
- package/src/components/tab-group/tab-group.readme.md +61 -0
- package/src/components/tab-group/tab-group.style.js +7 -0
- package/src/components/tab-link/tab-link.changelog.md +35 -0
- package/src/components/tab-link/tab-link.define.js +3 -0
- package/src/components/tab-link/tab-link.js +50 -0
- package/src/components/tab-link/tab-link.readme.md +66 -0
- package/src/components/tab-link/tab-link.style.js +32 -0
- package/src/components/tab-panel/tab-panel.changelog.md +39 -0
- package/src/components/tab-panel/tab-panel.define.js +3 -0
- package/src/components/tab-panel/tab-panel.js +30 -0
- package/src/components/tab-panel/tab-panel.readme.md +57 -0
- package/src/components/tab-panel/tab-panel.style.js +7 -0
- package/src/components/textarea-field/textarea-field.changelog.md +39 -0
- package/src/components/textarea-field/textarea-field.define.js +3 -0
- package/src/components/textarea-field/textarea-field.js +62 -0
- package/src/components/textarea-field/textarea-field.readme.md +102 -0
- package/src/components/textarea-field/textarea-field.style.js +7 -0
- package/src/components/transition-classes/transition-classes.changelog.md +39 -0
- package/src/components/transition-classes/transition-classes.define.js +3 -0
- package/src/components/transition-classes/transition-classes.js +154 -0
- package/src/components/transition-classes/transition-classes.readme.md +71 -0
- package/src/themes/default.css +165 -0
- package/src/themes/high-contrast.css +147 -0
- package/src/themes/sketchy.css +238 -0
- package/types/all.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/src/components/accordion/accordion.d.ts +60 -0
- package/types/src/components/accordion/accordion.define.d.ts +1 -0
- package/types/src/components/accordion/accordion.events.d.ts +4 -0
- package/types/src/components/accordion/accordion.style.d.ts +2 -0
- package/types/src/components/accordion-group/accordion-group.d.ts +28 -0
- package/types/src/components/accordion-group/accordion-group.define.d.ts +1 -0
- package/types/src/components/amount-field/amount-field.d.ts +53 -0
- package/types/src/components/amount-field/amount-field.define.d.ts +1 -0
- package/types/src/components/amount-field/amount-field.style.d.ts +2 -0
- package/types/src/components/button/button.d.ts +73 -0
- package/types/src/components/button/button.define.d.ts +1 -0
- package/types/src/components/button/button.style.d.ts +2 -0
- package/types/src/components/carousel/carousel.d.ts +79 -0
- package/types/src/components/carousel/carousel.define.d.ts +1 -0
- package/types/src/components/carousel/carousel.events.d.ts +4 -0
- package/types/src/components/carousel/carousel.style.d.ts +2 -0
- package/types/src/components/carousel/glide/components/ShadowAnchors.d.ts +1 -0
- package/types/src/components/carousel/glide/components/ShadowClones.d.ts +1 -0
- package/types/src/components/carousel/glide/components/ShadowGaps.d.ts +1 -0
- package/types/src/components/carousel/glide/components/ShadowHtml.d.ts +1 -0
- package/types/src/components/checkbox-field/checkbox-field.d.ts +69 -0
- package/types/src/components/checkbox-field/checkbox-field.define.d.ts +1 -0
- package/types/src/components/checkbox-field/checkbox-field.style.d.ts +2 -0
- package/types/src/components/dialog/dialog.d.ts +103 -0
- package/types/src/components/dialog/dialog.define.d.ts +1 -0
- package/types/src/components/dialog/dialog.events.d.ts +9 -0
- package/types/src/components/dialog/dialog.style.d.ts +2 -0
- package/types/src/components/dropdown/dropdown.d.ts +45 -0
- package/types/src/components/dropdown/dropdown.define.d.ts +1 -0
- package/types/src/components/dropdown/dropdown.style.d.ts +2 -0
- package/types/src/components/form-field/form-field.d.ts +110 -0
- package/types/src/components/form-field/form-field.define.d.ts +1 -0
- package/types/src/components/form-field/form-field.events.d.ts +5 -0
- package/types/src/components/form-field/form-field.style.d.ts +2 -0
- package/types/src/components/input-field/input-field.d.ts +38 -0
- package/types/src/components/input-field/input-field.define.d.ts +1 -0
- package/types/src/components/input-field/input-field.style.d.ts +2 -0
- package/types/src/components/lazy-src/lazy-src.d.ts +46 -0
- package/types/src/components/lazy-src/lazy-src.define.d.ts +1 -0
- package/types/src/components/lazy-src/lazy-src.events.d.ts +6 -0
- package/types/src/components/notification/notification.d.ts +92 -0
- package/types/src/components/notification/notification.define.d.ts +1 -0
- package/types/src/components/notification/notification.events.d.ts +7 -0
- package/types/src/components/notification/notification.style.d.ts +2 -0
- package/types/src/components/password-field/password-field.d.ts +66 -0
- package/types/src/components/password-field/password-field.define.d.ts +1 -0
- package/types/src/components/password-field/password-field.style.d.ts +2 -0
- package/types/src/components/radio-field/radio-field.d.ts +62 -0
- package/types/src/components/radio-field/radio-field.define.d.ts +1 -0
- package/types/src/components/radio-field/radio-field.style.d.ts +2 -0
- package/types/src/components/scroll-to/scroll-to.d.ts +24 -0
- package/types/src/components/scroll-to/scroll-to.define.d.ts +1 -0
- package/types/src/components/scroll-to-top/scroll-to-top.d.ts +32 -0
- package/types/src/components/scroll-to-top/scroll-to-top.define.d.ts +1 -0
- package/types/src/components/scroll-to-top/scroll-to-top.style.d.ts +2 -0
- package/types/src/components/select-field/select-field.d.ts +39 -0
- package/types/src/components/select-field/select-field.define.d.ts +1 -0
- package/types/src/components/select-field/select-field.style.d.ts +2 -0
- package/types/src/components/slider/slider.d.ts +129 -0
- package/types/src/components/slider/slider.define.d.ts +1 -0
- package/types/src/components/slider/slider.events.d.ts +5 -0
- package/types/src/components/slider/slider.style.d.ts +2 -0
- package/types/src/components/sticky/sticky.d.ts +47 -0
- package/types/src/components/sticky/sticky.define.d.ts +1 -0
- package/types/src/components/sticky/sticky.style.d.ts +2 -0
- package/types/src/components/svg-use/svg-use.d.ts +18 -0
- package/types/src/components/svg-use/svg-use.define.d.ts +1 -0
- package/types/src/components/svg-use/svg-use.style.d.ts +2 -0
- package/types/src/components/switch-field/switch-field.d.ts +67 -0
- package/types/src/components/switch-field/switch-field.define.d.ts +1 -0
- package/types/src/components/switch-field/switch-field.style.d.ts +2 -0
- package/types/src/components/tab-group/tab-group.d.ts +48 -0
- package/types/src/components/tab-group/tab-group.define.d.ts +1 -0
- package/types/src/components/tab-group/tab-group.style.d.ts +2 -0
- package/types/src/components/tab-link/tab-link.d.ts +30 -0
- package/types/src/components/tab-link/tab-link.define.d.ts +1 -0
- package/types/src/components/tab-link/tab-link.style.d.ts +2 -0
- package/types/src/components/tab-panel/tab-panel.d.ts +18 -0
- package/types/src/components/tab-panel/tab-panel.define.d.ts +1 -0
- package/types/src/components/tab-panel/tab-panel.style.d.ts +2 -0
- package/types/src/components/textarea-field/textarea-field.d.ts +34 -0
- package/types/src/components/textarea-field/textarea-field.define.d.ts +1 -0
- package/types/src/components/textarea-field/textarea-field.style.d.ts +2 -0
- package/types/src/components/transition-classes/transition-classes.d.ts +52 -0
- package/types/src/components/transition-classes/transition-classes.define.d.ts +1 -0
- package/types/src/utils/body-scroll.d.ts +4 -0
- package/types/src/utils/transitions.d.ts +9 -0
- package/web-types.json +3956 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Carousel/slider component backed by Glide.js. Direct children of the host element are
|
|
4
|
+
* treated as slides; the component renders Glide's controls (navigation arrows and bullet
|
|
5
|
+
* pager) inside the shadow DOM around them.
|
|
6
|
+
*
|
|
7
|
+
* @element el-carousel
|
|
8
|
+
*
|
|
9
|
+
* @fires {CustomEvent<number>} CarouselRun - Fired on every Glide `run` (slide change).
|
|
10
|
+
* `detail` is the new active slide index.
|
|
11
|
+
*
|
|
12
|
+
* @slot - Default slot. Direct children become slides (unless they have a `slot`
|
|
13
|
+
* attribute or are Glide clones).
|
|
14
|
+
* @slot arrow-left - Content of the "previous" navigation button.
|
|
15
|
+
* @slot arrow-right - Content of the "next" navigation button.
|
|
16
|
+
*
|
|
17
|
+
* @csspart track - The Glide track wrapper.
|
|
18
|
+
* @csspart slides - The slides container.
|
|
19
|
+
* @csspart arrows - The navigation arrows wrapper.
|
|
20
|
+
* @csspart arrow - Applied to both arrow buttons.
|
|
21
|
+
* @csspart arrow-left - Applied to the previous-slide button (in addition to `arrow`).
|
|
22
|
+
* @csspart arrow-right - Applied to the next-slide button (in addition to `arrow`).
|
|
23
|
+
* @csspart dots - The bullet pager wrapper.
|
|
24
|
+
* @csspart dot - Applied to each bullet.
|
|
25
|
+
* @csspart selected-dot - Added to the bullet representing the active slide.
|
|
26
|
+
*
|
|
27
|
+
* @property {object} options - Options forwarded to the Glide constructor. Merged on top of
|
|
28
|
+
* the component's defaults (`type: 'carousel'`, `perView: 1`, `startAt: 0`,
|
|
29
|
+
* `keyboard: false`).
|
|
30
|
+
* @property {boolean} disabled - When `true`, Glide is not mounted and slides render as a
|
|
31
|
+
* plain list (useful for SSR or feature-flagging the carousel off).
|
|
32
|
+
* @property {string} slidePrefix - Prefix used when generating per-slide identifiers.
|
|
33
|
+
* @property {boolean} bullets - Whether to render the bullet pager.
|
|
34
|
+
* @property {boolean} arrows - Whether to render the previous/next navigation arrows.
|
|
35
|
+
*/
|
|
36
|
+
export default class Carousel {
|
|
37
|
+
/**
|
|
38
|
+
* Returns the underlying Glide instance for external navigation/configuration. Falls
|
|
39
|
+
* back to a no-op `{ go() }` stub while Glide is not mounted (e.g. when `disabled`).
|
|
40
|
+
*/
|
|
41
|
+
get api(): any;
|
|
42
|
+
properties(): {
|
|
43
|
+
options: {};
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
slidePrefix: string;
|
|
46
|
+
bullets: boolean;
|
|
47
|
+
arrows: boolean;
|
|
48
|
+
};
|
|
49
|
+
connected(): void;
|
|
50
|
+
beforeUpdate(): void;
|
|
51
|
+
afterUpdate(): void;
|
|
52
|
+
disconnected(): void;
|
|
53
|
+
/** @private */
|
|
54
|
+
private getUniqueChildren;
|
|
55
|
+
/** @private */
|
|
56
|
+
private mountGlide;
|
|
57
|
+
/** @private */
|
|
58
|
+
private destroyGlide;
|
|
59
|
+
/**
|
|
60
|
+
* Advance to the next slide.
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
next(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Move to the previous slide.
|
|
66
|
+
* @returns {void}
|
|
67
|
+
*/
|
|
68
|
+
prev(): void;
|
|
69
|
+
/** @private */
|
|
70
|
+
private updateBulletClasses;
|
|
71
|
+
/** @private */
|
|
72
|
+
private renderBullets;
|
|
73
|
+
/** @private */
|
|
74
|
+
private renderSlides;
|
|
75
|
+
template(): any;
|
|
76
|
+
#private;
|
|
77
|
+
}
|
|
78
|
+
import CarouselEvents from './carousel.events.js';
|
|
79
|
+
export { html, defineElement, CarouselEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(Glide: any, Components: any, Events: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(Glide: any, Components: any, Events: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(Glide: any, Components: any, Events: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(Glide: any, Components: any, Events: any): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Styled checkbox input with a custom checkmark indicator, label, and validation. Extends
|
|
4
|
+
* `FormField` and inherits its label / help / error / required surface.
|
|
5
|
+
*
|
|
6
|
+
* @element el-checkbox-field
|
|
7
|
+
*
|
|
8
|
+
* @fires {CustomEvent<string>} input-change - Fired when the checked state changes.
|
|
9
|
+
* `detail` is the input's `value`. Bubbles.
|
|
10
|
+
*
|
|
11
|
+
* @cssstate checked - Set on the host while the checkbox is checked. Style with
|
|
12
|
+
* `el-checkbox-field:state(checked) { … }`. Inherits `touched`, `valid` and `invalid`
|
|
13
|
+
* from `FormField`.
|
|
14
|
+
*
|
|
15
|
+
* @property {boolean} checked - Whether the checkbox is checked. Reflected to the `checked`
|
|
16
|
+
* attribute.
|
|
17
|
+
*/
|
|
18
|
+
export default class CheckboxField extends FormField {
|
|
19
|
+
/** @private */
|
|
20
|
+
private uuid;
|
|
21
|
+
properties(): {
|
|
22
|
+
checked: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
value: any;
|
|
25
|
+
required: boolean;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
label: string;
|
|
28
|
+
labelScreenReaderOnly: boolean;
|
|
29
|
+
errorMessage: string;
|
|
30
|
+
helpMessage: string;
|
|
31
|
+
valid: boolean;
|
|
32
|
+
touched: boolean;
|
|
33
|
+
};
|
|
34
|
+
watch(): {
|
|
35
|
+
checked: (checked: any) => void;
|
|
36
|
+
value: (value: any) => void;
|
|
37
|
+
valid: () => void;
|
|
38
|
+
touched: () => void;
|
|
39
|
+
};
|
|
40
|
+
events(): {
|
|
41
|
+
input: {
|
|
42
|
+
change: () => void;
|
|
43
|
+
};
|
|
44
|
+
'[ref=input]': {
|
|
45
|
+
focus: () => void;
|
|
46
|
+
blur: () => void;
|
|
47
|
+
keyup: (event: any) => void;
|
|
48
|
+
change: () => void;
|
|
49
|
+
};
|
|
50
|
+
'.is-invalid': {
|
|
51
|
+
focus: () => void;
|
|
52
|
+
};
|
|
53
|
+
'[data-clear-input]': {
|
|
54
|
+
click: () => void;
|
|
55
|
+
touchstart: () => void;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
checked: any;
|
|
59
|
+
/**
|
|
60
|
+
* The checkbox renders its label inline next to the box (see `fieldTemplate`), so the base
|
|
61
|
+
* FormField label is suppressed.
|
|
62
|
+
* @returns {null}
|
|
63
|
+
*/
|
|
64
|
+
labelTemplate(): null;
|
|
65
|
+
fieldTemplate(): any;
|
|
66
|
+
/** @private */
|
|
67
|
+
private selectedIndicatorTemplate;
|
|
68
|
+
}
|
|
69
|
+
import FormField from '../form-field/form-field.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* A modal dialog built on the native `<dialog>` element, so the platform owns focus trapping,
|
|
4
|
+
* background `inert`, top-layer rendering, focus restoration and `<form method="dialog">`
|
|
5
|
+
* auto-close. The component adds an animated, cancelable open/close lifecycle and ref-counted
|
|
6
|
+
* body-scroll locking on top. API modelled on Shoelace's `<sl-dialog>`.
|
|
7
|
+
*
|
|
8
|
+
* @element el-dialog
|
|
9
|
+
*
|
|
10
|
+
* @fires {CustomEvent} dialog-show - Fired when the dialog starts to open.
|
|
11
|
+
* @fires {CustomEvent} dialog-after-show - Fired once the open transition has finished.
|
|
12
|
+
* @fires {CustomEvent} dialog-hide - Fired when the dialog starts to close.
|
|
13
|
+
* @fires {CustomEvent} dialog-after-hide - Fired once the close transition has finished.
|
|
14
|
+
* @fires {CustomEvent} dialog-initial-focus - Fired after the dialog has been opened and the
|
|
15
|
+
* platform has moved focus inside it. Cancelable: call `preventDefault()` to take over focus.
|
|
16
|
+
* @fires {CustomEvent<{ source: 'close-button' | 'keyboard' | 'overlay' }>} dialog-request-close -
|
|
17
|
+
* Fired before the dialog closes in response to the close button, `Escape`, or an overlay
|
|
18
|
+
* click. Cancelable: call `preventDefault()` to keep the dialog open.
|
|
19
|
+
*
|
|
20
|
+
* @slot - The dialog's main content (body).
|
|
21
|
+
* @slot label - The dialog's title. Takes precedence over the `label` attribute.
|
|
22
|
+
* @slot header-actions - Optional controls rendered in the header, before the close button.
|
|
23
|
+
* @slot footer - Footer content, typically action buttons. The footer collapses when empty.
|
|
24
|
+
*
|
|
25
|
+
* @csspart base - The native `<dialog>` element — the panel surface (background, border, radius,
|
|
26
|
+
* elevation). The overlay is its `::backdrop` pseudo-element.
|
|
27
|
+
* @csspart header - The header row wrapping the title, header actions and close button.
|
|
28
|
+
* @csspart title - The title heading.
|
|
29
|
+
* @csspart header-actions - The container for the `header-actions` slot.
|
|
30
|
+
* @csspart close-button - The built-in close button.
|
|
31
|
+
* @csspart body - The scrollable body wrapping the default slot.
|
|
32
|
+
* @csspart footer - The footer wrapping the `footer` slot.
|
|
33
|
+
*
|
|
34
|
+
* @cssstate open - Set while the dialog is open. Style with `:host(:state(open))` or
|
|
35
|
+
* `el-dialog:state(open)` from outside.
|
|
36
|
+
*
|
|
37
|
+
* @property {boolean} open - Whether the dialog is open. Reflected to the `open` attribute.
|
|
38
|
+
* @property {string} label - The dialog's title (used when the `label` slot is empty); also the
|
|
39
|
+
* accessible name when `no-header` is set.
|
|
40
|
+
* @property {boolean} noHeader - Removes the header (title and built-in close button). Provide
|
|
41
|
+
* your own dismissal when set. Reflected to the `no-header` attribute.
|
|
42
|
+
* @property {string} closeLabel - Accessible label for the built-in close button. Default `'Close'`.
|
|
43
|
+
*/
|
|
44
|
+
export default class Dialog {
|
|
45
|
+
properties(): {
|
|
46
|
+
open: boolean;
|
|
47
|
+
label: string;
|
|
48
|
+
noHeader: boolean;
|
|
49
|
+
closeLabel: string;
|
|
50
|
+
};
|
|
51
|
+
connected(): void;
|
|
52
|
+
disconnected(): void;
|
|
53
|
+
watch(): {
|
|
54
|
+
open: (open: any) => void;
|
|
55
|
+
};
|
|
56
|
+
events(): {
|
|
57
|
+
'[data-dialog-close]': {
|
|
58
|
+
click: () => void;
|
|
59
|
+
};
|
|
60
|
+
"slot[name='footer']": {
|
|
61
|
+
slotchange: (event: any) => void;
|
|
62
|
+
};
|
|
63
|
+
"[part~='base']": {
|
|
64
|
+
cancel: (event: any) => void;
|
|
65
|
+
click: (event: any) => void;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Opens the dialog.
|
|
70
|
+
* @returns {Promise<void>} Resolves after the open transition has finished.
|
|
71
|
+
*/
|
|
72
|
+
show(): Promise<void>;
|
|
73
|
+
open: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Closes the dialog.
|
|
76
|
+
* @returns {Promise<void>} Resolves after the close transition has finished.
|
|
77
|
+
*/
|
|
78
|
+
hide(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Requests that the dialog close, emitting the cancelable `dialog-request-close` event. When a
|
|
81
|
+
* listener calls `preventDefault()` the dialog stays open and plays a short deny animation.
|
|
82
|
+
* @param {'close-button' | 'keyboard' | 'overlay'} source - What triggered the request.
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
85
|
+
requestClose(source: "close-button" | "keyboard" | "overlay"): void;
|
|
86
|
+
/** @private */
|
|
87
|
+
private _applyOpen;
|
|
88
|
+
/** @private */
|
|
89
|
+
private _applyClose;
|
|
90
|
+
/** @private */
|
|
91
|
+
private _handleOverlayClick;
|
|
92
|
+
/** @private */
|
|
93
|
+
private _denyClose;
|
|
94
|
+
/** @private */
|
|
95
|
+
private _syncFooter;
|
|
96
|
+
/** @private */
|
|
97
|
+
private _once;
|
|
98
|
+
/** @private */
|
|
99
|
+
private headerTemplate;
|
|
100
|
+
template(): any;
|
|
101
|
+
}
|
|
102
|
+
export { Events };
|
|
103
|
+
import Events from './dialog.events.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Toggleable dropdown menu with `trigger` and `content` slots. Auto-closes on outside
|
|
4
|
+
* click or `Escape`.
|
|
5
|
+
*
|
|
6
|
+
* @element el-dropdown
|
|
7
|
+
*
|
|
8
|
+
* @slot trigger - Element that opens the dropdown when clicked. Automatically receives
|
|
9
|
+
* the `show-dropdown` attribute.
|
|
10
|
+
* @slot content - Dropdown content shown only while `open` is `true`.
|
|
11
|
+
*
|
|
12
|
+
* @csspart trigger - Forwarded onto the `trigger` slot.
|
|
13
|
+
* @csspart panel - Wrapper around the `content` slot. Surface for background, border, radius
|
|
14
|
+
* and elevation. Only present in the DOM while `open` is `true`.
|
|
15
|
+
* @csspart content - Forwarded onto the `content` slot.
|
|
16
|
+
*
|
|
17
|
+
* @cssstate open - Set while the dropdown content is visible. Style with `:host(:state(open))`
|
|
18
|
+
* or `el-dropdown:state(open)` from outside.
|
|
19
|
+
*
|
|
20
|
+
* @property {boolean} open - Whether the dropdown content is visible. Setting to `true`
|
|
21
|
+
* attaches a one-shot outside-click / `Escape` listener that closes the dropdown.
|
|
22
|
+
*/
|
|
23
|
+
export default class Dropdown {
|
|
24
|
+
properties(): {
|
|
25
|
+
open: boolean;
|
|
26
|
+
};
|
|
27
|
+
watch(): {
|
|
28
|
+
open: (open: any) => void;
|
|
29
|
+
};
|
|
30
|
+
events(): {
|
|
31
|
+
'[show-dropdown]': {
|
|
32
|
+
click: () => void;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
open: boolean;
|
|
36
|
+
/** @private */
|
|
37
|
+
private addEventListeners;
|
|
38
|
+
/** @private */
|
|
39
|
+
private removeEventListeners;
|
|
40
|
+
/** @private */
|
|
41
|
+
private onClick;
|
|
42
|
+
/** @private */
|
|
43
|
+
private onKeyDown;
|
|
44
|
+
template(): any;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Base class for form input components. Provides label, help text, error message,
|
|
4
|
+
* validation and touched-state plumbing. Intended to be extended (`InputField`,
|
|
5
|
+
* `CheckboxField`, `TextareaField`, `AmountField`, …); subclasses override
|
|
6
|
+
* `fieldTemplate()` to render their actual input.
|
|
7
|
+
*
|
|
8
|
+
* @element el-form-field
|
|
9
|
+
*
|
|
10
|
+
* @fires {CustomEvent<string>} input-change - Fired when the field's `value` changes.
|
|
11
|
+
* `detail` is the new value. Bubbles.
|
|
12
|
+
*
|
|
13
|
+
* @cssstate touched - Set on the host once the user has focused and blurred the field.
|
|
14
|
+
* Inherited by all subclasses (`InputField`, `CheckboxField`, `TextareaField`,
|
|
15
|
+
* `AmountField`, `SelectField`).
|
|
16
|
+
* @cssstate valid - Set on the host while the field currently passes validation.
|
|
17
|
+
* @cssstate invalid - Set on the host while the field currently fails validation.
|
|
18
|
+
*
|
|
19
|
+
* @property {string} name - Form name for the underlying input.
|
|
20
|
+
* @property {string | null} value - Current value of the field.
|
|
21
|
+
* @property {boolean} required - Whether the field is required for form submission.
|
|
22
|
+
* @property {boolean} disabled - Whether the field is disabled.
|
|
23
|
+
* @property {string} label - Label text displayed for the field.
|
|
24
|
+
* @property {boolean} labelScreenReaderOnly - When `true`, the label is visually hidden but
|
|
25
|
+
* still announced to screen readers (via an `sr-only` class).
|
|
26
|
+
* @property {string} errorMessage - Error message displayed when the field is invalid and has
|
|
27
|
+
* been touched.
|
|
28
|
+
* @property {string} helpMessage - Helper text displayed below the field.
|
|
29
|
+
* @property {boolean} valid - Whether the field currently passes validation.
|
|
30
|
+
* @property {boolean} touched - Whether the user has interacted with the field (focused and
|
|
31
|
+
* blurred). Validation messages only surface when this is `true`.
|
|
32
|
+
*/
|
|
33
|
+
export default class FormField {
|
|
34
|
+
constructor(options: any);
|
|
35
|
+
connected(): void;
|
|
36
|
+
touched: boolean;
|
|
37
|
+
properties(): {
|
|
38
|
+
name: string;
|
|
39
|
+
value: any;
|
|
40
|
+
required: boolean;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
label: string;
|
|
43
|
+
labelScreenReaderOnly: boolean;
|
|
44
|
+
errorMessage: string;
|
|
45
|
+
helpMessage: string;
|
|
46
|
+
valid: boolean;
|
|
47
|
+
touched: boolean;
|
|
48
|
+
};
|
|
49
|
+
watch(): {
|
|
50
|
+
value: (value: any) => void;
|
|
51
|
+
valid: () => void;
|
|
52
|
+
touched: () => void;
|
|
53
|
+
};
|
|
54
|
+
/** @private */
|
|
55
|
+
private syncValidationStates;
|
|
56
|
+
events(): {
|
|
57
|
+
'[ref=input]': {
|
|
58
|
+
focus: () => void;
|
|
59
|
+
blur: () => void;
|
|
60
|
+
keyup: (event: any) => void;
|
|
61
|
+
change: () => void;
|
|
62
|
+
};
|
|
63
|
+
'.is-invalid': {
|
|
64
|
+
focus: () => void;
|
|
65
|
+
};
|
|
66
|
+
'[data-clear-input]': {
|
|
67
|
+
click: () => void;
|
|
68
|
+
touchstart: () => void;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Called when the input receives focus. Refreshes validation state.
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
onFocus(): void;
|
|
76
|
+
valid: any;
|
|
77
|
+
/**
|
|
78
|
+
* Called when the input loses focus. Marks the field as touched and refreshes
|
|
79
|
+
* validation state.
|
|
80
|
+
* @returns {void}
|
|
81
|
+
*/
|
|
82
|
+
onBlur(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Called when the input value changes. Updates `value` and refreshes validation.
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
onChange(): void;
|
|
88
|
+
value: any;
|
|
89
|
+
/**
|
|
90
|
+
* Clears the input value, refocuses it, and resets the touched state.
|
|
91
|
+
* @returns {void}
|
|
92
|
+
*/
|
|
93
|
+
clearInput(): void;
|
|
94
|
+
/** @private */
|
|
95
|
+
private classes;
|
|
96
|
+
template(): any;
|
|
97
|
+
/** @private */
|
|
98
|
+
private labelTemplate;
|
|
99
|
+
/**
|
|
100
|
+
* Subclass extension point. Override to render the actual input element(s).
|
|
101
|
+
* @returns {unknown}
|
|
102
|
+
*/
|
|
103
|
+
fieldTemplate(): unknown;
|
|
104
|
+
/** @private */
|
|
105
|
+
private helpTemplate;
|
|
106
|
+
/** @private */
|
|
107
|
+
private errorTemplate;
|
|
108
|
+
}
|
|
109
|
+
import FormFieldEvents from './form-field.events.js';
|
|
110
|
+
export { FormFieldEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Native `<input>` wrapper with label, help text, validation feedback (visual checkmark /
|
|
4
|
+
* cross indicators) and ARIA wiring. Extends `FormField` and inherits its label / help /
|
|
5
|
+
* error / required surface.
|
|
6
|
+
*
|
|
7
|
+
* @element el-input-field
|
|
8
|
+
*
|
|
9
|
+
* @fires {CustomEvent<string>} input-change - Fired when the input's value changes.
|
|
10
|
+
* `detail` is the new value. Bubbles.
|
|
11
|
+
*
|
|
12
|
+
* @property {string} type - Native `type` attribute of the underlying `<input>` (e.g.
|
|
13
|
+
* `'text'`, `'email'`, `'password'`, `'tel'`, `'url'`).
|
|
14
|
+
* @property {string} placeholder - Placeholder text shown while the input is empty.
|
|
15
|
+
* @property {string | false} pattern - Regular expression used as the input's `pattern`
|
|
16
|
+
* attribute. When `false` (the default), the `pattern` attribute is omitted entirely, so
|
|
17
|
+
* the field applies no pattern constraint.
|
|
18
|
+
*/
|
|
19
|
+
export default class InputField extends FormField {
|
|
20
|
+
properties(): {
|
|
21
|
+
type: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
pattern: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
value: any;
|
|
26
|
+
required: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
label: string;
|
|
29
|
+
labelScreenReaderOnly: boolean;
|
|
30
|
+
errorMessage: string;
|
|
31
|
+
helpMessage: string;
|
|
32
|
+
valid: boolean;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
};
|
|
35
|
+
/** @private */
|
|
36
|
+
private fieldTemplate;
|
|
37
|
+
}
|
|
38
|
+
import FormField from '../form-field/form-field.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Lazy-loads child `<img>` / `<picture>` / `<iframe>` / `<video>` elements that use a
|
|
4
|
+
* `data-src` attribute. Backed by lozad's `IntersectionObserver`; promotes `data-src` to
|
|
5
|
+
* `src` once the child intersects the viewport.
|
|
6
|
+
*
|
|
7
|
+
* @element el-lazy-src
|
|
8
|
+
*
|
|
9
|
+
* @fires {CustomEvent<LazySrc>} LazySrcLoad - Fired once the child first intersects the
|
|
10
|
+
* viewport and lozad swaps in the real source. `detail` is the host element. Bubbles.
|
|
11
|
+
* @fires {CustomEvent<LazySrc>} LazySrcImgLoad - Fired when an inner `<img>` finishes
|
|
12
|
+
* loading. `detail` is the host element. Bubbles.
|
|
13
|
+
* @fires {CustomEvent<LazySrc>} LazySrcImgError - Fired when an inner `<img>` fails to
|
|
14
|
+
* load. `detail` is the host element. Bubbles.
|
|
15
|
+
*
|
|
16
|
+
* @property {string} rootMargin - `IntersectionObserver` `rootMargin` forwarded to lozad.
|
|
17
|
+
* @property {number | number[]} threshold - `IntersectionObserver` `threshold` forwarded to
|
|
18
|
+
* lozad.
|
|
19
|
+
* @cssstate loaded - Set once the child has been swapped in. Equivalent to the reflected
|
|
20
|
+
* `loaded` attribute; prefer `el-lazy-src:state(loaded) { … }` going forward.
|
|
21
|
+
*
|
|
22
|
+
* @property {boolean} loaded - `true` once the child has been swapped in. Reflected to the
|
|
23
|
+
* `loaded` attribute so consumers can target the loaded state from CSS.
|
|
24
|
+
* @property {string} imgClass - Class to apply to the inner `<img>` once it is loaded.
|
|
25
|
+
* @property {string} imgAlt - `alt` text to apply to the inner `<img>` once it is loaded.
|
|
26
|
+
*/
|
|
27
|
+
export default class LazySrc {
|
|
28
|
+
properties(): {
|
|
29
|
+
rootMargin: string;
|
|
30
|
+
threshold: number;
|
|
31
|
+
loaded: boolean;
|
|
32
|
+
imgClass: string;
|
|
33
|
+
imgAlt: string;
|
|
34
|
+
};
|
|
35
|
+
connected(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the underlying lozad observer instance.
|
|
38
|
+
*/
|
|
39
|
+
get api(): any;
|
|
40
|
+
/** @private */
|
|
41
|
+
private afterIntersection;
|
|
42
|
+
loaded: boolean;
|
|
43
|
+
#private;
|
|
44
|
+
}
|
|
45
|
+
export { Events };
|
|
46
|
+
import Events from './lazy-src.events.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|