@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,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @webtides/element-library — high-contrast theme
|
|
3
|
+
*
|
|
4
|
+
* Opt-in stylesheet with WCAG-AAA-leaning contrast, thicker borders and
|
|
5
|
+
* larger focus rings. Useful as a starting point for accessibility-first
|
|
6
|
+
* apps, kiosks, and high-glare environments. Import once at the top of
|
|
7
|
+
* your app:
|
|
8
|
+
*
|
|
9
|
+
* import '@webtides/element-library/themes/high-contrast.css';
|
|
10
|
+
*
|
|
11
|
+
* Uses light-dark() so both color schemes are supported — the theme follows
|
|
12
|
+
* the user's color-scheme like default.css does.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:root {
|
|
16
|
+
color-scheme: light dark;
|
|
17
|
+
|
|
18
|
+
/* Color — surfaces & text (near pure black/white for maximum contrast) */
|
|
19
|
+
--el-color-fg: light-dark(#000000, #ffffff);
|
|
20
|
+
--el-color-fg-muted: light-dark(#262626, #d4d4d4);
|
|
21
|
+
--el-color-bg: light-dark(#ffffff, #000000);
|
|
22
|
+
--el-color-bg-muted: light-dark(#f4f4f4, #1a1a1a);
|
|
23
|
+
--el-color-border: light-dark(#000000, #ffffff);
|
|
24
|
+
|
|
25
|
+
/* Color — interactive & semantic (WCAG-AAA against bg) */
|
|
26
|
+
--el-color-accent: light-dark(#0040c0, #6cb6ff);
|
|
27
|
+
--el-color-success: light-dark(#006e2c, #4ade80);
|
|
28
|
+
--el-color-danger: light-dark(#a8000d, #ff6b6b);
|
|
29
|
+
--el-color-focus-ring: var(--el-color-accent);
|
|
30
|
+
|
|
31
|
+
/* Spacing — same scale as default */
|
|
32
|
+
--el-space-1: 0.25rem;
|
|
33
|
+
--el-space-2: 0.5rem;
|
|
34
|
+
--el-space-3: 0.75rem;
|
|
35
|
+
--el-space-4: 1rem;
|
|
36
|
+
--el-space-5: 1.5rem;
|
|
37
|
+
|
|
38
|
+
/* Radius — square-ish for a no-nonsense look */
|
|
39
|
+
--el-radius-sm: 0;
|
|
40
|
+
--el-radius-md: 2px;
|
|
41
|
+
--el-radius-lg: 4px;
|
|
42
|
+
|
|
43
|
+
/* Border — thicker for clarity */
|
|
44
|
+
--el-border-width: 2px;
|
|
45
|
+
|
|
46
|
+
/* Typography */
|
|
47
|
+
--el-font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
|
|
48
|
+
--el-font-size-sm: 0.875rem;
|
|
49
|
+
--el-font-size-md: 1rem;
|
|
50
|
+
--el-line-height: 1.5;
|
|
51
|
+
|
|
52
|
+
/* Shadow — none. High-contrast designs use borders, not depth. */
|
|
53
|
+
--el-shadow-md: none;
|
|
54
|
+
--el-shadow-lg: none;
|
|
55
|
+
|
|
56
|
+
/* Motion — slightly faster, helps users who set prefers-reduced-motion read intent */
|
|
57
|
+
--el-duration-md: 150ms;
|
|
58
|
+
--el-ease: cubic-bezier(0.2, 0, 0, 1);
|
|
59
|
+
|
|
60
|
+
/* Focus ring — larger and offset further for visibility */
|
|
61
|
+
--el-focus-ring-width: 3px;
|
|
62
|
+
--el-focus-ring-offset: 2px;
|
|
63
|
+
|
|
64
|
+
/* Sizing — bumped touch target to comfortably exceed WCAG 2.1 (44px) */
|
|
65
|
+
--el-control-height: 2.75rem;
|
|
66
|
+
--el-touch-target: 3rem;
|
|
67
|
+
|
|
68
|
+
/* Dialog — a heavier scrim for an unambiguous separation from the background */
|
|
69
|
+
--el-dialog-width: 31rem;
|
|
70
|
+
--el-dialog-overlay-background: light-dark(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.85));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
* Native form controls (input / textarea / select) live in light DOM, so the
|
|
75
|
+
* theme decorates them directly. Mirrors the rule set in default.css.
|
|
76
|
+
*/
|
|
77
|
+
el-input-field input,
|
|
78
|
+
el-password-field input,
|
|
79
|
+
el-textarea-field textarea,
|
|
80
|
+
el-select-field select {
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
width: 100%;
|
|
83
|
+
border: var(--el-border-width) solid var(--el-color-border);
|
|
84
|
+
border-radius: var(--el-radius-md);
|
|
85
|
+
padding: var(--el-space-2) var(--el-space-3);
|
|
86
|
+
background: var(--el-color-bg);
|
|
87
|
+
color: var(--el-color-fg);
|
|
88
|
+
font-family: var(--el-font-family);
|
|
89
|
+
font-size: var(--el-font-size-md);
|
|
90
|
+
line-height: var(--el-line-height);
|
|
91
|
+
transition:
|
|
92
|
+
border-color var(--el-duration-md) var(--el-ease),
|
|
93
|
+
box-shadow var(--el-duration-md) var(--el-ease);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
el-input-field input,
|
|
97
|
+
el-password-field input,
|
|
98
|
+
el-select-field select {
|
|
99
|
+
min-height: var(--el-control-height);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
el-input-field input:focus,
|
|
103
|
+
el-password-field input:focus,
|
|
104
|
+
el-textarea-field textarea:focus,
|
|
105
|
+
el-select-field select:focus {
|
|
106
|
+
outline: none;
|
|
107
|
+
border-color: var(--el-color-focus-ring);
|
|
108
|
+
box-shadow:
|
|
109
|
+
0 0 0 var(--el-focus-ring-offset) var(--el-color-bg),
|
|
110
|
+
0 0 0 calc(var(--el-focus-ring-offset) + var(--el-focus-ring-width)) var(--el-color-focus-ring);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
el-input-field:state(invalid) input,
|
|
114
|
+
el-password-field:state(invalid) input,
|
|
115
|
+
el-textarea-field:state(invalid) textarea,
|
|
116
|
+
el-select-field:state(invalid) select {
|
|
117
|
+
border-color: var(--el-color-danger);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* select-field chevron — see default.css for rationale */
|
|
121
|
+
el-select-field .field {
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
el-select-field select {
|
|
126
|
+
appearance: none;
|
|
127
|
+
-webkit-appearance: none;
|
|
128
|
+
padding-right: calc(var(--el-space-3) * 2 + var(--el-space-2));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
el-select-field .dropdown-indicator {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
position: absolute;
|
|
136
|
+
right: var(--el-space-3);
|
|
137
|
+
top: 50%;
|
|
138
|
+
transform: translateY(-50%);
|
|
139
|
+
color: var(--el-color-fg);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Respect user motion preference (contrast is already at its ceiling) */
|
|
143
|
+
@media (prefers-reduced-motion: reduce) {
|
|
144
|
+
:root {
|
|
145
|
+
--el-duration-md: 0s;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @webtides/element-library — sketchy theme
|
|
3
|
+
*
|
|
4
|
+
* Opt-in stylesheet that gives components a hand-drawn, "wired"/rough.js-style
|
|
5
|
+
* look: a handwriting font, irregular pencil-stroke borders, ink-on-paper
|
|
6
|
+
* surfaces and offset cutout shadows. Import once at the top of your app:
|
|
7
|
+
*
|
|
8
|
+
* import '@webtides/element-library/themes/sketchy.css';
|
|
9
|
+
*
|
|
10
|
+
* The sketch feel is achieved purely with design tokens — no canvas/SVG
|
|
11
|
+
* rendering — so it stays a single CSS import like the other themes. The
|
|
12
|
+
* tell vs. real rough.js is that the border "wobble" is identical on every
|
|
13
|
+
* element (a fixed irregular border-radius) rather than randomized per box.
|
|
14
|
+
*
|
|
15
|
+
* The handwriting face (Patrick Hand) is embedded below via @font-face with an
|
|
16
|
+
* absolute URL on purpose: themes are loaded into a constructable stylesheet
|
|
17
|
+
* (replaceSync) in some hosts, which drops @import rules and resolves relative
|
|
18
|
+
* URLs against the document — @font-face with an absolute src works in both
|
|
19
|
+
* the bundler and replaceSync paths.
|
|
20
|
+
*
|
|
21
|
+
* Uses light-dark() so both color schemes are supported — light reads as ink
|
|
22
|
+
* on warm paper, dark as chalk on a board. The theme follows the user's
|
|
23
|
+
* color-scheme like default.css does.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* Patrick Hand — latin + latin-ext (gstatic, content-versioned woff2) */
|
|
27
|
+
@font-face {
|
|
28
|
+
font-family: 'Patrick Hand';
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
font-display: swap;
|
|
32
|
+
src: url(https://fonts.gstatic.com/s/patrickhand/v25/LDI1apSQOAYtSuYWp8ZhfYe8XsLLubg58w.woff2) format('woff2');
|
|
33
|
+
unicode-range:
|
|
34
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
|
|
35
|
+
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
36
|
+
}
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'Patrick Hand';
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
font-display: swap;
|
|
42
|
+
src: url(https://fonts.gstatic.com/s/patrickhand/v25/LDI1apSQOAYtSuYWp8ZhfYe8UMLLubg58xGL.woff2) format('woff2');
|
|
43
|
+
unicode-range:
|
|
44
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
|
|
45
|
+
U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root {
|
|
49
|
+
color-scheme: light dark;
|
|
50
|
+
|
|
51
|
+
/* Color — surfaces & text (ink on white / chalk on a board) */
|
|
52
|
+
--el-color-fg: light-dark(#2b2b2b, #ece4d4);
|
|
53
|
+
--el-color-fg-muted: light-dark(#5f5b53, #b0a890);
|
|
54
|
+
--el-color-bg: light-dark(#ffffff, #232020);
|
|
55
|
+
--el-color-bg-muted: light-dark(#f4f4f4, #2e2a28);
|
|
56
|
+
--el-color-border: light-dark(#2b2b2b, #ece4d4);
|
|
57
|
+
|
|
58
|
+
/* Color — interactive & semantic (felt-tip marker palette) */
|
|
59
|
+
--el-color-accent: light-dark(#2f6fed, #8fb0ff);
|
|
60
|
+
--el-color-success: light-dark(#2f9e44, #69db7c);
|
|
61
|
+
--el-color-danger: light-dark(#e03131, #ff8787);
|
|
62
|
+
--el-color-focus-ring: var(--el-color-accent);
|
|
63
|
+
|
|
64
|
+
/* Spacing — same 4px base scale as the other themes */
|
|
65
|
+
--el-space-1: 0.25rem;
|
|
66
|
+
--el-space-2: 0.5rem;
|
|
67
|
+
--el-space-3: 0.75rem;
|
|
68
|
+
--el-space-4: 1rem;
|
|
69
|
+
--el-space-5: 1.5rem;
|
|
70
|
+
|
|
71
|
+
/*
|
|
72
|
+
* Radius — the hand-drawn corner trick. An asymmetric 8-value border-radius
|
|
73
|
+
* (horizontal radii / vertical radii) makes each corner round by a slightly
|
|
74
|
+
* different amount, faking a pencil stroke. Values are kept modest so short,
|
|
75
|
+
* wide controls (inputs/buttons) wobble instead of turning into pills.
|
|
76
|
+
*/
|
|
77
|
+
--el-radius-sm: 6px 10px 7px 9px / 9px 6px 10px 7px;
|
|
78
|
+
--el-radius-md: 16px 9px 18px 11px / 11px 17px 9px 16px;
|
|
79
|
+
--el-radius-lg: 26px 15px 30px 17px / 17px 28px 15px 26px;
|
|
80
|
+
|
|
81
|
+
/* Border — pen line */
|
|
82
|
+
--el-border-width: 2px;
|
|
83
|
+
|
|
84
|
+
/* Typography — handwriting face, with casual fallbacks before generic cursive */
|
|
85
|
+
--el-font-family: 'Patrick Hand', 'Comic Sans MS', 'Segoe Print', 'Bradley Hand', 'Marker Felt', cursive;
|
|
86
|
+
--el-font-size-sm: 0.9375rem;
|
|
87
|
+
--el-font-size-md: 1.0625rem;
|
|
88
|
+
--el-line-height: 1.55;
|
|
89
|
+
|
|
90
|
+
/* Shadow — hard offset "cutout"/sticker shadow, no blur, in the ink color */
|
|
91
|
+
--el-shadow-md: 2px 2px 0 light-dark(rgba(43, 43, 43, 0.2), rgba(0, 0, 0, 0.55));
|
|
92
|
+
--el-shadow-lg: 4px 5px 0 light-dark(rgba(43, 43, 43, 0.24), rgba(0, 0, 0, 0.6));
|
|
93
|
+
|
|
94
|
+
/* Motion — a little springy overshoot for a playful feel */
|
|
95
|
+
--el-duration-md: 200ms;
|
|
96
|
+
--el-ease: cubic-bezier(0.34, 1.3, 0.64, 1);
|
|
97
|
+
|
|
98
|
+
/* Focus ring — slightly larger gap so the ring reads as a separate scribble */
|
|
99
|
+
--el-focus-ring-width: 2px;
|
|
100
|
+
--el-focus-ring-offset: 3px;
|
|
101
|
+
|
|
102
|
+
/* Sizing */
|
|
103
|
+
--el-control-height: 2.5rem;
|
|
104
|
+
--el-touch-target: 2.75rem;
|
|
105
|
+
|
|
106
|
+
/* Dialog — an ink-wash scrim in the page's ink color */
|
|
107
|
+
--el-dialog-width: 31rem;
|
|
108
|
+
--el-dialog-overlay-background: light-dark(rgba(43, 43, 43, 0.45), rgba(0, 0, 0, 0.6));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* Native form controls (input / textarea / select) live in light DOM, so the
|
|
113
|
+
* theme decorates them directly. Mirrors the rule set in default.css.
|
|
114
|
+
*/
|
|
115
|
+
el-input-field input,
|
|
116
|
+
el-password-field input,
|
|
117
|
+
el-textarea-field textarea,
|
|
118
|
+
el-select-field select {
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
width: 100%;
|
|
121
|
+
border: var(--el-border-width) solid var(--el-color-border);
|
|
122
|
+
border-radius: var(--el-radius-md);
|
|
123
|
+
padding: var(--el-space-2) var(--el-space-3);
|
|
124
|
+
background: var(--el-color-bg);
|
|
125
|
+
color: var(--el-color-fg);
|
|
126
|
+
font-family: var(--el-font-family);
|
|
127
|
+
font-size: var(--el-font-size-md);
|
|
128
|
+
line-height: var(--el-line-height);
|
|
129
|
+
transition:
|
|
130
|
+
border-color var(--el-duration-md) var(--el-ease),
|
|
131
|
+
box-shadow var(--el-duration-md) var(--el-ease);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
el-input-field input,
|
|
135
|
+
el-password-field input,
|
|
136
|
+
el-select-field select {
|
|
137
|
+
min-height: var(--el-control-height);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
el-input-field input:focus,
|
|
141
|
+
el-password-field input:focus,
|
|
142
|
+
el-textarea-field textarea:focus,
|
|
143
|
+
el-select-field select:focus {
|
|
144
|
+
outline: none;
|
|
145
|
+
border-color: var(--el-color-focus-ring);
|
|
146
|
+
box-shadow:
|
|
147
|
+
0 0 0 var(--el-focus-ring-offset) var(--el-color-bg),
|
|
148
|
+
0 0 0 calc(var(--el-focus-ring-offset) + var(--el-focus-ring-width)) var(--el-color-focus-ring);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
el-input-field:state(invalid) input,
|
|
152
|
+
el-password-field:state(invalid) input,
|
|
153
|
+
el-textarea-field:state(invalid) textarea,
|
|
154
|
+
el-select-field:state(invalid) select {
|
|
155
|
+
border-color: var(--el-color-danger);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* select-field chevron — see default.css for rationale */
|
|
159
|
+
el-select-field .field {
|
|
160
|
+
position: relative;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
el-select-field select {
|
|
164
|
+
appearance: none;
|
|
165
|
+
-webkit-appearance: none;
|
|
166
|
+
padding-right: calc(var(--el-space-3) * 2 + var(--el-space-2));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
el-select-field .dropdown-indicator {
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
position: absolute;
|
|
174
|
+
right: var(--el-space-3);
|
|
175
|
+
top: 50%;
|
|
176
|
+
transform: translateY(-50%);
|
|
177
|
+
color: var(--el-color-fg-muted);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* ---------------------------------------------------------------------------
|
|
181
|
+
* Component flourishes
|
|
182
|
+
*
|
|
183
|
+
* The accordion, tab and slider components now read the design tokens (so every
|
|
184
|
+
* theme can decorate them). The extras below are sketch-only: a soft cutout
|
|
185
|
+
* shadow and spacing that wouldn't suit the other themes.
|
|
186
|
+
*
|
|
187
|
+
* Carousel is different — it inlines Glide's own hardcoded theme (white arrows
|
|
188
|
+
* meant to sit over images) and reads no tokens, so it's re-skinned here,
|
|
189
|
+
* sketchy-only, via ::part() with !important to beat Glide's class selectors.
|
|
190
|
+
* ::part() pierces the shadow boundary from this document-level sheet.
|
|
191
|
+
* ------------------------------------------------------------------------- */
|
|
192
|
+
|
|
193
|
+
/* Accordion — lift each hand-drawn card off the page */
|
|
194
|
+
el-accordion {
|
|
195
|
+
box-shadow: var(--el-shadow-md);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Tabs — small gap between the boxed tabs */
|
|
199
|
+
el-tab-link {
|
|
200
|
+
margin-right: var(--el-space-1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Carousel — re-skin Glide's hardcoded arrows + bullets as sketch controls */
|
|
204
|
+
el-carousel::part(arrow) {
|
|
205
|
+
background: var(--el-color-bg) !important;
|
|
206
|
+
color: var(--el-color-fg) !important;
|
|
207
|
+
border: var(--el-border-width) solid var(--el-color-border) !important;
|
|
208
|
+
border-radius: var(--el-radius-md) !important;
|
|
209
|
+
box-shadow: var(--el-shadow-md) !important;
|
|
210
|
+
text-shadow: none !important;
|
|
211
|
+
}
|
|
212
|
+
el-carousel::part(dot) {
|
|
213
|
+
background: var(--el-color-bg) !important;
|
|
214
|
+
border: 2px solid var(--el-color-border) !important;
|
|
215
|
+
box-shadow: none !important;
|
|
216
|
+
}
|
|
217
|
+
el-carousel::part(selected-dot) {
|
|
218
|
+
background: var(--el-color-accent) !important;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Respect user motion + contrast preferences (mirrors default.css) */
|
|
222
|
+
|
|
223
|
+
@media (prefers-reduced-motion: reduce) {
|
|
224
|
+
:root {
|
|
225
|
+
--el-duration-md: 0s;
|
|
226
|
+
/* drop the overshoot too, so any non-tokenized easing stays calm */
|
|
227
|
+
--el-ease: cubic-bezier(0.2, 0, 0, 1);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (prefers-contrast: more) {
|
|
232
|
+
:root {
|
|
233
|
+
--el-color-fg: light-dark(#000000, #ffffff);
|
|
234
|
+
--el-color-border: light-dark(#000000, #ffffff);
|
|
235
|
+
--el-border-width: 3px;
|
|
236
|
+
--el-focus-ring-width: 3px;
|
|
237
|
+
}
|
|
238
|
+
}
|
package/types/all.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseElement, StyledElement, TemplateElement, html, toString, defineElement };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* A collapsible content component that expands and collapses content sections with smooth
|
|
4
|
+
* animations. Features customizable header and content slots, automatic toggle functionality,
|
|
5
|
+
* and emits an event when its state changes.
|
|
6
|
+
*
|
|
7
|
+
* @element el-accordion
|
|
8
|
+
*
|
|
9
|
+
* @fires {CustomEvent<{ open: boolean }>} AccordionToggle - Fired when the accordion is
|
|
10
|
+
* toggled. The event bubbles up through the DOM. `detail.open` reflects the new open state.
|
|
11
|
+
*
|
|
12
|
+
* @slot header - Content to display in the accordion header/title area. Clicking this area
|
|
13
|
+
* toggles the accordion.
|
|
14
|
+
* @slot content - Content to display in the collapsible section of the accordion.
|
|
15
|
+
*
|
|
16
|
+
* @csspart title - The header container that wraps the `header` slot and toggle icon.
|
|
17
|
+
* @csspart content - The wrapper around the collapsible `content` slot.
|
|
18
|
+
* @csspart icon - The chevron icon; rotates 180° while the accordion is open.
|
|
19
|
+
*
|
|
20
|
+
* @cssstate open - Set while the accordion is expanded. Style with `:host(:state(open))` or
|
|
21
|
+
* `el-accordion:state(open)` from outside.
|
|
22
|
+
*
|
|
23
|
+
* @property {boolean} open - Controls whether the accordion is expanded (`true`) or collapsed
|
|
24
|
+
* (`false`). Reflected to the `open` attribute.
|
|
25
|
+
*/
|
|
26
|
+
export default class Accordion {
|
|
27
|
+
connected(): void;
|
|
28
|
+
properties(): {
|
|
29
|
+
open: boolean;
|
|
30
|
+
};
|
|
31
|
+
watch(): {
|
|
32
|
+
open: (open: any) => void;
|
|
33
|
+
};
|
|
34
|
+
events(): {
|
|
35
|
+
'[data-toggle]': {
|
|
36
|
+
click: () => void;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Toggles the accordion between open and closed states.
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
toggle(): void;
|
|
44
|
+
open: any;
|
|
45
|
+
/**
|
|
46
|
+
* Closes the accordion with animation.
|
|
47
|
+
* @returns {void}
|
|
48
|
+
*/
|
|
49
|
+
collapse(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Opens the accordion with animation.
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
expand(): void;
|
|
55
|
+
template(): any;
|
|
56
|
+
/** @private */
|
|
57
|
+
private iconsTemplate;
|
|
58
|
+
}
|
|
59
|
+
import Events from './accordion.events.js';
|
|
60
|
+
export { html, defineElement, Events };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Container that manages multiple `<el-accordion>` children. When `showMultiple` is
|
|
4
|
+
* `false`, only one accordion can be open at a time; opening a new accordion closes the
|
|
5
|
+
* previously open one.
|
|
6
|
+
*
|
|
7
|
+
* @element el-accordion-group
|
|
8
|
+
*
|
|
9
|
+
* @slot - Default slot for `<el-accordion>` children.
|
|
10
|
+
*
|
|
11
|
+
* @property {boolean} showMultiple - When `false`, only one child accordion can be open at a
|
|
12
|
+
* time; opening a new accordion closes the previously open one. When `true`, multiple
|
|
13
|
+
* accordions can be open simultaneously.
|
|
14
|
+
*/
|
|
15
|
+
export default class AccordionGroup {
|
|
16
|
+
/** @private */
|
|
17
|
+
private currentOpenElement;
|
|
18
|
+
properties(): {
|
|
19
|
+
showMultiple: boolean;
|
|
20
|
+
};
|
|
21
|
+
connected(): void;
|
|
22
|
+
events(): {
|
|
23
|
+
this: {
|
|
24
|
+
[Events.TOGGLE]: (event: any) => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
import Events from '../accordion/accordion.events.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* Numeric amount stepper input. Renders a readonly `<input type="number">` flanked by
|
|
4
|
+
* increment (`+`) and decrement (`-`) buttons, with optional `min` and `max` bounds.
|
|
5
|
+
* Extends `FormField` and inherits its label, help and validation surface.
|
|
6
|
+
*
|
|
7
|
+
* @element el-amount-field
|
|
8
|
+
*
|
|
9
|
+
* @slot plus - Replaces the default `+` glyph in the increment button.
|
|
10
|
+
* @slot minus - Replaces the default `-` glyph in the decrement button.
|
|
11
|
+
*
|
|
12
|
+
* @csspart wrapper - The outer container around the input and stepper buttons.
|
|
13
|
+
* @csspart button - Applied to both stepper buttons.
|
|
14
|
+
* @csspart plus - Applied to the increment button (in addition to `button`).
|
|
15
|
+
* @csspart minus - Applied to the decrement button (in addition to `button`).
|
|
16
|
+
* @csspart input - The numeric input element.
|
|
17
|
+
*
|
|
18
|
+
* @property {string} name - Form name for the underlying `<input>` element.
|
|
19
|
+
* @property {number} value - Current numeric value of the field.
|
|
20
|
+
* @property {number | false} max - Upper bound. Set to `false` to leave the value unbounded
|
|
21
|
+
* above.
|
|
22
|
+
* @property {number | false} min - Lower bound. Set to `false` to leave the value unbounded
|
|
23
|
+
* below.
|
|
24
|
+
*/
|
|
25
|
+
export default class AmountField extends FormField {
|
|
26
|
+
constructor();
|
|
27
|
+
properties(): {
|
|
28
|
+
name: string;
|
|
29
|
+
value: number;
|
|
30
|
+
max: boolean;
|
|
31
|
+
min: number;
|
|
32
|
+
required: boolean;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
label: string;
|
|
35
|
+
labelScreenReaderOnly: boolean;
|
|
36
|
+
errorMessage: string;
|
|
37
|
+
helpMessage: string;
|
|
38
|
+
valid: boolean;
|
|
39
|
+
touched: boolean;
|
|
40
|
+
};
|
|
41
|
+
events(): {
|
|
42
|
+
'[ref=plus]': {
|
|
43
|
+
click: () => void;
|
|
44
|
+
};
|
|
45
|
+
'[ref=minus]': {
|
|
46
|
+
click: () => void;
|
|
47
|
+
};
|
|
48
|
+
'[ref=input]': {
|
|
49
|
+
change: () => any;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
import FormField from '../form-field/form-field.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export function define(): void;
|
|
2
|
+
/**
|
|
3
|
+
* A themeable button that renders a native `<button>` — or an `<a>` when `href` is set — and
|
|
4
|
+
* decorates it with the `--el-*` design tokens. Supports semantic variants, sizes, outline /
|
|
5
|
+
* pill / circle shapes, an optional dropdown caret and a loading spinner. API modelled on
|
|
6
|
+
* Shoelace's `<sl-button>`.
|
|
7
|
+
*
|
|
8
|
+
* @element el-button
|
|
9
|
+
*
|
|
10
|
+
* @slot - The button's label.
|
|
11
|
+
* @slot prefix - A presentational prefix icon or similar element.
|
|
12
|
+
* @slot suffix - A presentational suffix icon or similar element.
|
|
13
|
+
*
|
|
14
|
+
* @csspart base - The internal `<button>` / `<a>`. The surface for background, border, radius.
|
|
15
|
+
* @csspart prefix - Container wrapping the `prefix` slot.
|
|
16
|
+
* @csspart label - The default-slot label wrapper.
|
|
17
|
+
* @csspart suffix - Container wrapping the `suffix` slot.
|
|
18
|
+
* @csspart caret - The dropdown caret, present only while `caret` is `true`.
|
|
19
|
+
* @csspart spinner - The loading spinner, present only while `loading` is `true`.
|
|
20
|
+
*
|
|
21
|
+
* @property {'default'|'primary'|'success'|'neutral'|'warning'|'danger'|'text'} variant - Visual
|
|
22
|
+
* variant. Default `'default'`.
|
|
23
|
+
* @property {'small'|'medium'|'large'} size - Button size. Default `'medium'`.
|
|
24
|
+
* @property {boolean} outline - Draws the button as an outline (transparent fill, colored border).
|
|
25
|
+
* @property {boolean} pill - Fully rounded ends.
|
|
26
|
+
* @property {boolean} circle - Renders a square, fully-rounded icon button (use with a single icon).
|
|
27
|
+
* @property {boolean} caret - Appends a dropdown caret after the label.
|
|
28
|
+
* @property {boolean} loading - Shows a spinner and blocks interaction.
|
|
29
|
+
* @property {boolean} disabled - Disables the button.
|
|
30
|
+
* @property {'button'|'submit'|'reset'} type - Behaviour when activated. `submit` / `reset` act on
|
|
31
|
+
* the nearest ancestor `<form>`. Ignored when `href` is set. Default `'button'`.
|
|
32
|
+
* @property {string} name - Name submitted with the owning form (button mode only).
|
|
33
|
+
* @property {string} value - Value submitted with the owning form (button mode only).
|
|
34
|
+
* @property {string} href - When set, the button renders as a link to this URL.
|
|
35
|
+
* @property {string} target - Where to open the linked URL (link mode only).
|
|
36
|
+
* @property {string} rel - `rel` attribute for the link (link mode only). Default `'noreferrer noopener'`.
|
|
37
|
+
* @property {string} download - Tells the browser to download the linked URL (link mode only).
|
|
38
|
+
*/
|
|
39
|
+
export default class Button {
|
|
40
|
+
properties(): {
|
|
41
|
+
variant: string;
|
|
42
|
+
size: string;
|
|
43
|
+
outline: boolean;
|
|
44
|
+
pill: boolean;
|
|
45
|
+
circle: boolean;
|
|
46
|
+
caret: boolean;
|
|
47
|
+
loading: boolean;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
type: string;
|
|
50
|
+
name: string;
|
|
51
|
+
value: string;
|
|
52
|
+
href: string;
|
|
53
|
+
target: string;
|
|
54
|
+
rel: string;
|
|
55
|
+
download: string;
|
|
56
|
+
};
|
|
57
|
+
/** Whether the button renders as a link rather than a native button. */
|
|
58
|
+
get isLink(): boolean;
|
|
59
|
+
/** Focuses the underlying control. */
|
|
60
|
+
focus(options: any): void;
|
|
61
|
+
/** Removes focus from the underlying control. */
|
|
62
|
+
blur(): void;
|
|
63
|
+
/** Simulates a click on the underlying control. */
|
|
64
|
+
click(): void;
|
|
65
|
+
events(): {
|
|
66
|
+
'.button': {
|
|
67
|
+
click: (event: any) => void;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
/** @private */
|
|
71
|
+
private contentTemplate;
|
|
72
|
+
template(): any;
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|