@shortfuse/materialdesignweb 0.7.1-0 → 0.7.1-2

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 (138) hide show
  1. package/bin/generate-css.js +1 -2
  2. package/components/Badge.js +40 -3
  3. package/components/Body.js +16 -2
  4. package/components/BottomAppBar.js +25 -2
  5. package/components/Box.js +33 -3
  6. package/components/Button.js +146 -9
  7. package/components/Card.js +111 -3
  8. package/components/Checkbox.js +91 -3
  9. package/components/CheckboxIcon.js +92 -4
  10. package/components/Chip.js +38 -2
  11. package/components/Dialog.js +237 -3
  12. package/components/DialogActions.js +3 -2
  13. package/components/Divider.js +44 -3
  14. package/components/ExtendedFab.js +27 -2
  15. package/components/Fab.js +26 -2
  16. package/components/FilterChip.js +83 -2
  17. package/components/Headline.js +16 -2
  18. package/components/Icon.js +80 -4
  19. package/components/IconButton.js +153 -2
  20. package/components/Label.js +16 -2
  21. package/components/Layout.js +21 -3
  22. package/components/List.js +15 -2
  23. package/components/ListItem.js +229 -3
  24. package/components/ListOption.js +37 -3
  25. package/components/ListSelect.js +12 -2
  26. package/components/Menu.js +173 -3
  27. package/components/MenuItem.js +55 -2
  28. package/components/Nav.js +19 -2
  29. package/components/NavBar.js +37 -2
  30. package/components/NavBarItem.js +44 -2
  31. package/components/NavDrawer.js +34 -2
  32. package/components/NavDrawerItem.js +44 -2
  33. package/components/NavItem.js +183 -3
  34. package/components/NavRail.js +50 -2
  35. package/components/NavRailItem.js +25 -2
  36. package/components/Pane.js +263 -3
  37. package/components/Progress.js +469 -10
  38. package/components/Radio.js +97 -3
  39. package/components/RadioIcon.js +77 -5
  40. package/components/Ripple.js +76 -3
  41. package/components/SegmentedButton.js +97 -2
  42. package/components/SegmentedButtonGroup.js +15 -2
  43. package/components/Select.js +54 -2
  44. package/components/Shape.js +55 -18
  45. package/components/Slider.js +309 -3
  46. package/components/Snackbar.js +82 -2
  47. package/components/Surface.js +13 -4
  48. package/components/Switch.js +67 -4
  49. package/components/SwitchIcon.js +272 -5
  50. package/components/Tab.js +87 -3
  51. package/components/TabContent.js +21 -21
  52. package/components/TabList.js +131 -2
  53. package/components/TextArea.js +97 -3
  54. package/components/Title.js +16 -2
  55. package/components/Tooltip.js +42 -2
  56. package/components/TopAppBar.js +212 -3
  57. package/core/template.js +36 -9
  58. package/mixins/ControlMixin.js +65 -2
  59. package/mixins/DensityMixin.js +17 -3
  60. package/mixins/FlexableMixin.js +81 -3
  61. package/mixins/RippleMixin.js +15 -4
  62. package/mixins/ShapeMixin.js +279 -8
  63. package/mixins/StateMixin.js +87 -5
  64. package/mixins/SurfaceMixin.js +152 -3
  65. package/mixins/TextFieldMixin.js +661 -3
  66. package/mixins/ThemableMixin.js +206 -3
  67. package/mixins/TooltipTriggerMixin.js +30 -4
  68. package/mixins/TouchTargetMixin.js +29 -4
  69. package/package.json +2 -1
  70. package/theming/loader.js +0 -2
  71. package/components/Badge.css +0 -38
  72. package/components/Body.css +0 -14
  73. package/components/BottomAppBar.css +0 -23
  74. package/components/Box.css +0 -31
  75. package/components/Button.css +0 -147
  76. package/components/Card.css +0 -109
  77. package/components/Checkbox.css +0 -89
  78. package/components/CheckboxIcon.css +0 -90
  79. package/components/Chip.css +0 -35
  80. package/components/Dialog.css +0 -235
  81. package/components/Divider.css +0 -41
  82. package/components/ExtendedFab.css +0 -24
  83. package/components/Fab.css +0 -23
  84. package/components/FilterChip.css +0 -80
  85. package/components/Headline.css +0 -14
  86. package/components/Icon.css +0 -76
  87. package/components/IconButton.css +0 -150
  88. package/components/Label.css +0 -14
  89. package/components/Layout.css +0 -19
  90. package/components/List.css +0 -12
  91. package/components/ListItem.css +0 -224
  92. package/components/ListOption.css +0 -34
  93. package/components/ListSelect.css +0 -9
  94. package/components/Menu.css +0 -171
  95. package/components/MenuItem.css +0 -53
  96. package/components/Nav.css +0 -17
  97. package/components/NavBar.css +0 -34
  98. package/components/NavBarItem.css +0 -41
  99. package/components/NavDrawer.css +0 -31
  100. package/components/NavDrawerItem.css +0 -42
  101. package/components/NavItem.css +0 -181
  102. package/components/NavRail.css +0 -47
  103. package/components/NavRailItem.css +0 -25
  104. package/components/Outline.css +0 -138
  105. package/components/Pane.css +0 -261
  106. package/components/Progress.css +0 -75
  107. package/components/ProgressCircle.css +0 -226
  108. package/components/ProgressLine.css +0 -155
  109. package/components/Radio.css +0 -95
  110. package/components/RadioIcon.css +0 -73
  111. package/components/Ripple.css +0 -74
  112. package/components/SegmentedButton.css +0 -94
  113. package/components/SegmentedButtonGroup.css +0 -12
  114. package/components/Select.css +0 -52
  115. package/components/Shape.css +0 -132
  116. package/components/Slider.css +0 -307
  117. package/components/Snackbar.css +0 -80
  118. package/components/Surface.css +0 -10
  119. package/components/Switch.css +0 -64
  120. package/components/SwitchIcon.css +0 -178
  121. package/components/SwitchIconAnimations.css +0 -89
  122. package/components/Tab.css +0 -85
  123. package/components/TabList.css +0 -129
  124. package/components/TextArea.css +0 -93
  125. package/components/Title.css +0 -14
  126. package/components/Tooltip.css +0 -40
  127. package/components/TopAppBar.css +0 -209
  128. package/mixins/ControlMixin.css +0 -57
  129. package/mixins/DensityMixin.css +0 -40
  130. package/mixins/FlexableMixin.css +0 -79
  131. package/mixins/RippleMixin.css +0 -12
  132. package/mixins/ShapeMixin.css +0 -135
  133. package/mixins/StateMixin.css +0 -82
  134. package/mixins/SurfaceMixin.css +0 -150
  135. package/mixins/TextFieldMixin.css +0 -657
  136. package/mixins/ThemableMixin.css +0 -204
  137. package/mixins/TooltipTriggerMixin.css +0 -27
  138. package/mixins/TouchTargetMixin.css +0 -26
@@ -1,95 +0,0 @@
1
- /* https://m3.material.io/components/radio/specs */
2
-
3
- :host {
4
- --mdw-ink: var(--mdw-color__primary);
5
- --mdw-shape__size: var(--mdw-shape__full);
6
- display: inline-grid;
7
- align-items: baseline;
8
- gap: 12px;
9
- grid-auto-flow: column;
10
- grid-template-rows: minmax(20px, auto);
11
- grid-template-columns: 20px;
12
- justify-content: flex-start;
13
-
14
- cursor: pointer;
15
-
16
- transition: none 100ms cubic-bezier(0.4, 0.0, 1, 1);
17
- }
18
-
19
- :host(:empty) {
20
- vertical-align: -11.5%;
21
-
22
- line-height: 20px;
23
- }
24
-
25
- :host(:empty) #radio {
26
- transform: none;
27
- }
28
-
29
- #control {
30
- grid-column: 1/1;
31
-
32
- cursor: inherit;
33
- }
34
-
35
- #label {
36
- cursor: inherit;
37
- }
38
-
39
- #label[disabled] {
40
- cursor: not-allowed;
41
- }
42
-
43
- #state {
44
- pointer-events: auto;
45
- }
46
-
47
- #state,
48
- #ripple-container {
49
- inset-block-start: 50%;
50
- inset-inline-start: 50%;
51
-
52
- block-size: 40px;
53
- inline-size: 40px;
54
-
55
- transform: translateX(-50%) translateY(-50%);
56
-
57
- border-radius: 50%;
58
- }
59
-
60
- :host([disabled]) {
61
- cursor: not-allowed;
62
-
63
- opacity: 0.38;
64
- }
65
-
66
- #radio {
67
- position: relative;
68
-
69
- display: inline-flex;
70
-
71
- grid-column: 1 / 1;
72
-
73
- pointer-events: none;
74
-
75
- transform: translateY(11.5%);
76
-
77
- color: rgb(var(--mdw-color__on-surface));
78
- }
79
-
80
- #radio[selected] {
81
- color: rgb(var(--mdw-ink));
82
- }
83
-
84
- #radio[disabled] {
85
- color: rgb(var(--mdw-color__on-surface));
86
- }
87
-
88
- #radio[errored] {
89
- color: rgb(var(--mdw-color__error));
90
- }
91
-
92
- #icon {
93
- --mdw-ink: inherit;
94
- --disabled-opacity: 1;
95
- }
@@ -1,73 +0,0 @@
1
- /* https://m3.material.io/components/radio-button/specs */
2
-
3
- :host {
4
- --disabled-opacity: 0.38;
5
- --mdw-ink: rgb(var(--mdw-color__primary));
6
- /* Use CSS Variables to force filter to reapply (Chrome Bug) */
7
- --color: rgb(var(--mdw-color__on-surface-variant));
8
- position: relative;
9
-
10
- display: inline-block;
11
-
12
- block-size: 20px;
13
- inline-size: 20px;
14
-
15
- background-color: transparent;
16
-
17
- transition: opacity 200ms;
18
- }
19
-
20
- .shape {
21
- --mdw-shape__size: var(--mdw-shape__full);
22
- position: absolute;
23
- inset: 0;
24
- }
25
-
26
- #outline {
27
- filter:
28
- drop-shadow(1px 0px 0px var(--color))
29
- drop-shadow(0px 1px 0px var(--color))
30
- drop-shadow(-1px 0px 0px var(--color))
31
- drop-shadow(0px -1px 0px var(--color))
32
- ;
33
-
34
- color: var(--color);
35
-
36
- will-change: filter, color;
37
- }
38
-
39
- #inner-shape {
40
- position: absolute;
41
- inset: 0;
42
-
43
- transform: scale(0);
44
-
45
- background-color: var(--color);
46
-
47
- transition: transform 200ms, background-color 100ms;
48
- }
49
-
50
- :host([hovered]) {
51
- --color: rgb(var(--mdw-color__on-surface));
52
- }
53
-
54
- :host([focused]) {
55
- --color: rgb(var(--mdw-color__on-surface));
56
- }
57
-
58
- :host([selected]) {
59
- --color: rgb(var(--mdw-ink));
60
- }
61
-
62
- :host([errored]) {
63
- --color: rgb(var(--mdw-color__error));
64
- }
65
-
66
- :host([disabled]) {
67
- --color: rgba(var(--mdw-color__on-surface));
68
- opacity: var(--disabled-opacity);
69
- }
70
-
71
- #inner-shape[selected] {
72
- transform: scale(0.5);
73
- }
@@ -1,74 +0,0 @@
1
- :host {
2
- --enter-delay: 80ms;
3
- --touch-down-acceleration: 1024;
4
- --touch-up-acceleration: 3400;
5
- --mdw-ripple-expand-duration: 300ms;
6
- --mdw-ripple-simple-duration: 200ms;
7
- --mdw-ripple-fade-out-duration: 333ms;
8
- --mdw-ripple-standard-easing: var(--mdw-motion-standard-easing, cubic-bezier(0.4, 0.0, 0.2, 1));
9
- --mdw-ripple-deceleration-easing: var(--mdw-motion-deceleration-easing, cubic-bezier(0.0, 0.0, 0.2, 1));
10
-
11
- --size: 0;
12
- position: absolute;
13
- /* stylelint-disable-next-line liberty/use-logical-spec */
14
- top: 50%;
15
- /* stylelint-disable-next-line liberty/use-logical-spec */
16
- left: 50%;
17
-
18
- display: block;
19
-
20
- min-block-size: 141.42%; /* √2 * 100% */
21
- min-inline-size: 141.42%;
22
-
23
- pointer-events: none;
24
-
25
- -webkit-tap-highlight-color: transparent;
26
-
27
- opacity: 0.12;
28
- transform: translateX(-50%) translateY(-50%) scale(1);
29
-
30
- background-color: currentColor;
31
- border-radius: 50%;
32
-
33
- /* Adds feathered appearance to ripple */
34
- box-shadow: 0 0 calc(0.10 * var(--size)) calc(0.10 * var(--size)) currentColor;
35
-
36
- transition-delay: 0s;
37
- transition-duration: var(--mdw-ripple-simple-duration);
38
- transition-property: background-color, color;
39
- transition-timing-function: var(--mdw-ripple-standard-easing);
40
-
41
- animation-name: ripple-fade-in, none;
42
- animation-duration: var(--mdw-ripple-expand-duration), var(--mdw-ripple-fade-out-duration);
43
- animation-timing-function: linear, var(--mdw-ripple-deceleration-easing);
44
- animation-direction: normal;
45
- animation-fill-mode: forwards;
46
- /* stylelint-disable-next-line liberty/use-logical-spec */
47
- will-change: transform, opacity, top, left, box-shadow;
48
-
49
- aspect-ratio: 1/1;
50
- }
51
-
52
- :host([ripple-state="filled"]) {
53
- animation-name: none, ripple-fade-out;
54
- }
55
-
56
- :host([ripple-state="filled"][hold-ripple]) {
57
- animation-name: ripple-fade-in, none;
58
- }
59
-
60
- :host([ripple-state="complete"]) {
61
- animation-name: none, ripple-fade-out;
62
- animation-duration: 0s;
63
- }
64
-
65
- @keyframes ripple-fade-in {
66
- from {
67
- transform: translateX(-50%) translateY(-50%) scale(0);
68
- }
69
- }
70
-
71
- @keyframes ripple-fade-out {
72
-
73
- to { opacity: 0; }
74
- }
@@ -1,94 +0,0 @@
1
- /* https://m3.material.io/components/segmented-buttons/specs */
2
-
3
- :host {
4
- --mdw-shape__size: var(--mdw-shape__full);
5
- --mdw-ink: var(--mdw-color__on-surface);
6
- gap: 8px;
7
-
8
- min-inline-size: 24px;
9
- padding-inline-start: max(12px, calc(16px + (var(--mdw-density) * 2px)));
10
- padding-inline-end: max(20px, calc(24px + (var(--mdw-density) * 2px)));
11
-
12
- color: rgb(var(--mdw-ink));
13
- }
14
-
15
- :host([inner-segmented-button]) {
16
- --mdw-shape__size: 0px;
17
- --mdw-shape__rounded: 1;
18
- --mdw-shape__mask-border-source: none;
19
- }
20
-
21
- #outline {
22
- inset-inline-end: -1px;
23
- }
24
-
25
- #outline[shape-end] {
26
- inset-inline-end: 0;
27
- }
28
-
29
- #shape[selected] {
30
- background-color: rgb(var(--mdw-bg));
31
- }
32
-
33
- #label[selected] {
34
- color: rgb(var(--mdw-ink));
35
- }
36
-
37
- #icons {
38
- position: relative;
39
-
40
- display: inline-flex;
41
- }
42
-
43
- #icon {
44
- box-sizing: border-box;
45
- inline-size: 0;
46
-
47
- opacity: 1;
48
- }
49
-
50
- #icon[has-icon] {
51
- inline-size: 18px;
52
-
53
- opacity: 1;
54
- }
55
-
56
- #icon[selected] {
57
- inline-size: 18px;
58
-
59
- opacity: 0;
60
- }
61
-
62
- #check-icon {
63
- position: absolute;
64
- inset: 0;
65
-
66
- display: block;
67
-
68
- overflow: visible;
69
-
70
- margin: 0;
71
-
72
- opacity: 0;
73
-
74
- font-size: 18px;
75
- font-variation-settings: 'FILL' 1;
76
- }
77
-
78
- #check-icon[selected] {
79
- opacity: 1;
80
-
81
- font-size: 18px;
82
- }
83
-
84
- #icon[disabled] {
85
- color: rgba(var(--mdw-color__on-surface), 0.38);
86
- }
87
-
88
- #shape[disabled][selected] {
89
- background-color: rgba(var(--mdw-color__on-surface), 0.12);
90
- }
91
-
92
- #label[disabled][selected] {
93
- color: rgba(var(--mdw-color__on-surface), 0.38);
94
- }
@@ -1,12 +0,0 @@
1
- /* https://m3.material.io/components/segmented-buttons/specs */
2
-
3
- :host {
4
- --mdw-bg: var(--mdw-color__secondary-container);
5
- --mdw-ink: var(--mdw-color__on-secondary-container);
6
-
7
- display: inline-flex;
8
- }
9
-
10
- :host([color]) {
11
- background-color: transparent;
12
- }
@@ -1,52 +0,0 @@
1
- #slot {
2
- display: none;
3
- }
4
-
5
- #label {
6
- padding: 0;
7
-
8
- cursor: pointer;
9
- }
10
-
11
- #label[disabled] {
12
- cursor: not-allowed;
13
- }
14
-
15
- #icon {
16
- position: absolute;
17
-
18
- /* padding-inline-start: 12px; */
19
- }
20
-
21
- #trailing-icon {
22
- position: absolute;
23
- inset-inline-end: 16px;
24
- }
25
-
26
- #control {
27
- padding-inline-start: 16px;
28
- padding-inline-end: calc(16px + 24px + 16px);
29
- accent-color: rgb(var(--mdw-ink));
30
-
31
- cursor: inherit;
32
- }
33
-
34
- #control[icon] {
35
- margin-inline-start: calc(16px + 24px);
36
- padding-inline-start: 0;
37
- }
38
-
39
- option {
40
- accent-color: rgb(var(--mdw-ink));
41
-
42
- min-block-size: var(--mdw-typescale__label-large__line-height);
43
-
44
- appearance: none;
45
-
46
- background-color: rgb(var(--mdw-color__surface)) !important;
47
- border-radius: 0;
48
- color: rgb(var(--mdw-color__on-surface)) !important;
49
-
50
- font: var(--mdw-typescale__label-large__font);
51
- letter-spacing: var(--mdw-typescale__label-large__letter-spacing);
52
- }
@@ -1,132 +0,0 @@
1
- /** TODO: CSS Mixin */
2
-
3
- :host {
4
- --mdw-shape__size: 0px;
5
- --mdw-shape__bg: transparent;
6
-
7
- --mdw-surface__will-change: none;
8
- --mdw-shape__size__top-start-size: var(--mdw-shape__size);
9
- --mdw-shape__size__top-end-size: var(--mdw-shape__size);
10
- --mdw-shape__size__bottom-start-size: var(--mdw-shape__size);
11
- --mdw-shape__size__bottom-end-size: var(--mdw-shape__size);
12
-
13
- /* (1/2n + 1/2)L + (-1/2n + 1/2)R */
14
- --mdw-shape__ltr: calc(0.5 * var(--mdw-dir, 1) + 0.5); /* 1 if LTR, 0 if RTL */
15
- --mdw-shape__rtl: calc(-0.5 * var(--mdw-dir, 1) + 0.5); /* 0 if LTR, 1 if RTL */
16
- --mdw-shape__size__top-left-size: calc((var(--mdw-shape__ltr) * var(--mdw-shape__size__top-start-size)) + (var(--mdw-shape__rtl) * var(--mdw-shape__size__top-end-size)));
17
- --mdw-shape__size__top-right-size: calc((var(--mdw-shape__rtl) * var(--mdw-shape__size__top-start-size)) + (var(--mdw-shape__ltr) * var(--mdw-shape__size__top-end-size)));
18
- --mdw-shape__size__bottom-left-size: calc((var(--mdw-shape__ltr) * var(--mdw-shape__size__bottom-start-size)) + (var(--mdw-shape__rtl) * var(--mdw-shape__size__bottom-end-size)));
19
- --mdw-shape__size__bottom-right-size: calc((var(--mdw-shape__rtl) * var(--mdw-shape__size__bottom-start-size)) + (var(--mdw-shape__ltr) * var(--mdw-shape__size__bottom-end-size)));
20
-
21
- --mdw-shape__rounded: 1;
22
- --mdw-shape__mask-border-source: none;
23
- --mdw-shape__mask: none;
24
- --mdw-shape__inline-start-deg: calc(var(--mdw-dir, 1) * -90deg);
25
- position: relative;
26
-
27
- overflow: hidden;
28
-
29
- background-color: var(--mdw-shape__bg, transparent);
30
-
31
- border-start-start-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__top-start-size));
32
- border-start-end-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__top-end-size));
33
- border-end-start-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__bottom-start-size));
34
- border-end-end-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__bottom-end-size));
35
-
36
- transition-delay: 1ms;
37
- transition-duration: 200ms;
38
- transition-property: background-color, color;
39
- will-change: background-color, color;
40
-
41
- }
42
-
43
- :host([color]) {
44
- background-color: rgb(var(--mdw-bg));
45
- }
46
-
47
- :host(:where([ink],[color])) {
48
- color: rgb(var(--mdw-ink));
49
- }
50
-
51
- :host([outlined]) {
52
- background-color: transparent;
53
- }
54
-
55
- :host(:is([color="none"], [color="transparent"])) {
56
- background-color: transparent;
57
- }
58
-
59
- :host([shape-style="none"]) {
60
- --mdw-shape__size: 0px;
61
- }
62
-
63
- :host([shape-style="extra-small"]) {
64
- --mdw-shape__size: var(--mdw-shape__extra-small);
65
- }
66
-
67
- :host([shape-style="small"]) {
68
- --mdw-shape__size: var(--mdw-shape__small);
69
- }
70
-
71
- :host([shape-style="medium"]) {
72
- --mdw-shape__size: var(--mdw-shape__medium);
73
- }
74
-
75
- :host([shape-style="large"]) {
76
- --mdw-shape__size: var(--mdw-shape__large);
77
- }
78
-
79
- :host([shape-style="extra-large"]) {
80
- --mdw-shape__size: var(--mdw-shape__extra-large);
81
- }
82
-
83
- :host([shape-style="full"]) {
84
- --mdw-shape__size: var(--mdw-shape__full);
85
- }
86
-
87
- :host([shape-style="inherit"]) {
88
- --mdw-shape__size: inherit;
89
- }
90
-
91
- :host([shape-top]) {
92
- --mdw-shape__size__bottom-start-size: 0px;
93
- --mdw-shape__size__bottom-end-size: 0px;
94
- --mdw-shape__mask: linear-gradient(transparent 50%, black 50%);
95
-
96
- }
97
-
98
- :host([shape-bottom]) {
99
- --mdw-shape__size__top-start-size: 0px;
100
- --mdw-shape__size__top-end-size: 0px;
101
- --mdw-shape__mask: linear-gradient(black 50%, transparent 50%);
102
- }
103
-
104
- :host([shape-start]) {
105
- --mdw-shape__size__top-end-size: 0px;
106
- --mdw-shape__size__bottom-end-size: 0px;
107
- --mdw-shape__mask: linear-gradient(var(--mdw-shape__inline-start-deg), black 50%, transparent 50%);
108
- }
109
-
110
- :host([shape-end]) {
111
- --mdw-shape__size__top-start-size: 0px;
112
- --mdw-shape__size__bottom-start-size: 0px;
113
- --mdw-shape__mask: linear-gradient(var(--mdw-shape__inline-start-deg), transparent 50%, black 50%);
114
- }
115
-
116
- @supports(-webkit-mask-box-image: none) {
117
- :host {
118
- --mdw-shape__rounded: inherit;
119
- --mdw-shape__mask-border-source: inherit;
120
-
121
- -webkit-mask-box-image: var(--mdw-shape__mask-border-source)
122
- 8 fill /
123
- var(--mdw-shape__size)
124
- stretch;
125
-
126
- -webkit-mask: var(--mdw-shape__mask);
127
-
128
- transition-duration: 200ms, 200ms, 200ms;
129
- transition-property: background-color, color, -webkit-mask-box-image-width;
130
- will-change: background-color, color, -webkit-mask-box-image;
131
- }
132
- }