@semcore/button 3.3.5 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.0.0] - 2022-05-17
6
+
7
+ ### BREAK
8
+
9
+ - Updated styles according to the library redesign policy.
10
+ - Remove value "xl" and "s" for "size".
11
+
12
+ ## [3.3.7] - 2022-03-14
13
+
14
+ ### Changed
15
+
16
+ - Version patch update due to children dependencies update (`@semcore/utils` [3.31.2 ~> 3.31.2]).
17
+
18
+ ## [3.3.6] - 2022-03-04
19
+
20
+ ### Changed
21
+
22
+ - Version patch update due to children dependencies update (`@semcore/spin` [3.3.0 ~> 3.4.0]).
23
+
5
24
  ## [3.3.5] - 2022-02-24
6
25
 
7
26
  ### Added
package/lib/cjs/Button.js CHANGED
@@ -52,38 +52,36 @@ var style = (
52
52
  /*__reshadow_css_start__*/
53
53
  _core.sstyled.insert(
54
54
  /*__inner_css_start__*/
55
- ".___SButton_1gvrk_gg_{position:relative;display:inline-block;align-items:center;justify-content:center;padding:0;margin:0;white-space:nowrap;font-family:inherit;font-weight:400;line-height:normal;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;color:#666666;outline:0;box-shadow:none;cursor:pointer;box-sizing:border-box;overflow:visible;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.___SButton_1gvrk_gg_::-moz-focus-inner{padding:0;border:none}.___SButton_1gvrk_gg_:active,.___SButton_1gvrk_gg_:focus,.___SButton_1gvrk_gg_:hover{outline:0;text-decoration:none}.___SButton_1gvrk_gg_.__disabled_1gvrk_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SButton_1gvrk_gg_.__keyboardFocused_1gvrk_gg_{box-shadow:0 0 0 3px rgba(43, 148, 225, 0.3);z-index:1}.___SButton_1gvrk_gg_._size_s_1gvrk_gg_{height:18px;min-width:18px;border-radius:2px;font-size:10px}.___SButton_1gvrk_gg_._size_m_1gvrk_gg_{height:26px;min-width:26px;border-radius:3px;font-size:12px}.___SButton_1gvrk_gg_._size_l_1gvrk_gg_{height:32px;min-width:32px;border-radius:4px;font-size:14px}.___SButton_1gvrk_gg_._size_xl_1gvrk_gg_{height:42px;min-width:42px;border-radius:5px;font-size:16px}.___SButton_1gvrk_gg_._theme_primary-info_1gvrk_gg_{color:#fff;background-color:#2b94e1}.___SButton_1gvrk_gg_._theme_primary-info_1gvrk_gg_:hover{background-color:#0071bc}.___SButton_1gvrk_gg_._theme_primary-info_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_primary-info_1gvrk_gg_.__active_1gvrk_gg_{background-color:#006bb3}.___SButton_1gvrk_gg_._theme_primary-success_1gvrk_gg_{color:#fff;background-color:#4fae33}.___SButton_1gvrk_gg_._theme_primary-success_1gvrk_gg_:hover{background-color:#1d9c00}.___SButton_1gvrk_gg_._theme_primary-success_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_primary-success_1gvrk_gg_.__active_1gvrk_gg_{background-color:#1c9400}.___SButton_1gvrk_gg_._theme_primary-warning_1gvrk_gg_{background-color:#ff7f00;color:#fff}.___SButton_1gvrk_gg_._theme_primary-warning_1gvrk_gg_:hover{background-color:#cc6600}.___SButton_1gvrk_gg_._theme_primary-warning_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_primary-warning_1gvrk_gg_.__active_1gvrk_gg_{background-color:#c26100}.___SButton_1gvrk_gg_._theme_primary-danger_1gvrk_gg_{background-color:#ed2d2d;color:#fff}.___SButton_1gvrk_gg_._theme_primary-danger_1gvrk_gg_:hover{background-color:#d00000}.___SButton_1gvrk_gg_._theme_primary-danger_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_primary-danger_1gvrk_gg_.__active_1gvrk_gg_{background-color:#c60000}.___SButton_1gvrk_gg_._theme_primary-invert_1gvrk_gg_{background-color:#fff;color:#333333}.___SButton_1gvrk_gg_._theme_primary-invert_1gvrk_gg_:hover{background-color:#eeeeee}.___SButton_1gvrk_gg_._theme_primary-invert_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_primary-invert_1gvrk_gg_.__active_1gvrk_gg_{background-color:#e4e1e1}.___SButton_1gvrk_gg_._theme_secondary-muted_1gvrk_gg_{color:#757575;border-color:#a6b0b3;background-color:rgba(166,176,179,.1)}.___SButton_1gvrk_gg_._theme_secondary-muted_1gvrk_gg_:hover{background-color:rgba(166,176,179,.2)}.___SButton_1gvrk_gg_._theme_secondary-muted_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_secondary-muted_1gvrk_gg_.__active_1gvrk_gg_{background-color:rgba(166,176,179,.3)}.___SButton_1gvrk_gg_._theme_secondary-info_1gvrk_gg_{background-color:rgba(43,148,225,.05);color:#2b94e1;border-color:#2b94e1}.___SButton_1gvrk_gg_._theme_secondary-info_1gvrk_gg_:hover{background-color:rgba(0,113,188,.2)}.___SButton_1gvrk_gg_._theme_secondary-info_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_secondary-info_1gvrk_gg_.__active_1gvrk_gg_{background-color:rgba(0,113,188,.3)}.___SButton_1gvrk_gg_._theme_secondary-invert_1gvrk_gg_{background-color:hsla(0,0%,100%,.05);color:#fff;border-color:#fff}.___SButton_1gvrk_gg_._theme_secondary-invert_1gvrk_gg_:hover{background-color:hsla(0,0%,100%,.2)}.___SButton_1gvrk_gg_._theme_secondary-invert_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_secondary-invert_1gvrk_gg_.__active_1gvrk_gg_{background-color:hsla(0,0%,100%,.3)}.___SButton_1gvrk_gg_._theme_tertiary-info_1gvrk_gg_{color:#0071bc;background-color:transparent}.___SButton_1gvrk_gg_._theme_tertiary-info_1gvrk_gg_:hover{background-color:rgba(43,148,225,.2)}.___SButton_1gvrk_gg_._theme_tertiary-info_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_tertiary-info_1gvrk_gg_.__active_1gvrk_gg_{background-color:rgba(43,148,225,.3)}.___SButton_1gvrk_gg_._theme_tertiary-muted_1gvrk_gg_{color:#757575;background-color:transparent}.___SButton_1gvrk_gg_._theme_tertiary-muted_1gvrk_gg_:hover{background-color:rgba(166,176,179,.2)}.___SButton_1gvrk_gg_._theme_tertiary-muted_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_tertiary-muted_1gvrk_gg_.__active_1gvrk_gg_{background-color:rgba(166,176,179,.3)}.___SButton_1gvrk_gg_._theme_tertiary-invert_1gvrk_gg_{color:#fff;background-color:transparent}.___SButton_1gvrk_gg_._theme_tertiary-invert_1gvrk_gg_:hover{background-color:hsla(0,0%,100%,.2)}.___SButton_1gvrk_gg_._theme_tertiary-invert_1gvrk_gg_:active,.___SButton_1gvrk_gg_._theme_tertiary-invert_1gvrk_gg_.__active_1gvrk_gg_{background-color:hsla(0,0%,100%,.3)}.___SButton_1gvrk_gg_._neighborLocation_right_1gvrk_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_{border-radius:0;margin-left:-1px}.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_._theme_primary-danger_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_._theme_primary-info_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_._theme_primary-success_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_._theme_primary-warning_1gvrk_gg_{border-left-color:hsla(0,0%,100%,.5)}.___SButton_1gvrk_gg_._neighborLocation_both_1gvrk_gg_._theme_primary-invert_1gvrk_gg_{border-left-color:rgba(0,0,0,.5)}.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_._theme_primary-danger_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_._theme_primary-info_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_._theme_primary-success_1gvrk_gg_,.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_._theme_primary-warning_1gvrk_gg_{border-left-color:hsla(0,0%,100%,.5)}.___SButton_1gvrk_gg_._neighborLocation_left_1gvrk_gg_._theme_primary-invert_1gvrk_gg_{border-left-color:rgba(0,0,0,.5)}.___SSpin_1gvrk_gg_{position:absolute;top:0;left:0;width:100%;height:100%;display:flex}.___SInner_1gvrk_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SInner_1gvrk_gg_.__loading_1gvrk_gg_{visibility:hidden}.___SText_1gvrk_gg_{display:inline-flex;line-height:1.1}.___SText_1gvrk_gg_._size_s_1gvrk_gg_{margin-left:4px;margin-right:4px}.___SText_1gvrk_gg_._size_m_1gvrk_gg_{margin-left:8px;margin-right:8px}.___SText_1gvrk_gg_._size_l_1gvrk_gg_{margin-left:8px;margin-right:8px}.___SText_1gvrk_gg_._size_xl_1gvrk_gg_{margin-left:12px;margin-right:12px}.___SAddon_1gvrk_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_1gvrk_gg_._size_s_1gvrk_gg_:not(:only-child):first-child{margin-left:4px}.___SAddon_1gvrk_gg_._size_s_1gvrk_gg_:not(:only-child):last-child{margin-right:4px}.___SAddon_1gvrk_gg_._size_s_1gvrk_gg_:only-child{margin-left:-2px;margin-right:-2px}.___SAddon_1gvrk_gg_._size_m_1gvrk_gg_:not(:only-child):first-child{margin-left:8px}.___SAddon_1gvrk_gg_._size_m_1gvrk_gg_:not(:only-child):last-child{margin-right:8px}.___SAddon_1gvrk_gg_._size_m_1gvrk_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SAddon_1gvrk_gg_._size_l_1gvrk_gg_:not(:only-child):first-child{margin-left:8px}.___SAddon_1gvrk_gg_._size_l_1gvrk_gg_:not(:only-child):last-child{margin-right:8px}.___SAddon_1gvrk_gg_._size_l_1gvrk_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SAddon_1gvrk_gg_._size_xl_1gvrk_gg_:not(:only-child):first-child{margin-left:12px}.___SAddon_1gvrk_gg_._size_xl_1gvrk_gg_:not(:only-child):last-child{margin-right:12px}.___SAddon_1gvrk_gg_._size_xl_1gvrk_gg_:only-child{margin-left:-6px;margin-right:-6px}"
55
+ ".___SButton_rdvkw_gg_{position:relative;display:inline-block;align-items:center;justify-content:center;padding:0;margin:0;white-space:nowrap;font-family:Inter,sans-serif;line-height:normal;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;outline:0;box-shadow:none;cursor:pointer;box-sizing:border-box;overflow:visible;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-weight:500;color:#6c6e79}.___SButton_rdvkw_gg_::-moz-focus-inner{padding:0;border:none}.___SButton_rdvkw_gg_:active,.___SButton_rdvkw_gg_:focus,.___SButton_rdvkw_gg_:hover{outline:0;text-decoration:none}.___SButton_rdvkw_gg_.__disabled_rdvkw_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SButton_rdvkw_gg_.__keyboardFocused_rdvkw_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2);z-index:1}.___SButton_rdvkw_gg_._size_m_rdvkw_gg_{height:26px;min-width:26px;border-radius:6px;font-size:14px}.___SButton_rdvkw_gg_._size_l_rdvkw_gg_{height:38px;min-width:38px;border-radius:6px;font-size:16px}.___SButton_rdvkw_gg_._theme_primary-info_rdvkw_gg_{color:#ffffff;background-color:#008ff8}.___SButton_rdvkw_gg_._theme_primary-info_rdvkw_gg_:hover{background-color:#006dca}.___SButton_rdvkw_gg_._theme_primary-info_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_primary-info_rdvkw_gg_.__active_rdvkw_gg_{background-color:#044792}.___SButton_rdvkw_gg_._theme_primary-success_rdvkw_gg_{color:#ffffff;background-color:#009f81}.___SButton_rdvkw_gg_._theme_primary-success_rdvkw_gg_:hover{background-color:#007c65}.___SButton_rdvkw_gg_._theme_primary-success_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_primary-success_rdvkw_gg_.__active_rdvkw_gg_{background-color:#055345}.___SButton_rdvkw_gg_._theme_primary-warning_rdvkw_gg_{background-color:#ff622d;color:#ffffff}.___SButton_rdvkw_gg_._theme_primary-warning_rdvkw_gg_:hover{background-color:#c33909}.___SButton_rdvkw_gg_._theme_primary-warning_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_primary-warning_rdvkw_gg_.__active_rdvkw_gg_{background-color:#be3404}.___SButton_rdvkw_gg_._theme_primary-danger_rdvkw_gg_{background-color:#ff4953;color:#ffffff}.___SButton_rdvkw_gg_._theme_primary-danger_rdvkw_gg_:hover{background-color:#d1002f}.___SButton_rdvkw_gg_._theme_primary-danger_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_primary-danger_rdvkw_gg_.__active_rdvkw_gg_{background-color:#8e0016}.___SButton_rdvkw_gg_._theme_primary-invert_rdvkw_gg_{background-color:#fff;color:#191b23}.___SButton_rdvkw_gg_._theme_primary-invert_rdvkw_gg_:hover{background-color:#f4f5f9}.___SButton_rdvkw_gg_._theme_primary-invert_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_primary-invert_rdvkw_gg_.__active_rdvkw_gg_{background-color:#e0e1e9}.___SButton_rdvkw_gg_._theme_secondary-muted_rdvkw_gg_{color:#6c6e79;border-color:#c4c7cf;background-color:rgba(138,142,155,.1)}.___SButton_rdvkw_gg_._theme_secondary-muted_rdvkw_gg_:hover{background-color:rgba(138,142,155,.2);color:#191b23}.___SButton_rdvkw_gg_._theme_secondary-muted_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_secondary-muted_rdvkw_gg_.__active_rdvkw_gg_{background-color:rgba(138,142,155,.3);color:#191b23}.___SButton_rdvkw_gg_._theme_secondary-info_rdvkw_gg_{background-color:rgba(0,143,248,.05);color:#008ff8;border-color:#008ff8}.___SButton_rdvkw_gg_._theme_secondary-info_rdvkw_gg_:hover{background-color:rgba(0,109,202,.2)}.___SButton_rdvkw_gg_._theme_secondary-info_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_secondary-info_rdvkw_gg_.__active_rdvkw_gg_{background-color:rgba(0,109,202,.3)}.___SButton_rdvkw_gg_._theme_secondary-invert_rdvkw_gg_{background-color:hsla(0,0%,100%,.05);color:#fff;border-color:#fff}.___SButton_rdvkw_gg_._theme_secondary-invert_rdvkw_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___SButton_rdvkw_gg_._theme_secondary-invert_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_secondary-invert_rdvkw_gg_.__active_rdvkw_gg_{background-color:hsla(0,0%,100%,.3)}.___SButton_rdvkw_gg_._theme_tertiary-info_rdvkw_gg_{color:#006dca;background-color:transparent}.___SButton_rdvkw_gg_._theme_tertiary-info_rdvkw_gg_:hover{background-color:rgba(0,143,248,.2)}.___SButton_rdvkw_gg_._theme_tertiary-info_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_tertiary-info_rdvkw_gg_.__active_rdvkw_gg_{background-color:rgba(0,143,248,.3)}.___SButton_rdvkw_gg_._theme_tertiary-muted_rdvkw_gg_{color:#6c6e79;background-color:transparent}.___SButton_rdvkw_gg_._theme_tertiary-muted_rdvkw_gg_:hover{background-color:rgba(138,142,155,.2);color:#191b23}.___SButton_rdvkw_gg_._theme_tertiary-muted_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_tertiary-muted_rdvkw_gg_.__active_rdvkw_gg_{background-color:rgba(138,142,155,.3);color:#191b23}.___SButton_rdvkw_gg_._theme_tertiary-invert_rdvkw_gg_{color:#fff;background-color:transparent}.___SButton_rdvkw_gg_._theme_tertiary-invert_rdvkw_gg_:hover{background-color:hsla(0,0%,100%,.1)}.___SButton_rdvkw_gg_._theme_tertiary-invert_rdvkw_gg_:active,.___SButton_rdvkw_gg_._theme_tertiary-invert_rdvkw_gg_.__active_rdvkw_gg_{background-color:hsla(0,0%,100%,.3)}.___SButton_rdvkw_gg_._neighborLocation_right_rdvkw_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_{border-radius:0;margin-left:-1px}.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_._theme_primary-danger_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_._theme_primary-info_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_._theme_primary-success_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_._theme_primary-warning_rdvkw_gg_{border-left-color:hsla(0,0%,100%,.5)}.___SButton_rdvkw_gg_._neighborLocation_both_rdvkw_gg_._theme_primary-invert_rdvkw_gg_{border-left-color:rgba(0,0,0,.5)}.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_._theme_primary-danger_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_._theme_primary-info_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_._theme_primary-success_rdvkw_gg_,.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_._theme_primary-warning_rdvkw_gg_{border-left-color:hsla(0,0%,100%,.5)}.___SButton_rdvkw_gg_._neighborLocation_left_rdvkw_gg_._theme_primary-invert_rdvkw_gg_{border-left-color:rgba(0,0,0,.5)}.___SSpin_rdvkw_gg_{position:absolute;top:0;left:0;width:100%;height:100%;display:flex}.___SInner_rdvkw_gg_{display:inline-flex;align-items:center;justify-content:center;height:100%;width:100%}.___SInner_rdvkw_gg_.__loading_rdvkw_gg_{visibility:hidden}.___SText_rdvkw_gg_{display:inline-flex}.___SText_rdvkw_gg_._size_m_rdvkw_gg_{margin-left:8px;margin-right:8px;line-height:1.42}.___SText_rdvkw_gg_._size_l_rdvkw_gg_{margin-left:12px;margin-right:12px;line-height:1.5}.___SAddon_rdvkw_gg_{display:inline-flex;align-items:center;justify-content:center}.___SAddon_rdvkw_gg_._size_m_rdvkw_gg_:not(:only-child):first-child{margin-left:8px}.___SAddon_rdvkw_gg_._size_m_rdvkw_gg_:not(:only-child):last-child{margin-right:8px}.___SAddon_rdvkw_gg_._size_m_rdvkw_gg_:only-child{margin-left:-4px;margin-right:-4px}.___SAddon_rdvkw_gg_._size_l_rdvkw_gg_:not(:only-child):first-child{margin-left:8px}.___SAddon_rdvkw_gg_._size_l_rdvkw_gg_:not(:only-child):last-child{margin-right:8px}.___SAddon_rdvkw_gg_._size_l_rdvkw_gg_:only-child{margin-left:-4px;margin-right:-4px}"
56
56
  /*__inner_css_end__*/
57
- , "1o9hhkh_gg_")
57
+ , "akdu6r_gg_")
58
58
  /*__reshadow_css_end__*/
59
59
  , {
60
- "__SButton": "___SButton_1gvrk_gg_",
61
- "_disabled": "__disabled_1gvrk_gg_",
62
- "_keyboardFocused": "__keyboardFocused_1gvrk_gg_",
63
- "_size_s": "_size_s_1gvrk_gg_",
64
- "_size_m": "_size_m_1gvrk_gg_",
65
- "_size_l": "_size_l_1gvrk_gg_",
66
- "_size_xl": "_size_xl_1gvrk_gg_",
67
- "_theme_primary-info": "_theme_primary-info_1gvrk_gg_",
68
- "_active": "__active_1gvrk_gg_",
69
- "_theme_primary-success": "_theme_primary-success_1gvrk_gg_",
70
- "_theme_primary-warning": "_theme_primary-warning_1gvrk_gg_",
71
- "_theme_primary-danger": "_theme_primary-danger_1gvrk_gg_",
72
- "_theme_primary-invert": "_theme_primary-invert_1gvrk_gg_",
73
- "_theme_secondary-muted": "_theme_secondary-muted_1gvrk_gg_",
74
- "_theme_secondary-info": "_theme_secondary-info_1gvrk_gg_",
75
- "_theme_secondary-invert": "_theme_secondary-invert_1gvrk_gg_",
76
- "_theme_tertiary-info": "_theme_tertiary-info_1gvrk_gg_",
77
- "_theme_tertiary-muted": "_theme_tertiary-muted_1gvrk_gg_",
78
- "_theme_tertiary-invert": "_theme_tertiary-invert_1gvrk_gg_",
79
- "_neighborLocation_right": "_neighborLocation_right_1gvrk_gg_",
80
- "_neighborLocation_both": "_neighborLocation_both_1gvrk_gg_",
81
- "_neighborLocation_left": "_neighborLocation_left_1gvrk_gg_",
82
- "__SSpin": "___SSpin_1gvrk_gg_",
83
- "__SInner": "___SInner_1gvrk_gg_",
84
- "_loading": "__loading_1gvrk_gg_",
85
- "__SText": "___SText_1gvrk_gg_",
86
- "__SAddon": "___SAddon_1gvrk_gg_"
60
+ "__SButton": "___SButton_rdvkw_gg_",
61
+ "_disabled": "__disabled_rdvkw_gg_",
62
+ "_keyboardFocused": "__keyboardFocused_rdvkw_gg_",
63
+ "_size_m": "_size_m_rdvkw_gg_",
64
+ "_size_l": "_size_l_rdvkw_gg_",
65
+ "_theme_primary-info": "_theme_primary-info_rdvkw_gg_",
66
+ "_active": "__active_rdvkw_gg_",
67
+ "_theme_primary-success": "_theme_primary-success_rdvkw_gg_",
68
+ "_theme_primary-warning": "_theme_primary-warning_rdvkw_gg_",
69
+ "_theme_primary-danger": "_theme_primary-danger_rdvkw_gg_",
70
+ "_theme_primary-invert": "_theme_primary-invert_rdvkw_gg_",
71
+ "_theme_secondary-muted": "_theme_secondary-muted_rdvkw_gg_",
72
+ "_theme_secondary-info": "_theme_secondary-info_rdvkw_gg_",
73
+ "_theme_secondary-invert": "_theme_secondary-invert_rdvkw_gg_",
74
+ "_theme_tertiary-info": "_theme_tertiary-info_rdvkw_gg_",
75
+ "_theme_tertiary-muted": "_theme_tertiary-muted_rdvkw_gg_",
76
+ "_theme_tertiary-invert": "_theme_tertiary-invert_rdvkw_gg_",
77
+ "_neighborLocation_right": "_neighborLocation_right_rdvkw_gg_",
78
+ "_neighborLocation_both": "_neighborLocation_both_rdvkw_gg_",
79
+ "_neighborLocation_left": "_neighborLocation_left_rdvkw_gg_",
80
+ "__SSpin": "___SSpin_rdvkw_gg_",
81
+ "__SInner": "___SInner_rdvkw_gg_",
82
+ "_loading": "__loading_rdvkw_gg_",
83
+ "__SText": "___SText_rdvkw_gg_",
84
+ "__SAddon": "___SAddon_rdvkw_gg_"
87
85
  });
88
86
  var MAP_USE_DEFAULT_THEME = {
89
87
  primary: 'info',
@@ -121,7 +119,7 @@ var RootButton = /*#__PURE__*/function (_Component) {
121
119
  }, {
122
120
  key: "render",
123
121
  value: function render() {
124
- var _ref = this ? this.asProps : arguments[0],
122
+ var _ref = this.asProps,
125
123
  _ref4;
126
124
 
127
125
  var SButton = _flexBox.Box;
@@ -173,7 +171,7 @@ var RootButton = /*#__PURE__*/function (_Component) {
173
171
  });
174
172
 
175
173
  function Text(props) {
176
- var _ref2 = this ? this.asProps : arguments[0],
174
+ var _ref2 = arguments[0],
177
175
  _ref5;
178
176
 
179
177
  var SText = _flexBox.Box;
@@ -183,7 +181,7 @@ function Text(props) {
183
181
  }
184
182
 
185
183
  function Addon(props) {
186
- var _ref3 = this ? this.asProps : arguments[0],
184
+ var _ref3 = arguments[0],
187
185
  _ref6;
188
186
 
189
187
  var SAddon = _flexBox.Box;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Button.js"],"names":["MAP_USE_DEFAULT_THEME","primary","secondary","tertiary","RootButton","size","asProps","SButton","Box","SInner","SSpin","Children","styles","use","theme","loading","disabled","addonLeft","addonRight","useTheme","Button","Text","Addon","Component","style","props","SText","SAddon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAAMA,qBAAqB,GAAG;AACnCC,EAAAA,OAAO,EAAE,MAD0B;AAEnCC,EAA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nB,QAAH,GAAsC,IADlD,EAEG,mCAAkBN,QAAlB,EAA4BS,MAAM,CAACC,IAAnC,EAAyCD,MAAM,CAACE,KAAhD,CAFH,EAGGJ,UAAU,gBAAG,gCAAC,MAAD,CAAQ,KAAR;AAAc,QAAA,GAAG,EAAEA;AAAnB,QAAH,GAAuC,IAHpD,CADF,EAMGH,OAAO,iBACN,gCAAC,KAAD;AAAA,eAAW;AAAX,uBACE,gCAAC,sBAAD;AAAA;AAAA,gBAA2BV,IAA3B;AAAA,iBAAwCc;AAAxC,SADF,CAPJ,CADF;AAcD;;;EAtDsBI,e;;iCAAnBnB,U,iBACiB,Q;iCADjBA,U,aAEa,CAAC,uCAAD,EAAyB,gDAAzB,C;iCAFbA,U,WAGWoB,K;iCAHXpB,U,kBAIkB;AACpBS,EAAAA,GAAG,EAAE,WADe;AAEpBR,EAAAA,IAAI,EAAE;AAFc,C;;AAqDxB,SAASgB,IAAT,CAAcI,KAAd,EAAqB;AAAA;AAAA;;AACnB,MAAMC,KAAK,GACiClB,YAD5C;AACA,iBAAO,mBAAQiB,KAAK,CAACb,MAAd,CAAP,eAA6B,gCAAC,KAAD;AAAA,WAAwB;AAAxB,cAA7B;AACD;;AAED,SAASU,KAAT,CAAeG,KAAf,EAAsB;AAAA;AAAA;;AACpB,MAAME,MAAM,GACiCnB,YAD7C;AACA,iBAAO,mBAAQiB,KAAK,CAACb,MAAd,CAAP,eAA6B,gCAAC,MAAD;AAAA,WAAyB;AAAzB,cAA7B;AACD;;AAED,IAAMQ,MAAM,GAAG,sBAAgBhB,UAAhB,EAA4B;AACzCiB,EAAAA,IAAI,EAAJA,IADyC;AAEzCC,EAAAA,KAAK,EAALA;AAFyC,CAA5B,CAAf;eAKeF,M","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { neighborLocationEnhance } from '@semcore/neighbor-location';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport SpinButton from './SpinButton';\n\nimport style from './style/button.shadow.css';\n\nexport const MAP_USE_DEFAULT_THEME = {\n primary: 'info',\n secondary: 'muted',\n tertiary: 'info',\n};\n\nclass RootButton extends Component {\n static displayName = 'Button';\n static enhance = [keyboardFocusEnhance(), neighborLocationEnhance()];\n static style = style;\n static defaultProps = {\n use: 'secondary',\n size: 'm',\n };\n\n getTextProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getAddonProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n render() {\n const SButton = Root;\n const SInner = Box;\n const SSpin = Box;\n const {\n Children,\n styles,\n use,\n theme = typeof use === 'string' && MAP_USE_DEFAULT_THEME[use],\n loading,\n disabled = loading,\n size,\n addonLeft,\n addonRight,\n } = this.asProps;\n\n const useTheme = use && theme ? `${use}-${theme}` : false;\n return sstyled(styles)(\n <SButton render={Box} type=\"button\" tag=\"button\" disabled={disabled} use:theme={useTheme}>\n <SInner tag=\"span\" loading={loading}>\n {addonLeft ? <Button.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Button.Text, Button.Addon)}\n {addonRight ? <Button.Addon tag={addonRight} /> : null}\n </SInner>\n {loading && (\n <SSpin tag=\"span\">\n <SpinButton centered size={size} theme={useTheme} />\n </SSpin>\n )}\n </SButton>,\n );\n }\n}\n\nfunction Text(props) {\n const SText = Root;\n return sstyled(props.styles)(<SText render={Box} tag=\"span\" />);\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nconst Button = createComponent(RootButton, {\n Text,\n Addon,\n});\n\nexport default Button;\n"],"file":"Button.js"}
1
+ {"version":3,"sources":["../../src/Button.jsx"],"names":["MAP_USE_DEFAULT_THEME","primary","secondary","tertiary","RootButton","size","asProps","SButton","Box","SInner","SSpin","Children","styles","use","theme","loading","disabled","addonLeft","addonRight","useTheme","Button","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AAI,EAAJA,IADyC;AAEzCC,EAAAA,KAAK,EAALA;AAFyC,CAA5B,CAAf;eAKeF,M","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { neighborLocationEnhance } from '@semcore/neighbor-location';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\nimport SpinButton from './SpinButton';\n\nimport style from './style/button.shadow.css';\n\nexport const MAP_USE_DEFAULT_THEME = {\n primary: 'info',\n secondary: 'muted',\n tertiary: 'info',\n};\n\nclass RootButton extends Component {\n static displayName = 'Button';\n static enhance = [keyboardFocusEnhance(), neighborLocationEnhance()];\n static style = style;\n static defaultProps = {\n use: 'secondary',\n size: 'm',\n };\n\n getTextProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getAddonProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n render() {\n const SButton = Root;\n const SInner = Box;\n const SSpin = Box;\n const {\n Children,\n styles,\n use,\n theme = typeof use === 'string' && MAP_USE_DEFAULT_THEME[use],\n loading,\n disabled = loading,\n size,\n addonLeft,\n addonRight,\n } = this.asProps;\n\n const useTheme = use && theme ? `${use}-${theme}` : false;\n return sstyled(styles)(\n <SButton render={Box} type=\"button\" tag=\"button\" disabled={disabled} use:theme={useTheme}>\n <SInner tag=\"span\" loading={loading}>\n {addonLeft ? <Button.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Button.Text, Button.Addon)}\n {addonRight ? <Button.Addon tag={addonRight} /> : null}\n </SInner>\n {loading && (\n <SSpin tag=\"span\">\n <SpinButton centered size={size} theme={useTheme} />\n </SSpin>\n )}\n </SButton>,\n );\n }\n}\n\nfunction Text(props) {\n const SText = Root;\n return sstyled(props.styles)(<SText render={Box} tag=\"span\" />);\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nconst Button = createComponent(RootButton, {\n Text,\n Addon,\n});\n\nexport default Button;\n"],"file":"Button.js"}
@@ -30,10 +30,10 @@ var SPIN_THEME_MAP = {
30
30
  'primary-warning': 'invert',
31
31
  'primary-danger': 'invert',
32
32
  'secondary-invert': 'invert',
33
- 'secondary-muted': 'gray40',
34
- 'secondary-info': 'light-blue',
33
+ 'secondary-muted': 'gray-600',
34
+ 'secondary-info': 'blue-400',
35
35
  'tertiary-invert': 'invert',
36
- 'tertiary-info': 'light-blue'
36
+ 'tertiary-info': 'blue-400'
37
37
  };
38
38
  exports.SPIN_THEME_MAP = SPIN_THEME_MAP;
39
39
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/SpinButton.js"],"names":["SPIN_SIZE_MAP","xl","l","m","s","SPIN_THEME_MAP","SpinButton","theme","size","others"],"mappings":";;;;;;;;;;;;;;AAAA;;AACA;;;AAEO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,EAAE,EAAE,GADuB;AAE3BC,EAAAA,CAAC,EAAE,GAFwB;AAG3BC,EAAAA,CAAC,EAAE,IAHwB;AAI3BC,EAAAA,CAAC,EAAE;AAJwB,CAAtB;;AAOA,IAAMC,cAAc,GAAG;AAC5B,kBAAgB,QADY;AAE5B,qBAAmB,QAFS;AAG5B,qBAAmB,QAHS;AAI5B,oBAAkB,QAJU;AAK5B,sBAAoB,QALQ;AAM5B,qBAAmB,QANS;AAO5B,oBAAkB,YAPU;AAQ5B,qBAAmB,QARS;AAS5B,mBAAiB;AATW,CAAvB;;;AAYQ,SAASC,UAAT,OAAgD;AAAA,MAA1BC,KAA0B,QAA1BA,KAA0B;AAAA,MAAnBC,IAAmB,QAAnBA,IAAmB;AAAA,MAAVC,MAAU;AAC7D,sBACE,gCAAC,gBAAD;AACE,IAAA,IAAI,EAAE,OAAOD,IAAP,IAAe,QAAf,GAA0BR,aAAa,CAACQ,IAAD,CAAvC,GAAgDA,IADxD;AAEE,IAAA,KAAK,EAAE,OAAOD,KAAP,KAAiB,QAAjB,GAA4BF,cAAc,CAACE,KAAD,CAAd,IAAyB,MAArD,GAA8DA;AAFvE,KAGME,MAHN,EADF;AAOD","sourcesContent":["import React from 'react';\nimport Spin from '@semcore/spin';\n\nexport const SPIN_SIZE_MAP = {\n xl: 'm',\n l: 's',\n m: 'xs',\n s: 'xxs',\n};\n\nexport const SPIN_THEME_MAP = {\n 'primary-info': 'invert',\n 'primary-success': 'invert',\n 'primary-warning': 'invert',\n 'primary-danger': 'invert',\n 'secondary-invert': 'invert',\n 'secondary-muted': 'gray40',\n 'secondary-info': 'light-blue',\n 'tertiary-invert': 'invert',\n 'tertiary-info': 'light-blue',\n};\n\nexport default function SpinButton({ theme, size, ...others }) {\n return (\n <Spin\n size={typeof size == 'string' ? SPIN_SIZE_MAP[size] : size}\n theme={typeof theme === 'string' ? SPIN_THEME_MAP[theme] || 'dark' : theme}\n {...others}\n />\n );\n}\n"],"file":"SpinButton.js"}
1
+ {"version":3,"sources":["../../src/SpinButton.jsx"],"names":["SPIN_SIZE_MAP","xl","l","m","s","SPIN_THEME_MAP","SpinButton","theme","size","others"],"mappings":";;;;;;;;;;;;;;AAAA;;AACA;;;AAEO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,EAAE,EAAE,GADuB;AAE3BC,EAAAA,CAAC,EAAE,GAFwB;AAG3BC,EAAAA,CAAC,EAAE,IAHwB;AAI3BC,EAAAA,CAAC,EAAE;AAJwB,CAAtB;;AAOA,IAAMC,cAAc,GAAG;AAC5B,kBAAgB,QADY;AAE5B,qBAAmB,QAFS;AAG5B,qBAAmB,QAHS;AAI5B,oBAAkB,QAJU;AAK5B,sBAAoB,QALQ;AAM5B,qBAAmB,UANS;AAO5B,oBAAkB,UAPU;AAQ5B,qBAAmB,QARS;AAS5B,mBAAiB;AATW,CAAvB;;;AAYQ,SAASC,UAAT,OAAgD;AAAA,MAA1BC,KAA0B,QAA1BA,KAA0B;AAAA,MAAnBC,IAAmB,QAAnBA,IAAmB;AAAA,MAAVC,MAAU;AAC7D,sBACE,gCAAC,gBAAD;AACE,IAAA,IAAI,EAAE,OAAOD,IAAP,IAAe,QAAf,GAA0BR,aAAa,CAACQ,IAAD,CAAvC,GAAgDA,IADxD;AAEE,IAAA,KAAK,EAAE,OAAOD,KAAP,KAAiB,QAAjB,GAA4BF,cAAc,CAACE,KAAD,CAAd,IAAyB,MAArD,GAA8DA;AAFvE,KAGME,MAHN,EADF;AAOD","sourcesContent":["import React from 'react';\nimport Spin from '@semcore/spin';\n\nexport const SPIN_SIZE_MAP = {\n xl: 'm',\n l: 's',\n m: 'xs',\n s: 'xxs',\n};\n\nexport const SPIN_THEME_MAP = {\n 'primary-info': 'invert',\n 'primary-success': 'invert',\n 'primary-warning': 'invert',\n 'primary-danger': 'invert',\n 'secondary-invert': 'invert',\n 'secondary-muted': 'gray-600',\n 'secondary-info': 'blue-400',\n 'tertiary-invert': 'invert',\n 'tertiary-info': 'blue-400',\n};\n\nexport default function SpinButton({ theme, size, ...others }) {\n return (\n <Spin\n size={typeof size == 'string' ? SPIN_SIZE_MAP[size] : size}\n theme={typeof theme === 'string' ? SPIN_THEME_MAP[theme] || 'dark' : theme}\n {...others}\n />\n );\n}\n"],"file":"SpinButton.js"}
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
3
+ import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
4
+ import { IBoxProps } from '@semcore/flex-box';
5
+ import { INeighborItemProps } from '@semcore/neighbor-location';
6
+
7
+ export type ButtonSize = 'l' | 'm';
8
+
9
+ export interface IButtonProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps {
10
+ /**
11
+ * Button type
12
+ * @default secondary
13
+ */
14
+ use?: 'primary' | 'secondary' | 'tertiary';
15
+ /** Button theme */
16
+ theme?: 'info' | 'success' | 'warning' | 'danger' | 'muted' | 'invert';
17
+ /** Button activity state */
18
+ active?: boolean;
19
+ /**
20
+ * Button size
21
+ * @default m
22
+ */
23
+ size?: ButtonSize;
24
+ /** Disabled button state */
25
+ disabled?: boolean;
26
+ /** Loading button state */
27
+ loading?: boolean;
28
+ /** Tag for the left Addon */
29
+ addonLeft?: React.ElementType;
30
+ /** Tag for the right Addon */
31
+ addonRight?: React.ElementType;
32
+ }
33
+
34
+ export interface IButtonTextProps extends IBoxProps {
35
+ size?: ButtonSize;
36
+ }
37
+
38
+ export interface IButtonAddonProps extends IBoxProps {
39
+ size?: ButtonSize;
40
+ }
41
+
42
+ export interface IButtonContext {
43
+ getTextProps: PropGetterFn;
44
+ getAddonProps: PropGetterFn;
45
+ }
46
+
47
+ declare const Button: (<T>(props: CProps<IButtonProps & T, IButtonContext>) => ReturnEl) & {
48
+ Text: <T>(props: IButtonTextProps & T) => ReturnEl;
49
+ Addon: <T>(props: IButtonAddonProps & T) => ReturnEl;
50
+ };
51
+
52
+ export default Button;
@@ -8,14 +8,12 @@ SButton {
8
8
  padding: 0;
9
9
  margin: 0;
10
10
  white-space: nowrap;
11
- font-family: inherit;
12
- font-weight: normal;
11
+ font-family: Inter, sans-serif;
13
12
  line-height: normal;
14
13
  text-decoration: none;
15
14
  text-align: center;
16
15
  vertical-align: middle;
17
16
  border: 1px solid transparent;
18
- color: var(--gray40);
19
17
  outline: 0;
20
18
  box-shadow: none;
21
19
  cursor: pointer;
@@ -24,6 +22,8 @@ SButton {
24
22
  user-select: none;
25
23
  touch-action: manipulation;
26
24
  -webkit-tap-highlight-color: transparent;
25
+ font-weight: 500;
26
+ color: var(--gray-500);
27
27
 
28
28
  &::-moz-focus-inner {
29
29
  padding: 0;
@@ -45,135 +45,123 @@ SButton[disabled] {
45
45
  }
46
46
 
47
47
  SButton[keyboardFocused] {
48
- box-shadow: var(--keyborad-focus);
48
+ box-shadow: var(--keyboard-focus);
49
49
  z-index: 1;
50
50
  }
51
51
 
52
- SButton[size='s'] {
53
- height: 18px;
54
- min-width: 18px;
55
- border-radius: 2px;
56
- font-size: 10px;
57
- }
58
-
59
52
  SButton[size='m'] {
60
53
  height: 26px;
61
54
  min-width: 26px;
62
- border-radius: 3px;
63
- font-size: 12px;
64
- }
65
-
66
- SButton[size='l'] {
67
- height: 32px;
68
- min-width: 32px;
69
- border-radius: 4px;
55
+ border-radius: var(--rounded-m);
70
56
  font-size: 14px;
71
57
  }
72
58
 
73
- SButton[size='xl'] {
74
- height: 42px;
75
- min-width: 42px;
76
- border-radius: 5px;
59
+ SButton[size='l'] {
60
+ height: 38px;
61
+ min-width: 38px;
62
+ border-radius: var(--rounded-m);
77
63
  font-size: 16px;
78
64
  }
79
65
 
80
66
  SButton[theme='primary-info'] {
81
67
  color: var(--white);
82
- background-color: var(--light-blue);
68
+ background-color: var(--blue-400);
83
69
 
84
70
  &:hover {
85
- background-color: var(--denim-blue);
71
+ background-color: var(--blue-500);
86
72
  }
87
73
 
88
74
  &:active,
89
75
  &[active] {
90
- background-color: color-mod(var(--denim-blue) shade(5%) saturation(+5%));
76
+ background-color: var(--blue-600);
91
77
  }
92
78
  }
93
79
 
94
80
  SButton[theme='primary-success'] {
95
81
  color: var(--white);
96
- background-color: var(--green);
82
+ background-color: var(--green-400);
97
83
 
98
84
  &:hover {
99
- background-color: var(--dark-green);
85
+ background-color: var(--green-500);
100
86
  }
101
87
 
102
88
  &:active,
103
89
  &[active] {
104
- background-color: color-mod(var(--dark-green) shade(5%) saturation(+5%));
90
+ background-color: var(--green-600);
105
91
  }
106
92
  }
107
93
 
108
94
  SButton[theme='primary-warning'] {
109
- background-color: var(--orange);
110
- color: #fff;
95
+ background-color: var(--orange-400);
96
+ color: var(--white);
111
97
 
112
98
  &:hover {
113
- background-color: var(--dark-orange);
99
+ background-color: var(--orange-500);
114
100
  }
115
101
 
116
102
  &:active,
117
103
  &[active] {
118
- background-color: color-mod(var(--dark-orange) shade(5%) saturation(+5%));
104
+ background-color: color-mod(var(--orange-500) shade(5%) saturation(+5%));
119
105
  }
120
106
  }
121
107
 
122
108
  SButton[theme='primary-danger'] {
123
- background-color: var(--red);
124
- color: #fff;
109
+ background-color: var(--red-400);
110
+ color: var(--white);
125
111
 
126
112
  &:hover {
127
- background-color: var(--dark-red);
113
+ background-color: var(--red-500);
128
114
  }
129
115
 
130
116
  &:active,
131
117
  &[active] {
132
- background-color: color-mod(var(--dark-red) shade(5%) saturation(+5%));
118
+ background-color: var(--red-600);
133
119
  }
134
120
  }
135
121
 
136
122
  SButton[theme='primary-invert'] {
137
123
  background-color: #fff;
138
- color: var(--gray20);
124
+ color: var(--gray-800);
139
125
 
140
126
  &:hover {
141
- background-color: var(--gray94);
127
+ background-color: var(--gray-50);
142
128
  }
143
129
 
144
130
  &:active,
145
131
  &[active] {
146
- background-color: color-mod(var(--gray94) shade(5%) saturation(+5%));
132
+ background-color: var(--gray-100);
147
133
  }
148
134
  }
149
135
 
150
136
  SButton[theme='secondary-muted'] {
151
- color: var(--gray60);
152
- border-color: var(--stone);
153
- background-color: color-mod(var(--stone) a(10%));
137
+ color: var(--gray-500);
138
+ border-color: var(--gray-200);
139
+ background-color: color-mod(var(--gray-400) a(10%));
154
140
 
155
141
  &:hover {
156
- background-color: color-mod(var(--stone) a(20%));
142
+ background-color: color-mod(var(--gray-400) a(20%));
143
+ color: var(--gray-800);
157
144
  }
158
145
 
159
146
  &:active,
160
147
  &[active] {
161
- background-color: color-mod(var(--stone) a(30%));
148
+ background-color: color-mod(var(--gray-400) a(30%));
149
+ color: var(--gray-800);
162
150
  }
163
151
  }
164
152
 
165
153
  SButton[theme='secondary-info'] {
166
- background-color: color-mod(var(--light-blue) a(5%));
167
- color: var(--light-blue);
168
- border-color: var(--light-blue);
154
+ background-color: color-mod(var(--blue-400) a(5%));
155
+ color: var(--blue-400);
156
+ border-color: var(--blue-400);
169
157
 
170
158
  &:hover {
171
- background-color: color-mod(var(--denim-blue) a(20%));
159
+ background-color: color-mod(var(--blue-500) a(20%));
172
160
  }
173
161
 
174
162
  &:active,
175
163
  &[active] {
176
- background-color: color-mod(var(--denim-blue) a(30%));
164
+ background-color: color-mod(var(--blue-500) a(30%));
177
165
  }
178
166
  }
179
167
 
@@ -183,7 +171,7 @@ SButton[theme='secondary-invert'] {
183
171
  border-color: #fff;
184
172
 
185
173
  &:hover {
186
- background-color: color-mod(#fff a(20%));
174
+ background-color: color-mod(#fff a(10%));
187
175
  }
188
176
 
189
177
  &:active,
@@ -193,30 +181,32 @@ SButton[theme='secondary-invert'] {
193
181
  }
194
182
 
195
183
  SButton[theme='tertiary-info'] {
196
- color: var(--denim-blue);
184
+ color: var(--blue-500);
197
185
  background-color: transparent;
198
186
 
199
187
  &:hover {
200
- background-color: color-mod(var(--light-blue) a(20%));
188
+ background-color: color-mod(var(--blue-400) a(20%));
201
189
  }
202
190
 
203
191
  &:active,
204
192
  &[active] {
205
- background-color: color-mod(var(--light-blue) a(30%));
193
+ background-color: color-mod(var(--blue-400) a(30%));
206
194
  }
207
195
  }
208
196
 
209
197
  SButton[theme='tertiary-muted'] {
210
- color: var(--gray60);
198
+ color: var(--gray-500);
211
199
  background-color: transparent;
212
200
 
213
201
  &:hover {
214
- background-color: color-mod(var(--stone) a(20%));
202
+ background-color: color-mod(var(--gray-400) a(20%));
203
+ color: var(--gray-800);
215
204
  }
216
205
 
217
206
  &:active,
218
207
  &[active] {
219
- background-color: color-mod(var(--stone) a(30%));
208
+ background-color: color-mod(var(--gray-400) a(30%));
209
+ color: var(--gray-800);
220
210
  }
221
211
  }
222
212
 
@@ -225,7 +215,7 @@ SButton[theme='tertiary-invert'] {
225
215
  background-color: transparent;
226
216
 
227
217
  &:hover {
228
- background-color: color-mod(#fff a(20%));
218
+ background-color: color-mod(#fff a(10%));
229
219
  }
230
220
 
231
221
  &:active,
@@ -295,27 +285,18 @@ SInner[loading] {
295
285
 
296
286
  SText {
297
287
  display: inline-flex;
298
- line-height: 1.1;
299
- }
300
-
301
- SText[size='s'] {
302
- margin-left: 4px;
303
- margin-right: 4px;
304
288
  }
305
289
 
306
290
  SText[size='m'] {
307
291
  margin-left: 8px;
308
292
  margin-right: 8px;
293
+ line-height: var(--lh-200);
309
294
  }
310
295
 
311
296
  SText[size='l'] {
312
- margin-left: 8px;
313
- margin-right: 8px;
314
- }
315
-
316
- SText[size='xl'] {
317
297
  margin-left: 12px;
318
298
  margin-right: 12px;
299
+ line-height: var(--lh-300);
319
300
  }
320
301
 
321
302
  SAddon {
@@ -324,21 +305,6 @@ SAddon {
324
305
  justify-content: center;
325
306
  }
326
307
 
327
- SAddon[size='s'] {
328
- &:not(:only-child):first-child {
329
- margin-left: 4px;
330
- }
331
-
332
- &:not(:only-child):last-child {
333
- margin-right: 4px;
334
- }
335
-
336
- &:only-child {
337
- margin-left: -2px;
338
- margin-right: -2px;
339
- }
340
- }
341
-
342
308
  SAddon[size='m'] {
343
309
  &:not(:only-child):first-child {
344
310
  margin-left: 8px;
@@ -368,18 +334,3 @@ SAddon[size='l'] {
368
334
  margin-right: -4px;
369
335
  }
370
336
  }
371
-
372
- SAddon[size='xl'] {
373
- &:not(:only-child):first-child {
374
- margin-left: 12px;
375
- }
376
-
377
- &:not(:only-child):last-child {
378
- margin-right: 12px;
379
- }
380
-
381
- &:only-child {
382
- margin-left: -6px;
383
- margin-right: -6px;
384
- }
385
- }