Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy #640

Open
wants to merge 274 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
3bd9643
chore: build dist
matmkian Aug 21, 2019
4d5a285
fix(button): handle all lumx colors
matmkian Aug 21, 2019
c1a96c9
chore: build dist
matmkian Aug 21, 2019
6540b41
fix(button): keep useless variables to ensure backward compatibility
matmkian Aug 21, 2019
0e7902e
chore: build dist
matmkian Aug 21, 2019
c5013dd
chore: rename legacy core scss
matmkian Aug 23, 2019
4c90747
chore: update lumx core
matmkian Aug 23, 2019
d2b7aea
chore: build dist
matmkian Aug 23, 2019
1f6bdb2
chore: update lumx core
matmkian Aug 26, 2019
1d68cc3
feat: add icon and chexbox components
matmkian Aug 23, 2019
6a1dd9f
chore: build dist
matmkian Aug 23, 2019
0254018
fix(icon): keep legacy style
matmkian Aug 23, 2019
8f32a42
Merge pull request #634 from lumapps/feat/legacy-checkbox
matmkian Aug 26, 2019
6d47a1f
chore: build dist
matmkian Aug 26, 2019
a7d4400
feat(dropdown): replace dropdown
matmkian Aug 26, 2019
79cd48d
feat(chip): replace chip
matmkian Aug 27, 2019
a7f99c5
feat(list): replace list
matmkian Aug 27, 2019
be0ccd5
feat(select): replace select
matmkian Aug 27, 2019
c4bdce3
chore: update yarn.lock
matmkian Aug 27, 2019
f8e133a
feat(select): handle max parameter
matmkian Aug 27, 2019
ca1d498
feat(dropdown): add scroll end event
matmkian Aug 27, 2019
f832563
feat(select): add infinite scroll param support
matmkian Aug 27, 2019
c6b9225
feat(select): add subheader support
matmkian Aug 27, 2019
60d66c8
chore: update lumx core
matmkian Aug 27, 2019
e8dfe77
chore: build dist
matmkian Aug 27, 2019
e373ffe
feat(popover): add component
matmkian Aug 28, 2019
ef317ef
chore: build dist
matmkian Aug 28, 2019
8927933
feat(dropdown): hande new lumx core
matmkian Aug 28, 2019
6ac4515
chore: build dist
matmkian Aug 28, 2019
432c073
fix(select): handle undefined model
matmkian Aug 28, 2019
182cea1
chore: build dist
matmkian Aug 28, 2019
51e9641
fix(dropdown): check close on click param before closing
matmkian Aug 28, 2019
e8f6580
fix(select): add click stop propagation on dropdown open
matmkian Aug 28, 2019
a5400d8
chore: build dist
matmkian Aug 28, 2019
2af63b2
fix(select): handle events everywhere while opening the dropdown
matmkian Aug 28, 2019
b13338d
chore: build dist
matmkian Aug 28, 2019
6991f39
feat(select): toggle dropdown on input/chip click
matmkian Aug 28, 2019
195a663
chore: build dist
matmkian Aug 28, 2019
6b0a841
feat(dropdown): close on destroy
matmkian Aug 28, 2019
c3bf7b3
chore: build dist
matmkian Aug 28, 2019
30f63ee
fix(select): handle undefined model
matmkian Aug 28, 2019
07821e1
chore: build dist
matmkian Aug 28, 2019
678010e
feat(dropdown): apply close on click only if document click
matmkian Aug 28, 2019
c866285
chore: build dist
matmkian Aug 28, 2019
78cbd55
feat(select): hanle subheader display on selected section
matmkian Aug 28, 2019
39a67dc
chore: build dist
matmkian Aug 28, 2019
c1f9b41
fix(select): remove unwanted one time binding
matmkian Aug 28, 2019
c137ac0
chore: build dist
matmkian Aug 28, 2019
045a4fb
fix(select): fix markup conditions
matmkian Aug 28, 2019
6c90e34
chore: build dist
matmkian Aug 28, 2019
9d0c06a
fix(dropdown): remove documentclick param if escape
matmkian Aug 29, 2019
573eab9
chore: build dist
matmkian Aug 29, 2019
5985266
fix(dropdown): work with an array of open dropdowns
matmkian Aug 29, 2019
43c8832
chore: build dist
matmkian Aug 29, 2019
b79f182
fix(dropdown): close self
matmkian Aug 29, 2019
0826ac8
chore: build dist
matmkian Aug 29, 2019
4103ba5
feat(dropdown): don't use event scheduler service
matmkian Aug 29, 2019
0971115
chore: build dist
matmkian Aug 29, 2019
788b797
fix(select): don't stop propogation if escape key code
matmkian Aug 29, 2019
c206817
chore: build dist
matmkian Aug 29, 2019
40753e1
feat(event-sheduler): support multiple events
matmkian Aug 30, 2019
4474b6e
feat(dropdown): prevent close on menu click if !close-on-click
matmkian Aug 30, 2019
01e8d03
chore: build dist
matmkian Aug 30, 2019
cb2be13
feat(dropdown): enhance init backward compatibility
matmkian Aug 30, 2019
bd2f5f0
chore: build dist
matmkian Aug 30, 2019
ffe5115
fix(dropdown): don't close if not open on destroy
matmkian Sep 3, 2019
b4f8548
chore: build dist
matmkian Sep 3, 2019
f0a07de
chore: prettier webpack
matmkian Sep 3, 2019
be29f47
chore: add missing dependencies
matmkian Sep 3, 2019
a769287
chore(demo): import demo layout
matmkian Sep 4, 2019
48c95d5
feat(grid): add component
matmkian Sep 4, 2019
72f6368
feat(side-navigation): add component
matmkian Sep 4, 2019
04dbeae
fix(demo): fix main navigation items
matmkian Sep 4, 2019
a67478c
chore(demo): add checkbox/chip/dropdown/list/select demo
matmkian Sep 4, 2019
f45959e
Merge pull request #635 from lumapps/feat/legacy-dropdown
matmkian Sep 4, 2019
931cb75
Merge pull request #636 from lumapps/feat/new-demo-site
matmkian Sep 4, 2019
69a3c47
chore: build dist
matmkian Sep 4, 2019
f50055a
feat(radio-button): import radio button component
matmkian Sep 4, 2019
f52a82a
chore: build dist
matmkian Sep 4, 2019
65d5299
feat(switch): import switch component
matmkian Sep 5, 2019
948eac4
chore: build dist
matmkian Sep 5, 2019
d242dc6
feat(text-field): import text field component
matmkian Sep 5, 2019
b364388
chore: build dist
matmkian Sep 5, 2019
9e01f53
fix(text-field): add missing backward style
matmkian Sep 5, 2019
4e59384
chore: build dist
matmkian Sep 5, 2019
478451c
fix(text-field): fix backward style
matmkian Sep 5, 2019
33af2a2
chore: build dist
matmkian Sep 5, 2019
93c5cd3
fix(text-field): handle empty model controller
matmkian Sep 5, 2019
67d6d62
chore: build dist
matmkian Sep 5, 2019
e1ad7a5
feat(text-field): add focus param
matmkian Sep 5, 2019
5b493ec
chore: build dist
matmkian Sep 5, 2019
6cd1fc6
Merge pull request #638 from lumapps/feat/legacy-radio-button
matmkian Sep 5, 2019
96c62f7
fix(utils): fix debounce function
matmkian Sep 5, 2019
ccbf517
chore: build dist
matmkian Sep 5, 2019
43f0f81
fix(text-field): check if model controller exists
matmkian Sep 6, 2019
6a235e6
chore: build dist
matmkian Sep 6, 2019
aeb28e4
fix(text-field): check if model controller is defined
matmkian Sep 6, 2019
d8280d2
chore: build dist
matmkian Sep 6, 2019
0e9ffa9
fix(fab): fix fab according to new buttons
matmkian Sep 6, 2019
8bd715b
chore: build dist
matmkian Sep 6, 2019
1654e6b
feat(text-field): add textarea support
matmkian Sep 6, 2019
cfbb831
chore: build dist
matmkian Sep 6, 2019
3ece7c9
fix(text-field): check if $$attr exists
matmkian Sep 6, 2019
e220171
chore: build dist
matmkian Sep 6, 2019
5d8e513
feat(radio-button): add radio group component
matmkian Sep 16, 2019
ac77d7c
chore: build dist
matmkian Sep 16, 2019
0973965
feat(dialog): import from design system
matmkian Sep 17, 2019
98878f3
feat(toolbar): import from design system
matmkian Sep 17, 2019
47adc41
chore: build dist
matmkian Sep 18, 2019
549064c
chore: update lumx core
matmkian Sep 19, 2019
380d0dd
feat(button): add has background param
matmkian Sep 19, 2019
c38e62c
feat(button): add button group component
matmkian Sep 19, 2019
6a20527
chore: update lumx core
matmkian Sep 19, 2019
ceb7505
chore(dialog): remove useless scss file
matmkian Sep 19, 2019
89d1633
chore: build dist
matmkian Sep 19, 2019
f5c9fa5
chore: update lumx core
matmkian Sep 20, 2019
a8b2dd3
fix(button): correctly check default emphasis
matmkian Sep 20, 2019
e86587e
chore: build dist
matmkian Sep 20, 2019
5d750e0
feat(notification): import from design system
matmkian Sep 23, 2019
404eca4
fix(dialog): fix alert and confirm param prefix
matmkian Sep 23, 2019
730bdbc
chore: build dist
matmkian Sep 23, 2019
391dfc6
feat(tooltip): import from design system
matmkian Sep 23, 2019
4f7351e
chore: build dist
matmkian Sep 23, 2019
fe0bd7e
chore: update lumx core
matmkian Sep 23, 2019
a099edd
feat(tabs): import from design system
matmkian Sep 23, 2019
14248c8
chore: build dist
matmkian Sep 23, 2019
2089180
chore: update lumx core
matmkian Sep 23, 2019
6c1ff21
chore: update lumx core
matmkian Sep 25, 2019
697b89a
feat(table): import from design system
matmkian Sep 25, 2019
67f372c
feat(link/thumbnail): import from design system
matmkian Sep 25, 2019
2c6f1f6
chore: harmonize events to only use keydown
matmkian Sep 25, 2019
0374c51
feat(chip): use function for ng-class
matmkian Sep 25, 2019
75426ad
feat(grid): use function for ng-class
matmkian Sep 25, 2019
6b30de1
feat(icon): use function for ng-class
matmkian Sep 25, 2019
12b0bbc
fix: bad comment
matmkian Sep 25, 2019
2fe155d
feat(popover): use function for ng-class
matmkian Sep 25, 2019
f2b90cf
feat(thumbnail): use function for ng-class
matmkian Sep 25, 2019
d0cdb77
feat(button): use function for ng-class
matmkian Sep 25, 2019
1390f10
chore: build dist
matmkian Sep 25, 2019
e005ea8
fix(tooltip): remove isolated scope
matmkian Sep 26, 2019
cc674cb
chore: build dist
matmkian Sep 26, 2019
2478c37
fix(dropdown): toggle on button / link click
matmkian Sep 26, 2019
edc7047
chore(demo): enhance table demo
matmkian Sep 26, 2019
e735508
chore: build dist
matmkian Sep 26, 2019
ceac6ca
chore: update lumx core
matmkian Sep 26, 2019
79da0a7
chore: update lumx core
matmkian Sep 26, 2019
2e72e5d
chore: update lumx core
matmkian Sep 26, 2019
f7ad557
chore: update lumx core
matmkian Sep 26, 2019
917514f
chore: update lumx core
matmkian Sep 26, 2019
be85fc8
chore: update lumx core
matmkian Sep 27, 2019
3f7baf8
feat(data-table): rework component to fit table
matmkian Sep 30, 2019
b1df3e7
chore: build dist
matmkian Sep 30, 2019
8591c28
feat(data-table): use table directives instead of markup
matmkian Sep 30, 2019
b259514
chore: build dist
matmkian Sep 30, 2019
3e63f3a
chore: update lumx core
matmkian Oct 1, 2019
919d674
feat(table): add is clickable prop on row
matmkian Oct 2, 2019
d473b30
chore: build dist
matmkian Oct 2, 2019
074adf4
fix(tooltip): avoid showing tootlip if no text
matmkian Oct 2, 2019
d73bb4d
feat(dropdown): only close dropdown on escape and enter keydown
matmkian Oct 2, 2019
cf4e0d8
chore: build dist
matmkian Oct 2, 2019
e6ca7cb
fix(dropdown): fixed width if width prop
matmkian Oct 2, 2019
cfcc069
chore: build dist
matmkian Oct 2, 2019
f1894cb
chore: update lumx core
matmkian Oct 8, 2019
7e140f3
fix(tooltip): don't use popperjs anymore
matmkian Oct 8, 2019
4d2cf87
fix(button): remove useless fallback
matmkian Oct 8, 2019
40e0b2b
chore: build dist
matmkian Oct 8, 2019
b8e19d1
chore: update lumx core
matmkian Oct 8, 2019
7674af9
fix(tooltip): fix y axis position
matmkian Oct 8, 2019
ba27468
chore: build dist
matmkian Oct 8, 2019
ea9ffe3
chore(deploy): generate static site using webpack
Oct 9, 2019
735980d
Merge pull request #641 from lumapps/chore/static-site
gcornut Oct 10, 2019
09880c1
chore: update lumx core
matmkian Oct 14, 2019
6b8e69f
feat: make components customizable (color)
matmkian Oct 14, 2019
70430a8
chore: update lumx core
matmkian Oct 14, 2019
04a9bc7
feat(progress): import from Design System
matmkian Oct 14, 2019
dad1c8c
chore: build dist
matmkian Oct 14, 2019
5db3e27
chore: update lumx core
matmkian Oct 14, 2019
cbbad6d
feat(progress): add theme support
matmkian Oct 14, 2019
383a4b1
chore: build dist
matmkian Oct 14, 2019
e069b28
feat(button): ensure backward compatibility
matmkian Oct 15, 2019
e268a46
chore: fix static site deployment
Oct 16, 2019
e352106
fix(button): check prop is not empty for classes
matmkian Oct 16, 2019
1e1b609
chore: put back dist but not demo
Oct 16, 2019
4c2310e
chore: build dist
matmkian Oct 16, 2019
206e8a8
chore: remove useless components and dependencies
matmkian Oct 16, 2019
f10ed64
chore: use quote for mixin params in demo
matmkian Oct 17, 2019
2a4cb5b
chore: eslint ignore on postcss config
matmkian Oct 17, 2019
0cdc1ca
feat(date-picker): rework the whole component
matmkian Oct 17, 2019
8e484af
IFR-570 Add Dockerfile and associated files
jeromepin Oct 17, 2019
3739136
IFR-570 Add CI
jeromepin Oct 17, 2019
6dcc739
Merge pull request #644 from lumapps/IFR-570/implement_ci_cd_on_docum…
jeromepin Oct 18, 2019
9793f3e
feat(date-picker): add locale support
matmkian Oct 18, 2019
3bac9be
chore: build dist
matmkian Oct 18, 2019
bdad357
chore: remove uselss popover component
matmkian Oct 18, 2019
7b3f1e5
chore: remove deprecated core and component css
matmkian Oct 18, 2019
15a0ca7
chore: build dist
matmkian Oct 18, 2019
5c95ca2
IFR-570 Force a newer Docker version in CircleCI
jeromepin Oct 18, 2019
5e94504
chore: remove scss core and update webpack
matmkian Oct 18, 2019
3ee4fda
chore(button): disable eslint id-length
matmkian Oct 18, 2019
f94f761
chore: update LumX core
matmkian Oct 19, 2019
8de2fae
chore: build dist
matmkian Oct 19, 2019
69cebf9
chore: update LumX core
matmkian Oct 19, 2019
d3a8511
Merge pull request #645 from lumapps/IFR-570/implement_ci_cd_on_docum…
jeromepin Oct 21, 2019
a7573b9
chore: update LumX core
matmkian Oct 25, 2019
bcba707
fix: fix select and text field according to new LumX core
matmkian Oct 25, 2019
61e9e97
chore: build dist
matmkian Oct 25, 2019
1641718
fix(select): fix markup
matmkian Nov 2, 2019
d438627
fix(tooltip): don't display of no text
matmkian Nov 2, 2019
5f29740
chore: build dist
matmkian Nov 2, 2019
48170b9
chore(text-field): correctly check if input exists
matmkian Nov 2, 2019
f5b7b8b
fix(dropdown): add timeout to check button
matmkian Nov 2, 2019
387ed28
fix(dropdown): docus source element only if document key down
matmkian Nov 2, 2019
66947d2
chore: build dist
matmkian Nov 2, 2019
9a210ea
feat(dialog): add loading prop support
matmkian Nov 4, 2019
4cbe00f
feat(dialog): support force divider on header and footer
matmkian Nov 4, 2019
797ba29
chore: build dist
matmkian Nov 4, 2019
0ec65c5
feat(dropdown): update position on scroll
matmkian Nov 4, 2019
1429def
chore: remove useless body scroll disable
matmkian Nov 4, 2019
0e5ac88
chore: remove uselss dependency in utils service
matmkian Nov 4, 2019
cb4b9a5
chore: build dist
matmkian Nov 4, 2019
64a5869
chore: update LumX core
matmkian Nov 4, 2019
ba1fe5e
chore: update LumX core
matmkian Nov 4, 2019
8f1f048
chore: update LumX core
matmkian Nov 4, 2019
8c7ad84
fix(select/text-field): add button type on clear button
matmkian Nov 6, 2019
70b3bcb
chore(checkbox): use ng-classe
matmkian Nov 6, 2019
077469f
chore: build dist
matmkian Nov 6, 2019
5e5da5b
chore(chip): enhance ng-class
matmkian Nov 7, 2019
1a533d1
chore(dialog): use ng-class
matmkian Nov 7, 2019
cf774e1
chore(grid): enhance ng-class
matmkian Nov 7, 2019
1914fc0
chore(icon): enhance ng-class
matmkian Nov 7, 2019
f38cb23
chore(link): enhance ng-class
matmkian Nov 7, 2019
faf4663
chore(list): use ng-class
matmkian Nov 7, 2019
bbdf4c6
chore(progress): use ng-class
matmkian Nov 7, 2019
8877f0d
chore(radio-button): use ng-class
matmkian Nov 7, 2019
4b50889
chore(select): use ng-class
matmkian Nov 7, 2019
fc5d592
chore(side-navigation): use ng-class
matmkian Nov 7, 2019
aee501b
chore(switch): use ng-class
matmkian Nov 7, 2019
3a374b0
chore(table): use ng-class
matmkian Nov 7, 2019
f015ba8
chore(tabs): use ng-class
matmkian Nov 7, 2019
f05c2de
chore(text-field): use ng-class
matmkian Nov 7, 2019
e6a32eb
chore(thumbnail): enhance ng-class
matmkian Nov 7, 2019
bc31ab8
chore(dropdown): add has-toggle class without public attr
matmkian Nov 7, 2019
ca156d8
chore: update LumX core
matmkian Nov 18, 2019
8b4b044
chore: build dist
matmkian Nov 18, 2019
72c24a8
chore: update LumX core
matmkian Nov 19, 2019
1d53943
fix(dialog): add shown class for IE11 support
matmkian Nov 19, 2019
308833b
chore: build dist
matmkian Nov 19, 2019
b5a4ca5
chore: update LumX core
matmkian Nov 22, 2019
7ee25e6
fix(chip): fix color class
matmkian Dec 2, 2019
e238140
chore: build dist
matmkian Dec 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: build dist
matmkian committed Aug 21, 2019
commit 3bd9643301c3abc1150f36604a1791dc5802f898
29,052 changes: 23,746 additions & 5,306 deletions dist/lumx.css

Large diffs are not rendered by default.

1,315 changes: 707 additions & 608 deletions dist/lumx.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lumx.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lumx.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lumx.min.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions dist/scss/_lumx.scss → dist/scss/_lumx-lumapps.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
///* ========================================================================
// #FRAMEWORK
// ======================================================================== */

$mdi-font-path: '../../node_modules/@mdi/font/fonts' !default;

@import 'bourbon';
@import 'materialdesignicons';
@import 'mq';
@import 'core-lumapps';
@import 'components-lumapps';
@import 'settings/settings.color-palette';
@import 'settings/settings.colors';
@import 'settings/settings.core';
3 changes: 3 additions & 0 deletions dist/scss/_lumx-material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import 'core-material';
@import 'components-material';
@import 'lumx-lumapps';
217 changes: 56 additions & 161 deletions dist/scss/modules/_button.scss
Original file line number Diff line number Diff line change
@@ -1,152 +1,85 @@
///*------------------------------------*\
// #BUTTON
//\*------------------------------------*/
/* ==========================================================================
Button
========================================================================== */

$btn-emphasis-fallback: (
'raised': 'emphasis-high',
'flat': 'emphasis-low',
'fab': 'emphasis-high',
'icon': 'emphasis-low',
);

$btn-size-fallback: (
'xs': 's',
's': 's',
'm': 'm',
'l': 'm',
'xl': 'm',
);

$btn-variant-fallback: (
'raised': 'variant-button',
'flat': 'variant-button',
'fab': 'variant-icon',
'icon': 'variant-icon',
);

// Button vars
$btn-font-size: ('xs': 10px, 's': 13px, 'm': 14px, 'l': 16px, 'xl': 16px);
$btn-icon-size: ('xs': 14px, 's': 18px, 'm': 20px, 'l': 24px, 'xl': 24px);
$btn-fab-size: ('xs': 14px, 's': 18px, 'm': 20px, 'l': 20px, 'xl': 24px);





// Button mixins
@mixin btn($size, $color, $type, $disabled: null) {
@include btn-reset();

@if $disabled {
@include btn-disabled($type);
}

@include lumx-button-base;
@include lumx-state-transition;
@include btn-size($size, $type);
@include btn-color($color, $type);
@include btn-type($type);
}

@mixin btn-size($size, $type: null) {
line-height: map-get($sizes, $size);

@if $type == 'raised' or $type == 'flat' {
min-width: 64px;
@include font-size(map-get($btn-font-size, $size));
}

@if $type == 'raised' {
padding-left: $base-spacing-unit * 2;
padding-right: $base-spacing-unit * 2;
}

@if $type == 'flat' {
padding-left: $base-spacing-unit;
padding-right: $base-spacing-unit;
}

@if $type == 'icon' or $type == 'fab' {
@include size(map-get($sizes, $size));
@include lumx-button-size(
map-get($btn-emphasis-fallback, $type),
map-get($btn-variant-fallback, $type),
map-get($btn-size-fallback, $size)
);

@if (map-get($btn-variant-fallback, $type) == 'variant-button') {
@include lumx-button-text(map-get($btn-size-fallback, $size));
pointer-events: visible;
} @else {
i {
@include lumx-button-icon(variant-icon, position-left, map-get($btn-size-fallback, $size));
}
}

@if $type == 'icon' {
@include font-size(map-get($btn-icon-size, $size));
@if (map-get($btn-variant-fallback, $type) == 'variant-button') {
@if (map-get($btn-emphasis-fallback, $type) == 'emphasis-high') {
@if (map-get($btn-size-fallback, $size) == 'm') {
padding: 0 $lumx-spacing-unit * 2;
} @else {
padding: 0 $lumx-spacing-unit * 1.5;
}
} @else {
padding: 0 $lumx-spacing-unit;
}
}

@if $type == 'fab' {
@include font-size(map-get($btn-fab-size, $size));
.ripple {
display: none;
}
}

@mixin btn-color($color, $type) {
@if $type == 'raised' or $type == 'fab' {
@if $color == 'white' or $color == 'light-blue' or $color == 'cyan' or $color == 'green' or $color == 'light-green' or $color == 'lime' or $color == 'yellow' or $color == 'amber' or $color == 'orange' or $color == 'grey' {
color: $black-1;
} @else {
color: $white-1;
}

background-color: map-get($colors, $color);

.ripple {
z-index: -1;
background-color: darken(map-get($colors, $color), 50%);
}
}

@if $type == 'flat' or $type == 'icon' {
color: map-get($colors, $color);

.ripple {
z-index: -1;
background-color: map-get($colors, $color);
}

&:hover {
background-color: rgba(map-get($colors, $color), 0.12);
}
}
@include lumx-button-color(map-get($btn-emphasis-fallback, $type), $color, dark);
}

@mixin btn-type($type) {
@if $type == 'raised' or $type == 'flat' {
border-radius: $base-round;
font-weight: 500;
text-transform: uppercase;
}

@if $type == 'raised' or $type == 'fab' {
@include transition-property(box-shadow);
@include transition-duration(0.2s);
}

@if $type == 'raised' {
@include elevation(2);

&:active {
@include elevation(8);
}
}

@if $type == 'fab' {
@include elevation(6);

&:active {
@include elevation(12);
}
}

@if $type == 'flat' or $type == 'icon' {
@include transition-property(background-color);
@include transition-duration(0.2s);
}

@if $type == 'icon' or $type == 'fab' {
border-radius: 50%;
}
}

@mixin btn-disabled($type) {
box-shadow: none !important;
cursor: not-allowed !important;
color: $black-3 !important;

@if $type == 'raised' or $type == 'fab' {
background-color: $grey-300 !important;
}

@if $type == 'flat' or $type == 'icon' {
background-color: transparent !important;
}
}





// Button base styles
.btn {
@include btn-reset();
@include lumx-button-base;
@include lumx-state-transition;
}

// Size
@each $key, $size in $sizes {
.btn--raised.btn--#{$key} {
@include btn-size($key, 'raised');
@@ -165,8 +98,7 @@ $btn-fab-size: ('xs': 14px, 's': 18px, 'm': 20px, 'l': 20px, 'xl': 24px);
}
}

// Color
@each $key, $color in $colors {
@each $key, $color in $lumx-theme-color-palette {
.btn--raised.btn--#{$key} {
@include btn-color($key, 'raised');
}
@@ -183,40 +115,3 @@ $btn-fab-size: ('xs': 14px, 's': 18px, 'm': 20px, 'l': 20px, 'xl': 24px);
@include btn-color($key, 'fab');
}
}

// Type
.btn--raised {
@include btn-type('raised');

&[disabled],
&.btn--is-disabled {
@include btn-disabled('raised');
}
}

.btn--flat {
@include btn-type('flat');

&[disabled],
&.btn--is-disabled {
@include btn-disabled('flat');
}
}

.btn--icon {
@include btn-type('icon');

&[disabled],
&.btn--is-disabled {
@include btn-disabled('icon');
}
}

.btn--fab {
@include btn-type('fab');

&[disabled],
&.btn--is-disabled {
@include btn-disabled('fab');
}
}
21 changes: 9 additions & 12 deletions webpack/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const IS_CI = require('is-ci');
var glob = require('glob');
const glob = require('glob');

const merge = require('webpack-merge');

@@ -13,13 +13,10 @@ const { DEFAULT_HOST, DEFAULT_PORT, DEMO_PATH, ROOT_PATH } = require('./constant
const baseConfig = require('./webpack.config');

const entry = Object.assign(baseConfig.entry, {
'app': `${DEMO_PATH}/app.js`,
'modules': [...glob.sync(`${DEMO_PATH}/includes/modules/**/*.js`)],
app: `${DEMO_PATH}/app.js`,
modules: [...glob.sync(`${DEMO_PATH}/includes/modules/**/*.js`)],
});
entry.lumx = [
...entry.lumx,
`${DEMO_PATH}/scss/lumx.scss`,
];
entry.lumx = [...entry.lumx, `${DEMO_PATH}/scss/lumx.scss`];

const plugins = [
...baseConfig.plugins,
@@ -51,7 +48,7 @@ module.exports = merge.smartStrategy({

devServer: {
compress: true,
contentBase: [DEMO_PATH, ROOT_PATH],
contentBase: [DEMO_PATH, ROOT_PATH],
disableHostCheck: true,
headers: {
'Access-Control-Allow-Headers': '*',
@@ -62,16 +59,16 @@ module.exports = merge.smartStrategy({
},
host: DEFAULT_HOST,
hot: true,
open: true,
overlay: true,
open: true,
overlay: true,
// eslint-disable-next-line no-magic-numbers
port: DEFAULT_PORT,
quiet: true,
},
},

module: {
rules: getStyleLoader({ mode: 'dev' }),
},
},

plugins,
});
11 changes: 4 additions & 7 deletions webpack/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -20,11 +20,8 @@ const generatePackage = Boolean(process.env.GENERATE_PACKAGE);
const filename = `[name]${minify ? '.min' : ''}`;
const distTechPath = `${DIST_PATH}`;

const entry = baseConfig.entry;
entry.lumx = [
`${CORE_PATH}/scss/_lumx.scss`,
...entry.lumx,
];
const { entry } = baseConfig;
entry.lumx = [`${CORE_PATH}/scss/_lumx-lumapps.scss`, `${CORE_PATH}/scss/_lumx-material.scss`, ...entry.lumx];

const minimizer = [];
const plugins = [
@@ -62,7 +59,7 @@ if (generatePackage) {
from: `${MODULES_PATH}/**/*.scss`,
to: `${DIST_PATH}/scss/modules`,
flatten: true,
},
},
]),
);
}
@@ -93,7 +90,7 @@ module.exports = merge.smartStrategy({
bail: true,
devtool: minify ? 'source-map' : '',
mode: 'production',
name: `lumx-umd${minify ? '-minified' : ''}`,
name: `lumx-umd${minify ? '-minified' : ''}`,

entry,