@expressivecss/expressive 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/css/expressive.css +9914 -0
- package/dist/css/expressive.min.css +1 -0
- package/dist/js/components/autocomplete.d.ts +152 -0
- package/dist/js/components/buttons.d.ts +66 -0
- package/dist/js/components/cards.d.ts +50 -0
- package/dist/js/components/carousel.d.ts +131 -0
- package/dist/js/components/chips.d.ts +135 -0
- package/dist/js/components/collapsible.d.ts +74 -0
- package/dist/js/components/datepicker.d.ts +336 -0
- package/dist/js/components/dropdown.d.ts +148 -0
- package/dist/js/components/index.d.ts +21 -0
- package/dist/js/components/materialbox.d.ts +97 -0
- package/dist/js/components/modal.d.ts +45 -0
- package/dist/js/components/parallax.d.ts +40 -0
- package/dist/js/components/pushpin.d.ts +51 -0
- package/dist/js/components/scrollspy.d.ts +80 -0
- package/dist/js/components/sidenav.d.ts +125 -0
- package/dist/js/components/slider.d.ts +101 -0
- package/dist/js/components/tabs.d.ts +80 -0
- package/dist/js/components/tap-target.d.ts +58 -0
- package/dist/js/components/timepicker.d.ts +207 -0
- package/dist/js/components/toast.d.ts +93 -0
- package/dist/js/components/tooltip.d.ts +117 -0
- package/dist/js/components/waves.d.ts +15 -0
- package/dist/js/expressive.js +8239 -0
- package/dist/js/expressive.js.map +1 -0
- package/dist/js/expressive.min.js +2 -0
- package/dist/js/expressive.min.js.map +1 -0
- package/dist/js/expressive.mjs +8206 -0
- package/dist/js/expressive.mjs.map +1 -0
- package/dist/js/forms/character-counter.d.ts +36 -0
- package/dist/js/forms/forms.d.ts +17 -0
- package/dist/js/forms/index.d.ts +4 -0
- package/dist/js/forms/range.d.ts +40 -0
- package/dist/js/forms/select.d.ts +77 -0
- package/dist/js/foundation/component.d.ts +73 -0
- package/dist/js/foundation/index.d.ts +2 -0
- package/dist/js/foundation/utils.d.ts +122 -0
- package/dist/js/index.d.ts +52 -0
- package/dist/js/plugins/docked-display.d.ts +34 -0
- package/dist/js/plugins/index.d.ts +1 -0
- package/package.json +71 -0
- package/src/scss/components/_appbar.scss +454 -0
- package/src/scss/components/_badges.scss +77 -0
- package/src/scss/components/_breadcrumb.scss +27 -0
- package/src/scss/components/_buttons.scss +412 -0
- package/src/scss/components/_cards.scss +267 -0
- package/src/scss/components/_carousel.scss +93 -0
- package/src/scss/components/_chips.scss +147 -0
- package/src/scss/components/_collapsible.scss +84 -0
- package/src/scss/components/_collection.scss +114 -0
- package/src/scss/components/_date-picker.scss +268 -0
- package/src/scss/components/_dropdown.scss +98 -0
- package/src/scss/components/_index.scss +28 -0
- package/src/scss/components/_material-box.scss +42 -0
- package/src/scss/components/_material-icons.scss +6 -0
- package/src/scss/components/_modal.scss +84 -0
- package/src/scss/components/_pagination.scss +45 -0
- package/src/scss/components/_parallax.scss +26 -0
- package/src/scss/components/_preloader.scss +422 -0
- package/src/scss/components/_pulse.scss +35 -0
- package/src/scss/components/_sidenav.scss +229 -0
- package/src/scss/components/_slider.scss +119 -0
- package/src/scss/components/_table-of-contents.scss +32 -0
- package/src/scss/components/_tabs.scss +176 -0
- package/src/scss/components/_tap-target.scss +102 -0
- package/src/scss/components/_time-picker.scss +294 -0
- package/src/scss/components/_toast.scss +70 -0
- package/src/scss/components/_tooltip.scss +49 -0
- package/src/scss/components/_transitions.scss +19 -0
- package/src/scss/components/_video.scss +15 -0
- package/src/scss/expressive.scss +7 -0
- package/src/scss/forms/_checkboxes.scss +199 -0
- package/src/scss/forms/_file-input.scss +41 -0
- package/src/scss/forms/_index.scss +17 -0
- package/src/scss/forms/_input-fields.scss +360 -0
- package/src/scss/forms/_radio-buttons.scss +114 -0
- package/src/scss/forms/_range.scss +148 -0
- package/src/scss/forms/_select.scss +108 -0
- package/src/scss/forms/_switches.scss +127 -0
- package/src/scss/foundation/_base.scss +71 -0
- package/src/scss/foundation/_color-palette.scss +402 -0
- package/src/scss/foundation/_index.scss +10 -0
- package/src/scss/foundation/_mixins.scss +198 -0
- package/src/scss/foundation/_motion.scss +70 -0
- package/src/scss/foundation/_normalize.scss +349 -0
- package/src/scss/foundation/_shape.scss +30 -0
- package/src/scss/foundation/_state-layers.scss +68 -0
- package/src/scss/foundation/_theme.scss +238 -0
- package/src/scss/foundation/_tokens.scss +511 -0
- package/src/scss/foundation/_variables.scss +57 -0
- package/src/scss/layout/_footer.scss +26 -0
- package/src/scss/layout/_grid.scss +172 -0
- package/src/scss/layout/_index.scss +3 -0
- package/src/scss/layout/_table.scss +119 -0
- package/src/scss/utilities/_a11y.scss +77 -0
- package/src/scss/utilities/_colors.scss +74 -0
- package/src/scss/utilities/_elevation.scss +63 -0
- package/src/scss/utilities/_helpers.scss +50 -0
- package/src/scss/utilities/_index.scss +7 -0
- package/src/scss/utilities/_responsive.scss +62 -0
- package/src/scss/utilities/_spacing.scss +38 -0
- package/src/scss/utilities/_typography.scss +115 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@use '../foundation/variables' as *;
|
|
2
|
+
@use '../utilities/elevation' as *;
|
|
3
|
+
|
|
4
|
+
[popover] {
|
|
5
|
+
outline: none;
|
|
6
|
+
padding: 0;
|
|
7
|
+
border: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// M3 Expressive: Dropdown / Menu component
|
|
11
|
+
.dropdown-content,
|
|
12
|
+
.menu-content {
|
|
13
|
+
// -- Component tokens --
|
|
14
|
+
--md-comp-menu-shape: var(--md-sys-shape-corner-extra-small, 4px);
|
|
15
|
+
--md-comp-menu-container-color: var(--md-sys-color-surface-container, var(--md-sys-color-surface));
|
|
16
|
+
|
|
17
|
+
padding-left: 0;
|
|
18
|
+
list-style-type: none;
|
|
19
|
+
@extend .elevation-2;
|
|
20
|
+
background-color: var(--md-comp-menu-container-color);
|
|
21
|
+
margin: 0;
|
|
22
|
+
display: none;
|
|
23
|
+
min-width: 100px;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
position: absolute;
|
|
27
|
+
left: 0;
|
|
28
|
+
top: 0;
|
|
29
|
+
z-index: 9999; // TODO: Check if this doesn't break other things
|
|
30
|
+
transform-origin: 0 0;
|
|
31
|
+
user-select: none;
|
|
32
|
+
border-radius: var(--md-comp-menu-shape);
|
|
33
|
+
transition:
|
|
34
|
+
opacity var(--md-sys-motion-duration-short3, 0.15s) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
35
|
+
transform var(--md-sys-motion-duration-medium1, 0.25s) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
36
|
+
|
|
37
|
+
li {
|
|
38
|
+
clear: both;
|
|
39
|
+
color: var(--md-sys-color-on-surface);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
min-height: $dropdown-item-height;
|
|
42
|
+
line-height: 1.5rem;
|
|
43
|
+
width: 100%;
|
|
44
|
+
text-align: left;
|
|
45
|
+
|
|
46
|
+
&.divider {
|
|
47
|
+
min-height: 0;
|
|
48
|
+
height: 1px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& > a, & > span {
|
|
52
|
+
font-size: 16px;
|
|
53
|
+
color: var(--md-sys-color-on-surface);
|
|
54
|
+
display: block;
|
|
55
|
+
line-height: 22px;
|
|
56
|
+
padding: (($dropdown-item-height - 22) * 0.5) 16px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& > span > label {
|
|
60
|
+
top: 1px;
|
|
61
|
+
left: 0;
|
|
62
|
+
height: 18px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Icon alignment override
|
|
66
|
+
& > a > i {
|
|
67
|
+
height: inherit;
|
|
68
|
+
line-height: inherit;
|
|
69
|
+
float: left;
|
|
70
|
+
margin: 0 24px 0 0;
|
|
71
|
+
width: 24px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:not(.disabled):hover, &.active {
|
|
75
|
+
background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-on-surface) 8%);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Keyboard focus state (parent context nesting)
|
|
79
|
+
body.keyboard-focused & {
|
|
80
|
+
&:focus {
|
|
81
|
+
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Input field specificity bugfix
|
|
88
|
+
.input-field.col .dropdown-content [type="checkbox"] + label {
|
|
89
|
+
top: 1px;
|
|
90
|
+
left: 0;
|
|
91
|
+
height: 18px;
|
|
92
|
+
transform: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dropdown-trigger,
|
|
96
|
+
.menu-trigger {
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@forward 'buttons';
|
|
2
|
+
@forward 'collection';
|
|
3
|
+
@forward 'badges';
|
|
4
|
+
@forward 'material-icons';
|
|
5
|
+
@forward 'appbar';
|
|
6
|
+
@forward 'transitions';
|
|
7
|
+
@forward 'cards';
|
|
8
|
+
@forward 'toast';
|
|
9
|
+
@forward 'tabs';
|
|
10
|
+
@forward 'tooltip';
|
|
11
|
+
@forward 'dropdown';
|
|
12
|
+
@forward 'modal';
|
|
13
|
+
@forward 'collapsible';
|
|
14
|
+
@forward 'chips';
|
|
15
|
+
@forward 'material-box';
|
|
16
|
+
@forward 'table-of-contents';
|
|
17
|
+
@forward 'sidenav';
|
|
18
|
+
@forward 'preloader';
|
|
19
|
+
@forward 'slider';
|
|
20
|
+
@forward 'carousel';
|
|
21
|
+
@forward 'tap-target';
|
|
22
|
+
@forward 'pulse';
|
|
23
|
+
@forward 'date-picker';
|
|
24
|
+
@forward 'time-picker';
|
|
25
|
+
@forward 'breadcrumb';
|
|
26
|
+
@forward 'pagination';
|
|
27
|
+
@forward 'parallax';
|
|
28
|
+
@forward 'video';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.materialboxed {
|
|
2
|
+
display: block;
|
|
3
|
+
cursor: zoom-in;
|
|
4
|
+
position: relative;
|
|
5
|
+
transition: opacity .4s;
|
|
6
|
+
-webkit-backface-visibility: hidden;
|
|
7
|
+
|
|
8
|
+
&:hover {
|
|
9
|
+
&:not(.active) {
|
|
10
|
+
opacity: .8;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
&.active {
|
|
14
|
+
cursor: zoom-out;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#materialbox-overlay {
|
|
19
|
+
position:fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
right: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
background-color: var(--md-sys-color-background);
|
|
25
|
+
z-index: 1000;
|
|
26
|
+
will-change: opacity;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.materialbox-caption {
|
|
30
|
+
position: fixed;
|
|
31
|
+
display: none;
|
|
32
|
+
color: var(--md-sys-color-on-background);
|
|
33
|
+
line-height: 50px;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
width: 100%;
|
|
37
|
+
text-align: center;
|
|
38
|
+
padding: 0% 15%;
|
|
39
|
+
height: 50px;
|
|
40
|
+
z-index: 1000;
|
|
41
|
+
-webkit-font-smoothing: antialiased;
|
|
42
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use '../foundation/variables' as *;
|
|
2
|
+
@use '../utilities/elevation' as *;
|
|
3
|
+
|
|
4
|
+
// M3 Expressive: Component tokens for Modal / Dialog
|
|
5
|
+
// use with dialog html element
|
|
6
|
+
.modal,
|
|
7
|
+
.dialog {
|
|
8
|
+
// -- Component tokens --
|
|
9
|
+
--modal-footer-divider-height: 1px;
|
|
10
|
+
--modal-border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
11
|
+
--modal-padding: 24px;
|
|
12
|
+
--modal-padding-bottom: 16px;
|
|
13
|
+
--modal-background-color: var(--md-sys-color-surface-container-high,
|
|
14
|
+
color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-surface-tint) 17%)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
@extend .elevation-5;
|
|
18
|
+
border: none;
|
|
19
|
+
outline: none;
|
|
20
|
+
padding: 0;
|
|
21
|
+
max-height: 70%;
|
|
22
|
+
width: 55%;
|
|
23
|
+
border-radius: var(--modal-border-radius);
|
|
24
|
+
will-change: top, opacity;
|
|
25
|
+
background-color: var(--modal-background-color);
|
|
26
|
+
|
|
27
|
+
// Dialog open
|
|
28
|
+
&[open] {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media #{$medium-and-down} {
|
|
34
|
+
width: 80%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// custom backdrop blur
|
|
38
|
+
&::backdrop {
|
|
39
|
+
backdrop-filter: blur(1px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.modal-header,
|
|
43
|
+
.dialog-header {
|
|
44
|
+
padding: var(--modal-padding);
|
|
45
|
+
padding-bottom: var(--modal-padding-bottom);
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
position: sticky;
|
|
48
|
+
top: 0;
|
|
49
|
+
background-color: var(--modal-background-color);
|
|
50
|
+
}
|
|
51
|
+
.modal-content,
|
|
52
|
+
.dialog-content {
|
|
53
|
+
padding: 0 var(--modal-padding);
|
|
54
|
+
}
|
|
55
|
+
.modal-footer,
|
|
56
|
+
.dialog-footer {
|
|
57
|
+
border-radius: 0 0 var(--modal-border-radius) var(--modal-border-radius);
|
|
58
|
+
padding: var(--modal-padding);
|
|
59
|
+
text-align: right;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
position: sticky;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
background-color: var(--modal-background-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.modal-close,
|
|
67
|
+
.dialog-close {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// todo: remove maybe
|
|
72
|
+
h1,h2,h3,h4,h5,h6 {
|
|
73
|
+
margin: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Modal Bottom Sheet Style
|
|
77
|
+
&.bottom-sheet {
|
|
78
|
+
margin-bottom: 0;
|
|
79
|
+
max-height: 45%;
|
|
80
|
+
border-bottom-left-radius: 0;
|
|
81
|
+
border-bottom-right-radius: 0;
|
|
82
|
+
will-change: bottom, opacity;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use '../foundation/variables' as *;
|
|
2
|
+
@use '../foundation/mixins' as *;
|
|
3
|
+
|
|
4
|
+
.pagination {
|
|
5
|
+
li {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
vertical-align: top;
|
|
8
|
+
|
|
9
|
+
a {
|
|
10
|
+
@include btn($height: 2rem, $padding-left: .66rem, $padding-right: .66rem, $font-size: 1.2rem);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.active a {
|
|
14
|
+
@include btn-filled;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.disabled a {
|
|
18
|
+
@include btn-disabled;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
i {
|
|
22
|
+
font-size: 2rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
li.pages ul li {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
float: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media #{$medium-and-down} {
|
|
32
|
+
width: 100%;
|
|
33
|
+
|
|
34
|
+
li.prev,
|
|
35
|
+
li.next {
|
|
36
|
+
width: 10%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
li.pages {
|
|
40
|
+
width: 80%;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Parallax
|
|
2
|
+
.parallax-container {
|
|
3
|
+
position: relative;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
height: 500px;
|
|
6
|
+
|
|
7
|
+
.parallax {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
z-index: -1;
|
|
14
|
+
|
|
15
|
+
img {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: 50%;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
min-width: 100%;
|
|
21
|
+
min-height: 100%;
|
|
22
|
+
transform: translate3d(0, 0, 0);
|
|
23
|
+
transform: translateX(-50%);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|