mithril-materialized 2.0.0-beta.11 → 2.0.0-beta.14
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/README.md +58 -2
- package/dist/components.css +595 -0
- package/dist/forms.css +325 -0
- package/dist/icon.d.ts +2 -2
- package/dist/index.css +607 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +1271 -157
- package/dist/index.js +1274 -156
- package/dist/index.min.css +1 -1
- package/dist/index.umd.js +1274 -156
- package/dist/input-options.d.ts +18 -4
- package/dist/material-icon.d.ts +3 -0
- package/dist/range-slider.d.ts +4 -0
- package/dist/treeview.d.ts +39 -0
- package/package.json +1 -1
- package/sass/components/_treeview.scss +353 -0
- package/sass/components/forms/_forms.scss +1 -1
- package/sass/components/forms/_range-enhanced.scss +393 -0
- package/sass/materialize.scss +2 -0
package/dist/forms.css
CHANGED
|
@@ -1929,6 +1929,331 @@ input[type=range]::-ms-thumb {
|
|
|
1929
1929
|
box-shadow: 0 0 0 10px rgba(38, 166, 154, 0.26);
|
|
1930
1930
|
}
|
|
1931
1931
|
|
|
1932
|
+
/* Enhanced Range Sliders
|
|
1933
|
+
========================================================================== */
|
|
1934
|
+
.range-slider.vertical {
|
|
1935
|
+
-webkit-appearance: none;
|
|
1936
|
+
appearance: none;
|
|
1937
|
+
writing-mode: vertical-lr;
|
|
1938
|
+
direction: rtl;
|
|
1939
|
+
width: 6px;
|
|
1940
|
+
transform: none;
|
|
1941
|
+
}
|
|
1942
|
+
.range-slider.vertical::-webkit-slider-runnable-track {
|
|
1943
|
+
width: 6px;
|
|
1944
|
+
height: 100%;
|
|
1945
|
+
}
|
|
1946
|
+
.range-slider.vertical::-webkit-slider-thumb {
|
|
1947
|
+
-webkit-appearance: none;
|
|
1948
|
+
width: 14px;
|
|
1949
|
+
height: 14px;
|
|
1950
|
+
margin-left: -4px;
|
|
1951
|
+
margin-top: 0;
|
|
1952
|
+
}
|
|
1953
|
+
.range-slider.vertical::-moz-range-track {
|
|
1954
|
+
width: 6px;
|
|
1955
|
+
height: 100%;
|
|
1956
|
+
}
|
|
1957
|
+
.range-slider.vertical::-moz-range-thumb {
|
|
1958
|
+
width: 14px;
|
|
1959
|
+
height: 14px;
|
|
1960
|
+
margin-left: -12px;
|
|
1961
|
+
margin-top: 0;
|
|
1962
|
+
}
|
|
1963
|
+
.range-slider.disabled {
|
|
1964
|
+
opacity: 0.6;
|
|
1965
|
+
cursor: not-allowed;
|
|
1966
|
+
}
|
|
1967
|
+
.range-slider.disabled::-webkit-slider-thumb {
|
|
1968
|
+
cursor: not-allowed;
|
|
1969
|
+
}
|
|
1970
|
+
.range-slider.disabled::-moz-range-thumb {
|
|
1971
|
+
cursor: not-allowed;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
.single-range-slider {
|
|
1975
|
+
outline: none;
|
|
1976
|
+
}
|
|
1977
|
+
.single-range-slider.horizontal {
|
|
1978
|
+
height: 40px;
|
|
1979
|
+
position: relative;
|
|
1980
|
+
display: flex;
|
|
1981
|
+
align-items: center;
|
|
1982
|
+
}
|
|
1983
|
+
.single-range-slider.vertical {
|
|
1984
|
+
width: 40px;
|
|
1985
|
+
position: relative;
|
|
1986
|
+
display: flex;
|
|
1987
|
+
flex-direction: column;
|
|
1988
|
+
align-items: center;
|
|
1989
|
+
height: 100%;
|
|
1990
|
+
}
|
|
1991
|
+
.single-range-slider .track {
|
|
1992
|
+
background-color: var(--mm-border-color, #c2c0c2);
|
|
1993
|
+
border-radius: 2px;
|
|
1994
|
+
}
|
|
1995
|
+
.single-range-slider .track.horizontal {
|
|
1996
|
+
position: absolute;
|
|
1997
|
+
top: 25%;
|
|
1998
|
+
left: 0;
|
|
1999
|
+
transform: translateY(-50%);
|
|
2000
|
+
width: 100%;
|
|
2001
|
+
height: 4px;
|
|
2002
|
+
}
|
|
2003
|
+
.single-range-slider .track.vertical {
|
|
2004
|
+
position: absolute;
|
|
2005
|
+
bottom: 10px;
|
|
2006
|
+
width: 4px;
|
|
2007
|
+
height: 100%;
|
|
2008
|
+
}
|
|
2009
|
+
.single-range-slider .range-progress {
|
|
2010
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
2011
|
+
border-radius: 2px;
|
|
2012
|
+
}
|
|
2013
|
+
.single-range-slider .range-progress.horizontal {
|
|
2014
|
+
position: absolute;
|
|
2015
|
+
top: 25%;
|
|
2016
|
+
transform: translateY(-50%);
|
|
2017
|
+
height: 4px;
|
|
2018
|
+
}
|
|
2019
|
+
.single-range-slider .range-progress.vertical {
|
|
2020
|
+
position: absolute;
|
|
2021
|
+
bottom: 10px;
|
|
2022
|
+
width: 4px;
|
|
2023
|
+
}
|
|
2024
|
+
.single-range-slider .thumb {
|
|
2025
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
2026
|
+
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
|
2027
|
+
width: 20px;
|
|
2028
|
+
height: 20px;
|
|
2029
|
+
border-radius: 50%;
|
|
2030
|
+
cursor: pointer;
|
|
2031
|
+
outline: none;
|
|
2032
|
+
}
|
|
2033
|
+
.single-range-slider .thumb.horizontal {
|
|
2034
|
+
position: absolute;
|
|
2035
|
+
transform: translateY(-50%);
|
|
2036
|
+
}
|
|
2037
|
+
.single-range-slider .thumb.vertical {
|
|
2038
|
+
position: absolute;
|
|
2039
|
+
}
|
|
2040
|
+
.single-range-slider .thumb:hover {
|
|
2041
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
|
2042
|
+
}
|
|
2043
|
+
.single-range-slider .thumb .value-tooltip {
|
|
2044
|
+
position: absolute;
|
|
2045
|
+
background: var(--mm-primary-color, #26a69a);
|
|
2046
|
+
color: white;
|
|
2047
|
+
padding: 4px 8px;
|
|
2048
|
+
border-radius: 4px;
|
|
2049
|
+
font-size: 12px;
|
|
2050
|
+
white-space: nowrap;
|
|
2051
|
+
min-width: 24px;
|
|
2052
|
+
text-align: center;
|
|
2053
|
+
pointer-events: none;
|
|
2054
|
+
z-index: 20;
|
|
2055
|
+
}
|
|
2056
|
+
.single-range-slider .thumb .value-tooltip.top {
|
|
2057
|
+
bottom: 100%;
|
|
2058
|
+
left: 50%;
|
|
2059
|
+
transform: translateX(-50%);
|
|
2060
|
+
margin-bottom: 8px;
|
|
2061
|
+
}
|
|
2062
|
+
.single-range-slider .thumb .value-tooltip.top::after {
|
|
2063
|
+
content: "";
|
|
2064
|
+
position: absolute;
|
|
2065
|
+
top: 100%;
|
|
2066
|
+
left: 50%;
|
|
2067
|
+
transform: translateX(-50%);
|
|
2068
|
+
border: 4px solid transparent;
|
|
2069
|
+
border-top-color: var(--mm-primary-color, #26a69a);
|
|
2070
|
+
}
|
|
2071
|
+
.single-range-slider .thumb .value-tooltip.bottom {
|
|
2072
|
+
top: 100%;
|
|
2073
|
+
left: 50%;
|
|
2074
|
+
transform: translateX(-50%);
|
|
2075
|
+
margin-top: 8px;
|
|
2076
|
+
}
|
|
2077
|
+
.single-range-slider .thumb .value-tooltip.bottom::after {
|
|
2078
|
+
content: "";
|
|
2079
|
+
position: absolute;
|
|
2080
|
+
bottom: 100%;
|
|
2081
|
+
left: 50%;
|
|
2082
|
+
transform: translateX(-50%);
|
|
2083
|
+
border: 4px solid transparent;
|
|
2084
|
+
border-bottom-color: var(--mm-primary-color, #26a69a);
|
|
2085
|
+
}
|
|
2086
|
+
.single-range-slider .thumb .value-tooltip.left {
|
|
2087
|
+
right: 100%;
|
|
2088
|
+
top: 50%;
|
|
2089
|
+
transform: translateY(-50%);
|
|
2090
|
+
margin-right: 8px;
|
|
2091
|
+
}
|
|
2092
|
+
.single-range-slider .thumb .value-tooltip.left::after {
|
|
2093
|
+
content: "";
|
|
2094
|
+
position: absolute;
|
|
2095
|
+
top: 50%;
|
|
2096
|
+
left: 100%;
|
|
2097
|
+
transform: translateY(-50%);
|
|
2098
|
+
border: 4px solid transparent;
|
|
2099
|
+
border-left-color: var(--mm-primary-color, #26a69a);
|
|
2100
|
+
}
|
|
2101
|
+
.single-range-slider .thumb .value-tooltip.right {
|
|
2102
|
+
left: 100%;
|
|
2103
|
+
top: 50%;
|
|
2104
|
+
transform: translateY(-50%);
|
|
2105
|
+
margin-left: 8px;
|
|
2106
|
+
}
|
|
2107
|
+
.single-range-slider .thumb .value-tooltip.right::after {
|
|
2108
|
+
content: "";
|
|
2109
|
+
position: absolute;
|
|
2110
|
+
top: 50%;
|
|
2111
|
+
right: 100%;
|
|
2112
|
+
transform: translateY(-50%);
|
|
2113
|
+
border: 4px solid transparent;
|
|
2114
|
+
border-right-color: var(--mm-primary-color, #26a69a);
|
|
2115
|
+
}
|
|
2116
|
+
.single-range-slider:focus .thumb, .single-range-slider:focus-visible .thumb {
|
|
2117
|
+
box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
2118
|
+
}
|
|
2119
|
+
.single-range-slider:focus .thumb:hover, .single-range-slider:focus-visible .thumb:hover {
|
|
2120
|
+
box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0, 0, 0, 0.3);
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
.double-range-slider {
|
|
2124
|
+
outline: none;
|
|
2125
|
+
border-radius: 4px;
|
|
2126
|
+
}
|
|
2127
|
+
.double-range-slider.horizontal {
|
|
2128
|
+
height: 40px;
|
|
2129
|
+
position: relative;
|
|
2130
|
+
display: flex;
|
|
2131
|
+
align-items: center;
|
|
2132
|
+
}
|
|
2133
|
+
.double-range-slider.vertical {
|
|
2134
|
+
width: 40px;
|
|
2135
|
+
position: relative;
|
|
2136
|
+
display: flex;
|
|
2137
|
+
flex-direction: column;
|
|
2138
|
+
align-items: center;
|
|
2139
|
+
}
|
|
2140
|
+
.double-range-slider .track {
|
|
2141
|
+
background-color: var(--mm-border-color, #c2c0c2);
|
|
2142
|
+
border-radius: 2px;
|
|
2143
|
+
}
|
|
2144
|
+
.double-range-slider .track.horizontal {
|
|
2145
|
+
position: absolute;
|
|
2146
|
+
top: 50%;
|
|
2147
|
+
left: 0;
|
|
2148
|
+
transform: translateY(-50%);
|
|
2149
|
+
width: 100%;
|
|
2150
|
+
height: 4px;
|
|
2151
|
+
}
|
|
2152
|
+
.double-range-slider .track.vertical {
|
|
2153
|
+
position: absolute;
|
|
2154
|
+
left: 50%;
|
|
2155
|
+
top: 0;
|
|
2156
|
+
transform: translateX(-50%);
|
|
2157
|
+
width: 4px;
|
|
2158
|
+
height: 100%;
|
|
2159
|
+
}
|
|
2160
|
+
.double-range-slider .range {
|
|
2161
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
2162
|
+
border-radius: 2px;
|
|
2163
|
+
}
|
|
2164
|
+
.double-range-slider .range.horizontal {
|
|
2165
|
+
position: absolute;
|
|
2166
|
+
top: 50%;
|
|
2167
|
+
transform: translateY(-50%);
|
|
2168
|
+
height: 4px;
|
|
2169
|
+
}
|
|
2170
|
+
.double-range-slider .range.vertical {
|
|
2171
|
+
position: absolute;
|
|
2172
|
+
left: 50%;
|
|
2173
|
+
transform: translateX(-50%);
|
|
2174
|
+
width: 4px;
|
|
2175
|
+
}
|
|
2176
|
+
.double-range-slider .thumb {
|
|
2177
|
+
background-color: var(--mm-primary-color, #26a69a);
|
|
2178
|
+
transition: transform 0.1s ease, box-shadow 0.1s ease;
|
|
2179
|
+
width: 20px;
|
|
2180
|
+
height: 20px;
|
|
2181
|
+
border-radius: 50%;
|
|
2182
|
+
cursor: pointer;
|
|
2183
|
+
outline: none;
|
|
2184
|
+
}
|
|
2185
|
+
.double-range-slider .thumb.horizontal {
|
|
2186
|
+
position: absolute;
|
|
2187
|
+
top: 50%;
|
|
2188
|
+
transform: translateY(-50%);
|
|
2189
|
+
}
|
|
2190
|
+
.double-range-slider .thumb.vertical {
|
|
2191
|
+
position: absolute;
|
|
2192
|
+
left: 50%;
|
|
2193
|
+
transform: translateX(-50%);
|
|
2194
|
+
}
|
|
2195
|
+
.double-range-slider .thumb:hover {
|
|
2196
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
|
2197
|
+
}
|
|
2198
|
+
.double-range-slider .thumb .value {
|
|
2199
|
+
position: absolute;
|
|
2200
|
+
background: var(--mm-primary-color, #26a69a);
|
|
2201
|
+
color: white;
|
|
2202
|
+
padding: 2px 6px;
|
|
2203
|
+
border-radius: 4px;
|
|
2204
|
+
font-size: 12px;
|
|
2205
|
+
white-space: nowrap;
|
|
2206
|
+
min-width: 24px;
|
|
2207
|
+
text-align: center;
|
|
2208
|
+
pointer-events: none;
|
|
2209
|
+
z-index: 20;
|
|
2210
|
+
}
|
|
2211
|
+
.double-range-slider .thumb .value.horizontal {
|
|
2212
|
+
top: -30px;
|
|
2213
|
+
left: 50%;
|
|
2214
|
+
transform: translateX(-50%);
|
|
2215
|
+
}
|
|
2216
|
+
.double-range-slider .thumb .value.horizontal::after {
|
|
2217
|
+
content: "";
|
|
2218
|
+
position: absolute;
|
|
2219
|
+
top: 100%;
|
|
2220
|
+
left: 50%;
|
|
2221
|
+
transform: translateX(-50%);
|
|
2222
|
+
border: 4px solid transparent;
|
|
2223
|
+
border-top-color: var(--mm-primary-color, #26a69a);
|
|
2224
|
+
}
|
|
2225
|
+
.double-range-slider .thumb .value.vertical {
|
|
2226
|
+
top: 50%;
|
|
2227
|
+
left: -35px;
|
|
2228
|
+
transform: translateY(-50%);
|
|
2229
|
+
}
|
|
2230
|
+
.double-range-slider .thumb .value.vertical::after {
|
|
2231
|
+
content: "";
|
|
2232
|
+
position: absolute;
|
|
2233
|
+
top: 50%;
|
|
2234
|
+
left: 100%;
|
|
2235
|
+
transform: translateY(-50%);
|
|
2236
|
+
border: 4px solid transparent;
|
|
2237
|
+
border-left-color: var(--mm-primary-color, #26a69a);
|
|
2238
|
+
}
|
|
2239
|
+
.double-range-slider:focus .thumb.min-thumb.active, .double-range-slider:focus .thumb.max-thumb.active, .double-range-slider:focus-visible .thumb.min-thumb.active, .double-range-slider:focus-visible .thumb.max-thumb.active {
|
|
2240
|
+
box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
2241
|
+
}
|
|
2242
|
+
.double-range-slider:focus .thumb.min-thumb.active:hover, .double-range-slider:focus .thumb.max-thumb.active:hover, .double-range-slider:focus-visible .thumb.min-thumb.active:hover, .double-range-slider:focus-visible .thumb.max-thumb.active:hover {
|
|
2243
|
+
box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0, 0, 0, 0.3);
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.range-field.vertical {
|
|
2247
|
+
display: flex;
|
|
2248
|
+
flex-direction: column;
|
|
2249
|
+
align-items: center;
|
|
2250
|
+
min-height: 100px;
|
|
2251
|
+
padding-top: 20px;
|
|
2252
|
+
}
|
|
2253
|
+
.range-field.vertical .double-range-slider {
|
|
2254
|
+
height: 100%;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
1932
2257
|
/* File Input
|
|
1933
2258
|
========================================================================== */
|
|
1934
2259
|
.file-field {
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IconAttrs extends Attributes {
|
|
3
3
|
iconName: string;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
@@ -8,4 +8,4 @@ export interface MaterialIcon extends Attributes {
|
|
|
8
8
|
* @example m(Icon, { className: 'small' }, 'create') renders a small 'create' icon
|
|
9
9
|
* @example m(Icon, { className: 'prefix' }, iconName) renders the icon as a prefix
|
|
10
10
|
*/
|
|
11
|
-
export declare const Icon: FactoryComponent<
|
|
11
|
+
export declare const Icon: FactoryComponent<IconAttrs>;
|