@react-ui-org/react-ui 0.48.0 → 0.50.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 (105) hide show
  1. package/dist/lib.development.js +162 -66
  2. package/dist/lib.js +1 -1
  3. package/package.json +1 -1
  4. package/src/lib/components/Alert/Alert.jsx +3 -0
  5. package/src/lib/components/Alert/Alert.scss +10 -10
  6. package/src/lib/components/Alert/README.mdx +14 -0
  7. package/src/lib/components/Badge/Badge.jsx +4 -8
  8. package/src/lib/components/Badge/Badge.scss +21 -21
  9. package/src/lib/components/Badge/README.mdx +14 -0
  10. package/src/lib/components/Button/Button.jsx +2 -13
  11. package/src/lib/components/Button/README.mdx +17 -5
  12. package/src/lib/components/Button/_base.scss +20 -20
  13. package/src/lib/components/Button/_priorities.scss +35 -35
  14. package/src/lib/components/Button/helpers/getRootLabelVisibilityClassName.js +7 -7
  15. package/src/lib/components/Button/helpers/getRootPriorityClassName.js +3 -3
  16. package/src/lib/components/ButtonGroup/ButtonGroup.jsx +0 -7
  17. package/src/lib/components/ButtonGroup/README.mdx +14 -0
  18. package/src/lib/components/Card/Card.jsx +6 -10
  19. package/src/lib/components/Card/Card.scss +13 -13
  20. package/src/lib/components/Card/CardBody.jsx +6 -10
  21. package/src/lib/components/Card/CardFooter.jsx +6 -7
  22. package/src/lib/components/Card/README.mdx +14 -0
  23. package/src/lib/components/CheckboxField/CheckboxField.jsx +1 -27
  24. package/src/lib/components/CheckboxField/README.mdx +17 -5
  25. package/src/lib/components/FileInputField/FileInputField.jsx +2 -12
  26. package/src/lib/components/FileInputField/FileInputField.scss +3 -7
  27. package/src/lib/components/FileInputField/README.mdx +29 -27
  28. package/src/lib/components/FormLayout/FormLayout.jsx +5 -9
  29. package/src/lib/components/FormLayout/FormLayout.scss +3 -3
  30. package/src/lib/components/FormLayout/FormLayoutCustomField.jsx +4 -1
  31. package/src/lib/components/FormLayout/FormLayoutCustomField.scss +8 -8
  32. package/src/lib/components/FormLayout/README.mdx +13 -0
  33. package/src/lib/components/Grid/Grid.jsx +0 -7
  34. package/src/lib/components/Grid/GridSpan.jsx +0 -7
  35. package/src/lib/components/Grid/README.mdx +14 -0
  36. package/src/lib/components/Modal/Modal.jsx +7 -11
  37. package/src/lib/components/Modal/ModalBody.jsx +3 -7
  38. package/src/lib/components/Modal/ModalCloseButton.jsx +0 -16
  39. package/src/lib/components/Modal/ModalContent.jsx +3 -7
  40. package/src/lib/components/Modal/ModalFooter.jsx +3 -7
  41. package/src/lib/components/Modal/ModalFooter.scss +5 -5
  42. package/src/lib/components/Modal/ModalHeader.jsx +3 -7
  43. package/src/lib/components/Modal/ModalHeader.scss +5 -5
  44. package/src/lib/components/Modal/ModalTitle.jsx +6 -7
  45. package/src/lib/components/Modal/README.mdx +32 -6
  46. package/src/lib/components/Modal/_helpers/getJustifyClassName.js +5 -5
  47. package/src/lib/components/Paper/Paper.jsx +5 -9
  48. package/src/lib/components/Paper/Paper.scss +2 -2
  49. package/src/lib/components/Paper/README.mdx +14 -0
  50. package/src/lib/components/Popover/Popover.jsx +0 -16
  51. package/src/lib/components/Popover/PopoverWrapper.jsx +0 -7
  52. package/src/lib/components/Popover/README.mdx +19 -0
  53. package/src/lib/components/Radio/README.mdx +12 -5
  54. package/src/lib/components/Radio/Radio.jsx +2 -2
  55. package/src/lib/components/Radio/Radio.scss +3 -3
  56. package/src/lib/components/ScrollView/README.mdx +19 -0
  57. package/src/lib/components/ScrollView/ScrollView.jsx +11 -4
  58. package/src/lib/components/SelectField/README.mdx +17 -5
  59. package/src/lib/components/SelectField/SelectField.jsx +3 -22
  60. package/src/lib/components/SelectField/SelectField.scss +8 -8
  61. package/src/lib/components/Table/README.mdx +21 -7
  62. package/src/lib/components/Table/Table.jsx +43 -101
  63. package/src/lib/components/Table/Table.scss +0 -24
  64. package/src/lib/components/Table/_components/TableBodyCell/TableBodyCell.jsx +46 -0
  65. package/src/lib/components/Table/_components/TableBodyCell/index.js +1 -0
  66. package/src/lib/components/Table/_components/TableCell.scss +25 -0
  67. package/src/lib/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +71 -0
  68. package/src/lib/components/Table/_components/TableHeaderCell/index.js +1 -0
  69. package/src/lib/components/Tabs/README.mdx +16 -0
  70. package/src/lib/components/Tabs/Tabs.jsx +6 -1
  71. package/src/lib/components/Tabs/TabsItem.jsx +3 -0
  72. package/src/lib/components/Text/README.mdx +16 -0
  73. package/src/lib/components/Text/Text.jsx +3 -7
  74. package/src/lib/components/Text/Text.scss +6 -6
  75. package/src/lib/components/Text/_helpers/getRootClampClassName.js +2 -2
  76. package/src/lib/components/Text/_helpers/getRootHyphensClassName.js +2 -2
  77. package/src/lib/components/Text/_helpers/getRootWordWrappingClassName.js +2 -2
  78. package/src/lib/components/TextArea/README.mdx +33 -30
  79. package/src/lib/components/TextArea/TextArea.jsx +3 -43
  80. package/src/lib/components/TextArea/TextArea.scss +8 -8
  81. package/src/lib/components/TextField/README.mdx +53 -51
  82. package/src/lib/components/TextField/TextField.jsx +3 -29
  83. package/src/lib/components/TextField/TextField.scss +9 -9
  84. package/src/lib/components/TextLink/README.mdx +12 -5
  85. package/src/lib/components/TextLink/TextLink.jsx +0 -10
  86. package/src/lib/components/Toggle/README.mdx +17 -5
  87. package/src/lib/components/Toggle/Toggle.jsx +1 -27
  88. package/src/lib/components/Toolbar/README.mdx +13 -0
  89. package/src/lib/components/Toolbar/Toolbar.jsx +9 -43
  90. package/src/lib/components/Toolbar/Toolbar.scss +24 -12
  91. package/src/lib/components/Toolbar/ToolbarGroup.jsx +7 -26
  92. package/src/lib/components/Toolbar/ToolbarItem.jsx +3 -7
  93. package/src/lib/components/Toolbar/_helpers/getAlignClassName.js +19 -0
  94. package/src/lib/components/Toolbar/_helpers/getJustifyClassName.js +16 -0
  95. package/src/lib/components/_helpers/getRootColorClassName.js +10 -10
  96. package/src/lib/components/_helpers/getRootSizeClassName.js +3 -3
  97. package/src/lib/styles/generic/_forms.scss +10 -6
  98. package/src/lib/styles/theme/_accessibility.scss +2 -0
  99. package/src/lib/styles/theme/_form-fields.scss +1 -0
  100. package/src/lib/styles/tools/_accessibility.scss +2 -0
  101. package/src/lib/styles/tools/form-fields/_box-field-layout.scss +15 -15
  102. package/src/lib/styles/tools/form-fields/_foundation.scss +2 -0
  103. package/src/lib/styles/tools/form-fields/_inline-field-elements.scss +1 -1
  104. package/src/lib/styles/tools/form-fields/_inline-field-layout.scss +9 -9
  105. package/src/lib/theme.scss +4 -1
@@ -1,64 +1,35 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
+ import { transferProps } from '../_helpers/transferProps';
4
5
  import { classNames } from '../../utils/classNames';
5
6
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
7
+ import { getAlignClassName } from './_helpers/getAlignClassName';
8
+ import { getJustifyClassName } from './_helpers/getJustifyClassName';
6
9
  import styles from './Toolbar.scss';
7
10
 
8
11
  export const Toolbar = ({
9
12
  align,
10
13
  children,
11
14
  dense,
12
- id,
13
15
  justify,
14
16
  nowrap,
17
+ ...restProps
15
18
  }) => {
16
19
  if (isChildrenEmpty(children)) {
17
20
  return null;
18
21
  }
19
22
 
20
- const alignClass = (value) => {
21
- if (value === 'top') {
22
- return styles.isAlignedToTop;
23
- }
24
-
25
- if (value === 'middle') {
26
- return styles.isAlignedToMiddle;
27
- }
28
-
29
- if (value === 'bottom') {
30
- return styles.isAlignedToBottom;
31
- }
32
-
33
- return styles.isAlignedToBaseline;
34
- };
35
-
36
- const justifyClass = (value) => {
37
- if (value === 'start') {
38
- return styles.isJustifiedToStart;
39
- }
40
-
41
- if (value === 'center') {
42
- return styles.isJustifiedToCenter;
43
- }
44
-
45
- if (value === 'end') {
46
- return styles.isJustifiedToEnd;
47
- }
48
-
49
- return styles.isJustifiedToSpaceBetween;
50
- };
51
-
52
23
  return (
53
24
  <div
25
+ {...transferProps(restProps)}
54
26
  className={classNames(
55
27
  styles.toolbar,
56
- dense && styles.isDense,
57
- nowrap && styles.isNowrap,
58
- alignClass(align),
59
- justifyClass(justify),
28
+ dense && styles.isToolbarDense,
29
+ nowrap && styles.isToolbarNowrap,
30
+ getAlignClassName(align, styles, 'toolbar'),
31
+ getJustifyClassName(justify, styles),
60
32
  )}
61
- id={id}
62
33
  >
63
34
  {children}
64
35
  </div>
@@ -69,7 +40,6 @@ Toolbar.defaultProps = {
69
40
  align: 'top',
70
41
  children: null,
71
42
  dense: false,
72
- id: undefined,
73
43
  justify: 'start',
74
44
  nowrap: false,
75
45
  };
@@ -91,10 +61,6 @@ Toolbar.propTypes = {
91
61
  * If `true`, spacing of all toolbar items in the toolbar will be reduced.
92
62
  */
93
63
  dense: PropTypes.bool,
94
- /**
95
- * ID of the root HTML element.
96
- */
97
- id: PropTypes.string,
98
64
  /**
99
65
  * Horizontal alignment (distribution) of toolbar items and groups.
100
66
  */
@@ -25,47 +25,59 @@
25
25
  min-width: 0;
26
26
  }
27
27
 
28
- .isAlignedToTop {
28
+ .isToolbarAlignedToTop,
29
+ .isGroupAlignedToTop {
29
30
  align-items: flex-start;
30
31
  }
31
32
 
32
- .isAlignedToMiddle {
33
+ .isToolbarAlignedToMiddle,
34
+ .isGroupAlignedToMiddle {
33
35
  align-items: center;
34
36
  }
35
37
 
36
- .isAlignedToBottom {
38
+ .isToolbarAlignedToBottom,
39
+ .isGroupAlignedToBottom {
37
40
  align-items: flex-end;
38
41
  }
39
42
 
40
- .isAlignedToBaseline {
43
+ .isToolbarAlignedToBaseline,
44
+ .isGroupAlignedToBaseline {
41
45
  align-items: baseline;
42
46
  }
43
47
 
44
- .isJustifiedToStart {
48
+ .isToolbarJustifiedToStart,
49
+ .isGroupJustifiedToStart {
45
50
  justify-content: flex-start;
46
51
  }
47
52
 
48
- .isJustifiedToCenter {
53
+ .isToolbarJustifiedToCenter,
54
+ .isGroupJustifiedToCenter {
49
55
  justify-content: center;
50
56
  }
51
57
 
52
- .isJustifiedToEnd {
58
+ .isToolbarJustifiedToEnd,
59
+ .isGroupJustifiedToEnd {
53
60
  justify-content: flex-end;
54
61
  }
55
62
 
56
- .isJustifiedToSpaceBetween {
63
+ .isToolbarJustifiedToSpaceBetween,
64
+ .isGroupJustifiedToSpaceBetween {
57
65
  justify-content: space-between;
58
66
  }
59
67
 
60
- .isDense,
61
- .isDense .group {
68
+ .isToolbarDense,
69
+ .isGroupDense,
70
+ .isToolbarDense .group,
71
+ .isGroupDense .group {
62
72
  gap: theme.$gap-dense;
63
73
  }
64
74
 
65
- .isNowrap {
75
+ .isToolbarNowrap,
76
+ .isGroupNowrap {
66
77
  flex-wrap: nowrap;
67
78
  }
68
79
 
69
- .isNowrap > .item:not(.isItemFlexible) {
80
+ .isToolbarNowrap > .item:not(.isItemFlexible),
81
+ .isGroupNowrap > .item:not(.isItemFlexible) {
70
82
  flex: 0 1 auto;
71
83
  }
@@ -1,46 +1,32 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { withGlobalProps } from '../../provider';
4
+ import { transferProps } from '../_helpers/transferProps';
4
5
  import { classNames } from '../../utils/classNames';
5
6
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
7
+ import { getAlignClassName } from './_helpers/getAlignClassName';
6
8
  import styles from './Toolbar.scss';
7
9
 
8
10
  export const ToolbarGroup = ({
9
11
  align,
10
12
  children,
11
13
  dense,
12
- id,
13
14
  nowrap,
15
+ ...restProps
14
16
  }) => {
15
17
  if (isChildrenEmpty(children)) {
16
18
  return null;
17
19
  }
18
20
 
19
- const alignClass = (value) => {
20
- if (value === 'top') {
21
- return styles.isAlignedToTop;
22
- }
23
-
24
- if (value === 'middle') {
25
- return styles.isAlignedToMiddle;
26
- }
27
-
28
- if (value === 'bottom') {
29
- return styles.isAlignedToBottom;
30
- }
31
-
32
- return styles.isAlignedToBaseline;
33
- };
34
-
35
21
  return (
36
22
  <div
23
+ {...transferProps(restProps)}
37
24
  className={classNames(
38
25
  styles.group,
39
- dense && styles.isDense,
40
- nowrap && styles.isNowrap,
41
- alignClass(align),
26
+ dense && styles.isGroupDense,
27
+ nowrap && styles.isGroupNowrap,
28
+ getAlignClassName(align, styles, 'group'),
42
29
  )}
43
- id={id}
44
30
  >
45
31
  {children}
46
32
  </div>
@@ -51,7 +37,6 @@ ToolbarGroup.defaultProps = {
51
37
  align: 'top',
52
38
  children: null,
53
39
  dense: false,
54
- id: undefined,
55
40
  nowrap: false,
56
41
  };
57
42
 
@@ -68,10 +53,6 @@ ToolbarGroup.propTypes = {
68
53
  * If `true`, spacing of toolbar items in the group will be reduced.
69
54
  */
70
55
  dense: PropTypes.bool,
71
- /**
72
- * ID of the root HTML element.
73
- */
74
- id: PropTypes.string,
75
56
  /**
76
57
  * If set, the toolbar group will not wrap.
77
58
  */
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
+ import { transferProps } from '../_helpers/transferProps';
3
4
  import { classNames } from '../../utils/classNames';
4
5
  import { withGlobalProps } from '../../provider';
5
6
  import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
@@ -8,7 +9,7 @@ import styles from './Toolbar.scss';
8
9
  export const ToolbarItem = ({
9
10
  children,
10
11
  flexible,
11
- id,
12
+ ...restProps
12
13
  }) => {
13
14
  if (isChildrenEmpty(children)) {
14
15
  return null;
@@ -16,11 +17,11 @@ export const ToolbarItem = ({
16
17
 
17
18
  return (
18
19
  <div
20
+ {...transferProps(restProps)}
19
21
  className={classNames(
20
22
  styles.item,
21
23
  flexible && styles.isItemFlexible,
22
24
  )}
23
- id={id}
24
25
  >
25
26
  {children}
26
27
  </div>
@@ -30,7 +31,6 @@ export const ToolbarItem = ({
30
31
  ToolbarItem.defaultProps = {
31
32
  children: null,
32
33
  flexible: false,
33
- id: undefined,
34
34
  };
35
35
 
36
36
  ToolbarItem.propTypes = {
@@ -42,10 +42,6 @@ ToolbarItem.propTypes = {
42
42
  * Allow item to grow and shrink if needed.
43
43
  */
44
44
  flexible: PropTypes.bool,
45
- /**
46
- * ID of the root HTML element.
47
- */
48
- id: PropTypes.string,
49
45
  };
50
46
 
51
47
  export const ToolbarItemWithGlobalProps = withGlobalProps(ToolbarItem, 'ToolbarItem');
@@ -0,0 +1,19 @@
1
+ export const getAlignClassName = (value, styles, type) => {
2
+ if (value === 'top') {
3
+ if (type === 'group') return styles.isGroupAlignedToTop;
4
+ return styles.isToolbarAlignedToTop;
5
+ }
6
+
7
+ if (value === 'middle') {
8
+ if (type === 'group') return styles.isGroupAlignedToMiddle;
9
+ return styles.isToolbarAlignedToMiddle;
10
+ }
11
+
12
+ if (value === 'bottom') {
13
+ if (type === 'group') return styles.isGroupAlignedToBottom;
14
+ return styles.isToolbarAlignedToBottom;
15
+ }
16
+
17
+ if (type === 'group') return styles.isGroupAlignedToBaseline;
18
+ return styles.isToolbarAlignedToBaseline;
19
+ };
@@ -0,0 +1,16 @@
1
+ export const getJustifyClassName = (value, styles) => {
2
+ if (value === 'start') {
3
+ return styles.isToolbarJustifiedToStart;
4
+ }
5
+
6
+ if (value === 'center') {
7
+ return styles.isToolbarJustifiedToCenter;
8
+ }
9
+
10
+ if (value === 'end') {
11
+ return styles.isToolbarJustifiedToEnd;
12
+ }
13
+
14
+ return styles.isToolbarJustifiedToSpaceBetween;
15
+ };
16
+
@@ -1,42 +1,42 @@
1
1
  export const getRootColorClassName = (variant, styles) => {
2
2
  if (variant === 'primary') {
3
- return styles.rootColorPrimary;
3
+ return styles.isRootColorPrimary;
4
4
  }
5
5
 
6
6
  if (variant === 'secondary') {
7
- return styles.rootColorSecondary;
7
+ return styles.isRootColorSecondary;
8
8
  }
9
9
 
10
10
  if (variant === 'success') {
11
- return styles.rootColorSuccess;
11
+ return styles.isRootColorSuccess;
12
12
  }
13
13
 
14
14
  if (variant === 'warning') {
15
- return styles.rootColorWarning;
15
+ return styles.isRootColorWarning;
16
16
  }
17
17
 
18
18
  if (variant === 'danger') {
19
- return styles.rootColorDanger;
19
+ return styles.isRootColorDanger;
20
20
  }
21
21
 
22
22
  if (variant === 'help') {
23
- return styles.rootColorHelp;
23
+ return styles.isRootColorHelp;
24
24
  }
25
25
 
26
26
  if (variant === 'info') {
27
- return styles.rootColorInfo;
27
+ return styles.isRootColorInfo;
28
28
  }
29
29
 
30
30
  if (variant === 'note') {
31
- return styles.rootColorNote;
31
+ return styles.isRootColorNote;
32
32
  }
33
33
 
34
34
  if (variant === 'light') {
35
- return styles.rootColorLight;
35
+ return styles.isRootColorLight;
36
36
  }
37
37
 
38
38
  if (variant === 'dark') {
39
- return styles.rootColorDark;
39
+ return styles.isRootColorDark;
40
40
  }
41
41
 
42
42
  return null;
@@ -1,14 +1,14 @@
1
1
  export const getRootSizeClassName = (size, styles) => {
2
2
  if (size === 'small') {
3
- return styles.rootSizeSmall;
3
+ return styles.isRootSizeSmall;
4
4
  }
5
5
 
6
6
  if (size === 'medium') {
7
- return styles.rootSizeMedium;
7
+ return styles.isRootSizeMedium;
8
8
  }
9
9
 
10
10
  if (size === 'large') {
11
- return styles.rootSizeLarge;
11
+ return styles.isRootSizeLarge;
12
12
  }
13
13
 
14
14
  return null;
@@ -1,9 +1,13 @@
1
- // Remove focus outline as we implement custom appearance of focus state.
2
- button:focus,
3
- input:focus,
4
- select:focus,
5
- textarea:focus {
6
- outline: 0;
1
+ @use "../tools/accessibility";
2
+
3
+ // Remove focus outline as we implement custom appearance of focus state. Increase specificity where necessary to
4
+ // override normalize.css.
5
+ :where(button, input, select, textarea):focus {
6
+ outline: none;
7
+ }
8
+
9
+ :is(a, button, input, select, textarea, [type="button"], [type="submit"]) {
10
+ @include accessibility.focus-ring();
7
11
  }
8
12
 
9
13
  // Reset Chrome and Firefox behaviour which sets a `min-width: min-content;` on fieldsets.
@@ -1,2 +1,4 @@
1
1
  $tap-target-size: var(--rui-tap-target-size);
2
+ $focus-outline: var(--rui-focus-outline);
3
+ $focus-outline-offset: var(--rui-focus-outline-offset);
2
4
  $focus-box-shadow: var(--rui-focus-box-shadow);
@@ -13,6 +13,7 @@ $label-font-size: var(--rui-FormField__label__font-size);
13
13
  $help-text-font-size: var(--rui-FormField__help-text__font-size);
14
14
  $help-text-font-style: var(--rui-FormField__help-text__font-style);
15
15
  $help-text-color: var(--rui-FormField__help-text__color);
16
+ $required-label-color: var(--rui-FormField--required__label__color);
16
17
  $required-sign: var(--rui-FormField--required__sign);
17
18
  $required-sign-color: var(--rui-FormField--required__sign__color);
18
19
 
@@ -46,6 +46,8 @@
46
46
 
47
47
  @mixin focus-ring() {
48
48
  &:focus-visible {
49
+ outline: theme.$focus-outline;
50
+ outline-offset: theme.$focus-outline-offset;
49
51
  box-shadow: theme.$focus-box-shadow;
50
52
  }
51
53
  }
@@ -169,12 +169,12 @@
169
169
  }
170
170
 
171
171
  @include breakpoint.up(forms.$horizontal-breakpoint) {
172
- &.rootLayoutHorizontal {
172
+ &.isRootLayoutHorizontal {
173
173
  display: grid;
174
174
  grid-template-columns: theme.$horizontal-full-width-label-width 1fr; // 6.
175
175
  }
176
176
 
177
- &.rootLayoutHorizontal .field {
177
+ &.isRootLayoutHorizontal .field {
178
178
  justify-self: stretch; // 7.
179
179
  }
180
180
  }
@@ -192,8 +192,8 @@
192
192
  width: auto; // 11.
193
193
  }
194
194
 
195
- &.rootLayoutHorizontal,
196
- &.rootLayoutHorizontal.hasRootSmallInput {
195
+ &.isRootLayoutHorizontal,
196
+ &.isRootLayoutHorizontal.hasRootSmallInput {
197
197
  grid: inherit; // 8.
198
198
  grid-template-columns: subgrid; // 8.
199
199
  grid-column: span 2; // 8.
@@ -203,26 +203,26 @@
203
203
  }
204
204
  }
205
205
 
206
- &.rootLayoutHorizontal.isRootFullWidth {
206
+ &.isRootLayoutHorizontal.isRootFullWidth {
207
207
  grid-template-columns: subgrid; // 8.
208
208
  }
209
209
 
210
- &.rootLayoutHorizontal .label,
211
- &.rootLayoutHorizontal .field,
212
- &.rootLayoutHorizontal .inputContainer,
213
- &.rootLayoutHorizontal .helpText,
214
- &.rootLayoutHorizontal .validationText {
210
+ &.isRootLayoutHorizontal .label,
211
+ &.isRootLayoutHorizontal .field,
212
+ &.isRootLayoutHorizontal .inputContainer,
213
+ &.isRootLayoutHorizontal .helpText,
214
+ &.isRootLayoutHorizontal .validationText {
215
215
  grid-area: unset; // 8.
216
216
  }
217
217
 
218
- &.rootLayoutHorizontal .field,
219
- &.rootLayoutHorizontal .inputContainer,
220
- &.rootLayoutHorizontal .helpText,
221
- &.rootLayoutHorizontal .validationText {
218
+ &.isRootLayoutHorizontal .field,
219
+ &.isRootLayoutHorizontal .inputContainer,
220
+ &.isRootLayoutHorizontal .helpText,
221
+ &.isRootLayoutHorizontal .validationText {
222
222
  grid-column-start: 2; // 8.
223
223
  }
224
224
 
225
- &.rootLayoutHorizontal.hasRootSmallInput .field {
225
+ &.isRootLayoutHorizontal.hasRootSmallInput .field {
226
226
  display: block; // 5.
227
227
  }
228
228
  }
@@ -12,6 +12,8 @@
12
12
  }
13
13
 
14
14
  @mixin label-required() {
15
+ color: var(--rui-local-surrounding-text-color, #{theme.$required-label-color});
16
+
15
17
  &::after {
16
18
  content: theme.$required-sign;
17
19
  color: theme.$required-sign-color;
@@ -99,7 +99,7 @@
99
99
  }
100
100
  }
101
101
 
102
- &.isRootInFormLayout.rootLayoutHorizontal::before {
102
+ &.isRootInFormLayout.isRootLayoutHorizontal::before {
103
103
  grid-column-start: 2;
104
104
 
105
105
  // 4.
@@ -69,7 +69,7 @@
69
69
  width: auto; // 2., 3.
70
70
 
71
71
  @include breakpoint.up(forms.$horizontal-breakpoint) {
72
- &.rootLayoutHorizontal {
72
+ &.isRootLayoutHorizontal {
73
73
  grid: inherit;
74
74
  grid-template-columns: subgrid;
75
75
  grid-column: span 2;
@@ -79,11 +79,11 @@
79
79
  }
80
80
  }
81
81
 
82
- &.rootLayoutHorizontal .field {
82
+ &.isRootLayoutHorizontal .field {
83
83
  display: contents;
84
84
  }
85
85
 
86
- &.rootLayoutHorizontal .label {
86
+ &.isRootLayoutHorizontal .label {
87
87
  grid-column-start: 1;
88
88
  width: auto;
89
89
  padding-right: settings.$horizontal-inner-gap;
@@ -91,14 +91,14 @@
91
91
  text-align: theme.$horizontal-label-text-align;
92
92
  }
93
93
 
94
- &.rootLayoutHorizontal .input,
95
- &.rootLayoutHorizontal .helpText,
96
- &.rootLayoutHorizontal .validationText {
94
+ &.isRootLayoutHorizontal .input,
95
+ &.isRootLayoutHorizontal .helpText,
96
+ &.isRootLayoutHorizontal .validationText {
97
97
  grid-column-start: 2;
98
98
  }
99
99
 
100
- &.rootLayoutHorizontal .helpText,
101
- &.rootLayoutHorizontal .validationText {
100
+ &.isRootLayoutHorizontal .helpText,
101
+ &.isRootLayoutHorizontal .validationText {
102
102
  width: auto;
103
103
  max-width: 100%;
104
104
 
@@ -107,7 +107,7 @@
107
107
  }
108
108
  }
109
109
 
110
- &.rootLayoutHorizontal.hasRootLabelBefore .label {
110
+ &.isRootLayoutHorizontal.hasRootLabelBefore .label {
111
111
  margin-right: 0;
112
112
  }
113
113
  }
@@ -149,7 +149,9 @@
149
149
 
150
150
  // Accessibility
151
151
  --rui-tap-target-size: 10mm;
152
- --rui-focus-box-shadow: 0 0 0 0.2em var(--rui-color-active-focus);
152
+ --rui-focus-outline: 0.2em solid var(--rui-color-active-focus);
153
+ --rui-focus-outline-offset: 1px;
154
+ --rui-focus-box-shadow: none;
153
155
 
154
156
  // Bottom spacings
155
157
  --rui-spacing-bottom-default: var(--rui-spacing-5);
@@ -738,6 +740,7 @@
738
740
  --rui-FormField__help-text__font-size: var(--rui-typography-size-small);
739
741
  --rui-FormField__help-text__font-style: normal;
740
742
  --rui-FormField__help-text__color: var(--rui-color-gray-500);
743
+ --rui-FormField--required__label__color: inherit;
741
744
  --rui-FormField--required__sign: "\00a0*"; // 2.
742
745
  --rui-FormField--required__sign__color: var(--rui-color-gray-500);
743
746