@react-ui-org/react-ui 0.44.1 → 0.45.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 (139) hide show
  1. package/dist/lib.development.js +138 -258
  2. package/dist/lib.js +1 -1
  3. package/package.json +7 -10
  4. package/src/lib/components/Alert/Alert.jsx +4 -3
  5. package/src/lib/components/Alert/Alert.scss +48 -48
  6. package/src/lib/components/Alert/_settings.scss +4 -4
  7. package/src/lib/components/Alert/_theme.scss +50 -50
  8. package/src/lib/components/Alert/_tools.scss +6 -6
  9. package/src/lib/components/Badge/Badge.jsx +5 -4
  10. package/src/lib/components/Badge/Badge.scss +57 -57
  11. package/src/lib/components/Button/Button.jsx +10 -9
  12. package/src/lib/components/Button/Button.scss +2 -2
  13. package/src/lib/components/Button/README.mdx +6 -1
  14. package/src/lib/components/Button/_base.scss +65 -65
  15. package/src/lib/components/Button/_priorities.scss +49 -49
  16. package/src/lib/components/Button/_settings.scss +10 -10
  17. package/src/lib/components/Button/_theme.scss +18 -15
  18. package/src/lib/components/Button/_tools.scss +98 -100
  19. package/src/lib/components/ButtonGroup/ButtonGroup.jsx +4 -3
  20. package/src/lib/components/ButtonGroup/ButtonGroup.scss +3 -3
  21. package/src/lib/components/Card/Card.jsx +7 -6
  22. package/src/lib/components/Card/Card.scss +28 -28
  23. package/src/lib/components/Card/_theme.scss +50 -50
  24. package/src/lib/components/Card/_tools.scss +6 -6
  25. package/src/lib/components/CheckboxField/CheckboxField.jsx +12 -11
  26. package/src/lib/components/CheckboxField/CheckboxField.scss +20 -20
  27. package/src/lib/components/FileInputField/FileInputField.jsx +13 -12
  28. package/src/lib/components/FileInputField/FileInputField.scss +19 -19
  29. package/src/lib/components/FormLayout/FormLayout.jsx +5 -4
  30. package/src/lib/components/FormLayout/FormLayout.scss +17 -17
  31. package/src/lib/components/FormLayout/FormLayoutCustomField.jsx +9 -8
  32. package/src/lib/components/FormLayout/FormLayoutCustomField.scss +18 -18
  33. package/src/lib/components/FormLayout/README.mdx +16 -36
  34. package/src/lib/components/Grid/Grid.jsx +1 -1
  35. package/src/lib/components/Grid/Grid.scss +28 -30
  36. package/src/lib/components/Grid/GridSpan.jsx +1 -1
  37. package/src/lib/components/Grid/{helpers → _helpers}/generateResponsiveCustomProperties.js +0 -2
  38. package/src/lib/components/Grid/_theme.scss +9 -9
  39. package/src/lib/components/Grid/_tools.scss +20 -20
  40. package/src/lib/components/Link/Link.jsx +1 -1
  41. package/src/lib/components/Link/Link.scss +7 -7
  42. package/src/lib/components/List/List.jsx +11 -10
  43. package/src/lib/components/List/List.scss +21 -21
  44. package/src/lib/components/Media/Media.scss +6 -6
  45. package/src/lib/components/Modal/Modal.jsx +6 -5
  46. package/src/lib/components/Modal/Modal.scss +73 -73
  47. package/src/lib/components/Modal/_settings.scss +5 -5
  48. package/src/lib/components/Modal/_theme.scss +17 -17
  49. package/src/lib/components/Paper/Paper.jsx +5 -4
  50. package/src/lib/components/Paper/Paper.scss +8 -8
  51. package/src/lib/components/Radio/Radio.jsx +12 -11
  52. package/src/lib/components/Radio/Radio.scss +26 -26
  53. package/src/lib/components/ScrollView/ScrollView.jsx +9 -8
  54. package/src/lib/components/ScrollView/ScrollView.scss +113 -113
  55. package/src/lib/{services/elementPositionService.js → components/ScrollView/_helpers/getElementsPositionDifference.js} +0 -2
  56. package/src/lib/{hooks → components/ScrollView/_hooks}/useLoadResizeHook.js +1 -1
  57. package/src/lib/{hooks → components/ScrollView/_hooks}/useScrollPositionHook.js +1 -1
  58. package/src/lib/components/SelectField/SelectField.jsx +14 -13
  59. package/src/lib/components/SelectField/SelectField.scss +30 -30
  60. package/src/lib/components/Table/Table.scss +28 -35
  61. package/src/lib/components/Table/_settings.scss +5 -5
  62. package/src/lib/components/Tabs/Tabs.scss +21 -21
  63. package/src/lib/components/Tabs/TabsItem.jsx +4 -3
  64. package/src/lib/components/Tabs/TabsItem.scss +78 -78
  65. package/src/lib/components/Text/Text.jsx +5 -4
  66. package/src/lib/components/Text/Text.scss +12 -12
  67. package/src/lib/components/Text/{helpers → _helpers}/getRootHyphensClassName.js +1 -1
  68. package/src/lib/components/Text/{helpers → _helpers}/getRootWordWrappingClassName.js +1 -1
  69. package/src/lib/components/TextArea/TextArea.jsx +14 -13
  70. package/src/lib/components/TextArea/TextArea.scss +27 -27
  71. package/src/lib/components/TextField/TextField.jsx +16 -15
  72. package/src/lib/components/TextField/TextField.scss +28 -28
  73. package/src/lib/components/Toggle/Toggle.jsx +12 -11
  74. package/src/lib/components/Toggle/Toggle.scss +20 -20
  75. package/src/lib/components/Toolbar/Toolbar.jsx +5 -4
  76. package/src/lib/components/Toolbar/Toolbar.scss +25 -25
  77. package/src/lib/components/Toolbar/ToolbarGroup.jsx +5 -4
  78. package/src/lib/{helpers → components/_helpers}/getRootColorClassName.js +1 -1
  79. package/src/lib/{helpers → components/_helpers}/getRootSizeClassName.js +1 -1
  80. package/src/lib/{helpers → components/_helpers}/getRootValidationStateClassName.js +1 -1
  81. package/src/lib/{helpers → components/_helpers}/resolveContextOrProp.js +0 -0
  82. package/src/lib/{utils → components/_helpers}/transferProps.js +1 -1
  83. package/src/lib/foundation.scss +11 -11
  84. package/src/lib/helpers.scss +2 -2
  85. package/src/lib/index.js +3 -7
  86. package/src/lib/styles/_utilities.scss +13 -13
  87. package/src/lib/styles/elements/_code.scss +7 -7
  88. package/src/lib/styles/elements/_links.scss +8 -8
  89. package/src/lib/styles/elements/_lists.scss +3 -3
  90. package/src/lib/styles/elements/_page.scss +14 -14
  91. package/src/lib/styles/elements/_rulers.scss +6 -6
  92. package/src/lib/styles/elements/_small.scss +2 -2
  93. package/src/lib/styles/generic/_box-sizing.scss +3 -2
  94. package/src/lib/styles/generic/_forms.scss +3 -3
  95. package/src/lib/styles/generic/_reset.scss +6 -6
  96. package/src/lib/styles/generic/_shared.scss +3 -3
  97. package/src/lib/styles/helpers/_animation.scss +8 -8
  98. package/src/lib/styles/settings/_breakpoints.scss +7 -7
  99. package/src/lib/styles/settings/_escaped-characters.scss +5 -5
  100. package/src/lib/styles/settings/_form-fields.scss +24 -24
  101. package/src/lib/styles/settings/_utilities.scss +112 -100
  102. package/src/lib/styles/theme/_colors.scss +50 -50
  103. package/src/lib/styles/theme/_form-fields.scss +32 -32
  104. package/src/lib/styles/theme/_spacing.scss +11 -11
  105. package/src/lib/styles/theme/_typography.scss +12 -11
  106. package/src/lib/styles/theme-constants/_breakpoints.scss +2 -2
  107. package/src/lib/styles/theme-constants/_colors.scss +2 -2
  108. package/src/lib/styles/theme-constants/_svg.scss +1 -2
  109. package/src/lib/styles/tools/_accessibility.scss +29 -29
  110. package/src/lib/styles/tools/_breakpoint.scss +11 -14
  111. package/src/lib/styles/tools/_caret.scss +8 -8
  112. package/src/lib/styles/tools/_colors.scss +3 -3
  113. package/src/lib/styles/tools/_reset.scss +21 -21
  114. package/src/lib/styles/tools/_scrollbar.scss +4 -4
  115. package/src/lib/styles/tools/_spacing.scss +17 -21
  116. package/src/lib/styles/tools/_string.scss +9 -9
  117. package/src/lib/styles/tools/_svg.scss +13 -16
  118. package/src/lib/styles/tools/_transition.scss +42 -44
  119. package/src/lib/styles/tools/_utilities.scss +19 -19
  120. package/src/lib/styles/tools/form-fields/_box-field-elements.scss +88 -88
  121. package/src/lib/styles/tools/form-fields/_box-field-layout.scss +144 -144
  122. package/src/lib/styles/tools/form-fields/_box-field-sizes.scss +13 -15
  123. package/src/lib/styles/tools/form-fields/_foundation.scss +12 -12
  124. package/src/lib/styles/tools/form-fields/_inline-field-elements.scss +71 -71
  125. package/src/lib/styles/tools/form-fields/_inline-field-layout.scss +44 -44
  126. package/src/lib/styles/tools/form-fields/_variants.scss +104 -106
  127. package/src/lib/theme.scss +958 -954
  128. package/src/lib/utils/classNames.js +8 -0
  129. package/src/lib/components/CTA/CTA.jsx +0 -60
  130. package/src/lib/components/CTA/CTA.scss +0 -71
  131. package/src/lib/components/CTA/CTACenter.jsx +0 -27
  132. package/src/lib/components/CTA/CTAEnd.jsx +0 -27
  133. package/src/lib/components/CTA/CTAStart.jsx +0 -27
  134. package/src/lib/components/CTA/README.mdx +0 -119
  135. package/src/lib/components/CTA/index.js +0 -4
  136. package/src/lib/components/Center/Center.jsx +0 -27
  137. package/src/lib/components/Center/Center.scss +0 -7
  138. package/src/lib/components/Center/README.mdx +0 -52
  139. package/src/lib/components/Center/index.js +0 -1
@@ -1,102 +1,102 @@
1
- @use '../../styles/tools/form-fields/box-field-elements';
2
- @use '../../styles/tools/form-fields/box-field-layout';
3
- @use '../../styles/tools/form-fields/box-field-sizes';
4
- @use '../../styles/tools/form-fields/foundation';
5
- @use '../../styles/tools/form-fields/variants';
6
- @use '../../styles/tools/accessibility';
1
+ @use "../../styles/tools/form-fields/box-field-elements";
2
+ @use "../../styles/tools/form-fields/box-field-layout";
3
+ @use "../../styles/tools/form-fields/box-field-sizes";
4
+ @use "../../styles/tools/form-fields/foundation";
5
+ @use "../../styles/tools/form-fields/variants";
6
+ @use "../../styles/tools/accessibility";
7
7
 
8
8
  // Foundation
9
9
  .root {
10
- @include foundation.root();
10
+ @include foundation.root();
11
11
  }
12
12
 
13
13
  .label {
14
- @include foundation.label();
14
+ @include foundation.label();
15
15
  }
16
16
 
17
17
  .inputContainer {
18
- @include box-field-elements.input-container();
18
+ @include box-field-elements.input-container();
19
19
  }
20
20
 
21
21
  .input {
22
- @include box-field-elements.input();
22
+ @include box-field-elements.input();
23
23
  }
24
24
 
25
25
  .bottomLine {
26
- @include box-field-elements.bottom-line();
26
+ @include box-field-elements.bottom-line();
27
27
  }
28
28
 
29
29
  .helpText,
30
30
  .validationText {
31
- @include foundation.help-text();
31
+ @include foundation.help-text();
32
32
  }
33
33
 
34
34
  .hasRootCustomInputSize .input {
35
- @include box-field-elements.input-size();
35
+ @include box-field-elements.input-size();
36
36
  }
37
37
 
38
38
  .isRootRequired .label {
39
- @include foundation.label-required();
39
+ @include foundation.label-required();
40
40
  }
41
41
 
42
42
  // Variants
43
43
  .rootVariantFilled {
44
- @include variants.visual(box, $variant: filled);
44
+ @include variants.visual(box, $variant: filled);
45
45
  }
46
46
 
47
47
  .rootVariantOutline {
48
- @include variants.visual(box, $variant: outline);
48
+ @include variants.visual(box, $variant: outline);
49
49
  }
50
50
 
51
51
  // States
52
52
  .isRootStateInvalid {
53
- @include variants.validation(invalid);
53
+ @include variants.validation(invalid);
54
54
  }
55
55
 
56
56
  .isRootStateValid {
57
- @include variants.validation(valid);
57
+ @include variants.validation(valid);
58
58
  }
59
59
 
60
60
  .isRootStateWarning {
61
- @include variants.validation(warning);
61
+ @include variants.validation(warning);
62
62
  }
63
63
 
64
64
  // Invisible label
65
65
  .isLabelHidden {
66
- @include accessibility.hide-text();
66
+ @include accessibility.hide-text();
67
67
  }
68
68
 
69
69
  // Layouts
70
70
  .rootLayoutVertical,
71
71
  .rootLayoutHorizontal {
72
- @include box-field-layout.vertical();
72
+ @include box-field-layout.vertical();
73
73
  }
74
74
 
75
75
  .rootLayoutHorizontal {
76
- @include box-field-layout.horizontal();
76
+ @include box-field-layout.horizontal();
77
77
  }
78
78
 
79
79
  .isRootFullWidth {
80
- @include box-field-layout.full-width();
80
+ @include box-field-layout.full-width();
81
81
  }
82
82
 
83
83
  .isRootInFormLayout {
84
- @include box-field-layout.in-form-layout();
84
+ @include box-field-layout.in-form-layout();
85
85
  }
86
86
 
87
87
  .hasRootSmallInput.rootLayoutHorizontal {
88
- @include box-field-layout.horizontal-with-small-input();
88
+ @include box-field-layout.horizontal-with-small-input();
89
89
  }
90
90
 
91
91
  // Sizes
92
92
  .rootSizeSmall {
93
- @include box-field-sizes.size(small);
93
+ @include box-field-sizes.size(small);
94
94
  }
95
95
 
96
96
  .rootSizeMedium {
97
- @include box-field-sizes.size(medium);
97
+ @include box-field-sizes.size(medium);
98
98
  }
99
99
 
100
100
  .rootSizeLarge {
101
- @include box-field-sizes.size(large);
101
+ @include box-field-sizes.size(large);
102
102
  }
@@ -1,8 +1,9 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
- import getRootValidationStateClassName from '../../helpers/getRootValidationStateClassName';
4
3
  import { withProviderContext } from '../../provider';
5
- import transferProps from '../../utils/transferProps';
4
+ import { classNames } from '../../utils/classNames';
5
+ import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
6
+ import { transferProps } from '../_helpers/transferProps';
6
7
  import { FormLayoutContext } from '../FormLayout';
7
8
  import withForwardedRef from '../withForwardedRef';
8
9
  import styles from './Toggle.scss';
@@ -26,15 +27,15 @@ export const Toggle = ({
26
27
 
27
28
  return (
28
29
  <label
29
- className={[
30
+ className={classNames(
30
31
  styles.root,
31
- context ? styles.isRootInFormLayout : '',
32
+ context && styles.isRootInFormLayout,
32
33
  context && context.layout === 'horizontal' ? styles.rootLayoutHorizontal : styles.rootLayoutVertical,
33
- labelPosition === 'before' ? styles.hasRootLabelBefore : '',
34
- disabled ? styles.isRootDisabled : '',
35
- required ? styles.isRootRequired : '',
34
+ labelPosition === 'before' && styles.hasRootLabelBefore,
35
+ disabled && styles.isRootDisabled,
36
+ required && styles.isRootRequired,
36
37
  getRootValidationStateClassName(validationState, styles),
37
- ].join(' ')}
38
+ )}
38
39
  htmlFor={id}
39
40
  id={id && `${id}__label`}
40
41
  >
@@ -52,10 +53,10 @@ export const Toggle = ({
52
53
  value={value}
53
54
  />
54
55
  <div
55
- className={[
56
+ className={classNames(
56
57
  styles.label,
57
- isLabelVisible ? '' : styles.isLabelHidden,
58
- ].join(' ')}
58
+ !isLabelVisible && styles.isLabelHidden,
59
+ )}
59
60
  id={id && `${id}__labelText`}
60
61
  >
61
62
  {label}
@@ -1,61 +1,61 @@
1
- @use '../../styles/tools/form-fields/foundation';
2
- @use '../../styles/tools/form-fields/inline-field-elements';
3
- @use '../../styles/tools/form-fields/inline-field-layout';
4
- @use '../../styles/tools/form-fields/variants';
5
- @use '../../styles/tools/accessibility';
1
+ @use "../../styles/tools/form-fields/foundation";
2
+ @use "../../styles/tools/form-fields/inline-field-elements";
3
+ @use "../../styles/tools/form-fields/inline-field-layout";
4
+ @use "../../styles/tools/form-fields/variants";
5
+ @use "../../styles/tools/accessibility";
6
6
 
7
7
  // Foundation
8
8
  .root {
9
- @include foundation.root();
10
- @include inline-field-layout.root();
11
- @include inline-field-elements.min-tap-target($type: toggle);
12
- @include variants.visual(check);
9
+ @include foundation.root();
10
+ @include inline-field-layout.root();
11
+ @include inline-field-elements.min-tap-target($type: toggle);
12
+ @include variants.visual(check);
13
13
  }
14
14
 
15
15
  .label {
16
- @include foundation.label();
16
+ @include foundation.label();
17
17
  }
18
18
 
19
19
  .field {
20
- @include inline-field-layout.field();
20
+ @include inline-field-layout.field();
21
21
  }
22
22
 
23
23
  .input {
24
- @include inline-field-elements.check-input($type: toggle);
24
+ @include inline-field-elements.check-input($type: toggle);
25
25
  }
26
26
 
27
27
  .helpText,
28
28
  .validationText {
29
- @include foundation.help-text();
29
+ @include foundation.help-text();
30
30
  }
31
31
 
32
32
  .isRootRequired .label {
33
- @include foundation.label-required();
33
+ @include foundation.label-required();
34
34
  }
35
35
 
36
36
  // States
37
37
  .isRootStateInvalid {
38
- @include variants.validation(invalid);
38
+ @include variants.validation(invalid);
39
39
  }
40
40
 
41
41
  .isRootStateValid {
42
- @include variants.validation(valid);
42
+ @include variants.validation(valid);
43
43
  }
44
44
 
45
45
  .isRootStateWarning {
46
- @include variants.validation(warning);
46
+ @include variants.validation(warning);
47
47
  }
48
48
 
49
49
  // Invisible label
50
50
  .isLabelHidden {
51
- @include accessibility.hide-text();
51
+ @include accessibility.hide-text();
52
52
  }
53
53
 
54
54
  // Layouts
55
55
  .hasRootLabelBefore {
56
- @include inline-field-layout.has-label-before();
56
+ @include inline-field-layout.has-label-before();
57
57
  }
58
58
 
59
59
  .isRootInFormLayout {
60
- @include inline-field-layout.in-form-layout();
60
+ @include inline-field-layout.in-form-layout();
61
61
  }
@@ -1,6 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withProviderContext } from '../../provider';
4
+ import { classNames } from '../../utils/classNames';
4
5
  import styles from './Toolbar.scss';
5
6
 
6
7
  export const Toolbar = (props) => {
@@ -46,13 +47,13 @@ export const Toolbar = (props) => {
46
47
 
47
48
  return (
48
49
  <div
49
- className={[
50
+ className={classNames(
50
51
  styles.toolbar,
51
- dense ? styles.isDense : null,
52
- nowrap ? styles.isNowrap : null,
52
+ dense && styles.isDense,
53
+ nowrap && styles.isNowrap,
53
54
  alignClass(align),
54
55
  justifyClass(justify),
55
- ].join(' ')}
56
+ )}
56
57
  >
57
58
  {children}
58
59
  </div>
@@ -1,84 +1,84 @@
1
1
  // 1. Get rid of unwanted spacing of inline elements by invocation of flex layout.
2
2
 
3
- @use '../../styles/tools/spacing';
4
- @use 'theme';
3
+ @use "../../styles/tools/spacing";
4
+ @use "theme";
5
5
 
6
6
  .toolbar,
7
7
  .group {
8
- display: flex;
9
- flex-wrap: wrap;
8
+ display: flex;
9
+ flex-wrap: wrap;
10
10
  }
11
11
 
12
12
  .toolbar {
13
- @include spacing.bottom(layouts, $compensation: theme.$gap);
13
+ @include spacing.bottom(layouts, $compensation: theme.$gap);
14
14
 
15
- margin: calc(-1 * #{theme.$gap});
15
+ margin: calc(-1 * #{theme.$gap});
16
16
  }
17
17
 
18
18
  .item {
19
- display: flex; // 1.
20
- flex: none;
21
- flex-direction: column; // 1.
22
- margin: theme.$gap;
19
+ display: flex; // 1.
20
+ flex: none;
21
+ flex-direction: column; // 1.
22
+ margin: theme.$gap;
23
23
  }
24
24
 
25
25
  .isAlignedToTop {
26
- align-items: flex-start;
26
+ align-items: flex-start;
27
27
  }
28
28
 
29
29
  .isAlignedToMiddle {
30
- align-items: center;
30
+ align-items: center;
31
31
  }
32
32
 
33
33
  .isAlignedToBottom {
34
- align-items: flex-end;
34
+ align-items: flex-end;
35
35
  }
36
36
 
37
37
  .isAlignedToBaseline {
38
- align-items: baseline;
38
+ align-items: baseline;
39
39
  }
40
40
 
41
41
  .isJustifiedToStart {
42
- justify-content: flex-start;
42
+ justify-content: flex-start;
43
43
  }
44
44
 
45
45
  .isJustifiedToCenter {
46
- justify-content: center;
46
+ justify-content: center;
47
47
  }
48
48
 
49
49
  .isJustifiedToEnd {
50
- justify-content: flex-end;
50
+ justify-content: flex-end;
51
51
  }
52
52
 
53
53
  .isJustifiedToSpaceBetween {
54
- justify-content: space-between;
54
+ justify-content: space-between;
55
55
  }
56
56
 
57
57
  .isNowrap {
58
- flex-wrap: nowrap;
58
+ flex-wrap: nowrap;
59
59
  }
60
60
 
61
61
  .isNowrap > .item {
62
- flex: 0 1 auto;
62
+ flex: 0 1 auto;
63
63
  }
64
64
 
65
65
  .isDense {
66
- margin: calc(-1 * #{theme.$gap-dense});
66
+ margin: calc(-1 * #{theme.$gap-dense});
67
67
  }
68
68
 
69
69
  .isDense .item {
70
- margin: theme.$gap-dense;
70
+ margin: theme.$gap-dense;
71
71
  }
72
72
 
73
73
  .isDense > .isDense {
74
- margin: 0;
74
+ margin: 0;
75
75
  }
76
76
 
77
77
  .toolbar.isDense {
78
- @include spacing.bottom(layouts, $compensation: theme.$gap-dense);
78
+ @include spacing.bottom(layouts, $compensation: theme.$gap-dense);
79
79
  }
80
80
 
81
81
  .toolbar:not(.isDense) > .isDense,
82
82
  .group:not(.isDense) > .isDense {
83
- margin: theme.$gap-dense;
83
+ margin: theme.$gap-dense;
84
84
  }
@@ -1,6 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withProviderContext } from '../../provider';
4
+ import { classNames } from '../../utils/classNames';
4
5
  import styles from './Toolbar.scss';
5
6
 
6
7
  export const ToolbarGroup = (props) => {
@@ -29,12 +30,12 @@ export const ToolbarGroup = (props) => {
29
30
 
30
31
  return (
31
32
  <div
32
- className={[
33
+ className={classNames(
33
34
  styles.group,
34
- dense ? styles.isDense : null,
35
- nowrap ? styles.isNowrap : null,
35
+ dense && styles.isDense,
36
+ nowrap && styles.isNowrap,
36
37
  alignClass(align),
37
- ].join(' ')}
38
+ )}
38
39
  >
39
40
  {children}
40
41
  </div>
@@ -1,4 +1,4 @@
1
- export default (variant, styles) => {
1
+ export const getRootColorClassName = (variant, styles) => {
2
2
  if (variant === 'primary') {
3
3
  return styles.rootColorPrimary;
4
4
  }
@@ -1,4 +1,4 @@
1
- export default (size, styles) => {
1
+ export const getRootSizeClassName = (size, styles) => {
2
2
  if (size === 'small') {
3
3
  return styles.rootSizeSmall;
4
4
  }
@@ -1,4 +1,4 @@
1
- export default (validationState, styles) => {
1
+ export const getRootValidationStateClassName = (validationState, styles) => {
2
2
  if (validationState === 'invalid') {
3
3
  return styles.isRootStateInvalid;
4
4
  }
@@ -1,4 +1,4 @@
1
- export default ({
1
+ export const transferProps = ({
2
2
  children,
3
3
  className,
4
4
  forwardedRef,
@@ -7,11 +7,11 @@
7
7
  //
8
8
  // Ground-zero styles.
9
9
 
10
- @use 'styles/generic/box-sizing';
11
- @use 'normalize.css/normalize.css';
12
- @use 'styles/generic/forms';
13
- @use 'styles/generic/reset';
14
- @use 'styles/generic/shared';
10
+ @use "styles/generic/box-sizing";
11
+ @use "normalize.css/normalize.css";
12
+ @use "styles/generic/forms";
13
+ @use "styles/generic/reset";
14
+ @use "styles/generic/shared";
15
15
 
16
16
  //
17
17
  // 2. Elements
@@ -19,9 +19,9 @@
19
19
  //
20
20
  // Unclassed HTML elements (type selectors).
21
21
 
22
- @use 'styles/elements/code';
23
- @use 'styles/elements/links';
24
- @use 'styles/elements/lists';
25
- @use 'styles/elements/page';
26
- @use 'styles/elements/rulers';
27
- @use 'styles/elements/small';
22
+ @use "styles/elements/code";
23
+ @use "styles/elements/links";
24
+ @use "styles/elements/lists";
25
+ @use "styles/elements/page";
26
+ @use "styles/elements/rulers";
27
+ @use "styles/elements/small";
@@ -9,7 +9,7 @@
9
9
  // General purpose helpers for common situations. They can compose multiple CSS rules to do a bit
10
10
  // more complicated tasks.
11
11
 
12
- @use 'styles/helpers/animation';
12
+ @use "styles/helpers/animation";
13
13
 
14
14
  //
15
15
  // 2. Utilities
@@ -19,4 +19,4 @@
19
19
  // thing: they set a single CSS rule and use the otherwise disallowed `!important` to enforce it.
20
20
  // Also they are often responsive (can be adjusted for individual breakpoints).
21
21
 
22
- @use 'styles/utilities';
22
+ @use "styles/utilities";
package/src/lib/index.js CHANGED
@@ -8,14 +8,7 @@ export {
8
8
  CardBody,
9
9
  CardFooter,
10
10
  } from './components/Card';
11
- export { default as Center } from './components/Center';
12
11
  export { default as CheckboxField } from './components/CheckboxField';
13
- export {
14
- CTA,
15
- CTACenter,
16
- CTAEnd,
17
- CTAStart,
18
- } from './components/CTA';
19
12
  export { default as FileInputField } from './components/FileInputField';
20
13
  export {
21
14
  FormLayout,
@@ -57,3 +50,6 @@ export {
57
50
 
58
51
  // Provider
59
52
  export { RUIProvider } from './provider';
53
+
54
+ // Utils
55
+ export { classNames } from './utils/classNames';
@@ -1,18 +1,18 @@
1
- @use 'sass:map';
2
- @use 'sass:meta';
3
- @use 'settings/breakpoints' as breakpoint-settings;
4
- @use 'settings/utilities' as utility-settings;
5
- @use 'tools/breakpoint';
6
- @use 'tools/utilities';
1
+ @use "sass:map";
2
+ @use "sass:meta";
3
+ @use "settings/breakpoints" as breakpoint-settings;
4
+ @use "settings/utilities" as utility-settings;
5
+ @use "tools/breakpoint";
6
+ @use "tools/utilities";
7
7
 
8
8
  @each $breakpoint in map.keys(breakpoint-settings.$values) {
9
- @include breakpoint.up($breakpoint) {
10
- $infix: if(map.get(breakpoint-settings.$values, $breakpoint) == 0, '', '-#{$breakpoint}');
9
+ @include breakpoint.up($breakpoint) {
10
+ $infix: if(map.get(breakpoint-settings.$values, $breakpoint) == 0, "", "-#{$breakpoint}");
11
11
 
12
- @each $key, $utility in utility-settings.$map {
13
- @if meta.type-of($utility) == 'map' and (map.get($utility, responsive) == true or $infix == '') {
14
- @include utilities.generate($utility, $infix);
15
- }
12
+ @each $key, $utility in utility-settings.$map {
13
+ @if meta.type-of($utility) == "map" and (map.get($utility, responsive) == true or $infix == "") {
14
+ @include utilities.generate($utility, $infix);
15
+ }
16
+ }
16
17
  }
17
- }
18
18
  }
@@ -1,14 +1,14 @@
1
- @use 'sass:map';
2
- @use '../theme/code';
3
- @use '../theme/colors';
1
+ @use "sass:map";
2
+ @use "../theme/code";
3
+ @use "../theme/colors";
4
4
 
5
5
  code,
6
6
  pre {
7
- font-size: code.$font-size;
8
- font-family: code.$font-family;
7
+ font-size: code.$font-size;
8
+ font-family: code.$font-family;
9
9
  }
10
10
 
11
11
  code {
12
- padding: 0.15em 0.5em;
13
- background-color: map.get(colors.$grays, gray-100);
12
+ padding: 0.15em 0.5em;
13
+ background-color: map.get(colors.$grays, gray-100);
14
14
  }
@@ -1,12 +1,12 @@
1
- @use '../theme/links';
1
+ @use "../theme/links";
2
2
 
3
3
  a {
4
- text-decoration: links.$decoration;
5
- color: links.$color;
4
+ text-decoration: links.$decoration;
5
+ color: links.$color;
6
6
 
7
- &:hover,
8
- &:focus {
9
- text-decoration: links.$hover-decoration;
10
- color: links.$hover-color;
11
- }
7
+ &:hover,
8
+ &:focus {
9
+ text-decoration: links.$hover-decoration;
10
+ color: links.$hover-color;
11
+ }
12
12
  }
@@ -1,10 +1,10 @@
1
- @use '../theme/lists';
1
+ @use "../theme/lists";
2
2
 
3
3
  ol,
4
4
  ul {
5
- padding-left: 1.25em;
5
+ padding-left: 1.25em;
6
6
  }
7
7
 
8
8
  ul {
9
- list-style-type: lists.$unordered-style;
9
+ list-style-type: lists.$unordered-style;
10
10
  }
@@ -1,20 +1,20 @@
1
- @use '../theme/page';
2
- @use '../theme/typography';
1
+ @use "../theme/page";
2
+ @use "../theme/typography";
3
3
 
4
4
  html {
5
- width: 100%;
6
- height: 100%;
7
- -moz-osx-font-smoothing: grayscale;
8
- -webkit-font-smoothing: antialiased;
9
- font-size: typography.$font-size-base;
10
- line-height: typography.$line-height-base;
11
- font-family: typography.$font-family-base;
5
+ width: 100%;
6
+ height: 100%;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ -webkit-font-smoothing: antialiased;
9
+ font-size: typography.$font-size-base;
10
+ line-height: typography.$line-height-base;
11
+ font-family: typography.$font-family-base;
12
12
  }
13
13
 
14
14
  body {
15
- width: 100%;
16
- min-height: 100%;
17
- font-size: 1em;
18
- color: page.$color;
19
- background-color: page.$background;
15
+ width: 100%;
16
+ min-height: 100%;
17
+ font-size: 1em;
18
+ color: page.$color;
19
+ background-color: page.$background;
20
20
  }