@woosmap/ui 2.39.0 → 2.43.0

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 (52) hide show
  1. package/package.json +1 -1
  2. package/src/components/Button/Button.js +4 -0
  3. package/src/components/Button/Button.stories.js +1 -1
  4. package/src/components/Button/Button.test.js +3 -3
  5. package/src/components/Button/ButtonGroup.js +4 -1
  6. package/src/components/Button/ButtonSwitch.js +4 -2
  7. package/src/components/Button/ButtonWithDropdown.js +22 -8
  8. package/src/components/Button/ButtonWithDropdown.test.js +35 -0
  9. package/src/components/Card/Card.js +5 -0
  10. package/src/components/Card/Card.test.js +3 -3
  11. package/src/components/Card/SimpleCard.js +25 -5
  12. package/src/components/Card/SimpleCard.test.js +2 -2
  13. package/src/components/CopyClipboardButton/CopyClipboardButton.js +4 -1
  14. package/src/components/CopyClipboardButton/CopyToClipboard.test.js +2 -2
  15. package/src/components/Demo/SearchDemo.js +1 -0
  16. package/src/components/Dropdown/Dropdown.js +30 -5
  17. package/src/components/Dropdown/Dropdown.test.js +2 -2
  18. package/src/components/DynamicTag/DynamicTag.js +8 -4
  19. package/src/components/Flash/Flash.js +4 -1
  20. package/src/components/Icon/Icon.js +45 -21
  21. package/src/components/Icon/Icon.test.js +4 -4
  22. package/src/components/InfoMessage/InfoMessage.js +5 -2
  23. package/src/components/InfoMessage/InfoMessage.test.js +2 -2
  24. package/src/components/Input/Input.test.js +26 -0
  25. package/src/components/Label/Label.js +18 -3
  26. package/src/components/Label/Label.styl +1 -1
  27. package/src/components/Modal/ConfirmationModal.js +4 -1
  28. package/src/components/Modal/Modal.js +13 -6
  29. package/src/components/Modal/Modal.test.js +3 -3
  30. package/src/components/Panel/Panel.js +5 -3
  31. package/src/components/Panel/Panel.test.js +2 -2
  32. package/src/components/Popover/ConfirmationPopover.js +5 -3
  33. package/src/components/ScrollBar/ScrollBar.js +4 -1
  34. package/src/components/ScrollBar/ScrollBar.test.js +2 -2
  35. package/src/components/ServiceMessage/ServiceMessage.js +8 -4
  36. package/src/components/SnackBar/SnackBar.test.js +2 -2
  37. package/src/components/Tab/Tab.js +6 -3
  38. package/src/components/Tab/Tab.test.js +9 -9
  39. package/src/components/Tooltip/Tooltip.js +4 -2
  40. package/src/components/Tooltip/Tooltip.test.js +4 -4
  41. package/src/components/withFormValidation/withFormValidation.test.js +1 -5
  42. package/src/icons/autocomplete.svg +1 -0
  43. package/src/icons/buildings.svg +1 -0
  44. package/src/icons/github.svg +1 -0
  45. package/src/icons/position.svg +1 -0
  46. package/src/icons/quote.svg +1 -0
  47. package/src/icons/save-money.svg +1 -0
  48. package/src/icons/world.svg +1 -0
  49. package/src/styles/console/button.styl +69 -43
  50. package/src/styles/console/mixins.styl +2 -2
  51. package/src/styles/console/select.styl +0 -1
  52. package/src/styles/style-next-website.styl +25 -0
@@ -40,7 +40,7 @@ export default class Tab extends Component {
40
40
  renderHeader(childrenOfTab) {
41
41
  return Children.toArray(childrenOfTab).map((childTab, index) => {
42
42
  const { title, icon, iconSize, className } = childTab.props;
43
- const { type } = this.props;
43
+ const { type, testId } = this.props;
44
44
  const btnType = !type || undefined ? 'tab' : `tab--${type}`;
45
45
  return (
46
46
  <li key={`header_${title}`}>
@@ -52,6 +52,7 @@ export default class Tab extends Component {
52
52
  label={title}
53
53
  icon={icon}
54
54
  iconSize={iconSize}
55
+ testId={`${testId}-header-button`}
55
56
  />
56
57
  </li>
57
58
  );
@@ -86,10 +87,10 @@ export default class Tab extends Component {
86
87
  }
87
88
 
88
89
  render() {
89
- const { children, type, separator } = this.props;
90
+ const { children, type, separator, testId } = this.props;
90
91
  const classes = cl('tab', `tab--${type}`);
91
92
  return (
92
- <div className={classes}>
93
+ <div className={classes} data-testid={testId}>
93
94
  <div className={cl('tab__header', { 'tab__header--separator': separator })}>
94
95
  <ul className="tab__header__buttons">{this.renderHeader(children)}</ul>
95
96
  <div>{this.renderActions(children)}</div>
@@ -101,6 +102,7 @@ export default class Tab extends Component {
101
102
  }
102
103
 
103
104
  Tab.defaultProps = {
105
+ testId: 'tab',
104
106
  actions: [],
105
107
  type: undefined,
106
108
  selectCb: null,
@@ -113,6 +115,7 @@ Tab.defaultProps = {
113
115
  Tab.propTypes = {
114
116
  selectCb: PropTypes.func,
115
117
  defaultSelect: PropTypes.string,
118
+ testId: PropTypes.string,
116
119
  children: PropTypes.node.isRequired,
117
120
  actions: PropTypes.array,
118
121
  type: PropTypes.oneOf(['pills', undefined]),
@@ -8,24 +8,24 @@ import Tab from './Tab';
8
8
  it('renders a tab component with no tab', () => {
9
9
  const { container } = render(
10
10
  <Tab>
11
- <div title="tab 1">My first tab</div>
11
+ <div title="tab 1">First</div>
12
12
  </Tab>
13
13
  );
14
14
  expect(container.firstChild).toHaveClass('tab');
15
15
  });
16
16
 
17
17
  it('renders a tab component with 2 tabs and content', () => {
18
- const { container } = render(
18
+ const { getByTestId, container } = render(
19
19
  <Tab>
20
- <div title="tab 1">My first tab</div>
21
- <div title="tab 2">My second tab</div>
20
+ <div title="tab 1">First</div>
21
+ <div title="tab 2">Second</div>
22
22
  </Tab>
23
23
  );
24
- expect(container.firstChild).toHaveClass('tab');
24
+ expect(getByTestId('tab')).toHaveClass('tab');
25
25
  expect(container.firstChild.firstChild).toHaveClass('tab__header');
26
26
  expect(container.firstChild.firstChild.firstChild.firstChild.firstChild).toHaveClass('btn');
27
27
  expect(container.firstChild.firstChild.firstChild.firstChild.firstChild).toHaveClass('active');
28
- const firstTab = screen.getByText('My first tab');
28
+ const firstTab = screen.getByText('First');
29
29
  expect(firstTab).toHaveClass('active');
30
30
 
31
31
  userEvent.click(screen.getByText('tab 2'));
@@ -34,12 +34,12 @@ it('renders a tab component with 2 tabs and content', () => {
34
34
  it('changes active tab after click', () => {
35
35
  render(
36
36
  <Tab>
37
- <div title="tab 1">My first tab</div>
38
- <div title="tab 2">My second tab</div>
37
+ <div title="tab 1">First</div>
38
+ <div title="tab 2">Second</div>
39
39
  </Tab>
40
40
  );
41
41
 
42
42
  userEvent.click(screen.getByText('tab 2'));
43
- const secondTab = screen.getByText('My second tab');
43
+ const secondTab = screen.getByText('Second');
44
44
  expect(secondTab).toHaveClass('active');
45
45
  });
@@ -4,7 +4,7 @@ import cl from 'classnames';
4
4
 
5
5
  export default class Tooltip extends Component {
6
6
  render() {
7
- const { product, className, text, direction, align, noDelay, wrap, children, ...rest } = this.props;
7
+ const { product, className, text, direction, align, noDelay, wrap, children, testId, ...rest } = this.props;
8
8
  const classes = cl(
9
9
  'tooltip',
10
10
  className,
@@ -15,7 +15,7 @@ export default class Tooltip extends Component {
15
15
  wrap && 'tooltipped-multiline'
16
16
  );
17
17
  return (
18
- <div aria-label={text} {...rest} className={classes}>
18
+ <div aria-label={text} data-testid={testId} {...rest} className={classes}>
19
19
  {children}
20
20
  </div>
21
21
  );
@@ -23,6 +23,7 @@ export default class Tooltip extends Component {
23
23
  }
24
24
 
25
25
  Tooltip.defaultProps = {
26
+ testId: 'tooltip',
26
27
  className: '',
27
28
  direction: 'e',
28
29
  align: undefined,
@@ -51,6 +52,7 @@ Tooltip.propTypes = {
51
52
  undefined,
52
53
  ]),
53
54
  text: PropTypes.string,
55
+ testId: PropTypes.string,
54
56
  className: PropTypes.string,
55
57
  wrap: PropTypes.bool,
56
58
  };
@@ -5,10 +5,10 @@ import '@testing-library/jest-dom/extend-expect';
5
5
  import Tooltip from './Tooltip';
6
6
 
7
7
  it('renders a Tooltip', () => {
8
- const { container } = render(<Tooltip>my tip</Tooltip>);
9
- expect(container.firstChild).toHaveClass('tooltip');
10
- expect(container.firstChild).toHaveClass('tooltipped-e');
11
- expect(container.firstChild).toHaveTextContent('my tip');
8
+ const { getByTestId } = render(<Tooltip>my tip</Tooltip>);
9
+ expect(getByTestId('tooltip')).toHaveClass('tooltip');
10
+ expect(getByTestId('tooltip')).toHaveClass('tooltipped-e');
11
+ expect(getByTestId('tooltip')).toHaveTextContent('my tip');
12
12
  });
13
13
 
14
14
  it('renders a Tooltip direction south', () => {
@@ -27,11 +27,7 @@ class Form extends React.Component {
27
27
  })}
28
28
  />
29
29
  {renderFormError()}
30
- <Button
31
- data-testid="submit"
32
- onClick={this.submit}
33
- label="Submit"
34
- />
30
+ <Button testId="submit" onClick={this.submit} label="Submit" />
35
31
  </form>
36
32
  </>
37
33
  );
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M77.773 33.1H22.227a10.445 10.445 0 1 1 0-20.89h55.546a10.445 10.445 0 1 1 0 20.89ZM22.227 15.213a7.445 7.445 0 1 0 0 14.89h55.546a7.445 7.445 0 1 0 0-14.89Zm56.31 75.574H21.463a9.692 9.692 0 0 1-9.682-9.681V49.253a9.692 9.692 0 0 1 9.682-9.68h57.074a9.692 9.692 0 0 1 9.682 9.68v31.853a9.692 9.692 0 0 1-9.682 9.681ZM21.463 42.573a6.688 6.688 0 0 0-6.682 6.68v31.853a6.689 6.689 0 0 0 6.682 6.681h57.074a6.689 6.689 0 0 0 6.682-6.681V49.253a6.688 6.688 0 0 0-6.682-6.68Z"/><path d="M42.878 24.453H21.307a1.5 1.5 0 0 1 0-3h21.571a1.5 1.5 0 0 1 0 3ZM64.448 54H21.307a1.5 1.5 0 1 1 0-3h43.141a1.5 1.5 0 0 1 0 3Zm11.037 11.68H21.307a1.5 1.5 0 0 1 0-3h54.178a1.5 1.5 0 0 1 0 3ZM50 77.431H21.307a1.5 1.5 0 0 1 0-3H50a1.5 1.5 0 0 1 0 3Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M68.747 37.178h-7.3V25.821a10.4 10.4 0 0 0-10.394-10.393H25.367a10.4 10.4 0 0 0-10.393 10.393v58.751h70.052V53.457a16.3 16.3 0 0 0-16.279-16.279ZM17.974 81.572V25.821a7.4 7.4 0 0 1 7.393-7.393h25.686a7.4 7.4 0 0 1 7.393 7.393v11.385a1.532 1.532 0 0 0-.282-.028H36.62a1.5 1.5 0 0 0 0 3h21.544a1.45 1.45 0 0 0 .282-.029V51.28a1.45 1.45 0 0 0-.282-.029H36.62a1.5 1.5 0 0 0 0 3h21.544a1.532 1.532 0 0 0 .282-.028v11.13a1.532 1.532 0 0 0-.282-.028H36.62a1.5 1.5 0 1 0 0 3h21.544a1.45 1.45 0 0 0 .282-.029v13.276Zm43.472 0V40.178h7.3a13.29 13.29 0 0 1 13.082 11.073H71.3a1.5 1.5 0 0 0 0 3h10.726v11.074H71.3a1.5 1.5 0 0 0 0 3h10.726v13.247Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M82.454 23.158a11.27 11.27 0 1 0-12.77 11.157v6.6a8.777 8.777 0 0 1-8.767 8.767H39.083a11.725 11.725 0 0 0-8.767 3.946V34.315a11.27 11.27 0 1 0-3 0v31.37a11.269 11.269 0 1 0 3 0v-4.234a8.777 8.777 0 0 1 8.767-8.767h21.834a11.779 11.779 0 0 0 11.767-11.767v-6.6a11.277 11.277 0 0 0 9.77-11.159Zm-61.908 0a8.27 8.27 0 1 1 8.27 8.269 8.279 8.279 0 0 1-8.27-8.269Zm16.539 53.684a8.27 8.27 0 1 1-8.269-8.269 8.278 8.278 0 0 1 8.269 8.269Zm34.1-45.415a8.269 8.269 0 1 1 8.27-8.269 8.278 8.278 0 0 1-8.271 8.269Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 11.568A38.432 38.432 0 1 0 88.432 50 38.476 38.476 0 0 0 50 11.568Zm34.9 32.373C79.4 39.4 67.541 35.777 50 35.777a1.423 1.423 0 0 0-.208.021 13.279 13.279 0 0 0-8.9-10.128c2.439-6.979 5.8-11.1 9.107-11.1A35.483 35.483 0 0 1 84.9 43.941ZM36.784 48.5a10.246 10.246 0 1 1 10.245-10.245A10.257 10.257 0 0 1 36.784 48.5Zm6.3-33.249a29.678 29.678 0 0 0-5.147 9.817 13.23 13.23 0 0 0-1.149-.059 13.26 13.26 0 0 0-13.249 13.246c0 .433.024.859.065 1.282a1.478 1.478 0 0 0-.207.048 27.537 27.537 0 0 0-8.282 4.255A35.522 35.522 0 0 1 43.08 15.251ZM14.568 50c0-2.611 3.613-5.42 9.67-7.529A13.28 13.28 0 0 0 34.3 51.258c.188 15 3.728 27.578 8.9 33.511A35.487 35.487 0 0 1 14.568 50ZM50 85.432c-6 0-12.4-13.582-12.7-33.958A13.243 13.243 0 0 0 50 38.777c20.879 0 35.429 5.915 35.429 11.223A35.472 35.472 0 0 1 50 85.432Z"/><circle cx="36.784" cy="38.255" r="7.311"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="m45.2 32.468-6.1 5.207a11.859 11.859 0 0 0-4.475 9.355q0 3.338 3.986 7.729t3.989 8.055q0 11.96-11.8 11.959-12.612 0-12.611-14.4 0-21.558 21.56-35.146Zm36.61 0-6.1 5.207a11.855 11.855 0 0 0-4.475 9.355q0 3.338 3.986 7.729t3.988 8.055q0 11.96-11.8 11.959-12.611 0-12.61-14.4 0-21.558 21.56-35.146Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M89.409 19.172a6.953 6.953 0 0 0-5.87 3.238 1.5 1.5 0 0 0-.362-.049 15.089 15.089 0 0 1-10.74-4.449l-2.83-2.829a10.88 10.88 0 0 0-7.743-3.208H42.11a4.649 4.649 0 0 0-3.037 8.186A31.864 31.864 0 0 0 19.356 58.7h-2.709a6.96 6.96 0 0 0-6.056-3.543H4.63v25.671h5.961a6.953 6.953 0 0 0 5.87-3.238 1.5 1.5 0 0 0 .362.049 15.089 15.089 0 0 1 10.74 4.449l2.83 2.829a10.88 10.88 0 0 0 7.743 3.208H57.89a4.649 4.649 0 0 0 3.016-8.2A31.862 31.862 0 0 0 80.651 41.3h2.7a6.96 6.96 0 0 0 6.056 3.543h5.963V19.172ZM14.55 73.869a3.963 3.963 0 0 1-3.959 3.959H7.63V58.155h2.961a3.963 3.963 0 0 1 3.959 3.959ZM74.98 38.3a8.433 8.433 0 0 1-6-2.486l-11.665-11.66a1.76 1.76 0 0 1 0-2.485 1.8 1.8 0 0 1 2.483 0l6.976 6.976a1.5 1.5 0 0 0 2.126-2.122l-6.975-6.975a4.757 4.757 0 0 0-6.727 6.727l11.659 11.663A11.414 11.414 0 0 0 74.98 41.3h2.52a28.8 28.8 0 0 1-25.748 37.487h-2.719a1.5 1.5 0 1 0 0 3h.576a1.484 1.484 0 0 0 .391.058c.623 0 1.24-.023 1.854-.058h6.036a1.669 1.669 0 0 1 0 3.338H38.136a7.9 7.9 0 0 1-5.622-2.325l-2.829-2.829a18.047 18.047 0 0 0-12.185-5.3 7.094 7.094 0 0 0 .05-.8V62.114c0-.141-.013-.278-.021-.416h7.491a8.433 8.433 0 0 1 6 2.486l11.665 11.662a1.76 1.76 0 0 1 0 2.485 1.8 1.8 0 0 1-2.483 0l-6.976-6.976a1.5 1.5 0 1 0-2.126 2.122l6.975 6.975a4.757 4.757 0 0 0 6.727-6.727L33.143 62.062A11.414 11.414 0 0 0 25.02 58.7h-2.513a28.8 28.8 0 0 1 25.415-37.487h3.045a1.5 1.5 0 0 0 0-3h-.495A1.5 1.5 0 0 0 50 18.13c-.734 0-1.459.034-2.181.083H42.11a1.669 1.669 0 1 1 0-3.338h19.754a7.9 7.9 0 0 1 5.622 2.325l2.829 2.829A18.047 18.047 0 0 0 82.5 25.328a7.094 7.094 0 0 0-.05.8v11.758c0 .141.013.278.021.416Zm17.39 3.543h-2.961a3.963 3.963 0 0 1-3.959-3.959V26.131a3.963 3.963 0 0 1 3.959-3.959h2.961Z"/><path d="M51.5 39.3v-3.492a1.5 1.5 0 1 0-3 0V39.3h-.521a5.783 5.783 0 0 0-5.779 5.772 6.349 6.349 0 0 0 6.3 6.342v6.693h-1.4a1.9 1.9 0 0 1-1.9-1.893 1.5 1.5 0 0 0-3 0 4.9 4.9 0 0 0 4.9 4.893h1.4v3.06a1.5 1.5 0 0 0 3 0v-3.06h.521a5.782 5.782 0 0 0 5.779-5.776v-.57a6.35 6.35 0 0 0-6.3-6.342V42.3h1.4a1.9 1.9 0 0 1 1.9 1.889 1.5 1.5 0 0 0 3 0 4.9 4.9 0 0 0-4.9-4.889Zm3.3 15.466v.57a2.779 2.779 0 0 1-2.776 2.776H51.5v-6.691a3.346 3.346 0 0 1 3.3 3.34Zm-6.3-6.349a3.346 3.346 0 0 1-3.3-3.34 2.78 2.78 0 0 1 2.779-2.777h.521Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M81.374 72.155a38.3 38.3 0 0 0 0-44.31 1.428 1.428 0 0 0-.1-.143 38.432 38.432 0 1 0 0 44.6 1.428 1.428 0 0 0 .1-.147ZM14.606 51.5h13.823a62.657 62.657 0 0 0 3 18.374H20.682A35.212 35.212 0 0 1 14.606 51.5Zm6.076-21.374h10.746a62.657 62.657 0 0 0-3 18.374H14.606a35.212 35.212 0 0 1 6.076-18.374ZM85.394 48.5H71.571a62.657 62.657 0 0 0-3-18.374h10.747A35.212 35.212 0 0 1 85.394 48.5Zm-16.823 0H51.5V30.126h13.883A59.148 59.148 0 0 1 68.571 48.5ZM51.5 27.126V14.693c5.071.776 9.573 5.442 12.682 12.433Zm-3-12.433v12.433H35.818c3.109-6.991 7.611-11.657 12.682-12.433Zm0 15.433V48.5H31.429a59.148 59.148 0 0 1 3.188-18.374ZM31.429 51.5H48.5v18.374H34.617A59.148 59.148 0 0 1 31.429 51.5ZM48.5 72.874v12.433c-5.071-.776-9.573-5.442-12.682-12.433Zm3 12.433V72.874h12.682c-3.109 6.991-7.611 11.657-12.682 12.433Zm0-15.433V51.5h17.071a59.148 59.148 0 0 1-3.188 18.374ZM71.571 51.5h13.823a35.212 35.212 0 0 1-6.076 18.374H68.572A62.657 62.657 0 0 0 71.571 51.5Zm5.458-24.374h-9.57a31.78 31.78 0 0 0-7.12-11.015 35.527 35.527 0 0 1 16.69 11.015ZM39.661 16.111a31.78 31.78 0 0 0-7.12 11.015h-9.57a35.527 35.527 0 0 1 16.69-11.015Zm-16.69 56.763h9.57a31.78 31.78 0 0 0 7.12 11.015 35.527 35.527 0 0 1-16.69-11.015Zm37.368 11.015a31.78 31.78 0 0 0 7.12-11.015h9.57a35.527 35.527 0 0 1-16.69 11.015Z"/></svg>
@@ -5,6 +5,13 @@
5
5
  flex-shrink 0
6
6
  &.active
7
7
  cursor default
8
+ &:disabled
9
+ &:not(.btn--group)
10
+ cursor default
11
+ opacity .3
12
+ box-shadow none
13
+ &:hover
14
+ opacity .3
8
15
  &--icon
9
16
  &:not(.btn--link):not(.btn--link-primary):not(.btn--link-info):not(.btn--link-flex):not(.btn--link-flex-info):not(.btn--group):not(.btn--sidebar-link)
10
17
  sq()
@@ -27,14 +34,15 @@
27
34
  &.btn--primary
28
35
  &:disabled
29
36
  &:hover
30
- color $primary
31
37
  background-color $primary
32
38
  .icon
33
39
  fill $light
40
+ &.btn--loading
41
+ &:hover
42
+ background-color $primary
34
43
  &.btn--secondary
35
44
  &:disabled
36
45
  &:hover
37
- color $secondary
38
46
  background-color transparent
39
47
  border-color $inputBorderColor
40
48
  .icon
@@ -42,7 +50,6 @@
42
50
  &.btn--important
43
51
  &:disabled
44
52
  &:hover
45
- color $light
46
53
  background-color $error
47
54
  .icon
48
55
  fill $light
@@ -73,22 +80,18 @@
73
80
  flex-shrink 0
74
81
  .icon
75
82
  flex-shrink 0
76
- &:disabled
77
- cursor default
78
- opacity .3
79
- box-shadow none
80
- &:hover
81
- opacity .3
82
83
  &--primary
83
84
  background-color $primary
84
- &:disabled
85
- &:hover
86
- background-color $primary
85
+ &:not(.btn--group):not(.btn--switch)
86
+ &:disabled
87
+ &:hover
88
+ background-color $primary
87
89
  &--important
88
90
  background-color $error
89
- &:disabled
90
- &:hover
91
- background-color $error
91
+ &:not(.btn--group):not(.btn--switch)
92
+ &:disabled
93
+ &:hover
94
+ background-color $error
92
95
  &--secondary
93
96
  btn()
94
97
  color $secondary
@@ -106,23 +109,27 @@
106
109
  flex-shrink 0
107
110
  &:hover
108
111
  border-color $success
109
- &.btn--loading
110
- background-color transparent
111
- color $secondary
112
- cursor default
113
- border-color $inputBorderColor
114
- .icon
115
- fill $secondary
112
+ &.btn--loading
113
+ &:not(.btn--group):not(.btn--switch)
114
+ &:hover
115
+ background-color transparent
116
+ color $secondary
117
+ cursor default
118
+ border-color $inputBorderColor
119
+ .icon
120
+ fill $secondary
116
121
  &:disabled
117
122
  opacity .4
118
123
  cursor default
119
- &:hover
120
- opacity .4
121
- background-color transparent
122
- color $secondary
123
- border-color $inputBorderColor
124
- .icon
125
- fill $secondary
124
+ &:not(.btn--group):not(.btn--switch)
125
+ &:disabled
126
+ &:hover
127
+ opacity .4
128
+ background-color transparent
129
+ color $secondary
130
+ border-color $inputBorderColor
131
+ .icon
132
+ fill $secondary
126
133
  &--transparent
127
134
  btn()
128
135
  background-color transparent
@@ -339,8 +346,8 @@
339
346
  &:not(.btn--icon):not(.btn--mini):not(.btn--small):not(.btn--large):not(.btn--sidebar-link)
340
347
  padding-left $padding - .4
341
348
  &:hover
342
- &.btn--important
343
- background-color $error
349
+ &.btn--important
350
+ background-color $error
344
351
  .icon
345
352
  sq(2.2)
346
353
  &--switch
@@ -378,6 +385,34 @@
378
385
  flex-shrink 0
379
386
  .icon
380
387
  flex-shrink 0
388
+ &:hover
389
+ color $secondary
390
+ background-color $primary10
391
+ &.active
392
+ color $light
393
+ border-color $secondary
394
+ background-color $secondary
395
+ .icon
396
+ fill $light
397
+ &:hover
398
+ background-color $secondary
399
+ &:disabled
400
+ background-color $secondary60
401
+ border-color $secondary-medium15
402
+ color $light70
403
+ .icon
404
+ fill $light70
405
+ &:disabled:not(.active)
406
+ color $secondary30
407
+ cursor default
408
+ .icon
409
+ fill $secondary30
410
+ &:hover
411
+ border-color $inputBorderColor
412
+ color $secondary30
413
+ background-color transparent
414
+ .icon
415
+ fill $secondary30
381
416
  &-container
382
417
  flexMiddle()
383
418
  .btn
@@ -390,17 +425,6 @@
390
425
  &:last-child
391
426
  border-radius 0 $borderRadius $borderRadius 0
392
427
  border-width .1rem
393
- &:hover
394
- color $secondary
395
- background-color $primary10
396
- &.active
397
- color $light
398
- border-color $secondary
399
- background-color $secondary
400
- .icon
401
- fill $light
402
- &:hover
403
- background-color $secondary
404
428
  &--light
405
429
  .btn
406
430
  &.active
@@ -422,6 +446,8 @@
422
446
  .btn
423
447
  border-radius 0 $borderRadius $borderRadius 0
424
448
  border-width .1rem .1rem .1rem 0
449
+
450
+
425
451
  &--tab
426
452
  fullw()
427
453
  display inline-flex
@@ -487,7 +513,7 @@
487
513
  &--pills
488
514
  br()
489
515
  flexBtn()
490
- button()
516
+ buttonFont()
491
517
  focus()
492
518
  trans()
493
519
  fullw()
@@ -62,7 +62,7 @@ btn()
62
62
  br()
63
63
  flexBtn()
64
64
  trans()
65
- button()
65
+ buttonFont()
66
66
  hover()
67
67
  focus()
68
68
  white-space nowrap
@@ -73,7 +73,7 @@ flexBtn()
73
73
  align-items center
74
74
  justify-content flex-start
75
75
 
76
- button()
76
+ buttonFont()
77
77
  height $buttonHeight
78
78
  font-size $buttonFontSize
79
79
  line-height $buttonLineHeight
@@ -104,7 +104,6 @@
104
104
  font-size $inputFontSizeSmall !important
105
105
  padding 0 0 0 1rem !important
106
106
  line-height 1.2
107
- color $light
108
107
  &__option
109
108
  .flag
110
109
  margin 0 1rem 0 0
@@ -0,0 +1,25 @@
1
+ // Common styles - Don't change order
2
+ @import "./commons/reset.styl"
3
+
4
+ // Specicif style - Do not change order
5
+ // @import "./next-website/mixins.styl"
6
+ // @import "./next-website/fonts.styl"
7
+ // @import "./next-website/variables.styl"
8
+ // @import "./next-website/colors.styl"
9
+
10
+ @import "./commons/__all.styl"
11
+ @import "./commons/flags.styl"
12
+
13
+ // @import "./next-website/button.styl"
14
+ // @import "./next-website/input.styl"
15
+ // @import "./next-website/select.styl"
16
+ // @import "./next-website/tab.sty l"
17
+
18
+ //demos
19
+ // @import "./next-website/MerchantDemo.styl"
20
+ // @import "./next-website/skeletonDemo.styl"
21
+
22
+ // @import "./next-website/style.styl"
23
+
24
+ // Style of all components
25
+ @import "../components/**/*.styl"