@react-ui-org/react-ui 0.44.0 → 0.46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/CONTRIBUTING.md +7 -0
  2. package/dist/lib.development.js +209 -305
  3. package/dist/lib.js +1 -1
  4. package/package.json +10 -13
  5. package/src/lib/components/Alert/Alert.jsx +4 -3
  6. package/src/lib/components/Alert/Alert.scss +48 -48
  7. package/src/lib/components/Alert/_settings.scss +4 -4
  8. package/src/lib/components/Alert/_theme.scss +50 -50
  9. package/src/lib/components/Alert/_tools.scss +6 -6
  10. package/src/lib/components/Badge/Badge.jsx +6 -8
  11. package/src/lib/components/Badge/Badge.scss +57 -57
  12. package/src/lib/components/Button/Button.jsx +10 -9
  13. package/src/lib/components/Button/Button.scss +2 -2
  14. package/src/lib/components/Button/README.mdx +8 -3
  15. package/src/lib/components/Button/_base.scss +65 -65
  16. package/src/lib/components/Button/_priorities.scss +49 -49
  17. package/src/lib/components/Button/_settings.scss +10 -10
  18. package/src/lib/components/Button/_theme.scss +18 -15
  19. package/src/lib/components/Button/_tools.scss +98 -100
  20. package/src/lib/components/ButtonGroup/ButtonGroup.jsx +31 -22
  21. package/src/lib/components/ButtonGroup/ButtonGroup.scss +3 -3
  22. package/src/lib/components/ButtonGroup/README.mdx +4 -4
  23. package/src/lib/components/Card/Card.jsx +7 -6
  24. package/src/lib/components/Card/Card.scss +28 -28
  25. package/src/lib/components/Card/CardBody.jsx +5 -11
  26. package/src/lib/components/Card/CardFooter.jsx +10 -5
  27. package/src/lib/components/Card/README.mdx +2 -2
  28. package/src/lib/components/Card/_theme.scss +50 -50
  29. package/src/lib/components/Card/_tools.scss +6 -6
  30. package/src/lib/components/CheckboxField/CheckboxField.jsx +18 -17
  31. package/src/lib/components/CheckboxField/CheckboxField.scss +20 -20
  32. package/src/lib/components/CheckboxField/README.mdx +3 -3
  33. package/src/lib/components/FileInputField/FileInputField.jsx +13 -12
  34. package/src/lib/components/FileInputField/FileInputField.scss +19 -19
  35. package/src/lib/components/FileInputField/README.mdx +1 -1
  36. package/src/lib/components/FormLayout/FormLayout.jsx +16 -14
  37. package/src/lib/components/FormLayout/FormLayout.scss +17 -17
  38. package/src/lib/components/FormLayout/FormLayoutCustomField.jsx +15 -9
  39. package/src/lib/components/FormLayout/FormLayoutCustomField.scss +18 -18
  40. package/src/lib/components/FormLayout/README.mdx +27 -49
  41. package/src/lib/components/Grid/Grid.jsx +4 -3
  42. package/src/lib/components/Grid/Grid.scss +32 -23
  43. package/src/lib/components/Grid/GridSpan.jsx +4 -3
  44. package/src/lib/components/Grid/{helpers → _helpers}/generateResponsiveCustomProperties.js +0 -2
  45. package/src/lib/components/Grid/_theme.scss +9 -9
  46. package/src/lib/components/Grid/_tools.scss +20 -20
  47. package/src/lib/components/List/List.jsx +14 -12
  48. package/src/lib/components/List/List.scss +21 -21
  49. package/src/lib/components/List/ListItem.jsx +3 -2
  50. package/src/lib/components/List/README.mdx +1 -1
  51. package/src/lib/components/Media/Media.jsx +12 -5
  52. package/src/lib/components/Media/Media.scss +6 -6
  53. package/src/lib/components/Media/MediaBody.jsx +18 -7
  54. package/src/lib/components/Media/MediaObject.jsx +18 -7
  55. package/src/lib/components/Modal/Modal.jsx +8 -6
  56. package/src/lib/components/Modal/Modal.scss +73 -73
  57. package/src/lib/components/Modal/README.mdx +2 -2
  58. package/src/lib/components/Modal/_settings.scss +5 -5
  59. package/src/lib/components/Modal/_theme.scss +17 -17
  60. package/src/lib/components/Paper/Paper.jsx +6 -6
  61. package/src/lib/components/Paper/Paper.scss +8 -8
  62. package/src/lib/components/Paper/README.mdx +1 -1
  63. package/src/lib/components/Radio/README.mdx +4 -4
  64. package/src/lib/components/Radio/Radio.jsx +12 -11
  65. package/src/lib/components/Radio/Radio.scss +26 -26
  66. package/src/lib/components/ScrollView/README.mdx +4 -1
  67. package/src/lib/components/ScrollView/ScrollView.jsx +11 -9
  68. package/src/lib/components/ScrollView/ScrollView.scss +113 -113
  69. package/src/lib/{services/elementPositionService.js → components/ScrollView/_helpers/getElementsPositionDifference.js} +0 -2
  70. package/src/lib/{hooks → components/ScrollView/_hooks}/useLoadResizeHook.js +1 -1
  71. package/src/lib/{hooks → components/ScrollView/_hooks}/useScrollPositionHook.js +1 -1
  72. package/src/lib/components/SelectField/README.mdx +4 -4
  73. package/src/lib/components/SelectField/SelectField.jsx +14 -13
  74. package/src/lib/components/SelectField/SelectField.scss +30 -30
  75. package/src/lib/components/Table/README.mdx +3 -3
  76. package/src/lib/components/Table/Table.scss +28 -35
  77. package/src/lib/components/Table/_settings.scss +5 -5
  78. package/src/lib/components/Tabs/README.mdx +1 -1
  79. package/src/lib/components/Tabs/Tabs.jsx +1 -2
  80. package/src/lib/components/Tabs/Tabs.scss +21 -21
  81. package/src/lib/components/Tabs/TabsItem.jsx +4 -3
  82. package/src/lib/components/Tabs/TabsItem.scss +78 -78
  83. package/src/lib/components/Text/README.mdx +1 -1
  84. package/src/lib/components/Text/Text.jsx +13 -6
  85. package/src/lib/components/Text/Text.scss +23 -13
  86. package/src/lib/components/Text/_helpers/getRootClampClassName.js +11 -0
  87. package/src/lib/components/Text/{helpers → _helpers}/getRootHyphensClassName.js +1 -1
  88. package/src/lib/components/Text/{helpers → _helpers}/getRootWordWrappingClassName.js +1 -1
  89. package/src/lib/components/TextArea/README.mdx +1 -1
  90. package/src/lib/components/TextArea/TextArea.jsx +18 -14
  91. package/src/lib/components/TextArea/TextArea.scss +27 -27
  92. package/src/lib/components/TextField/README.mdx +1 -1
  93. package/src/lib/components/TextField/TextField.jsx +16 -14
  94. package/src/lib/components/TextField/TextField.scss +28 -28
  95. package/src/lib/components/TextLink/README.mdx +77 -0
  96. package/src/lib/components/{Link/Link.jsx → TextLink/TextLink.jsx} +12 -13
  97. package/src/lib/components/TextLink/TextLink.scss +11 -0
  98. package/src/lib/components/TextLink/_theme.scss +4 -0
  99. package/src/lib/components/TextLink/index.js +1 -0
  100. package/src/lib/components/Toggle/README.mdx +3 -3
  101. package/src/lib/components/Toggle/Toggle.jsx +18 -17
  102. package/src/lib/components/Toggle/Toggle.scss +20 -20
  103. package/src/lib/components/Toolbar/README.mdx +19 -3
  104. package/src/lib/components/Toolbar/Toolbar.jsx +23 -14
  105. package/src/lib/components/Toolbar/Toolbar.scss +35 -30
  106. package/src/lib/components/Toolbar/ToolbarGroup.jsx +18 -13
  107. package/src/lib/components/Toolbar/ToolbarItem.jsx +26 -7
  108. package/src/lib/{helpers → components/_helpers}/getRootColorClassName.js +1 -1
  109. package/src/lib/{helpers → components/_helpers}/getRootSizeClassName.js +1 -1
  110. package/src/lib/{helpers → components/_helpers}/getRootValidationStateClassName.js +1 -1
  111. package/src/lib/components/_helpers/isChildrenEmpty.js +3 -0
  112. package/src/lib/{helpers → components/_helpers}/resolveContextOrProp.js +0 -0
  113. package/src/lib/{utils → components/_helpers}/transferProps.js +1 -1
  114. package/src/lib/foundation.scss +11 -11
  115. package/src/lib/helpers.scss +2 -2
  116. package/src/lib/index.js +4 -8
  117. package/src/lib/styles/_utilities.scss +13 -13
  118. package/src/lib/styles/elements/_code.scss +7 -7
  119. package/src/lib/styles/elements/_links.scss +8 -8
  120. package/src/lib/styles/elements/_lists.scss +3 -3
  121. package/src/lib/styles/elements/_page.scss +14 -14
  122. package/src/lib/styles/elements/_rulers.scss +6 -6
  123. package/src/lib/styles/elements/_small.scss +2 -2
  124. package/src/lib/styles/generic/_box-sizing.scss +3 -2
  125. package/src/lib/styles/generic/_forms.scss +3 -3
  126. package/src/lib/styles/generic/_reset.scss +6 -6
  127. package/src/lib/styles/generic/_shared.scss +3 -3
  128. package/src/lib/styles/helpers/_animation.scss +8 -8
  129. package/src/lib/styles/settings/_breakpoints.scss +7 -7
  130. package/src/lib/styles/settings/_escaped-characters.scss +5 -5
  131. package/src/lib/styles/settings/_form-fields.scss +24 -24
  132. package/src/lib/styles/settings/_utilities.scss +112 -100
  133. package/src/lib/styles/theme/_colors.scss +50 -50
  134. package/src/lib/styles/theme/_form-fields.scss +32 -32
  135. package/src/lib/styles/theme/_spacing.scss +11 -11
  136. package/src/lib/styles/theme/_typography.scss +12 -11
  137. package/src/lib/styles/theme-constants/_breakpoints.scss +2 -2
  138. package/src/lib/styles/theme-constants/_colors.scss +2 -2
  139. package/src/lib/styles/theme-constants/_svg.scss +1 -2
  140. package/src/lib/styles/tools/_accessibility.scss +29 -29
  141. package/src/lib/styles/tools/_breakpoint.scss +11 -14
  142. package/src/lib/styles/tools/_caret.scss +8 -8
  143. package/src/lib/styles/tools/_colors.scss +3 -3
  144. package/src/lib/styles/tools/_reset.scss +24 -21
  145. package/src/lib/styles/tools/_scrollbar.scss +4 -4
  146. package/src/lib/styles/tools/_spacing.scss +17 -21
  147. package/src/lib/styles/tools/_string.scss +9 -9
  148. package/src/lib/styles/tools/_svg.scss +13 -16
  149. package/src/lib/styles/tools/_transition.scss +42 -44
  150. package/src/lib/styles/tools/_utilities.scss +19 -19
  151. package/src/lib/styles/tools/form-fields/_box-field-elements.scss +88 -88
  152. package/src/lib/styles/tools/form-fields/_box-field-layout.scss +147 -147
  153. package/src/lib/styles/tools/form-fields/_box-field-sizes.scss +13 -15
  154. package/src/lib/styles/tools/form-fields/_foundation.scss +12 -12
  155. package/src/lib/styles/tools/form-fields/_inline-field-elements.scss +82 -71
  156. package/src/lib/styles/tools/form-fields/_inline-field-layout.scss +88 -47
  157. package/src/lib/styles/tools/form-fields/_variants.scss +104 -106
  158. package/src/lib/theme.scss +958 -954
  159. package/src/lib/utils/classNames.js +8 -0
  160. package/src/lib/components/CTA/CTA.jsx +0 -60
  161. package/src/lib/components/CTA/CTA.scss +0 -71
  162. package/src/lib/components/CTA/CTACenter.jsx +0 -27
  163. package/src/lib/components/CTA/CTAEnd.jsx +0 -27
  164. package/src/lib/components/CTA/CTAStart.jsx +0 -27
  165. package/src/lib/components/CTA/README.mdx +0 -119
  166. package/src/lib/components/CTA/index.js +0 -4
  167. package/src/lib/components/Center/Center.jsx +0 -27
  168. package/src/lib/components/Center/Center.scss +0 -7
  169. package/src/lib/components/Center/README.mdx +0 -52
  170. package/src/lib/components/Center/index.js +0 -1
  171. package/src/lib/components/Link/Link.scss +0 -11
  172. package/src/lib/components/Link/README.mdx +0 -85
  173. package/src/lib/components/Link/_theme.scss +0 -4
  174. package/src/lib/components/Link/index.js +0 -1
@@ -21,10 +21,10 @@ $horizontal-label-text-align: var(--rui-FormField--horizontal__label__text-align
21
21
  $horizontal-label-min-width: var(--rui-FormField--horizontal__label__min-width);
22
22
  $horizontal-label-width: var(--rui-FormField--horizontal__label__width);
23
23
  $horizontal-label-padding-y:
24
- var(
25
- --rui-FormField--horizontal__label__padding-y,
26
- calc(var(--rui-FormField--box__border-width) + var(--rui-local-padding-y))
27
- ); // 1.
24
+ var(
25
+ --rui-FormField--horizontal__label__padding-y,
26
+ calc(var(--rui-FormField--box__border-width) + var(--rui-local-padding-y))
27
+ ); // 1.
28
28
  $horizontal-label-vertical-alignment: var(--rui-FormField--horizontal__label__vertical-alignment);
29
29
  $horizontal-field-vertical-alignment: var(--rui-FormField--horizontal__field__vertical-alignment);
30
30
  $horizontal-full-width-label-width: var(--rui-FormField--horizontal--full-width__label__width);
@@ -47,24 +47,24 @@ $box-select-option-disabled-color: var(--rui-FormField--box--select__option--dis
47
47
 
48
48
  // Form fields: box field sizes
49
49
  $box-sizes: (
50
- small: (
51
- height: var(--rui-FormField--box--small__height),
52
- padding-y: var(--rui-FormField--box--small__padding-y),
53
- padding-x: var(--rui-FormField--box--small__padding-x),
54
- font-size: var(--rui-FormField--box--small__font-size),
55
- ),
56
- medium: (
57
- height: var(--rui-FormField--box--medium__height),
58
- padding-y: var(--rui-FormField--box--medium__padding-y),
59
- padding-x: var(--rui-FormField--box--medium__padding-x),
60
- font-size: var(--rui-FormField--box--medium__font-size),
61
- ),
62
- large: (
63
- height: var(--rui-FormField--box--large__height),
64
- padding-y: var(--rui-FormField--box--large__padding-y),
65
- padding-x: var(--rui-FormField--box--large__padding-x),
66
- font-size: var(--rui-FormField--box--large__font-size),
67
- ),
50
+ small: (
51
+ height: var(--rui-FormField--box--small__height),
52
+ padding-y: var(--rui-FormField--box--small__padding-y),
53
+ padding-x: var(--rui-FormField--box--small__padding-x),
54
+ font-size: var(--rui-FormField--box--small__font-size),
55
+ ),
56
+ medium: (
57
+ height: var(--rui-FormField--box--medium__height),
58
+ padding-y: var(--rui-FormField--box--medium__padding-y),
59
+ padding-x: var(--rui-FormField--box--medium__padding-x),
60
+ font-size: var(--rui-FormField--box--medium__font-size),
61
+ ),
62
+ large: (
63
+ height: var(--rui-FormField--box--large__height),
64
+ padding-y: var(--rui-FormField--box--large__padding-y),
65
+ padding-x: var(--rui-FormField--box--large__padding-x),
66
+ font-size: var(--rui-FormField--box--large__font-size),
67
+ ),
68
68
  );
69
69
 
70
70
  // Form fields: check fields
@@ -75,19 +75,19 @@ $check-tap-target-size: var(--rui-FormField--check__tap-target-size);
75
75
 
76
76
  // Form fields: check fields, component specific
77
77
  $check-input-checkbox-border-radius: var(--rui-FormField--check__input--checkbox__border-radius);
78
- $check-input-checkbox-checked-background-image:
79
- var(--rui-FormField--check__input--checkbox--checked__background-image);
78
+ $check-input-checkbox-checked-background-image: var(--rui-FormField--check__input--checkbox--checked__background-image);
80
79
  $check-input-radio-border-radius: var(--rui-FormField--check__input--radio__border-radius);
81
- $check-input-radio-checked-background-image:
82
- var(--rui-FormField--check__input--radio--checked__background-image);
80
+ $check-input-radio-checked-background-image: var(--rui-FormField--check__input--radio--checked__background-image);
83
81
  $check-input-toggle-width: var(--rui-FormField--check__input--toggle__width);
84
82
  $check-input-toggle-border-radius: var(--rui-FormField--check__input--toggle__border-radius);
85
83
  $check-input-toggle-background-size: var(--rui-FormField--check__input--toggle__background-size);
86
- $check-input-toggle-default-background-image:
87
- var(--rui-FormField--check__input--toggle--default__background-image);
84
+ $check-input-toggle-default-background-image: var(--rui-FormField--check__input--toggle--default__background-image);
88
85
  $check-input-toggle-default-background-position:
89
- var(--rui-FormField--check__input--toggle--default__background-position);
90
- $check-input-toggle-checked-background-image:
91
- var(--rui-FormField--check__input--toggle--checked__background-image);
86
+ var(
87
+ --rui-FormField--check__input--toggle--default__background-position
88
+ );
89
+ $check-input-toggle-checked-background-image: var(--rui-FormField--check__input--toggle--checked__background-image);
92
90
  $check-input-toggle-checked-background-position:
93
- var(--rui-FormField--check__input--toggle--checked__background-position);
91
+ var(
92
+ --rui-FormField--check__input--toggle--checked__background-position
93
+ );
@@ -1,16 +1,16 @@
1
1
  $values: (
2
- 0: var(--rui-spacing-0),
3
- 1: var(--rui-spacing-1),
4
- 2: var(--rui-spacing-2),
5
- 3: var(--rui-spacing-3),
6
- 4: var(--rui-spacing-4),
7
- 5: var(--rui-spacing-5),
8
- 6: var(--rui-spacing-6),
9
- 7: var(--rui-spacing-7),
2
+ 0: var(--rui-spacing-0),
3
+ 1: var(--rui-spacing-1),
4
+ 2: var(--rui-spacing-2),
5
+ 3: var(--rui-spacing-3),
6
+ 4: var(--rui-spacing-4),
7
+ 5: var(--rui-spacing-5),
8
+ 6: var(--rui-spacing-6),
9
+ 7: var(--rui-spacing-7),
10
10
  );
11
11
 
12
12
  $bottom: (
13
- default: var(--rui-spacing-bottom-default),
14
- headings: var(--rui-spacing-bottom-headings),
15
- layouts: var(--rui-spacing-bottom-layouts),
13
+ default: var(--rui-spacing-bottom-default),
14
+ headings: var(--rui-spacing-bottom-headings),
15
+ layouts: var(--rui-spacing-bottom-layouts),
16
16
  );
@@ -1,18 +1,18 @@
1
1
  $font-weight-values: (
2
- thin: var(--rui-typography-font-weight-thin),
3
- light: var(--rui-typography-font-weight-light),
4
- regular: var(--rui-typography-font-weight-regular),
5
- medium: var(--rui-typography-font-weight-medium),
6
- bold: var(--rui-typography-font-weight-bold),
2
+ thin: var(--rui-typography-font-weight-thin),
3
+ light: var(--rui-typography-font-weight-light),
4
+ regular: var(--rui-typography-font-weight-regular),
5
+ medium: var(--rui-typography-font-weight-medium),
6
+ bold: var(--rui-typography-font-weight-bold),
7
7
  );
8
8
 
9
9
  $size-values: (
10
- 0: var(--rui-typography-size-0),
11
- 1: var(--rui-typography-size-1),
12
- 2: var(--rui-typography-size-2),
13
- 3: var(--rui-typography-size-3),
14
- 4: var(--rui-typography-size-4),
15
- 5: var(--rui-typography-size-5),
10
+ 0: var(--rui-typography-size-0),
11
+ 1: var(--rui-typography-size-1),
12
+ 2: var(--rui-typography-size-2),
13
+ 3: var(--rui-typography-size-3),
14
+ 4: var(--rui-typography-size-4),
15
+ 5: var(--rui-typography-size-5),
16
16
  );
17
17
 
18
18
  $size-small: var(--rui-typography-size-small);
@@ -21,3 +21,4 @@ $size-smaller: var(--rui-typography-size-smaller);
21
21
  $font-family-base: var(--rui-typography-font-family-base);
22
22
  $font-size-base: var(--rui-typography-font-size-base);
23
23
  $line-height-base: var(--rui-typography-line-height-base);
24
+ $line-height-small: var(--rui-typography-line-height-small);
@@ -1,7 +1,7 @@
1
1
  // ⚠️ For `theme.scss` purposes only, do not use anywhere else.
2
2
 
3
- @use 'sass:map';
4
- @use '../settings/breakpoints';
3
+ @use "sass:map";
4
+ @use "../settings/breakpoints";
5
5
 
6
6
  $xs: map.get(breakpoints.$values, xs);
7
7
  $sm: map.get(breakpoints.$values, sm);
@@ -1,7 +1,7 @@
1
1
  // ⚠️ For `theme.scss` purposes only, do not use anywhere else.
2
2
 
3
- @use 'sass:color';
4
- @use '../tools/colors';
3
+ @use "sass:color";
4
+ @use "../tools/colors";
5
5
 
6
6
  $_gray-base-color: #fff;
7
7
  $_amount-light: 90%;
@@ -1,8 +1,7 @@
1
1
  // ⚠️ For `theme.scss` purposes only, do not use anywhere else.
2
2
 
3
- @use '../tools/svg';
3
+ @use "../tools/svg";
4
4
 
5
- // stylelint-disable function-url-quotes
6
5
  $checkbox-checked: svg.escape(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/></svg>"));
7
6
  $radio-checked: svg.escape(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#ffffff'/></svg>"));
8
7
  $toggle: svg.escape(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#cccccc'/></svg>"));
@@ -3,49 +3,49 @@
3
3
  //
4
4
  // 2. Make tap target big enough to improve accessibility on touch screens.
5
5
 
6
- @use '../theme/accessibility' as theme;
6
+ @use "../theme/accessibility" as theme;
7
7
 
8
8
  // 1.
9
9
  @mixin hide-text() {
10
- position: absolute;
11
- width: 1px;
12
- height: 1px;
13
- padding: 0;
14
- overflow: hidden;
15
- clip: rect(0, 0, 0, 0);
16
- white-space: nowrap;
17
- border: 0;
10
+ position: absolute;
11
+ width: 1px;
12
+ height: 1px;
13
+ padding: 0;
14
+ overflow: hidden;
15
+ clip: rect(0, 0, 0, 0);
16
+ white-space: nowrap;
17
+ border: 0;
18
18
  }
19
19
 
20
20
  @mixin unhide-text() {
21
- position: unset;
22
- width: unset;
23
- height: unset;
24
- overflow: unset;
25
- clip: unset;
26
- white-space: unset;
21
+ position: unset;
22
+ width: unset;
23
+ height: unset;
24
+ overflow: unset;
25
+ clip: unset;
26
+ white-space: unset;
27
27
  }
28
28
 
29
29
  // 2.
30
30
  @mixin min-tap-target($size: theme.$tap-target-size, $center: true) {
31
- position: relative;
31
+ position: relative;
32
32
 
33
- &::before {
34
- content: '';
35
- position: absolute;
36
- width: $size;
37
- height: $size;
33
+ &::before {
34
+ content: "";
35
+ position: absolute;
36
+ width: $size;
37
+ height: $size;
38
38
 
39
- @if ($center) {
40
- top: 50%;
41
- left: 50%;
42
- transform: translate(-50%, -50%);
39
+ @if $center {
40
+ top: 50%;
41
+ left: 50%;
42
+ transform: translate(-50%, -50%);
43
+ }
43
44
  }
44
- }
45
45
  }
46
46
 
47
47
  @mixin focus-ring() {
48
- &:focus-visible {
49
- box-shadow: theme.$focus-box-shadow;
50
- }
48
+ &:focus-visible {
49
+ box-shadow: theme.$focus-box-shadow;
50
+ }
51
51
  }
@@ -1,18 +1,15 @@
1
- @use 'sass:map';
2
- @use '../settings/breakpoints';
1
+ @use "sass:map";
2
+ @use "../settings/breakpoints";
3
3
 
4
4
  @mixin up($breakpoint) {
5
- @if not map.has-key(breakpoints.$values, $breakpoint) {
6
- @error "Invalid breakpoint specified! #{$breakpoint} doesn't exist. Choose one of #{map.keys(breakpoints.$values)}";
7
- }
8
-
9
- @else if map.get(breakpoints.$values, $breakpoint) == 0 {
10
- @content;
11
- }
12
-
13
- @else {
14
- @media (min-width: map.get(breakpoints.$values, $breakpoint)) {
15
- @content;
5
+ @if not map.has-key(breakpoints.$values, $breakpoint) {
6
+ @error "Invalid breakpoint specified! #{$breakpoint} doesn't exist. "
7
+ + "Choose one of #{map.keys(breakpoints.$values)}";
8
+ } @else if map.get(breakpoints.$values, $breakpoint) == 0 {
9
+ @content;
10
+ } @else {
11
+ @media (min-width: map.get(breakpoints.$values, $breakpoint)) {
12
+ @content;
13
+ }
16
14
  }
17
- }
18
15
  }
@@ -1,14 +1,14 @@
1
1
  @mixin create($rotate: 0) {
2
- @include rotate();
2
+ @include rotate();
3
3
 
4
- display: inline-block;
5
- width: 0.4375rem;
6
- height: 0.4375rem;
7
- border-width: 2px;
8
- border-style: none solid solid none;
9
- border-color: currentColor;
4
+ display: inline-block;
5
+ width: 0.4375rem;
6
+ height: 0.4375rem;
7
+ border-width: 2px;
8
+ border-style: none solid solid none;
9
+ border-color: currentColor;
10
10
  }
11
11
 
12
12
  @mixin rotate($rotate: 0) {
13
- transform: translateY(-0.1rem) rotate($rotate + 45deg);
13
+ transform: translateY(-0.1rem) rotate($rotate + 45deg);
14
14
  }
@@ -1,9 +1,9 @@
1
- @use 'sass:color';
1
+ @use "sass:color";
2
2
 
3
3
  @function lighten-color($color, $weight) {
4
- @return color.mix(white, $color, $weight);
4
+ @return color.mix(white, $color, $weight);
5
5
  }
6
6
 
7
7
  @function darken-color($color, $weight) {
8
- @return color.mix(black, $color, $weight);
8
+ @return color.mix(black, $color, $weight);
9
9
  }
@@ -1,30 +1,33 @@
1
1
  @mixin button() {
2
- appearance: none;
3
- display: inline-flex;
4
- flex: none;
5
- align-items: center;
6
- justify-content: center;
7
- padding: 0;
8
- border: 0;
9
- border-radius: 0;
10
- background: none;
11
- box-shadow: none;
12
- cursor: pointer;
2
+ appearance: none;
3
+ display: inline-flex;
4
+ flex: none;
5
+ align-items: center;
6
+ justify-content: center;
7
+ padding: 0;
8
+ border: 0;
9
+ border-radius: 0;
10
+ background: none;
11
+ box-shadow: none;
12
+ cursor: pointer;
13
13
  }
14
14
 
15
15
  @mixin link() {
16
- text-decoration: none;
17
- color: inherit;
18
-
19
- &:hover,
20
- &:focus {
21
16
  text-decoration: none;
22
- outline: none;
23
- }
17
+ color: inherit;
18
+
19
+ &:hover,
20
+ &:focus {
21
+ text-decoration: none;
22
+ outline: none;
23
+ }
24
24
  }
25
25
 
26
26
  @mixin list() {
27
- padding-left: 0;
28
- margin-bottom: 0;
29
- list-style: none;
27
+ padding-left: 0;
28
+ list-style: none;
29
+
30
+ &:not(:last-child) {
31
+ margin-bottom: 0;
32
+ }
30
33
  }
@@ -1,7 +1,7 @@
1
1
  @mixin hide() {
2
- scrollbar-width: none;
2
+ scrollbar-width: none;
3
3
 
4
- &::-webkit-scrollbar {
5
- display: none;
6
- }
4
+ &::-webkit-scrollbar {
5
+ display: none;
6
+ }
7
7
  }
@@ -1,31 +1,27 @@
1
- @use 'sass:map';
2
- @use '../theme/spacing';
1
+ @use "sass:map";
2
+ @use "../theme/spacing";
3
3
 
4
4
  @function of($value) {
5
- @if ($value % 1 != 0) {
6
- @error 'Only whole numbers can be used for spacing, #{$value} given.';
7
- }
8
-
9
- @else {
10
- @if (map.has-key(spacing.$values, $value)) {
11
- @return map.get(spacing.$values, $value);
5
+ @if $value % 1 != 0 {
6
+ @error "Only whole numbers can be used for spacing, #{$value} given.";
7
+ } @else {
8
+ @if map.has-key(spacing.$values, $value) {
9
+ @return map.get(spacing.$values, $value);
10
+ }
12
11
  }
13
- }
14
12
  }
15
13
 
16
14
  @mixin bottom($category: default, $compensation: null) {
17
- @if (not map.has-key(spacing.$bottom, $category)) {
18
- @error "Invalid spacing category specified! #{$category} doesn't exist. "
19
- + "Choose one of #{map.keys(spacing.$bottom)}.";
20
- }
21
-
22
- &:not(:last-child) {
23
- @if ($compensation != null) {
24
- margin-bottom: calc(#{map.get(spacing.$bottom, $category)} - #{$compensation});
15
+ @if not map.has-key(spacing.$bottom, $category) {
16
+ @error "Invalid spacing category specified! #{$category} doesn't exist. "
17
+ + "Choose one of #{map.keys(spacing.$bottom)}.";
25
18
  }
26
19
 
27
- @else {
28
- margin-bottom: map.get(spacing.$bottom, $category);
20
+ &:not(:last-child) {
21
+ @if $compensation {
22
+ margin-bottom: calc(#{map.get(spacing.$bottom, $category)} - #{$compensation});
23
+ } @else {
24
+ margin-bottom: map.get(spacing.$bottom, $category);
25
+ }
29
26
  }
30
- }
31
27
  }
@@ -1,15 +1,15 @@
1
1
  // Author: Hugo Giraudel
2
2
 
3
- @use 'sass:string';
3
+ @use "sass:string";
4
4
 
5
- @function replace($string, $search, $replace: '') {
6
- $index: string.index($string, $search);
5
+ @function replace($string, $search, $replace: "") {
6
+ $index: string.index($string, $search);
7
7
 
8
- @if $index {
9
- @return string.slice($string, 1, $index - 1)
10
- + $replace
11
- + replace(string.slice($string, $index + string.length($search)), $search, $replace);
12
- }
8
+ @if $index {
9
+ @return string.slice($string, 1, $index - 1)
10
+ + $replace
11
+ + replace(string.slice($string, $index + string.length($search)), $search, $replace);
12
+ }
13
13
 
14
- @return $string;
14
+ @return $string;
15
15
  }
@@ -2,24 +2,21 @@
2
2
  //
3
3
  // 1. Do not escape the url brackets.
4
4
 
5
- @use 'sass:string';
6
- @use '../settings/escaped-characters';
7
- @use 'string' as rui-string;
5
+ @use "sass:string";
6
+ @use "../settings/escaped-characters";
7
+ @use "string" as rui-string;
8
8
 
9
9
  @function escape($string) {
10
- @if string.index($string, 'data:image/svg+xml') {
11
- @each $char, $encoded in escaped-characters.$map {
12
-
13
- // 1.
14
- @if string.index($string, 'url(') == 1 {
15
- $string: url('#{rui-string.replace(string.slice($string, 6, -3), $char, $encoded)}');
16
- }
17
-
18
- @else {
19
- $string: rui-string.replace($string, $char, $encoded);
20
- }
10
+ @if string.index($string, "data:image/svg+xml") {
11
+ @each $char, $encoded in escaped-characters.$map {
12
+ // 1.
13
+ @if string.index($string, "url(") == 1 {
14
+ $string: url("#{rui-string.replace(string.slice($string, 6, -3), $char, $encoded)}");
15
+ } @else {
16
+ $string: rui-string.replace($string, $char, $encoded);
17
+ }
18
+ }
21
19
  }
22
- }
23
20
 
24
- @return $string;
21
+ @return $string;
25
22
  }
@@ -1,70 +1,68 @@
1
- @use 'sass:list';
2
- @use 'sass:meta';
3
- @use 'sass:string';
4
- @use '../settings/animations';
1
+ @use "sass:list";
2
+ @use "sass:meta";
3
+ @use "sass:string";
4
+ @use "../settings/animations";
5
5
 
6
6
  $_allowed-transitions: (
7
- border-color,
8
- background-color,
9
- background-position,
10
- box-shadow,
11
- color,
12
- opacity,
13
- transform,
14
- visibility,
7
+ border-color,
8
+ background-color,
9
+ background-position,
10
+ box-shadow,
11
+ color,
12
+ opacity,
13
+ transform,
14
+ visibility,
15
15
  );
16
16
 
17
17
  $_reduced-motion-disallowed-transitions: (transform);
18
18
 
19
19
  @function _validate-transitions($properties) {
20
- @each $property in $properties {
21
- $is-allowed: list.index($_allowed-transitions, $property);
20
+ @each $property in $properties {
21
+ $is-allowed: list.index($_allowed-transitions, $property);
22
22
 
23
- @if not $is-allowed {
24
- @return false;
23
+ @if not $is-allowed {
24
+ @return false;
25
+ }
25
26
  }
26
- }
27
27
 
28
- @return true;
28
+ @return true;
29
29
  }
30
30
 
31
31
  @function _reduce-motion-transitions($properties) {
32
- $reduced-properties: ();
33
- $separator: list.separator($properties);
32
+ $reduced-properties: ();
33
+ $separator: list.separator($properties);
34
34
 
35
- @each $property in $properties {
36
- @if not list.index($_reduced-motion-disallowed-transitions, $property) {
37
- $reduced-properties: list.append($reduced-properties, $property, $separator: $separator);
35
+ @each $property in $properties {
36
+ @if not list.index($_reduced-motion-disallowed-transitions, $property) {
37
+ $reduced-properties: list.append($reduced-properties, $property, $separator: $separator);
38
+ }
38
39
  }
39
- }
40
40
 
41
- @return $reduced-properties;
41
+ @return $reduced-properties;
42
42
  }
43
43
 
44
44
  @mixin add($properties, $duration: 150ms) {
45
- $property-list: ();
45
+ $property-list: ();
46
46
 
47
- @if meta.type-of($properties) != 'string' and meta.type-of($properties) != 'list' {
48
- @error "Transition properties must be a string or a Sass list, `#{$properties}` given.";
49
- }
50
-
51
- $property-list: list.join($property-list, $properties);
47
+ @if meta.type-of($properties) != "string" and meta.type-of($properties) != "list" {
48
+ @error "Transition properties must be a string or a Sass list, `#{$properties}` given.";
49
+ }
52
50
 
53
- @if not _validate-transitions($property-list) {
54
- @error "Only [#{$_allowed-transitions}] transitions are allowed, [#{$properties}] given.";
55
- }
51
+ $property-list: list.join($property-list, $properties);
56
52
 
57
- @else {
58
- $reduced-property-list: _reduce-motion-transitions($property-list);
53
+ @if not _validate-transitions($property-list) {
54
+ @error "Only [#{$_allowed-transitions}] transitions are allowed, [#{$properties}] given.";
55
+ } @else {
56
+ $reduced-property-list: _reduce-motion-transitions($property-list);
59
57
 
60
- transition-property: $property-list;
61
- transition-duration: $duration;
62
- transition-timing-function: animations.$standard-timing-function;
58
+ transition-property: $property-list;
59
+ transition-duration: $duration;
60
+ transition-timing-function: animations.$standard-timing-function;
63
61
 
64
- @if (list.length($reduced-property-list) > 0) {
65
- @media (prefers-reduced-motion: reduce) {
66
- transition-property: $reduced-property-list;
67
- }
62
+ @if list.length($reduced-property-list) > 0 {
63
+ @media (prefers-reduced-motion: reduce) {
64
+ transition-property: $reduced-property-list;
65
+ }
66
+ }
68
67
  }
69
- }
70
68
  }