material 0.7.2 → 0.7.4
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 +9 -18
- package/index.js +25 -48
- package/package.json +2 -10
- package/src/checkbox.js +48 -52
- package/src/element/insert.js +4 -4
- package/src/list.js +1 -3
- package/src/module/build.js +1 -3
- package/src/module/dom.js +1 -0
- package/src/module/request.js +33 -0
- package/src/navigation.js +7 -1
- package/src/skin/material/button/action.sass +6 -6
- package/src/skin/material/button/button.sass +6 -6
- package/src/skin/material/button/file.sass +1 -1
- package/src/skin/material/button/floating.sass +5 -5
- package/src/skin/material/button/raised.sass +5 -5
- package/src/skin/material/button/stroked.sass +5 -5
- package/src/skin/material/component/navigation.sass +6 -2
- package/src/skin/material/control/checkbox.sass +21 -21
- package/src/skin/material/module/ripple.sass +1 -1
- package/src/snackbar.js +4 -2
- package/src/styles/M3/abstracts/variables.sass +44 -0
- package/src/styles/M3/components/button.sass +26 -0
- package/src/styles/M3/modules/ripple.sass +9 -0
- package/src/styles/M3/themes/classic.sass +2 -0
- package/src/tabs.js +2 -3
- package/dist/demo-bundle.js +0 -2281
- package/dist/demo-bundle.js.map +0 -7
- package/dist/demo.css +0 -93
- package/dist/demo.css.map +0 -7
- package/dist/demo.html +0 -24
- package/dist/demo.js +0 -159
- package/dist/icon/accessibility.svg +0 -5
- package/dist/icon/apps.svg +0 -5
- package/dist/icon/happy.svg +0 -6
- package/dist/icon/link.svg +0 -5
- package/dist/icon/more.svg +0 -5
- package/dist/icon/navi.svg +0 -5
- package/dist/icon/phone.svg +0 -6
- package/dist/icon/share.svg +0 -6
- package/dist/icon/side.svg +0 -5
- package/dist/icon/star.svg +0 -7
- package/dist/icon/star_border.svg +0 -6
- package/dist/material.css +0 -2429
- package/dist/material.css.map +0 -7
- package/dist/styles/demo.sass +0 -110
- package/dist/styles.css +0 -23
- package/esbuild.js +0 -22
- package/esbuild.watch.js +0 -25
- package/src/container.js +0 -66
- package/src/field/email.js +0 -24
- package/src/field/image.js +0 -59
package/LICENSE
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
This program is free software: you can redistribute it and/or modify
|
|
2
|
+
it under the terms of the GNU General Public License as published by
|
|
3
|
+
the Free Software Foundation, under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
This program is distributed in the hope that it will be useful,
|
|
6
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
7
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
8
|
+
GNU General Public License for more details.
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
You should have received a copy of the GNU General Public License
|
|
11
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
package/index.js
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
import AppBar from './src/appbar'
|
|
2
|
+
import Badge from './src/badge'
|
|
2
3
|
import Button from './src/button'
|
|
3
4
|
import Card from './src/card'
|
|
5
|
+
import Checkbox from './src/checkbox'
|
|
4
6
|
import Component from './src/component'
|
|
5
|
-
import DateHour from './src/
|
|
7
|
+
import DateHour from './src/datehour'
|
|
6
8
|
import Dialog from './src/dialog'
|
|
7
|
-
import
|
|
8
|
-
import Loading from './src/control/loading'
|
|
9
|
-
import Menu from './src/control/menu'
|
|
10
|
-
import Select from './src/select'
|
|
11
|
-
import Selecter from './src/control/selecter'
|
|
12
|
-
import Snackbar from './src/snackbar'
|
|
13
|
-
import Switch from './src/switch'
|
|
14
|
-
import Switcher from './src/control/switcher'
|
|
15
|
-
import Text from './src/text'
|
|
16
|
-
import Textfield from './src/textfield'
|
|
9
|
+
import Drawer from './src/drawer'
|
|
17
10
|
import Element from './src/element'
|
|
11
|
+
import File from './src/file'
|
|
12
|
+
import Form from './src/form'
|
|
13
|
+
import Image from './src/image'
|
|
18
14
|
import Layout from './src/layout'
|
|
19
15
|
import List from './src/list'
|
|
20
|
-
import
|
|
16
|
+
import Loading from './src/loading'
|
|
17
|
+
import Menu from './src/menu'
|
|
18
|
+
import Navigation from './src/navigation'
|
|
19
|
+
import Progress from './src/progress'
|
|
20
|
+
import Select from './src/select'
|
|
21
|
+
import Selecter from './src/selecter'
|
|
22
|
+
import Snackbar from './src/snackbar'
|
|
23
|
+
import Slider from './src/slider'
|
|
24
|
+
import Switch from './src/switch'
|
|
25
|
+
import Switcher from './src/switcher'
|
|
26
|
+
import Tabs from './src/tabs'
|
|
21
27
|
import TabView from './src/tabview'
|
|
22
28
|
import Text from './src/text'
|
|
29
|
+
import Textfield from './src/textfield'
|
|
23
30
|
import Toolbar from './src/toolbar'
|
|
24
31
|
import Tooltip from './src/tooltip'
|
|
25
32
|
import attach from './src/module/attach'
|
|
26
33
|
import attributes from './src/module/attributes'
|
|
27
34
|
import build from './src/module/build'
|
|
28
35
|
import dataset from './src/module/dataset'
|
|
29
|
-
import display from './src/
|
|
36
|
+
import display from './src/mixin/display'
|
|
30
37
|
import events from './src/module/attach'
|
|
31
38
|
import emitter from './src/module/emitter'
|
|
32
39
|
import jsonToHTML from './src/module/jsontohtml'
|
|
@@ -35,39 +42,9 @@ import observer from './src/module/observer'
|
|
|
35
42
|
import smoothscroll from './src/module/smoothscroll'
|
|
36
43
|
|
|
37
44
|
export {
|
|
38
|
-
AppBar
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Card,
|
|
44
|
-
Component,
|
|
45
|
-
Element,
|
|
46
|
-
File,
|
|
47
|
-
Loading,
|
|
48
|
-
Menu,
|
|
49
|
-
Select,
|
|
50
|
-
Selecter,
|
|
51
|
-
Snackbar,
|
|
52
|
-
Switch,
|
|
53
|
-
Switcher,
|
|
54
|
-
Tabview,
|
|
55
|
-
TabView,
|
|
56
|
-
Text,
|
|
57
|
-
Textfield,
|
|
58
|
-
Toolbar,
|
|
59
|
-
Tooltip,
|
|
60
|
-
Layout,
|
|
61
|
-
List,
|
|
62
|
-
attach,
|
|
63
|
-
attributes,
|
|
64
|
-
build,
|
|
65
|
-
dataset,
|
|
66
|
-
display,
|
|
67
|
-
events,
|
|
68
|
-
emitter,
|
|
69
|
-
jsonToHTML,
|
|
70
|
-
mediator,
|
|
71
|
-
observer,
|
|
72
|
-
smoothscroll
|
|
45
|
+
AppBar, Button, Card, Checkbox, Component, DateHour, Dialog, Drawer, Element,
|
|
46
|
+
File, Form, Image, Layout, List, Loading, Menu, Navigation, Progress, Select,
|
|
47
|
+
Selecter, Slider, Snackbar, Switch, Switcher, Tabs, TabView, Text, Textfield, Toolbar, Tooltip,
|
|
48
|
+
attach, attributes, build, dataset, display, events, emitter, jsonToHTML, mediator,
|
|
49
|
+
observer, smoothscroll
|
|
73
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "A lightweight implementation of Material Design Components - ES6",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+ssh://git@gitlab.com/alkaloid/material.git"
|
|
10
10
|
},
|
|
11
11
|
"author": "Jérôme Vial <jerome.vial@gmail.com>",
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "GPL-3",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://gitlab.com/alkaloid/material/issues"
|
|
15
15
|
},
|
|
@@ -18,17 +18,9 @@
|
|
|
18
18
|
"lightweight material design ui component es6 vanilla javascript"
|
|
19
19
|
],
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"esbuild": "^0.14.47",
|
|
22
|
-
"esbuild-plugin-svg": "^0.1.0",
|
|
23
|
-
"@jgoz/esbuild-plugin-livereload": "^2.0.3",
|
|
24
21
|
"standard": "^10.0.3"
|
|
25
22
|
},
|
|
26
23
|
"scripts": {
|
|
27
|
-
"build": "node ./esbuild.js",
|
|
28
|
-
"build:watch": "node ./esbuild.watch.js",
|
|
29
|
-
"styles": "sass --watch dist/styles/demo.sass:dist/demo.css",
|
|
30
|
-
"watch": "npm-run-all --parallel reload dev",
|
|
31
|
-
"docs": "jsdoc src -r -d docs",
|
|
32
24
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
33
25
|
}
|
|
34
26
|
}
|
package/src/checkbox.js
CHANGED
|
@@ -1,74 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
import control from './mixin/control'
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import insert from './element/insert'
|
|
6
|
-
import build from './element/build'
|
|
7
|
-
|
|
8
|
-
import emitter from './module/emitter'
|
|
1
|
+
import EventEmitter from './mixin/events'
|
|
2
|
+
// import control from './mixin/control'
|
|
3
|
+
import build from './module/build'
|
|
9
4
|
import attach from './module/attach'
|
|
10
5
|
import * as css from './module/css'
|
|
11
6
|
|
|
12
7
|
import icon from './skin/material/icon/checkbox.svg'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const defaults = {
|
|
16
|
-
prefix: 'material',
|
|
17
|
-
class: 'checkbox',
|
|
18
|
-
type: 'control',
|
|
19
|
-
// modules: [events, control, emitter, attach],
|
|
20
|
-
build: ['$root.material-checkbox', {},
|
|
21
|
-
['input$input', {}],
|
|
22
|
-
['span$control.checkbox-control']
|
|
23
|
-
],
|
|
24
|
-
events: [
|
|
25
|
-
['element.control.click', 'click', {}],
|
|
26
|
-
['element.label.click', 'toggle', {}],
|
|
27
|
-
// for accessibility purpose
|
|
28
|
-
// ['element.input.click', 'toggle', {}],
|
|
29
|
-
['element.input.focus', 'focus'],
|
|
30
|
-
['element.input.blur', 'blur'],
|
|
31
|
-
['element.input.keydown', 'keydown', {}]
|
|
32
|
-
]
|
|
33
|
-
}
|
|
8
|
+
|
|
9
|
+
import Element from './element'
|
|
34
10
|
|
|
35
11
|
class Checkbox {
|
|
12
|
+
static defaults = {
|
|
13
|
+
class: 'checkbox',
|
|
14
|
+
layout: [
|
|
15
|
+
[Element, 'input', { type: 'checkbox' } ],
|
|
16
|
+
[Element, 'control', { type: 'checkbox' } ],
|
|
17
|
+
[Element, 'label', { tag: 'label' }]
|
|
18
|
+
],
|
|
19
|
+
events: [
|
|
20
|
+
['ui.control.click', 'click'],
|
|
21
|
+
['ui.label.click', 'toggle'],
|
|
22
|
+
// for accessibility purpose
|
|
23
|
+
// ['element.input.click', 'toggle'],
|
|
24
|
+
['ui.input.focus', 'focus'],
|
|
25
|
+
['ui.input.blur', 'blur'],
|
|
26
|
+
['ui.input.keydown', 'keydown']
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
|
|
36
30
|
constructor (options) {
|
|
37
31
|
this.init(options)
|
|
38
32
|
this.build()
|
|
33
|
+
this.setup()
|
|
39
34
|
this.attach()
|
|
40
|
-
|
|
41
|
-
return this
|
|
42
35
|
}
|
|
43
36
|
|
|
44
37
|
init (options) {
|
|
45
38
|
this.options = Object.assign({}, defaults, options || {})
|
|
46
|
-
Object.assign(this,
|
|
39
|
+
Object.assign(this, build, attach)
|
|
47
40
|
|
|
48
41
|
return this
|
|
49
42
|
}
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
setup () {
|
|
52
45
|
this.element = build(this.options.build)
|
|
53
46
|
this.element = this.element.root
|
|
54
47
|
|
|
55
|
-
this.
|
|
48
|
+
this.ui.control.innerHTML = icon
|
|
56
49
|
|
|
57
50
|
const text = this.options.text || this.options.label
|
|
58
51
|
|
|
59
|
-
this.
|
|
52
|
+
this.ui.label.innerHTML = text
|
|
60
53
|
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
54
|
+
this.ui.input.setAttribute('type', 'checkbox')
|
|
55
|
+
this.ui.input.setAttribute('name', this.options.name)
|
|
56
|
+
this.ui.input.setAttribute('aria-label', this.options.name)
|
|
64
57
|
|
|
65
58
|
if (this.options.value) {
|
|
66
|
-
this.
|
|
59
|
+
this.ui.input.setAttribute('value', this.options.value)
|
|
67
60
|
}
|
|
68
61
|
|
|
69
62
|
if (this.options.disabled) {
|
|
70
63
|
this.disabled = this.options.disabled
|
|
71
|
-
this.
|
|
64
|
+
this.ui.input.setAttribute('disabled', 'disabled')
|
|
72
65
|
css.add(this.element, 'is-disabled')
|
|
73
66
|
}
|
|
74
67
|
|
|
@@ -79,13 +72,6 @@ class Checkbox {
|
|
|
79
72
|
if (this.options.value) {
|
|
80
73
|
this.set('value', this.value)
|
|
81
74
|
}
|
|
82
|
-
|
|
83
|
-
// insert if container options is given
|
|
84
|
-
if (this.options.container) {
|
|
85
|
-
insert(this.element, this.options.container)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return this
|
|
89
75
|
}
|
|
90
76
|
|
|
91
77
|
set (prop, value) {
|
|
@@ -106,15 +92,25 @@ class Checkbox {
|
|
|
106
92
|
return this
|
|
107
93
|
}
|
|
108
94
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
95
|
+
check (checked) {
|
|
96
|
+
if (checked === true) {
|
|
97
|
+
css.add(this.element, 'is-checked')
|
|
98
|
+
this.ui.input.checked = true
|
|
99
|
+
this.checked = true
|
|
100
|
+
this.emit('change', this.checked)
|
|
101
|
+
} else {
|
|
102
|
+
css.remove(this.element, 'is-checked')
|
|
103
|
+
this.ui.input.checked = false
|
|
104
|
+
this.checked = false
|
|
105
|
+
this.emit('change', this.checked)
|
|
106
|
+
}
|
|
112
107
|
return this
|
|
113
108
|
}
|
|
114
109
|
|
|
110
|
+
|
|
115
111
|
click (e) {
|
|
116
112
|
this.toggle(e)
|
|
117
|
-
this.
|
|
113
|
+
this.ui.input.focus()
|
|
118
114
|
|
|
119
115
|
return this
|
|
120
116
|
}
|
|
@@ -122,7 +118,7 @@ class Checkbox {
|
|
|
122
118
|
setValue (value) {
|
|
123
119
|
// console.log('setValue', value)
|
|
124
120
|
this.value = value
|
|
125
|
-
this.
|
|
121
|
+
this.ui.input.setAttribute('value', value)
|
|
126
122
|
|
|
127
123
|
return this
|
|
128
124
|
}
|
package/src/element/insert.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import dom from '../module/dom'
|
|
2
2
|
|
|
3
|
-
const insert = (
|
|
4
|
-
if (!
|
|
3
|
+
const insert = (component, container, context = 'bottom') => {
|
|
4
|
+
if (!component || !container) return
|
|
5
5
|
|
|
6
|
-
element = element
|
|
7
|
-
container = container.
|
|
6
|
+
element = component.element || component
|
|
7
|
+
container = container.element || container
|
|
8
8
|
|
|
9
9
|
const contexts = ['top', 'bottom', 'after', 'before']
|
|
10
10
|
const methods = ['prepend', 'append', 'after', 'before']
|
package/src/list.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * css from './module/css'
|
|
1
|
+
import * as css from './module/css'
|
|
2
2
|
|
|
3
3
|
const defaults = {
|
|
4
4
|
className: 'text',
|
|
@@ -10,8 +10,6 @@ class List {
|
|
|
10
10
|
constructor (options) {
|
|
11
11
|
this.options = Object.assign({}, defaults, options || {})
|
|
12
12
|
|
|
13
|
-
// console.log('options', this.options)
|
|
14
|
-
|
|
15
13
|
this.build()
|
|
16
14
|
|
|
17
15
|
return this
|
package/src/module/build.js
CHANGED
|
@@ -16,13 +16,11 @@ export default {
|
|
|
16
16
|
css.add(this.element, this.options.class)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
if (defaults.class === 'account') console.log('data')
|
|
20
|
-
|
|
21
19
|
if (this.options.data) {
|
|
22
20
|
dataset(this.element, this.options.data)
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
if (this.options.base === 'view') {
|
|
23
|
+
if (this.options.base === 'view' || this.options.base === 'app') {
|
|
26
24
|
this.container = this.options.container || document.body
|
|
27
25
|
} else {
|
|
28
26
|
this.container = this.options.container
|
package/src/module/dom.js
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// request.js
|
|
2
|
+
const request = async (url, method = 'GET', body = null, headers = {}, signal = null) => {
|
|
3
|
+
const defaultHeaders = {
|
|
4
|
+
Accept: 'application/json',
|
|
5
|
+
'Content-Type': 'application/json'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const options = {
|
|
9
|
+
method,
|
|
10
|
+
headers: { ...defaultHeaders, ...headers },
|
|
11
|
+
signal
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (body) {
|
|
15
|
+
options.body = JSON.stringify(body)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const response = await fetch(url, options)
|
|
20
|
+
if (!response.ok) {
|
|
21
|
+
throw new Error(`HTTP error! status: ${response.status}`)
|
|
22
|
+
}
|
|
23
|
+
const data = await response.json()
|
|
24
|
+
|
|
25
|
+
return data
|
|
26
|
+
} catch (error) {
|
|
27
|
+
// Handle fetch or data processing errors
|
|
28
|
+
// console.log('error', error)
|
|
29
|
+
return { error }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default request
|
package/src/navigation.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as css from './module/css'
|
|
1
2
|
import build from './module/build'
|
|
2
3
|
|
|
3
4
|
class Navigation {
|
|
@@ -8,12 +9,17 @@ class Navigation {
|
|
|
8
9
|
constructor (options) {
|
|
9
10
|
this.init(options)
|
|
10
11
|
this.build()
|
|
12
|
+
this.setup()
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
init (options) {
|
|
14
|
-
this.options =
|
|
16
|
+
this.options = { ...Navigation.defaults, ...options }
|
|
15
17
|
Object.assign(this, build)
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
setup() {
|
|
21
|
+
if (this.options.type) css.add(this.element, 'type-', this.options.type)
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
export default Navigation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// type action
|
|
3
|
-
.
|
|
3
|
+
.button.type-action
|
|
4
4
|
min-width: 36px
|
|
5
5
|
transition: box-shadow .2s
|
|
6
6
|
box-shadow: none
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
fill: $default-color-text
|
|
16
16
|
|
|
17
17
|
// styles
|
|
18
|
-
.
|
|
18
|
+
.button.type-action
|
|
19
19
|
&.style-dense,
|
|
20
20
|
&.style-compact
|
|
21
21
|
height: 32px
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
// states
|
|
35
|
-
.
|
|
35
|
+
.button.type-action
|
|
36
36
|
&:hover
|
|
37
37
|
//background-color: #E0E0E0;
|
|
38
38
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
//background-color: rgba(255, 255, 255, 1)
|
|
44
44
|
|
|
45
45
|
// color
|
|
46
|
-
.
|
|
46
|
+
.button.type-action
|
|
47
47
|
&.primary-color
|
|
48
48
|
background-color: $primary-color
|
|
49
49
|
color: $primary-color-text
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
// theme
|
|
68
|
-
.dark-mode .
|
|
69
|
-
.
|
|
68
|
+
.dark-mode .button.type-action,
|
|
69
|
+
.button.type-action.dark-mode
|
|
70
70
|
|
|
71
71
|
//background-color: rgba(255, 255, 255, 0.95)
|
|
72
72
|
color: $primary-color-text-dark
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.button
|
|
2
2
|
display: flex
|
|
3
3
|
-webkit-font-smoothing: antialiased
|
|
4
4
|
white-space: nowrap
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
order: 1
|
|
61
61
|
|
|
62
62
|
// states
|
|
63
|
-
.
|
|
63
|
+
.button
|
|
64
64
|
&.is-disabled
|
|
65
65
|
pointer-events: none
|
|
66
66
|
opacity: .3
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
opacity: .3
|
|
87
87
|
|
|
88
88
|
// styles
|
|
89
|
-
.
|
|
89
|
+
.button
|
|
90
90
|
&.style-compact
|
|
91
91
|
> .button-label
|
|
92
92
|
padding-left: 0
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
padding-bottom: 2px
|
|
101
101
|
|
|
102
102
|
// color
|
|
103
|
-
.
|
|
103
|
+
.button
|
|
104
104
|
&.primary-color
|
|
105
105
|
color: $primary-color
|
|
106
106
|
&:focus
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
background-color: rgba($secondary-color, .05)
|
|
135
135
|
|
|
136
136
|
// theme
|
|
137
|
-
.dark-mode .
|
|
138
|
-
.
|
|
137
|
+
.dark-mode .button,
|
|
138
|
+
.button.dark-mode
|
|
139
139
|
color: $default-color-text-dark
|
|
140
140
|
.button-icon
|
|
141
141
|
svg
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// type floating
|
|
3
|
-
.
|
|
3
|
+
.button.type-floating
|
|
4
4
|
min-width: 56px
|
|
5
5
|
min-height: 56px
|
|
6
6
|
transition: box-shadow .2s
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
background-color: rgba(0, 0, 0, 1)
|
|
22
22
|
|
|
23
23
|
// states
|
|
24
|
-
.
|
|
24
|
+
.button.type-floating
|
|
25
25
|
background-color: rgba(0, 0, 0, 0.05)
|
|
26
26
|
&:focus
|
|
27
27
|
background-color: rgba(0, 0, 0, 0.15)
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
box-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12)
|
|
34
34
|
|
|
35
35
|
// color
|
|
36
|
-
.
|
|
36
|
+
.button.type-floating
|
|
37
37
|
&.primary-color
|
|
38
38
|
background-color: $primary-color
|
|
39
39
|
color: $primary-color-text
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
background-color: lighten($secondary-color, 5%)
|
|
69
69
|
|
|
70
70
|
// theme
|
|
71
|
-
.dark-mode .
|
|
72
|
-
.
|
|
71
|
+
.dark-mode .button.type-floating,
|
|
72
|
+
.button.type-floating.dark-mode
|
|
73
73
|
.material-ripple
|
|
74
74
|
opacity: .1
|
|
75
75
|
background-color: rgba(255, 255, 255, 1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// type raised
|
|
3
|
-
.
|
|
3
|
+
.button.type-raised
|
|
4
4
|
min-width: 36px
|
|
5
5
|
transition: box-shadow .2s
|
|
6
6
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
background-color: rgba(0, 0, 0, 1)
|
|
10
10
|
|
|
11
11
|
// states
|
|
12
|
-
.
|
|
12
|
+
.button.type-raised
|
|
13
13
|
background-color: rgba(0, 0, 0, 0.05)
|
|
14
14
|
&:focus
|
|
15
15
|
background-color: rgba(0, 0, 0, 0.15)
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
box-shadow: 0px 4px 4px -3px rgba(0, 0, 0, 0.2), 0px 6px 8px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)
|
|
22
22
|
|
|
23
23
|
// color
|
|
24
|
-
.
|
|
24
|
+
.button.type-raised
|
|
25
25
|
&.primary-color
|
|
26
26
|
background-color: $primary-color
|
|
27
27
|
color: $primary-color-text
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
background-color: lighten($secondary-color, 5%)
|
|
57
57
|
|
|
58
58
|
// theme
|
|
59
|
-
.dark-mode .
|
|
60
|
-
.
|
|
59
|
+
.dark-mode .button.type-raised,
|
|
60
|
+
.button.type-raised.dark-mode
|
|
61
61
|
.material-ripple
|
|
62
62
|
opacity: .1
|
|
63
63
|
background-color: rgba(255, 255, 255, 1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// type stroked
|
|
3
|
-
.
|
|
3
|
+
.button.type-stroked
|
|
4
4
|
min-width: 36px
|
|
5
5
|
transition: box-shadow .2s
|
|
6
6
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
background-color: rgba(255, 255, 255, .3)
|
|
9
9
|
|
|
10
10
|
// states
|
|
11
|
-
.
|
|
11
|
+
.button.type-stroked
|
|
12
12
|
&:hover
|
|
13
13
|
//background-color: #E0E0E0;
|
|
14
14
|
&:focus
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
box-shadow: 0px 4px 4px -3px rgba(0, 0, 0, 0.2), 0px 6px 8px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)
|
|
20
20
|
|
|
21
21
|
// color
|
|
22
|
-
.
|
|
22
|
+
.button.type-stroked
|
|
23
23
|
&.primary-color
|
|
24
24
|
background-color: $primary-color
|
|
25
25
|
color: $primary-color-text
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
background-color: $secondary-color
|
|
47
47
|
|
|
48
48
|
// theme
|
|
49
|
-
.dark-mode .
|
|
50
|
-
.
|
|
49
|
+
.dark-mode .button.type-stroked,
|
|
50
|
+
.button.type-stroked.dark-mode
|
|
51
51
|
|
|
52
52
|
//background-color: rgba(255, 255, 255, 0.95)
|
|
53
53
|
color: $primary-color-text-dark
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
display: flex
|
|
4
4
|
flex-direction: column
|
|
5
5
|
width: 12px
|
|
6
|
-
background-color: #3a3a3a
|
|
7
6
|
margin: 0
|
|
8
7
|
overflow: hidden
|
|
9
|
-
|
|
8
|
+
background-color: #3a3a3a
|
|
9
|
+
transition: 0.1s linear width
|
|
10
|
+
&.type-rail
|
|
11
|
+
display: flex
|
|
12
|
+
flex-direction: column
|
|
13
|
+
width: 80px
|