@expressivecss/expressive 0.4.0 → 0.6.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 +127 -0
- package/README.md +4 -9
- package/dist/css/expressive.css +2617 -951
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/js/expressive.cjs +643 -804
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +643 -804
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +11 -11
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +643 -804
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/behaviors/bottomSheets.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +18 -0
- package/dist/types/components/autocomplete.d.ts +11 -11
- package/dist/types/components/index.d.ts +3 -5
- package/dist/types/components/{dropdown.d.ts → menu.d.ts} +38 -37
- package/dist/types/components/navigationRail.d.ts +53 -0
- package/dist/types/components/range.d.ts +3 -0
- package/dist/types/components/registry.d.ts +7 -15
- package/dist/types/components/select.d.ts +12 -12
- package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
- package/dist/types/index.d.ts +3 -1
- package/package.json +3 -2
- package/src/sass/README.md +13 -11
- package/src/sass/abstracts/_breakpoints.scss +14 -3
- package/src/sass/abstracts/_mixins.scss +3 -3
- package/src/sass/abstracts/_variables.scss +27 -2
- package/src/sass/base/_global.scss +1 -1
- package/src/sass/base/_grid.scss +66 -116
- package/src/sass/base/_index.scss +1 -1
- package/src/sass/components/_badges.scss +80 -60
- package/src/sass/components/_bottom-sheet.scss +137 -0
- package/src/sass/components/_cards.scss +4 -4
- package/src/sass/components/_chips.scss +6 -5
- package/src/sass/components/_dialog.scss +268 -0
- package/src/sass/components/_index.scss +9 -7
- package/src/sass/components/_list.scss +253 -0
- package/src/sass/components/_menu.scss +341 -0
- package/src/sass/components/_navbar.scss +65 -117
- package/src/sass/components/_navigation-bar.scss +165 -0
- package/src/sass/components/_navigation-rail.scss +308 -0
- package/src/sass/components/_page-footer.scss +7 -3
- package/src/sass/components/_panes.scss +294 -0
- package/src/sass/components/_side-sheet.scss +193 -0
- package/src/sass/components/_sidenav.scss +78 -49
- package/src/sass/components/{_toast.scss → _snackbar.scss} +35 -34
- package/src/sass/components/_tabs.scss +1 -27
- package/src/sass/components/_toolbar.scss +91 -25
- package/src/sass/components/_tooltip.scss +1 -1
- package/src/sass/components/forms/_fieldset.scss +1 -1
- package/src/sass/components/forms/_input-fields.scss +3 -3
- package/src/sass/components/forms/_range.scss +423 -98
- package/src/sass/components/forms/_select.scss +19 -17
- package/src/sass/tokens/_reference.scss +37 -13
- package/src/sass/tokens/_theme.scss +5 -13
- package/src/sass/utilities/_colors.scss +16 -74
- package/src/sass/utilities/_visibility.scss +8 -0
- package/dist/types/components/collapsible.d.ts +0 -79
- package/dist/types/components/pushpin.d.ts +0 -51
- package/dist/types/components/tapTarget.d.ts +0 -57
- package/src/sass/components/_collapsible.scss +0 -179
- package/src/sass/components/_collection.scss +0 -180
- package/src/sass/components/_dropdown.scss +0 -225
- package/src/sass/components/_modal.scss +0 -190
- package/src/sass/components/_pushpin.scss +0 -11
- package/src/sass/components/_tapTarget.scss +0 -187
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use "../../abstracts" as *;
|
|
2
2
|
|
|
3
|
-
// Select (exposed
|
|
3
|
+
// Select (exposed menu).
|
|
4
4
|
//
|
|
5
5
|
// Anatomy is the HTML. A <select> is the control. FormSelect wraps it
|
|
6
6
|
// in .field (or reuses an existing one) and paints a text field + menu.
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
// expand icon (CSS, not an SVG node).
|
|
9
9
|
//
|
|
10
10
|
// Tokens follow https://m3.material.io/components/menus/overview
|
|
11
|
-
// (exposed
|
|
11
|
+
// (exposed menu = text field + menu) and the filled/outlined field
|
|
12
12
|
// tokens in _input-fields.scss.
|
|
13
13
|
// field 56dp, same chrome as .field
|
|
14
14
|
// trailing icon 24dp, 12dp from the end, rotates when open
|
|
15
|
-
// selected item
|
|
15
|
+
// selected item tertiary-container + trailing check
|
|
16
16
|
// optgroup on-surface-variant, outline-variant rule
|
|
17
17
|
//
|
|
18
18
|
$_select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
|
|
@@ -20,7 +20,7 @@ $_select-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg
|
|
|
20
20
|
|
|
21
21
|
// Native / no-js / .browser-default: a 56dp field, not a 3rem box.
|
|
22
22
|
select {
|
|
23
|
-
--md-comp-filled-select-container-color: var(--md-sys-color-surface-
|
|
23
|
+
--md-comp-filled-select-container-color: var(--md-sys-color-surface-container-highest);
|
|
24
24
|
--md-comp-filled-select-container-shape: 1rem;
|
|
25
25
|
--md-comp-filled-select-input-text-color: var(--md-sys-color-on-surface);
|
|
26
26
|
|
|
@@ -69,8 +69,8 @@ select.browser-default {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.field:has(> .hide-select) {
|
|
72
|
-
//
|
|
73
|
-
//
|
|
72
|
+
// Match the vertical menu's 16dp surface so the closed field and the
|
|
73
|
+
// open list read as one shape.
|
|
74
74
|
--md-comp-filled-select-container-shape: 1rem;
|
|
75
75
|
--md-comp-menu-container-shape: 1rem;
|
|
76
76
|
--md-comp-filled-select-trailing-icon-size: 24px;
|
|
@@ -80,11 +80,11 @@ select.browser-default {
|
|
|
80
80
|
position: relative;
|
|
81
81
|
border-radius: var(--md-comp-filled-select-container-shape);
|
|
82
82
|
|
|
83
|
-
> input.
|
|
83
|
+
> input.menu-trigger {
|
|
84
84
|
border-radius: inherit;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
> input.
|
|
87
|
+
> input.menu-trigger {
|
|
88
88
|
padding-inline-end: 52px;
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -144,7 +144,7 @@ select.browser-default {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.field:has(> .hide-select) > input.
|
|
147
|
+
.field:has(> .hide-select) > input.menu-trigger:disabled {
|
|
148
148
|
cursor: default;
|
|
149
149
|
user-select: none;
|
|
150
150
|
}
|
|
@@ -161,19 +161,21 @@ menu[role="listbox"] > li:not(.optgroup, .divider) {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
menu[role="listbox"] > li.selected:not(.disabled, .optgroup) {
|
|
164
|
-
background-color: color
|
|
164
|
+
background-color: var(--md-comp-menu-item-selected-container-color, var(--md-sys-color-tertiary-container));
|
|
165
|
+
color: var(--md-comp-menu-item-selected-label-text-color, var(--md-sys-color-on-tertiary-container));
|
|
166
|
+
border-radius: var(--md-comp-menu-item-selected-container-shape, 12px);
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
// Single-select: trailing check. Multi-select already has a leading checkbox.
|
|
168
|
-
menu[role="listbox"]:not(.multiple-select-
|
|
170
|
+
menu[role="listbox"]:not(.multiple-select-menu) > li.selected:not(.disabled, .optgroup)::after {
|
|
169
171
|
content: "";
|
|
170
|
-
flex: 0 0
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
172
|
+
flex: 0 0 20px;
|
|
173
|
+
width: 20px;
|
|
174
|
+
height: 20px;
|
|
173
175
|
margin-inline-start: auto;
|
|
174
|
-
margin-inline-end:
|
|
175
|
-
background-color: var(--md-sys-color-on-
|
|
176
|
-
mask: $_select-check center /
|
|
176
|
+
margin-inline-end: 8px;
|
|
177
|
+
background-color: var(--md-comp-menu-item-selected-leading-icon-color, var(--md-sys-color-on-tertiary-container));
|
|
178
|
+
mask: $_select-check center / 20px no-repeat;
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
menu[role="listbox"] li img {
|
|
@@ -42,9 +42,11 @@ $md-source: #006A79 !default;
|
|
|
42
42
|
|
|
43
43
|
// tone -> OKLCH lightness. Fitted against the reference ramps; see the test.
|
|
44
44
|
$tones: (
|
|
45
|
-
0: 0%,
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
0: 0%, 4: 8.95%, 6: 13.42%, 10: 22.37%, 12: 24.09%, 17: 28.40%,
|
|
46
|
+
20: 30.99%, 22: 32.70%, 24: 34.41%, 25: 35.26%, 30: 39.48%, 35: 43.79%,
|
|
47
|
+
40: 48.14%, 50: 56.83%, 60: 65.42%, 70: 74.04%, 80: 82.63%, 87: 88.72%,
|
|
48
|
+
90: 91.33%, 92: 93.05%, 94: 94.76%, 95: 95.62%, 96: 96.50%, 98: 98.25%,
|
|
49
|
+
99: 99.19%, 100: 100%
|
|
48
50
|
) !default;
|
|
49
51
|
|
|
50
52
|
// Per-ramp hue offset from the source hue, and target chroma. Chroma is a
|
|
@@ -72,37 +74,59 @@ $ramps: (
|
|
|
72
74
|
$sys-light: (
|
|
73
75
|
"primary": "primary40", "on-primary": "primary100",
|
|
74
76
|
"primary-container": "primary90", "on-primary-container": "primary10",
|
|
77
|
+
"primary-fixed": "primary90", "primary-fixed-dim": "primary80",
|
|
78
|
+
"on-primary-fixed": "primary10", "on-primary-fixed-variant": "primary30",
|
|
75
79
|
"secondary": "secondary40", "on-secondary": "secondary100",
|
|
76
80
|
"secondary-container": "secondary90", "on-secondary-container": "secondary10",
|
|
81
|
+
"secondary-fixed": "secondary90", "secondary-fixed-dim": "secondary80",
|
|
82
|
+
"on-secondary-fixed": "secondary10", "on-secondary-fixed-variant": "secondary30",
|
|
77
83
|
"tertiary": "tertiary40", "on-tertiary": "tertiary100",
|
|
78
84
|
"tertiary-container": "tertiary90", "on-tertiary-container": "tertiary10",
|
|
85
|
+
"tertiary-fixed": "tertiary90", "tertiary-fixed-dim": "tertiary80",
|
|
86
|
+
"on-tertiary-fixed": "tertiary10", "on-tertiary-fixed-variant": "tertiary30",
|
|
79
87
|
"error": "error40", "on-error": "error100",
|
|
80
88
|
"error-container": "error90", "on-error-container": "error10",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"surface-
|
|
89
|
+
"surface": "neutral98", "on-surface": "neutral10",
|
|
90
|
+
"on-surface-variant": "neutral-variant30",
|
|
91
|
+
"surface-dim": "neutral87", "surface-bright": "neutral98",
|
|
92
|
+
"surface-container-lowest": "neutral100", "surface-container-low": "neutral96",
|
|
93
|
+
"surface-container": "neutral94", "surface-container-high": "neutral92",
|
|
94
|
+
"surface-container-highest": "neutral90",
|
|
84
95
|
"outline": "neutral-variant50", "outline-variant": "neutral-variant80",
|
|
85
96
|
"inverse-surface": "neutral20", "inverse-on-surface": "neutral95",
|
|
86
|
-
"inverse-primary": "primary80",
|
|
87
|
-
"
|
|
97
|
+
"inverse-primary": "primary80",
|
|
98
|
+
"scrim": "neutral0", "shadow": "neutral0",
|
|
99
|
+
"background": "neutral98", "on-background": "neutral10",
|
|
100
|
+
"surface-variant": "neutral-variant90", "surface-tint": "primary40"
|
|
88
101
|
) !default;
|
|
89
102
|
|
|
90
103
|
$sys-dark: (
|
|
91
104
|
"primary": "primary80", "on-primary": "primary20",
|
|
92
105
|
"primary-container": "primary30", "on-primary-container": "primary90",
|
|
106
|
+
"primary-fixed": "primary90", "primary-fixed-dim": "primary80",
|
|
107
|
+
"on-primary-fixed": "primary10", "on-primary-fixed-variant": "primary30",
|
|
93
108
|
"secondary": "secondary80", "on-secondary": "secondary20",
|
|
94
109
|
"secondary-container": "secondary30", "on-secondary-container": "secondary90",
|
|
110
|
+
"secondary-fixed": "secondary90", "secondary-fixed-dim": "secondary80",
|
|
111
|
+
"on-secondary-fixed": "secondary10", "on-secondary-fixed-variant": "secondary30",
|
|
95
112
|
"tertiary": "tertiary80", "on-tertiary": "tertiary20",
|
|
96
113
|
"tertiary-container": "tertiary30", "on-tertiary-container": "tertiary90",
|
|
114
|
+
"tertiary-fixed": "tertiary90", "tertiary-fixed-dim": "tertiary80",
|
|
115
|
+
"on-tertiary-fixed": "tertiary10", "on-tertiary-fixed-variant": "tertiary30",
|
|
97
116
|
"error": "error80", "on-error": "error20",
|
|
98
117
|
"error-container": "error30", "on-error-container": "error90",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"surface-
|
|
118
|
+
"surface": "neutral6", "on-surface": "neutral90",
|
|
119
|
+
"on-surface-variant": "neutral-variant80",
|
|
120
|
+
"surface-dim": "neutral6", "surface-bright": "neutral24",
|
|
121
|
+
"surface-container-lowest": "neutral4", "surface-container-low": "neutral10",
|
|
122
|
+
"surface-container": "neutral12", "surface-container-high": "neutral17",
|
|
123
|
+
"surface-container-highest": "neutral22",
|
|
102
124
|
"outline": "neutral-variant60", "outline-variant": "neutral-variant30",
|
|
103
125
|
"inverse-surface": "neutral90", "inverse-on-surface": "neutral10",
|
|
104
|
-
"inverse-primary": "primary40",
|
|
105
|
-
"
|
|
126
|
+
"inverse-primary": "primary40",
|
|
127
|
+
"scrim": "neutral0", "shadow": "neutral0",
|
|
128
|
+
"background": "neutral6", "on-background": "neutral90",
|
|
129
|
+
"surface-variant": "neutral-variant30", "surface-tint": "primary80"
|
|
106
130
|
) !default;
|
|
107
131
|
|
|
108
132
|
:root {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
1
3
|
// Maps the resolved pairs from tokens/_reference.scss onto the live
|
|
2
4
|
// --md-sys-color-* names that the rest of the framework consumes.
|
|
3
5
|
//
|
|
4
|
-
// This file used to spell out all
|
|
6
|
+
// This file used to spell out all tokens four times - once for the light
|
|
5
7
|
// default, once inside @media (prefers-color-scheme: dark), and once for each
|
|
6
8
|
// of :root[theme='light'] / [theme='dark'] - because a custom property can
|
|
7
9
|
// only hold one value per selector. light-dark() holds both, so the mapping is
|
|
@@ -18,18 +20,6 @@
|
|
|
18
20
|
// They are the documented way to re-theme the framework (see the docs' Themes
|
|
19
21
|
// page) and several components reference them directly.
|
|
20
22
|
|
|
21
|
-
$sys-color-roles: (
|
|
22
|
-
"primary", "on-primary", "primary-container", "on-primary-container",
|
|
23
|
-
"secondary", "on-secondary", "secondary-container", "on-secondary-container",
|
|
24
|
-
"tertiary", "on-tertiary", "tertiary-container", "on-tertiary-container",
|
|
25
|
-
"error", "on-error", "error-container", "on-error-container",
|
|
26
|
-
"outline", "outline-variant",
|
|
27
|
-
"background", "on-background",
|
|
28
|
-
"surface", "on-surface", "surface-variant", "on-surface-variant",
|
|
29
|
-
"inverse-surface", "inverse-on-surface", "inverse-primary",
|
|
30
|
-
"shadow", "surface-tint", "scrim"
|
|
31
|
-
) !default;
|
|
32
|
-
|
|
33
23
|
:root, :host {
|
|
34
24
|
// `light dark` means: follow the OS unless an ancestor says otherwise.
|
|
35
25
|
color-scheme: light dark;
|
|
@@ -45,5 +35,7 @@ $sys-color-roles: (
|
|
|
45
35
|
/* ===================================================================== Themes */
|
|
46
36
|
|
|
47
37
|
// Opting out of the OS preference. Every token above re-resolves from these.
|
|
38
|
+
// `auto` is the explicit follow-OS value — same as omitting the attribute.
|
|
48
39
|
:root[theme='light'] { color-scheme: light; }
|
|
49
40
|
:root[theme='dark'] { color-scheme: dark; }
|
|
41
|
+
:root[theme='auto'] { color-scheme: light dark; }
|
|
@@ -1,74 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.on-secondary-container-text { color: var(--md-sys-color-on-secondary-container); }
|
|
18
|
-
|
|
19
|
-
.tertiary { background-color: var(--md-sys-color-tertiary); }
|
|
20
|
-
.tertiary-text { color: var(--md-sys-color-tertiary); }
|
|
21
|
-
.on-tertiary { background-color: var(--md-sys-color-on-tertiary); }
|
|
22
|
-
.on-tertiary-text { color: var(--md-sys-color-on-tertiary); }
|
|
23
|
-
.tertiary-container { background-color: var(--md-sys-color-tertiary-container); }
|
|
24
|
-
.tertiary-container-text { color: var(--md-sys-color-tertiary-container); }
|
|
25
|
-
.on-tertiary-container { background-color: var(--md-sys-color-on-tertiary-container); }
|
|
26
|
-
.on-tertiary-container-text { color: var(--md-sys-color-on-tertiary-container); }
|
|
27
|
-
|
|
28
|
-
.error { background-color: var(--md-sys-color-error); }
|
|
29
|
-
.error-text { color: var(--md-sys-color-error); }
|
|
30
|
-
.on-error { background-color: var(--md-sys-color-on-error); }
|
|
31
|
-
.on-error-text { color: var(--md-sys-color-on-error); }
|
|
32
|
-
.error-container { background-color: var(--md-sys-color-error-container); }
|
|
33
|
-
.error-container-text { color: var(--md-sys-color-error-container); }
|
|
34
|
-
.on-error-container { background-color: var(--md-sys-color-on-error-container); }
|
|
35
|
-
.on-error-container-text { color: var(--md-sys-color-on-error-container); }
|
|
36
|
-
|
|
37
|
-
.background { background-color: var(--md-sys-color-background); }
|
|
38
|
-
.background-text { color: var(--md-sys-color-background); }
|
|
39
|
-
.on-background { background-color: var(--md-sys-color-on-background); }
|
|
40
|
-
.on-background-text { color: var(--md-sys-color-on-background); }
|
|
41
|
-
|
|
42
|
-
.surface { background-color: var(--md-sys-color-surface); }
|
|
43
|
-
.surface-text { color: var(--md-sys-color-surface); }
|
|
44
|
-
.on-surface { background-color: var(--md-sys-color-on-surface); }
|
|
45
|
-
.on-surface-text { color: var(--md-sys-color-on-surface); }
|
|
46
|
-
|
|
47
|
-
.surface-variant { background-color: var(--md-sys-color-surface-variant); }
|
|
48
|
-
.surface-variant-text { color: var(--md-sys-color-surface-variant); }
|
|
49
|
-
.on-surface-variant { background-color: var(--md-sys-color-on-surface-variant); }
|
|
50
|
-
.on-surface-variant-text { color: var(--md-sys-color-on-surface-variant); }
|
|
51
|
-
|
|
52
|
-
.outline { background-color: var(--md-sys-color-outline); }
|
|
53
|
-
.outline-text { color: var(--md-sys-color-outline); }
|
|
54
|
-
|
|
55
|
-
.inverse-on-surface { background-color: var(--md-sys-color-inverse-on-surface); }
|
|
56
|
-
.inverse-on-surface-text { color: var(--md-sys-color-inverse-on-surface); }
|
|
57
|
-
|
|
58
|
-
.inverse-surface { background-color: var(--md-sys-color-inverse-surface); }
|
|
59
|
-
.inverse-surface-text { color: var(--md-sys-color-inverse-surface); }
|
|
60
|
-
|
|
61
|
-
.inverse-primary { background-color: var(--md-sys-color-inverse-primary); }
|
|
62
|
-
.inverse-primary-text { color: var(--md-sys-color-inverse-primary); }
|
|
63
|
-
|
|
64
|
-
.shadow { background-color: var(--md-sys-color-shadow); }
|
|
65
|
-
.shadow-text { color: var(--md-sys-color-shadow); }
|
|
66
|
-
|
|
67
|
-
.surface-tint { background-color: var(--md-sys-color-surface-tint); }
|
|
68
|
-
.surface-tint-text { color: var(--md-sys-color-surface-tint); }
|
|
69
|
-
|
|
70
|
-
.outline-variant { background-color: var(--md-sys-color-outline-variant); }
|
|
71
|
-
.outline-variant-text { color: var(--md-sys-color-outline-variant); }
|
|
72
|
-
|
|
73
|
-
.scrim { background-color: var(--md-sys-color-scrim); }
|
|
74
|
-
.scrim-text { color: var(--md-sys-color-scrim); }
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// One fill class and one `-text` foreground class per color role.
|
|
4
|
+
// Generated from $sys-color-roles so this file cannot drift from the
|
|
5
|
+
// token layer. Pair a fill with its `on-*` text class — container
|
|
6
|
+
// roles are fills, not text; `on-*` roles are text/icons, not fills.
|
|
7
|
+
|
|
8
|
+
@each $role in $sys-color-roles {
|
|
9
|
+
.#{$role} {
|
|
10
|
+
background-color: var(--md-sys-color-#{$role});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$role}-text {
|
|
14
|
+
color: var(--md-sys-color-#{$role});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -31,10 +31,18 @@
|
|
|
31
31
|
@include bp-up("xlarge") { display: none !important; }
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.hide-on-xxl-only {
|
|
35
|
+
@include bp-up("xxlarge") { display: none !important; }
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
.show-on-extra-large {
|
|
35
39
|
@include bp-up("xlarge") { display: block !important; }
|
|
36
40
|
}
|
|
37
41
|
|
|
42
|
+
.show-on-xxl {
|
|
43
|
+
@include bp-up("xxlarge") { display: block !important; }
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
.show-on-large {
|
|
39
47
|
@include bp-up("large") { display: block !important; }
|
|
40
48
|
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
-
export interface CollapsibleOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* If accordion versus collapsible. When omitted, `.expandable` on the
|
|
5
|
-
* element turns accordion off. `<details>` with the same `name` already
|
|
6
|
-
* exclusive-open in the browser; this option assigns `name` when it
|
|
7
|
-
* is missing.
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
accordion: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Callback function called before collapsible is opened.
|
|
13
|
-
* @default null
|
|
14
|
-
*/
|
|
15
|
-
onOpenStart: (el: Element) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function called after collapsible is opened.
|
|
18
|
-
* @default null
|
|
19
|
-
*/
|
|
20
|
-
onOpenEnd: (el: Element) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Callback function called before collapsible is closed.
|
|
23
|
-
* @default null
|
|
24
|
-
*/
|
|
25
|
-
onCloseStart: (el: Element) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Callback function called after collapsible is closed.
|
|
28
|
-
* @default null
|
|
29
|
-
*/
|
|
30
|
-
onCloseEnd: (el: Element) => void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Collapsible. Open/close is HTML (`<details>` / `[open]`). Height is CSS.
|
|
34
|
-
* This class is the public API and accordion `name` assignment.
|
|
35
|
-
*/
|
|
36
|
-
export declare class Collapsible extends Component<CollapsibleOptions> {
|
|
37
|
-
private _items;
|
|
38
|
-
private _groupName;
|
|
39
|
-
private _endTimers;
|
|
40
|
-
private _wrappedBodies;
|
|
41
|
-
constructor(el: HTMLElement, options: Partial<CollapsibleOptions>);
|
|
42
|
-
static get defaults(): CollapsibleOptions;
|
|
43
|
-
/**
|
|
44
|
-
* Initializes instance of Collapsible.
|
|
45
|
-
* @param el HTML element.
|
|
46
|
-
* @param options Component options.
|
|
47
|
-
*/
|
|
48
|
-
static init(el: HTMLElement, options?: Partial<CollapsibleOptions>): Collapsible;
|
|
49
|
-
/**
|
|
50
|
-
* Initializes instances of Collapsible.
|
|
51
|
-
* @param els HTML elements.
|
|
52
|
-
* @param options Component options.
|
|
53
|
-
*/
|
|
54
|
-
static init(els: InitElements<InitElement>, options?: Partial<CollapsibleOptions>): Collapsible[];
|
|
55
|
-
static getInstance(el: HTMLElement): Collapsible;
|
|
56
|
-
destroy(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Open collapsible section.
|
|
59
|
-
* @param index 0-based index of the section to open.
|
|
60
|
-
*/
|
|
61
|
-
open: (index: number) => void;
|
|
62
|
-
/**
|
|
63
|
-
* Close collapsible section.
|
|
64
|
-
* @param index 0-based index of the section to close.
|
|
65
|
-
*/
|
|
66
|
-
close: (index: number) => void;
|
|
67
|
-
private _collectItems;
|
|
68
|
-
private _setupItems;
|
|
69
|
-
private _isOpen;
|
|
70
|
-
private _setOpen;
|
|
71
|
-
private _wrapDetailsBodies;
|
|
72
|
-
private _unwrapDetailsBodies;
|
|
73
|
-
private _bodyOf;
|
|
74
|
-
private _setupEventHandlers;
|
|
75
|
-
private _removeEventHandlers;
|
|
76
|
-
private _handleToggle;
|
|
77
|
-
private _notify;
|
|
78
|
-
private _durationMs;
|
|
79
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
-
export interface PushpinOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The distance in pixels from the top of the page where
|
|
5
|
-
* the element becomes fixed.
|
|
6
|
-
* @default 0
|
|
7
|
-
*/
|
|
8
|
-
top: number;
|
|
9
|
-
/**
|
|
10
|
-
* The distance in pixels from the top of the page where
|
|
11
|
-
* the elements stops being fixed.
|
|
12
|
-
* @default Infinity
|
|
13
|
-
*/
|
|
14
|
-
bottom: number;
|
|
15
|
-
/**
|
|
16
|
-
* The offset from the top the element will be fixed at.
|
|
17
|
-
* @default 0
|
|
18
|
-
*/
|
|
19
|
-
offset: number;
|
|
20
|
-
/**
|
|
21
|
-
* Callback function called when pushpin position changes.
|
|
22
|
-
* You are provided with a position string.
|
|
23
|
-
* @default null
|
|
24
|
-
*/
|
|
25
|
-
onPositionChange: (position: 'pinned' | 'pin-top' | 'pin-bottom') => void;
|
|
26
|
-
}
|
|
27
|
-
export declare class Pushpin extends Component<PushpinOptions> {
|
|
28
|
-
static _pushpins: Pushpin[];
|
|
29
|
-
originalOffset: number;
|
|
30
|
-
constructor(el: HTMLElement, options: Partial<PushpinOptions>);
|
|
31
|
-
static get defaults(): PushpinOptions;
|
|
32
|
-
/**
|
|
33
|
-
* Initializes instance of Pushpin.
|
|
34
|
-
* @param el HTML element.
|
|
35
|
-
* @param options Component options.
|
|
36
|
-
*/
|
|
37
|
-
static init(el: HTMLElement, options?: Partial<PushpinOptions>): Pushpin;
|
|
38
|
-
/**
|
|
39
|
-
* Initializes instances of Pushpin.
|
|
40
|
-
* @param els HTML elements.
|
|
41
|
-
* @param options Component options.
|
|
42
|
-
*/
|
|
43
|
-
static init(els: InitElements<InitElement>, options?: Partial<PushpinOptions>): Pushpin[];
|
|
44
|
-
static getInstance(el: HTMLElement): Pushpin;
|
|
45
|
-
destroy(): void;
|
|
46
|
-
static _updateElements(): void;
|
|
47
|
-
_setupEventHandlers(): void;
|
|
48
|
-
_removeEventHandlers(): void;
|
|
49
|
-
_updatePosition(): void;
|
|
50
|
-
_removePinClasses(): void;
|
|
51
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Component, BaseOptions, InitElements, InitElement, Openable } from '../core/component';
|
|
2
|
-
export interface TapTargetOptions extends BaseOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Callback function called when Tap Target is opened.
|
|
5
|
-
* @default null
|
|
6
|
-
*/
|
|
7
|
-
onOpen: (origin: HTMLElement) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Callback function called when Tap Target is closed.
|
|
10
|
-
* @default null
|
|
11
|
-
*/
|
|
12
|
-
onClose: (origin: HTMLElement) => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Tap target (Feature Discovery). Placement is CSS custom properties;
|
|
16
|
-
* the wrapper is a popover when the platform has one. This class is
|
|
17
|
-
* open/close, origin lookup, and the two geometry variables.
|
|
18
|
-
*/
|
|
19
|
-
export declare class TapTarget extends Component<TapTargetOptions> implements Openable {
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
originEl: HTMLElement | null;
|
|
22
|
-
static _taptargets: TapTarget[];
|
|
23
|
-
private wrapper;
|
|
24
|
-
private waveEl;
|
|
25
|
-
private contentEl;
|
|
26
|
-
private _createdWrapper;
|
|
27
|
-
private _createdWave;
|
|
28
|
-
private _usePopover;
|
|
29
|
-
private _liftedStatic;
|
|
30
|
-
private _opening;
|
|
31
|
-
constructor(el: HTMLElement, options: Partial<TapTargetOptions>);
|
|
32
|
-
static get defaults(): TapTargetOptions;
|
|
33
|
-
static init(el: HTMLElement, options?: Partial<TapTargetOptions>): TapTarget;
|
|
34
|
-
static init(els: InitElements<InitElement>, options?: Partial<TapTargetOptions>): TapTarget[];
|
|
35
|
-
static getInstance(el: HTMLElement): TapTarget;
|
|
36
|
-
destroy(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Open Tap Target.
|
|
39
|
-
*/
|
|
40
|
-
open: () => void;
|
|
41
|
-
/**
|
|
42
|
-
* Close Tap Target.
|
|
43
|
-
*/
|
|
44
|
-
close: () => void;
|
|
45
|
-
private _setup;
|
|
46
|
-
private _ensureId;
|
|
47
|
-
private _labelFromHeading;
|
|
48
|
-
private _teardownDom;
|
|
49
|
-
private _setupEventHandlers;
|
|
50
|
-
private _removeEventHandlers;
|
|
51
|
-
private _handleThrottledResize;
|
|
52
|
-
private _handleOriginKeydown;
|
|
53
|
-
private _handleTargetToggle;
|
|
54
|
-
private _handleResize;
|
|
55
|
-
private _handlePopoverToggle;
|
|
56
|
-
private _calculatePositioning;
|
|
57
|
-
}
|