@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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +82 -0
  3. package/dist/css/expressive.css +9914 -0
  4. package/dist/css/expressive.min.css +1 -0
  5. package/dist/js/components/autocomplete.d.ts +152 -0
  6. package/dist/js/components/buttons.d.ts +66 -0
  7. package/dist/js/components/cards.d.ts +50 -0
  8. package/dist/js/components/carousel.d.ts +131 -0
  9. package/dist/js/components/chips.d.ts +135 -0
  10. package/dist/js/components/collapsible.d.ts +74 -0
  11. package/dist/js/components/datepicker.d.ts +336 -0
  12. package/dist/js/components/dropdown.d.ts +148 -0
  13. package/dist/js/components/index.d.ts +21 -0
  14. package/dist/js/components/materialbox.d.ts +97 -0
  15. package/dist/js/components/modal.d.ts +45 -0
  16. package/dist/js/components/parallax.d.ts +40 -0
  17. package/dist/js/components/pushpin.d.ts +51 -0
  18. package/dist/js/components/scrollspy.d.ts +80 -0
  19. package/dist/js/components/sidenav.d.ts +125 -0
  20. package/dist/js/components/slider.d.ts +101 -0
  21. package/dist/js/components/tabs.d.ts +80 -0
  22. package/dist/js/components/tap-target.d.ts +58 -0
  23. package/dist/js/components/timepicker.d.ts +207 -0
  24. package/dist/js/components/toast.d.ts +93 -0
  25. package/dist/js/components/tooltip.d.ts +117 -0
  26. package/dist/js/components/waves.d.ts +15 -0
  27. package/dist/js/expressive.js +8239 -0
  28. package/dist/js/expressive.js.map +1 -0
  29. package/dist/js/expressive.min.js +2 -0
  30. package/dist/js/expressive.min.js.map +1 -0
  31. package/dist/js/expressive.mjs +8206 -0
  32. package/dist/js/expressive.mjs.map +1 -0
  33. package/dist/js/forms/character-counter.d.ts +36 -0
  34. package/dist/js/forms/forms.d.ts +17 -0
  35. package/dist/js/forms/index.d.ts +4 -0
  36. package/dist/js/forms/range.d.ts +40 -0
  37. package/dist/js/forms/select.d.ts +77 -0
  38. package/dist/js/foundation/component.d.ts +73 -0
  39. package/dist/js/foundation/index.d.ts +2 -0
  40. package/dist/js/foundation/utils.d.ts +122 -0
  41. package/dist/js/index.d.ts +52 -0
  42. package/dist/js/plugins/docked-display.d.ts +34 -0
  43. package/dist/js/plugins/index.d.ts +1 -0
  44. package/package.json +71 -0
  45. package/src/scss/components/_appbar.scss +454 -0
  46. package/src/scss/components/_badges.scss +77 -0
  47. package/src/scss/components/_breadcrumb.scss +27 -0
  48. package/src/scss/components/_buttons.scss +412 -0
  49. package/src/scss/components/_cards.scss +267 -0
  50. package/src/scss/components/_carousel.scss +93 -0
  51. package/src/scss/components/_chips.scss +147 -0
  52. package/src/scss/components/_collapsible.scss +84 -0
  53. package/src/scss/components/_collection.scss +114 -0
  54. package/src/scss/components/_date-picker.scss +268 -0
  55. package/src/scss/components/_dropdown.scss +98 -0
  56. package/src/scss/components/_index.scss +28 -0
  57. package/src/scss/components/_material-box.scss +42 -0
  58. package/src/scss/components/_material-icons.scss +6 -0
  59. package/src/scss/components/_modal.scss +84 -0
  60. package/src/scss/components/_pagination.scss +45 -0
  61. package/src/scss/components/_parallax.scss +26 -0
  62. package/src/scss/components/_preloader.scss +422 -0
  63. package/src/scss/components/_pulse.scss +35 -0
  64. package/src/scss/components/_sidenav.scss +229 -0
  65. package/src/scss/components/_slider.scss +119 -0
  66. package/src/scss/components/_table-of-contents.scss +32 -0
  67. package/src/scss/components/_tabs.scss +176 -0
  68. package/src/scss/components/_tap-target.scss +102 -0
  69. package/src/scss/components/_time-picker.scss +294 -0
  70. package/src/scss/components/_toast.scss +70 -0
  71. package/src/scss/components/_tooltip.scss +49 -0
  72. package/src/scss/components/_transitions.scss +19 -0
  73. package/src/scss/components/_video.scss +15 -0
  74. package/src/scss/expressive.scss +7 -0
  75. package/src/scss/forms/_checkboxes.scss +199 -0
  76. package/src/scss/forms/_file-input.scss +41 -0
  77. package/src/scss/forms/_index.scss +17 -0
  78. package/src/scss/forms/_input-fields.scss +360 -0
  79. package/src/scss/forms/_radio-buttons.scss +114 -0
  80. package/src/scss/forms/_range.scss +148 -0
  81. package/src/scss/forms/_select.scss +108 -0
  82. package/src/scss/forms/_switches.scss +127 -0
  83. package/src/scss/foundation/_base.scss +71 -0
  84. package/src/scss/foundation/_color-palette.scss +402 -0
  85. package/src/scss/foundation/_index.scss +10 -0
  86. package/src/scss/foundation/_mixins.scss +198 -0
  87. package/src/scss/foundation/_motion.scss +70 -0
  88. package/src/scss/foundation/_normalize.scss +349 -0
  89. package/src/scss/foundation/_shape.scss +30 -0
  90. package/src/scss/foundation/_state-layers.scss +68 -0
  91. package/src/scss/foundation/_theme.scss +238 -0
  92. package/src/scss/foundation/_tokens.scss +511 -0
  93. package/src/scss/foundation/_variables.scss +57 -0
  94. package/src/scss/layout/_footer.scss +26 -0
  95. package/src/scss/layout/_grid.scss +172 -0
  96. package/src/scss/layout/_index.scss +3 -0
  97. package/src/scss/layout/_table.scss +119 -0
  98. package/src/scss/utilities/_a11y.scss +77 -0
  99. package/src/scss/utilities/_colors.scss +74 -0
  100. package/src/scss/utilities/_elevation.scss +63 -0
  101. package/src/scss/utilities/_helpers.scss +50 -0
  102. package/src/scss/utilities/_index.scss +7 -0
  103. package/src/scss/utilities/_responsive.scss +62 -0
  104. package/src/scss/utilities/_spacing.scss +38 -0
  105. 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,6 @@
1
+ /* This is needed for some mobile phones to display the Google Icon font properly */
2
+ .material-icons, .material-symbols-outlined,
3
+ .material-symbols-rounded, .material-symbols-sharp {
4
+ text-rendering: optimizeLegibility;
5
+ font-feature-settings: 'liga';
6
+ }
@@ -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
+ }